aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorTom Musta <tommusta@gmail.com>2014-04-09 14:53:24 -0500
committerAlexander Graf <agraf@suse.de>2014-06-16 13:24:26 +0200
commit1c38f84373dd0a360883a343f6f50a5c0c856dec (patch)
tree19130e37326cfec35888cc614b39fe3a3808d81f /monitor.c
parente13951f8962a069d3172c1bd22f44a4cf5d2c1c9 (diff)
monitor: QEMU Monitor Instruction Disassembly Incorrect for PowerPC LE Mode
The monitor support for disassembling instructions does not honor the MSR[LE] bit for PowerPC processors. This change enhances the monitor_disas() routine by supporting a flag bit for Little Endian mode. Bit 16 is used since that bit was used in the analagous guest disassembly routine target_disas(). Also, to be consistent with target_disas(), the disassembler bfd_mach field can be passed in the flags argument. Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index ee9390f659..2901187f5f 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1285,6 +1285,10 @@ static void memory_dump(Monitor *mon, int count, int format, int wsize,
}
}
#endif
+#ifdef TARGET_PPC
+ flags = msr_le << 16;
+ flags |= env->bfd_mach;
+#endif
monitor_disas(mon, env, addr, count, is_physical, flags);
return;
}