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 */
28 /* start-sanitize-d10v */
30 /* end-sanitize-d10v */
31 /* start-sanitize-d30v */
33 /* end-sanitize-d30v */
49 /* start-sanitize-tic80 */
51 /* end-sanitize-tic80 */
52 /* start-sanitize-v850 */
54 /* end-sanitize-v850 */
63 enum bfd_architecture a = bfd_get_arch (abfd);
64 disassembler_ftype disassemble;
68 /* If you add a case to this table, also add it to the
69 ARCH_all definition right above this function. */
72 /* As far as I know we only handle big-endian 29k objects. */
73 disassemble = print_insn_big_a29k;
78 disassemble = print_insn_alpha;
81 /* start-sanitize-arc */
85 disassemble = arc_get_disassembler (bfd_get_mach (abfd),
86 bfd_big_endian (abfd));
90 /* end-sanitize-arc */
93 if (bfd_big_endian (abfd))
94 disassemble = print_insn_big_arm;
96 disassemble = print_insn_little_arm;
99 /* start-sanitize-d10v */
102 disassemble = print_insn_d10v;
105 /* end-sanitize-d10v */
106 /* start-sanitize-d30v */
109 disassemble = print_insn_d30v;
112 /* end-sanitize-d30v */
115 if (bfd_get_mach(abfd) == bfd_mach_h8300h)
116 disassemble = print_insn_h8300h;
117 else if (bfd_get_mach(abfd) == bfd_mach_h8300s)
118 disassemble = print_insn_h8300s;
120 disassemble = print_insn_h8300;
125 disassemble = print_insn_h8500;
130 disassemble = print_insn_hppa;
135 disassemble = print_insn_i386;
140 disassemble = print_insn_i960;
145 disassemble = print_insn_m68k;
150 disassemble = print_insn_m88k;
155 disassemble = print_insn_ns32k;
160 if (bfd_big_endian (abfd))
161 disassemble = print_insn_big_mips;
163 disassemble = print_insn_little_mips;
167 case bfd_arch_mn10200:
168 disassemble = print_insn_mn10200;
172 case bfd_arch_mn10300:
173 disassemble = print_insn_mn10300;
177 case bfd_arch_powerpc:
178 if (bfd_big_endian (abfd))
179 disassemble = print_insn_big_powerpc;
181 disassemble = print_insn_little_powerpc;
185 case bfd_arch_rs6000:
186 disassemble = print_insn_rs6000;
191 if (bfd_big_endian (abfd))
192 disassemble = print_insn_sh;
194 disassemble = print_insn_shl;
199 disassemble = print_insn_sparc;
202 /* start-sanitize-tic80 */
205 disassemble = print_insn_tic80;
208 /* end-sanitize-tic80 */
209 /* start-sanitize-v850 */
212 disassemble = print_insn_v850;
215 /* end-sanitize-v850 */
218 disassemble = print_insn_w65;
223 if (bfd_get_mach(abfd) == bfd_mach_z8001)
224 disassemble = print_insn_z8001;
226 disassemble = print_insn_z8002;