]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/ppc: Check endianness via env in ppc_disas_set_info()
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 4 Dec 2025 17:45:11 +0000 (18:45 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 3 Feb 2026 13:57:33 +0000 (14:57 +0100)
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>

target/ppc/cpu_init.c

index 58816c51a747e545edfd1847d0058d203212ec56..0808284b7228c1207e548319328434b44e9887a5 100644 (file)
@@ -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;