]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/arm/aout.h
Fix mistaken names in the last commit.
[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 22
d5b7b3ae
RE
23#ifndef ASM_APP_ON
24#define ASM_APP_ON ""
25#endif
26#ifndef ASM_APP_OFF
27#define ASM_APP_OFF ""
28#endif
9fb7806b
RE
29
30/* Switch to the text or data segment. */
93de6f51
HPN
31#define TEXT_SECTION_ASM_OP "\t.text"
32#define DATA_SECTION_ASM_OP "\t.data"
33#define BSS_SECTION_ASM_OP "\t.bss"
b355a481
NC
34
35/* Note: If USER_LABEL_PREFIX or LOCAL_LABEL_PREFIX are changed,
36 make sure that this change is reflected in the function
4f448245 37 coff_arm_is_local_label_name() in bfd/coff-arm.c. */
b355a481
NC
38#ifndef REGISTER_PREFIX
39#define REGISTER_PREFIX ""
40#endif
41
42#ifndef USER_LABEL_PREFIX
43#define USER_LABEL_PREFIX "_"
44#endif
45
46#ifndef LOCAL_LABEL_PREFIX
47#define LOCAL_LABEL_PREFIX ""
48#endif
9fb7806b 49
9fb7806b
RE
50/* The assembler's names for the registers. */
51#ifndef REGISTER_NAMES
b355a481 52#define REGISTER_NAMES \
9fb7806b
RE
53{ \
54 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
55 "r8", "r9", "sl", "fp", "ip", "sp", "lr", "pc", \
56 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
9b6b54e2 57 "cc", "sfp", "afp", \
5a9335ef
NC
58 "mv0", "mv1", "mv2", "mv3", \
59 "mv4", "mv5", "mv6", "mv7", \
60 "mv8", "mv9", "mv10", "mv11", \
61 "mv12", "mv13", "mv14", "mv15", \
62 "wcgr0", "wcgr1", "wcgr2", "wcgr3", \
63 "wr0", "wr1", "wr2", "wr3", \
64 "wr4", "wr5", "wr6", "wr7", \
65 "wr8", "wr9", "wr10", "wr11", \
66 "wr12", "wr13", "wr14", "wr15" \
9fb7806b
RE
67}
68#endif
69
70#ifndef ADDITIONAL_REGISTER_NAMES
71#define ADDITIONAL_REGISTER_NAMES \
72{ \
73 {"a1", 0}, \
74 {"a2", 1}, \
75 {"a3", 2}, \
76 {"a4", 3}, \
77 {"v1", 4}, \
78 {"v2", 5}, \
79 {"v3", 6}, \
80 {"v4", 7}, \
81 {"v5", 8}, \
82 {"v6", 9}, \
83 {"rfp", 9}, /* Gcc used to call it this */ \
84 {"sb", 9}, \
85 {"v7", 10}, \
86 {"r10", 10}, /* sl */ \
87 {"r11", 11}, /* fp */ \
88 {"r12", 12}, /* ip */ \
89 {"r13", 13}, /* sp */ \
90 {"r14", 14}, /* lr */ \
9b6b54e2
NC
91 {"r15", 15}, /* pc */ \
92 {"mvf0", 27}, \
93 {"mvf1", 28}, \
94 {"mvf2", 29}, \
95 {"mvf3", 30}, \
96 {"mvf4", 31}, \
97 {"mvf5", 32}, \
98 {"mvf6", 33}, \
99 {"mvf7", 34}, \
100 {"mvf8", 35}, \
101 {"mvf9", 36}, \
102 {"mvf10", 37}, \
103 {"mvf11", 38}, \
104 {"mvf12", 39}, \
105 {"mvf13", 40}, \
106 {"mvf14", 41}, \
107 {"mvf15", 42}, \
108 {"mvd0", 27}, \
109 {"mvd1", 28}, \
110 {"mvd2", 29}, \
111 {"mvd3", 30}, \
112 {"mvd4", 31}, \
113 {"mvd5", 32}, \
114 {"mvd6", 33}, \
115 {"mvd7", 34}, \
116 {"mvd8", 35}, \
117 {"mvd9", 36}, \
118 {"mvd10", 37}, \
119 {"mvd11", 38}, \
120 {"mvd12", 39}, \
121 {"mvd13", 40}, \
122 {"mvd14", 41}, \
123 {"mvd15", 42}, \
124 {"mvfx0", 27}, \
125 {"mvfx1", 28}, \
126 {"mvfx2", 29}, \
127 {"mvfx3", 30}, \
128 {"mvfx4", 31}, \
129 {"mvfx5", 32}, \
130 {"mvfx6", 33}, \
131 {"mvfx7", 34}, \
132 {"mvfx8", 35}, \
133 {"mvfx9", 36}, \
134 {"mvfx10", 37}, \
135 {"mvfx11", 38}, \
136 {"mvfx12", 39}, \
137 {"mvfx13", 40}, \
138 {"mvfx14", 41}, \
139 {"mvfx15", 42}, \
140 {"mvdx0", 27}, \
141 {"mvdx1", 28}, \
142 {"mvdx2", 29}, \
143 {"mvdx3", 30}, \
144 {"mvdx4", 31}, \
145 {"mvdx5", 32}, \
146 {"mvdx6", 33}, \
147 {"mvdx7", 34}, \
148 {"mvdx8", 35}, \
149 {"mvdx9", 36}, \
150 {"mvdx10", 37}, \
151 {"mvdx11", 38}, \
152 {"mvdx12", 39}, \
153 {"mvdx13", 40}, \
154 {"mvdx14", 41}, \
155 {"mvdx15", 42} \
9fb7806b
RE
156}
157#endif
158
4f448245 159/* Arm Assembler barfs on dollars. */
9fb7806b
RE
160#define DOLLARS_IN_IDENTIFIERS 0
161
be393ecf 162#ifndef NO_DOLLAR_IN_LABEL
6cfc7210 163#define NO_DOLLAR_IN_LABEL 1
be393ecf 164#endif
9fb7806b 165
9fb7806b 166/* Generate DBX debugging information. riscix.h will undefine this because
4f448245 167 the native assembler does not support stabs. */
23532de9 168#define DBX_DEBUGGING_INFO 1
9fb7806b
RE
169
170/* Acorn dbx moans about continuation chars, so don't use any. */
171#ifndef DBX_CONTIN_LENGTH
172#define DBX_CONTIN_LENGTH 0
173#endif
174
175/* Output a source filename for the debugger. RISCiX dbx insists that the
176 ``desc'' field is set to compiler version number >= 315 (sic). */
6cfc7210
NC
177#define DBX_OUTPUT_MAIN_SOURCE_FILENAME(STREAM, NAME) \
178 do \
179 { \
180 fprintf (STREAM, ".stabs "); \
181 output_quoted_string (STREAM, NAME); \
182 fprintf (STREAM, ",%d,0,315,%s\n", N_SO, &ltext_label_name[1]); \
183 text_section (); \
4977bab6 184 (*targetm.asm_out.internal_label) (STREAM, "Ltext", 0); \
6cfc7210
NC
185 } \
186 while (0)
9fb7806b
RE
187
188/* Output a function label definition. */
b355a481 189#ifndef ASM_DECLARE_FUNCTION_NAME
6cfc7210
NC
190#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
191 do \
192 { \
193 ARM_DECLARE_FUNCTION_NAME (STREAM, NAME, DECL); \
194 ASM_OUTPUT_LABEL (STREAM, NAME); \
195 } \
196 while (0)
b355a481 197#endif
9fb7806b 198
506a61b1
KG
199/* Globalizing directive for a label. */
200#define GLOBAL_ASM_OP "\t.global\t"
9fb7806b 201
9fb7806b 202/* Make an internal label into a string. */
b355a481 203#ifndef ASM_GENERATE_INTERNAL_LABEL
9fb7806b 204#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
aec3cfba 205 sprintf (STRING, "*%s%s%u", LOCAL_LABEL_PREFIX, PREFIX, (unsigned int)(NUM))
b355a481
NC
206#endif
207
9fb7806b 208/* Output an element of a dispatch table. */
6cfc7210
NC
209#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
210 asm_fprintf (STREAM, "\t.word\t%LL%d\n", VALUE)
9fb7806b 211
657d9449
RE
212#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \
213 do \
214 { \
215 if (TARGET_ARM) \
216 asm_fprintf (STREAM, "\tb\t%LL%d\n", VALUE); \
217 else \
218 asm_fprintf (STREAM, "\t.word\t%LL%d-%LL%d\n", VALUE, REL); \
219 } \
220 while (0)
221
9fb7806b 222
be393ecf 223#undef ASM_OUTPUT_ASCII
9fb7806b 224#define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) \
5a9335ef 225 output_ascii_pseudo_op (STREAM, (const unsigned char *) (PTR), LEN)
9fb7806b
RE
226
227/* Output a gap. In fact we fill it with nulls. */
be393ecf 228#undef ASM_OUTPUT_SKIP
b355a481 229#define ASM_OUTPUT_SKIP(STREAM, NBYTES) \
5a9335ef 230 fprintf (STREAM, "\t.space\t%d\n", (int) (NBYTES))
9fb7806b
RE
231
232/* Align output to a power of two. Horrible /bin/as. */
00275db1 233#ifndef ASM_OUTPUT_ALIGN
6cfc7210
NC
234#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
235 do \
236 { \
237 register int amount = 1 << (POWER); \
238 \
239 if (amount == 2) \
240 fprintf (STREAM, "\t.even\n"); \
241 else if (amount != 1) \
242 fprintf (STREAM, "\t.align\t%d\n", amount - 4); \
243 } \
00275db1
PB
244 while (0)
245#endif
9fb7806b 246
4f448245 247/* Output a common block. */
b355a481 248#ifndef ASM_OUTPUT_COMMON
6cfc7210
NC
249#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
250 do \
251 { \
252 fprintf (STREAM, "\t.comm\t"); \
253 assemble_name (STREAM, NAME); \
d5b7b3ae 254 asm_fprintf (STREAM, ", %d\t%@ %d\n", \
58e15542 255 (int)(ROUNDED), (int)(SIZE)); \
6cfc7210
NC
256 } \
257 while (0)
b355a481
NC
258#endif
259
33f7f353 260/* Output a local common block. /bin/as can't do this, so hack a
b355a481
NC
261 `.space' into the bss segment. Note that this is *bad* practice,
262 which is guaranteed NOT to work since it doesn't define STATIC
263 COMMON space but merely STATIC BSS space. */
264#ifndef ASM_OUTPUT_ALIGNED_LOCAL
6cfc7210
NC
265#define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN) \
266 do \
267 { \
268 bss_section (); \
269 ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \
270 ASM_OUTPUT_LABEL (STREAM, NAME); \
58e15542 271 fprintf (STREAM, "\t.space\t%d\n", (int)(SIZE)); \
6cfc7210
NC
272 } \
273 while (0)
b355a481
NC
274#endif
275
c9d9bc85 276/* Output a zero-initialized block. */
b355a481 277#ifndef ASM_OUTPUT_ALIGNED_BSS
6cfc7210 278#define ASM_OUTPUT_ALIGNED_BSS(STREAM, DECL, NAME, SIZE, ALIGN) \
b355a481
NC
279 asm_output_aligned_bss (STREAM, DECL, NAME, SIZE, ALIGN)
280#endif
9fb7806b
RE
281
282/* Output a #ident directive. */
b355a481 283#ifndef ASM_OUTPUT_IDENT
9fb7806b 284#define ASM_OUTPUT_IDENT(STREAM,STRING) \
d5b7b3ae 285 asm_fprintf (STREAM, "%@ - - - ident %s\n", STRING)
b355a481
NC
286#endif
287
9fb7806b 288#ifndef ASM_COMMENT_START
b355a481 289#define ASM_COMMENT_START "@"
9fb7806b
RE
290#endif
291
ce29b9d0 292/* This works for GAS and some other assemblers. */
93de6f51 293#define SET_ASM_OP "\t.set\t"