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 */
28 /* start-sanitize-d10v */
30 /* end-sanitize-d10v */
52 enum bfd_architecture a
= bfd_get_arch (abfd
);
53 disassembler_ftype disassemble
;
57 /* If you add a case to this table, also add it to the
58 ARCH_all definition right above this function. */
61 /* As far as I know we only handle big-endian 29k objects. */
62 disassemble
= print_insn_big_a29k
;
67 switch (bfd_get_flavour (abfd
))
69 case bfd_target_ecoff_flavour
:
70 case bfd_target_elf_flavour
:
72 disassemble
= print_insn_alpha_osf
;
74 case bfd_target_evax_flavour
:
75 disassemble
= print_insn_alpha_vms
;
80 /* start-sanitize-arc */
84 disassemble
= arc_get_disassembler (bfd_get_mach (abfd
),
85 bfd_big_endian (abfd
));
89 /* end-sanitize-arc */
92 if (bfd_big_endian (abfd
))
93 disassemble
= print_insn_big_arm
;
95 disassemble
= print_insn_little_arm
;
98 /* start-sanitize-d10v */
101 disassemble
= print_insn_d10v
;
104 /* end-sanitize-d10v */
107 if (bfd_get_mach(abfd
) == bfd_mach_h8300h
)
108 disassemble
= print_insn_h8300h
;
109 else if (bfd_get_mach(abfd
) == bfd_mach_h8300s
)
110 disassemble
= print_insn_h8300s
;
112 disassemble
= print_insn_h8300
;
117 disassemble
= print_insn_h8500
;
122 disassemble
= print_insn_hppa
;
127 disassemble
= print_insn_i386
;
132 disassemble
= print_insn_i960
;
137 disassemble
= print_insn_m68k
;
142 disassemble
= print_insn_m88k
;
147 disassemble
= print_insn_ns32k
;
152 if (bfd_big_endian (abfd
))
153 disassemble
= print_insn_big_mips
;
155 disassemble
= print_insn_little_mips
;
159 case bfd_arch_powerpc
:
160 if (bfd_big_endian (abfd
))
161 disassemble
= print_insn_big_powerpc
;
163 disassemble
= print_insn_little_powerpc
;
167 case bfd_arch_rs6000
:
168 disassemble
= print_insn_rs6000
;
173 if (bfd_big_endian (abfd
))
174 disassemble
= print_insn_sh
;
176 disassemble
= print_insn_shl
;
181 disassemble
= print_insn_sparc
;
186 disassemble
= print_insn_w65
;
191 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
192 disassemble
= print_insn_z8001
;
194 disassemble
= print_insn_z8002
;