1 /* Select disassembly routine for specified architecture.
2 Copyright (C) 1994, 1995 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 /* start-sanitize-arc */
26 /* end-sanitize-arc */
49 enum bfd_architecture a = bfd_get_arch (abfd);
50 disassembler_ftype disassemble;
54 /* If you add a case to this table, also add it to the
55 ARCH_all definition right above this function. */
58 /* As far as I know we only handle big-endian 29k objects. */
59 disassemble = print_insn_big_a29k;
64 disassemble = print_insn_alpha;
67 /* start-sanitize-arc */
71 disassemble = arc_get_disassembler (bfd_get_mach (abfd),
72 bfd_big_endian (abfd));
76 /* end-sanitize-arc */
79 if (bfd_big_endian (abfd))
80 disassemble = print_insn_big_arm;
82 disassemble = print_insn_little_arm;
87 if (bfd_get_mach(abfd) == bfd_mach_h8300h)
88 disassemble = print_insn_h8300h;
90 disassemble = print_insn_h8300;
95 disassemble = print_insn_h8500;
100 disassemble = print_insn_hppa;
105 disassemble = print_insn_i386;
110 disassemble = print_insn_i960;
115 disassemble = print_insn_m68k;
120 disassemble = print_insn_m88k;
125 disassemble = print_insn_ns32k;
130 if (bfd_big_endian (abfd))
131 disassemble = print_insn_big_mips;
133 disassemble = print_insn_little_mips;
137 case bfd_arch_powerpc:
138 if (bfd_big_endian (abfd))
139 disassemble = print_insn_big_powerpc;
141 disassemble = print_insn_little_powerpc;
145 case bfd_arch_rs6000:
146 disassemble = print_insn_rs6000;
151 if (bfd_big_endian (abfd))
152 disassemble = print_insn_sh;
154 disassemble = print_insn_shl;
159 if (bfd_get_mach (abfd) == bfd_mach_sparc_v9
160 || bfd_get_mach (abfd) == bfd_mach_sparc_v9a)
161 disassemble = print_insn_sparc64;
163 disassemble = print_insn_sparc;
168 disassemble = print_insn_w65;
173 if (bfd_get_mach(abfd) == bfd_mach_z8001)
174 disassemble = print_insn_z8001;
176 disassemble = print_insn_z8002;