From nobody Sat Apr 11 18:36:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1775676076; cv=none; d=zohomail.com; s=zohoarc; b=gQpvTZsZULcejlpL1xU/sb7Ww70hI6AF/csuZZ9a75EHyQ27TR32n9vSaZQ+UZpUsc+K7/8RTvARrhS3Cm0WBoNdB6lChHnu9c9pclwFVP8h5j556qVnzDAn5Csi4+6fSJ9+pwTucpfx88fP5W+9EaCYIO9xRKEsVXNZH3w1G5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775676076; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Xz1CmgTtPGxO7CCCYjV3Yce2C/RGGhA/FnEMzJwczJA=; b=TWHvHBGObTIb8kYMjlVaoGk1WazzNFmEN68UZqt0QrzidmE6O1+gJoQ+rJd6PFL66ma70X6KjJ19DqBCWQmyepi27nioM4AinQcSciczKeMltFE0cDG0Yiodj2jsUAOKnOxeCJc5dXhPWHK5fz+ntCMwEXh204/ZTzYs+T1VsJQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775676076086464.8717298443406; Wed, 8 Apr 2026 12:21:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wAYRl-0000a4-Ia; Wed, 08 Apr 2026 15:20:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wAY2n-0005jf-0V for qemu-devel@nongnu.org; Wed, 08 Apr 2026 14:54:29 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wAVu0-0006o9-8l for qemu-devel@nongnu.org; Wed, 08 Apr 2026 12:37:18 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 638GCDdF1073261 for ; Wed, 8 Apr 2026 16:37:15 GMT Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ddtb382bf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 08 Apr 2026 16:37:15 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-c7424d91b2dso39073a12.1 for ; Wed, 08 Apr 2026 09:37:15 -0700 (PDT) Received: from hu-mathbern-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-12c1ff43d04sm4082006c88.4.2026.04.08.09.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2026 09:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=Xz1CmgTtPGx O7CCCYjV3Yce2C/RGGhA/FnEMzJwczJA=; b=NJVmEoc9CfN6PWNfO0fgvnnR8j3 Nsa8haSNBS1sMwcoORibkJgUBLD+plZ9+85G1V2+pEztvdXfDKlOg7e+uK6SYDCs Q0/c1moP8dD6t5098fpfkbLFrRgJEGdstCOgVT86xogArxB+kw4/r1/WUz+qYvtB tQCP1VZnQnuyQm6BhPLCt0DGnU3kMixxKYTzQQp+N2rVOHLpZJtxiukL/lkQUzrA wGSmoS3YnSzh9911cOpw9uEV2A6Tahymx6I42Y9yiH/m+Pu5AbPg3YS09BCP3IGc Ve/jm7d+cagSjuQh6Hb/vf4UbqhN7p6FwjVzPbeh9/AbqcAheobGXLqDPAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775666234; x=1776271034; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xz1CmgTtPGxO7CCCYjV3Yce2C/RGGhA/FnEMzJwczJA=; b=K3Z+cXPVHWSCVAOmNm0uqRWp8QhINqgsWxGhQJ5zUx1A3nQzBc5V/5ZmvGm6LT/ZId Jvnu7G0syJm5yJ1nedARZsWYywbKA2ZSNP+lintfROokKaYVyxTabmGIh7iJ/9zkXhAF h0N2TZGU1iz0L1jlXeSAq92tdGhiij+yDUfy3CMX/FANmMrbaxeBkDhTieDOJBU8xrVB IfzyLkRPShU0mdyNF/nwIcCB6tF/cMZLTga5Z9ksl05MBLdIN5vxUCGM/j/706AkT3Dd C3m3iANoxma7W/sF50Ntrc5eYwGd3L105MJSKHNOaLRsBzjN4l4pkUmhSXO1k0p6NoiU arSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775666234; x=1776271034; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date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j X-Received: by 2002:a05:7022:6881:b0:128:dedf:f56d with SMTP id a92af1059eb24-12bfb74419bmr11038051c88.24.1775666233641; Wed, 08 Apr 2026 09:37:13 -0700 (PDT) X-Received: by 2002:a05:7022:6881:b0:128:dedf:f56d with SMTP id a92af1059eb24-12bfb74419bmr11038024c88.24.1775666233062; Wed, 08 Apr 2026 09:37:13 -0700 (PDT) From: Matheus Tavares Bernardino To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, ale@rev.ng, anjo@rev.ng, brian.cain@oss.qualcomm.com, ltaylorsimpson@gmail.com, marco.liebel@oss.qualcomm.com, philmd@linaro.org, quic_mburton@quicinc.com, sid.manning@oss.qualcomm.com Subject: [PATCH v3 04/16] hexagon: group cpu configurations in their own struct Date: Wed, 8 Apr 2026 09:36:55 -0700 Message-Id: X-Mailer: git-send-email 2.37.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA4MDE1NCBTYWx0ZWRfX+8glG7gmmDL1 5RqBU9ACSp8eg6nIncNWwF5jndCVQkBGfBo6xAUBEn5Jqf1EEm56HLh5pwo6mQhhPtaSGPDNHwu Ge5wLtphJP2z+FwP4iYaDvT6FiKx6y9ws+KLKZZFSN1RTBcDSOunucy9XgtsZw5prlmg+rQMOTj 8dAGcGm+26VlKmsL0N/H7UXKwk2P4+rtHKfW4BwM970bFAoe33vyI6Zny6/NNVsLH1EESMG99G4 LjESmQB+x0xbA0UV+IEBr+FRaltYk8Ox2fSEtbPDfptoHTUCTA4mY9WLcpuovnrt0czh+t4/oaA PREiBMS1hdRgsUvt4Tr3TrO1DSmYwl4S7sPibQXl1d1mKB0csl26Llvnby0TrgGBVKEOn5Y/vEY kpQheWxKv/xONTLRwZnSuspWZFpLRWAzND0VG1JNy8RseS3UjoFcTV0gBofdPia1rtloeMWQ6zq hwpcjP7gfBNIElmx7KA== X-Authority-Analysis: v=2.4 cv=eKIjSnp1 c=1 sm=1 tr=0 ts=69d6843b cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=AHWWR7nXwgbOQO2z_T8A:9 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-GUID: 3K7r7gASpZIozAkPxZE9mJ-Cno8dAVPA X-Proofpoint-ORIG-GUID: 3K7r7gASpZIozAkPxZE9mJ-Cno8dAVPA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-08_05,2026-04-08_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 spamscore=0 suspectscore=0 malwarescore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604080154 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=matheus.bernardino@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1775676077050154100 Content-Type: text/plain; charset="utf-8" This will be used in a follow up commit. Signed-off-by: Matheus Tavares Bernardino Reviewed-by: Taylor Simpson --- target/hexagon/cpu.h | 10 +++------- target/hexagon/cpu_bits.h | 7 +++++++ target/hexagon/cpu.c | 14 +++++++------- target/hexagon/translate.c | 6 +++--- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index 77822a48b6..d28beaa92f 100644 --- a/target/hexagon/cpu.h +++ b/target/hexagon/cpu.h @@ -119,19 +119,15 @@ typedef struct HexagonCPUClass { ResettablePhases parent_phases; } HexagonCPUClass; =20 +#include "cpu_bits.h" + struct ArchCPU { CPUState parent_obj; =20 CPUHexagonState env; - - bool lldb_compat; - target_ulong lldb_stack_adjust; - bool short_circuit; - bool ieee_fp_extension; + HexagonCPUConfig cfg; }; =20 -#include "cpu_bits.h" - FIELD(TB_FLAGS, IS_TIGHT_LOOP, 0, 1) =20 G_NORETURN void hexagon_raise_exception_err(CPUHexagonState *env, diff --git a/target/hexagon/cpu_bits.h b/target/hexagon/cpu_bits.h index 19beca81c0..83d13de569 100644 --- a/target/hexagon/cpu_bits.h +++ b/target/hexagon/cpu_bits.h @@ -20,6 +20,13 @@ =20 #include "qemu/bitops.h" =20 +typedef struct HexagonCPUConfig { + bool lldb_compat; + uint32_t lldb_stack_adjust; + bool short_circuit; + bool ieee_fp_extension; +} HexagonCPUConfig; + #define PCALIGN 4 #define PCALIGN_MASK (PCALIGN - 1) =20 diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 8b72a5d3c8..5470d9c7ce 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -50,11 +50,11 @@ static ObjectClass *hexagon_cpu_class_by_name(const cha= r *cpu_model) } =20 static const Property hexagon_cpu_properties[] =3D { - DEFINE_PROP_BOOL("lldb-compat", HexagonCPU, lldb_compat, false), - DEFINE_PROP_UNSIGNED("lldb-stack-adjust", HexagonCPU, lldb_stack_adjus= t, 0, - qdev_prop_uint32, target_ulong), - DEFINE_PROP_BOOL("short-circuit", HexagonCPU, short_circuit, true), - DEFINE_PROP_BOOL("ieee-fp", HexagonCPU, ieee_fp_extension, true), + DEFINE_PROP_BOOL("lldb-compat", HexagonCPU, cfg.lldb_compat, false), + DEFINE_PROP_UNSIGNED("lldb-stack-adjust", HexagonCPU, cfg.lldb_stack_a= djust, + 0, qdev_prop_uint32, target_ulong), + DEFINE_PROP_BOOL("short-circuit", HexagonCPU, cfg.short_circuit, true), + DEFINE_PROP_BOOL("ieee-fp", HexagonCPU, cfg.ieee_fp_extension, true), }; =20 const char * const hexagon_regnames[TOTAL_PER_THREAD_REGS] =3D { @@ -77,7 +77,7 @@ const char * const hexagon_regnames[TOTAL_PER_THREAD_REGS= ] =3D { static target_ulong adjust_stack_ptrs(CPUHexagonState *env, target_ulong a= ddr) { HexagonCPU *cpu =3D env_archcpu(env); - target_ulong stack_adjust =3D cpu->lldb_stack_adjust; + target_ulong stack_adjust =3D cpu->cfg.lldb_stack_adjust; target_ulong stack_start =3D env->stack_start; target_ulong stack_size =3D 0x10000; =20 @@ -181,7 +181,7 @@ static void hexagon_dump(CPUHexagonState *env, FILE *f,= int flags) { HexagonCPU *cpu =3D env_archcpu(env); =20 - if (cpu->lldb_compat) { + if (cpu->cfg.lldb_compat) { /* * When comparing with LLDB, it doesn't step through single-cycle * hardware loops the same way. So, we just skip them here diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index fa8f615a9e..ce3af96675 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -987,8 +987,8 @@ static void hexagon_tr_init_disas_context(DisasContextB= ase *dcbase, ctx->num_hvx_insns =3D 0; ctx->branch_cond =3D TCG_COND_NEVER; ctx->is_tight_loop =3D FIELD_EX32(hex_flags, TB_FLAGS, IS_TIGHT_LOOP); - ctx->short_circuit =3D hex_cpu->short_circuit; - ctx->ieee_fp_extension =3D hex_cpu->ieee_fp_extension; + ctx->short_circuit =3D hex_cpu->cfg.short_circuit; + ctx->ieee_fp_extension =3D hex_cpu->cfg.ieee_fp_extension; } =20 static void hexagon_tr_tb_start(DisasContextBase *db, CPUState *cpu) @@ -1041,7 +1041,7 @@ static void hexagon_tr_translate_packet(DisasContextB= ase *dcbase, CPUState *cpu) * so end the TLB after every packet. */ HexagonCPU *hex_cpu =3D env_archcpu(env); - if (hex_cpu->lldb_compat && qemu_loglevel_mask(CPU_LOG_TB_CPU)) { + if (hex_cpu->cfg.lldb_compat && qemu_loglevel_mask(CPU_LOG_TB_CPU)= ) { ctx->base.is_jmp =3D DISAS_TOO_MANY; } } --=20 2.37.2