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. */
76 #define ARCH_xstormy16
79 #define INCLUDE_SHMEDIA
83 #include "m32c-desc.h"
90 enum bfd_architecture a
= bfd_get_arch (abfd
);
91 disassembler_ftype disassemble
;
95 /* If you add a case to this table, also add it to the
96 ARCH_all definition right above this function. */
99 disassemble
= print_insn_alpha
;
105 disassemble
= arc_get_disassembler (abfd
);
111 if (bfd_big_endian (abfd
))
112 disassemble
= print_insn_big_arm
;
114 disassemble
= print_insn_little_arm
;
119 disassemble
= print_insn_avr
;
124 disassemble
= print_insn_bfin
;
129 disassemble
= cris_get_disassembler (abfd
);
134 disassemble
= print_insn_crx
;
139 disassemble
= print_insn_d10v
;
144 disassemble
= print_insn_d30v
;
149 /* As far as I know we only handle big-endian DLX objects. */
150 disassemble
= print_insn_dlx
;
155 if (bfd_get_mach (abfd
) == bfd_mach_h8300h
156 || bfd_get_mach (abfd
) == bfd_mach_h8300hn
)
157 disassemble
= print_insn_h8300h
;
158 else if (bfd_get_mach (abfd
) == bfd_mach_h8300s
159 || bfd_get_mach (abfd
) == bfd_mach_h8300sn
160 || bfd_get_mach (abfd
) == bfd_mach_h8300sx
161 || bfd_get_mach (abfd
) == bfd_mach_h8300sxn
)
162 disassemble
= print_insn_h8300s
;
164 disassemble
= print_insn_h8300
;
169 disassemble
= print_insn_h8500
;
174 disassemble
= print_insn_hppa
;
179 disassemble
= print_insn_i370
;
184 disassemble
= print_insn_i386
;
189 disassemble
= print_insn_i860
;
194 disassemble
= print_insn_i960
;
199 disassemble
= print_insn_ia64
;
204 disassemble
= print_insn_ip2k
;
209 disassemble
= print_insn_fr30
;
214 disassemble
= print_insn_m32r
;
217 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12)
218 case bfd_arch_m68hc11
:
219 disassemble
= print_insn_m68hc11
;
221 case bfd_arch_m68hc12
:
222 disassemble
= print_insn_m68hc12
;
227 disassemble
= print_insn_m68k
;
232 disassemble
= print_insn_m88k
;
237 disassemble
= print_insn_maxq_little
;
242 disassemble
= print_insn_ms1
;
246 case bfd_arch_msp430
:
247 disassemble
= print_insn_msp430
;
252 disassemble
= print_insn_ns32k
;
257 disassemble
= print_insn_mcore
;
262 if (bfd_big_endian (abfd
))
263 disassemble
= print_insn_big_mips
;
265 disassemble
= print_insn_little_mips
;
270 disassemble
= print_insn_mmix
;
274 case bfd_arch_mn10200
:
275 disassemble
= print_insn_mn10200
;
279 case bfd_arch_mn10300
:
280 disassemble
= print_insn_mn10300
;
284 case bfd_arch_openrisc
:
285 disassemble
= print_insn_openrisc
;
290 if (bfd_big_endian (abfd
))
291 disassemble
= print_insn_big_or32
;
293 disassemble
= print_insn_little_or32
;
298 disassemble
= print_insn_pdp11
;
303 disassemble
= print_insn_pj
;
307 case bfd_arch_powerpc
:
308 if (bfd_big_endian (abfd
))
309 disassemble
= print_insn_big_powerpc
;
311 disassemble
= print_insn_little_powerpc
;
315 case bfd_arch_rs6000
:
316 if (bfd_get_mach (abfd
) == bfd_mach_ppc_620
)
317 disassemble
= print_insn_big_powerpc
;
319 disassemble
= print_insn_rs6000
;
324 disassemble
= print_insn_s390
;
329 disassemble
= print_insn_sh
;
334 disassemble
= print_insn_sparc
;
339 disassemble
= print_insn_tic30
;
344 disassemble
= print_insn_tic4x
;
348 case bfd_arch_tic54x
:
349 disassemble
= print_insn_tic54x
;
354 disassemble
= print_insn_tic80
;
359 disassemble
= print_insn_v850
;
364 disassemble
= print_insn_w65
;
367 #ifdef ARCH_xstormy16
368 case bfd_arch_xstormy16
:
369 disassemble
= print_insn_xstormy16
;
373 case bfd_arch_xtensa
:
374 disassemble
= print_insn_xtensa
;
379 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
380 disassemble
= print_insn_z8001
;
382 disassemble
= print_insn_z8002
;
387 disassemble
= print_insn_vax
;
392 disassemble
= print_insn_frv
;
396 case bfd_arch_iq2000
:
397 disassemble
= print_insn_iq2000
;
402 disassemble
= print_insn_m32c
;
412 disassembler_usage (stream
)
413 FILE * stream ATTRIBUTE_UNUSED
;
416 print_arm_disassembler_options (stream
);
419 print_mips_disassembler_options (stream
);
422 print_ppc_disassembler_options (stream
);
429 disassemble_init_for_target (struct disassemble_info
* info
)
438 info
->symbol_is_valid
= arm_symbol_is_valid
;
443 info
->skip_zeroes
= 16;
448 info
->skip_zeroes
= 32;
452 info
->endian
= BFD_ENDIAN_BIG
;
453 if (info
->mach
== bfd_mach_m16c
)
454 info
->insn_sets
= 1 << ISA_M16C
;
456 info
->insn_sets
= 1 << ISA_M32C
;