1 /* Select disassembly routine for specified architecture.
2 Copyright (C) 1994, 1995 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. */
24 /* start-sanitize-arc */
26 /* end-sanitize-arc */
29 /* start-sanitize-d30v */
31 /* end-sanitize-d30v */
47 /* start-sanitize-tic80 */
49 /* end-sanitize-tic80 */
50 /* start-sanitize-v850 */
52 /* end-sanitize-v850 */
61 enum bfd_architecture a
= bfd_get_arch (abfd
);
62 disassembler_ftype disassemble
;
66 /* If you add a case to this table, also add it to the
67 ARCH_all definition right above this function. */
70 /* As far as I know we only handle big-endian 29k objects. */
71 disassemble
= print_insn_big_a29k
;
76 disassemble
= print_insn_alpha
;
79 /* start-sanitize-arc */
83 disassemble
= arc_get_disassembler (bfd_get_mach (abfd
),
84 bfd_big_endian (abfd
));
88 /* end-sanitize-arc */
91 if (bfd_big_endian (abfd
))
92 disassemble
= print_insn_big_arm
;
94 disassemble
= print_insn_little_arm
;
97 /* start-sanitize-d10v */
100 disassemble
= print_insn_d10v
;
103 /* end-sanitize-d10v */
104 /* start-sanitize-d30v */
107 disassemble
= print_insn_d30v
;
110 /* end-sanitize-d30v */
113 if (bfd_get_mach(abfd
) == bfd_mach_h8300h
)
114 disassemble
= print_insn_h8300h
;
115 else if (bfd_get_mach(abfd
) == bfd_mach_h8300s
)
116 disassemble
= print_insn_h8300s
;
118 disassemble
= print_insn_h8300
;
123 disassemble
= print_insn_h8500
;
128 disassemble
= print_insn_hppa
;
133 disassemble
= print_insn_i386
;
138 disassemble
= print_insn_i960
;
143 disassemble
= print_insn_m68k
;
148 disassemble
= print_insn_m88k
;
153 disassemble
= print_insn_ns32k
;
158 if (bfd_big_endian (abfd
))
159 disassemble
= print_insn_big_mips
;
161 disassemble
= print_insn_little_mips
;
165 case bfd_arch_mn10200
:
166 disassemble
= print_insn_mn10200
;
170 case bfd_arch_mn10300
:
171 disassemble
= print_insn_mn10300
;
175 case bfd_arch_powerpc
:
176 if (bfd_big_endian (abfd
))
177 disassemble
= print_insn_big_powerpc
;
179 disassemble
= print_insn_little_powerpc
;
183 case bfd_arch_rs6000
:
184 disassemble
= print_insn_rs6000
;
189 if (bfd_big_endian (abfd
))
190 disassemble
= print_insn_sh
;
192 disassemble
= print_insn_shl
;
197 disassemble
= print_insn_sparc
;
200 /* start-sanitize-tic80 */
203 disassemble
= print_insn_tic80
;
206 /* end-sanitize-tic80 */
207 /* start-sanitize-v850 */
210 disassemble
= print_insn_v850
;
213 /* end-sanitize-v850 */
216 disassemble
= print_insn_w65
;
221 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
222 disassemble
= print_insn_z8001
;
224 disassemble
= print_insn_z8002
;