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. */
75 #define ARCH_xstormy16
78 #define INCLUDE_SHMEDIA
82 #include "m32c-desc.h"
89 enum bfd_architecture a
= bfd_get_arch (abfd
);
90 disassembler_ftype disassemble
;
94 /* If you add a case to this table, also add it to the
95 ARCH_all definition right above this function. */
98 disassemble
= print_insn_alpha
;
104 disassemble
= arc_get_disassembler (abfd
);
110 if (bfd_big_endian (abfd
))
111 disassemble
= print_insn_big_arm
;
113 disassemble
= print_insn_little_arm
;
118 disassemble
= print_insn_avr
;
123 disassemble
= cris_get_disassembler (abfd
);
128 disassemble
= print_insn_crx
;
133 disassemble
= print_insn_d10v
;
138 disassemble
= print_insn_d30v
;
143 /* As far as I know we only handle big-endian DLX objects. */
144 disassemble
= print_insn_dlx
;
149 if (bfd_get_mach (abfd
) == bfd_mach_h8300h
150 || bfd_get_mach (abfd
) == bfd_mach_h8300hn
)
151 disassemble
= print_insn_h8300h
;
152 else if (bfd_get_mach (abfd
) == bfd_mach_h8300s
153 || bfd_get_mach (abfd
) == bfd_mach_h8300sn
154 || bfd_get_mach (abfd
) == bfd_mach_h8300sx
155 || bfd_get_mach (abfd
) == bfd_mach_h8300sxn
)
156 disassemble
= print_insn_h8300s
;
158 disassemble
= print_insn_h8300
;
163 disassemble
= print_insn_h8500
;
168 disassemble
= print_insn_hppa
;
173 disassemble
= print_insn_i370
;
178 disassemble
= print_insn_i386
;
183 disassemble
= print_insn_i860
;
188 disassemble
= print_insn_i960
;
193 disassemble
= print_insn_ia64
;
198 disassemble
= print_insn_ip2k
;
203 disassemble
= print_insn_fr30
;
208 disassemble
= print_insn_m32r
;
211 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12)
212 case bfd_arch_m68hc11
:
213 disassemble
= print_insn_m68hc11
;
215 case bfd_arch_m68hc12
:
216 disassemble
= print_insn_m68hc12
;
221 disassemble
= print_insn_m68k
;
226 disassemble
= print_insn_m88k
;
231 disassemble
= print_insn_maxq_little
;
236 disassemble
= print_insn_ms1
;
240 case bfd_arch_msp430
:
241 disassemble
= print_insn_msp430
;
246 disassemble
= print_insn_ns32k
;
251 disassemble
= print_insn_mcore
;
256 if (bfd_big_endian (abfd
))
257 disassemble
= print_insn_big_mips
;
259 disassemble
= print_insn_little_mips
;
264 disassemble
= print_insn_mmix
;
268 case bfd_arch_mn10200
:
269 disassemble
= print_insn_mn10200
;
273 case bfd_arch_mn10300
:
274 disassemble
= print_insn_mn10300
;
278 case bfd_arch_openrisc
:
279 disassemble
= print_insn_openrisc
;
284 if (bfd_big_endian (abfd
))
285 disassemble
= print_insn_big_or32
;
287 disassemble
= print_insn_little_or32
;
292 disassemble
= print_insn_pdp11
;
297 disassemble
= print_insn_pj
;
301 case bfd_arch_powerpc
:
302 if (bfd_big_endian (abfd
))
303 disassemble
= print_insn_big_powerpc
;
305 disassemble
= print_insn_little_powerpc
;
309 case bfd_arch_rs6000
:
310 if (bfd_get_mach (abfd
) == bfd_mach_ppc_620
)
311 disassemble
= print_insn_big_powerpc
;
313 disassemble
= print_insn_rs6000
;
318 disassemble
= print_insn_s390
;
323 disassemble
= print_insn_sh
;
328 disassemble
= print_insn_sparc
;
333 disassemble
= print_insn_tic30
;
338 disassemble
= print_insn_tic4x
;
342 case bfd_arch_tic54x
:
343 disassemble
= print_insn_tic54x
;
348 disassemble
= print_insn_tic80
;
353 disassemble
= print_insn_v850
;
358 disassemble
= print_insn_w65
;
361 #ifdef ARCH_xstormy16
362 case bfd_arch_xstormy16
:
363 disassemble
= print_insn_xstormy16
;
367 case bfd_arch_xtensa
:
368 disassemble
= print_insn_xtensa
;
373 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
374 disassemble
= print_insn_z8001
;
376 disassemble
= print_insn_z8002
;
381 disassemble
= print_insn_vax
;
386 disassemble
= print_insn_frv
;
390 case bfd_arch_iq2000
:
391 disassemble
= print_insn_iq2000
;
396 disassemble
= print_insn_m32c
;
406 disassembler_usage (stream
)
407 FILE * stream ATTRIBUTE_UNUSED
;
410 print_arm_disassembler_options (stream
);
413 print_mips_disassembler_options (stream
);
416 print_ppc_disassembler_options (stream
);
423 disassemble_init_for_target (struct disassemble_info
* info
)
432 info
->symbol_is_valid
= arm_symbol_is_valid
;
437 info
->skip_zeroes
= 16;
442 info
->skip_zeroes
= 32;
446 info
->endian
= BFD_ENDIAN_BIG
;
447 if (info
->mach
== bfd_mach_m16c
)
448 info
->insn_sets
= 1 << ISA_M16C
;
450 info
->insn_sets
= 1 << ISA_M32C
;