diff options
author | j_mayer <j_mayer> | 2007-09-29 12:01:45 +0000 |
---|---|---|
committer | j_mayer <j_mayer> | 2007-09-29 12:01:45 +0000 |
commit | 476f85a0af52931d37b37e8d67a956f9e9f372ed (patch) | |
tree | 35e1df25eed0ec538ae4526aa704ddf8ec2e9ea7 /qemu/disas.c | |
parent | 84b2e046008515b4c8968063fb8b0221813fa867 (diff) |
Define the proper bfd_mach to be used by the disassembler for each
PowerPC emulated CPU.
Diffstat (limited to 'qemu/disas.c')
-rw-r--r-- | qemu/disas.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/qemu/disas.c b/qemu/disas.c index d9032965..ae20d37b 100644 --- a/qemu/disas.c +++ b/qemu/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; |