* frags.h: Remove ANSI_PROTOTYPES conditional code.
[deliverable/binutils-gdb.git] / gas / config / tc-m68k.h
1 /* This file is tc-m68k.h
2 Copyright 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
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 the Free
20 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
21 02110-1301, USA. */
22
23 #define TC_M68K 1
24
25 struct fix;
26
27 #define TARGET_BYTES_BIG_ENDIAN 1
28
29 #ifdef OBJ_AOUT
30 #ifdef TE_SUN3
31 #define TARGET_FORMAT "a.out-sunos-big"
32 #endif
33 #ifdef TE_NetBSD
34 #define TARGET_FORMAT "a.out-m68k-netbsd"
35 #endif
36 #ifdef TE_LINUX
37 #define TARGET_FORMAT "a.out-m68k-linux"
38 #endif
39 #ifndef TARGET_FORMAT
40 #define TARGET_FORMAT "a.out-zero-big"
41 #endif
42 #endif
43
44 #ifdef OBJ_ELF
45 #define TARGET_FORMAT "elf32-m68k"
46 #endif
47
48 #ifdef TE_APOLLO
49 #define COFF_MAGIC APOLLOM68KMAGIC
50 #define COFF_AOUTHDR_MAGIC APOLLO_COFF_VERSION_NUMBER
51 #undef OBJ_COFF_OMIT_OPTIONAL_HEADER
52 #endif
53
54 #ifdef TE_LYNX
55 #define TARGET_FORMAT "coff-m68k-lynx"
56 #endif
57 #ifdef TE_AUX
58 #define TARGET_FORMAT "coff-m68k-aux"
59 #endif
60 #ifdef TE_DELTA
61 #define TARGET_FORMAT "coff-m68k-sysv"
62 #endif
63
64 #ifndef COFF_MAGIC
65 #define COFF_MAGIC MC68MAGIC
66 #endif
67 #define BFD_ARCH bfd_arch_m68k /* for non-BFD_ASSEMBLER */
68 #define TARGET_ARCH bfd_arch_m68k /* BFD_ASSEMBLER */
69 #define COFF_FLAGS F_AR32W
70 #define TC_COUNT_RELOC(x) ((x)->fx_addsy||(x)->fx_subsy)
71
72 #define TC_COFF_FIX2RTYPE(FIX) tc_coff_fix2rtype(FIX)
73 #define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag)
74 extern int tc_coff_sizemachdep (struct frag *);
75 #ifdef TE_SUN3
76 /* This variable contains the value to write out at the beginning of
77 the a.out file. The 2<<16 means that this is a 68020 file instead
78 of an old-style 68000 file */
79
80 #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (2<<16|OMAGIC); /* Magic byte for file header */
81 #endif /* TE_SUN3 */
82
83 #ifndef AOUT_MACHTYPE
84 #define AOUT_MACHTYPE m68k_aout_machtype
85 extern int m68k_aout_machtype;
86 #endif
87
88 #define tc_comment_chars m68k_comment_chars
89 extern const char *m68k_comment_chars;
90
91 #define tc_crawl_symbol_chain(a) {;} /* not used */
92 #define tc_headers_hook(a) {;} /* not used */
93 #define tc_aout_pre_write_hook(x) {;} /* not used */
94
95 #define LISTING_WORD_SIZE 2 /* A word is 2 bytes */
96 #define LISTING_LHS_WIDTH 2 /* One word on the first line */
97 #define LISTING_LHS_WIDTH_SECOND 2 /* One word on the second line */
98 #define LISTING_LHS_CONT_LINES 4/* And 4 lines max */
99 #define LISTING_HEADER "68K GAS "
100
101 #ifndef REGISTER_PREFIX
102 #define REGISTER_PREFIX '%'
103 #endif
104
105 #if !defined (REGISTER_PREFIX_OPTIONAL)
106 #if defined (M68KCOFF) || defined (OBJ_ELF)
107 #ifndef BFD_ASSEMBLER
108 #define LOCAL_LABEL(name) (name[0] == '.' \
109 && (name[1] == 'L' || name[1] == '.'))
110 #endif /* ! BFD_ASSEMBLER */
111 #define REGISTER_PREFIX_OPTIONAL 0
112 #else /* ! (COFF || ELF) */
113 #define REGISTER_PREFIX_OPTIONAL 1
114 #endif /* ! (COFF || ELF) */
115 #endif /* not def REGISTER_PREFIX and not def OPTIONAL_REGISTER_PREFIX */
116
117 #ifdef TE_DELTA
118 /* On the Delta, `%' can occur within a label name, but not as the
119 initial character. */
120 #define LEX_PCT LEX_NAME
121 /* On the Delta, `~' can start a label name, but is converted to '.'. */
122 #define LEX_TILDE LEX_BEGIN_NAME
123 #define tc_canonicalize_symbol_name(s) ((*(s) == '~' ? *(s) = '.' : '.'), s)
124 /* On the Delta, dots are not required before pseudo-ops. */
125 #define NO_PSEUDO_DOT 1
126 #ifndef BFD_ASSEMBLER
127 #undef LOCAL_LABEL
128 #define LOCAL_LABEL(name) \
129 (name[0] == '.' || (name[0] == 'L' && name[1] == '%'))
130 #endif
131 #endif
132
133 extern void m68k_mri_mode_change (int);
134 #define MRI_MODE_CHANGE(i) m68k_mri_mode_change (i)
135
136 extern int m68k_conditional_pseudoop (pseudo_typeS *);
137 #define tc_conditional_pseudoop(pop) m68k_conditional_pseudoop (pop)
138
139 extern void m68k_frob_label (symbolS *);
140 #define tc_frob_label(sym) m68k_frob_label (sym)
141
142 extern void m68k_flush_pending_output (void);
143 #define md_flush_pending_output() m68k_flush_pending_output ()
144
145 extern void m68k_frob_symbol (symbolS *);
146
147 #ifdef BFD_ASSEMBLER
148
149 #define tc_frob_symbol(sym,punt) \
150 do \
151 { \
152 if (S_GET_SEGMENT (sym) == reg_section) \
153 punt = 1; \
154 m68k_frob_symbol (sym); \
155 } \
156 while (0)
157
158 #define NO_RELOC BFD_RELOC_NONE
159 #define RELAX_RELOC_ABS8 BFD_RELOC_8
160 #define RELAX_RELOC_ABS16 BFD_RELOC_16
161 #define RELAX_RELOC_ABS32 BFD_RELOC_32
162 #define RELAX_RELOC_PC8 BFD_RELOC_8_PCREL
163 #define RELAX_RELOC_PC16 BFD_RELOC_16_PCREL
164 #define RELAX_RELOC_PC32 BFD_RELOC_32_PCREL
165
166 #ifdef OBJ_ELF
167 #define tc_fix_adjustable(X) tc_m68k_fix_adjustable(X)
168 extern int tc_m68k_fix_adjustable (struct fix *);
169
170 /* Target *-*-elf implies an embedded target. No shared libs.
171 *-*-uclinux also requires special casing to prevent GAS from
172 generating unsupported R_68K_PC16 relocs. */
173 #define EXTERN_FORCE_RELOC \
174 ((strcmp (TARGET_OS, "elf") != 0) && (strcmp (TARGET_OS, "uclinux") != 0))
175
176 /* Values passed to md_apply_fix don't include symbol values. */
177 #define MD_APPLY_SYM_VALUE(FIX) 0
178
179 #define elf_tc_final_processing m68k_elf_final_processing
180 extern void m68k_elf_final_processing (void);
181 #endif
182
183 #else /* ! BFD_ASSEMBLER */
184
185 #define tc_frob_coff_symbol(sym) m68k_frob_symbol (sym)
186
187 #define NO_RELOC 0
188 #define RELAX_RELOC_ABS8 0
189 #define RELAX_RELOC_ABS16 0
190 #define RELAX_RELOC_ABS32 0
191 #define RELAX_RELOC_PC8 0
192 #define RELAX_RELOC_PC16 0
193 #define RELAX_RELOC_PC32 0
194
195 #endif /* ! BFD_ASSEMBLER */
196
197 #define DIFF_EXPR_OK
198
199 extern void m68k_init_after_args (void);
200 #define tc_init_after_args m68k_init_after_args
201
202 extern int m68k_parse_long_option (char *);
203 #define md_parse_long_option m68k_parse_long_option
204
205 #define md_operand(x)
206
207 #define TARGET_ARCH bfd_arch_m68k
208
209 extern struct relax_type md_relax_table[];
210 #define TC_GENERIC_RELAX_TABLE md_relax_table
211
212 /* We can't do a byte jump to the next instruction, so in that case
213 force word mode by faking AIM. */
214 #define md_prepare_relax_scan(fragP, address, aim, this_state, this_type) \
215 do \
216 { \
217 if (aim == 0 && this_type->rlx_forward == 127) \
218 aim = 128; \
219 } \
220 while (0)
221
222 #define DWARF2_LINE_MIN_INSN_LENGTH 2
223
224 /* We want .cfi_* pseudo-ops for generating unwind info. */
225 #define TARGET_USE_CFIPOP 1
226
227 #define DWARF2_DEFAULT_RETURN_COLUMN 24
228 #define DWARF2_CIE_DATA_ALIGNMENT (-4)
229
230 #define tc_regname_to_dw2regnum tc_m68k_regname_to_dw2regnum
231 extern int tc_m68k_regname_to_dw2regnum (const char *regname);
232
233 #define tc_cfi_frame_initial_instructions tc_m68k_frame_initial_instructions
234 extern void tc_m68k_frame_initial_instructions (void);
This page took 0.035017 seconds and 5 git commands to generate.