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. */
84 #define ARCH_xstormy16
89 #define INCLUDE_SHMEDIA
93 #include "m32c-desc.h"
100 enum bfd_architecture a
= bfd_get_arch (abfd
);
101 disassembler_ftype disassemble
;
105 /* If you add a case to this table, also add it to the
106 ARCH_all definition right above this function. */
109 disassemble
= print_insn_alpha
;
115 disassemble
= arc_get_disassembler (abfd
);
121 if (bfd_big_endian (abfd
))
122 disassemble
= print_insn_big_arm
;
124 disassemble
= print_insn_little_arm
;
129 disassemble
= print_insn_avr
;
134 disassemble
= print_insn_bfin
;
139 disassemble
= print_insn_cr16
;
144 disassemble
= cris_get_disassembler (abfd
);
149 disassemble
= print_insn_crx
;
154 disassemble
= print_insn_d10v
;
159 disassemble
= print_insn_d30v
;
164 /* As far as I know we only handle big-endian DLX objects. */
165 disassemble
= print_insn_dlx
;
170 if (bfd_get_mach (abfd
) == bfd_mach_h8300h
171 || bfd_get_mach (abfd
) == bfd_mach_h8300hn
)
172 disassemble
= print_insn_h8300h
;
173 else if (bfd_get_mach (abfd
) == bfd_mach_h8300s
174 || bfd_get_mach (abfd
) == bfd_mach_h8300sn
175 || bfd_get_mach (abfd
) == bfd_mach_h8300sx
176 || bfd_get_mach (abfd
) == bfd_mach_h8300sxn
)
177 disassemble
= print_insn_h8300s
;
179 disassemble
= print_insn_h8300
;
184 disassemble
= print_insn_h8500
;
189 disassemble
= print_insn_hppa
;
194 disassemble
= print_insn_i370
;
199 disassemble
= print_insn_i386
;
204 disassemble
= print_insn_i860
;
209 disassemble
= print_insn_i960
;
214 disassemble
= print_insn_ia64
;
219 disassemble
= print_insn_ip2k
;
224 disassemble
= print_insn_fr30
;
229 disassemble
= print_insn_lm32
;
234 disassemble
= print_insn_m32r
;
237 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12)
238 case bfd_arch_m68hc11
:
239 disassemble
= print_insn_m68hc11
;
241 case bfd_arch_m68hc12
:
242 disassemble
= print_insn_m68hc12
;
247 disassemble
= print_insn_m68k
;
252 disassemble
= print_insn_m88k
;
257 disassemble
= print_insn_maxq_little
;
262 disassemble
= print_insn_mt
;
266 case bfd_arch_msp430
:
267 disassemble
= print_insn_msp430
;
272 disassemble
= print_insn_ns32k
;
277 disassemble
= print_insn_mcore
;
282 disassemble
= print_insn_mep
;
287 if (bfd_big_endian (abfd
))
288 disassemble
= print_insn_big_mips
;
290 disassemble
= print_insn_little_mips
;
295 disassemble
= print_insn_mmix
;
299 case bfd_arch_mn10200
:
300 disassemble
= print_insn_mn10200
;
304 case bfd_arch_mn10300
:
305 disassemble
= print_insn_mn10300
;
309 case bfd_arch_openrisc
:
310 disassemble
= print_insn_openrisc
;
315 if (bfd_big_endian (abfd
))
316 disassemble
= print_insn_big_or32
;
318 disassemble
= print_insn_little_or32
;
323 disassemble
= print_insn_pdp11
;
328 disassemble
= print_insn_pj
;
332 case bfd_arch_powerpc
:
333 if (bfd_big_endian (abfd
))
334 disassemble
= print_insn_big_powerpc
;
336 disassemble
= print_insn_little_powerpc
;
340 case bfd_arch_rs6000
:
341 if (bfd_get_mach (abfd
) == bfd_mach_ppc_620
)
342 disassemble
= print_insn_big_powerpc
;
344 disassemble
= print_insn_rs6000
;
349 disassemble
= print_insn_s390
;
354 if (bfd_big_endian (abfd
))
355 disassemble
= print_insn_big_score
;
357 disassemble
= print_insn_little_score
;
362 disassemble
= print_insn_sh
;
367 disassemble
= print_insn_sparc
;
372 disassemble
= print_insn_spu
;
377 disassemble
= print_insn_tic30
;
382 disassemble
= print_insn_tic4x
;
386 case bfd_arch_tic54x
:
387 disassemble
= print_insn_tic54x
;
392 disassemble
= print_insn_tic80
;
397 disassemble
= print_insn_v850
;
402 disassemble
= print_insn_w65
;
405 #ifdef ARCH_xstormy16
406 case bfd_arch_xstormy16
:
407 disassemble
= print_insn_xstormy16
;
412 disassemble
= print_insn_xc16x
;
416 case bfd_arch_xtensa
:
417 disassemble
= print_insn_xtensa
;
422 disassemble
= print_insn_z80
;
427 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
428 disassemble
= print_insn_z8001
;
430 disassemble
= print_insn_z8002
;
435 disassemble
= print_insn_vax
;
440 disassemble
= print_insn_frv
;
444 case bfd_arch_iq2000
:
445 disassemble
= print_insn_iq2000
;
450 disassemble
= print_insn_m32c
;
460 disassembler_usage (stream
)
461 FILE * stream ATTRIBUTE_UNUSED
;
464 print_arm_disassembler_options (stream
);
467 print_mips_disassembler_options (stream
);
470 print_ppc_disassembler_options (stream
);
473 print_i386_disassembler_options (stream
);
476 print_s390_disassembler_options (stream
);
483 disassemble_init_for_target (struct disassemble_info
* info
)
492 info
->symbol_is_valid
= arm_symbol_is_valid
;
493 info
->disassembler_needs_relocs
= TRUE
;
498 info
->skip_zeroes
= 16;
503 info
->skip_zeroes
= 32;
508 info
->skip_zeroes
= 256;
509 info
->skip_zeroes_at_end
= 0;
514 info
->endian
= BFD_ENDIAN_BIG
;
515 if (! info
->insn_sets
)
517 info
->insn_sets
= cgen_bitset_create (ISA_MAX
);
518 if (info
->mach
== bfd_mach_m16c
)
519 cgen_bitset_set (info
->insn_sets
, ISA_M16C
);
521 cgen_bitset_set (info
->insn_sets
, ISA_M32C
);