diff options
author | Tom Musta <tommusta@gmail.com> | 2014-04-09 14:53:23 -0500 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-06-16 13:24:26 +0200 |
commit | e13951f8962a069d3172c1bd22f44a4cf5d2c1c9 (patch) | |
tree | 9b8cc62bf03e3e6953139c460df4b2cf2be989d4 | |
parent | 0bbac62618356794097b99a9b8b7634357170b03 (diff) | |
download | qemu-e13951f8962a069d3172c1bd22f44a4cf5d2c1c9.tar.gz qemu-e13951f8962a069d3172c1bd22f44a4cf5d2c1c9.tar.bz2 qemu-e13951f8962a069d3172c1bd22f44a4cf5d2c1c9.zip |
target-ppc: Fix target_disas
Inspect only bit 16 for the Little Endian test. Correct comment preceding
the target_disas() function. Correct grammar in comment for flags processing.
Signed-off-by: Tom Musta <tommusta@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r-- | disas.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -191,7 +191,8 @@ static int print_insn_od_target(bfd_vma pc, disassemble_info *info) values: i386 - 1 means 16 bit code, 2 means 64 bit code arm - bit 0 = thumb, bit 1 = reverse endian, bit 2 = A64 - ppc - nonzero means little endian + ppc - bits 0:15 specify (optionally) the machine instruction set; + bit 16 indicates little endian. other targets - unused */ void target_disas(FILE *out, CPUArchState *env, target_ulong code, @@ -251,11 +252,11 @@ void target_disas(FILE *out, CPUArchState *env, target_ulong code, s.info.mach = bfd_mach_sparc_v9b; #endif #elif defined(TARGET_PPC) - if (flags >> 16) { + if ((flags >> 16) & 1) { s.info.endian = BFD_ENDIAN_LITTLE; } if (flags & 0xFFFF) { - /* If we have a precise definitions of the instructions set, use it */ + /* If we have a precise definition of the instruction set, use it. */ s.info.mach = flags & 0xFFFF; } else { #ifdef TARGET_PPC64 |