Commit | Line | Data |
---|---|---|
252b5132 | 1 | /* Select disassembly routine for specified architecture. |
4b95cf5c | 2 | Copyright (C) 1994-2014 Free Software Foundation, Inc. |
252b5132 | 3 | |
9b201bb5 NC |
4 | This file is part of the GNU opcodes library. |
5 | ||
6 | This library is free software; you can redistribute it and/or modify | |
7499d566 | 7 | it under the terms of the GNU General Public License as published by |
9b201bb5 | 8 | the Free Software Foundation; either version 3 of the License, or |
7499d566 | 9 | (at your option) any later version. |
252b5132 | 10 | |
7499d566 NC |
11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
252b5132 | 15 | |
7499d566 NC |
16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | |
9b201bb5 NC |
18 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
19 | MA 02110-1301, USA. */ | |
252b5132 | 20 | |
0d8dfecf | 21 | #include "sysdep.h" |
252b5132 RH |
22 | #include "dis-asm.h" |
23 | ||
24 | #ifdef ARCH_all | |
a06ea964 | 25 | #define ARCH_aarch64 |
252b5132 RH |
26 | #define ARCH_alpha |
27 | #define ARCH_arc | |
28 | #define ARCH_arm | |
adde6300 | 29 | #define ARCH_avr |
4b7f6baa | 30 | #define ARCH_bfin |
3d3d428f | 31 | #define ARCH_cr16 |
6c95a37f | 32 | #define ARCH_cris |
1fe1f39c | 33 | #define ARCH_crx |
252b5132 RH |
34 | #define ARCH_d10v |
35 | #define ARCH_d30v | |
d172d4ba | 36 | #define ARCH_dlx |
56b13185 | 37 | #define ARCH_epiphany |
e729279b NC |
38 | #define ARCH_fr30 |
39 | #define ARCH_frv | |
252b5132 RH |
40 | #define ARCH_h8300 |
41 | #define ARCH_h8500 | |
42 | #define ARCH_hppa | |
5b93d8bb | 43 | #define ARCH_i370 |
252b5132 | 44 | #define ARCH_i386 |
9d751335 | 45 | #define ARCH_i860 |
252b5132 | 46 | #define ARCH_i960 |
800eeca4 | 47 | #define ARCH_ia64 |
e729279b NC |
48 | #define ARCH_ip2k |
49 | #define ARCH_iq2000 | |
84e94c90 | 50 | #define ARCH_lm32 |
e729279b | 51 | #define ARCH_m32c |
252b5132 | 52 | #define ARCH_m32r |
60bcf0fa NC |
53 | #define ARCH_m68hc11 |
54 | #define ARCH_m68hc12 | |
e729279b | 55 | #define ARCH_m68k |
252b5132 RH |
56 | #define ARCH_m88k |
57 | #define ARCH_mcore | |
bd2f2e55 | 58 | #define ARCH_mep |
a3c62988 | 59 | #define ARCH_metag |
7ba29e2a | 60 | #define ARCH_microblaze |
252b5132 | 61 | #define ARCH_mips |
3c3bdf30 | 62 | #define ARCH_mmix |
252b5132 RH |
63 | #define ARCH_mn10200 |
64 | #define ARCH_mn10300 | |
59b1530d | 65 | #define ARCH_moxie |
d031aafb | 66 | #define ARCH_mt |
2469cfa2 | 67 | #define ARCH_msp430 |
35c08157 | 68 | #define ARCH_nds32 |
36591ba1 | 69 | #define ARCH_nios2 |
252b5132 | 70 | #define ARCH_ns32k |
87e6d782 | 71 | #define ARCH_openrisc |
3b16e843 | 72 | #define ARCH_or32 |
e135f41b | 73 | #define ARCH_pdp11 |
1e608f98 | 74 | #define ARCH_pj |
252b5132 RH |
75 | #define ARCH_powerpc |
76 | #define ARCH_rs6000 | |
99c513f6 | 77 | #define ARCH_rl78 |
c7927a3c | 78 | #define ARCH_rx |
a85d7ed0 | 79 | #define ARCH_s390 |
1c0d3aa6 | 80 | #define ARCH_score |
252b5132 RH |
81 | #define ARCH_sh |
82 | #define ARCH_sparc | |
e9f53129 | 83 | #define ARCH_spu |
252b5132 | 84 | #define ARCH_tic30 |
026df7c5 | 85 | #define ARCH_tic4x |
5c84d377 | 86 | #define ARCH_tic54x |
40b36596 | 87 | #define ARCH_tic6x |
252b5132 | 88 | #define ARCH_tic80 |
aa137e4d NC |
89 | #define ARCH_tilegx |
90 | #define ARCH_tilepro | |
252b5132 RH |
91 | #define ARCH_v850 |
92 | #define ARCH_vax | |
93 | #define ARCH_w65 | |
93fbbb04 | 94 | #define ARCH_xstormy16 |
d70c5fc7 | 95 | #define ARCH_xc16x |
f6c1a2d5 | 96 | #define ARCH_xgate |
e0001a05 | 97 | #define ARCH_xtensa |
3c9b82ba | 98 | #define ARCH_z80 |
252b5132 | 99 | #define ARCH_z8k |
d28847ce | 100 | #define INCLUDE_SHMEDIA |
252b5132 RH |
101 | #endif |
102 | ||
49f58d10 JB |
103 | #ifdef ARCH_m32c |
104 | #include "m32c-desc.h" | |
105 | #endif | |
252b5132 RH |
106 | |
107 | disassembler_ftype | |
108 | disassembler (abfd) | |
109 | bfd *abfd; | |
110 | { | |
111 | enum bfd_architecture a = bfd_get_arch (abfd); | |
112 | disassembler_ftype disassemble; | |
113 | ||
114 | switch (a) | |
115 | { | |
116 | /* If you add a case to this table, also add it to the | |
117 | ARCH_all definition right above this function. */ | |
a06ea964 NC |
118 | #ifdef ARCH_aarch64 |
119 | case bfd_arch_aarch64: | |
120 | disassemble = print_insn_aarch64; | |
121 | break; | |
122 | #endif | |
252b5132 RH |
123 | #ifdef ARCH_alpha |
124 | case bfd_arch_alpha: | |
125 | disassemble = print_insn_alpha; | |
126 | break; | |
127 | #endif | |
128 | #ifdef ARCH_arc | |
129 | case bfd_arch_arc: | |
6ca4eb77 AM |
130 | disassemble = arc_get_disassembler (abfd); |
131 | break; | |
252b5132 RH |
132 | #endif |
133 | #ifdef ARCH_arm | |
134 | case bfd_arch_arm: | |
135 | if (bfd_big_endian (abfd)) | |
136 | disassemble = print_insn_big_arm; | |
137 | else | |
138 | disassemble = print_insn_little_arm; | |
139 | break; | |
140 | #endif | |
adde6300 AM |
141 | #ifdef ARCH_avr |
142 | case bfd_arch_avr: | |
143 | disassemble = print_insn_avr; | |
144 | break; | |
145 | #endif | |
4b7f6baa CM |
146 | #ifdef ARCH_bfin |
147 | case bfd_arch_bfin: | |
148 | disassemble = print_insn_bfin; | |
149 | break; | |
150 | #endif | |
3d3d428f NC |
151 | #ifdef ARCH_cr16 |
152 | case bfd_arch_cr16: | |
153 | disassemble = print_insn_cr16; | |
154 | break; | |
155 | #endif | |
6c95a37f HPN |
156 | #ifdef ARCH_cris |
157 | case bfd_arch_cris: | |
78966507 | 158 | disassemble = cris_get_disassembler (abfd); |
6c95a37f | 159 | break; |
1fe1f39c NC |
160 | #endif |
161 | #ifdef ARCH_crx | |
162 | case bfd_arch_crx: | |
163 | disassemble = print_insn_crx; | |
164 | break; | |
6c95a37f | 165 | #endif |
252b5132 RH |
166 | #ifdef ARCH_d10v |
167 | case bfd_arch_d10v: | |
168 | disassemble = print_insn_d10v; | |
169 | break; | |
170 | #endif | |
171 | #ifdef ARCH_d30v | |
172 | case bfd_arch_d30v: | |
173 | disassemble = print_insn_d30v; | |
174 | break; | |
175 | #endif | |
d172d4ba NC |
176 | #ifdef ARCH_dlx |
177 | case bfd_arch_dlx: | |
178 | /* As far as I know we only handle big-endian DLX objects. */ | |
179 | disassemble = print_insn_dlx; | |
180 | break; | |
181 | #endif | |
252b5132 RH |
182 | #ifdef ARCH_h8300 |
183 | case bfd_arch_h8300: | |
049f8936 NC |
184 | if (bfd_get_mach (abfd) == bfd_mach_h8300h |
185 | || bfd_get_mach (abfd) == bfd_mach_h8300hn) | |
252b5132 | 186 | disassemble = print_insn_h8300h; |
049f8936 | 187 | else if (bfd_get_mach (abfd) == bfd_mach_h8300s |
d43ff6d2 | 188 | || bfd_get_mach (abfd) == bfd_mach_h8300sn |
a53b85e2 AO |
189 | || bfd_get_mach (abfd) == bfd_mach_h8300sx |
190 | || bfd_get_mach (abfd) == bfd_mach_h8300sxn) | |
252b5132 | 191 | disassemble = print_insn_h8300s; |
b7ed8fad | 192 | else |
252b5132 RH |
193 | disassemble = print_insn_h8300; |
194 | break; | |
195 | #endif | |
196 | #ifdef ARCH_h8500 | |
197 | case bfd_arch_h8500: | |
198 | disassemble = print_insn_h8500; | |
199 | break; | |
200 | #endif | |
201 | #ifdef ARCH_hppa | |
202 | case bfd_arch_hppa: | |
203 | disassemble = print_insn_hppa; | |
204 | break; | |
205 | #endif | |
5b93d8bb AM |
206 | #ifdef ARCH_i370 |
207 | case bfd_arch_i370: | |
208 | disassemble = print_insn_i370; | |
209 | break; | |
210 | #endif | |
252b5132 RH |
211 | #ifdef ARCH_i386 |
212 | case bfd_arch_i386: | |
8a9036a4 | 213 | case bfd_arch_l1om: |
7a9068fe | 214 | case bfd_arch_k1om: |
e396998b | 215 | disassemble = print_insn_i386; |
252b5132 RH |
216 | break; |
217 | #endif | |
9d751335 JE |
218 | #ifdef ARCH_i860 |
219 | case bfd_arch_i860: | |
220 | disassemble = print_insn_i860; | |
221 | break; | |
222 | #endif | |
252b5132 RH |
223 | #ifdef ARCH_i960 |
224 | case bfd_arch_i960: | |
225 | disassemble = print_insn_i960; | |
226 | break; | |
227 | #endif | |
800eeca4 JW |
228 | #ifdef ARCH_ia64 |
229 | case bfd_arch_ia64: | |
230 | disassemble = print_insn_ia64; | |
231 | break; | |
232 | #endif | |
a40cbfa3 NC |
233 | #ifdef ARCH_ip2k |
234 | case bfd_arch_ip2k: | |
235 | disassemble = print_insn_ip2k; | |
236 | break; | |
237 | #endif | |
cfb8c092 NC |
238 | #ifdef ARCH_epiphany |
239 | case bfd_arch_epiphany: | |
240 | disassemble = print_insn_epiphany; | |
241 | break; | |
242 | #endif | |
252b5132 RH |
243 | #ifdef ARCH_fr30 |
244 | case bfd_arch_fr30: | |
245 | disassemble = print_insn_fr30; | |
246 | break; | |
247 | #endif | |
84e94c90 NC |
248 | #ifdef ARCH_lm32 |
249 | case bfd_arch_lm32: | |
250 | disassemble = print_insn_lm32; | |
251 | break; | |
252 | #endif | |
252b5132 RH |
253 | #ifdef ARCH_m32r |
254 | case bfd_arch_m32r: | |
255 | disassemble = print_insn_m32r; | |
256 | break; | |
257 | #endif | |
6927f982 NC |
258 | #if defined(ARCH_m68hc11) || defined(ARCH_m68hc12) \ |
259 | || defined(ARCH_9s12x) || defined(ARCH_m9s12xg) | |
60bcf0fa NC |
260 | case bfd_arch_m68hc11: |
261 | disassemble = print_insn_m68hc11; | |
262 | break; | |
263 | case bfd_arch_m68hc12: | |
264 | disassemble = print_insn_m68hc12; | |
265 | break; | |
6927f982 NC |
266 | case bfd_arch_m9s12x: |
267 | disassemble = print_insn_m9s12x; | |
268 | break; | |
269 | case bfd_arch_m9s12xg: | |
270 | disassemble = print_insn_m9s12xg; | |
271 | break; | |
60bcf0fa | 272 | #endif |
252b5132 RH |
273 | #ifdef ARCH_m68k |
274 | case bfd_arch_m68k: | |
275 | disassemble = print_insn_m68k; | |
276 | break; | |
277 | #endif | |
278 | #ifdef ARCH_m88k | |
279 | case bfd_arch_m88k: | |
280 | disassemble = print_insn_m88k; | |
281 | break; | |
282 | #endif | |
d031aafb NS |
283 | #ifdef ARCH_mt |
284 | case bfd_arch_mt: | |
285 | disassemble = print_insn_mt; | |
ac188222 DB |
286 | break; |
287 | #endif | |
7ba29e2a NC |
288 | #ifdef ARCH_microblaze |
289 | case bfd_arch_microblaze: | |
290 | disassemble = print_insn_microblaze; | |
291 | break; | |
292 | #endif | |
2469cfa2 NC |
293 | #ifdef ARCH_msp430 |
294 | case bfd_arch_msp430: | |
295 | disassemble = print_insn_msp430; | |
296 | break; | |
297 | #endif | |
35c08157 KLC |
298 | #ifdef ARCH_nds32 |
299 | case bfd_arch_nds32: | |
300 | disassemble = print_insn_nds32; | |
301 | break; | |
302 | #endif | |
252b5132 RH |
303 | #ifdef ARCH_ns32k |
304 | case bfd_arch_ns32k: | |
305 | disassemble = print_insn_ns32k; | |
306 | break; | |
307 | #endif | |
308 | #ifdef ARCH_mcore | |
309 | case bfd_arch_mcore: | |
310 | disassemble = print_insn_mcore; | |
311 | break; | |
312 | #endif | |
bd2f2e55 DB |
313 | #ifdef ARCH_mep |
314 | case bfd_arch_mep: | |
315 | disassemble = print_insn_mep; | |
316 | break; | |
317 | #endif | |
a3c62988 NC |
318 | #ifdef ARCH_metag |
319 | case bfd_arch_metag: | |
320 | disassemble = print_insn_metag; | |
321 | break; | |
322 | #endif | |
252b5132 RH |
323 | #ifdef ARCH_mips |
324 | case bfd_arch_mips: | |
325 | if (bfd_big_endian (abfd)) | |
326 | disassemble = print_insn_big_mips; | |
327 | else | |
328 | disassemble = print_insn_little_mips; | |
329 | break; | |
330 | #endif | |
3c3bdf30 NC |
331 | #ifdef ARCH_mmix |
332 | case bfd_arch_mmix: | |
333 | disassemble = print_insn_mmix; | |
334 | break; | |
335 | #endif | |
252b5132 RH |
336 | #ifdef ARCH_mn10200 |
337 | case bfd_arch_mn10200: | |
338 | disassemble = print_insn_mn10200; | |
339 | break; | |
340 | #endif | |
341 | #ifdef ARCH_mn10300 | |
342 | case bfd_arch_mn10300: | |
343 | disassemble = print_insn_mn10300; | |
344 | break; | |
345 | #endif | |
36591ba1 SL |
346 | #ifdef ARCH_nios2 |
347 | case bfd_arch_nios2: | |
348 | if (bfd_big_endian (abfd)) | |
349 | disassemble = print_insn_big_nios2; | |
350 | else | |
351 | disassemble = print_insn_little_nios2; | |
352 | break; | |
353 | #endif | |
87e6d782 NC |
354 | #ifdef ARCH_openrisc |
355 | case bfd_arch_openrisc: | |
356 | disassemble = print_insn_openrisc; | |
357 | break; | |
358 | #endif | |
3b16e843 NC |
359 | #ifdef ARCH_or32 |
360 | case bfd_arch_or32: | |
361 | if (bfd_big_endian (abfd)) | |
6ca4eb77 | 362 | disassemble = print_insn_big_or32; |
3b16e843 | 363 | else |
6ca4eb77 | 364 | disassemble = print_insn_little_or32; |
3b16e843 NC |
365 | break; |
366 | #endif | |
e135f41b NC |
367 | #ifdef ARCH_pdp11 |
368 | case bfd_arch_pdp11: | |
369 | disassemble = print_insn_pdp11; | |
370 | break; | |
371 | #endif | |
1e608f98 ILT |
372 | #ifdef ARCH_pj |
373 | case bfd_arch_pj: | |
374 | disassemble = print_insn_pj; | |
375 | break; | |
376 | #endif | |
252b5132 RH |
377 | #ifdef ARCH_powerpc |
378 | case bfd_arch_powerpc: | |
379 | if (bfd_big_endian (abfd)) | |
380 | disassemble = print_insn_big_powerpc; | |
381 | else | |
382 | disassemble = print_insn_little_powerpc; | |
383 | break; | |
384 | #endif | |
385 | #ifdef ARCH_rs6000 | |
386 | case bfd_arch_rs6000: | |
39c20e8f | 387 | if (bfd_get_mach (abfd) == bfd_mach_ppc_620) |
7f6d05e8 CP |
388 | disassemble = print_insn_big_powerpc; |
389 | else | |
390 | disassemble = print_insn_rs6000; | |
252b5132 RH |
391 | break; |
392 | #endif | |
99c513f6 DD |
393 | #ifdef ARCH_rl78 |
394 | case bfd_arch_rl78: | |
395 | disassemble = print_insn_rl78; | |
396 | break; | |
397 | #endif | |
c7927a3c NC |
398 | #ifdef ARCH_rx |
399 | case bfd_arch_rx: | |
400 | disassemble = print_insn_rx; | |
401 | break; | |
402 | #endif | |
a85d7ed0 NC |
403 | #ifdef ARCH_s390 |
404 | case bfd_arch_s390: | |
405 | disassemble = print_insn_s390; | |
406 | break; | |
407 | #endif | |
1c0d3aa6 NC |
408 | #ifdef ARCH_score |
409 | case bfd_arch_score: | |
410 | if (bfd_big_endian (abfd)) | |
6ca4eb77 | 411 | disassemble = print_insn_big_score; |
1c0d3aa6 | 412 | else |
6ca4eb77 | 413 | disassemble = print_insn_little_score; |
1c0d3aa6 NC |
414 | break; |
415 | #endif | |
252b5132 RH |
416 | #ifdef ARCH_sh |
417 | case bfd_arch_sh: | |
1c509ca8 | 418 | disassemble = print_insn_sh; |
252b5132 RH |
419 | break; |
420 | #endif | |
421 | #ifdef ARCH_sparc | |
422 | case bfd_arch_sparc: | |
423 | disassemble = print_insn_sparc; | |
424 | break; | |
425 | #endif | |
e9f53129 AM |
426 | #ifdef ARCH_spu |
427 | case bfd_arch_spu: | |
428 | disassemble = print_insn_spu; | |
429 | break; | |
430 | #endif | |
252b5132 RH |
431 | #ifdef ARCH_tic30 |
432 | case bfd_arch_tic30: | |
433 | disassemble = print_insn_tic30; | |
434 | break; | |
435 | #endif | |
026df7c5 NC |
436 | #ifdef ARCH_tic4x |
437 | case bfd_arch_tic4x: | |
438 | disassemble = print_insn_tic4x; | |
439 | break; | |
440 | #endif | |
5c84d377 TW |
441 | #ifdef ARCH_tic54x |
442 | case bfd_arch_tic54x: | |
443 | disassemble = print_insn_tic54x; | |
444 | break; | |
445 | #endif | |
40b36596 JM |
446 | #ifdef ARCH_tic6x |
447 | case bfd_arch_tic6x: | |
448 | disassemble = print_insn_tic6x; | |
449 | break; | |
450 | #endif | |
252b5132 RH |
451 | #ifdef ARCH_tic80 |
452 | case bfd_arch_tic80: | |
453 | disassemble = print_insn_tic80; | |
454 | break; | |
455 | #endif | |
456 | #ifdef ARCH_v850 | |
457 | case bfd_arch_v850: | |
de863c74 | 458 | case bfd_arch_v850_rh850: |
252b5132 RH |
459 | disassemble = print_insn_v850; |
460 | break; | |
461 | #endif | |
462 | #ifdef ARCH_w65 | |
463 | case bfd_arch_w65: | |
464 | disassemble = print_insn_w65; | |
465 | break; | |
466 | #endif | |
f6c1a2d5 NC |
467 | #ifdef ARCH_xgate |
468 | case bfd_arch_xgate: | |
469 | disassemble = print_insn_xgate; | |
470 | break; | |
471 | #endif | |
93fbbb04 GK |
472 | #ifdef ARCH_xstormy16 |
473 | case bfd_arch_xstormy16: | |
474 | disassemble = print_insn_xstormy16; | |
475 | break; | |
476 | #endif | |
d70c5fc7 NC |
477 | #ifdef ARCH_xc16x |
478 | case bfd_arch_xc16x: | |
479 | disassemble = print_insn_xc16x; | |
480 | break; | |
481 | #endif | |
e0001a05 NC |
482 | #ifdef ARCH_xtensa |
483 | case bfd_arch_xtensa: | |
484 | disassemble = print_insn_xtensa; | |
485 | break; | |
486 | #endif | |
3c9b82ba NC |
487 | #ifdef ARCH_z80 |
488 | case bfd_arch_z80: | |
489 | disassemble = print_insn_z80; | |
490 | break; | |
491 | #endif | |
252b5132 RH |
492 | #ifdef ARCH_z8k |
493 | case bfd_arch_z8k: | |
494 | if (bfd_get_mach(abfd) == bfd_mach_z8001) | |
495 | disassemble = print_insn_z8001; | |
b7ed8fad | 496 | else |
252b5132 RH |
497 | disassemble = print_insn_z8002; |
498 | break; | |
499 | #endif | |
500 | #ifdef ARCH_vax | |
501 | case bfd_arch_vax: | |
502 | disassemble = print_insn_vax; | |
503 | break; | |
fd3c93d5 DB |
504 | #endif |
505 | #ifdef ARCH_frv | |
506 | case bfd_arch_frv: | |
507 | disassemble = print_insn_frv; | |
508 | break; | |
47b1a55a | 509 | #endif |
59b1530d AG |
510 | #ifdef ARCH_moxie |
511 | case bfd_arch_moxie: | |
512 | disassemble = print_insn_moxie; | |
513 | break; | |
514 | #endif | |
47b1a55a SC |
515 | #ifdef ARCH_iq2000 |
516 | case bfd_arch_iq2000: | |
517 | disassemble = print_insn_iq2000; | |
518 | break; | |
49f58d10 JB |
519 | #endif |
520 | #ifdef ARCH_m32c | |
521 | case bfd_arch_m32c: | |
522 | disassemble = print_insn_m32c; | |
523 | break; | |
aa137e4d NC |
524 | #endif |
525 | #ifdef ARCH_tilegx | |
526 | case bfd_arch_tilegx: | |
527 | disassemble = print_insn_tilegx; | |
528 | break; | |
529 | #endif | |
530 | #ifdef ARCH_tilepro | |
531 | case bfd_arch_tilepro: | |
532 | disassemble = print_insn_tilepro; | |
533 | break; | |
252b5132 RH |
534 | #endif |
535 | default: | |
536 | return 0; | |
537 | } | |
538 | return disassemble; | |
539 | } | |
94470b23 NC |
540 | |
541 | void | |
9aaaa291 | 542 | disassembler_usage (stream) |
7f32bebc | 543 | FILE * stream ATTRIBUTE_UNUSED; |
94470b23 | 544 | { |
a06ea964 NC |
545 | #ifdef ARCH_aarch64 |
546 | print_aarch64_disassembler_options (stream); | |
547 | #endif | |
58efb6c0 NC |
548 | #ifdef ARCH_arm |
549 | print_arm_disassembler_options (stream); | |
550 | #endif | |
640c0ccd CD |
551 | #ifdef ARCH_mips |
552 | print_mips_disassembler_options (stream); | |
553 | #endif | |
07dd56a9 NC |
554 | #ifdef ARCH_powerpc |
555 | print_ppc_disassembler_options (stream); | |
556 | #endif | |
f59a29b9 L |
557 | #ifdef ARCH_i386 |
558 | print_i386_disassembler_options (stream); | |
559 | #endif | |
112b7c50 AK |
560 | #ifdef ARCH_s390 |
561 | print_s390_disassembler_options (stream); | |
562 | #endif | |
b7ed8fad | 563 | |
94470b23 NC |
564 | return; |
565 | } | |
22a398e1 NC |
566 | |
567 | void | |
568 | disassemble_init_for_target (struct disassemble_info * info) | |
569 | { | |
570 | if (info == NULL) | |
571 | return; | |
572 | ||
573 | switch (info->arch) | |
574 | { | |
a06ea964 NC |
575 | #ifdef ARCH_aarch64 |
576 | case bfd_arch_aarch64: | |
577 | info->symbol_is_valid = aarch64_symbol_is_valid; | |
578 | info->disassembler_needs_relocs = TRUE; | |
579 | break; | |
580 | #endif | |
22a398e1 NC |
581 | #ifdef ARCH_arm |
582 | case bfd_arch_arm: | |
583 | info->symbol_is_valid = arm_symbol_is_valid; | |
d99b6465 | 584 | info->disassembler_needs_relocs = TRUE; |
22a398e1 | 585 | break; |
0bcb06d2 AS |
586 | #endif |
587 | #ifdef ARCH_ia64 | |
588 | case bfd_arch_ia64: | |
589 | info->skip_zeroes = 16; | |
590 | break; | |
591 | #endif | |
592 | #ifdef ARCH_tic4x | |
593 | case bfd_arch_tic4x: | |
594 | info->skip_zeroes = 32; | |
fb53f5a8 | 595 | break; |
49f58d10 | 596 | #endif |
bd2f2e55 DB |
597 | #ifdef ARCH_mep |
598 | case bfd_arch_mep: | |
599 | info->skip_zeroes = 256; | |
600 | info->skip_zeroes_at_end = 0; | |
601 | break; | |
602 | #endif | |
a3c62988 NC |
603 | #ifdef ARCH_metag |
604 | case bfd_arch_metag: | |
605 | info->disassembler_needs_relocs = TRUE; | |
606 | break; | |
607 | #endif | |
49f58d10 JB |
608 | #ifdef ARCH_m32c |
609 | case bfd_arch_m32c: | |
6ca4eb77 AM |
610 | /* This processor in fact is little endian. The value set here |
611 | reflects the way opcodes are written in the cgen description. */ | |
49f58d10 | 612 | info->endian = BFD_ENDIAN_BIG; |
fb53f5a8 DB |
613 | if (! info->insn_sets) |
614 | { | |
615 | info->insn_sets = cgen_bitset_create (ISA_MAX); | |
616 | if (info->mach == bfd_mach_m16c) | |
617 | cgen_bitset_set (info->insn_sets, ISA_M16C); | |
618 | else | |
619 | cgen_bitset_set (info->insn_sets, ISA_M32C); | |
620 | } | |
49f58d10 | 621 | break; |
b240011a AM |
622 | #endif |
623 | #ifdef ARCH_powerpc | |
624 | case bfd_arch_powerpc: | |
625 | #endif | |
626 | #ifdef ARCH_rs6000 | |
627 | case bfd_arch_rs6000: | |
628 | #endif | |
629 | #if defined (ARCH_powerpc) || defined (ARCH_rs6000) | |
630 | disassemble_init_powerpc (info); | |
631 | break; | |
22a398e1 NC |
632 | #endif |
633 | default: | |
634 | break; | |
635 | } | |
636 | } |