annotate gcc/config/tilepro/tilepro.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Definitions of target machine for GNU compiler for TILEPro.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 Contributed by Walter Lee (walt@tilera.com)
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 /* This is used by tilepro_cpu_cpp_builtins to indicate the byte order
kono
parents:
diff changeset
22 we're compiling for. */
kono
parents:
diff changeset
23 #define TILEPRO_CPU_CPP_ENDIAN_BUILTINS() \
kono
parents:
diff changeset
24 do \
kono
parents:
diff changeset
25 { \
kono
parents:
diff changeset
26 if (BYTES_BIG_ENDIAN) \
kono
parents:
diff changeset
27 builtin_define ("__BIG_ENDIAN__"); \
kono
parents:
diff changeset
28 else \
kono
parents:
diff changeset
29 builtin_define ("__LITTLE_ENDIAN__"); \
kono
parents:
diff changeset
30 } \
kono
parents:
diff changeset
31 while (0)
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 /* Target CPU builtins. */
kono
parents:
diff changeset
34 #define TARGET_CPU_CPP_BUILTINS() \
kono
parents:
diff changeset
35 tilepro_cpu_cpp_builtins (pfile)
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 #undef PTRDIFF_TYPE
kono
parents:
diff changeset
38 #define PTRDIFF_TYPE "int"
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 #undef SIZE_TYPE
kono
parents:
diff changeset
41 #define SIZE_TYPE "unsigned int"
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 /* Target machine storage layout */
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 #define BITS_BIG_ENDIAN 0
kono
parents:
diff changeset
47 #define BYTES_BIG_ENDIAN 0
kono
parents:
diff changeset
48 #define WORDS_BIG_ENDIAN 0
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 #define UNITS_PER_WORD 4
kono
parents:
diff changeset
51 #define PARM_BOUNDARY 32
kono
parents:
diff changeset
52 #define STACK_BOUNDARY 64
kono
parents:
diff changeset
53 #define FUNCTION_BOUNDARY 64
kono
parents:
diff changeset
54 #define BIGGEST_ALIGNMENT 64
kono
parents:
diff changeset
55 #define STRICT_ALIGNMENT 1
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 #define PCC_BITFIELD_TYPE_MATTERS 1
kono
parents:
diff changeset
58 #define FASTEST_ALIGNMENT 32
kono
parents:
diff changeset
59 #define BIGGEST_FIELD_ALIGNMENT 64
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 /* Make arrays of chars word-aligned for the same reasons. */
kono
parents:
diff changeset
62 #define DATA_ALIGNMENT(TYPE, ALIGN) \
kono
parents:
diff changeset
63 (TREE_CODE (TYPE) == ARRAY_TYPE \
kono
parents:
diff changeset
64 && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
kono
parents:
diff changeset
65 && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 /* Make local arrays of chars word-aligned for the same reasons. */
kono
parents:
diff changeset
68 #define LOCAL_ALIGNMENT(TYPE, ALIGN) DATA_ALIGNMENT (TYPE, ALIGN)
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 /* Standard register usage. */
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 #define FIRST_PSEUDO_REGISTER (64 + 3)
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 #define FIXED_REGISTERS \
kono
parents:
diff changeset
76 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
kono
parents:
diff changeset
77 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
kono
parents:
diff changeset
78 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
kono
parents:
diff changeset
79 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
kono
parents:
diff changeset
80 1, 1, 1}
kono
parents:
diff changeset
81
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
82 #define CALL_REALLY_USED_REGISTERS \
111
kono
parents:
diff changeset
83 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
kono
parents:
diff changeset
84 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, \
kono
parents:
diff changeset
85 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
kono
parents:
diff changeset
86 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
kono
parents:
diff changeset
87 1, 1, 1}
kono
parents:
diff changeset
88
kono
parents:
diff changeset
89 #define REG_ALLOC_ORDER { \
kono
parents:
diff changeset
90 10, 11, 12, 13, 14, /* call used */ \
kono
parents:
diff changeset
91 15, 16, 17, 18, 19, \
kono
parents:
diff changeset
92 20, 21, 22, 23, 24, \
kono
parents:
diff changeset
93 25, 26, 27, 28, 29, \
kono
parents:
diff changeset
94 \
kono
parents:
diff changeset
95 9, 8, 7, 6, 5, /* argument */ \
kono
parents:
diff changeset
96 4, 3, 2, 1, 0, \
kono
parents:
diff changeset
97 \
kono
parents:
diff changeset
98 55, /* return address */ \
kono
parents:
diff changeset
99 \
kono
parents:
diff changeset
100 30, 31, 32, 33, 34, /* call saved registers */ \
kono
parents:
diff changeset
101 35, 36, 37, 38, 39, \
kono
parents:
diff changeset
102 40, 41, 42, 43, 44, \
kono
parents:
diff changeset
103 45, 46, 47, 48, 49, \
kono
parents:
diff changeset
104 50, 51, \
kono
parents:
diff changeset
105 \
kono
parents:
diff changeset
106 52, /* hard frame pointer */ \
kono
parents:
diff changeset
107 53, 54, /* tp, sp */ \
kono
parents:
diff changeset
108 \
kono
parents:
diff changeset
109 56, 57, 58, 59, 60, /* special purpose */ \
kono
parents:
diff changeset
110 61, 62, 63, 64, 65, /* or fake registers */ \
kono
parents:
diff changeset
111 66 \
kono
parents:
diff changeset
112 }
kono
parents:
diff changeset
113
kono
parents:
diff changeset
114 /* Register that holds an address into the text segment that can be
kono
parents:
diff changeset
115 used by pic code. */
kono
parents:
diff changeset
116 #define TILEPRO_PIC_TEXT_LABEL_REGNUM (flag_pic ? 50 : INVALID_REGNUM)
kono
parents:
diff changeset
117 #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 51 : INVALID_REGNUM)
kono
parents:
diff changeset
118 #define HARD_FRAME_POINTER_REGNUM 52
kono
parents:
diff changeset
119 #define THREAD_POINTER_REGNUM 53
kono
parents:
diff changeset
120 #define STACK_POINTER_REGNUM 54
kono
parents:
diff changeset
121 #define TILEPRO_LINK_REGNUM 55
kono
parents:
diff changeset
122 #define FRAME_POINTER_REGNUM 64
kono
parents:
diff changeset
123 #define ARG_POINTER_REGNUM 65
kono
parents:
diff changeset
124 /* Pseudo register used to enforce order between instructions that
kono
parents:
diff changeset
125 touch the networks. */
kono
parents:
diff changeset
126 #define TILEPRO_NETORDER_REGNUM 66
kono
parents:
diff changeset
127 #define STATIC_CHAIN_REGNUM 10
kono
parents:
diff changeset
128
kono
parents:
diff changeset
129
kono
parents:
diff changeset
130 enum reg_class
kono
parents:
diff changeset
131 {
kono
parents:
diff changeset
132 NO_REGS,
kono
parents:
diff changeset
133 R0_REGS,
kono
parents:
diff changeset
134 R1_REGS,
kono
parents:
diff changeset
135 R2_REGS,
kono
parents:
diff changeset
136 R3_REGS,
kono
parents:
diff changeset
137 R4_REGS,
kono
parents:
diff changeset
138 R5_REGS,
kono
parents:
diff changeset
139 R6_REGS,
kono
parents:
diff changeset
140 R7_REGS,
kono
parents:
diff changeset
141 R8_REGS,
kono
parents:
diff changeset
142 R9_REGS,
kono
parents:
diff changeset
143 R10_REGS,
kono
parents:
diff changeset
144 ALL_REGS,
kono
parents:
diff changeset
145 LIM_REG_CLASSES
kono
parents:
diff changeset
146 };
kono
parents:
diff changeset
147
kono
parents:
diff changeset
148 #define N_REG_CLASSES (int) LIM_REG_CLASSES
kono
parents:
diff changeset
149
kono
parents:
diff changeset
150 /* Since GENERAL_REGS is the same class as ALL_REGS, don't give it a
kono
parents:
diff changeset
151 different class number; just make it an alias. */
kono
parents:
diff changeset
152 #define GENERAL_REGS ALL_REGS
kono
parents:
diff changeset
153
kono
parents:
diff changeset
154 #define REG_CLASS_NAMES \
kono
parents:
diff changeset
155 { \
kono
parents:
diff changeset
156 "NO_REGS", \
kono
parents:
diff changeset
157 "R0_REGS", \
kono
parents:
diff changeset
158 "R1_REGS", \
kono
parents:
diff changeset
159 "R2_REGS", \
kono
parents:
diff changeset
160 "R3_REGS", \
kono
parents:
diff changeset
161 "R4_REGS", \
kono
parents:
diff changeset
162 "R5_REGS", \
kono
parents:
diff changeset
163 "R6_REGS", \
kono
parents:
diff changeset
164 "R7_REGS", \
kono
parents:
diff changeset
165 "R8_REGS", \
kono
parents:
diff changeset
166 "R9_REGS", \
kono
parents:
diff changeset
167 "R10_REGS", \
kono
parents:
diff changeset
168 "ALL_REGS" \
kono
parents:
diff changeset
169 }
kono
parents:
diff changeset
170
kono
parents:
diff changeset
171 #define REG_CLASS_CONTENTS \
kono
parents:
diff changeset
172 { \
kono
parents:
diff changeset
173 { 0 }, \
kono
parents:
diff changeset
174 { 1 << 0 }, \
kono
parents:
diff changeset
175 { 1 << 1 }, \
kono
parents:
diff changeset
176 { 1 << 2 }, \
kono
parents:
diff changeset
177 { 1 << 3 }, \
kono
parents:
diff changeset
178 { 1 << 4 }, \
kono
parents:
diff changeset
179 { 1 << 5 }, \
kono
parents:
diff changeset
180 { 1 << 6 }, \
kono
parents:
diff changeset
181 { 1 << 7 }, \
kono
parents:
diff changeset
182 { 1 << 8 }, \
kono
parents:
diff changeset
183 { 1 << 9 }, \
kono
parents:
diff changeset
184 { 1 << 10 }, \
kono
parents:
diff changeset
185 { 0xffffffff, 0xffffffff } \
kono
parents:
diff changeset
186 }
kono
parents:
diff changeset
187
kono
parents:
diff changeset
188 #define REGNO_REG_CLASS(REGNO) \
kono
parents:
diff changeset
189 ((unsigned)(REGNO) <= 10 ? \
kono
parents:
diff changeset
190 (enum reg_class)(R0_REGS + (REGNO)) : ALL_REGS)
kono
parents:
diff changeset
191
kono
parents:
diff changeset
192 #define INDEX_REG_CLASS NO_REGS
kono
parents:
diff changeset
193 #define BASE_REG_CLASS ALL_REGS
kono
parents:
diff changeset
194
kono
parents:
diff changeset
195 #define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)
kono
parents:
diff changeset
196
kono
parents:
diff changeset
197 #define CLASS_MAX_NREGS(CLASS, MODE) \
kono
parents:
diff changeset
198 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
kono
parents:
diff changeset
199
kono
parents:
diff changeset
200
kono
parents:
diff changeset
201 /* Stack layout; function entry, exit and calling. */
kono
parents:
diff changeset
202
kono
parents:
diff changeset
203 #define STACK_GROWS_DOWNWARD 1
kono
parents:
diff changeset
204 #define FRAME_GROWS_DOWNWARD 1
kono
parents:
diff changeset
205
kono
parents:
diff changeset
206 #define DYNAMIC_CHAIN_ADDRESS(FRAME) \
kono
parents:
diff changeset
207 plus_constant (Pmode, (FRAME), UNITS_PER_WORD)
kono
parents:
diff changeset
208
kono
parents:
diff changeset
209 #define FIRST_PARM_OFFSET(FNDECL) 0
kono
parents:
diff changeset
210
kono
parents:
diff changeset
211 #define ACCUMULATE_OUTGOING_ARGS 1
kono
parents:
diff changeset
212
kono
parents:
diff changeset
213 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
kono
parents:
diff changeset
214
kono
parents:
diff changeset
215 #define INCOMING_FRAME_SP_OFFSET 0
kono
parents:
diff changeset
216
kono
parents:
diff changeset
217 #define STACK_POINTER_OFFSET (2 * UNITS_PER_WORD)
kono
parents:
diff changeset
218
kono
parents:
diff changeset
219 #define ARG_POINTER_CFA_OFFSET(FNDECL) (-STACK_POINTER_OFFSET)
kono
parents:
diff changeset
220
kono
parents:
diff changeset
221 #define DEFAULT_PCC_STRUCT_RETURN 0
kono
parents:
diff changeset
222
kono
parents:
diff changeset
223 /* The first 10 registers may hold return value. */
kono
parents:
diff changeset
224 #define TILEPRO_NUM_RETURN_REGS 10
kono
parents:
diff changeset
225
kono
parents:
diff changeset
226 /* The first 10 registers hold function arguments. */
kono
parents:
diff changeset
227 #define TILEPRO_NUM_ARG_REGS 10
kono
parents:
diff changeset
228
kono
parents:
diff changeset
229 #define FUNCTION_ARG_REGNO_P(N) ((N) < TILEPRO_NUM_ARG_REGS)
kono
parents:
diff changeset
230
kono
parents:
diff changeset
231 /* The type used to store the number of words of arguments scanned so
kono
parents:
diff changeset
232 far during argument scanning. This includes any space that is
kono
parents:
diff changeset
233 skipped. */
kono
parents:
diff changeset
234 #define CUMULATIVE_ARGS int
kono
parents:
diff changeset
235
kono
parents:
diff changeset
236 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
kono
parents:
diff changeset
237 ((CUM) = 0)
kono
parents:
diff changeset
238
kono
parents:
diff changeset
239
kono
parents:
diff changeset
240 #define ELIMINABLE_REGS \
kono
parents:
diff changeset
241 {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
kono
parents:
diff changeset
242 {ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
kono
parents:
diff changeset
243 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
kono
parents:
diff changeset
244 {FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
kono
parents:
diff changeset
245
kono
parents:
diff changeset
246 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
kono
parents:
diff changeset
247 ((OFFSET) = tilepro_initial_elimination_offset((FROM),(TO)))
kono
parents:
diff changeset
248
kono
parents:
diff changeset
249 #define PROFILE_BEFORE_PROLOGUE 1
kono
parents:
diff changeset
250
kono
parents:
diff changeset
251 #define FUNCTION_PROFILER(FILE, LABELNO) \
kono
parents:
diff changeset
252 tilepro_function_profiler (FILE, LABELNO)
kono
parents:
diff changeset
253
kono
parents:
diff changeset
254 #define TRAMPOLINE_SIZE 48
kono
parents:
diff changeset
255 #define TRAMPOLINE_ALIGNMENT 64
kono
parents:
diff changeset
256 #define TRAMPOLINE_SECTION text_section
kono
parents:
diff changeset
257
kono
parents:
diff changeset
258
kono
parents:
diff changeset
259 /* Call frame debugging information. */
kono
parents:
diff changeset
260
kono
parents:
diff changeset
261 #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, TILEPRO_LINK_REGNUM)
kono
parents:
diff changeset
262
kono
parents:
diff changeset
263 #define RETURN_ADDR_RTX tilepro_return_addr
kono
parents:
diff changeset
264
kono
parents:
diff changeset
265 #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (TILEPRO_LINK_REGNUM)
kono
parents:
diff changeset
266
kono
parents:
diff changeset
267 #define DWARF_ZERO_REG 63
kono
parents:
diff changeset
268
kono
parents:
diff changeset
269 #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N + 12) : INVALID_REGNUM)
kono
parents:
diff changeset
270 #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 11)
kono
parents:
diff changeset
271 #define EH_RETURN_HANDLER_RTX tilepro_eh_return_handler_rtx ()
kono
parents:
diff changeset
272
kono
parents:
diff changeset
273 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
kono
parents:
diff changeset
274 tilepro_asm_preferred_eh_data_format ((CODE), (GLOBAL))
kono
parents:
diff changeset
275
kono
parents:
diff changeset
276
kono
parents:
diff changeset
277 /* Addressing modes, and classification of registers for them. */
kono
parents:
diff changeset
278
kono
parents:
diff changeset
279 #define HAVE_POST_INCREMENT 1
kono
parents:
diff changeset
280 #define HAVE_POST_DECREMENT 1
kono
parents:
diff changeset
281 #define HAVE_POST_MODIFY_DISP 1
kono
parents:
diff changeset
282
kono
parents:
diff changeset
283 #define REGNO_OK_FOR_INDEX_P(regno) 0
kono
parents:
diff changeset
284 #define REGNO_OK_FOR_BASE_P(regno) \
kono
parents:
diff changeset
285 ((regno) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] >= 0)
kono
parents:
diff changeset
286
kono
parents:
diff changeset
287 #define MAX_REGS_PER_ADDRESS 1
kono
parents:
diff changeset
288
kono
parents:
diff changeset
289 #define CONSTANT_ADDRESS_P(X) 0
kono
parents:
diff changeset
290
kono
parents:
diff changeset
291 #define LEGITIMATE_PIC_OPERAND_P(X) tilepro_legitimate_pic_operand_p (X)
kono
parents:
diff changeset
292
kono
parents:
diff changeset
293
kono
parents:
diff changeset
294 #define CASE_VECTOR_MODE SImode
kono
parents:
diff changeset
295 #define CASE_VECTOR_PC_RELATIVE 0
kono
parents:
diff changeset
296 #define JUMP_TABLES_IN_TEXT_SECTION 0
kono
parents:
diff changeset
297
kono
parents:
diff changeset
298 #define DEFAULT_SIGNED_CHAR 1
kono
parents:
diff changeset
299
kono
parents:
diff changeset
300 #define MOVE_MAX UNITS_PER_WORD
kono
parents:
diff changeset
301
kono
parents:
diff changeset
302 /* Use a value of 11 for MOVE_RATIO and friends, because TILEPro
kono
parents:
diff changeset
303 returns structs as large as 10 words in registers. Because of some
kono
parents:
diff changeset
304 some code generation inefficiency, we never get smaller code for
kono
parents:
diff changeset
305 turning that into a memcpy, so pick a value that guarantees this
kono
parents:
diff changeset
306 doesn't happen. */
kono
parents:
diff changeset
307 #define TILEPRO_CALL_RATIO 11
kono
parents:
diff changeset
308 #define MOVE_RATIO(speed) ((speed) ? 15 : TILEPRO_CALL_RATIO)
kono
parents:
diff changeset
309 #define CLEAR_RATIO(speed) ((speed) ? 15 : TILEPRO_CALL_RATIO)
kono
parents:
diff changeset
310 #define SET_RATIO(speed) ((speed) ? 15 : TILEPRO_CALL_RATIO)
kono
parents:
diff changeset
311
kono
parents:
diff changeset
312 #define WORD_REGISTER_OPERATIONS 1
kono
parents:
diff changeset
313
kono
parents:
diff changeset
314 #define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
kono
parents:
diff changeset
315
kono
parents:
diff changeset
316 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
kono
parents:
diff changeset
317 if (GET_MODE_CLASS (MODE) == MODE_INT \
kono
parents:
diff changeset
318 && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
kono
parents:
diff changeset
319 (MODE) = SImode;
kono
parents:
diff changeset
320
kono
parents:
diff changeset
321 /* Define SLOW_BYTE_ACCESS to avoid making a QI or HI mode
kono
parents:
diff changeset
322 register. */
kono
parents:
diff changeset
323 #define SLOW_BYTE_ACCESS 1
kono
parents:
diff changeset
324
kono
parents:
diff changeset
325 #define SHIFT_COUNT_TRUNCATED 1
kono
parents:
diff changeset
326
kono
parents:
diff changeset
327 #define SHORT_IMMEDIATES_SIGN_EXTEND 1
kono
parents:
diff changeset
328
kono
parents:
diff changeset
329 #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
kono
parents:
diff changeset
330 #define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
kono
parents:
diff changeset
331
kono
parents:
diff changeset
332 #define Pmode SImode
kono
parents:
diff changeset
333
kono
parents:
diff changeset
334 #define STORE_FLAG_VALUE 1
kono
parents:
diff changeset
335
kono
parents:
diff changeset
336 #define FUNCTION_MODE SImode
kono
parents:
diff changeset
337
kono
parents:
diff changeset
338 #define NO_FUNCTION_CSE 1
kono
parents:
diff changeset
339
kono
parents:
diff changeset
340 #define ADJUST_INSN_LENGTH(INSN, LENGTH) \
kono
parents:
diff changeset
341 ((LENGTH) = tilepro_adjust_insn_length ((INSN), (LENGTH)))
kono
parents:
diff changeset
342
kono
parents:
diff changeset
343 #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
kono
parents:
diff changeset
344
kono
parents:
diff changeset
345 #define BRANCH_COST(speed_p, predictable_p) ((predictable_p) ? 2 : 6)
kono
parents:
diff changeset
346
kono
parents:
diff changeset
347
kono
parents:
diff changeset
348 /* Control the assembler format that we output. */
kono
parents:
diff changeset
349
kono
parents:
diff changeset
350 #undef NO_DOLLAR_IN_LABEL
kono
parents:
diff changeset
351
kono
parents:
diff changeset
352 #define ASM_COMMENT_START "##"
kono
parents:
diff changeset
353
kono
parents:
diff changeset
354 #define TEXT_SECTION_ASM_OP "\t.text"
kono
parents:
diff changeset
355
kono
parents:
diff changeset
356 #define DATA_SECTION_ASM_OP "\t.data"
kono
parents:
diff changeset
357
kono
parents:
diff changeset
358 #undef READONLY_DATA_SECTION_ASM_OP
kono
parents:
diff changeset
359 #define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata, \"a\""
kono
parents:
diff changeset
360
kono
parents:
diff changeset
361 #undef BSS_SECTION_ASM_OP
kono
parents:
diff changeset
362 #define BSS_SECTION_ASM_OP "\t.section\t.bss, \"wa\""
kono
parents:
diff changeset
363
kono
parents:
diff changeset
364 #undef INIT_SECTION_ASM_OP
kono
parents:
diff changeset
365 #define INIT_SECTION_ASM_OP "\t.section\t.init, \"ax\""
kono
parents:
diff changeset
366
kono
parents:
diff changeset
367 #undef FINI_SECTION_ASM_OP
kono
parents:
diff changeset
368 #define FINI_SECTION_ASM_OP "\t.section\t.fini, \"ax\""
kono
parents:
diff changeset
369
kono
parents:
diff changeset
370 #define GLOBAL_ASM_OP ".global "
kono
parents:
diff changeset
371
kono
parents:
diff changeset
372 #define SUPPORTS_WEAK 1
kono
parents:
diff changeset
373
kono
parents:
diff changeset
374 #define USER_LABEL_PREFIX ""
kono
parents:
diff changeset
375
kono
parents:
diff changeset
376 #define REGISTER_PREFIX ""
kono
parents:
diff changeset
377 #define REGISTER_NAMES \
kono
parents:
diff changeset
378 { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
kono
parents:
diff changeset
379 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
kono
parents:
diff changeset
380 "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
kono
parents:
diff changeset
381 "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", \
kono
parents:
diff changeset
382 "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \
kono
parents:
diff changeset
383 "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", \
kono
parents:
diff changeset
384 "r48", "r49", "r50", "r51", "r52", "tp", "sp", "lr", \
kono
parents:
diff changeset
385 "sn", "idn0", "idn1", "udn0", "udn1", "udn2", "udn3", "zero", \
kono
parents:
diff changeset
386 "?FRAME?", "?ARG?", "?NET?" }
kono
parents:
diff changeset
387
kono
parents:
diff changeset
388 /* This is used to help emit bundles. */
kono
parents:
diff changeset
389 #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
kono
parents:
diff changeset
390 tilepro_final_prescan_insn (insn)
kono
parents:
diff changeset
391
kono
parents:
diff changeset
392 /* This is used to help emit bundles. */
kono
parents:
diff changeset
393 #define ASM_OUTPUT_OPCODE(STREAM, PTR) \
kono
parents:
diff changeset
394 (PTR = tilepro_asm_output_opcode (STREAM, PTR))
kono
parents:
diff changeset
395
kono
parents:
diff changeset
396 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
kono
parents:
diff changeset
397 do \
kono
parents:
diff changeset
398 { \
kono
parents:
diff changeset
399 char label[256]; \
kono
parents:
diff changeset
400 ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE));\
kono
parents:
diff changeset
401 fprintf (FILE, "\t.word "); \
kono
parents:
diff changeset
402 assemble_name (FILE, label); \
kono
parents:
diff changeset
403 fprintf (FILE, "\n"); \
kono
parents:
diff changeset
404 } \
kono
parents:
diff changeset
405 while (0)
kono
parents:
diff changeset
406
kono
parents:
diff changeset
407 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
kono
parents:
diff changeset
408 do \
kono
parents:
diff changeset
409 { \
kono
parents:
diff changeset
410 char label[256]; \
kono
parents:
diff changeset
411 ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE)); \
kono
parents:
diff changeset
412 fprintf (FILE, "\t.word "); \
kono
parents:
diff changeset
413 assemble_name (FILE, label); \
kono
parents:
diff changeset
414 ASM_GENERATE_INTERNAL_LABEL (label, "L", (REL)); \
kono
parents:
diff changeset
415 fprintf (FILE, "-"); \
kono
parents:
diff changeset
416 assemble_name (FILE, label); \
kono
parents:
diff changeset
417 fprintf (FILE, "\n"); \
kono
parents:
diff changeset
418 } \
kono
parents:
diff changeset
419 while (0)
kono
parents:
diff changeset
420
kono
parents:
diff changeset
421 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
kono
parents:
diff changeset
422 do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", 1 << (LOG)); } while (0)
kono
parents:
diff changeset
423
kono
parents:
diff changeset
424 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
kono
parents:
diff changeset
425 ( fputs (".comm ", (FILE)), \
kono
parents:
diff changeset
426 assemble_name ((FILE), (NAME)), \
kono
parents:
diff changeset
427 fprintf ((FILE), ",%u\n", (unsigned int)(ROUNDED)))
kono
parents:
diff changeset
428
kono
parents:
diff changeset
429 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
kono
parents:
diff changeset
430 ( fputs (".lcomm ", (FILE)), \
kono
parents:
diff changeset
431 assemble_name ((FILE), (NAME)), \
kono
parents:
diff changeset
432 fprintf ((FILE), ",%u\n", (unsigned int)(ROUNDED)))
kono
parents:
diff changeset
433
kono
parents:
diff changeset
434
kono
parents:
diff changeset
435
kono
parents:
diff changeset
436 #define INIT_EXPANDERS tilepro_init_expanders ()
kono
parents:
diff changeset
437
kono
parents:
diff changeset
438 /* A C structure for machine-specific, per-function data. This is
kono
parents:
diff changeset
439 added to the cfun structure. */
kono
parents:
diff changeset
440 typedef struct GTY(()) machine_function
kono
parents:
diff changeset
441 {
kono
parents:
diff changeset
442 /* Symbol for the text label used for pic. */
kono
parents:
diff changeset
443 rtx text_label_symbol;
kono
parents:
diff changeset
444
kono
parents:
diff changeset
445 /* Register for the text label. */
kono
parents:
diff changeset
446 rtx text_label_rtx;
kono
parents:
diff changeset
447
kono
parents:
diff changeset
448 /* Register for the pic offset table. */
kono
parents:
diff changeset
449 rtx got_rtx;
kono
parents:
diff changeset
450
kono
parents:
diff changeset
451 /* The function calls tls_get_addr. */
kono
parents:
diff changeset
452 int calls_tls_get_addr;
kono
parents:
diff changeset
453 } machine_function;
kono
parents:
diff changeset
454
kono
parents:
diff changeset
455 #ifndef HAVE_AS_TLS
kono
parents:
diff changeset
456 #define HAVE_AS_TLS 0
kono
parents:
diff changeset
457 #endif