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. */
83 #define ARCH_xstormy16
88 #define INCLUDE_SHMEDIA
92 #include "m32c-desc.h"
99 enum bfd_architecture a = bfd_get_arch (abfd);
100 disassembler_ftype disassemble;
104 /* If you add a case to this table, also add it to the
105 ARCH_all definition right above this function. */
108 disassemble = print_insn_alpha;
114 disassemble = arc_get_disassembler (abfd);
120 if (bfd_big_endian (abfd))
121 disassemble = print_insn_big_arm;
123 disassemble = print_insn_little_arm;
128 disassemble = print_insn_avr;
133 disassemble = print_insn_bfin;
138 disassemble = print_insn_cr16;
143 disassemble = cris_get_disassembler (abfd);
148 disassemble = print_insn_crx;
153 disassemble = print_insn_d10v;
158 disassemble = print_insn_d30v;
163 /* As far as I know we only handle big-endian DLX objects. */
164 disassemble = print_insn_dlx;
169 if (bfd_get_mach (abfd) == bfd_mach_h8300h
170 || bfd_get_mach (abfd) == bfd_mach_h8300hn)
171 disassemble = print_insn_h8300h;
172 else if (bfd_get_mach (abfd) == bfd_mach_h8300s
173 || bfd_get_mach (abfd) == bfd_mach_h8300sn
174 || bfd_get_mach (abfd) == bfd_mach_h8300sx
175 || bfd_get_mach (abfd) == bfd_mach_h8300sxn)
176 disassemble = print_insn_h8300s;
178 disassemble = print_insn_h8300;
183 disassemble = print_insn_h8500;
188 disassemble = print_insn_hppa;
193 disassemble = print_insn_i370;
198 disassemble = print_insn_i386;
203 disassemble = print_insn_i860;
208 disassemble = print_insn_i960;
213 disassemble = print_insn_ia64;
218 disassemble = print_insn_ip2k;
223 disassemble = print_insn_fr30;
228 disassemble = print_insn_m32r;
231 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12)
232 case bfd_arch_m68hc11:
233 disassemble = print_insn_m68hc11;
235 case bfd_arch_m68hc12:
236 disassemble = print_insn_m68hc12;
241 disassemble = print_insn_m68k;
246 disassemble = print_insn_m88k;
251 disassemble = print_insn_maxq_little;
256 disassemble = print_insn_mt;
260 case bfd_arch_msp430:
261 disassemble = print_insn_msp430;
266 disassemble = print_insn_ns32k;
271 disassemble = print_insn_mcore;
276 disassemble = print_insn_mep;
281 if (bfd_big_endian (abfd))
282 disassemble = print_insn_big_mips;
284 disassemble = print_insn_little_mips;
289 disassemble = print_insn_mmix;
293 case bfd_arch_mn10200:
294 disassemble = print_insn_mn10200;
298 case bfd_arch_mn10300:
299 disassemble = print_insn_mn10300;
303 case bfd_arch_openrisc:
304 disassemble = print_insn_openrisc;
309 if (bfd_big_endian (abfd))
310 disassemble = print_insn_big_or32;
312 disassemble = print_insn_little_or32;
317 disassemble = print_insn_pdp11;
322 disassemble = print_insn_pj;
326 case bfd_arch_powerpc:
327 if (bfd_big_endian (abfd))
328 disassemble = print_insn_big_powerpc;
330 disassemble = print_insn_little_powerpc;
334 case bfd_arch_rs6000:
335 if (bfd_get_mach (abfd) == bfd_mach_ppc_620)
336 disassemble = print_insn_big_powerpc;
338 disassemble = print_insn_rs6000;
343 disassemble = print_insn_s390;
348 if (bfd_big_endian (abfd))
349 disassemble = print_insn_big_score;
351 disassemble = print_insn_little_score;
356 disassemble = print_insn_sh;
361 disassemble = print_insn_sparc;
366 disassemble = print_insn_spu;
371 disassemble = print_insn_tic30;
376 disassemble = print_insn_tic4x;
380 case bfd_arch_tic54x:
381 disassemble = print_insn_tic54x;
386 disassemble = print_insn_tic80;
391 disassemble = print_insn_v850;
396 disassemble = print_insn_w65;
399 #ifdef ARCH_xstormy16
400 case bfd_arch_xstormy16:
401 disassemble = print_insn_xstormy16;
406 disassemble = print_insn_xc16x;
410 case bfd_arch_xtensa:
411 disassemble = print_insn_xtensa;
416 disassemble = print_insn_z80;
421 if (bfd_get_mach(abfd) == bfd_mach_z8001)
422 disassemble = print_insn_z8001;
424 disassemble = print_insn_z8002;
429 disassemble = print_insn_vax;
434 disassemble = print_insn_frv;
438 case bfd_arch_iq2000:
439 disassemble = print_insn_iq2000;
444 disassemble = print_insn_m32c;
454 disassembler_usage (stream)
455 FILE * stream ATTRIBUTE_UNUSED;
458 print_arm_disassembler_options (stream);
461 print_mips_disassembler_options (stream);
464 print_ppc_disassembler_options (stream);
467 print_i386_disassembler_options (stream);
474 disassemble_init_for_target (struct disassemble_info * info)
483 info->symbol_is_valid = arm_symbol_is_valid;
484 info->disassembler_needs_relocs = TRUE;
489 info->skip_zeroes = 16;
494 info->skip_zeroes = 32;
499 info->skip_zeroes = 256;
500 info->skip_zeroes_at_end = 0;
505 info->endian = BFD_ENDIAN_BIG;
506 if (! info->insn_sets)
508 info->insn_sets = cgen_bitset_create (ISA_MAX);
509 if (info->mach == bfd_mach_m16c)
510 cgen_bitset_set (info->insn_sets, ISA_M16C);
512 cgen_bitset_set (info->insn_sets, ISA_M32C);