1 /* Select disassembly routine for specified architecture.
2 Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006, 2007, 2008, 2009, 2010 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
88 #define ARCH_xstormy16
93 #define INCLUDE_SHMEDIA
97 #include "m32c-desc.h"
104 enum bfd_architecture a
= bfd_get_arch (abfd
);
105 disassembler_ftype disassemble
;
109 /* If you add a case to this table, also add it to the
110 ARCH_all definition right above this function. */
113 disassemble
= print_insn_alpha
;
119 disassemble
= arc_get_disassembler (abfd
);
125 if (bfd_big_endian (abfd
))
126 disassemble
= print_insn_big_arm
;
128 disassemble
= print_insn_little_arm
;
133 disassemble
= print_insn_avr
;
138 disassemble
= print_insn_bfin
;
143 disassemble
= print_insn_cr16
;
148 disassemble
= cris_get_disassembler (abfd
);
153 disassemble
= print_insn_crx
;
158 disassemble
= print_insn_d10v
;
163 disassemble
= print_insn_d30v
;
168 /* As far as I know we only handle big-endian DLX objects. */
169 disassemble
= print_insn_dlx
;
174 if (bfd_get_mach (abfd
) == bfd_mach_h8300h
175 || bfd_get_mach (abfd
) == bfd_mach_h8300hn
)
176 disassemble
= print_insn_h8300h
;
177 else if (bfd_get_mach (abfd
) == bfd_mach_h8300s
178 || bfd_get_mach (abfd
) == bfd_mach_h8300sn
179 || bfd_get_mach (abfd
) == bfd_mach_h8300sx
180 || bfd_get_mach (abfd
) == bfd_mach_h8300sxn
)
181 disassemble
= print_insn_h8300s
;
183 disassemble
= print_insn_h8300
;
188 disassemble
= print_insn_h8500
;
193 disassemble
= print_insn_hppa
;
198 disassemble
= print_insn_i370
;
204 disassemble
= print_insn_i386
;
209 disassemble
= print_insn_i860
;
214 disassemble
= print_insn_i960
;
219 disassemble
= print_insn_ia64
;
224 disassemble
= print_insn_ip2k
;
229 disassemble
= print_insn_fr30
;
234 disassemble
= print_insn_lm32
;
239 disassemble
= print_insn_m32r
;
242 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12)
243 case bfd_arch_m68hc11
:
244 disassemble
= print_insn_m68hc11
;
246 case bfd_arch_m68hc12
:
247 disassemble
= print_insn_m68hc12
;
252 disassemble
= print_insn_m68k
;
257 disassemble
= print_insn_m88k
;
262 disassemble
= print_insn_maxq_little
;
267 disassemble
= print_insn_mt
;
270 #ifdef ARCH_microblaze
271 case bfd_arch_microblaze
:
272 disassemble
= print_insn_microblaze
;
276 case bfd_arch_msp430
:
277 disassemble
= print_insn_msp430
;
282 disassemble
= print_insn_ns32k
;
287 disassemble
= print_insn_mcore
;
292 disassemble
= print_insn_mep
;
297 if (bfd_big_endian (abfd
))
298 disassemble
= print_insn_big_mips
;
300 disassemble
= print_insn_little_mips
;
305 disassemble
= print_insn_mmix
;
309 case bfd_arch_mn10200
:
310 disassemble
= print_insn_mn10200
;
314 case bfd_arch_mn10300
:
315 disassemble
= print_insn_mn10300
;
319 case bfd_arch_openrisc
:
320 disassemble
= print_insn_openrisc
;
325 if (bfd_big_endian (abfd
))
326 disassemble
= print_insn_big_or32
;
328 disassemble
= print_insn_little_or32
;
333 disassemble
= print_insn_pdp11
;
338 disassemble
= print_insn_pj
;
342 case bfd_arch_powerpc
:
343 if (bfd_big_endian (abfd
))
344 disassemble
= print_insn_big_powerpc
;
346 disassemble
= print_insn_little_powerpc
;
350 case bfd_arch_rs6000
:
351 if (bfd_get_mach (abfd
) == bfd_mach_ppc_620
)
352 disassemble
= print_insn_big_powerpc
;
354 disassemble
= print_insn_rs6000
;
359 disassemble
= print_insn_rx
;
364 disassemble
= print_insn_s390
;
369 if (bfd_big_endian (abfd
))
370 disassemble
= print_insn_big_score
;
372 disassemble
= print_insn_little_score
;
377 disassemble
= print_insn_sh
;
382 disassemble
= print_insn_sparc
;
387 disassemble
= print_insn_spu
;
392 disassemble
= print_insn_tic30
;
397 disassemble
= print_insn_tic4x
;
401 case bfd_arch_tic54x
:
402 disassemble
= print_insn_tic54x
;
407 disassemble
= print_insn_tic6x
;
412 disassemble
= print_insn_tic80
;
417 disassemble
= print_insn_v850
;
422 disassemble
= print_insn_w65
;
425 #ifdef ARCH_xstormy16
426 case bfd_arch_xstormy16
:
427 disassemble
= print_insn_xstormy16
;
432 disassemble
= print_insn_xc16x
;
436 case bfd_arch_xtensa
:
437 disassemble
= print_insn_xtensa
;
442 disassemble
= print_insn_z80
;
447 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
448 disassemble
= print_insn_z8001
;
450 disassemble
= print_insn_z8002
;
455 disassemble
= print_insn_vax
;
460 disassemble
= print_insn_frv
;
465 disassemble
= print_insn_moxie
;
469 case bfd_arch_iq2000
:
470 disassemble
= print_insn_iq2000
;
475 disassemble
= print_insn_m32c
;
485 disassembler_usage (stream
)
486 FILE * stream ATTRIBUTE_UNUSED
;
489 print_arm_disassembler_options (stream
);
492 print_mips_disassembler_options (stream
);
495 print_ppc_disassembler_options (stream
);
498 print_i386_disassembler_options (stream
);
501 print_s390_disassembler_options (stream
);
508 disassemble_init_for_target (struct disassemble_info
* info
)
517 info
->symbol_is_valid
= arm_symbol_is_valid
;
518 info
->disassembler_needs_relocs
= TRUE
;
523 info
->skip_zeroes
= 16;
528 info
->skip_zeroes
= 32;
533 info
->skip_zeroes
= 256;
534 info
->skip_zeroes_at_end
= 0;
539 info
->endian
= BFD_ENDIAN_BIG
;
540 if (! info
->insn_sets
)
542 info
->insn_sets
= cgen_bitset_create (ISA_MAX
);
543 if (info
->mach
== bfd_mach_m16c
)
544 cgen_bitset_set (info
->insn_sets
, ISA_M16C
);
546 cgen_bitset_set (info
->insn_sets
, ISA_M32C
);