diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-29 12:01:46 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-29 12:01:46 +0000 |
commit | 237c0af0175d78955a3007372a2c9789a05705be (patch) | |
tree | 25034c583f9ad590968213381163f72f34f02e5c /disas.c | |
parent | d12f4c38226f6f029fb55cb9ec0ed4d2054a9851 (diff) | |
download | qemu-237c0af0175d78955a3007372a2c9789a05705be.tar.gz qemu-237c0af0175d78955a3007372a2c9789a05705be.tar.bz2 qemu-237c0af0175d78955a3007372a2c9789a05705be.zip |
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.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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; |