annotate gcc/config/visium/visium.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Definitions of target machine for Visium.
kono
parents:
diff changeset
2 Copyright (C) 2002-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3 Contributed by C.Nettleton, J.P.Parkes and P.Garbett.
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
8 under the terms of the GNU General Public License as published
kono
parents:
diff changeset
9 by the Free Software Foundation; either version 3, or (at your
kono
parents:
diff changeset
10 option) any later version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
15 License for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 /* Controlling the Compilation Driver, `gcc' */
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 /* Pass -mtune=* options to the assembler */
kono
parents:
diff changeset
25 #undef ASM_SPEC
kono
parents:
diff changeset
26 #define ASM_SPEC "%{mcpu=gr6:-mtune=gr6; :-mtune=mcm}"
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 /* Define symbols for the preprocessor. */
kono
parents:
diff changeset
29 #define CPP_SPEC "%{mcpu=gr6:-D__gr6__; :-D__gr5__}"
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 /* Targets of a link */
kono
parents:
diff changeset
32 #define LIB_SPEC \
kono
parents:
diff changeset
33 "--start-group -lc %{msim:-lsim; mdebug:-ldebug; :-lserial} --end-group"
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 #define ENDFILE_SPEC "crtend.o%s crtn.o%s"
kono
parents:
diff changeset
36 #define STARTFILE_SPEC "crti.o%s crtbegin.o%s crt0.o%s"
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 /* Run-time Target Specification */
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 /* TARGET_CPU_CPP_BUILTINS() This function-like macro expands to a
kono
parents:
diff changeset
41 block of code that defines built-in preprocessor macros and
kono
parents:
diff changeset
42 assertions for the target cpu, using the functions builtin_define,
kono
parents:
diff changeset
43 builtin_define_std and builtin_assert. When the front end calls
kono
parents:
diff changeset
44 this macro it provides a trailing semicolon, and since it has
kono
parents:
diff changeset
45 finished command line option processing your code can use those
kono
parents:
diff changeset
46 results freely. builtin_assert takes a string in the form you pass
kono
parents:
diff changeset
47 to the command-line option -A, such as cpu=mips, and creates the
kono
parents:
diff changeset
48 assertion. builtin_define takes a string in the form accepted by
kono
parents:
diff changeset
49 option -D and unconditionally defines the macro.
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 builtin_define_std takes a string representing the name of an
kono
parents:
diff changeset
52 object-like macro. If it doesn't lie in the user's namespace,
kono
parents:
diff changeset
53 builtin_define_std defines it unconditionally. Otherwise, it
kono
parents:
diff changeset
54 defines a version with two leading underscores, and another version
kono
parents:
diff changeset
55 with two leading and trailing underscores, and defines the original
kono
parents:
diff changeset
56 only if an ISO standard was not requested on the command line. For
kono
parents:
diff changeset
57 example, passing unix defines __unix, __unix__ and possibly unix;
kono
parents:
diff changeset
58 passing _mips defines __mips, __mips__ and possibly _mips, and
kono
parents:
diff changeset
59 passing _ABI64 defines only _ABI64.
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 You can also test for the C dialect being compiled. The variable
kono
parents:
diff changeset
62 c_language is set to one of clk_c, clk_cplusplus or
kono
parents:
diff changeset
63 clk_objective_c. Note that if we are preprocessing assembler, this
kono
parents:
diff changeset
64 variable will be clk_c but the function-like macro
kono
parents:
diff changeset
65 preprocessing_asm_p() will return true, so you might want to check
kono
parents:
diff changeset
66 for that first. If you need to check for strict ANSI, the variable
kono
parents:
diff changeset
67 flag_iso can be used. The function-like macro
kono
parents:
diff changeset
68 preprocessing_trad_p() can be used to check for traditional
kono
parents:
diff changeset
69 preprocessing. */
kono
parents:
diff changeset
70 #define TARGET_CPU_CPP_BUILTINS() \
kono
parents:
diff changeset
71 do \
kono
parents:
diff changeset
72 { \
kono
parents:
diff changeset
73 builtin_define ("__VISIUM__"); \
kono
parents:
diff changeset
74 if (TARGET_MCM) \
kono
parents:
diff changeset
75 builtin_define ("__VISIUM_ARCH_MCM__"); \
kono
parents:
diff changeset
76 if (TARGET_BMI) \
kono
parents:
diff changeset
77 builtin_define ("__VISIUM_ARCH_BMI__"); \
kono
parents:
diff changeset
78 if (TARGET_FPU_IEEE) \
kono
parents:
diff changeset
79 builtin_define ("__VISIUM_ARCH_FPU_IEEE__"); \
kono
parents:
diff changeset
80 } \
kono
parents:
diff changeset
81 while (0)
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83 /* Recast the cpu class to be the cpu attribute.
kono
parents:
diff changeset
84 Every file includes us, but not every file includes insn-attr.h. */
kono
parents:
diff changeset
85 #define visium_cpu_attr ((enum attr_cpu) visium_cpu)
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 /* Defining data structures for per-function information.
kono
parents:
diff changeset
88
kono
parents:
diff changeset
89 If the target needs to store information on a per-function basis,
kono
parents:
diff changeset
90 GCC provides a macro and a couple of variables to allow this. Note,
kono
parents:
diff changeset
91 just using statics to store the information is a bad idea, since
kono
parents:
diff changeset
92 GCC supports nested functions, so you can be halfway through
kono
parents:
diff changeset
93 encoding one function when another one comes along.
kono
parents:
diff changeset
94
kono
parents:
diff changeset
95 GCC defines a data structure called struct function which contains
kono
parents:
diff changeset
96 all of the data specific to an individual function. This structure
kono
parents:
diff changeset
97 contains a field called machine whose type is struct
kono
parents:
diff changeset
98 machine_function *, which can be used by targets to point to their
kono
parents:
diff changeset
99 own specific data.
kono
parents:
diff changeset
100
kono
parents:
diff changeset
101 If a target needs per-function specific data it should define the
kono
parents:
diff changeset
102 type struct machine_function and also the macro
kono
parents:
diff changeset
103 INIT_EXPANDERS. This macro should be used to initialize the
kono
parents:
diff changeset
104 function pointer init_machine_status. This pointer is explained
kono
parents:
diff changeset
105 below.
kono
parents:
diff changeset
106
kono
parents:
diff changeset
107 One typical use of per-function, target specific data is to create
kono
parents:
diff changeset
108 an RTX to hold the register containing the function's return
kono
parents:
diff changeset
109 address. This RTX can then be used to implement the
kono
parents:
diff changeset
110 __builtin_return_address function, for level 0.
kono
parents:
diff changeset
111
kono
parents:
diff changeset
112 Note--earlier implementations of GCC used a single data area to
kono
parents:
diff changeset
113 hold all of the per-function information. Thus when processing of a
kono
parents:
diff changeset
114 nested function began the old per-function data had to be pushed
kono
parents:
diff changeset
115 onto a stack, and when the processing was finished, it had to be
kono
parents:
diff changeset
116 popped off the stack. GCC used to provide function pointers called
kono
parents:
diff changeset
117 save_machine_status and restore_machine_status to handle the saving
kono
parents:
diff changeset
118 and restoring of the target specific information. Since the single
kono
parents:
diff changeset
119 data area approach is no longer used, these pointers are no longer
kono
parents:
diff changeset
120 supported.
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 The macro and function pointers are described below.
kono
parents:
diff changeset
123
kono
parents:
diff changeset
124 INIT_EXPANDERS:
kono
parents:
diff changeset
125
kono
parents:
diff changeset
126 Macro called to initialize any target specific information. This
kono
parents:
diff changeset
127 macro is called once per function, before generation of any RTL has
kono
parents:
diff changeset
128 begun. The intention of this macro is to allow the initialization
kono
parents:
diff changeset
129 of the function pointers below.
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 init_machine_status:
kono
parents:
diff changeset
132 This is a void (*)(struct function *) function pointer. If this
kono
parents:
diff changeset
133 pointer is non-NULL it will be called once per function, before
kono
parents:
diff changeset
134 function compilation starts, in order to allow the target to
kono
parents:
diff changeset
135 perform any target specific initialization of the struct function
kono
parents:
diff changeset
136 structure. It is intended that this would be used to initialize the
kono
parents:
diff changeset
137 machine of that structure. struct machine_function structures are
kono
parents:
diff changeset
138 expected to be freed by GC. Generally, any memory that they
kono
parents:
diff changeset
139 reference must be allocated by using ggc_alloc, including the
kono
parents:
diff changeset
140 structure itself. */
kono
parents:
diff changeset
141
kono
parents:
diff changeset
142 #define INIT_EXPANDERS visium_init_expanders ()
kono
parents:
diff changeset
143
kono
parents:
diff changeset
144 /* Storage Layout
kono
parents:
diff changeset
145
kono
parents:
diff changeset
146 Note that the definitions of the macros in this table which are
kono
parents:
diff changeset
147 sizes or alignments measured in bits do not need to be constant.
kono
parents:
diff changeset
148 They can be C expressions that refer to static variables, such as
kono
parents:
diff changeset
149 the `target_flags'.
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 `BITS_BIG_ENDIAN'
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 Define this macro to have the value 1 if the most significant bit
kono
parents:
diff changeset
154 in a byte has the lowest number; otherwise define it to have the
kono
parents:
diff changeset
155 value zero. This means that bit-field instructions count from the
kono
parents:
diff changeset
156 most significant bit. If the machine has no bit-field
kono
parents:
diff changeset
157 instructions, then this must still be defined, but it doesn't
kono
parents:
diff changeset
158 matter which value it is defined to. This macro need not be a
kono
parents:
diff changeset
159 constant.
kono
parents:
diff changeset
160
kono
parents:
diff changeset
161 This macro does not affect the way structure fields are packed into
kono
parents:
diff changeset
162 bytes or words; that is controlled by `BYTES_BIG_ENDIAN'. */
kono
parents:
diff changeset
163 #define BITS_BIG_ENDIAN 1
kono
parents:
diff changeset
164
kono
parents:
diff changeset
165 /* `BYTES_BIG_ENDIAN'
kono
parents:
diff changeset
166
kono
parents:
diff changeset
167 Define this macro to have the value 1 if the most significant byte
kono
parents:
diff changeset
168 in a word has the lowest number. This macro need not be a
kono
parents:
diff changeset
169 constant.*/
kono
parents:
diff changeset
170 #define BYTES_BIG_ENDIAN 1
kono
parents:
diff changeset
171
kono
parents:
diff changeset
172 /* `WORDS_BIG_ENDIAN'
kono
parents:
diff changeset
173
kono
parents:
diff changeset
174 Define this macro to have the value 1 if, in a multiword object,
kono
parents:
diff changeset
175 the most significant word has the lowest number. This applies to
kono
parents:
diff changeset
176 both memory locations and registers; GNU CC fundamentally assumes
kono
parents:
diff changeset
177 that the order of words in memory is the same as the order in
kono
parents:
diff changeset
178 registers. This macro need not be a constant. */
kono
parents:
diff changeset
179 #define WORDS_BIG_ENDIAN 1
kono
parents:
diff changeset
180
kono
parents:
diff changeset
181 /* `BITS_PER_WORD'
kono
parents:
diff changeset
182
kono
parents:
diff changeset
183 Number of bits in a word; normally 32. */
kono
parents:
diff changeset
184 #define BITS_PER_WORD 32
kono
parents:
diff changeset
185
kono
parents:
diff changeset
186 /* `UNITS_PER_WORD'
kono
parents:
diff changeset
187
kono
parents:
diff changeset
188 Number of storage units in a word; normally 4. */
kono
parents:
diff changeset
189 #define UNITS_PER_WORD 4
kono
parents:
diff changeset
190
kono
parents:
diff changeset
191 /* `POINTER_SIZE'
kono
parents:
diff changeset
192
kono
parents:
diff changeset
193 Width of a pointer, in bits. You must specify a value no wider
kono
parents:
diff changeset
194 than the width of `Pmode'. If it is not equal to the width of
kono
parents:
diff changeset
195 `Pmode', you must define `POINTERS_EXTEND_UNSIGNED'. */
kono
parents:
diff changeset
196 #define POINTER_SIZE 32
kono
parents:
diff changeset
197
kono
parents:
diff changeset
198 /* `PARM_BOUNDARY'
kono
parents:
diff changeset
199
kono
parents:
diff changeset
200 Normal alignment required for function parameters on the stack, in
kono
parents:
diff changeset
201 bits. All stack parameters receive at least this much alignment
kono
parents:
diff changeset
202 regardless of data type. On most machines, this is the same as the
kono
parents:
diff changeset
203 size of an integer. */
kono
parents:
diff changeset
204 #define PARM_BOUNDARY 32
kono
parents:
diff changeset
205
kono
parents:
diff changeset
206 /* `STACK_BOUNDARY'
kono
parents:
diff changeset
207
kono
parents:
diff changeset
208 Define this macro if you wish to preserve a certain alignment for
kono
parents:
diff changeset
209 the stack pointer. The definition is a C expression for the
kono
parents:
diff changeset
210 desired alignment (measured in bits).
kono
parents:
diff changeset
211
kono
parents:
diff changeset
212 If `PUSH_ROUNDING' is not defined, the stack will always be aligned
kono
parents:
diff changeset
213 to the specified boundary. If `PUSH_ROUNDING' is defined and
kono
parents:
diff changeset
214 specifies a less strict alignment than `STACK_BOUNDARY', the stack
kono
parents:
diff changeset
215 may be momentarily unaligned while pushing arguments. */
kono
parents:
diff changeset
216 #define STACK_BOUNDARY 32
kono
parents:
diff changeset
217
kono
parents:
diff changeset
218 #define VISIUM_STACK_ALIGN(LOC) (((LOC) + 3) & ~3)
kono
parents:
diff changeset
219
kono
parents:
diff changeset
220 /* `FUNCTION_BOUNDARY'
kono
parents:
diff changeset
221
kono
parents:
diff changeset
222 Alignment required for a function entry point, in bits. */
kono
parents:
diff changeset
223 #define FUNCTION_BOUNDARY 32
kono
parents:
diff changeset
224
kono
parents:
diff changeset
225 /* `BIGGEST_ALIGNMENT'
kono
parents:
diff changeset
226
kono
parents:
diff changeset
227 Biggest alignment that any data type can require on this machine,
kono
parents:
diff changeset
228 in bits. */
kono
parents:
diff changeset
229 #define BIGGEST_ALIGNMENT 32
kono
parents:
diff changeset
230
kono
parents:
diff changeset
231 /* `DATA_ALIGNMENT (TYPE, BASIC-ALIGN)`
kono
parents:
diff changeset
232
kono
parents:
diff changeset
233 If defined, a C expression to compute the alignment for a variable
kono
parents:
diff changeset
234 in the static store. TYPE is the data type, and BASIC-ALIGN is
kono
parents:
diff changeset
235 the alignment that the object would ordinarily have. The value of
kono
parents:
diff changeset
236 this macro is used instead of that alignment to align the object. */
kono
parents:
diff changeset
237 #define DATA_ALIGNMENT(TYPE,ALIGN) visium_data_alignment (TYPE, ALIGN)
kono
parents:
diff changeset
238
kono
parents:
diff changeset
239 /* `LOCAL_ALIGNMENT (TYPE, BASIC-ALIGN)`
kono
parents:
diff changeset
240
kono
parents:
diff changeset
241 If defined, a C expression to compute the alignment for a variable
kono
parents:
diff changeset
242 in the local store. TYPE is the data type, and BASIC-ALIGN is the
kono
parents:
diff changeset
243 alignment that the object would ordinarily have. The value of this
kono
parents:
diff changeset
244 macro is used instead of that alignment to align the object. */
kono
parents:
diff changeset
245 #define LOCAL_ALIGNMENT(TYPE,ALIGN) visium_data_alignment (TYPE, ALIGN)
kono
parents:
diff changeset
246
kono
parents:
diff changeset
247 /* `EMPTY_FIELD_BOUNDARY'
kono
parents:
diff changeset
248
kono
parents:
diff changeset
249 Alignment in bits to be given to a structure bit field that follows
kono
parents:
diff changeset
250 an empty field such as `int : 0;'.
kono
parents:
diff changeset
251
kono
parents:
diff changeset
252 Note that `PCC_BITFIELD_TYPE_MATTERS' also affects the alignment
kono
parents:
diff changeset
253 that results from an empty field. */
kono
parents:
diff changeset
254 #define EMPTY_FIELD_BOUNDARY 32
kono
parents:
diff changeset
255
kono
parents:
diff changeset
256 /* `STRICT_ALIGNMENT'
kono
parents:
diff changeset
257
kono
parents:
diff changeset
258 Define this macro to be the value 1 if instructions will fail to
kono
parents:
diff changeset
259 work if given data not on the nominal alignment. If instructions
kono
parents:
diff changeset
260 will merely go slower in that case, define this macro as 0. */
kono
parents:
diff changeset
261 #define STRICT_ALIGNMENT 1
kono
parents:
diff changeset
262
kono
parents:
diff changeset
263 /* `TARGET_FLOAT_FORMAT'
kono
parents:
diff changeset
264
kono
parents:
diff changeset
265 A code distinguishing the floating point format of the target
kono
parents:
diff changeset
266 machine. There are three defined values:
kono
parents:
diff changeset
267
kono
parents:
diff changeset
268 `IEEE_FLOAT_FORMAT'
kono
parents:
diff changeset
269 This code indicates IEEE floating point. It is the default;
kono
parents:
diff changeset
270 there is no need to define this macro when the format is IEEE.
kono
parents:
diff changeset
271
kono
parents:
diff changeset
272 `VAX_FLOAT_FORMAT'
kono
parents:
diff changeset
273 This code indicates the peculiar format used on the Vax.
kono
parents:
diff changeset
274
kono
parents:
diff changeset
275 `UNKNOWN_FLOAT_FORMAT'
kono
parents:
diff changeset
276 This code indicates any other format.
kono
parents:
diff changeset
277
kono
parents:
diff changeset
278 The value of this macro is compared with `HOST_FLOAT_FORMAT' to
kono
parents:
diff changeset
279 determine whether the target machine has the same format as the
kono
parents:
diff changeset
280 host machine. If any other formats are actually in use on
kono
parents:
diff changeset
281 supported machines, new codes should be defined for them.
kono
parents:
diff changeset
282
kono
parents:
diff changeset
283 The ordering of the component words of floating point values
kono
parents:
diff changeset
284 stored in memory is controlled by `FLOAT_WORDS_BIG_ENDIAN' for the
kono
parents:
diff changeset
285 target machine and `HOST_FLOAT_WORDS_BIG_ENDIAN' for the host. */
kono
parents:
diff changeset
286 #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
kono
parents:
diff changeset
287 #define UNITS_PER_HWFPVALUE 4
kono
parents:
diff changeset
288
kono
parents:
diff changeset
289 /* Layout of Source Language Data Types
kono
parents:
diff changeset
290
kono
parents:
diff changeset
291 These macros define the sizes and other characteristics of the
kono
parents:
diff changeset
292 standard basic data types used in programs being compiled. Unlike
kono
parents:
diff changeset
293 the macros in the previous section, these apply to specific
kono
parents:
diff changeset
294 features of C and related languages, rather than to fundamental
kono
parents:
diff changeset
295 aspects of storage layout. */
kono
parents:
diff changeset
296
kono
parents:
diff changeset
297 /* `INT_TYPE_SIZE'
kono
parents:
diff changeset
298
kono
parents:
diff changeset
299 A C expression for the size in bits of the type `int' on the target
kono
parents:
diff changeset
300 machine. If you don't define this, the default is one word. */
kono
parents:
diff changeset
301 #define INT_TYPE_SIZE 32
kono
parents:
diff changeset
302
kono
parents:
diff changeset
303 /* `SHORT_TYPE_SIZE'
kono
parents:
diff changeset
304
kono
parents:
diff changeset
305 A C expression for the size in bits of the type `short' on the
kono
parents:
diff changeset
306 target machine. If you don't define this, the default is half a
kono
parents:
diff changeset
307 word. (If this would be less than one storage unit, it is rounded
kono
parents:
diff changeset
308 up to one unit.) */
kono
parents:
diff changeset
309 #define SHORT_TYPE_SIZE 16
kono
parents:
diff changeset
310
kono
parents:
diff changeset
311 /* `LONG_TYPE_SIZE'
kono
parents:
diff changeset
312
kono
parents:
diff changeset
313 A C expression for the size in bits of the type `long' on the
kono
parents:
diff changeset
314 target machine. If you don't define this, the default is one word. */
kono
parents:
diff changeset
315 #define LONG_TYPE_SIZE 32
kono
parents:
diff changeset
316
kono
parents:
diff changeset
317 /* `LONG_LONG_TYPE_SIZE'
kono
parents:
diff changeset
318
kono
parents:
diff changeset
319 A C expression for the size in bits of the type `long long' on the
kono
parents:
diff changeset
320 target machine. If you don't define this, the default is two
kono
parents:
diff changeset
321 words. If you want to support GNU Ada on your machine, the value
kono
parents:
diff changeset
322 of macro must be at least 64. */
kono
parents:
diff changeset
323 #define LONG_LONG_TYPE_SIZE 64
kono
parents:
diff changeset
324
kono
parents:
diff changeset
325 /* `CHAR_TYPE_SIZE'
kono
parents:
diff changeset
326
kono
parents:
diff changeset
327 A C expression for the size in bits of the type `char' on the
kono
parents:
diff changeset
328 target machine. If you don't define this, the default is one
kono
parents:
diff changeset
329 quarter of a word. (If this would be less than one storage unit,
kono
parents:
diff changeset
330 it is rounded up to one unit.) */
kono
parents:
diff changeset
331 #define CHAR_TYPE_SIZE 8
kono
parents:
diff changeset
332
kono
parents:
diff changeset
333 /* `FLOAT_TYPE_SIZE'
kono
parents:
diff changeset
334
kono
parents:
diff changeset
335 A C expression for the size in bits of the type `float' on the
kono
parents:
diff changeset
336 target machine. If you don't define this, the default is one word. */
kono
parents:
diff changeset
337 #define FLOAT_TYPE_SIZE 32
kono
parents:
diff changeset
338
kono
parents:
diff changeset
339 /* `DOUBLE_TYPE_SIZE'
kono
parents:
diff changeset
340
kono
parents:
diff changeset
341 A C expression for the size in bits of the type `double' on the
kono
parents:
diff changeset
342 target machine. If you don't define this, the default is two
kono
parents:
diff changeset
343 words. */
kono
parents:
diff changeset
344 #define DOUBLE_TYPE_SIZE 64
kono
parents:
diff changeset
345
kono
parents:
diff changeset
346 /* `LONG_DOUBLE_TYPE_SIZE'
kono
parents:
diff changeset
347
kono
parents:
diff changeset
348 A C expression for the size in bits of the type `long double' on
kono
parents:
diff changeset
349 the target machine. If you don't define this, the default is two
kono
parents:
diff changeset
350 words. */
kono
parents:
diff changeset
351 #define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
kono
parents:
diff changeset
352
kono
parents:
diff changeset
353 /* `WIDEST_HARDWARE_FP_SIZE'
kono
parents:
diff changeset
354
kono
parents:
diff changeset
355 A C expression for the size in bits of the widest floating-point
kono
parents:
diff changeset
356 format supported by the hardware. If you define this macro, you
kono
parents:
diff changeset
357 must specify a value less than or equal to the value of
kono
parents:
diff changeset
358 `LONG_DOUBLE_TYPE_SIZE'. If you do not define this macro, the
kono
parents:
diff changeset
359 value of `LONG_DOUBLE_TYPE_SIZE' is the default. */
kono
parents:
diff changeset
360
kono
parents:
diff changeset
361 /* `DEFAULT_SIGNED_CHAR'
kono
parents:
diff changeset
362
kono
parents:
diff changeset
363 An expression whose value is 1 or 0, according to whether the type
kono
parents:
diff changeset
364 `char' should be signed or unsigned by default. The user can
kono
parents:
diff changeset
365 always override this default with the options `-fsigned-char' and
kono
parents:
diff changeset
366 `-funsigned-char'. */
kono
parents:
diff changeset
367 #define DEFAULT_SIGNED_CHAR 0
kono
parents:
diff changeset
368
kono
parents:
diff changeset
369 /* `SIZE_TYPE'
kono
parents:
diff changeset
370
kono
parents:
diff changeset
371 A C expression for a string describing the name of the data type to
kono
parents:
diff changeset
372 use for size values. The typedef name `size_t' is defined using
kono
parents:
diff changeset
373 the contents of the string.
kono
parents:
diff changeset
374
kono
parents:
diff changeset
375 The string can contain more than one keyword. If so, separate them
kono
parents:
diff changeset
376 with spaces, and write first any length keyword, then `unsigned' if
kono
parents:
diff changeset
377 appropriate, and finally `int'. The string must exactly match one
kono
parents:
diff changeset
378 of the data type names defined in the function
kono
parents:
diff changeset
379 `init_decl_processing' in the file `c-decl.c'. You may not omit
kono
parents:
diff changeset
380 `int' or change the order--that would cause the compiler to crash
kono
parents:
diff changeset
381 on startup.
kono
parents:
diff changeset
382
kono
parents:
diff changeset
383 If you don't define this macro, the default is `"long unsigned
kono
parents:
diff changeset
384 int"'. */
kono
parents:
diff changeset
385 #define SIZE_TYPE "unsigned int"
kono
parents:
diff changeset
386
kono
parents:
diff changeset
387 /* `PTRDIFF_TYPE'
kono
parents:
diff changeset
388
kono
parents:
diff changeset
389 A C expression for a string describing the name of the data type to
kono
parents:
diff changeset
390 use for the result of subtracting two pointers. The typedef name
kono
parents:
diff changeset
391 `ptrdiff_t' is defined using the contents of the string. See
kono
parents:
diff changeset
392 `SIZE_TYPE' above for more information.
kono
parents:
diff changeset
393
kono
parents:
diff changeset
394 If you don't define this macro, the default is `"long int"'. */
kono
parents:
diff changeset
395 #define PTRDIFF_TYPE "long int"
kono
parents:
diff changeset
396
kono
parents:
diff changeset
397 /* Newlib uses the unsigned type corresponding to ptrdiff_t for
kono
parents:
diff changeset
398 uintptr_t; this is the same as size_t for most newlib-using
kono
parents:
diff changeset
399 targets, but not for us. */
kono
parents:
diff changeset
400 #define UINTPTR_TYPE "long unsigned int"
kono
parents:
diff changeset
401
kono
parents:
diff changeset
402 /* `WCHAR_TYPE'
kono
parents:
diff changeset
403
kono
parents:
diff changeset
404 A C expression for a string describing the name of the data type to
kono
parents:
diff changeset
405 use for wide characters. The typedef name `wchar_t' is defined
kono
parents:
diff changeset
406 using the contents of the string. See `SIZE_TYPE' above for more
kono
parents:
diff changeset
407 information.
kono
parents:
diff changeset
408
kono
parents:
diff changeset
409 If you don't define this macro, the default is `"int"'. */
kono
parents:
diff changeset
410 #define WCHAR_TYPE "short int"
kono
parents:
diff changeset
411
kono
parents:
diff changeset
412 /* `WCHAR_TYPE_SIZE'
kono
parents:
diff changeset
413
kono
parents:
diff changeset
414 A C expression for the size in bits of the data type for wide
kono
parents:
diff changeset
415 characters. This is used in `cpp', which cannot make use of
kono
parents:
diff changeset
416 `WCHAR_TYPE'. */
kono
parents:
diff changeset
417 #define WCHAR_TYPE_SIZE 16
kono
parents:
diff changeset
418
kono
parents:
diff changeset
419 /* Register Usage
kono
parents:
diff changeset
420
kono
parents:
diff changeset
421 This section explains how to describe what registers the target
kono
parents:
diff changeset
422 machine has, and how (in general) they can be used. */
kono
parents:
diff changeset
423
kono
parents:
diff changeset
424 /* `FIRST_PSEUDO_REGISTER'
kono
parents:
diff changeset
425
kono
parents:
diff changeset
426 Number of actual hardware registers.
kono
parents:
diff changeset
427 The hardware registers are assigned numbers for the compiler
kono
parents:
diff changeset
428 from 0 to just below FIRST_PSEUDO_REGISTER.
kono
parents:
diff changeset
429 All registers that the compiler knows about must be given numbers,
kono
parents:
diff changeset
430 even those that are not normally considered general registers.
kono
parents:
diff changeset
431
kono
parents:
diff changeset
432 Register 51 is used as the argument pointer register.
kono
parents:
diff changeset
433 Register 52 is used as the soft frame pointer register. */
kono
parents:
diff changeset
434 #define FIRST_PSEUDO_REGISTER 53
kono
parents:
diff changeset
435
kono
parents:
diff changeset
436 #define RETURN_REGNUM 1
kono
parents:
diff changeset
437 #define PROLOGUE_TMP_REGNUM 9
kono
parents:
diff changeset
438 #define LINK_REGNUM 21
kono
parents:
diff changeset
439 #define GP_LAST_REGNUM 31
kono
parents:
diff changeset
440 #define GP_REGISTER_P(REGNO) \
kono
parents:
diff changeset
441 (((unsigned) (REGNO)) <= GP_LAST_REGNUM)
kono
parents:
diff changeset
442
kono
parents:
diff changeset
443 #define MDB_REGNUM 32
kono
parents:
diff changeset
444 #define MDC_REGNUM 33
kono
parents:
diff changeset
445
kono
parents:
diff changeset
446 #define FP_FIRST_REGNUM 34
kono
parents:
diff changeset
447 #define FP_LAST_REGNUM 49
kono
parents:
diff changeset
448 #define FP_RETURN_REGNUM (FP_FIRST_REGNUM + 1)
kono
parents:
diff changeset
449 #define FP_REGISTER_P(REGNO) \
kono
parents:
diff changeset
450 (FP_FIRST_REGNUM <= (REGNO) && (REGNO) <= FP_LAST_REGNUM)
kono
parents:
diff changeset
451
kono
parents:
diff changeset
452 #define FLAGS_REGNUM 50
kono
parents:
diff changeset
453
kono
parents:
diff changeset
454 /* `FIXED_REGISTERS'
kono
parents:
diff changeset
455
kono
parents:
diff changeset
456 An initializer that says which registers are used for fixed
kono
parents:
diff changeset
457 purposes all throughout the compiled code and are therefore not
kono
parents:
diff changeset
458 available for general allocation. These would include the stack
kono
parents:
diff changeset
459 pointer, the frame pointer (except on machines where that can be
kono
parents:
diff changeset
460 used as a general register when no frame pointer is needed), the
kono
parents:
diff changeset
461 program counter on machines where that is considered one of the
kono
parents:
diff changeset
462 addressable registers, and any other numbered register with a
kono
parents:
diff changeset
463 standard use.
kono
parents:
diff changeset
464
kono
parents:
diff changeset
465 This information is expressed as a sequence of numbers, separated
kono
parents:
diff changeset
466 by commas and surrounded by braces. The Nth number is 1 if
kono
parents:
diff changeset
467 register N is fixed, 0 otherwise.
kono
parents:
diff changeset
468
kono
parents:
diff changeset
469 The table initialized from this macro, and the table initialized by
kono
parents:
diff changeset
470 the following one, may be overridden at run time either
kono
parents:
diff changeset
471 automatically, by the actions of the macro
kono
parents:
diff changeset
472 `CONDITIONAL_REGISTER_USAGE', or by the user with the command
kono
parents:
diff changeset
473 options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'.
kono
parents:
diff changeset
474
kono
parents:
diff changeset
475 r0 and f0 are immutable registers hardwired to 0.
kono
parents:
diff changeset
476 r21 is the link register used for procedure linkage.
kono
parents:
diff changeset
477 r23 is the stack pointer register.
kono
parents:
diff changeset
478 r29 and r30 hold the interrupt context.
kono
parents:
diff changeset
479 mdc is a read-only register because the writemdc instruction
kono
parents:
diff changeset
480 terminates all the operations of the EAM on the GR6. */
kono
parents:
diff changeset
481 #define FIXED_REGISTERS \
kono
parents:
diff changeset
482 { 1, 0, 0, 0, 0, 0, 0, 0, /* r0 .. r7 */ \
kono
parents:
diff changeset
483 0, 0, 0, 0, 0, 0, 0, 0, /* r8 .. r15 */ \
kono
parents:
diff changeset
484 0, 0, 0, 0, 0, 1, 0, 1, /* r16 .. r23 */ \
kono
parents:
diff changeset
485 0, 0, 0, 0, 0, 1, 1, 0, /* r24 .. r31 */ \
kono
parents:
diff changeset
486 0, 1, /* mdb, mdc */ \
kono
parents:
diff changeset
487 1, 0, 0, 0, 0, 0, 0, 0, /* f0 .. f7 */ \
kono
parents:
diff changeset
488 0, 0, 0, 0, 0, 0, 0, 0, /* f8 .. f15 */ \
kono
parents:
diff changeset
489 1, 1, 1 } /* flags, arg, frame */
kono
parents:
diff changeset
490
kono
parents:
diff changeset
491 /* `CALL_USED_REGISTERS'
kono
parents:
diff changeset
492
kono
parents:
diff changeset
493 Like `FIXED_REGISTERS' but has 1 for each register that is
kono
parents:
diff changeset
494 clobbered (in general) by function calls as well as for fixed
kono
parents:
diff changeset
495 registers. This macro therefore identifies the registers that are
kono
parents:
diff changeset
496 not available for general allocation of values that must live
kono
parents:
diff changeset
497 across function calls.
kono
parents:
diff changeset
498
kono
parents:
diff changeset
499 If a register has 0 in `CALL_USED_REGISTERS', the compiler
kono
parents:
diff changeset
500 automatically saves it on function entry and restores it on
kono
parents:
diff changeset
501 function exit, if the register is used within the function. */
kono
parents:
diff changeset
502 #define CALL_USED_REGISTERS \
kono
parents:
diff changeset
503 { 1, 1, 1, 1, 1, 1, 1, 1, /* r0 .. r7 */ \
kono
parents:
diff changeset
504 1, 1, 1, 0, 0, 0, 0, 0, /* r8 .. r15 */ \
kono
parents:
diff changeset
505 0, 0, 0, 0, 1, 1, 0, 1, /* r16 .. r23 */ \
kono
parents:
diff changeset
506 1, 1, 1, 1, 1, 1, 1, 1, /* r24 .. r31 */ \
kono
parents:
diff changeset
507 1, 1, /* mdb, mdc */ \
kono
parents:
diff changeset
508 1, 1, 1, 1, 1, 1, 1, 1, /* f0 .. f7 */ \
kono
parents:
diff changeset
509 1, 0, 0, 0, 0, 0, 0, 0, /* f8 .. f15 */ \
kono
parents:
diff changeset
510 1, 1, 1 } /* flags, arg, frame */
kono
parents:
diff changeset
511
kono
parents:
diff changeset
512 /* Like `CALL_USED_REGISTERS' except this macro doesn't require that
kono
parents:
diff changeset
513 the entire set of `FIXED_REGISTERS' be included.
kono
parents:
diff changeset
514 (`CALL_USED_REGISTERS' must be a superset of `FIXED_REGISTERS').
kono
parents:
diff changeset
515 This macro is optional. If not specified, it defaults to the value
kono
parents:
diff changeset
516 of `CALL_USED_REGISTERS'. */
kono
parents:
diff changeset
517 #define CALL_REALLY_USED_REGISTERS \
kono
parents:
diff changeset
518 { 0, 1, 1, 1, 1, 1, 1, 1, /* r0 .. r7 */ \
kono
parents:
diff changeset
519 1, 1, 1, 0, 0, 0, 0, 0, /* r8 .. r15 */ \
kono
parents:
diff changeset
520 0, 0, 0, 0, 1, 0, 0, 0, /* r16 .. r23 */ \
kono
parents:
diff changeset
521 1, 1, 1, 1, 1, 0, 0, 1, /* r24 .. r31 */ \
kono
parents:
diff changeset
522 1, 1, /* mdb, mdc */ \
kono
parents:
diff changeset
523 1, 1, 1, 1, 1, 1, 1, 1, /* f0 .. f7 */ \
kono
parents:
diff changeset
524 1, 0, 0, 0, 0, 0, 0, 0, /* f8 .. f15 */ \
kono
parents:
diff changeset
525 1, 0, 0 } /* flags, arg, frame */
kono
parents:
diff changeset
526
kono
parents:
diff changeset
527 /* `REG_ALLOC_ORDER'
kono
parents:
diff changeset
528
kono
parents:
diff changeset
529 If defined, an initializer for a vector of integers, containing the
kono
parents:
diff changeset
530 numbers of hard registers in the order in which GCC should prefer
kono
parents:
diff changeset
531 to use them (from most preferred to least).
kono
parents:
diff changeset
532
kono
parents:
diff changeset
533 If this macro is not defined, registers are used lowest numbered
kono
parents:
diff changeset
534 first (all else being equal). */
kono
parents:
diff changeset
535 #define REG_ALLOC_ORDER \
kono
parents:
diff changeset
536 { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, /* r10 .. r1 */ \
kono
parents:
diff changeset
537 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, /* r11 .. r20 */ \
kono
parents:
diff changeset
538 22, /* fp */ \
kono
parents:
diff changeset
539 24, 25, 26, 27, 28, /* r24 .. r28 */ \
kono
parents:
diff changeset
540 31, /* r31 */ \
kono
parents:
diff changeset
541 32, 33, /* mdb, mdc */ \
kono
parents:
diff changeset
542 42, 41, 40, 39, 38, 37, 36, 35, /* f8 .. f1 */ \
kono
parents:
diff changeset
543 43, 44, 45, 46, 47, 48, 49, /* f9 .. f15 */ \
kono
parents:
diff changeset
544 21, 23, /* lr, sp */ \
kono
parents:
diff changeset
545 29, 30, /* r29, r30 */ \
kono
parents:
diff changeset
546 50, 51, 52, /* flags, arg, frame */ \
kono
parents:
diff changeset
547 0, 34 } /* r0, f0 */
kono
parents:
diff changeset
548
kono
parents:
diff changeset
549 /* `HARD_REGNO_RENAME_OK (OLD_REG, NEW_REG)'
kono
parents:
diff changeset
550
kono
parents:
diff changeset
551 A C expression which is nonzero if hard register NEW_REG can be
kono
parents:
diff changeset
552 considered for use as a rename register for hard register OLD_REG. */
kono
parents:
diff changeset
553 #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \
kono
parents:
diff changeset
554 visium_hard_regno_rename_ok (OLD_REG, NEW_REG)
kono
parents:
diff changeset
555
kono
parents:
diff changeset
556 /* Register Classes
kono
parents:
diff changeset
557
kono
parents:
diff changeset
558 On many machines, the numbered registers are not all equivalent.
kono
parents:
diff changeset
559 For example, certain registers may not be allowed for indexed
kono
parents:
diff changeset
560 addressing; certain registers may not be allowed in some
kono
parents:
diff changeset
561 instructions. These machine restrictions are described to the
kono
parents:
diff changeset
562 compiler using "register classes".
kono
parents:
diff changeset
563
kono
parents:
diff changeset
564 `enum reg_class'
kono
parents:
diff changeset
565
kono
parents:
diff changeset
566 An enumeral type that must be defined with all the register class
kono
parents:
diff changeset
567 names as enumeral values. `NO_REGS' must be first. `ALL_REGS'
kono
parents:
diff changeset
568 must be the last register class, followed by one more enumeral
kono
parents:
diff changeset
569 value, `LIM_REG_CLASSES', which is not a register class but rather
kono
parents:
diff changeset
570 tells how many classes there are.
kono
parents:
diff changeset
571
kono
parents:
diff changeset
572 Each register class has a number, which is the value of casting the
kono
parents:
diff changeset
573 class name to type `int'. The number serves as an index in many of
kono
parents:
diff changeset
574 the tables described below. */
kono
parents:
diff changeset
575
kono
parents:
diff changeset
576 enum reg_class
kono
parents:
diff changeset
577 {
kono
parents:
diff changeset
578 NO_REGS,
kono
parents:
diff changeset
579 MDB,
kono
parents:
diff changeset
580 MDC,
kono
parents:
diff changeset
581 FP_REGS,
kono
parents:
diff changeset
582 FLAGS,
kono
parents:
diff changeset
583 R1,
kono
parents:
diff changeset
584 R2,
kono
parents:
diff changeset
585 R3,
kono
parents:
diff changeset
586 SIBCALL_REGS,
kono
parents:
diff changeset
587 LOW_REGS,
kono
parents:
diff changeset
588 GENERAL_REGS,
kono
parents:
diff changeset
589 ALL_REGS,
kono
parents:
diff changeset
590 LIM_REG_CLASSES
kono
parents:
diff changeset
591 };
kono
parents:
diff changeset
592
kono
parents:
diff changeset
593 /* `N_REG_CLASSES'
kono
parents:
diff changeset
594
kono
parents:
diff changeset
595 The number of distinct register classes, defined as follows. */
kono
parents:
diff changeset
596 #define N_REG_CLASSES (int) LIM_REG_CLASSES
kono
parents:
diff changeset
597
kono
parents:
diff changeset
598 /* `REG_CLASS_NAMES'
kono
parents:
diff changeset
599
kono
parents:
diff changeset
600 An initializer containing the names of the register classes as C
kono
parents:
diff changeset
601 string constants. These names are used in writing some of the
kono
parents:
diff changeset
602 debugging dumps. */
kono
parents:
diff changeset
603 #define REG_CLASS_NAMES \
kono
parents:
diff changeset
604 {"NO_REGS", "MDB", "MDC", "FP_REGS", "FLAGS", "R1", "R2", "R3", \
kono
parents:
diff changeset
605 "SIBCALL_REGS", "LOW_REGS", "GENERAL_REGS", "ALL_REGS"}
kono
parents:
diff changeset
606
kono
parents:
diff changeset
607 /* `REG_CLASS_CONTENTS'
kono
parents:
diff changeset
608
kono
parents:
diff changeset
609 An initializer containing the contents of the register classes, as
kono
parents:
diff changeset
610 integers which are bit masks. The Nth integer specifies the
kono
parents:
diff changeset
611 contents of class N. The way the integer MASK is interpreted is
kono
parents:
diff changeset
612 that register R is in the class if `MASK & (1 << R)' is 1.
kono
parents:
diff changeset
613
kono
parents:
diff changeset
614 When the machine has more than 32 registers, an integer does not
kono
parents:
diff changeset
615 suffice. Then the integers are replaced by sub-initializers,
kono
parents:
diff changeset
616 braced groupings containing several integers. Each sub-initializer
kono
parents:
diff changeset
617 must be suitable as an initializer for the type `HARD_REG_SET'
kono
parents:
diff changeset
618 which is defined in `hard-reg-set.h'. */
kono
parents:
diff changeset
619 #define REG_CLASS_CONTENTS { \
kono
parents:
diff changeset
620 {0x00000000, 0x00000000}, /* NO_REGS */ \
kono
parents:
diff changeset
621 {0x00000000, 0x00000001}, /* MDB */ \
kono
parents:
diff changeset
622 {0x00000000, 0x00000002}, /* MDC */ \
kono
parents:
diff changeset
623 {0x00000000, 0x0003fffc}, /* FP_REGS */ \
kono
parents:
diff changeset
624 {0x00000000, 0x00040000}, /* FLAGS */ \
kono
parents:
diff changeset
625 {0x00000002, 0x00000000}, /* R1 */ \
kono
parents:
diff changeset
626 {0x00000004, 0x00000000}, /* R2 */ \
kono
parents:
diff changeset
627 {0x00000008, 0x00000000}, /* R3 */ \
kono
parents:
diff changeset
628 {0x000005ff, 0x00000000}, /* SIBCALL_REGS */ \
kono
parents:
diff changeset
629 {0x1fffffff, 0x00000000}, /* LOW_REGS */ \
kono
parents:
diff changeset
630 {0xffffffff, 0x00180000}, /* GENERAL_REGS */ \
kono
parents:
diff changeset
631 {0xffffffff, 0x001fffff}} /* ALL_REGS */
kono
parents:
diff changeset
632
kono
parents:
diff changeset
633 /* `REGNO_REG_CLASS (REGNO)'
kono
parents:
diff changeset
634
kono
parents:
diff changeset
635 A C expression whose value is a register class containing hard
kono
parents:
diff changeset
636 register REGNO. In general there is more than one such class;
kono
parents:
diff changeset
637 choose a class which is "minimal", meaning that no smaller class
kono
parents:
diff changeset
638 also contains the register. */
kono
parents:
diff changeset
639 #define REGNO_REG_CLASS(REGNO) \
kono
parents:
diff changeset
640 ((REGNO) == MDB_REGNUM ? MDB : \
kono
parents:
diff changeset
641 (REGNO) == MDC_REGNUM ? MDC : \
kono
parents:
diff changeset
642 FP_REGISTER_P (REGNO) ? FP_REGS : \
kono
parents:
diff changeset
643 (REGNO) == FLAGS_REGNUM ? FLAGS : \
kono
parents:
diff changeset
644 (REGNO) == 1 ? R1 : \
kono
parents:
diff changeset
645 (REGNO) == 2 ? R2 : \
kono
parents:
diff changeset
646 (REGNO) == 3 ? R3 : \
kono
parents:
diff changeset
647 (REGNO) <= 8 || (REGNO) == 10 ? SIBCALL_REGS : \
kono
parents:
diff changeset
648 (REGNO) <= 28 ? LOW_REGS : \
kono
parents:
diff changeset
649 GENERAL_REGS)
kono
parents:
diff changeset
650
kono
parents:
diff changeset
651 /* `BASE_REG_CLASS'
kono
parents:
diff changeset
652
kono
parents:
diff changeset
653 A macro whose definition is the name of the class to which a valid
kono
parents:
diff changeset
654 base register must belong. A base register is one used in an
kono
parents:
diff changeset
655 address which is the register value plus a displacement. */
kono
parents:
diff changeset
656 #define BASE_REG_CLASS GENERAL_REGS
kono
parents:
diff changeset
657
kono
parents:
diff changeset
658 #define BASE_REGISTER_P(REGNO) \
kono
parents:
diff changeset
659 (GP_REGISTER_P (REGNO) \
kono
parents:
diff changeset
660 || (REGNO) == ARG_POINTER_REGNUM \
kono
parents:
diff changeset
661 || (REGNO) == FRAME_POINTER_REGNUM)
kono
parents:
diff changeset
662
kono
parents:
diff changeset
663 /* `INDEX_REG_CLASS'
kono
parents:
diff changeset
664
kono
parents:
diff changeset
665 A macro whose definition is the name of the class to which a valid
kono
parents:
diff changeset
666 index register must belong. An index register is one used in an
kono
parents:
diff changeset
667 address where its value is either multiplied by a scale factor or
kono
parents:
diff changeset
668 added to another register (as well as added to a displacement). */
kono
parents:
diff changeset
669 #define INDEX_REG_CLASS NO_REGS
kono
parents:
diff changeset
670
kono
parents:
diff changeset
671 /* `REGNO_OK_FOR_BASE_P (NUM)'
kono
parents:
diff changeset
672
kono
parents:
diff changeset
673 A C expression which is nonzero if register number NUM is suitable
kono
parents:
diff changeset
674 for use as a base register in operand addresses. It may be either
kono
parents:
diff changeset
675 a suitable hard register or a pseudo register that has been
kono
parents:
diff changeset
676 allocated such a hard register. */
kono
parents:
diff changeset
677 #define REGNO_OK_FOR_BASE_P(REGNO) \
kono
parents:
diff changeset
678 (BASE_REGISTER_P (REGNO) || BASE_REGISTER_P ((unsigned)reg_renumber[REGNO]))
kono
parents:
diff changeset
679
kono
parents:
diff changeset
680 /* `REGNO_OK_FOR_INDEX_P (NUM)'
kono
parents:
diff changeset
681
kono
parents:
diff changeset
682 A C expression which is nonzero if register number NUM is suitable
kono
parents:
diff changeset
683 for use as an index register in operand addresses. It may be
kono
parents:
diff changeset
684 either a suitable hard register or a pseudo register that has been
kono
parents:
diff changeset
685 allocated such a hard register.
kono
parents:
diff changeset
686
kono
parents:
diff changeset
687 The difference between an index register and a base register is
kono
parents:
diff changeset
688 that the index register may be scaled. If an address involves the
kono
parents:
diff changeset
689 sum of two registers, neither one of them scaled, then either one
kono
parents:
diff changeset
690 may be labeled the "base" and the other the "index"; but whichever
kono
parents:
diff changeset
691 labeling is used must fit the machine's constraints of which
kono
parents:
diff changeset
692 registers may serve in each capacity. The compiler will try both
kono
parents:
diff changeset
693 labelings, looking for one that is valid, and will reload one or
kono
parents:
diff changeset
694 both registers only if neither labeling works. */
kono
parents:
diff changeset
695 #define REGNO_OK_FOR_INDEX_P(REGNO) 0
kono
parents:
diff changeset
696
kono
parents:
diff changeset
697 /* `PREFERRED_RELOAD_CLASS (X, CLASS)'
kono
parents:
diff changeset
698
kono
parents:
diff changeset
699 A C expression that places additional restrictions on the register
kono
parents:
diff changeset
700 class to use when it is necessary to copy value X into a register
kono
parents:
diff changeset
701 in class CLASS. The value is a register class; perhaps CLASS, or
kono
parents:
diff changeset
702 perhaps another, smaller class.
kono
parents:
diff changeset
703
kono
parents:
diff changeset
704 Sometimes returning a more restrictive class makes better code.
kono
parents:
diff changeset
705 For example, on the 68000, when X is an integer constant that is in
kono
parents:
diff changeset
706 range for a `moveq' instruction, the value of this macro is always
kono
parents:
diff changeset
707 `DATA_REGS' as long as CLASS includes the data registers.
kono
parents:
diff changeset
708 Requiring a data register guarantees that a `moveq' will be used.
kono
parents:
diff changeset
709
kono
parents:
diff changeset
710 If X is a `const_double', by returning `NO_REGS' you can force X
kono
parents:
diff changeset
711 into a memory constant. This is useful on certain machines where
kono
parents:
diff changeset
712 immediate floating values cannot be loaded into certain kinds of
kono
parents:
diff changeset
713 registers. */
kono
parents:
diff changeset
714 #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
kono
parents:
diff changeset
715
kono
parents:
diff changeset
716 #define CLASS_MAX_NREGS(CLASS, MODE) \
kono
parents:
diff changeset
717 ((CLASS) == MDB ? \
kono
parents:
diff changeset
718 ((GET_MODE_SIZE (MODE) + 2 * UNITS_PER_WORD - 1) / (2 * UNITS_PER_WORD)) \
kono
parents:
diff changeset
719 : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
kono
parents:
diff changeset
720
kono
parents:
diff changeset
721 /* Stack Layout and Calling Conventions
kono
parents:
diff changeset
722
kono
parents:
diff changeset
723 Basic Stack Layout
kono
parents:
diff changeset
724
kono
parents:
diff changeset
725 `STACK_GROWS_DOWNWARD'
kono
parents:
diff changeset
726 Define this macro if pushing a word onto the stack moves the stack
kono
parents:
diff changeset
727 pointer to a smaller address. */
kono
parents:
diff changeset
728 #define STACK_GROWS_DOWNWARD 1
kono
parents:
diff changeset
729
kono
parents:
diff changeset
730 /* `FIRST_PARM_OFFSET (FUNDECL)'
kono
parents:
diff changeset
731
kono
parents:
diff changeset
732 Offset from the argument pointer register to the first argument's
kono
parents:
diff changeset
733 address. On some machines it may depend on the data type of the
kono
parents:
diff changeset
734 function.
kono
parents:
diff changeset
735
kono
parents:
diff changeset
736 If `ARGS_GROW_DOWNWARD', this is the offset to the location above
kono
parents:
diff changeset
737 the first argument's address. */
kono
parents:
diff changeset
738 #define FIRST_PARM_OFFSET(FNDECL) 0
kono
parents:
diff changeset
739
kono
parents:
diff changeset
740 /* `DYNAMIC_CHAIN_ADDRESS (FRAMEADDR)'
kono
parents:
diff changeset
741
kono
parents:
diff changeset
742 A C expression whose value is RTL representing the address in a
kono
parents:
diff changeset
743 stack frame where the pointer to the caller's frame is stored.
kono
parents:
diff changeset
744 Assume that FRAMEADDR is an RTL expression for the address of the
kono
parents:
diff changeset
745 stack frame itself.
kono
parents:
diff changeset
746
kono
parents:
diff changeset
747 If you don't define this macro, the default is to return the value
kono
parents:
diff changeset
748 of FRAMEADDR--that is, the stack frame address is also the address
kono
parents:
diff changeset
749 of the stack word that points to the previous frame. */
kono
parents:
diff changeset
750 #define DYNAMIC_CHAIN_ADDRESS(FRAMEADDR) \
kono
parents:
diff changeset
751 visium_dynamic_chain_address (FRAMEADDR)
kono
parents:
diff changeset
752
kono
parents:
diff changeset
753 /* `RETURN_ADDR_RTX (COUNT, FRAMEADDR)'
kono
parents:
diff changeset
754
kono
parents:
diff changeset
755 A C expression whose value is RTL representing the value of the
kono
parents:
diff changeset
756 return address for the frame COUNT steps up from the current frame,
kono
parents:
diff changeset
757 after the prologue. FRAMEADDR is the frame pointer of the COUNT
kono
parents:
diff changeset
758 frame, or the frame pointer of the COUNT - 1 frame if
kono
parents:
diff changeset
759 `RETURN_ADDR_IN_PREVIOUS_FRAME' is defined.
kono
parents:
diff changeset
760
kono
parents:
diff changeset
761 The value of the expression must always be the correct address when
kono
parents:
diff changeset
762 COUNT is zero, but may be `NULL_RTX' if there is not way to
kono
parents:
diff changeset
763 determine the return address of other frames. */
kono
parents:
diff changeset
764 #define RETURN_ADDR_RTX(COUNT,FRAMEADDR) \
kono
parents:
diff changeset
765 visium_return_addr_rtx (COUNT, FRAMEADDR)
kono
parents:
diff changeset
766
kono
parents:
diff changeset
767 /* Exception Handling
kono
parents:
diff changeset
768
kono
parents:
diff changeset
769 `EH_RETURN_DATA_REGNO'
kono
parents:
diff changeset
770
kono
parents:
diff changeset
771 A C expression whose value is the Nth register number used for data
kono
parents:
diff changeset
772 by exception handlers or INVALID_REGNUM if fewer than N registers
kono
parents:
diff changeset
773 are available.
kono
parents:
diff changeset
774
kono
parents:
diff changeset
775 The exception handling library routines communicate with the
kono
parents:
diff changeset
776 exception handlers via a set of agreed upon registers. */
kono
parents:
diff changeset
777 #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 11 : INVALID_REGNUM)
kono
parents:
diff changeset
778 #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (SImode, 8)
kono
parents:
diff changeset
779 #define EH_RETURN_HANDLER_RTX visium_eh_return_handler_rtx ()
kono
parents:
diff changeset
780
kono
parents:
diff changeset
781 /* Registers That Address the Stack Frame
kono
parents:
diff changeset
782
kono
parents:
diff changeset
783 This discusses registers that address the stack frame.
kono
parents:
diff changeset
784
kono
parents:
diff changeset
785 `STACK_POINTER_REGNUM'
kono
parents:
diff changeset
786
kono
parents:
diff changeset
787 The register number of the stack pointer register, which must also
kono
parents:
diff changeset
788 be a fixed register according to `FIXED_REGISTERS'. On most
kono
parents:
diff changeset
789 machines, the hardware determines which register this is. */
kono
parents:
diff changeset
790 #define STACK_POINTER_REGNUM 23
kono
parents:
diff changeset
791
kono
parents:
diff changeset
792 /* `FRAME_POINTER_REGNUM'
kono
parents:
diff changeset
793
kono
parents:
diff changeset
794 The register number of the frame pointer register, which is used to
kono
parents:
diff changeset
795 access automatic variables in the stack frame. On some machines,
kono
parents:
diff changeset
796 the hardware determines which register this is. On other machines,
kono
parents:
diff changeset
797 you can choose any register you wish for this purpose. */
kono
parents:
diff changeset
798 #define FRAME_POINTER_REGNUM 52
kono
parents:
diff changeset
799
kono
parents:
diff changeset
800 /* `HARD_FRAME_POINTER_REGNUM'
kono
parents:
diff changeset
801
kono
parents:
diff changeset
802 On some machines the offset between the frame pointer and starting
kono
parents:
diff changeset
803 offset of the automatic variables is not known until after register
kono
parents:
diff changeset
804 allocation has been done (for example, because the saved registers
kono
parents:
diff changeset
805 are between these two locations). On those machines, define
kono
parents:
diff changeset
806 `FRAME_POINTER_REGNUM' the number of a special, fixed register to
kono
parents:
diff changeset
807 be used internally until the offset is known, and define
kono
parents:
diff changeset
808 `HARD_FRAME_POINTER_REGNUM' to be the actual hard register number
kono
parents:
diff changeset
809 used for the frame pointer. */
kono
parents:
diff changeset
810 #define HARD_FRAME_POINTER_REGNUM 22
kono
parents:
diff changeset
811
kono
parents:
diff changeset
812 /* `ARG_POINTER_REGNUM'
kono
parents:
diff changeset
813
kono
parents:
diff changeset
814 The register number of the arg pointer register, which is used to
kono
parents:
diff changeset
815 access the function's argument list. On some machines, this is the
kono
parents:
diff changeset
816 same as the frame pointer register. On some machines, the hardware
kono
parents:
diff changeset
817 determines which register this is. On other machines, you can
kono
parents:
diff changeset
818 choose any register you wish for this purpose. If this is not the
kono
parents:
diff changeset
819 same register as the frame pointer register, then you must mark it
kono
parents:
diff changeset
820 as a fixed register according to `FIXED_REGISTERS', or arrange to
kono
parents:
diff changeset
821 be able to eliminate it (*note Elimination::.). */
kono
parents:
diff changeset
822 #define ARG_POINTER_REGNUM 51
kono
parents:
diff changeset
823
kono
parents:
diff changeset
824 /* `STATIC_CHAIN_REGNUM'
kono
parents:
diff changeset
825 `STATIC_CHAIN_INCOMING_REGNUM'
kono
parents:
diff changeset
826
kono
parents:
diff changeset
827 Register numbers used for passing a function's static chain
kono
parents:
diff changeset
828 pointer. If register windows are used, the register number as seen
kono
parents:
diff changeset
829 by the called function is `STATIC_CHAIN_INCOMING_REGNUM', while the
kono
parents:
diff changeset
830 register number as seen by the calling function is
kono
parents:
diff changeset
831 `STATIC_CHAIN_REGNUM'. If these registers are the same,
kono
parents:
diff changeset
832 `STATIC_CHAIN_INCOMING_REGNUM' need not be defined.
kono
parents:
diff changeset
833
kono
parents:
diff changeset
834 The static chain register need not be a fixed register.
kono
parents:
diff changeset
835
kono
parents:
diff changeset
836 If the static chain is passed in memory, these macros should not be
kono
parents:
diff changeset
837 defined; instead, the next two macros should be defined. */
kono
parents:
diff changeset
838 #define STATIC_CHAIN_REGNUM 20
kono
parents:
diff changeset
839
kono
parents:
diff changeset
840 /* `ELIMINABLE_REGS'
kono
parents:
diff changeset
841
kono
parents:
diff changeset
842 If defined, this macro specifies a table of register pairs used to
kono
parents:
diff changeset
843 eliminate unneeded registers that point into the stack frame. If
kono
parents:
diff changeset
844 it is not defined, the only elimination attempted by the compiler
kono
parents:
diff changeset
845 is to replace references to the frame pointer with references to
kono
parents:
diff changeset
846 the stack pointer.
kono
parents:
diff changeset
847
kono
parents:
diff changeset
848 The definition of this macro is a list of structure
kono
parents:
diff changeset
849 initializations, each of which specifies an original and
kono
parents:
diff changeset
850 replacement register.
kono
parents:
diff changeset
851
kono
parents:
diff changeset
852 On some machines, the position of the argument pointer is not known
kono
parents:
diff changeset
853 until the compilation is completed. In such a case, a separate
kono
parents:
diff changeset
854 hard register must be used for the argument pointer. This register
kono
parents:
diff changeset
855 can be eliminated by replacing it with either the frame pointer or
kono
parents:
diff changeset
856 the argument pointer, depending on whether or not the frame pointer
kono
parents:
diff changeset
857 has been eliminated.
kono
parents:
diff changeset
858
kono
parents:
diff changeset
859 Note that the elimination of the argument pointer with the stack
kono
parents:
diff changeset
860 pointer is specified first since that is the preferred elimination. */
kono
parents:
diff changeset
861 #define ELIMINABLE_REGS \
kono
parents:
diff changeset
862 {{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
kono
parents:
diff changeset
863 { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
kono
parents:
diff changeset
864 { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
kono
parents:
diff changeset
865 { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
kono
parents:
diff changeset
866
kono
parents:
diff changeset
867 /* `INITIAL_ELIMINATION_OFFSET (FROM-REG, TO-REG, OFFSET-VAR)'
kono
parents:
diff changeset
868
kono
parents:
diff changeset
869 This macro returns the initial difference between the specified pair
kono
parents:
diff changeset
870 of registers. */
kono
parents:
diff changeset
871 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
kono
parents:
diff changeset
872 (OFFSET = visium_initial_elimination_offset (FROM, TO))
kono
parents:
diff changeset
873
kono
parents:
diff changeset
874 /* Passing Function Arguments on the Stack
kono
parents:
diff changeset
875
kono
parents:
diff changeset
876 The macros in this section control how arguments are passed on the
kono
parents:
diff changeset
877 stack. See the following section for other macros that control
kono
parents:
diff changeset
878 passing certain arguments in registers.
kono
parents:
diff changeset
879
kono
parents:
diff changeset
880 Passing Arguments in Registers
kono
parents:
diff changeset
881
kono
parents:
diff changeset
882 This section describes the macros which let you control how various
kono
parents:
diff changeset
883 types of arguments are passed in registers or how they are arranged
kono
parents:
diff changeset
884 in the stack.
kono
parents:
diff changeset
885
kono
parents:
diff changeset
886 Define the general purpose, and floating point registers used for
kono
parents:
diff changeset
887 passing arguments */
kono
parents:
diff changeset
888 #define MAX_ARGS_IN_GP_REGISTERS 8
kono
parents:
diff changeset
889 #define GP_ARG_FIRST 1
kono
parents:
diff changeset
890 #define GP_ARG_LAST (GP_ARG_FIRST + MAX_ARGS_IN_GP_REGISTERS - 1)
kono
parents:
diff changeset
891 #define MAX_ARGS_IN_FP_REGISTERS 8
kono
parents:
diff changeset
892 #define FP_ARG_FIRST (FP_FIRST_REGNUM + 1)
kono
parents:
diff changeset
893 #define FP_ARG_LAST (FP_ARG_FIRST + MAX_ARGS_IN_FP_REGISTERS - 1)
kono
parents:
diff changeset
894
kono
parents:
diff changeset
895 /* Define a data type for recording info about an argument list during the
kono
parents:
diff changeset
896 processing of that argument list. */
kono
parents:
diff changeset
897
kono
parents:
diff changeset
898 struct visium_args
kono
parents:
diff changeset
899 {
kono
parents:
diff changeset
900 /* The count of general registers used */
kono
parents:
diff changeset
901 int grcount;
kono
parents:
diff changeset
902 /* The count of floating registers used */
kono
parents:
diff changeset
903 int frcount;
kono
parents:
diff changeset
904 /* The number of stack words used by named arguments */
kono
parents:
diff changeset
905 int stack_words;
kono
parents:
diff changeset
906 };
kono
parents:
diff changeset
907
kono
parents:
diff changeset
908 /* `CUMULATIVE_ARGS'
kono
parents:
diff changeset
909
kono
parents:
diff changeset
910 A C type for declaring a variable that is used as the first
kono
parents:
diff changeset
911 argument of `FUNCTION_ARG' and other related values. For some
kono
parents:
diff changeset
912 target machines, the type `int' suffices and can hold the number of
kono
parents:
diff changeset
913 bytes of argument so far.
kono
parents:
diff changeset
914
kono
parents:
diff changeset
915 There is no need to record in `CUMULATIVE_ARGS' anything about the
kono
parents:
diff changeset
916 arguments that have been passed on the stack. The compiler has
kono
parents:
diff changeset
917 other variables to keep track of that. For target machines on
kono
parents:
diff changeset
918 which all arguments are passed on the stack, there is no need to
kono
parents:
diff changeset
919 store anything in `CUMULATIVE_ARGS'; however, the data structure
kono
parents:
diff changeset
920 must exist and should not be empty, so use `int'. */
kono
parents:
diff changeset
921 #define CUMULATIVE_ARGS struct visium_args
kono
parents:
diff changeset
922
kono
parents:
diff changeset
923 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS) \
kono
parents:
diff changeset
924 do { \
kono
parents:
diff changeset
925 (CUM).grcount = 0; \
kono
parents:
diff changeset
926 (CUM).frcount = 0; \
kono
parents:
diff changeset
927 (CUM).stack_words = 0; \
kono
parents:
diff changeset
928 } while (0)
kono
parents:
diff changeset
929
kono
parents:
diff changeset
930 /* `FUNCTION_ARG_REGNO_P (REGNO)'
kono
parents:
diff changeset
931
kono
parents:
diff changeset
932 A C expression that is nonzero if REGNO is the number of a hard
kono
parents:
diff changeset
933 register in which function arguments are sometimes passed. This
kono
parents:
diff changeset
934 does *not* include implicit arguments such as the static chain and
kono
parents:
diff changeset
935 the structure-value address. On many machines, no registers can be
kono
parents:
diff changeset
936 used for this purpose since all function arguments are pushed on
kono
parents:
diff changeset
937 the stack. */
kono
parents:
diff changeset
938 #define FUNCTION_ARG_REGNO_P(N) \
kono
parents:
diff changeset
939 ((GP_ARG_FIRST <= (N) && (N) <= GP_ARG_LAST) \
kono
parents:
diff changeset
940 || (TARGET_FPU && FP_ARG_FIRST <= (N) && (N) <= FP_ARG_LAST))
kono
parents:
diff changeset
941
kono
parents:
diff changeset
942 /* `FUNCTION_VALUE_REGNO_P (REGNO)'
kono
parents:
diff changeset
943
kono
parents:
diff changeset
944 A C expression that is nonzero if REGNO is the number of a hard
kono
parents:
diff changeset
945 register in which the values of called function may come back.
kono
parents:
diff changeset
946
kono
parents:
diff changeset
947 A register whose use for returning values is limited to serving as
kono
parents:
diff changeset
948 the second of a pair (for a value of type `double', say) need not
kono
parents:
diff changeset
949 be recognized by this macro. If the machine has register windows,
kono
parents:
diff changeset
950 so that the caller and the called function use different registers
kono
parents:
diff changeset
951 for the return value, this macro should recognize only the caller's
kono
parents:
diff changeset
952 register numbers. */
kono
parents:
diff changeset
953 #define FUNCTION_VALUE_REGNO_P(N) \
kono
parents:
diff changeset
954 ((N) == RETURN_REGNUM || (TARGET_FPU && (N) == FP_RETURN_REGNUM))
kono
parents:
diff changeset
955
kono
parents:
diff changeset
956 /* How Large Values Are Returned
kono
parents:
diff changeset
957
kono
parents:
diff changeset
958 When a function value's mode is `BLKmode' (and in some other
kono
parents:
diff changeset
959 cases), the value is not returned according to `FUNCTION_VALUE'.
kono
parents:
diff changeset
960 Instead, the caller passes the address of a block of memory in
kono
parents:
diff changeset
961 which the value should be stored. This address is called the
kono
parents:
diff changeset
962 "structure value address".
kono
parents:
diff changeset
963
kono
parents:
diff changeset
964 This section describes how to control returning structure values in
kono
parents:
diff changeset
965 memory.
kono
parents:
diff changeset
966
kono
parents:
diff changeset
967 `DEFAULT_PCC_STRUCT_RETURN'
kono
parents:
diff changeset
968
kono
parents:
diff changeset
969 Define this macro to be 1 if all structure and union return values
kono
parents:
diff changeset
970 must be in memory. Since this results in slower code, this should
kono
parents:
diff changeset
971 be defined only if needed for compatibility with other compilers or
kono
parents:
diff changeset
972 with an ABI. If you define this macro to be 0, then the
kono
parents:
diff changeset
973 conventions used for structure and union return values are decided
kono
parents:
diff changeset
974 by the `RETURN_IN_MEMORY' macro.
kono
parents:
diff changeset
975
kono
parents:
diff changeset
976 If not defined, this defaults to the value 1. */
kono
parents:
diff changeset
977 #define DEFAULT_PCC_STRUCT_RETURN 0
kono
parents:
diff changeset
978
kono
parents:
diff changeset
979 /* Caller-Saves Register Allocation
kono
parents:
diff changeset
980
kono
parents:
diff changeset
981 If you enable it, GNU CC can save registers around function calls.
kono
parents:
diff changeset
982 This makes it possible to use call-clobbered registers to hold
kono
parents:
diff changeset
983 variables that must live across calls.
kono
parents:
diff changeset
984
kono
parents:
diff changeset
985 Function Entry and Exit
kono
parents:
diff changeset
986
kono
parents:
diff changeset
987 This section describes the macros that output function entry
kono
parents:
diff changeset
988 ("prologue") and exit ("epilogue") code.
kono
parents:
diff changeset
989
kono
parents:
diff changeset
990 `EXIT_IGNORE_STACK'
kono
parents:
diff changeset
991
kono
parents:
diff changeset
992 Define this macro as a C expression that is nonzero if the return
kono
parents:
diff changeset
993 instruction or the function epilogue ignores the value of the stack
kono
parents:
diff changeset
994 pointer; in other words, if it is safe to delete an instruction to
kono
parents:
diff changeset
995 adjust the stack pointer before a return from the function.
kono
parents:
diff changeset
996
kono
parents:
diff changeset
997 Note that this macro's value is relevant only for functions for
kono
parents:
diff changeset
998 which frame pointers are maintained. It is never safe to delete a
kono
parents:
diff changeset
999 final stack adjustment in a function that has no frame pointer, and
kono
parents:
diff changeset
1000 the compiler knows this regardless of `EXIT_IGNORE_STACK'. */
kono
parents:
diff changeset
1001 #define EXIT_IGNORE_STACK 1
kono
parents:
diff changeset
1002
kono
parents:
diff changeset
1003 /* `EPILOGUE_USES (REGNO)'
kono
parents:
diff changeset
1004
kono
parents:
diff changeset
1005 Define this macro as a C expression that is nonzero for registers
kono
parents:
diff changeset
1006 are used by the epilogue or the `return' pattern. The stack and
kono
parents:
diff changeset
1007 frame pointer registers are already be assumed to be used as
kono
parents:
diff changeset
1008 needed. */
kono
parents:
diff changeset
1009 #define EPILOGUE_USES(REGNO) visium_epilogue_uses (REGNO)
kono
parents:
diff changeset
1010
kono
parents:
diff changeset
1011 /* Generating Code for Profiling
kono
parents:
diff changeset
1012
kono
parents:
diff changeset
1013 These macros will help you generate code for profiling. */
kono
parents:
diff changeset
1014
kono
parents:
diff changeset
1015 #define PROFILE_HOOK(LABEL) visium_profile_hook ()
kono
parents:
diff changeset
1016 #define FUNCTION_PROFILER(FILE, LABELNO) do {} while (0)
kono
parents:
diff changeset
1017 #define NO_PROFILE_COUNTERS 1
kono
parents:
diff changeset
1018
kono
parents:
diff changeset
1019 /* Trampolines for Nested Functions
kono
parents:
diff changeset
1020
kono
parents:
diff changeset
1021 A trampoline is a small piece of code that is created at run time
kono
parents:
diff changeset
1022 when the address of a nested function is taken. It normally resides
kono
parents:
diff changeset
1023 on the stack, in the stack frame of the containing function. These
kono
parents:
diff changeset
1024 macros tell GCC how to generate code to allocate and initialize a
kono
parents:
diff changeset
1025 trampoline.
kono
parents:
diff changeset
1026
kono
parents:
diff changeset
1027 The instructions in the trampoline must do two things: load a
kono
parents:
diff changeset
1028 constant address into the static chain register, and jump to the
kono
parents:
diff changeset
1029 real address of the nested function. On CISC machines such as the
kono
parents:
diff changeset
1030 m68k, this requires two instructions, a move immediate and a
kono
parents:
diff changeset
1031 jump. Then the two addresses exist in the trampoline as word-long
kono
parents:
diff changeset
1032 immediate operands. On RISC machines, it is often necessary to load
kono
parents:
diff changeset
1033 each address into a register in two parts. Then pieces of each
kono
parents:
diff changeset
1034 address form separate immediate operands.
kono
parents:
diff changeset
1035
kono
parents:
diff changeset
1036 The code generated to initialize the trampoline must store the
kono
parents:
diff changeset
1037 variable parts--the static chain value and the function
kono
parents:
diff changeset
1038 address--into the immediate operands of the instructions. On a CISC
kono
parents:
diff changeset
1039 machine, this is simply a matter of copying each address to a
kono
parents:
diff changeset
1040 memory reference at the proper offset from the start of the
kono
parents:
diff changeset
1041 trampoline. On a RISC machine, it may be necessary to take out
kono
parents:
diff changeset
1042 pieces of the address and store them separately.
kono
parents:
diff changeset
1043
kono
parents:
diff changeset
1044 On the Visium, the trampoline is
kono
parents:
diff changeset
1045
kono
parents:
diff changeset
1046 moviu r9,%u FUNCTION
kono
parents:
diff changeset
1047 movil r9,%l FUNCTION
kono
parents:
diff changeset
1048 moviu r20,%u STATIC
kono
parents:
diff changeset
1049 bra tr,r9,r0
kono
parents:
diff changeset
1050 movil r20,%l STATIC
kono
parents:
diff changeset
1051
kono
parents:
diff changeset
1052 A difficulty is setting the correct instruction parity at run time.
kono
parents:
diff changeset
1053
kono
parents:
diff changeset
1054
kono
parents:
diff changeset
1055 TRAMPOLINE_SIZE
kono
parents:
diff changeset
1056 A C expression for the size in bytes of the trampoline, as an integer. */
kono
parents:
diff changeset
1057 #define TRAMPOLINE_SIZE 20
kono
parents:
diff changeset
1058
kono
parents:
diff changeset
1059 /* Implicit calls to library routines
kono
parents:
diff changeset
1060
kono
parents:
diff changeset
1061 Avoid calling library routines (sqrtf) just to set `errno' to EDOM */
kono
parents:
diff changeset
1062 #define TARGET_EDOM 33
kono
parents:
diff changeset
1063
kono
parents:
diff changeset
1064 /* Addressing Modes
kono
parents:
diff changeset
1065
kono
parents:
diff changeset
1066 `MAX_REGS_PER_ADDRESS'
kono
parents:
diff changeset
1067
kono
parents:
diff changeset
1068 A number, the maximum number of registers that can appear in a
kono
parents:
diff changeset
1069 valid memory address. Note that it is up to you to specify a value
kono
parents:
diff changeset
1070 equal to the maximum number that `TARGET_LEGITIMATE_ADDRESS_P' would
kono
parents:
diff changeset
1071 ever accept. */
kono
parents:
diff changeset
1072 #define MAX_REGS_PER_ADDRESS 1
kono
parents:
diff changeset
1073
kono
parents:
diff changeset
1074 /* `LEGITIMIZE_RELOAD_ADDRESS (X, MODE, OPNUM, TYPE, IND_LEVELS, WIN)'
kono
parents:
diff changeset
1075
kono
parents:
diff changeset
1076 A C compound statement that attempts to replace X, which is an
kono
parents:
diff changeset
1077 address that needs reloading, with a valid memory address for an
kono
parents:
diff changeset
1078 operand of mode MODE. WIN will be a C statement label elsewhere
kono
parents:
diff changeset
1079 in the code. It is not necessary to define this macro, but it
kono
parents:
diff changeset
1080 might be useful for performance reasons. */
kono
parents:
diff changeset
1081 #define LEGITIMIZE_RELOAD_ADDRESS(AD, MODE, OPNUM, TYPE, IND, WIN) \
kono
parents:
diff changeset
1082 do \
kono
parents:
diff changeset
1083 { \
kono
parents:
diff changeset
1084 rtx new_x = visium_legitimize_reload_address ((AD), (MODE), (OPNUM), \
kono
parents:
diff changeset
1085 (int) (TYPE), (IND)); \
kono
parents:
diff changeset
1086 if (new_x) \
kono
parents:
diff changeset
1087 { \
kono
parents:
diff changeset
1088 (AD) = new_x; \
kono
parents:
diff changeset
1089 goto WIN; \
kono
parents:
diff changeset
1090 } \
kono
parents:
diff changeset
1091 } while (0)
kono
parents:
diff changeset
1092
kono
parents:
diff changeset
1093 /* Given a comparison code (EQ, NE, etc.) and the operands of a COMPARE,
kono
parents:
diff changeset
1094 return the mode to be used for the comparison. */
kono
parents:
diff changeset
1095 #define SELECT_CC_MODE(OP,X,Y) visium_select_cc_mode ((OP), (X), (Y))
kono
parents:
diff changeset
1096
kono
parents:
diff changeset
1097 /* Return nonzero if MODE implies a floating point inequality can be
kono
parents:
diff changeset
1098 reversed. For Visium this is always true because we have a full
kono
parents:
diff changeset
1099 compliment of ordered and unordered comparisons, but until generic
kono
parents:
diff changeset
1100 code knows how to reverse it correctly we keep the old definition. */
kono
parents:
diff changeset
1101 #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode && (MODE) != CCFPmode)
kono
parents:
diff changeset
1102
kono
parents:
diff changeset
1103 /* `BRANCH_COST'
kono
parents:
diff changeset
1104
kono
parents:
diff changeset
1105 A C expression for the cost of a branch instruction. A value of 1
kono
parents:
diff changeset
1106 is the default; other values are interpreted relative to that. */
kono
parents:
diff changeset
1107 #define BRANCH_COST(A,B) 10
kono
parents:
diff changeset
1108
kono
parents:
diff changeset
1109 /* Override BRANCH_COST heuristics for complex logical ops. */
kono
parents:
diff changeset
1110 #define LOGICAL_OP_NON_SHORT_CIRCUIT 0
kono
parents:
diff changeset
1111
kono
parents:
diff changeset
1112 /* `SLOW_BYTE_ACCESS'
kono
parents:
diff changeset
1113
kono
parents:
diff changeset
1114 Define this macro as a C expression which is nonzero if accessing
kono
parents:
diff changeset
1115 less than a word of memory (i.e. a `char' or a `short') is no
kono
parents:
diff changeset
1116 faster than accessing a word of memory, i.e., if such access
kono
parents:
diff changeset
1117 require more than one instruction or if there is no difference in
kono
parents:
diff changeset
1118 cost between byte and (aligned) word loads.
kono
parents:
diff changeset
1119
kono
parents:
diff changeset
1120 When this macro is not defined, the compiler will access a field by
kono
parents:
diff changeset
1121 finding the smallest containing object; when it is defined, a
kono
parents:
diff changeset
1122 fullword load will be used if alignment permits. Unless bytes
kono
parents:
diff changeset
1123 accesses are faster than word accesses, using word accesses is
kono
parents:
diff changeset
1124 preferable since it may eliminate subsequent memory access if
kono
parents:
diff changeset
1125 subsequent accesses occur to other fields in the same word of the
kono
parents:
diff changeset
1126 structure, but to different bytes. */
kono
parents:
diff changeset
1127 #define SLOW_BYTE_ACCESS 0
kono
parents:
diff changeset
1128
kono
parents:
diff changeset
1129 /* `MOVE_RATIO (SPEED)`
kono
parents:
diff changeset
1130
kono
parents:
diff changeset
1131 The threshold of number of scalar memory-to-memory move insns,
kono
parents:
diff changeset
1132 _below_ which a sequence of insns should be generated instead of a
kono
parents:
diff changeset
1133 string move insn or a library call. Increasing the value will
kono
parents:
diff changeset
1134 always make code faster, but eventually incurs high cost in
kono
parents:
diff changeset
1135 increased code size.
kono
parents:
diff changeset
1136
kono
parents:
diff changeset
1137 Since we have a movmemsi pattern, the default MOVE_RATIO is 2, which
kono
parents:
diff changeset
1138 is too low given that movmemsi will invoke a libcall. */
kono
parents:
diff changeset
1139 #define MOVE_RATIO(speed) ((speed) ? 9 : 3)
kono
parents:
diff changeset
1140
kono
parents:
diff changeset
1141 /* `CLEAR_RATIO (SPEED)`
kono
parents:
diff changeset
1142
kono
parents:
diff changeset
1143 The threshold of number of scalar move insns, _below_ which a
kono
parents:
diff changeset
1144 sequence of insns should be generated to clear memory instead of a
kono
parents:
diff changeset
1145 string clear insn or a library call. Increasing the value will
kono
parents:
diff changeset
1146 always make code faster, but eventually incurs high cost in
kono
parents:
diff changeset
1147 increased code size.
kono
parents:
diff changeset
1148
kono
parents:
diff changeset
1149 Since we have a setmemsi pattern, the default CLEAR_RATIO is 2, which
kono
parents:
diff changeset
1150 is too low given that setmemsi will invoke a libcall. */
kono
parents:
diff changeset
1151 #define CLEAR_RATIO(speed) ((speed) ? 13 : 5)
kono
parents:
diff changeset
1152
kono
parents:
diff changeset
1153 /* `MOVE_MAX'
kono
parents:
diff changeset
1154
kono
parents:
diff changeset
1155 The maximum number of bytes that a single instruction can move
kono
parents:
diff changeset
1156 quickly between memory and registers or between two memory
kono
parents:
diff changeset
1157 locations. */
kono
parents:
diff changeset
1158 #define MOVE_MAX 4
kono
parents:
diff changeset
1159
kono
parents:
diff changeset
1160 /* `MAX_MOVE_MAX'
kono
parents:
diff changeset
1161
kono
parents:
diff changeset
1162 The maximum number of bytes that a single instruction can move
kono
parents:
diff changeset
1163 quickly between memory and registers or between two memory
kono
parents:
diff changeset
1164 locations. If this is undefined, the default is `MOVE_MAX'.
kono
parents:
diff changeset
1165 Otherwise, it is the constant value that is the largest value that
kono
parents:
diff changeset
1166 `MOVE_MAX' can have at run-time. */
kono
parents:
diff changeset
1167 #define MAX_MOVE_MAX 4
kono
parents:
diff changeset
1168
kono
parents:
diff changeset
1169 /* `SHIFT_COUNT_TRUNCATED'
kono
parents:
diff changeset
1170
kono
parents:
diff changeset
1171 A C expression that is nonzero if on this machine the number of
kono
parents:
diff changeset
1172 bits actually used for the count of a shift operation is equal to
kono
parents:
diff changeset
1173 the number of bits needed to represent the size of the object being
kono
parents:
diff changeset
1174 shifted. When this macro is non-zero, the compiler will assume
kono
parents:
diff changeset
1175 that it is safe to omit a sign-extend, zero-extend, and certain
kono
parents:
diff changeset
1176 bitwise `and' instructions that truncates the count of a shift
kono
parents:
diff changeset
1177 operation. On machines that have instructions that act on
kono
parents:
diff changeset
1178 bitfields at variable positions, which may include `bit test'
kono
parents:
diff changeset
1179 instructions, a nonzero `SHIFT_COUNT_TRUNCATED' also enables
kono
parents:
diff changeset
1180 deletion of truncations of the values that serve as arguments to
kono
parents:
diff changeset
1181 bitfield instructions. */
kono
parents:
diff changeset
1182 #define SHIFT_COUNT_TRUNCATED 0
kono
parents:
diff changeset
1183
kono
parents:
diff changeset
1184 /* `STORE_FLAG_VALUE'
kono
parents:
diff changeset
1185
kono
parents:
diff changeset
1186 A C expression describing the value returned by a comparison
kono
parents:
diff changeset
1187 operator with an integral mode and stored by a store-flag
kono
parents:
diff changeset
1188 instruction (`sCOND') when the condition is true. This description
kono
parents:
diff changeset
1189 must apply to *all* the `sCOND' patterns and all the comparison
kono
parents:
diff changeset
1190 operators whose results have a `MODE_INT' mode. */
kono
parents:
diff changeset
1191 #define STORE_FLAG_VALUE 1
kono
parents:
diff changeset
1192
kono
parents:
diff changeset
1193 /* `Pmode'
kono
parents:
diff changeset
1194
kono
parents:
diff changeset
1195 An alias for the machine mode for pointers. On most machines,
kono
parents:
diff changeset
1196 define this to be the integer mode corresponding to the width of a
kono
parents:
diff changeset
1197 hardware pointer; `SImode' on 32-bit machine or `DImode' on 64-bit
kono
parents:
diff changeset
1198 machines. On some machines you must define this to be one of the
kono
parents:
diff changeset
1199 partial integer modes, such as `PSImode'.
kono
parents:
diff changeset
1200
kono
parents:
diff changeset
1201 The width of `Pmode' must be at least as large as the value of
kono
parents:
diff changeset
1202 `POINTER_SIZE'. If it is not equal, you must define the macro
kono
parents:
diff changeset
1203 `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to
kono
parents:
diff changeset
1204 `Pmode'. */
kono
parents:
diff changeset
1205 #define Pmode SImode
kono
parents:
diff changeset
1206
kono
parents:
diff changeset
1207 /* `FUNCTION_MODE'
kono
parents:
diff changeset
1208
kono
parents:
diff changeset
1209 An alias for the machine mode used for memory references to
kono
parents:
diff changeset
1210 functions being called, in `call' RTL expressions. On most
kono
parents:
diff changeset
1211 machines this should be `QImode'. */
kono
parents:
diff changeset
1212 #define FUNCTION_MODE SImode
kono
parents:
diff changeset
1213
kono
parents:
diff changeset
1214 /* `NO_IMPLICIT_EXTERN_C'
kono
parents:
diff changeset
1215
kono
parents:
diff changeset
1216 Define this macro if the system header files support C++ as well as
kono
parents:
diff changeset
1217 C. This macro inhibits the usual method of using system header
kono
parents:
diff changeset
1218 files in C++, which is to pretend that the file's contents are
kono
parents:
diff changeset
1219 enclosed in `extern "C" {...}'. */
kono
parents:
diff changeset
1220 #define NO_IMPLICIT_EXTERN_C
kono
parents:
diff changeset
1221
kono
parents:
diff changeset
1222 /* Dividing the Output into Sections (Texts, Data, ...)
kono
parents:
diff changeset
1223
kono
parents:
diff changeset
1224 An object file is divided into sections containing different types
kono
parents:
diff changeset
1225 of data. In the most common case, there are three sections: the
kono
parents:
diff changeset
1226 "text section", which holds instructions and read-only data; the
kono
parents:
diff changeset
1227 "data section", which holds initialized writable data; and the "bss
kono
parents:
diff changeset
1228 section", which holds uninitialized data. Some systems have other
kono
parents:
diff changeset
1229 kinds of sections.
kono
parents:
diff changeset
1230
kono
parents:
diff changeset
1231 `TEXT_SECTION_ASM_OP'
kono
parents:
diff changeset
1232
kono
parents:
diff changeset
1233 A C expression whose value is a string containing the assembler
kono
parents:
diff changeset
1234 operation that should precede instructions and read-only data.
kono
parents:
diff changeset
1235 Normally `".text"' is right. */
kono
parents:
diff changeset
1236 #define TEXT_SECTION_ASM_OP "\t.text"
kono
parents:
diff changeset
1237
kono
parents:
diff changeset
1238 /* `DATA_SECTION_ASM_OP'
kono
parents:
diff changeset
1239
kono
parents:
diff changeset
1240 A C expression whose value is a string containing the assembler
kono
parents:
diff changeset
1241 operation to identify the following data as writable initialized
kono
parents:
diff changeset
1242 data. Normally `".data"' is right. */
kono
parents:
diff changeset
1243 #define DATA_SECTION_ASM_OP "\t.data"
kono
parents:
diff changeset
1244
kono
parents:
diff changeset
1245 /* `BSS_SECTION_ASM_OP'
kono
parents:
diff changeset
1246
kono
parents:
diff changeset
1247 If defined, a C expression whose value is a string containing the
kono
parents:
diff changeset
1248 assembler operation to identify the following data as uninitialized
kono
parents:
diff changeset
1249 global data. If not defined, and neither `ASM_OUTPUT_BSS' nor
kono
parents:
diff changeset
1250 `ASM_OUTPUT_ALIGNED_BSS' are defined, uninitialized global data
kono
parents:
diff changeset
1251 will be output in the data section if `-fno-common' is passed,
kono
parents:
diff changeset
1252 otherwise `ASM_OUTPUT_COMMON' will be used.
kono
parents:
diff changeset
1253
kono
parents:
diff changeset
1254 `EXTRA_SECTIONS'
kono
parents:
diff changeset
1255
kono
parents:
diff changeset
1256 A list of names for sections other than the standard two, which are
kono
parents:
diff changeset
1257 `in_text' and `in_data'. You need not define this macro on a
kono
parents:
diff changeset
1258 system with no other sections (that GCC needs to use).
kono
parents:
diff changeset
1259
kono
parents:
diff changeset
1260 `EXTRA_SECTION_FUNCTIONS'
kono
parents:
diff changeset
1261
kono
parents:
diff changeset
1262 One or more functions to be defined in `varasm.c'. These functions
kono
parents:
diff changeset
1263 should do jobs analogous to those of `text_section' and
kono
parents:
diff changeset
1264 `data_section', for your additional sections. Do not define this
kono
parents:
diff changeset
1265 macro if you do not define `EXTRA_SECTIONS'.
kono
parents:
diff changeset
1266
kono
parents:
diff changeset
1267 `JUMP_TABLES_IN_TEXT_SECTION' Define this macro if jump tables (for
kono
parents:
diff changeset
1268 `tablejump' insns) should be output in the text section, along with
kono
parents:
diff changeset
1269 the assembler instructions. Otherwise, the readonly data section
kono
parents:
diff changeset
1270 is used.
kono
parents:
diff changeset
1271
kono
parents:
diff changeset
1272 This macro is irrelevant if there is no separate readonly data
kono
parents:
diff changeset
1273 section. */
kono
parents:
diff changeset
1274 #undef JUMP_TABLES_IN_TEXT_SECTION
kono
parents:
diff changeset
1275
kono
parents:
diff changeset
1276
kono
parents:
diff changeset
1277 /* The Overall Framework of an Assembler File
kono
parents:
diff changeset
1278
kono
parents:
diff changeset
1279 This describes the overall framework of an assembler file.
kono
parents:
diff changeset
1280
kono
parents:
diff changeset
1281 `ASM_COMMENT_START'
kono
parents:
diff changeset
1282
kono
parents:
diff changeset
1283 A C string constant describing how to begin a comment in the target
kono
parents:
diff changeset
1284 assembler language. The compiler assumes that the comment will end
kono
parents:
diff changeset
1285 at the end of the line. */
kono
parents:
diff changeset
1286 #define ASM_COMMENT_START ";"
kono
parents:
diff changeset
1287
kono
parents:
diff changeset
1288 /* `ASM_APP_ON'
kono
parents:
diff changeset
1289
kono
parents:
diff changeset
1290 A C string constant for text to be output before each `asm'
kono
parents:
diff changeset
1291 statement or group of consecutive ones. Normally this is `"#APP"',
kono
parents:
diff changeset
1292 which is a comment that has no effect on most assemblers but tells
kono
parents:
diff changeset
1293 the GNU assembler that it must check the lines that follow for all
kono
parents:
diff changeset
1294 valid assembler constructs. */
kono
parents:
diff changeset
1295 #define ASM_APP_ON "#APP\n"
kono
parents:
diff changeset
1296
kono
parents:
diff changeset
1297 /* `ASM_APP_OFF'
kono
parents:
diff changeset
1298
kono
parents:
diff changeset
1299 A C string constant for text to be output after each `asm'
kono
parents:
diff changeset
1300 statement or group of consecutive ones. Normally this is
kono
parents:
diff changeset
1301 `"#NO_APP"', which tells the GNU assembler to resume making the
kono
parents:
diff changeset
1302 time-saving assumptions that are valid for ordinary compiler
kono
parents:
diff changeset
1303 output. */
kono
parents:
diff changeset
1304 #define ASM_APP_OFF "#NO_APP\n"
kono
parents:
diff changeset
1305
kono
parents:
diff changeset
1306 /* Output of Data
kono
parents:
diff changeset
1307
kono
parents:
diff changeset
1308 This describes data output.
kono
parents:
diff changeset
1309
kono
parents:
diff changeset
1310 Output and Generation of Labels
kono
parents:
diff changeset
1311
kono
parents:
diff changeset
1312 This is about outputting labels.
kono
parents:
diff changeset
1313
kono
parents:
diff changeset
1314 `ASM_OUTPUT_LABEL (STREAM, NAME)'
kono
parents:
diff changeset
1315
kono
parents:
diff changeset
1316 A C statement (sans semicolon) to output to the stdio stream STREAM
kono
parents:
diff changeset
1317 the assembler definition of a label named NAME. Use the expression
kono
parents:
diff changeset
1318 `assemble_name (STREAM, NAME)' to output the name itself; before
kono
parents:
diff changeset
1319 and after that, output the additional assembler syntax for defining
kono
parents:
diff changeset
1320 the name, and a newline. */
kono
parents:
diff changeset
1321 #define ASM_OUTPUT_LABEL(STREAM,NAME) \
kono
parents:
diff changeset
1322 do { assemble_name (STREAM, NAME); fputs (":\n", STREAM); } while (0)
kono
parents:
diff changeset
1323
kono
parents:
diff changeset
1324 /* Globalizing directive for a label */
kono
parents:
diff changeset
1325 #define GLOBAL_ASM_OP "\t.global "
kono
parents:
diff changeset
1326
kono
parents:
diff changeset
1327 /* `ASM_OUTPUT_LABELREF (STREAM, NAME)'
kono
parents:
diff changeset
1328
kono
parents:
diff changeset
1329 A C statement (sans semicolon) to output to the stdio stream STREAM
kono
parents:
diff changeset
1330 a reference in assembler syntax to a label named NAME. This should
kono
parents:
diff changeset
1331 add `_' to the front of the name, if that is customary on your
kono
parents:
diff changeset
1332 operating system, as it is in most Berkeley Unix systems. This
kono
parents:
diff changeset
1333 macro is used in `assemble_name'. */
kono
parents:
diff changeset
1334 #define ASM_OUTPUT_LABELREF(STREAM,NAME) \
kono
parents:
diff changeset
1335 asm_fprintf (STREAM, "%U%s", NAME)
kono
parents:
diff changeset
1336
kono
parents:
diff changeset
1337 /* Output of Assembler Instructions
kono
parents:
diff changeset
1338
kono
parents:
diff changeset
1339 This describes assembler instruction output.
kono
parents:
diff changeset
1340
kono
parents:
diff changeset
1341 `REGISTER_NAMES'
kono
parents:
diff changeset
1342
kono
parents:
diff changeset
1343 A C initializer containing the assembler's names for the machine
kono
parents:
diff changeset
1344 registers, each one as a C string constant. This is what
kono
parents:
diff changeset
1345 translates register numbers in the compiler into assembler
kono
parents:
diff changeset
1346 language. */
kono
parents:
diff changeset
1347 #define REGISTER_NAMES \
kono
parents:
diff changeset
1348 {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
kono
parents:
diff changeset
1349 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
kono
parents:
diff changeset
1350 "r16", "r17", "r18", "r19", "r20", "r21", "fp", "sp", \
kono
parents:
diff changeset
1351 "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", \
kono
parents:
diff changeset
1352 "mdb", "mdc", \
kono
parents:
diff changeset
1353 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
kono
parents:
diff changeset
1354 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
kono
parents:
diff changeset
1355 "flags","argp","sfp" }
kono
parents:
diff changeset
1356
kono
parents:
diff changeset
1357 /* `ADDITIONAL_REGISTER_NAMES`
kono
parents:
diff changeset
1358
kono
parents:
diff changeset
1359 If defined, a C initializer for an array of structures containing
kono
parents:
diff changeset
1360 a name and a register number. This macro defines additional names
kono
parents:
diff changeset
1361 for hard registers, thus allowing the `asm' option in declarations
kono
parents:
diff changeset
1362 to refer to registers using alternate names. */
kono
parents:
diff changeset
1363 #define ADDITIONAL_REGISTER_NAMES \
kono
parents:
diff changeset
1364 {{"r22", HARD_FRAME_POINTER_REGNUM}, {"r23", STACK_POINTER_REGNUM}}
kono
parents:
diff changeset
1365
kono
parents:
diff changeset
1366 /* `REGISTER_PREFIX'
kono
parents:
diff changeset
1367 `LOCAL_LABEL_PREFIX'
kono
parents:
diff changeset
1368 `USER_LABEL_PREFIX'
kono
parents:
diff changeset
1369 `IMMEDIATE_PREFIX'
kono
parents:
diff changeset
1370
kono
parents:
diff changeset
1371 If defined, C string expressions to be used for the `%R', `%L',
kono
parents:
diff changeset
1372 `%U', and `%I' options of `asm_fprintf' (see `final.c'). These are
kono
parents:
diff changeset
1373 useful when a single `md' file must support multiple assembler
kono
parents:
diff changeset
1374 formats. In that case, the various `tm.h' files can define these
kono
parents:
diff changeset
1375 macros differently. */
kono
parents:
diff changeset
1376 #define REGISTER_PREFIX ""
kono
parents:
diff changeset
1377 #define LOCAL_LABEL_PREFIX "."
kono
parents:
diff changeset
1378 #define IMMEDIATE_PREFIX "#"
kono
parents:
diff changeset
1379
kono
parents:
diff changeset
1380 /* `ASM_OUTPUT_REG_PUSH (STREAM, REGNO)'
kono
parents:
diff changeset
1381
kono
parents:
diff changeset
1382 A C expression to output to STREAM some assembler code which will
kono
parents:
diff changeset
1383 push hard register number REGNO onto the stack. The code need not
kono
parents:
diff changeset
1384 be optimal, since this macro is used only when profiling. */
kono
parents:
diff changeset
1385 #define ASM_OUTPUT_REG_PUSH(STREAM,REGNO) \
kono
parents:
diff changeset
1386 asm_fprintf (STREAM, "\tsubi sp,4\n\twrite.l (sp),%s\n", \
kono
parents:
diff changeset
1387 reg_names[REGNO])
kono
parents:
diff changeset
1388
kono
parents:
diff changeset
1389 /* `ASM_OUTPUT_REG_POP (STREAM, REGNO)'
kono
parents:
diff changeset
1390
kono
parents:
diff changeset
1391 A C expression to output to STREAM some assembler code which will
kono
parents:
diff changeset
1392 pop hard register number REGNO off of the stack. The code need not
kono
parents:
diff changeset
1393 be optimal, since this macro is used only when profiling. */
kono
parents:
diff changeset
1394 #define ASM_OUTPUT_REG_POP(STREAM,REGNO) \
kono
parents:
diff changeset
1395 asm_fprintf (STREAM, "\tread.l %s,(sp)\n\taddi sp,4\n", \
kono
parents:
diff changeset
1396 reg_names[REGNO])
kono
parents:
diff changeset
1397
kono
parents:
diff changeset
1398
kono
parents:
diff changeset
1399 /* Output of Dispatch Tables
kono
parents:
diff changeset
1400
kono
parents:
diff changeset
1401 This concerns dispatch tables.
kono
parents:
diff changeset
1402
kono
parents:
diff changeset
1403 `ASM_OUTPUT_ADDR_DIFF_ELT (STREAM, VALUE, REL)'
kono
parents:
diff changeset
1404
kono
parents:
diff changeset
1405 A C statement to output to the stdio stream STREAM an assembler
kono
parents:
diff changeset
1406 pseudo-instruction to generate a difference between two labels.
kono
parents:
diff changeset
1407 VALUE and REL are the numbers of two internal labels. The
kono
parents:
diff changeset
1408 definitions of these labels are output using
kono
parents:
diff changeset
1409 `ASM_OUTPUT_INTERNAL_LABEL', and they must be printed in the same
kono
parents:
diff changeset
1410 way here.
kono
parents:
diff changeset
1411
kono
parents:
diff changeset
1412 You must provide this macro on machines where the addresses in a
kono
parents:
diff changeset
1413 dispatch table are relative to the table's own address. If
kono
parents:
diff changeset
1414 defined, GNU CC will also use this macro on all machines when
kono
parents:
diff changeset
1415 producing PIC. */
kono
parents:
diff changeset
1416 #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,BODY,VALUE,REL) \
kono
parents:
diff changeset
1417 switch (GET_MODE (BODY)) \
kono
parents:
diff changeset
1418 { \
kono
parents:
diff changeset
1419 case E_SImode: \
kono
parents:
diff changeset
1420 asm_fprintf ((STREAM), "\t.long\t%LL%d-%LL%d\n", (VALUE),(REL)); \
kono
parents:
diff changeset
1421 break; \
kono
parents:
diff changeset
1422 case E_HImode: \
kono
parents:
diff changeset
1423 asm_fprintf ((STREAM), "\t.word\t%LL%d-%LL%d\n", (VALUE),(REL)); \
kono
parents:
diff changeset
1424 break; \
kono
parents:
diff changeset
1425 case E_QImode: \
kono
parents:
diff changeset
1426 asm_fprintf ((STREAM), "\t.byte\t%LL%d-%LL%d\n", (VALUE),(REL)); \
kono
parents:
diff changeset
1427 break; \
kono
parents:
diff changeset
1428 default: \
kono
parents:
diff changeset
1429 break; \
kono
parents:
diff changeset
1430 }
kono
parents:
diff changeset
1431
kono
parents:
diff changeset
1432 /* `ASM_OUTPUT_ADDR_VEC_ELT (STREAM, VALUE)'
kono
parents:
diff changeset
1433
kono
parents:
diff changeset
1434 This macro should be provided on machines where the addresses in a
kono
parents:
diff changeset
1435 dispatch table are absolute.
kono
parents:
diff changeset
1436
kono
parents:
diff changeset
1437 The definition should be a C statement to output to the stdio
kono
parents:
diff changeset
1438 stream STREAM an assembler pseudo-instruction to generate a
kono
parents:
diff changeset
1439 reference to a label. VALUE is the number of an internal label
kono
parents:
diff changeset
1440 whose definition is output using `ASM_OUTPUT_INTERNAL_LABEL'. */
kono
parents:
diff changeset
1441 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
kono
parents:
diff changeset
1442 asm_fprintf (STREAM, "\t.long %LL%d\n", VALUE)
kono
parents:
diff changeset
1443
kono
parents:
diff changeset
1444 /* `ASM_OUTPUT_CASE_END (STREAM, NUM, TABLE)'
kono
parents:
diff changeset
1445
kono
parents:
diff changeset
1446 Define this if something special must be output at the end of a
kono
parents:
diff changeset
1447 jump-table. The definition should be a C statement to be executed
kono
parents:
diff changeset
1448 after the assembler code for the table is written. It should write
kono
parents:
diff changeset
1449 the appropriate code to stdio stream STREAM. The argument TABLE is
kono
parents:
diff changeset
1450 the jump-table insn, and NUM is the label-number of the preceding
kono
parents:
diff changeset
1451 label.
kono
parents:
diff changeset
1452
kono
parents:
diff changeset
1453 If this macro is not defined, nothing special is output at the end
kono
parents:
diff changeset
1454 of a jump table.
kono
parents:
diff changeset
1455
kono
parents:
diff changeset
1456 Here we output a word of zero so that jump-tables can be seperated
kono
parents:
diff changeset
1457 in reverse assembly. */
kono
parents:
diff changeset
1458 #define ASM_OUTPUT_CASE_END(STREAM, NUM, TABLE) \
kono
parents:
diff changeset
1459 asm_fprintf (STREAM, "\t.long 0\n");
kono
parents:
diff changeset
1460
kono
parents:
diff changeset
1461 /* Assembler Commands for Alignment
kono
parents:
diff changeset
1462
kono
parents:
diff changeset
1463 This describes commands for alignment.
kono
parents:
diff changeset
1464
kono
parents:
diff changeset
1465 `ASM_OUTPUT_ALIGN_CODE (STREAM)'
kono
parents:
diff changeset
1466
kono
parents:
diff changeset
1467 A C expression to output text to align the location counter in the
kono
parents:
diff changeset
1468 way that is desirable at a point in the code that is reached only
kono
parents:
diff changeset
1469 by jumping.
kono
parents:
diff changeset
1470
kono
parents:
diff changeset
1471 This macro need not be defined if you don't want any special
kono
parents:
diff changeset
1472 alignment to be done at such a time. Most machine descriptions do
kono
parents:
diff changeset
1473 not currently define the macro. */
kono
parents:
diff changeset
1474 #undef ASM_OUTPUT_ALIGN_CODE
kono
parents:
diff changeset
1475
kono
parents:
diff changeset
1476 /* `ASM_OUTPUT_LOOP_ALIGN (STREAM)'
kono
parents:
diff changeset
1477
kono
parents:
diff changeset
1478 A C expression to output text to align the location counter in the
kono
parents:
diff changeset
1479 way that is desirable at the beginning of a loop.
kono
parents:
diff changeset
1480
kono
parents:
diff changeset
1481 This macro need not be defined if you don't want any special
kono
parents:
diff changeset
1482 alignment to be done at such a time. Most machine descriptions do
kono
parents:
diff changeset
1483 not currently define the macro. */
kono
parents:
diff changeset
1484 #undef ASM_OUTPUT_LOOP_ALIGN
kono
parents:
diff changeset
1485
kono
parents:
diff changeset
1486 /* `ASM_OUTPUT_ALIGN (STREAM, POWER)'
kono
parents:
diff changeset
1487
kono
parents:
diff changeset
1488 A C statement to output to the stdio stream STREAM an assembler
kono
parents:
diff changeset
1489 command to advance the location counter to a multiple of 2 to the
kono
parents:
diff changeset
1490 POWER bytes. POWER will be a C expression of type `int'. */
kono
parents:
diff changeset
1491 #define ASM_OUTPUT_ALIGN(STREAM,LOG) \
kono
parents:
diff changeset
1492 if ((LOG) != 0) \
kono
parents:
diff changeset
1493 fprintf (STREAM, "\t.align %d\n", (1<<(LOG)))
kono
parents:
diff changeset
1494
kono
parents:
diff changeset
1495 /* `ASM_OUTPUT_MAX_SKIP_ALIGN (STREAM, POWER, MAX_SKIP)`
kono
parents:
diff changeset
1496
kono
parents:
diff changeset
1497 A C statement to output to the stdio stream STREAM an assembler
kono
parents:
diff changeset
1498 command to advance the location counter to a multiple of 2 to the
kono
parents:
diff changeset
1499 POWER bytes, but only if MAX_SKIP or fewer bytes are needed to
kono
parents:
diff changeset
1500 satisfy the alignment request. POWER and MAX_SKIP will be a C
kono
parents:
diff changeset
1501 expression of type `int'. */
kono
parents:
diff changeset
1502 #define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM,LOG,MAX_SKIP) \
kono
parents:
diff changeset
1503 if ((LOG) != 0) { \
kono
parents:
diff changeset
1504 if ((MAX_SKIP) == 0) fprintf ((STREAM), "\t.p2align %d\n", (LOG)); \
kono
parents:
diff changeset
1505 else { \
kono
parents:
diff changeset
1506 fprintf ((STREAM), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
kono
parents:
diff changeset
1507 /* Make sure that we have at least 8-byte alignment if > 8-byte \
kono
parents:
diff changeset
1508 alignment is preferred. */ \
kono
parents:
diff changeset
1509 if ((LOG) > 3 \
kono
parents:
diff changeset
1510 && (1 << (LOG)) > ((MAX_SKIP) + 1) \
kono
parents:
diff changeset
1511 && (MAX_SKIP) >= 7) \
kono
parents:
diff changeset
1512 fputs ("\t.p2align 3\n", (STREAM)); \
kono
parents:
diff changeset
1513 } \
kono
parents:
diff changeset
1514 }
kono
parents:
diff changeset
1515
kono
parents:
diff changeset
1516 /* Controlling Debugging Information Format
kono
parents:
diff changeset
1517
kono
parents:
diff changeset
1518 This describes how to specify debugging information.
kono
parents:
diff changeset
1519
kono
parents:
diff changeset
1520 mda is known to GDB, but not to GCC. */
kono
parents:
diff changeset
1521 #define DBX_REGISTER_NUMBER(REGNO) \
kono
parents:
diff changeset
1522 ((REGNO) > MDB_REGNUM ? (REGNO) + 1 : (REGNO))
kono
parents:
diff changeset
1523
kono
parents:
diff changeset
1524 /* `DEBUGGER_AUTO_OFFSET (X)'
kono
parents:
diff changeset
1525
kono
parents:
diff changeset
1526 A C expression that returns the integer offset value for an
kono
parents:
diff changeset
1527 automatic variable having address X (an RTL expression). The
kono
parents:
diff changeset
1528 default computation assumes that X is based on the frame-pointer
kono
parents:
diff changeset
1529 and gives the offset from the frame-pointer. This is required for
kono
parents:
diff changeset
1530 targets that produce debugging output for DBX or COFF-style
kono
parents:
diff changeset
1531 debugging output for SDB and allow the frame-pointer to be
kono
parents:
diff changeset
1532 eliminated when the `-g' options is used. */
kono
parents:
diff changeset
1533 #define DEBUGGER_AUTO_OFFSET(X) \
kono
parents:
diff changeset
1534 (GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0)
kono
parents:
diff changeset
1535
kono
parents:
diff changeset
1536 /* Miscellaneous Parameters
kono
parents:
diff changeset
1537
kono
parents:
diff changeset
1538 `CASE_VECTOR_MODE'
kono
parents:
diff changeset
1539
kono
parents:
diff changeset
1540 An alias for a machine mode name. This is the machine mode that
kono
parents:
diff changeset
1541 elements of a jump-table should have. */
kono
parents:
diff changeset
1542 #define CASE_VECTOR_MODE SImode
kono
parents:
diff changeset
1543
kono
parents:
diff changeset
1544 /* `CASE_VECTOR_PC_RELATIVE'
kono
parents:
diff changeset
1545 Define this macro if jump-tables should contain relative addresses. */
kono
parents:
diff changeset
1546 #undef CASE_VECTOR_PC_RELATIVE
kono
parents:
diff changeset
1547
kono
parents:
diff changeset
1548 /* This says how to output assembler code to declare an
kono
parents:
diff changeset
1549 unitialised external linkage data object. */
kono
parents:
diff changeset
1550 #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
kono
parents:
diff changeset
1551 ( fputs ("\n\t.comm ", (STREAM)), \
kono
parents:
diff changeset
1552 assemble_name ((STREAM), (NAME)), \
kono
parents:
diff changeset
1553 fprintf ((STREAM), "," HOST_WIDE_INT_PRINT_UNSIGNED"\n", ROUNDED))
kono
parents:
diff changeset
1554
kono
parents:
diff changeset
1555 /* This says how to output assembler code to declare an
kono
parents:
diff changeset
1556 unitialised internal linkage data object. */
kono
parents:
diff changeset
1557 #define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \
kono
parents:
diff changeset
1558 ( fputs ("\n\t.lcomm ", (STREAM)), \
kono
parents:
diff changeset
1559 assemble_name ((STREAM), (NAME)), \
kono
parents:
diff changeset
1560 fprintf ((STREAM), "," HOST_WIDE_INT_PRINT_UNSIGNED"\n", ROUNDED))
kono
parents:
diff changeset
1561
kono
parents:
diff changeset
1562 /* Prettify the assembly. */
kono
parents:
diff changeset
1563 extern int visium_indent_opcode;
kono
parents:
diff changeset
1564
kono
parents:
diff changeset
1565 #define ASM_OUTPUT_OPCODE(FILE, PTR) \
kono
parents:
diff changeset
1566 do { \
kono
parents:
diff changeset
1567 if (visium_indent_opcode) \
kono
parents:
diff changeset
1568 { \
kono
parents:
diff changeset
1569 putc (' ', FILE); \
kono
parents:
diff changeset
1570 visium_indent_opcode = 0; \
kono
parents:
diff changeset
1571 } \
kono
parents:
diff changeset
1572 } while (0)
kono
parents:
diff changeset
1573
kono
parents:
diff changeset
1574 /* Configure-time default values for common options. */
kono
parents:
diff changeset
1575 #define OPTION_DEFAULT_SPECS { "cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }
kono
parents:
diff changeset
1576
kono
parents:
diff changeset
1577 /* Values of TARGET_CPU_DEFAULT specified via --with-cpu. */
kono
parents:
diff changeset
1578 #define TARGET_CPU_gr5 0
kono
parents:
diff changeset
1579 #define TARGET_CPU_gr6 1
kono
parents:
diff changeset
1580
kono
parents:
diff changeset
1581 /* Default -mcpu multilib for above values. */
kono
parents:
diff changeset
1582 #if TARGET_CPU_DEFAULT == TARGET_CPU_gr5
kono
parents:
diff changeset
1583 #define MULTILIB_DEFAULTS { "mcpu=gr5" }
kono
parents:
diff changeset
1584 #elif TARGET_CPU_DEFAULT == TARGET_CPU_gr6
kono
parents:
diff changeset
1585 #define MULTILIB_DEFAULTS { "mcpu=gr6" }
kono
parents:
diff changeset
1586 #else
kono
parents:
diff changeset
1587 #error Unrecognized value in TARGET_CPU_DEFAULT
kono
parents:
diff changeset
1588 #endif