From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
qemu-riscv@nongnu.org, qemu-s390x@nongnu.org,
qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
"Anton Johansson" <anjo@rev.ng>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
"Brian Cain" <brian.cain@oss.qualcomm.com>
Subject: [PATCH 07/24] target/hexagon: Use 64-bit TB flags
Date: Fri, 27 Nov 2026 00:35:45 +0100 [thread overview]
Message-ID: <20261126233604.67722-8-philmd@oss.qualcomm.com> (raw)
In-Reply-To: <20261126233604.67722-1-philmd@oss.qualcomm.com>
TranslationBlock::flags and TCGTBCPUState::flags are now
64-bit, use matching types for the values derived from them.
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
target/hexagon/cpu.c | 16 ++++++++--------
target/hexagon/translate.c | 14 +++++++-------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c
index 3575b31d1961..3d401cec7929 100644
--- a/target/hexagon/cpu.c
+++ b/target/hexagon/cpu.c
@@ -370,13 +370,13 @@ static TCGTBCPUState hexagon_get_tb_cpu_state(CPUState *cs)
{
CPUHexagonState *env = cpu_env(cs);
vaddr pc = env->gpr[HEX_REG_PC];
- uint32_t hex_flags = 0;
+ uint64_t hex_flags = 0;
#ifndef CONFIG_USER_ONLY
HexagonCPU *cpu;
#endif
if (pc == env->gpr[HEX_REG_SA0]) {
- hex_flags = FIELD_DP32(hex_flags, TB_FLAGS, IS_TIGHT_LOOP, 1);
+ hex_flags = FIELD_DP64(hex_flags, TB_FLAGS, IS_TIGHT_LOOP, 1);
}
if (pc & PCALIGN_MASK) {
env->cause_code = HEX_CAUSE_PC_NOT_ALIGNED;
@@ -385,22 +385,22 @@ static TCGTBCPUState hexagon_get_tb_cpu_state(CPUState *cs)
#ifndef CONFIG_USER_ONLY
cpu = env_archcpu(env);
- hex_flags = FIELD_DP32(hex_flags, TB_FLAGS, MMU_INDEX,
+ hex_flags = FIELD_DP64(hex_flags, TB_FLAGS, MMU_INDEX,
cpu_mmu_index(env_cpu(env), false));
- hex_flags = FIELD_DP32(hex_flags, TB_FLAGS, HVX_COPROC_ENABLED,
+ hex_flags = FIELD_DP64(hex_flags, TB_FLAGS, HVX_COPROC_ENABLED,
cpu->hvx_ctx[0] &&
GET_SSR_FIELD(SSR_XE, env->t_sreg[HEX_SREG_SSR]));
- hex_flags = FIELD_DP32(hex_flags, TB_FLAGS, CPU_MODE,
+ hex_flags = FIELD_DP64(hex_flags, TB_FLAGS, CPU_MODE,
get_cpu_mode(env));
/* Single-step applies only to user and guest mode packets */
- hex_flags = FIELD_DP32(hex_flags, TB_FLAGS, SS_ACTIVE,
+ hex_flags = FIELD_DP64(hex_flags, TB_FLAGS, SS_ACTIVE,
GET_SSR_FIELD(SSR_SS, env->t_sreg[HEX_SREG_SSR]) &&
get_cpu_mode(env) != HEX_CPU_MODE_MONITOR);
- hex_flags = FIELD_DP32(hex_flags, TB_FLAGS, HMX_COPROC_ENABLED,
+ hex_flags = FIELD_DP64(hex_flags, TB_FLAGS, HMX_COPROC_ENABLED,
cpu->hmx &&
GET_SSR_FIELD(SSR_XE2, env->t_sreg[HEX_SREG_SSR]));
#else
- hex_flags = FIELD_DP32(hex_flags, TB_FLAGS, MMU_INDEX, MMU_USER_IDX);
+ hex_flags = FIELD_DP64(hex_flags, TB_FLAGS, MMU_INDEX, MMU_USER_IDX);
#endif
return (TCGTBCPUState){ .pc = pc, .flags = hex_flags };
diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c
index 11b3917b96c6..f08dc8ef161f 100644
--- a/target/hexagon/translate.c
+++ b/target/hexagon/translate.c
@@ -1570,9 +1570,9 @@ static void hexagon_tr_init_disas_context(DisasContextBase *dcbase,
{
DisasContext *ctx = container_of(dcbase, DisasContext, base);
HexagonCPU *hex_cpu = env_archcpu(cpu_env(cs));
- uint32_t hex_flags = dcbase->tb->flags;
+ uint64_t hex_flags = dcbase->tb->flags;
- ctx->mem_idx = FIELD_EX32(hex_flags, TB_FLAGS, MMU_INDEX);
+ ctx->mem_idx = FIELD_EX64(hex_flags, TB_FLAGS, MMU_INDEX);
ctx->num_packets = 0;
ctx->num_insns = 0;
ctx->num_hvx_insns = 0;
@@ -1582,23 +1582,23 @@ static void hexagon_tr_init_disas_context(DisasContextBase *dcbase,
ctx->hlx_check_emitted = false;
#endif
ctx->branch_cond = TCG_COND_NEVER;
- ctx->is_tight_loop = FIELD_EX32(hex_flags, TB_FLAGS, IS_TIGHT_LOOP);
+ ctx->is_tight_loop = FIELD_EX64(hex_flags, TB_FLAGS, IS_TIGHT_LOOP);
ctx->short_circuit = hex_cpu->cfg.short_circuit;
ctx->hex_def = HEXAGON_CPU_GET_CLASS(hex_cpu)->hex_def;
ctx->ieee_fp_extension = hex_cpu->cfg.ieee_fp_extension;
#ifndef CONFIG_USER_ONLY
ctx->hvx_coproc_enabled =
- FIELD_EX32(hex_flags, TB_FLAGS, HVX_COPROC_ENABLED);
+ FIELD_EX64(hex_flags, TB_FLAGS, HVX_COPROC_ENABLED);
ctx->hvx_check_emitted = false;
- ctx->cpu_mode = FIELD_EX32(hex_flags, TB_FLAGS, CPU_MODE);
- ctx->ss_active = FIELD_EX32(hex_flags, TB_FLAGS, SS_ACTIVE);
+ ctx->cpu_mode = FIELD_EX64(hex_flags, TB_FLAGS, CPU_MODE);
+ ctx->ss_active = FIELD_EX64(hex_flags, TB_FLAGS, SS_ACTIVE);
if (ctx->ss_active) {
/* Step one packet, and let endloop0 branch within the packet */
ctx->base.max_insns = 1;
ctx->is_tight_loop = false;
}
ctx->hmx_coproc_enabled =
- FIELD_EX32(hex_flags, TB_FLAGS, HMX_COPROC_ENABLED);
+ FIELD_EX64(hex_flags, TB_FLAGS, HMX_COPROC_ENABLED);
ctx->hmx_check_emitted = false;
#endif
}
--
2.55.0
next prev parent reply other threads:[~2026-11-26 23:37 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 23:35 [PATCH 00/24] accel/tcg: Widen TranslationBlock::flags to 64 bits Philippe Mathieu-Daudé
2026-11-26 23:35 ` [PATCH 01/24] target/arm: Widen CPUARMTBFlags::flags " Philippe Mathieu-Daudé
2026-11-27 9:58 ` Anton Johansson via
2026-11-27 9:58 ` Anton Johansson via qemu development
2026-11-27 9:58 ` Anton Johansson via
2026-11-26 23:35 ` [PATCH 02/24] accel/tcg: Update stale TranslationBlock::jmp_lock comment Philippe Mathieu-Daudé
2026-11-27 9:59 ` Anton Johansson via
2026-11-27 9:59 ` Anton Johansson via qemu development
2026-11-27 9:59 ` Anton Johansson via
2026-11-26 23:35 ` [PATCH 03/24] accel/tcg: Widen TranslationBlock::flags to 64 bits Philippe Mathieu-Daudé
2026-11-27 11:03 ` Anton Johansson via
2026-11-27 11:03 ` Anton Johansson via
2026-11-27 11:03 ` Anton Johansson via qemu development
2026-11-27 12:30 ` Philippe Mathieu-Daudé
2026-11-26 23:35 ` [PATCH 04/24] target/arm: Update TB flags split comment for 64-bit tb->flags Philippe Mathieu-Daudé
2026-11-27 11:09 ` Anton Johansson via
2026-11-27 11:09 ` Anton Johansson via qemu development
2026-11-27 11:09 ` Anton Johansson via
2026-11-26 23:35 ` [PATCH 05/24] target/alpha: Use 64-bit TB flags Philippe Mathieu-Daudé
2026-11-27 11:11 ` Anton Johansson via
2026-11-27 11:11 ` Anton Johansson via
2026-11-27 11:11 ` Anton Johansson via qemu development
2026-11-26 23:35 ` [PATCH 06/24] target/avr: " Philippe Mathieu-Daudé
2026-11-27 11:12 ` Anton Johansson via qemu development
2026-11-27 11:12 ` Anton Johansson via
2026-11-27 11:12 ` Anton Johansson via
2026-11-26 23:35 ` Philippe Mathieu-Daudé [this message]
2026-11-27 4:56 ` [PATCH 07/24] target/hexagon: " Brian Cain
2026-12-01 2:22 ` Brian Cain
2026-11-26 23:35 ` [PATCH 08/24] target/hppa: " Philippe Mathieu-Daudé
2026-11-27 11:13 ` Anton Johansson via
2026-11-27 11:13 ` Anton Johansson via
2026-11-27 11:13 ` Anton Johansson via qemu development
2026-11-26 23:35 ` [PATCH 09/24] target/i386: " Philippe Mathieu-Daudé
2026-11-27 11:14 ` Anton Johansson via
2026-11-27 11:14 ` Anton Johansson via
2026-11-27 11:14 ` Anton Johansson via qemu development
2026-11-26 23:35 ` [PATCH 10/24] target/loongarch: " Philippe Mathieu-Daudé
2026-11-27 11:16 ` Anton Johansson via qemu development
2026-11-27 11:16 ` Anton Johansson via
2026-11-27 11:16 ` Anton Johansson via
2026-11-30 1:03 ` Bibo Mao
2026-11-26 23:35 ` [PATCH 11/24] target/m68k: " Philippe Mathieu-Daudé
2026-11-27 11:16 ` Anton Johansson via qemu development
2026-11-27 11:16 ` Anton Johansson via
2026-11-27 11:16 ` Anton Johansson via
2026-11-26 23:35 ` [PATCH 12/24] target/microblaze: " Philippe Mathieu-Daudé
2026-11-27 11:17 ` Anton Johansson via
2026-11-27 11:17 ` Anton Johansson via
2026-11-27 11:17 ` Anton Johansson via qemu development
2026-11-26 23:35 ` [PATCH 13/24] target/mips: " Philippe Mathieu-Daudé
2026-11-27 11:19 ` Anton Johansson via qemu development
2026-11-27 11:19 ` Anton Johansson via
2026-11-27 11:19 ` Anton Johansson via
2026-11-26 23:35 ` [PATCH 14/24] target/or1k: " Philippe Mathieu-Daudé
2026-11-27 11:20 ` Anton Johansson via qemu development
2026-11-27 11:20 ` Anton Johansson via
2026-11-27 11:20 ` Anton Johansson via
2026-11-26 23:35 ` [PATCH 15/24] target/ppc: " Philippe Mathieu-Daudé
2026-11-27 7:57 ` Chinmay Rath
2026-11-27 12:09 ` Philippe Mathieu-Daudé
2026-11-26 23:35 ` [PATCH 16/24] target/riscv: " Philippe Mathieu-Daudé
2026-11-27 11:23 ` Anton Johansson via qemu development
2026-11-27 11:23 ` Anton Johansson via
2026-11-27 11:23 ` Anton Johansson via
2026-12-01 1:15 ` Alistair Francis
2026-12-01 1:16 ` Alistair Francis
2026-11-26 23:35 ` [PATCH 17/24] target/riscv: Partially revert use of tb->cs_base Philippe Mathieu-Daudé
2026-11-27 11:26 ` Anton Johansson via qemu development
2026-11-27 11:26 ` Anton Johansson via
2026-11-27 11:26 ` Anton Johansson via
2026-12-01 1:18 ` Alistair Francis
2026-11-26 23:35 ` [PATCH 18/24] target/rx: Use 64-bit TB flags Philippe Mathieu-Daudé
2026-11-27 11:27 ` Anton Johansson via qemu development
2026-11-27 11:27 ` Anton Johansson via
2026-11-27 11:27 ` Anton Johansson via
2026-11-28 13:42 ` yoshinori.sato
2026-11-26 23:35 ` [PATCH 19/24] target/s390x: " Philippe Mathieu-Daudé
2026-11-27 11:27 ` Anton Johansson via
2026-11-27 11:27 ` Anton Johansson via qemu development
2026-11-27 11:27 ` Anton Johansson via
2026-11-26 23:35 ` [PATCH 20/24] target/sh4: " Philippe Mathieu-Daudé
2026-11-27 11:29 ` Anton Johansson via qemu development
2026-11-27 11:29 ` Anton Johansson via
2026-11-27 11:29 ` Anton Johansson via
2026-11-28 13:42 ` yoshinori.sato
2026-11-26 23:35 ` [PATCH 21/24] target/sparc: " Philippe Mathieu-Daudé
2026-11-27 11:30 ` Anton Johansson via
2026-11-27 11:30 ` Anton Johansson via
2026-11-27 11:30 ` Anton Johansson via qemu development
2026-11-26 23:36 ` [PATCH 22/24] target/tricore: " Philippe Mathieu-Daudé
2026-11-27 11:31 ` Anton Johansson via qemu development
2026-11-27 11:31 ` Anton Johansson via
2026-11-27 11:31 ` Anton Johansson via
2026-11-26 23:36 ` [PATCH 23/24] target/xtensa: " Philippe Mathieu-Daudé
2026-11-27 11:32 ` Anton Johansson via qemu development
2026-11-27 11:32 ` Anton Johansson via
2026-11-27 11:32 ` Anton Johansson via
2026-11-26 23:36 ` [PATCH 24/24] accel/tcg: Update TranslationBlock::cs_base description Philippe Mathieu-Daudé
2026-11-27 11:34 ` Anton Johansson via
2026-11-27 11:34 ` Anton Johansson via
2026-11-27 11:34 ` Anton Johansson via qemu development
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126233604.67722-8-philmd@oss.qualcomm.com \
--to=philmd@oss.qualcomm.com \
--cc=anjo@rev.ng \
--cc=brian.cain@oss.qualcomm.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.