Commit | Line | Data |
---|---|---|
355afbcd | 1 | |
90d85bc4 RP |
2 | /* m88k.h -- Assembler for the Motorola 88000 |
3 | Contributed by Devon Bowen of Buffalo University | |
4 | and Torbjorn Granlund of the Swedish Institute of Computer Science. | |
5 | Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc. | |
6 | ||
7 | This file is part of GAS, the GNU Assembler. | |
8 | ||
9 | GAS is free software; you can redistribute it and/or modify | |
10 | it under the terms of the GNU General Public License as published by | |
11 | the Free Software Foundation; either version 1, or (at your option) | |
12 | any later version. | |
13 | ||
14 | GAS is distributed in the hope that it will be useful, | |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
20 | along with GAS; see the file COPYING. If not, write to | |
21 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
22 | ||
c978e704 ILT |
23 | #define TC_M88K |
24 | ||
25 | #ifdef M88KCOFF | |
26 | #define COFF_MAGIC MC88OMAGIC | |
27 | #define BFD_ARCH bfd_arch_m88k | |
28 | #define COFF_FLAGS F_AR32W | |
29 | #endif | |
30 | ||
332fc09f ILT |
31 | #define NEED_FX_R_TYPE |
32 | ||
90d85bc4 RP |
33 | /* different type of relocation available in the m88k */ |
34 | ||
35 | enum reloc_type | |
36 | { | |
37 | RELOC_LO16, /* lo16(sym) */ | |
38 | RELOC_HI16, /* hi16(sym) */ | |
39 | RELOC_PC16, /* bb0, bb1, bcnd */ | |
40 | RELOC_PC26, /* br, bsr */ | |
41 | RELOC_32, /* jump tables, etc */ | |
42 | RELOC_IW16, /* global access through linker regs 28 */ | |
43 | NO_RELOC | |
44 | }; | |
45 | ||
46 | struct reloc_info_m88k | |
47 | { | |
355afbcd KR |
48 | unsigned long int r_address; |
49 | unsigned int r_symbolnum:24; | |
50 | unsigned int r_extern:1; | |
51 | unsigned int r_pad:3; | |
52 | enum reloc_type r_type:4; | |
53 | long int r_addend; | |
90d85bc4 RP |
54 | }; |
55 | ||
56 | #define relocation_info reloc_info_m88k | |
57 | ||
c978e704 ILT |
58 | /* The m88k uses '@' to start local labels. */ |
59 | #define LEX_AT (LEX_BEGIN_NAME | LEX_NAME) | |
60 | #define LOCAL_LABEL(name) \ | |
61 | ((name[0] =='@' && (name [1] == 'L' || name [1] == '.')) \ | |
62 | || (name[0] == 'L' && name[1] == '0' && name[2] == '\001')) | |
332fc09f | 63 | |
8ff6f40e ILT |
64 | /* The m88k uses pseudo-ops with no leading period. */ |
65 | #define NO_PSEUDO_DOT | |
66 | ||
67 | /* Don't warn on word overflow; it happens on %hi relocs. */ | |
68 | #undef WARN_SIGNED_OVERFLOW_WORD | |
69 | ||
332fc09f ILT |
70 | #ifndef BFD_ASSEMBLER |
71 | #define md_convert_frag(h,f) {as_fatal ("m88k convert_frag\n");} | |
72 | #else | |
73 | #define md_convert_frag(b,s,f) {as_fatal ("m88k convert_frag\n");} | |
74 | #endif | |
c978e704 ILT |
75 | |
76 | /* We don't need to do anything special for undefined symbols. */ | |
77 | #define md_undefined_symbol(s) 0 | |
78 | ||
79 | /* We have no special operand handling. */ | |
80 | #define md_operand(e) | |
81 | ||
82 | #ifdef M88KCOFF | |
83 | ||
84 | /* Whether a reloc should be output. */ | |
85 | #define TC_COUNT_RELOC(fixp) ((fixp)->fx_addsy != NULL) | |
86 | ||
87 | /* Get the BFD reloc type to use for a gas fixS structure. */ | |
88 | #define TC_COFF_FIX2RTYPE(fixp) tc_coff_fix2rtype (fixp) | |
89 | ||
90 | /* No special hook needed for symbols. */ | |
91 | #define tc_coff_symbol_emit_hook(s) | |
92 | ||
93 | #endif /* M88KCOFF */ |