1 /* Select disassembly routine for specified architecture.
2 Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 This file is part of the GNU opcodes library.
7 This library is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
59 #define ARCH_microblaze
86 #define ARCH_xstormy16
91 #define INCLUDE_SHMEDIA
95 #include "m32c-desc.h"
102 enum bfd_architecture a
= bfd_get_arch (abfd
);
103 disassembler_ftype disassemble
;
107 /* If you add a case to this table, also add it to the
108 ARCH_all definition right above this function. */
111 disassemble
= print_insn_alpha
;
117 disassemble
= arc_get_disassembler (abfd
);
123 if (bfd_big_endian (abfd
))
124 disassemble
= print_insn_big_arm
;
126 disassemble
= print_insn_little_arm
;
131 disassemble
= print_insn_avr
;
136 disassemble
= print_insn_bfin
;
141 disassemble
= print_insn_cr16
;
146 disassemble
= cris_get_disassembler (abfd
);
151 disassemble
= print_insn_crx
;
156 disassemble
= print_insn_d10v
;
161 disassemble
= print_insn_d30v
;
166 /* As far as I know we only handle big-endian DLX objects. */
167 disassemble
= print_insn_dlx
;
172 if (bfd_get_mach (abfd
) == bfd_mach_h8300h
173 || bfd_get_mach (abfd
) == bfd_mach_h8300hn
)
174 disassemble
= print_insn_h8300h
;
175 else if (bfd_get_mach (abfd
) == bfd_mach_h8300s
176 || bfd_get_mach (abfd
) == bfd_mach_h8300sn
177 || bfd_get_mach (abfd
) == bfd_mach_h8300sx
178 || bfd_get_mach (abfd
) == bfd_mach_h8300sxn
)
179 disassemble
= print_insn_h8300s
;
181 disassemble
= print_insn_h8300
;
186 disassemble
= print_insn_h8500
;
191 disassemble
= print_insn_hppa
;
196 disassemble
= print_insn_i370
;
202 disassemble
= print_insn_i386
;
207 disassemble
= print_insn_i860
;
212 disassemble
= print_insn_i960
;
217 disassemble
= print_insn_ia64
;
222 disassemble
= print_insn_ip2k
;
227 disassemble
= print_insn_fr30
;
232 disassemble
= print_insn_lm32
;
237 disassemble
= print_insn_m32r
;
240 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12)
241 case bfd_arch_m68hc11
:
242 disassemble
= print_insn_m68hc11
;
244 case bfd_arch_m68hc12
:
245 disassemble
= print_insn_m68hc12
;
250 disassemble
= print_insn_m68k
;
255 disassemble
= print_insn_m88k
;
260 disassemble
= print_insn_maxq_little
;
265 disassemble
= print_insn_mt
;
268 #ifdef ARCH_microblaze
269 case bfd_arch_microblaze
:
270 disassemble
= print_insn_microblaze
;
274 case bfd_arch_msp430
:
275 disassemble
= print_insn_msp430
;
280 disassemble
= print_insn_ns32k
;
285 disassemble
= print_insn_mcore
;
290 disassemble
= print_insn_mep
;
295 if (bfd_big_endian (abfd
))
296 disassemble
= print_insn_big_mips
;
298 disassemble
= print_insn_little_mips
;
303 disassemble
= print_insn_mmix
;
307 case bfd_arch_mn10200
:
308 disassemble
= print_insn_mn10200
;
312 case bfd_arch_mn10300
:
313 disassemble
= print_insn_mn10300
;
317 case bfd_arch_openrisc
:
318 disassemble
= print_insn_openrisc
;
323 if (bfd_big_endian (abfd
))
324 disassemble
= print_insn_big_or32
;
326 disassemble
= print_insn_little_or32
;
331 disassemble
= print_insn_pdp11
;
336 disassemble
= print_insn_pj
;
340 case bfd_arch_powerpc
:
341 if (bfd_big_endian (abfd
))
342 disassemble
= print_insn_big_powerpc
;
344 disassemble
= print_insn_little_powerpc
;
348 case bfd_arch_rs6000
:
349 if (bfd_get_mach (abfd
) == bfd_mach_ppc_620
)
350 disassemble
= print_insn_big_powerpc
;
352 disassemble
= print_insn_rs6000
;
357 disassemble
= print_insn_s390
;
362 if (bfd_big_endian (abfd
))
363 disassemble
= print_insn_big_score
;
365 disassemble
= print_insn_little_score
;
370 disassemble
= print_insn_sh
;
375 disassemble
= print_insn_sparc
;
380 disassemble
= print_insn_spu
;
385 disassemble
= print_insn_tic30
;
390 disassemble
= print_insn_tic4x
;
394 case bfd_arch_tic54x
:
395 disassemble
= print_insn_tic54x
;
400 disassemble
= print_insn_tic80
;
405 disassemble
= print_insn_v850
;
410 disassemble
= print_insn_w65
;
413 #ifdef ARCH_xstormy16
414 case bfd_arch_xstormy16
:
415 disassemble
= print_insn_xstormy16
;
420 disassemble
= print_insn_xc16x
;
424 case bfd_arch_xtensa
:
425 disassemble
= print_insn_xtensa
;
430 disassemble
= print_insn_z80
;
435 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
436 disassemble
= print_insn_z8001
;
438 disassemble
= print_insn_z8002
;
443 disassemble
= print_insn_vax
;
448 disassemble
= print_insn_frv
;
453 disassemble
= print_insn_moxie
;
457 case bfd_arch_iq2000
:
458 disassemble
= print_insn_iq2000
;
463 disassemble
= print_insn_m32c
;
473 disassembler_usage (stream
)
474 FILE * stream ATTRIBUTE_UNUSED
;
477 print_arm_disassembler_options (stream
);
480 print_mips_disassembler_options (stream
);
483 print_ppc_disassembler_options (stream
);
486 print_i386_disassembler_options (stream
);
489 print_s390_disassembler_options (stream
);
496 disassemble_init_for_target (struct disassemble_info
* info
)
505 info
->symbol_is_valid
= arm_symbol_is_valid
;
506 info
->disassembler_needs_relocs
= TRUE
;
511 info
->skip_zeroes
= 16;
516 info
->skip_zeroes
= 32;
521 info
->skip_zeroes
= 256;
522 info
->skip_zeroes_at_end
= 0;
527 info
->endian
= BFD_ENDIAN_BIG
;
528 if (! info
->insn_sets
)
530 info
->insn_sets
= cgen_bitset_create (ISA_MAX
);
531 if (info
->mach
== bfd_mach_m16c
)
532 cgen_bitset_set (info
->insn_sets
, ISA_M16C
);
534 cgen_bitset_set (info
->insn_sets
, ISA_M32C
);