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, 2011 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. */
58 #define ARCH_microblaze
89 #define ARCH_xstormy16
94 #define INCLUDE_SHMEDIA
98 #include "m32c-desc.h"
105 enum bfd_architecture a
= bfd_get_arch (abfd
);
106 disassembler_ftype disassemble
;
110 /* If you add a case to this table, also add it to the
111 ARCH_all definition right above this function. */
114 disassemble
= print_insn_alpha
;
119 disassemble
= arc_get_disassembler (abfd
);
124 if (bfd_big_endian (abfd
))
125 disassemble
= print_insn_big_arm
;
127 disassemble
= print_insn_little_arm
;
132 disassemble
= print_insn_avr
;
137 disassemble
= print_insn_bfin
;
142 disassemble
= print_insn_cr16
;
147 disassemble
= cris_get_disassembler (abfd
);
152 disassemble
= print_insn_crx
;
157 disassemble
= print_insn_d10v
;
162 disassemble
= print_insn_d30v
;
167 /* As far as I know we only handle big-endian DLX objects. */
168 disassemble
= print_insn_dlx
;
173 if (bfd_get_mach (abfd
) == bfd_mach_h8300h
174 || bfd_get_mach (abfd
) == bfd_mach_h8300hn
)
175 disassemble
= print_insn_h8300h
;
176 else if (bfd_get_mach (abfd
) == bfd_mach_h8300s
177 || bfd_get_mach (abfd
) == bfd_mach_h8300sn
178 || bfd_get_mach (abfd
) == bfd_mach_h8300sx
179 || bfd_get_mach (abfd
) == bfd_mach_h8300sxn
)
180 disassemble
= print_insn_h8300s
;
182 disassemble
= print_insn_h8300
;
187 disassemble
= print_insn_h8500
;
192 disassemble
= print_insn_hppa
;
197 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_mt
;
265 #ifdef ARCH_microblaze
266 case bfd_arch_microblaze
:
267 disassemble
= print_insn_microblaze
;
271 case bfd_arch_msp430
:
272 disassemble
= print_insn_msp430
;
277 disassemble
= print_insn_ns32k
;
282 disassemble
= print_insn_mcore
;
287 disassemble
= print_insn_mep
;
292 if (bfd_big_endian (abfd
))
293 disassemble
= print_insn_big_mips
;
295 disassemble
= print_insn_little_mips
;
300 disassemble
= print_insn_mmix
;
304 case bfd_arch_mn10200
:
305 disassemble
= print_insn_mn10200
;
309 case bfd_arch_mn10300
:
310 disassemble
= print_insn_mn10300
;
314 case bfd_arch_openrisc
:
315 disassemble
= print_insn_openrisc
;
320 if (bfd_big_endian (abfd
))
321 disassemble
= print_insn_big_or32
;
323 disassemble
= print_insn_little_or32
;
328 disassemble
= print_insn_pdp11
;
333 disassemble
= print_insn_pj
;
337 case bfd_arch_powerpc
:
338 if (bfd_big_endian (abfd
))
339 disassemble
= print_insn_big_powerpc
;
341 disassemble
= print_insn_little_powerpc
;
345 case bfd_arch_rs6000
:
346 if (bfd_get_mach (abfd
) == bfd_mach_ppc_620
)
347 disassemble
= print_insn_big_powerpc
;
349 disassemble
= print_insn_rs6000
;
354 disassemble
= print_insn_rx
;
359 disassemble
= print_insn_s390
;
364 if (bfd_big_endian (abfd
))
365 disassemble
= print_insn_big_score
;
367 disassemble
= print_insn_little_score
;
372 disassemble
= print_insn_sh
;
377 disassemble
= print_insn_sparc
;
382 disassemble
= print_insn_spu
;
387 disassemble
= print_insn_tic30
;
392 disassemble
= print_insn_tic4x
;
396 case bfd_arch_tic54x
:
397 disassemble
= print_insn_tic54x
;
402 disassemble
= print_insn_tic6x
;
407 disassemble
= print_insn_tic80
;
412 disassemble
= print_insn_v850
;
417 disassemble
= print_insn_w65
;
420 #ifdef ARCH_xstormy16
421 case bfd_arch_xstormy16
:
422 disassemble
= print_insn_xstormy16
;
427 disassemble
= print_insn_xc16x
;
431 case bfd_arch_xtensa
:
432 disassemble
= print_insn_xtensa
;
437 disassemble
= print_insn_z80
;
442 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
443 disassemble
= print_insn_z8001
;
445 disassemble
= print_insn_z8002
;
450 disassemble
= print_insn_vax
;
455 disassemble
= print_insn_frv
;
460 disassemble
= print_insn_moxie
;
464 case bfd_arch_iq2000
:
465 disassemble
= print_insn_iq2000
;
470 disassemble
= print_insn_m32c
;
474 case bfd_arch_tilegx
:
475 disassemble
= print_insn_tilegx
;
479 case bfd_arch_tilepro
:
480 disassemble
= print_insn_tilepro
;
490 disassembler_usage (stream
)
491 FILE * stream ATTRIBUTE_UNUSED
;
494 print_arm_disassembler_options (stream
);
497 print_mips_disassembler_options (stream
);
500 print_ppc_disassembler_options (stream
);
503 print_i386_disassembler_options (stream
);
506 print_s390_disassembler_options (stream
);
513 disassemble_init_for_target (struct disassemble_info
* info
)
522 info
->symbol_is_valid
= arm_symbol_is_valid
;
523 info
->disassembler_needs_relocs
= TRUE
;
528 info
->skip_zeroes
= 16;
533 info
->skip_zeroes
= 32;
538 info
->skip_zeroes
= 256;
539 info
->skip_zeroes_at_end
= 0;
544 /* This processor in fact is little endian. The value set here
545 reflects the way opcodes are written in the cgen description. */
546 info
->endian
= BFD_ENDIAN_BIG
;
547 if (! info
->insn_sets
)
549 info
->insn_sets
= cgen_bitset_create (ISA_MAX
);
550 if (info
->mach
== bfd_mach_m16c
)
551 cgen_bitset_set (info
->insn_sets
, ISA_M16C
);
553 cgen_bitset_set (info
->insn_sets
, ISA_M32C
);