1 /* Select disassembly routine for specified architecture.
2 Copyright 1994 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
45 enum bfd_architecture a
= bfd_get_arch (abfd
);
46 disassembler_ftype disassemble
;
50 /* If you add a case to this table, also add it to the
51 ARCH_all definition right above this function. */
54 /* As far as I know we only handle big-endian 29k objects. */
55 disassemble
= print_insn_big_a29k
;
60 disassemble
= print_insn_alpha
;
65 disassemble
= print_insn_arm
;
70 if (bfd_get_mach(abfd
) == bfd_mach_h8300h
)
71 disassemble
= print_insn_h8300h
;
73 disassemble
= print_insn_h8300
;
78 disassemble
= print_insn_h8500
;
83 disassemble
= print_insn_hppa
;
88 disassemble
= print_insn_i386
;
93 disassemble
= print_insn_i960
;
98 disassemble
= print_insn_m68k
;
103 disassemble
= print_insn_m88k
;
108 disassemble
= print_insn_ns32k
;
113 if (abfd
->xvec
->byteorder_big_p
)
114 disassemble
= print_insn_big_mips
;
116 disassemble
= print_insn_little_mips
;
120 case bfd_arch_powerpc
:
121 if (abfd
->xvec
->byteorder_big_p
)
122 disassemble
= print_insn_big_powerpc
;
124 disassemble
= print_insn_little_powerpc
;
128 case bfd_arch_rs6000
:
129 disassemble
= print_insn_rs6000
;
134 if (abfd
->xvec
->byteorder_big_p
)
135 disassemble
= print_insn_sh
;
137 disassemble
= print_insn_shl
;
142 disassemble
= print_insn_sparc
;
147 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
148 disassemble
= print_insn_z8001
;
150 disassemble
= print_insn_z8002
;