summaryrefslogtreecommitdiff
path: root/disas.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-29 12:01:46 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-29 12:01:46 +0000
commit237c0af0175d78955a3007372a2c9789a05705be (patch)
tree25034c583f9ad590968213381163f72f34f02e5c /disas.c
parentd12f4c38226f6f029fb55cb9ec0ed4d2054a9851 (diff)
Define the proper bfd_mach to be used by the disassembler for each
PowerPC emulated CPU. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3257 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'disas.c')
-rw-r--r--disas.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/disas.c b/disas.c
index d903296592..ae20d37bca 100644
--- a/disas.c
+++ b/disas.c
@@ -178,13 +178,18 @@ void target_disas(FILE *out, target_ulong code, target_ulong size, int flags)
disasm_info.mach = bfd_mach_sparc_v9b;
#endif
#elif defined(TARGET_PPC)
- if (flags)
+ if (flags >> 16)
disasm_info.endian = BFD_ENDIAN_LITTLE;
+ if (flags & 0xFFFF) {
+ /* If we have a precise definitions of the instructions set, use it */
+ disasm_info.mach = flags & 0xFFFF;
+ } else {
#ifdef TARGET_PPC64
- disasm_info.mach = bfd_mach_ppc64;
+ disasm_info.mach = bfd_mach_ppc64;
#else
- disasm_info.mach = bfd_mach_ppc;
+ disasm_info.mach = bfd_mach_ppc;
#endif
+ }
print_insn = print_insn_ppc;
#elif defined(TARGET_M68K)
print_insn = print_insn_m68k;