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. */
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
;
84 disassemble
= arc_get_disassembler (bfd_get_mach (abfd
),
85 bfd_big_endian (abfd
));
91 if (bfd_big_endian (abfd
))
92 disassemble
= print_insn_big_arm
;
94 disassemble
= print_insn_little_arm
;
99 disassemble
= print_insn_avr
;
104 disassemble
= print_insn_d10v
;
109 disassemble
= print_insn_d30v
;
114 if (bfd_get_mach(abfd
) == bfd_mach_h8300h
)
115 disassemble
= print_insn_h8300h
;
116 else if (bfd_get_mach(abfd
) == bfd_mach_h8300s
)
117 disassemble
= print_insn_h8300s
;
119 disassemble
= print_insn_h8300
;
124 disassemble
= print_insn_h8500
;
129 disassemble
= print_insn_hppa
;
134 disassemble
= print_insn_i370
;
139 if (bfd_get_mach (abfd
) == bfd_mach_i386_i386_intel_syntax
)
140 disassemble
= print_insn_i386_intel
;
142 disassemble
= print_insn_i386_att
;
147 disassemble
= print_insn_i960
;
152 disassemble
= print_insn_fr30
;
157 disassemble
= print_insn_m32r
;
162 disassemble
= print_insn_m68k
;
167 disassemble
= print_insn_m88k
;
172 disassemble
= print_insn_ns32k
;
177 disassemble
= print_insn_mcore
;
182 if (bfd_big_endian (abfd
))
183 disassemble
= print_insn_big_mips
;
185 disassemble
= print_insn_little_mips
;
189 case bfd_arch_mn10200
:
190 disassemble
= print_insn_mn10200
;
194 case bfd_arch_mn10300
:
195 disassemble
= print_insn_mn10300
;
200 disassemble
= print_insn_pj
;
204 case bfd_arch_powerpc
:
205 if (bfd_big_endian (abfd
))
206 disassemble
= print_insn_big_powerpc
;
208 disassemble
= print_insn_little_powerpc
;
212 case bfd_arch_rs6000
:
213 disassemble
= print_insn_rs6000
;
218 if (bfd_big_endian (abfd
))
219 disassemble
= print_insn_sh
;
221 disassemble
= print_insn_shl
;
226 disassemble
= print_insn_sparc
;
231 disassemble
= print_insn_tic30
;
236 disassemble
= print_insn_tic80
;
241 disassemble
= print_insn_v850
;
246 disassemble
= print_insn_w65
;
251 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
252 disassemble
= print_insn_z8001
;
254 disassemble
= print_insn_z8002
;
259 disassemble
= print_insn_vax
;
269 disassembler_usage (FILE * stream
)
272 print_arm_disassembler_options (stream
);