Since d10v is public now, remove all sanitization statements
[deliverable/binutils-gdb.git] / opcodes / disassemble.c
1 /* Select disassembly routine for specified architecture.
2 Copyright (C) 1994, 1995 Free Software Foundation, Inc.
3
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.
8
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.
13
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. */
17
18 #include "ansidecl.h"
19 #include "dis-asm.h"
20
21 #ifdef ARCH_all
22 #define ARCH_a29k
23 #define ARCH_alpha
24 /* start-sanitize-arc */
25 #define ARCH_arc
26 /* end-sanitize-arc */
27 #define ARCH_arm
28 #define ARCH_d10v
29 /* start-sanitize-d30v */
30 #define ARCH_d30v
31 /* end-sanitize-d30v */
32 #define ARCH_h8300
33 #define ARCH_h8500
34 #define ARCH_hppa
35 #define ARCH_i386
36 #define ARCH_i960
37 #define ARCH_m68k
38 #define ARCH_m88k
39 #define ARCH_mips
40 #define ARCH_mn10200
41 #define ARCH_mn10300
42 #define ARCH_ns32k
43 #define ARCH_powerpc
44 #define ARCH_rs6000
45 #define ARCH_sh
46 #define ARCH_sparc
47 /* start-sanitize-tic80 */
48 #define ARCH_tic80
49 /* end-sanitize-tic80 */
50 /* start-sanitize-v850 */
51 #define ARCH_v850
52 /* end-sanitize-v850 */
53 #define ARCH_w65
54 #define ARCH_z8k
55 #endif
56
57 disassembler_ftype
58 disassembler (abfd)
59 bfd *abfd;
60 {
61 enum bfd_architecture a = bfd_get_arch (abfd);
62 disassembler_ftype disassemble;
63
64 switch (a)
65 {
66 /* If you add a case to this table, also add it to the
67 ARCH_all definition right above this function. */
68 #ifdef ARCH_a29k
69 case bfd_arch_a29k:
70 /* As far as I know we only handle big-endian 29k objects. */
71 disassemble = print_insn_big_a29k;
72 break;
73 #endif
74 #ifdef ARCH_alpha
75 case bfd_arch_alpha:
76 disassemble = print_insn_alpha;
77 break;
78 #endif
79 /* start-sanitize-arc */
80 #ifdef ARCH_arc
81 case bfd_arch_arc:
82 {
83 disassemble = arc_get_disassembler (bfd_get_mach (abfd),
84 bfd_big_endian (abfd));
85 break;
86 }
87 #endif
88 /* end-sanitize-arc */
89 #ifdef ARCH_arm
90 case bfd_arch_arm:
91 if (bfd_big_endian (abfd))
92 disassemble = print_insn_big_arm;
93 else
94 disassemble = print_insn_little_arm;
95 break;
96 #endif
97 /* start-sanitize-d10v */
98 #ifdef ARCH_d10v
99 case bfd_arch_d10v:
100 disassemble = print_insn_d10v;
101 break;
102 #endif
103 /* end-sanitize-d10v */
104 /* start-sanitize-d30v */
105 #ifdef ARCH_d30v
106 case bfd_arch_d30v:
107 disassemble = print_insn_d30v;
108 break;
109 #endif
110 /* end-sanitize-d30v */
111 #ifdef ARCH_h8300
112 case bfd_arch_h8300:
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;
117 else
118 disassemble = print_insn_h8300;
119 break;
120 #endif
121 #ifdef ARCH_h8500
122 case bfd_arch_h8500:
123 disassemble = print_insn_h8500;
124 break;
125 #endif
126 #ifdef ARCH_hppa
127 case bfd_arch_hppa:
128 disassemble = print_insn_hppa;
129 break;
130 #endif
131 #ifdef ARCH_i386
132 case bfd_arch_i386:
133 disassemble = print_insn_i386;
134 break;
135 #endif
136 #ifdef ARCH_i960
137 case bfd_arch_i960:
138 disassemble = print_insn_i960;
139 break;
140 #endif
141 #ifdef ARCH_m68k
142 case bfd_arch_m68k:
143 disassemble = print_insn_m68k;
144 break;
145 #endif
146 #ifdef ARCH_m88k
147 case bfd_arch_m88k:
148 disassemble = print_insn_m88k;
149 break;
150 #endif
151 #ifdef ARCH_ns32k
152 case bfd_arch_ns32k:
153 disassemble = print_insn_ns32k;
154 break;
155 #endif
156 #ifdef ARCH_mips
157 case bfd_arch_mips:
158 if (bfd_big_endian (abfd))
159 disassemble = print_insn_big_mips;
160 else
161 disassemble = print_insn_little_mips;
162 break;
163 #endif
164 #ifdef ARCH_mn10200
165 case bfd_arch_mn10200:
166 disassemble = print_insn_mn10200;
167 break;
168 #endif
169 #ifdef ARCH_mn10300
170 case bfd_arch_mn10300:
171 disassemble = print_insn_mn10300;
172 break;
173 #endif
174 #ifdef ARCH_powerpc
175 case bfd_arch_powerpc:
176 if (bfd_big_endian (abfd))
177 disassemble = print_insn_big_powerpc;
178 else
179 disassemble = print_insn_little_powerpc;
180 break;
181 #endif
182 #ifdef ARCH_rs6000
183 case bfd_arch_rs6000:
184 disassemble = print_insn_rs6000;
185 break;
186 #endif
187 #ifdef ARCH_sh
188 case bfd_arch_sh:
189 if (bfd_big_endian (abfd))
190 disassemble = print_insn_sh;
191 else
192 disassemble = print_insn_shl;
193 break;
194 #endif
195 #ifdef ARCH_sparc
196 case bfd_arch_sparc:
197 disassemble = print_insn_sparc;
198 break;
199 #endif
200 /* start-sanitize-tic80 */
201 #ifdef ARCH_tic80
202 case bfd_arch_tic80:
203 disassemble = print_insn_tic80;
204 break;
205 #endif
206 /* end-sanitize-tic80 */
207 /* start-sanitize-v850 */
208 #ifdef ARCH_v850
209 case bfd_arch_v850:
210 disassemble = print_insn_v850;
211 break;
212 #endif
213 /* end-sanitize-v850 */
214 #ifdef ARCH_w65
215 case bfd_arch_w65:
216 disassemble = print_insn_w65;
217 break;
218 #endif
219 #ifdef ARCH_z8k
220 case bfd_arch_z8k:
221 if (bfd_get_mach(abfd) == bfd_mach_z8001)
222 disassemble = print_insn_z8001;
223 else
224 disassemble = print_insn_z8002;
225 break;
226 #endif
227 default:
228 return 0;
229 }
230 return disassemble;
231 }
This page took 0.077598 seconds and 4 git commands to generate.