1 /* Select disassembly routine for specified architecture.
2 Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
4 Free Software Foundation, Inc.
6 This file is part of the GNU opcodes library.
8 This library is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
61 #define ARCH_microblaze
93 #define ARCH_xstormy16
99 #define INCLUDE_SHMEDIA
103 #include "m32c-desc.h"
110 enum bfd_architecture a = bfd_get_arch (abfd);
111 disassembler_ftype disassemble;
115 /* If you add a case to this table, also add it to the
116 ARCH_all definition right above this function. */
118 case bfd_arch_aarch64:
119 disassemble = print_insn_aarch64;
124 disassemble = print_insn_alpha;
129 disassemble = arc_get_disassembler (abfd);
134 if (bfd_big_endian (abfd))
135 disassemble = print_insn_big_arm;
137 disassemble = print_insn_little_arm;
142 disassemble = print_insn_avr;
147 disassemble = print_insn_bfin;
152 disassemble = print_insn_cr16;
157 disassemble = cris_get_disassembler (abfd);
162 disassemble = print_insn_crx;
167 disassemble = print_insn_d10v;
172 disassemble = print_insn_d30v;
177 /* As far as I know we only handle big-endian DLX objects. */
178 disassemble = print_insn_dlx;
183 if (bfd_get_mach (abfd) == bfd_mach_h8300h
184 || bfd_get_mach (abfd) == bfd_mach_h8300hn)
185 disassemble = print_insn_h8300h;
186 else if (bfd_get_mach (abfd) == bfd_mach_h8300s
187 || bfd_get_mach (abfd) == bfd_mach_h8300sn
188 || bfd_get_mach (abfd) == bfd_mach_h8300sx
189 || bfd_get_mach (abfd) == bfd_mach_h8300sxn)
190 disassemble = print_insn_h8300s;
192 disassemble = print_insn_h8300;
197 disassemble = print_insn_h8500;
202 disassemble = print_insn_hppa;
207 disassemble = print_insn_i370;
214 disassemble = print_insn_i386;
219 disassemble = print_insn_i860;
224 disassemble = print_insn_i960;
229 disassemble = print_insn_ia64;
234 disassemble = print_insn_ip2k;
238 case bfd_arch_epiphany:
239 disassemble = print_insn_epiphany;
244 disassemble = print_insn_fr30;
249 disassemble = print_insn_lm32;
254 disassemble = print_insn_m32r;
257 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12) \
258 || defined(ARCH_9s12x) || defined(ARCH_m9s12xg)
259 case bfd_arch_m68hc11:
260 disassemble = print_insn_m68hc11;
262 case bfd_arch_m68hc12:
263 disassemble = print_insn_m68hc12;
265 case bfd_arch_m9s12x:
266 disassemble = print_insn_m9s12x;
268 case bfd_arch_m9s12xg:
269 disassemble = print_insn_m9s12xg;
274 disassemble = print_insn_m68k;
279 disassemble = print_insn_m88k;
284 disassemble = print_insn_mt;
287 #ifdef ARCH_microblaze
288 case bfd_arch_microblaze:
289 disassemble = print_insn_microblaze;
293 case bfd_arch_msp430:
294 disassemble = print_insn_msp430;
299 disassemble = print_insn_ns32k;
304 disassemble = print_insn_mcore;
309 disassemble = print_insn_mep;
314 if (bfd_big_endian (abfd))
315 disassemble = print_insn_big_mips;
317 disassemble = print_insn_little_mips;
322 disassemble = print_insn_mmix;
326 case bfd_arch_mn10200:
327 disassemble = print_insn_mn10200;
331 case bfd_arch_mn10300:
332 disassemble = print_insn_mn10300;
336 case bfd_arch_openrisc:
337 disassemble = print_insn_openrisc;
342 if (bfd_big_endian (abfd))
343 disassemble = print_insn_big_or32;
345 disassemble = print_insn_little_or32;
350 disassemble = print_insn_pdp11;
355 disassemble = print_insn_pj;
359 case bfd_arch_powerpc:
360 if (bfd_big_endian (abfd))
361 disassemble = print_insn_big_powerpc;
363 disassemble = print_insn_little_powerpc;
367 case bfd_arch_rs6000:
368 if (bfd_get_mach (abfd) == bfd_mach_ppc_620)
369 disassemble = print_insn_big_powerpc;
371 disassemble = print_insn_rs6000;
376 disassemble = print_insn_rl78;
381 disassemble = print_insn_rx;
386 disassemble = print_insn_s390;
391 if (bfd_big_endian (abfd))
392 disassemble = print_insn_big_score;
394 disassemble = print_insn_little_score;
399 disassemble = print_insn_sh;
404 disassemble = print_insn_sparc;
409 disassemble = print_insn_spu;
414 disassemble = print_insn_tic30;
419 disassemble = print_insn_tic4x;
423 case bfd_arch_tic54x:
424 disassemble = print_insn_tic54x;
429 disassemble = print_insn_tic6x;
434 disassemble = print_insn_tic80;
439 case bfd_arch_v850_rh850:
440 disassemble = print_insn_v850;
445 disassemble = print_insn_w65;
450 disassemble = print_insn_xgate;
453 #ifdef ARCH_xstormy16
454 case bfd_arch_xstormy16:
455 disassemble = print_insn_xstormy16;
460 disassemble = print_insn_xc16x;
464 case bfd_arch_xtensa:
465 disassemble = print_insn_xtensa;
470 disassemble = print_insn_z80;
475 if (bfd_get_mach(abfd) == bfd_mach_z8001)
476 disassemble = print_insn_z8001;
478 disassemble = print_insn_z8002;
483 disassemble = print_insn_vax;
488 disassemble = print_insn_frv;
493 disassemble = print_insn_moxie;
497 case bfd_arch_iq2000:
498 disassemble = print_insn_iq2000;
503 disassemble = print_insn_m32c;
507 case bfd_arch_tilegx:
508 disassemble = print_insn_tilegx;
512 case bfd_arch_tilepro:
513 disassemble = print_insn_tilepro;
523 disassembler_usage (stream)
524 FILE * stream ATTRIBUTE_UNUSED;
527 print_aarch64_disassembler_options (stream);
530 print_arm_disassembler_options (stream);
533 print_mips_disassembler_options (stream);
536 print_ppc_disassembler_options (stream);
539 print_i386_disassembler_options (stream);
542 print_s390_disassembler_options (stream);
549 disassemble_init_for_target (struct disassemble_info * info)
557 case bfd_arch_aarch64:
558 info->symbol_is_valid = aarch64_symbol_is_valid;
559 info->disassembler_needs_relocs = TRUE;
564 info->symbol_is_valid = arm_symbol_is_valid;
565 info->disassembler_needs_relocs = TRUE;
570 info->skip_zeroes = 16;
575 info->skip_zeroes = 32;
580 info->skip_zeroes = 256;
581 info->skip_zeroes_at_end = 0;
586 /* This processor in fact is little endian. The value set here
587 reflects the way opcodes are written in the cgen description. */
588 info->endian = BFD_ENDIAN_BIG;
589 if (! info->insn_sets)
591 info->insn_sets = cgen_bitset_create (ISA_MAX);
592 if (info->mach == bfd_mach_m16c)
593 cgen_bitset_set (info->insn_sets, ISA_M16C);
595 cgen_bitset_set (info->insn_sets, ISA_M32C);
600 case bfd_arch_powerpc:
603 case bfd_arch_rs6000:
605 #if defined (ARCH_powerpc) || defined (ARCH_rs6000)
606 disassemble_init_powerpc (info);