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. */
60 enum bfd_architecture a
= bfd_get_arch (abfd
);
61 disassembler_ftype disassemble
;
65 /* If you add a case to this table, also add it to the
66 ARCH_all definition right above this function. */
69 /* As far as I know we only handle big-endian 29k objects. */
70 disassemble
= print_insn_big_a29k
;
75 disassemble
= print_insn_alpha
;
81 disassemble
= arc_get_disassembler (bfd_get_mach (abfd
),
82 bfd_big_endian (abfd
));
88 if (bfd_big_endian (abfd
))
89 disassemble
= print_insn_big_arm
;
91 disassemble
= print_insn_little_arm
;
96 disassemble
= print_insn_d10v
;
101 disassemble
= print_insn_d30v
;
106 if (bfd_get_mach(abfd
) == bfd_mach_h8300h
)
107 disassemble
= print_insn_h8300h
;
108 else if (bfd_get_mach(abfd
) == bfd_mach_h8300s
)
109 disassemble
= print_insn_h8300s
;
111 disassemble
= print_insn_h8300
;
116 disassemble
= print_insn_h8500
;
121 disassemble
= print_insn_hppa
;
126 if (bfd_get_mach (abfd
) == bfd_mach_i386_i386_intel_syntax
)
127 disassemble
= print_insn_i386_intel
;
129 disassemble
= print_insn_i386_att
;
134 disassemble
= print_insn_i960
;
139 disassemble
= print_insn_fr30
;
144 disassemble
= print_insn_m32r
;
149 disassemble
= print_insn_m68k
;
154 disassemble
= print_insn_m88k
;
159 disassemble
= print_insn_ns32k
;
164 disassemble
= print_insn_mcore
;
169 if (bfd_big_endian (abfd
))
170 disassemble
= print_insn_big_mips
;
172 disassemble
= print_insn_little_mips
;
176 case bfd_arch_mn10200
:
177 disassemble
= print_insn_mn10200
;
181 case bfd_arch_mn10300
:
182 disassemble
= print_insn_mn10300
;
187 disassemble
= print_insn_pj
;
191 case bfd_arch_powerpc
:
192 if (bfd_big_endian (abfd
))
193 disassemble
= print_insn_big_powerpc
;
195 disassemble
= print_insn_little_powerpc
;
199 case bfd_arch_rs6000
:
200 disassemble
= print_insn_rs6000
;
205 if (bfd_big_endian (abfd
))
206 disassemble
= print_insn_sh
;
208 disassemble
= print_insn_shl
;
213 disassemble
= print_insn_sparc
;
218 disassemble
= print_insn_tic30
;
223 disassemble
= print_insn_tic80
;
228 disassemble
= print_insn_v850
;
233 disassemble
= print_insn_w65
;
238 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
239 disassemble
= print_insn_z8001
;
241 disassemble
= print_insn_z8002
;
246 disassemble
= print_insn_vax
;