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