[PATCH v4 08/11] target/ppc: Check endianness via env in ppc_disas_set_info()

Philippe Mathieu-Daudé posted 11 patches 2 days, 13 hours ago
There is a newer version of this series
[PATCH v4 08/11] target/ppc: Check endianness via env in ppc_disas_set_info()
Posted by Philippe Mathieu-Daudé 2 days, 13 hours ago
disas_set_info() shouldn't bother with env->hflags,
access env->msr directly.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/ppc/cpu_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 58816c51a74..0808284b722 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;
-- 
2.52.0