m68k disassembler (Paul Brook)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1605 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2005-11-06 16:52:11 +00:00
parent b389dbfb58
commit 48024e4a48
6 changed files with 5073 additions and 7 deletions

View File

@ -240,6 +240,9 @@ endif
ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm)
LIBOBJS+=arm-dis.o
endif
ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k)
LIBOBJS+=m68k-dis.o
endif
ifeq ($(ARCH),ia64)
OBJS += ia64-syscall.o

View File

@ -23,9 +23,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include <stdio.h>
#include "dis-asm.h"
#define ATTRIBUTE_UNUSED __attribute__((unused))
#define _(x) x
/* The opcode table is an array of struct alpha_opcode. */
struct alpha_opcode

View File

@ -56,6 +56,17 @@ enum bfd_architecture
#define bfd_mach_m68030 5
#define bfd_mach_m68040 6
#define bfd_mach_m68060 7
#define bfd_mach_cpu32 8
#define bfd_mach_mcf5200 9
#define bfd_mach_mcf5206e 10
#define bfd_mach_mcf5307 11
#define bfd_mach_mcf5407 12
#define bfd_mach_mcf528x 13
#define bfd_mach_mcfv4e 14
#define bfd_mach_mcf521x 15
#define bfd_mach_mcf5249 16
#define bfd_mach_mcf547x 17
#define bfd_mach_mcf548x 18
bfd_arch_vax, /* DEC Vax */
bfd_arch_i960, /* Intel 960 */
/* The order of the following is important.
@ -417,6 +428,7 @@ extern int generic_symbol_at_address
(INFO).insn_info_valid = 0
#define _(x) x
#define ATTRIBUTE_UNUSED __attribute__((unused))
/* from libbfd */
@ -425,5 +437,6 @@ bfd_vma bfd_getb32 (const bfd_byte *addr);
bfd_vma bfd_getl16 (const bfd_byte *addr);
bfd_vma bfd_getb16 (const bfd_byte *addr);
typedef enum bfd_boolean {false, true} boolean;
typedef boolean bfd_boolean;
#endif /* ! defined (DIS_ASM_H) */

View File

@ -187,6 +187,8 @@ void target_disas(FILE *out, target_ulong code, target_ulong size, int flags)
print_insn = print_insn_ppc;
#elif defined(TARGET_MIPS)
print_insn = print_insn_big_mips;
#elif defined(TARGET_M68K)
print_insn = print_insn_m68k;
#else
fprintf(out, "0x" TARGET_FMT_lx
": Asm output not supported on this arch\n", code);
@ -251,6 +253,8 @@ void disas(FILE *out, void *code, unsigned long size)
print_insn = print_insn_big_mips;
#elif defined(__MIPSEL__)
print_insn = print_insn_little_mips;
#elif defined(__m68k__)
print_insn = print_insn_m68k;
#else
fprintf(out, "0x%lx: Asm output not supported on this arch\n",
(long) code);
@ -374,6 +378,8 @@ void monitor_disas(target_ulong pc, int nb_insn, int is_physical, int flags)
print_insn = print_insn_ppc;
#elif defined(TARGET_MIPS)
print_insn = print_insn_big_mips;
#elif defined(TARGET_M68K)
print_insn = print_insn_m68k;
#else
term_printf("0x" TARGET_FMT_lx
": Asm output not supported on this arch\n", pc);

5051
m68k-dis.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2155,10 +2155,6 @@ struct mips_opcode *mips_opcodes =
int bfd_mips_num_opcodes = MIPS_NUM_OPCODES;
#undef MIPS_NUM_OPCODES
typedef int bfd_boolean;
#define TRUE (1)
#define FALSE (0)
/* Mips instructions are at maximum this many bytes long. */
#define INSNLEN 4