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. */
85 #define ARCH_xstormy16
90 #define INCLUDE_SHMEDIA
94 #include "m32c-desc.h"
101 enum bfd_architecture a
= bfd_get_arch (abfd
);
102 disassembler_ftype disassemble
;
106 /* If you add a case to this table, also add it to the
107 ARCH_all definition right above this function. */
110 disassemble
= print_insn_alpha
;
116 disassemble
= arc_get_disassembler (abfd
);
122 if (bfd_big_endian (abfd
))
123 disassemble
= print_insn_big_arm
;
125 disassemble
= print_insn_little_arm
;
130 disassemble
= print_insn_avr
;
135 disassemble
= print_insn_bfin
;
140 disassemble
= print_insn_cr16
;
145 disassemble
= cris_get_disassembler (abfd
);
150 disassemble
= print_insn_crx
;
155 disassemble
= print_insn_d10v
;
160 disassemble
= print_insn_d30v
;
165 /* As far as I know we only handle big-endian DLX objects. */
166 disassemble
= print_insn_dlx
;
171 if (bfd_get_mach (abfd
) == bfd_mach_h8300h
172 || bfd_get_mach (abfd
) == bfd_mach_h8300hn
)
173 disassemble
= print_insn_h8300h
;
174 else if (bfd_get_mach (abfd
) == bfd_mach_h8300s
175 || bfd_get_mach (abfd
) == bfd_mach_h8300sn
176 || bfd_get_mach (abfd
) == bfd_mach_h8300sx
177 || bfd_get_mach (abfd
) == bfd_mach_h8300sxn
)
178 disassemble
= print_insn_h8300s
;
180 disassemble
= print_insn_h8300
;
185 disassemble
= print_insn_h8500
;
190 disassemble
= print_insn_hppa
;
195 disassemble
= print_insn_i370
;
201 disassemble
= print_insn_i386
;
206 disassemble
= print_insn_i860
;
211 disassemble
= print_insn_i960
;
216 disassemble
= print_insn_ia64
;
221 disassemble
= print_insn_ip2k
;
226 disassemble
= print_insn_fr30
;
231 disassemble
= print_insn_lm32
;
236 disassemble
= print_insn_m32r
;
239 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12)
240 case bfd_arch_m68hc11
:
241 disassemble
= print_insn_m68hc11
;
243 case bfd_arch_m68hc12
:
244 disassemble
= print_insn_m68hc12
;
249 disassemble
= print_insn_m68k
;
254 disassemble
= print_insn_m88k
;
259 disassemble
= print_insn_maxq_little
;
264 disassemble
= print_insn_mt
;
268 case bfd_arch_msp430
:
269 disassemble
= print_insn_msp430
;
274 disassemble
= print_insn_ns32k
;
279 disassemble
= print_insn_mcore
;
284 disassemble
= print_insn_mep
;
289 if (bfd_big_endian (abfd
))
290 disassemble
= print_insn_big_mips
;
292 disassemble
= print_insn_little_mips
;
297 disassemble
= print_insn_mmix
;
301 case bfd_arch_mn10200
:
302 disassemble
= print_insn_mn10200
;
306 case bfd_arch_mn10300
:
307 disassemble
= print_insn_mn10300
;
311 case bfd_arch_openrisc
:
312 disassemble
= print_insn_openrisc
;
317 if (bfd_big_endian (abfd
))
318 disassemble
= print_insn_big_or32
;
320 disassemble
= print_insn_little_or32
;
325 disassemble
= print_insn_pdp11
;
330 disassemble
= print_insn_pj
;
334 case bfd_arch_powerpc
:
335 if (bfd_big_endian (abfd
))
336 disassemble
= print_insn_big_powerpc
;
338 disassemble
= print_insn_little_powerpc
;
342 case bfd_arch_rs6000
:
343 if (bfd_get_mach (abfd
) == bfd_mach_ppc_620
)
344 disassemble
= print_insn_big_powerpc
;
346 disassemble
= print_insn_rs6000
;
351 disassemble
= print_insn_s390
;
356 if (bfd_big_endian (abfd
))
357 disassemble
= print_insn_big_score
;
359 disassemble
= print_insn_little_score
;
364 disassemble
= print_insn_sh
;
369 disassemble
= print_insn_sparc
;
374 disassemble
= print_insn_spu
;
379 disassemble
= print_insn_tic30
;
384 disassemble
= print_insn_tic4x
;
388 case bfd_arch_tic54x
:
389 disassemble
= print_insn_tic54x
;
394 disassemble
= print_insn_tic80
;
399 disassemble
= print_insn_v850
;
404 disassemble
= print_insn_w65
;
407 #ifdef ARCH_xstormy16
408 case bfd_arch_xstormy16
:
409 disassemble
= print_insn_xstormy16
;
414 disassemble
= print_insn_xc16x
;
418 case bfd_arch_xtensa
:
419 disassemble
= print_insn_xtensa
;
424 disassemble
= print_insn_z80
;
429 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
430 disassemble
= print_insn_z8001
;
432 disassemble
= print_insn_z8002
;
437 disassemble
= print_insn_vax
;
442 disassemble
= print_insn_frv
;
447 disassemble
= print_insn_moxie
;
451 case bfd_arch_iq2000
:
452 disassemble
= print_insn_iq2000
;
457 disassemble
= print_insn_m32c
;
467 disassembler_usage (stream
)
468 FILE * stream ATTRIBUTE_UNUSED
;
471 print_arm_disassembler_options (stream
);
474 print_mips_disassembler_options (stream
);
477 print_ppc_disassembler_options (stream
);
480 print_i386_disassembler_options (stream
);
483 print_s390_disassembler_options (stream
);
490 disassemble_init_for_target (struct disassemble_info
* info
)
499 info
->symbol_is_valid
= arm_symbol_is_valid
;
500 info
->disassembler_needs_relocs
= TRUE
;
505 info
->skip_zeroes
= 16;
510 info
->skip_zeroes
= 32;
515 info
->skip_zeroes
= 256;
516 info
->skip_zeroes_at_end
= 0;
521 info
->endian
= BFD_ENDIAN_BIG
;
522 if (! info
->insn_sets
)
524 info
->insn_sets
= cgen_bitset_create (ISA_MAX
);
525 if (info
->mach
== bfd_mach_m16c
)
526 cgen_bitset_set (info
->insn_sets
, ISA_M16C
);
528 cgen_bitset_set (info
->insn_sets
, ISA_M32C
);