Replace occurances of "GNU CC" with "GCC" and reformat as appropriate.
[official-gcc.git] / gcc / config / arm / aout.h
blob44f5961a2788e099355af4268130a25482cbcdd8
1 /* Definitions of target machine for GNU compiler, for ARM with a.out
2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
3 Free Software Foundation, Inc.
4 Contributed by Richard Earnshaw (rearnsha@armltd.co.uk).
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published
10 by the Free Software Foundation; either version 2, or (at your
11 option) any later version.
13 GCC is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 #ifndef ARM_OS_NAME
24 #define ARM_OS_NAME "(generic)"
25 #endif
27 /* The text to go at the start of the assembler file. */
28 #ifndef ASM_FILE_START
29 #define ASM_FILE_START(STREAM) \
30 { \
31 asm_fprintf (STREAM,"%Rrfp\t.req\t%Rr9\n"); \
32 asm_fprintf (STREAM,"%Rsl\t.req\t%Rr10\n"); \
33 asm_fprintf (STREAM,"%Rfp\t.req\t%Rr11\n"); \
34 asm_fprintf (STREAM,"%Rip\t.req\t%Rr12\n"); \
35 asm_fprintf (STREAM,"%Rsp\t.req\t%Rr13\n"); \
36 asm_fprintf (STREAM,"%Rlr\t.req\t%Rr14\n"); \
37 asm_fprintf (STREAM,"%Rpc\t.req\t%Rr15\n"); \
39 #endif
41 #ifndef ASM_APP_ON
42 #define ASM_APP_ON ""
43 #endif
44 #ifndef ASM_APP_OFF
45 #define ASM_APP_OFF ""
46 #endif
48 /* Switch to the text or data segment. */
49 #define TEXT_SECTION_ASM_OP "\t.text"
50 #define DATA_SECTION_ASM_OP "\t.data"
51 #define BSS_SECTION_ASM_OP "\t.bss"
53 /* Note: If USER_LABEL_PREFIX or LOCAL_LABEL_PREFIX are changed,
54 make sure that this change is reflected in the function
55 coff_arm_is_local_label_name() in bfd/coff-arm.c. */
56 #ifndef REGISTER_PREFIX
57 #define REGISTER_PREFIX ""
58 #endif
60 #ifndef USER_LABEL_PREFIX
61 #define USER_LABEL_PREFIX "_"
62 #endif
64 #ifndef LOCAL_LABEL_PREFIX
65 #define LOCAL_LABEL_PREFIX ""
66 #endif
69 /* The assembler's names for the registers. */
70 #ifndef REGISTER_NAMES
71 #define REGISTER_NAMES \
72 { \
73 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
74 "r8", "r9", "sl", "fp", "ip", "sp", "lr", "pc", \
75 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
76 "cc", "sfp", "afp", \
77 "mv0", "mv1", "mv2", "mv3", "mv4", "mv5", \
78 "mv6", "mv7", "mv8", "mv9", "mv10", "mv11",\
79 "mv12", "mv13", "mv14", "mv15" \
81 #endif
83 #ifndef ADDITIONAL_REGISTER_NAMES
84 #define ADDITIONAL_REGISTER_NAMES \
85 { \
86 {"a1", 0}, \
87 {"a2", 1}, \
88 {"a3", 2}, \
89 {"a4", 3}, \
90 {"v1", 4}, \
91 {"v2", 5}, \
92 {"v3", 6}, \
93 {"v4", 7}, \
94 {"v5", 8}, \
95 {"v6", 9}, \
96 {"rfp", 9}, /* Gcc used to call it this */ \
97 {"sb", 9}, \
98 {"v7", 10}, \
99 {"r10", 10}, /* sl */ \
100 {"r11", 11}, /* fp */ \
101 {"r12", 12}, /* ip */ \
102 {"r13", 13}, /* sp */ \
103 {"r14", 14}, /* lr */ \
104 {"r15", 15}, /* pc */ \
105 {"mvf0", 27}, \
106 {"mvf1", 28}, \
107 {"mvf2", 29}, \
108 {"mvf3", 30}, \
109 {"mvf4", 31}, \
110 {"mvf5", 32}, \
111 {"mvf6", 33}, \
112 {"mvf7", 34}, \
113 {"mvf8", 35}, \
114 {"mvf9", 36}, \
115 {"mvf10", 37}, \
116 {"mvf11", 38}, \
117 {"mvf12", 39}, \
118 {"mvf13", 40}, \
119 {"mvf14", 41}, \
120 {"mvf15", 42}, \
121 {"mvd0", 27}, \
122 {"mvd1", 28}, \
123 {"mvd2", 29}, \
124 {"mvd3", 30}, \
125 {"mvd4", 31}, \
126 {"mvd5", 32}, \
127 {"mvd6", 33}, \
128 {"mvd7", 34}, \
129 {"mvd8", 35}, \
130 {"mvd9", 36}, \
131 {"mvd10", 37}, \
132 {"mvd11", 38}, \
133 {"mvd12", 39}, \
134 {"mvd13", 40}, \
135 {"mvd14", 41}, \
136 {"mvd15", 42}, \
137 {"mvfx0", 27}, \
138 {"mvfx1", 28}, \
139 {"mvfx2", 29}, \
140 {"mvfx3", 30}, \
141 {"mvfx4", 31}, \
142 {"mvfx5", 32}, \
143 {"mvfx6", 33}, \
144 {"mvfx7", 34}, \
145 {"mvfx8", 35}, \
146 {"mvfx9", 36}, \
147 {"mvfx10", 37}, \
148 {"mvfx11", 38}, \
149 {"mvfx12", 39}, \
150 {"mvfx13", 40}, \
151 {"mvfx14", 41}, \
152 {"mvfx15", 42}, \
153 {"mvdx0", 27}, \
154 {"mvdx1", 28}, \
155 {"mvdx2", 29}, \
156 {"mvdx3", 30}, \
157 {"mvdx4", 31}, \
158 {"mvdx5", 32}, \
159 {"mvdx6", 33}, \
160 {"mvdx7", 34}, \
161 {"mvdx8", 35}, \
162 {"mvdx9", 36}, \
163 {"mvdx10", 37}, \
164 {"mvdx11", 38}, \
165 {"mvdx12", 39}, \
166 {"mvdx13", 40}, \
167 {"mvdx14", 41}, \
168 {"mvdx15", 42} \
170 #endif
172 /* Arm Assembler barfs on dollars. */
173 #define DOLLARS_IN_IDENTIFIERS 0
175 #ifndef NO_DOLLAR_IN_LABEL
176 #define NO_DOLLAR_IN_LABEL 1
177 #endif
179 /* Generate DBX debugging information. riscix.h will undefine this because
180 the native assembler does not support stabs. */
181 #define DBX_DEBUGGING_INFO 1
183 /* Acorn dbx moans about continuation chars, so don't use any. */
184 #ifndef DBX_CONTIN_LENGTH
185 #define DBX_CONTIN_LENGTH 0
186 #endif
188 /* Output a source filename for the debugger. RISCiX dbx insists that the
189 ``desc'' field is set to compiler version number >= 315 (sic). */
190 #define DBX_OUTPUT_MAIN_SOURCE_FILENAME(STREAM, NAME) \
191 do \
193 fprintf (STREAM, ".stabs "); \
194 output_quoted_string (STREAM, NAME); \
195 fprintf (STREAM, ",%d,0,315,%s\n", N_SO, &ltext_label_name[1]); \
196 text_section (); \
197 (*targetm.asm_out.internal_label) (STREAM, "Ltext", 0); \
199 while (0)
201 /* Output a function label definition. */
202 #ifndef ASM_DECLARE_FUNCTION_NAME
203 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
204 do \
206 ARM_DECLARE_FUNCTION_NAME (STREAM, NAME, DECL); \
207 ASM_OUTPUT_LABEL (STREAM, NAME); \
209 while (0)
210 #endif
212 /* Globalizing directive for a label. */
213 #define GLOBAL_ASM_OP "\t.global\t"
215 /* Make an internal label into a string. */
216 #ifndef ASM_GENERATE_INTERNAL_LABEL
217 #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
218 sprintf (STRING, "*%s%s%u", LOCAL_LABEL_PREFIX, PREFIX, (unsigned int)(NUM))
219 #endif
221 /* Output an element of a dispatch table. */
222 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
223 asm_fprintf (STREAM, "\t.word\t%LL%d\n", VALUE)
225 #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \
226 do \
228 if (TARGET_ARM) \
229 asm_fprintf (STREAM, "\tb\t%LL%d\n", VALUE); \
230 else \
231 asm_fprintf (STREAM, "\t.word\t%LL%d-%LL%d\n", VALUE, REL); \
233 while (0)
236 #undef ASM_OUTPUT_ASCII
237 #define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) \
238 output_ascii_pseudo_op (STREAM, (const unsigned char *)(PTR), LEN)
240 /* Output a gap. In fact we fill it with nulls. */
241 #undef ASM_OUTPUT_SKIP
242 #define ASM_OUTPUT_SKIP(STREAM, NBYTES) \
243 fprintf (STREAM, "\t.space\t%d\n", NBYTES)
245 /* Align output to a power of two. Horrible /bin/as. */
246 #ifndef ASM_OUTPUT_ALIGN
247 #define ASM_OUTPUT_ALIGN(STREAM, POWER) \
248 do \
250 register int amount = 1 << (POWER); \
252 if (amount == 2) \
253 fprintf (STREAM, "\t.even\n"); \
254 else if (amount != 1) \
255 fprintf (STREAM, "\t.align\t%d\n", amount - 4); \
257 while (0)
258 #endif
260 /* Output a common block. */
261 #ifndef ASM_OUTPUT_COMMON
262 #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
263 do \
265 fprintf (STREAM, "\t.comm\t"); \
266 assemble_name (STREAM, NAME); \
267 asm_fprintf (STREAM, ", %d\t%@ %d\n", \
268 ROUNDED, SIZE); \
270 while (0)
271 #endif
273 /* Output a local common block. /bin/as can't do this, so hack a
274 `.space' into the bss segment. Note that this is *bad* practice,
275 which is guaranteed NOT to work since it doesn't define STATIC
276 COMMON space but merely STATIC BSS space. */
277 #ifndef ASM_OUTPUT_ALIGNED_LOCAL
278 #define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN) \
279 do \
281 bss_section (); \
282 ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \
283 ASM_OUTPUT_LABEL (STREAM, NAME); \
284 fprintf (STREAM, "\t.space\t%d\n", SIZE); \
286 while (0)
287 #endif
289 /* Output a zero-initialized block. */
290 #ifndef ASM_OUTPUT_ALIGNED_BSS
291 #define ASM_OUTPUT_ALIGNED_BSS(STREAM, DECL, NAME, SIZE, ALIGN) \
292 asm_output_aligned_bss (STREAM, DECL, NAME, SIZE, ALIGN)
293 #endif
295 /* Output a source line for the debugger. */
296 /* #define ASM_OUTPUT_SOURCE_LINE(STREAM,LINE) */
298 /* Output a #ident directive. */
299 #ifndef ASM_OUTPUT_IDENT
300 #define ASM_OUTPUT_IDENT(STREAM,STRING) \
301 asm_fprintf (STREAM, "%@ - - - ident %s\n", STRING)
302 #endif
304 #ifndef ASM_COMMENT_START
305 #define ASM_COMMENT_START "@"
306 #endif
308 /* This works for GAS and some other assemblers. */
309 #define SET_ASM_OP "\t.set\t"