qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/ppc: fix memory dump endianness in QEMU monitor
@ 2019-12-19 16:38 Maxiwell S. Garcia
  2019-12-23  6:30 ` David Gibson
  0 siblings, 1 reply; 8+ messages in thread
From: Maxiwell S. Garcia @ 2019-12-19 16:38 UTC (permalink / raw)
  To: qemu-ppc; +Cc: farosas, qemu-devel, Maxiwell S. Garcia, david

The env->hflags is computed in ppc_cpu_reset(), using the MSR register
as input. But at the point ppc_disas_set_info() is called the MSR_LE bit
in env->hflags doesn't contain the same information that env->msr.

Signed-off-by: Maxiwell S. Garcia <maxiwell@linux.ibm.com>
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
---
 target/ppc/translate_init.inc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c
index d33d65dff7..a0b384da9e 100644
--- a/target/ppc/translate_init.inc.c
+++ b/target/ppc/translate_init.inc.c
@@ -10830,7 +10830,7 @@ static void ppc_disas_set_info(CPUState *cs, disassemble_info *info)
     PowerPCCPU *cpu = POWERPC_CPU(cs);
     CPUPPCState *env = &cpu->env;
 
-    if ((env->hflags >> MSR_LE) & 1) {
+    if (msr_le) {
         info->endian = BFD_ENDIAN_LITTLE;
     }
     info->mach = env->bfd_mach;
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-26  1:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-19 16:38 [PATCH] target/ppc: fix memory dump endianness in QEMU monitor Maxiwell S. Garcia
2019-12-23  6:30 ` David Gibson
2019-12-23 21:35   ` Maxiwell S. Garcia
2019-12-24  5:10     ` David Gibson
2019-12-23 23:27   ` Fabiano Rosas
2019-12-24  5:19     ` David Gibson
2019-12-24 16:10       ` Fabiano Rosas
2019-12-26  1:54         ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).