1 /* Select disassembly routine for specified architecture.
2 Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
76 #define ARCH_xstormy16
80 #define INCLUDE_SHMEDIA
84 #include "m32c-desc.h"
91 enum bfd_architecture a
= bfd_get_arch (abfd
);
92 disassembler_ftype disassemble
;
96 /* If you add a case to this table, also add it to the
97 ARCH_all definition right above this function. */
100 disassemble
= print_insn_alpha
;
106 disassemble
= arc_get_disassembler (abfd
);
112 if (bfd_big_endian (abfd
))
113 disassemble
= print_insn_big_arm
;
115 disassemble
= print_insn_little_arm
;
120 disassemble
= print_insn_avr
;
125 disassemble
= print_insn_bfin
;
130 disassemble
= cris_get_disassembler (abfd
);
135 disassemble
= print_insn_crx
;
140 disassemble
= print_insn_d10v
;
145 disassemble
= print_insn_d30v
;
150 /* As far as I know we only handle big-endian DLX objects. */
151 disassemble
= print_insn_dlx
;
156 if (bfd_get_mach (abfd
) == bfd_mach_h8300h
157 || bfd_get_mach (abfd
) == bfd_mach_h8300hn
)
158 disassemble
= print_insn_h8300h
;
159 else if (bfd_get_mach (abfd
) == bfd_mach_h8300s
160 || bfd_get_mach (abfd
) == bfd_mach_h8300sn
161 || bfd_get_mach (abfd
) == bfd_mach_h8300sx
162 || bfd_get_mach (abfd
) == bfd_mach_h8300sxn
)
163 disassemble
= print_insn_h8300s
;
165 disassemble
= print_insn_h8300
;
170 disassemble
= print_insn_h8500
;
175 disassemble
= print_insn_hppa
;
180 disassemble
= print_insn_i370
;
185 disassemble
= print_insn_i386
;
190 disassemble
= print_insn_i860
;
195 disassemble
= print_insn_i960
;
200 disassemble
= print_insn_ia64
;
205 disassemble
= print_insn_ip2k
;
210 disassemble
= print_insn_fr30
;
215 disassemble
= print_insn_m32r
;
218 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12)
219 case bfd_arch_m68hc11
:
220 disassemble
= print_insn_m68hc11
;
222 case bfd_arch_m68hc12
:
223 disassemble
= print_insn_m68hc12
;
228 disassemble
= print_insn_m68k
;
233 disassemble
= print_insn_m88k
;
238 disassemble
= print_insn_maxq_little
;
243 disassemble
= print_insn_mt
;
247 case bfd_arch_msp430
:
248 disassemble
= print_insn_msp430
;
253 disassemble
= print_insn_ns32k
;
258 disassemble
= print_insn_mcore
;
263 if (bfd_big_endian (abfd
))
264 disassemble
= print_insn_big_mips
;
266 disassemble
= print_insn_little_mips
;
271 disassemble
= print_insn_mmix
;
275 case bfd_arch_mn10200
:
276 disassemble
= print_insn_mn10200
;
280 case bfd_arch_mn10300
:
281 disassemble
= print_insn_mn10300
;
285 case bfd_arch_openrisc
:
286 disassemble
= print_insn_openrisc
;
291 if (bfd_big_endian (abfd
))
292 disassemble
= print_insn_big_or32
;
294 disassemble
= print_insn_little_or32
;
299 disassemble
= print_insn_pdp11
;
304 disassemble
= print_insn_pj
;
308 case bfd_arch_powerpc
:
309 if (bfd_big_endian (abfd
))
310 disassemble
= print_insn_big_powerpc
;
312 disassemble
= print_insn_little_powerpc
;
316 case bfd_arch_rs6000
:
317 if (bfd_get_mach (abfd
) == bfd_mach_ppc_620
)
318 disassemble
= print_insn_big_powerpc
;
320 disassemble
= print_insn_rs6000
;
325 disassemble
= print_insn_s390
;
330 disassemble
= print_insn_sh
;
335 disassemble
= print_insn_sparc
;
340 disassemble
= print_insn_tic30
;
345 disassemble
= print_insn_tic4x
;
349 case bfd_arch_tic54x
:
350 disassemble
= print_insn_tic54x
;
355 disassemble
= print_insn_tic80
;
360 disassemble
= print_insn_v850
;
365 disassemble
= print_insn_w65
;
368 #ifdef ARCH_xstormy16
369 case bfd_arch_xstormy16
:
370 disassemble
= print_insn_xstormy16
;
374 case bfd_arch_xtensa
:
375 disassemble
= print_insn_xtensa
;
380 disassemble
= print_insn_z80
;
385 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
386 disassemble
= print_insn_z8001
;
388 disassemble
= print_insn_z8002
;
393 disassemble
= print_insn_vax
;
398 disassemble
= print_insn_frv
;
402 case bfd_arch_iq2000
:
403 disassemble
= print_insn_iq2000
;
408 disassemble
= print_insn_m32c
;
418 disassembler_usage (stream
)
419 FILE * stream ATTRIBUTE_UNUSED
;
422 print_arm_disassembler_options (stream
);
425 print_mips_disassembler_options (stream
);
428 print_ppc_disassembler_options (stream
);
435 disassemble_init_for_target (struct disassemble_info
* info
)
444 info
->symbol_is_valid
= arm_symbol_is_valid
;
449 info
->skip_zeroes
= 16;
454 info
->skip_zeroes
= 32;
459 info
->endian
= BFD_ENDIAN_BIG
;
460 if (! info
->insn_sets
)
462 info
->insn_sets
= cgen_bitset_create (ISA_MAX
);
463 if (info
->mach
== bfd_mach_m16c
)
464 cgen_bitset_set (info
->insn_sets
, ISA_M16C
);
466 cgen_bitset_set (info
->insn_sets
, ISA_M32C
);