Fix recent breakage
[deliverable/binutils-gdb.git] / gas / config / tc-m68k.h
1 /* This file is tc-m68k.h
2
3 Copyright (C) 1987, 89, 90, 91, 92, 93, 94, 95, 1996
4 Free Software Foundation, Inc.
5
6 This file is part of GAS, the GNU Assembler.
7
8 GAS is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
13 GAS is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GAS; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21
22 #define TC_M68K 1
23
24 #define TARGET_BYTES_BIG_ENDIAN 1
25
26 #ifdef OBJ_AOUT
27 #ifdef TE_SUN3
28 #define TARGET_FORMAT "a.out-sunos-big"
29 #else
30 #ifdef TE_NetBSD
31 #define TARGET_FORMAT "a.out-m68k-netbsd"
32 #else
33 #define TARGET_FORMAT "a.out-zero-big"
34 #endif
35 #endif
36 #endif
37
38 #ifdef OBJ_ELF
39 #define TARGET_FORMAT "elf32-m68k"
40 #endif
41
42 #ifdef TE_APOLLO
43 #define COFF_MAGIC APOLLOM68KMAGIC
44 #define COFF_AOUTHDR_MAGIC APOLLO_COFF_VERSION_NUMBER
45 #undef OBJ_COFF_OMIT_OPTIONAL_HEADER
46 #endif
47
48 #ifdef TE_LYNX
49 #define TARGET_FORMAT "coff-m68k-lynx"
50 #endif
51 #ifdef TE_AUX
52 #define TARGET_FORMAT "coff-m68k-aux"
53 #endif
54
55 #ifndef COFF_MAGIC
56 #define COFF_MAGIC MC68MAGIC
57 #endif
58 #define BFD_ARCH bfd_arch_m68k /* for non-BFD_ASSEMBLER */
59 #define TARGET_ARCH bfd_arch_m68k /* BFD_ASSEMBLER */
60 #define COFF_FLAGS F_AR32W
61 #define TC_COUNT_RELOC(x) ((x)->fx_addsy||(x)->fx_subsy)
62
63 #define TC_COFF_FIX2RTYPE(fixP) tc_coff_fix2rtype(fixP)
64 #define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag)
65 extern int tc_coff_sizemachdep PARAMS ((struct frag *));
66 #ifdef TE_SUN3
67 /* This variable contains the value to write out at the beginning of
68 the a.out file. The 2<<16 means that this is a 68020 file instead
69 of an old-style 68000 file */
70
71 #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (2<<16|OMAGIC); /* Magic byte for file header */
72 #endif /* TE_SUN3 */
73
74 #ifndef AOUT_MACHTYPE
75 #define AOUT_MACHTYPE m68k_aout_machtype
76 extern int m68k_aout_machtype;
77 #endif
78
79 #define tc_crawl_symbol_chain(a) {;} /* not used */
80 #define tc_headers_hook(a) {;} /* not used */
81 #define tc_aout_pre_write_hook(x) {;} /* not used */
82
83 #define LISTING_WORD_SIZE 2 /* A word is 2 bytes */
84 #define LISTING_LHS_WIDTH 2 /* One word on the first line */
85 #define LISTING_LHS_WIDTH_SECOND 2 /* One word on the second line */
86 #define LISTING_LHS_CONT_LINES 4/* And 4 lines max */
87 #define LISTING_HEADER "68K GAS "
88
89 /* Copied from write.c */
90 #define M68K_AIM_KLUDGE(aim, this_state,this_type) \
91 if (aim==0 && this_state== 4) { /* hard encoded from tc-m68k.c */ \
92 aim=this_type->rlx_forward+1; /* Force relaxation into word mode */ \
93 }
94
95 #ifndef REGISTER_PREFIX
96 #define REGISTER_PREFIX '%'
97 #endif
98
99 #if !defined (REGISTER_PREFIX_OPTIONAL)
100 #if defined (M68KCOFF) || defined (OBJ_ELF)
101 #define LOCAL_LABEL(name) (name[0] == '.' \
102 && (name[1] == 'L' || name[1] == '.'))
103 #define FAKE_LABEL_NAME ".L0\001"
104 #define REGISTER_PREFIX_OPTIONAL 0
105 #else
106 #define REGISTER_PREFIX_OPTIONAL 1
107 #endif
108 #endif /* not def REGISTER_PREFIX and not def OPTIONAL_REGISTER_PREFIX */
109
110 #ifdef TE_DELTA
111 /* On the Delta, `%' can occur within a label name. I'm assuming it
112 can't be used as the initial character. If that's not true, more
113 work will be needed to fix this up. */
114 #define LEX_PCT 1
115 /* On the Delta, dots are not required before pseudo-ops. */
116 #define NO_PSEUDO_DOT
117 #endif
118
119 extern void m68k_mri_mode_change PARAMS ((int));
120 #define MRI_MODE_CHANGE(i) m68k_mri_mode_change (i)
121
122 #ifdef BFD_ASSEMBLER
123
124 #define tc_frob_symbol(sym,punt) \
125 if (S_GET_SEGMENT (sym) == reg_section) punt = 1
126
127 #define NO_RELOC BFD_RELOC_NONE
128
129 #ifdef OBJ_ELF
130
131 /* This expression evaluates to false if the relocation is for a local object
132 for which we still want to do the relocation at runtime. True if we
133 are willing to perform this relocation while building the .o file. */
134
135 #define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
136 ((FIX)->fx_r_type != BFD_RELOC_8_PLT_PCREL \
137 && (FIX)->fx_r_type != BFD_RELOC_16_PLT_PCREL \
138 && (FIX)->fx_r_type != BFD_RELOC_32_PLT_PCREL \
139 && (FIX)->fx_r_type != BFD_RELOC_8_GOT_PCREL \
140 && (FIX)->fx_r_type != BFD_RELOC_16_GOT_PCREL \
141 && (FIX)->fx_r_type != BFD_RELOC_32_GOT_PCREL)
142
143 #define tc_fix_adjustable(X) tc_m68k_fix_adjustable(X)
144 #endif
145
146 #else
147 #define NO_RELOC 0
148 #endif
149
150 #define DIFF_EXPR_OK
151
152 extern void m68k_init_after_args PARAMS ((void));
153 #define tc_init_after_args m68k_init_after_args
154
155 extern int m68k_parse_long_option PARAMS ((char *));
156 #define md_parse_long_option m68k_parse_long_option
157
158 #define md_operand(x)
159
160 #define TARGET_WORD_SIZE 32
161 #define TARGET_ARCH bfd_arch_m68k
162
163 extern struct relax_type md_relax_table[];
164 #define TC_GENERIC_RELAX_TABLE md_relax_table
165
166 /* end of tc-m68k.h */
This page took 0.032791 seconds and 4 git commands to generate.