]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/arm/aout.h
cgraphunit.c (cgraph_create_edges): Drop walk_tree in favor of walk_tree_without_dupl...
[thirdparty/gcc.git] / gcc / config / arm / aout.h
CommitLineData
9fb7806b 1/* Definitions of target machine for GNU compiler, for ARM with a.out
2398fb2a
RB
2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
3 Free Software Foundation, Inc.
ae3e1bb4 4 Contributed by Richard Earnshaw (rearnsha@armltd.co.uk).
9fb7806b 5
4f448245 6 This file is part of GCC.
9fb7806b 7
4f448245
NC
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.
9fb7806b 12
4f448245
NC
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.
9fb7806b 17
4f448245
NC
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. */
9fb7806b
RE
22
23#ifndef ARM_OS_NAME
24#define ARM_OS_NAME "(generic)"
25#endif
26
4f448245 27/* The text to go at the start of the assembler file. */
b355a481 28#ifndef ASM_FILE_START
d5b7b3ae
RE
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"); \
9fb7806b 38}
b355a481 39#endif
9fb7806b 40
d5b7b3ae
RE
41#ifndef ASM_APP_ON
42#define ASM_APP_ON ""
43#endif
44#ifndef ASM_APP_OFF
45#define ASM_APP_OFF ""
46#endif
9fb7806b
RE
47
48/* Switch to the text or data segment. */
93de6f51
HPN
49#define TEXT_SECTION_ASM_OP "\t.text"
50#define DATA_SECTION_ASM_OP "\t.data"
51#define BSS_SECTION_ASM_OP "\t.bss"
b355a481
NC
52
53/* Note: If USER_LABEL_PREFIX or LOCAL_LABEL_PREFIX are changed,
54 make sure that this change is reflected in the function
4f448245 55 coff_arm_is_local_label_name() in bfd/coff-arm.c. */
b355a481
NC
56#ifndef REGISTER_PREFIX
57#define REGISTER_PREFIX ""
58#endif
59
60#ifndef USER_LABEL_PREFIX
61#define USER_LABEL_PREFIX "_"
62#endif
63
64#ifndef LOCAL_LABEL_PREFIX
65#define LOCAL_LABEL_PREFIX ""
66#endif
9fb7806b 67
9fb7806b
RE
68
69/* The assembler's names for the registers. */
70#ifndef REGISTER_NAMES
b355a481 71#define REGISTER_NAMES \
9fb7806b
RE
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", \
9b6b54e2
NC
76 "cc", "sfp", "afp", \
77 "mv0", "mv1", "mv2", "mv3", "mv4", "mv5", \
78 "mv6", "mv7", "mv8", "mv9", "mv10", "mv11",\
79 "mv12", "mv13", "mv14", "mv15" \
9fb7806b
RE
80}
81#endif
82
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 */ \
9b6b54e2
NC
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} \
9fb7806b
RE
169}
170#endif
171
4f448245 172/* Arm Assembler barfs on dollars. */
9fb7806b
RE
173#define DOLLARS_IN_IDENTIFIERS 0
174
be393ecf 175#ifndef NO_DOLLAR_IN_LABEL
6cfc7210 176#define NO_DOLLAR_IN_LABEL 1
be393ecf 177#endif
9fb7806b 178
9fb7806b 179/* Generate DBX debugging information. riscix.h will undefine this because
4f448245 180 the native assembler does not support stabs. */
23532de9 181#define DBX_DEBUGGING_INFO 1
9fb7806b
RE
182
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
187
188/* Output a source filename for the debugger. RISCiX dbx insists that the
189 ``desc'' field is set to compiler version number >= 315 (sic). */
6cfc7210
NC
190#define DBX_OUTPUT_MAIN_SOURCE_FILENAME(STREAM, NAME) \
191 do \
192 { \
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 (); \
4977bab6 197 (*targetm.asm_out.internal_label) (STREAM, "Ltext", 0); \
6cfc7210
NC
198 } \
199 while (0)
9fb7806b
RE
200
201/* Output a function label definition. */
b355a481 202#ifndef ASM_DECLARE_FUNCTION_NAME
6cfc7210
NC
203#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
204 do \
205 { \
206 ARM_DECLARE_FUNCTION_NAME (STREAM, NAME, DECL); \
207 ASM_OUTPUT_LABEL (STREAM, NAME); \
208 } \
209 while (0)
b355a481 210#endif
9fb7806b 211
506a61b1
KG
212/* Globalizing directive for a label. */
213#define GLOBAL_ASM_OP "\t.global\t"
9fb7806b 214
9fb7806b 215/* Make an internal label into a string. */
b355a481 216#ifndef ASM_GENERATE_INTERNAL_LABEL
9fb7806b 217#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
aec3cfba 218 sprintf (STRING, "*%s%s%u", LOCAL_LABEL_PREFIX, PREFIX, (unsigned int)(NUM))
b355a481
NC
219#endif
220
9fb7806b 221/* Output an element of a dispatch table. */
6cfc7210
NC
222#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
223 asm_fprintf (STREAM, "\t.word\t%LL%d\n", VALUE)
9fb7806b 224
657d9449
RE
225#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \
226 do \
227 { \
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); \
232 } \
233 while (0)
234
9fb7806b 235
be393ecf 236#undef ASM_OUTPUT_ASCII
9fb7806b 237#define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) \
3cce094d 238 output_ascii_pseudo_op (STREAM, (const unsigned char *)(PTR), LEN)
9fb7806b
RE
239
240/* Output a gap. In fact we fill it with nulls. */
be393ecf 241#undef ASM_OUTPUT_SKIP
b355a481 242#define ASM_OUTPUT_SKIP(STREAM, NBYTES) \
6cfc7210 243 fprintf (STREAM, "\t.space\t%d\n", NBYTES)
9fb7806b
RE
244
245/* Align output to a power of two. Horrible /bin/as. */
00275db1 246#ifndef ASM_OUTPUT_ALIGN
6cfc7210
NC
247#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
248 do \
249 { \
250 register int amount = 1 << (POWER); \
251 \
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); \
256 } \
00275db1
PB
257 while (0)
258#endif
9fb7806b 259
4f448245 260/* Output a common block. */
b355a481 261#ifndef ASM_OUTPUT_COMMON
6cfc7210
NC
262#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
263 do \
264 { \
265 fprintf (STREAM, "\t.comm\t"); \
266 assemble_name (STREAM, NAME); \
d5b7b3ae
RE
267 asm_fprintf (STREAM, ", %d\t%@ %d\n", \
268 ROUNDED, SIZE); \
6cfc7210
NC
269 } \
270 while (0)
b355a481
NC
271#endif
272
33f7f353 273/* Output a local common block. /bin/as can't do this, so hack a
b355a481
NC
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
6cfc7210
NC
278#define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN) \
279 do \
280 { \
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); \
285 } \
286 while (0)
b355a481
NC
287#endif
288
c9d9bc85 289/* Output a zero-initialized block. */
b355a481 290#ifndef ASM_OUTPUT_ALIGNED_BSS
6cfc7210 291#define ASM_OUTPUT_ALIGNED_BSS(STREAM, DECL, NAME, SIZE, ALIGN) \
b355a481
NC
292 asm_output_aligned_bss (STREAM, DECL, NAME, SIZE, ALIGN)
293#endif
294
9fb7806b
RE
295/* Output a source line for the debugger. */
296/* #define ASM_OUTPUT_SOURCE_LINE(STREAM,LINE) */
297
298/* Output a #ident directive. */
b355a481 299#ifndef ASM_OUTPUT_IDENT
9fb7806b 300#define ASM_OUTPUT_IDENT(STREAM,STRING) \
d5b7b3ae 301 asm_fprintf (STREAM, "%@ - - - ident %s\n", STRING)
b355a481
NC
302#endif
303
9fb7806b 304#ifndef ASM_COMMENT_START
b355a481 305#define ASM_COMMENT_START "@"
9fb7806b
RE
306#endif
307
ce29b9d0 308/* This works for GAS and some other assemblers. */
93de6f51 309#define SET_ASM_OP "\t.set\t"