1 /* Select disassembly routine for specified architecture.
2 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 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. */
59 enum bfd_architecture a
= bfd_get_arch (abfd
);
60 disassembler_ftype disassemble
;
64 /* If you add a case to this table, also add it to the
65 ARCH_all definition right above this function. */
68 /* As far as I know we only handle big-endian 29k objects. */
69 disassemble
= print_insn_big_a29k
;
74 disassemble
= print_insn_alpha
;
80 disassemble
= arc_get_disassembler (bfd_get_mach (abfd
),
81 bfd_big_endian (abfd
));
87 if (bfd_big_endian (abfd
))
88 disassemble
= print_insn_big_arm
;
90 disassemble
= print_insn_little_arm
;
95 disassemble
= print_insn_d10v
;
100 disassemble
= print_insn_d30v
;
105 if (bfd_get_mach(abfd
) == bfd_mach_h8300h
)
106 disassemble
= print_insn_h8300h
;
107 else if (bfd_get_mach(abfd
) == bfd_mach_h8300s
)
108 disassemble
= print_insn_h8300s
;
110 disassemble
= print_insn_h8300
;
115 disassemble
= print_insn_h8500
;
120 disassemble
= print_insn_hppa
;
125 if (bfd_get_mach (abfd
) == bfd_mach_i386_i386_intel_syntax
)
126 disassemble
= print_insn_i386_intel
;
128 disassemble
= print_insn_i386_att
;
133 disassemble
= print_insn_i960
;
138 disassemble
= print_insn_fr30
;
143 disassemble
= print_insn_m32r
;
148 disassemble
= print_insn_m68k
;
153 disassemble
= print_insn_m88k
;
158 disassemble
= print_insn_ns32k
;
163 disassemble
= print_insn_mcore
;
168 if (bfd_big_endian (abfd
))
169 disassemble
= print_insn_big_mips
;
171 disassemble
= print_insn_little_mips
;
175 case bfd_arch_mn10200
:
176 disassemble
= print_insn_mn10200
;
180 case bfd_arch_mn10300
:
181 disassemble
= print_insn_mn10300
;
185 case bfd_arch_powerpc
:
186 if (bfd_big_endian (abfd
))
187 disassemble
= print_insn_big_powerpc
;
189 disassemble
= print_insn_little_powerpc
;
193 case bfd_arch_rs6000
:
194 disassemble
= print_insn_rs6000
;
199 if (bfd_big_endian (abfd
))
200 disassemble
= print_insn_sh
;
202 disassemble
= print_insn_shl
;
207 disassemble
= print_insn_sparc
;
212 disassemble
= print_insn_tic30
;
217 disassemble
= print_insn_tic80
;
222 disassemble
= print_insn_v850
;
227 disassemble
= print_insn_w65
;
232 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
233 disassemble
= print_insn_z8001
;
235 disassemble
= print_insn_z8002
;
240 disassemble
= print_insn_vax
;