Message ID | 20250318045125.759259-9-pierrick.bouvier@linaro.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | single-binary: start make hw/arm/ common (boot.c) | expand |
On 3/17/25 21:51, Pierrick Bouvier wrote: > Do not rely on target dependent type, but use a fixed type instead. > Since the original type is unsigned, it should be safe to extend its > size without any side effect. > > Signed-off-by: Pierrick Bouvier<pierrick.bouvier@linaro.org> > --- > target/arm/cpu.h | 2 +- > target/arm/tcg/hflags.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> We can also remove the comment lower down about cs_base being based on target_ulong, since that was changed some time ago: exec/translation-block.h: uint64_t cs_base; r~
diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 96f7801a239..27a0d4550f2 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -194,7 +194,7 @@ typedef struct ARMPACKey { /* See the commentary above the TBFLAG field definitions. */ typedef struct CPUARMTBFlags { uint32_t flags; - target_ulong flags2; + uint64_t flags2; } CPUARMTBFlags; typedef struct ARMMMUFaultInfo ARMMMUFaultInfo; diff --git a/target/arm/tcg/hflags.c b/target/arm/tcg/hflags.c index 8d79b8b7ae1..e51d9f7b159 100644 --- a/target/arm/tcg/hflags.c +++ b/target/arm/tcg/hflags.c @@ -506,8 +506,8 @@ void assert_hflags_rebuild_correctly(CPUARMState *env) if (unlikely(c.flags != r.flags || c.flags2 != r.flags2)) { fprintf(stderr, "TCG hflags mismatch " - "(current:(0x%08x,0x" TARGET_FMT_lx ")" - " rebuilt:(0x%08x,0x" TARGET_FMT_lx ")\n", + "(current:(0x%08x,0x%016" PRIx64 ")" + " rebuilt:(0x%08x,0x%016" PRIx64 ")\n", c.flags, c.flags2, r.flags, r.flags2); abort(); }
Do not rely on target dependent type, but use a fixed type instead. Since the original type is unsigned, it should be safe to extend its size without any side effect. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- target/arm/cpu.h | 2 +- target/arm/tcg/hflags.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)