From 6af0bf9c7c3ab9ddbf74a3bf34e067761eb43c3d Mon Sep 17 00:00:00 2001 From: bellard Date: Sat, 2 Jul 2005 14:58:51 +0000 Subject: MIPS target (Jocelyn Mayer) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1464 c046a42c-6fe2-441c-8c8c-71466251a162 --- disas.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'disas.c') diff --git a/disas.c b/disas.c index c54e5d91c0..f713040daa 100644 --- a/disas.c +++ b/disas.c @@ -108,6 +108,24 @@ bfd_vma bfd_getb32 (const bfd_byte *addr) return (bfd_vma) v; } +bfd_vma bfd_getl16 (const bfd_byte *addr) +{ + unsigned long v; + + v = (unsigned long) addr[0]; + v |= (unsigned long) addr[1] << 8; + return (bfd_vma) v; +} + +bfd_vma bfd_getb16 (const bfd_byte *addr) +{ + unsigned long v; + + v = (unsigned long) addr[0] << 24; + v |= (unsigned long) addr[1] << 16; + return (bfd_vma) v; +} + #ifdef TARGET_ARM static int print_insn_thumb1(bfd_vma pc, disassemble_info *info) @@ -162,6 +180,8 @@ void target_disas(FILE *out, target_ulong code, target_ulong size, int flags) if (cpu_single_env->msr[MSR_LE]) disasm_info.endian = BFD_ENDIAN_LITTLE; print_insn = print_insn_ppc; +#elif defined(TARGET_MIPS) + print_insn = print_insn_big_mips; #else fprintf(out, "0x" TARGET_FMT_lx ": Asm output not supported on this arch\n", code); @@ -222,6 +242,10 @@ void disas(FILE *out, void *code, unsigned long size) print_insn = print_insn_sparc; #elif defined(__arm__) print_insn = print_insn_arm; +#elif defined(__MIPSEB__) + print_insn = print_insn_big_mips; +#elif defined(__MIPSEL__) + print_insn = print_insn_little_mips; #else fprintf(out, "0x%lx: Asm output not supported on this arch\n", (long) code); @@ -332,6 +356,8 @@ void monitor_disas(target_ulong pc, int nb_insn, int is_physical, int flags) print_insn = print_insn_sparc; #elif defined(TARGET_PPC) print_insn = print_insn_ppc; +#elif defined(TARGET_MIPS) + print_insn = print_insn_big_mips; #else term_printf("0x" TARGET_FMT_lx ": Asm output not supported on this arch\n", pc); -- cgit v1.2.3