1 /* Select disassembly routine for specified architecture.
2 Copyright (C) 1994, 95, 96, 97, 98, 99, 2000
3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
67 enum bfd_architecture a
= bfd_get_arch (abfd
);
68 disassembler_ftype disassemble
;
72 /* If you add a case to this table, also add it to the
73 ARCH_all definition right above this function. */
76 /* As far as I know we only handle big-endian 29k objects. */
77 disassemble
= print_insn_big_a29k
;
82 disassemble
= print_insn_alpha
;
88 disassemble
= arc_get_disassembler (bfd_get_mach (abfd
),
89 bfd_big_endian (abfd
));
95 if (bfd_big_endian (abfd
))
96 disassemble
= print_insn_big_arm
;
98 disassemble
= print_insn_little_arm
;
103 disassemble
= print_insn_avr
;
108 disassemble
= print_insn_d10v
;
113 disassemble
= print_insn_d30v
;
118 if (bfd_get_mach(abfd
) == bfd_mach_h8300h
)
119 disassemble
= print_insn_h8300h
;
120 else if (bfd_get_mach(abfd
) == bfd_mach_h8300s
)
121 disassemble
= print_insn_h8300s
;
123 disassemble
= print_insn_h8300
;
128 disassemble
= print_insn_h8500
;
133 disassemble
= print_insn_hppa
;
138 disassemble
= print_insn_i370
;
143 if (bfd_get_mach (abfd
) == bfd_mach_i386_i386_intel_syntax
)
144 disassemble
= print_insn_i386_intel
;
146 disassemble
= print_insn_i386_att
;
151 disassemble
= print_insn_i960
;
156 disassemble
= print_insn_ia64
;
161 disassemble
= print_insn_fr30
;
166 disassemble
= print_insn_m32r
;
169 #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12)
170 case bfd_arch_m68hc11
:
171 disassemble
= print_insn_m68hc11
;
173 case bfd_arch_m68hc12
:
174 disassemble
= print_insn_m68hc12
;
179 disassemble
= print_insn_m68k
;
184 disassemble
= print_insn_m88k
;
189 disassemble
= print_insn_ns32k
;
194 disassemble
= print_insn_mcore
;
199 if (bfd_big_endian (abfd
))
200 disassemble
= print_insn_big_mips
;
202 disassemble
= print_insn_little_mips
;
206 case bfd_arch_mn10200
:
207 disassemble
= print_insn_mn10200
;
211 case bfd_arch_mn10300
:
212 disassemble
= print_insn_mn10300
;
217 disassemble
= print_insn_pj
;
221 case bfd_arch_powerpc
:
222 if (bfd_big_endian (abfd
))
223 disassemble
= print_insn_big_powerpc
;
225 disassemble
= print_insn_little_powerpc
;
229 case bfd_arch_rs6000
:
230 if (bfd_get_mach (abfd
) == bfd_mach_ppc_620
)
231 disassemble
= print_insn_big_powerpc
;
233 disassemble
= print_insn_rs6000
;
238 if (bfd_big_endian (abfd
))
239 disassemble
= print_insn_sh
;
241 disassemble
= print_insn_shl
;
246 disassemble
= print_insn_sparc
;
251 disassemble
= print_insn_tic30
;
255 case bfd_arch_tic54x
:
256 disassemble
= print_insn_tic54x
;
261 disassemble
= print_insn_tic80
;
266 disassemble
= print_insn_v850
;
271 disassemble
= print_insn_w65
;
276 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
277 disassemble
= print_insn_z8001
;
279 disassemble
= print_insn_z8002
;
284 disassemble
= print_insn_vax
;
294 disassembler_usage (stream
)
295 FILE * stream ATTRIBUTE_UNUSED
;
298 print_arm_disassembler_options (stream
);