Commit 3d072f029f for qemu.org
commit 3d072f029f433da7535636a1a26eea9cd644c8b0
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: Thu Dec 4 18:45:11 2025 +0100
target/ppc: Check endianness via env in ppc_disas_set_info()
disas_set_info() shouldn't bother with env->hflags,
access env->msr directly.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20260202210106.93257-9-philmd@linaro.org>
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 58816c51a7..0808284b72 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -7456,7 +7456,7 @@ static void ppc_disas_set_info(CPUState *cs, disassemble_info *info)
{
CPUPPCState *env = cpu_env(cs);
- if ((env->hflags >> MSR_LE) & 1) {
+ if ((env->msr >> MSR_LE) & 1) {
info->endian = BFD_ENDIAN_LITTLE;
} else {
info->endian = BFD_ENDIAN_BIG;