]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/rx/rx.h
2011-03-27 Vladimir Makarov <vmakarov@redhat.com>
[thirdparty/gcc.git] / gcc / config / rx / rx.h
1 /* GCC backend definitions for the Renesas RX processor.
2 Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
3 Contributed by Red Hat.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published
9 by the Free Software Foundation; either version 3, or (at your
10 option) any later version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
20 \f
21
22 #define TARGET_CPU_CPP_BUILTINS() \
23 do \
24 { \
25 builtin_define ("__RX__"); \
26 builtin_assert ("cpu=RX"); \
27 if (rx_cpu_type == RX610) \
28 { \
29 builtin_define ("__RX610__"); \
30 builtin_assert ("machine=RX610"); \
31 } \
32 else \
33 builtin_assert ("machine=RX600"); \
34 \
35 if (TARGET_BIG_ENDIAN_DATA) \
36 builtin_define ("__RX_BIG_ENDIAN__"); \
37 else \
38 builtin_define ("__RX_LITTLE_ENDIAN__");\
39 \
40 if (TARGET_64BIT_DOUBLES) \
41 builtin_define ("__RX_64BIT_DOUBLES__");\
42 else \
43 builtin_define ("__RX_32BIT_DOUBLES__");\
44 \
45 if (ALLOW_RX_FPU_INSNS) \
46 builtin_define ("__RX_FPU_INSNS__"); \
47 \
48 if (TARGET_AS100_SYNTAX) \
49 builtin_define ("__RX_AS100_SYNTAX__"); \
50 else \
51 builtin_define ("__RX_GAS_SYNTAX__"); \
52 } \
53 while (0)
54
55 enum rx_cpu_types
56 {
57 RX600,
58 RX610,
59 RX200
60 };
61
62 extern enum rx_cpu_types rx_cpu_type;
63
64 #undef CC1_SPEC
65 #define CC1_SPEC "\
66 %{mas100-syntax:%{gdwarf*:%e-mas100-syntax is incompatible with -gdwarf}} \
67 %{mcpu=rx200:%{fpu:%erx200 cpu does not have FPU hardware}}"
68
69 #undef STARTFILE_SPEC
70 #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:crt0.o%s} crtbegin.o%s"
71
72 #undef ENDFILE_SPEC
73 #define ENDFILE_SPEC "crtend.o%s crtn.o%s"
74
75 #undef ASM_SPEC
76 #define ASM_SPEC "\
77 %{mbig-endian-data:-mbig-endian-data} \
78 %{m64bit-doubles:-m64bit-doubles} \
79 %{!m64bit-doubles:-m32bit-doubles} \
80 %{msmall-data-limit*:-msmall-data-limit} \
81 %{mrelax:-relax} \
82 "
83
84 #undef LIB_SPEC
85 #define LIB_SPEC " \
86 --start-group \
87 -lc \
88 %{msim:-lsim}%{!msim:-lnosys} \
89 %{fprofile-arcs|fprofile-generate|coverage:-lgcov} \
90 --end-group \
91 %{!T*: %{msim:%Trx-sim.ld}%{!msim:%Trx.ld}} \
92 "
93
94 #undef LINK_SPEC
95 #define LINK_SPEC "%{mbig-endian-data:--oformat elf32-rx-be} %{mrelax:-relax}"
96 \f
97
98 #define BITS_BIG_ENDIAN 0
99 #define BYTES_BIG_ENDIAN TARGET_BIG_ENDIAN_DATA
100 #define WORDS_BIG_ENDIAN TARGET_BIG_ENDIAN_DATA
101
102 #define UNITS_PER_WORD 4
103
104 #define INT_TYPE_SIZE 32
105 #define LONG_TYPE_SIZE 32
106 #define LONG_LONG_TYPE_SIZE 64
107
108 #define FLOAT_TYPE_SIZE 32
109 #define DOUBLE_TYPE_SIZE (TARGET_64BIT_DOUBLES ? 64 : 32)
110 #define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
111
112 #ifdef __RX_32BIT_DOUBLES__
113 #define LIBGCC2_HAS_DF_MODE 0
114 #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 32
115 #else
116 #define LIBGCC2_HAS_DF_MODE 1
117 #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
118 #endif
119
120 #define DEFAULT_SIGNED_CHAR 0
121
122 #define STRICT_ALIGNMENT 1
123 #define FUNCTION_BOUNDARY 8
124 #define BIGGEST_ALIGNMENT 32
125 #define STACK_BOUNDARY 32
126 #define PARM_BOUNDARY 8
127
128 #define STACK_GROWS_DOWNWARD 1
129 #define FRAME_GROWS_DOWNWARD 0
130 #define FIRST_PARM_OFFSET(FNDECL) 0
131
132 #define MAX_REGS_PER_ADDRESS 2
133
134 #define Pmode SImode
135 #define POINTER_SIZE 32
136 #undef SIZE_TYPE
137 #define SIZE_TYPE "long unsigned int"
138 #undef PTRDIFF_TYPE
139 #define PTRDIFF_TYPE "long int"
140 #undef WCHAR_TYPE
141 #define WCHAR_TYPE "long int"
142 #undef WCHAR_TYPE_SIZE
143 #define WCHAR_TYPE_SIZE BITS_PER_WORD
144 #define POINTERS_EXTEND_UNSIGNED 1
145 #define FUNCTION_MODE QImode
146 #define CASE_VECTOR_MODE Pmode
147 #define WORD_REGISTER_OPERATIONS 1
148 #define HAS_LONG_COND_BRANCH 0
149 #define HAS_LONG_UNCOND_BRANCH 0
150
151 #define MOVE_MAX 4
152 #define STARTING_FRAME_OFFSET 0
153
154 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
155
156 #define LEGITIMATE_CONSTANT_P(X) rx_is_legitimate_constant (X)
157
158 #define HAVE_PRE_DECCREMENT 1
159 #define HAVE_POST_INCREMENT 1
160
161 #define MOVE_RATIO(SPEED) ((SPEED) ? 4 : 2)
162 #define SLOW_BYTE_ACCESS 1
163
164 #define STORE_FLAG_VALUE 1
165 #define LOAD_EXTEND_OP(MODE) SIGN_EXTEND
166 #define SHORT_IMMEDIATES_SIGN_EXTEND 1
167 \f
168 enum reg_class
169 {
170 NO_REGS, /* No registers in set. */
171 GR_REGS, /* Integer registers. */
172 ALL_REGS, /* All registers. */
173 LIM_REG_CLASSES /* Max value + 1. */
174 };
175
176 #define REG_CLASS_NAMES \
177 { \
178 "NO_REGS", \
179 "GR_REGS", \
180 "ALL_REGS" \
181 }
182
183 #define REG_CLASS_CONTENTS \
184 { \
185 { 0x00000000 }, /* No registers, */ \
186 { 0x0000ffff }, /* Integer registers. */ \
187 { 0x0000ffff } /* All registers. */ \
188 }
189
190 #define IRA_COVER_CLASSES \
191 { \
192 GR_REGS, LIM_REG_CLASSES \
193 }
194
195 #define SMALL_REGISTER_CLASSES 0
196 #define N_REG_CLASSES (int) LIM_REG_CLASSES
197 #define CLASS_MAX_NREGS(CLASS, MODE) ((GET_MODE_SIZE (MODE) \
198 + UNITS_PER_WORD - 1) \
199 / UNITS_PER_WORD)
200
201 #define GENERAL_REGS GR_REGS
202 #define BASE_REG_CLASS GR_REGS
203 #define INDEX_REG_CLASS GR_REGS
204
205 #define FIRST_PSEUDO_REGISTER 17
206
207 #define REGNO_REG_CLASS(REGNO) ((REGNO) < FIRST_PSEUDO_REGISTER \
208 ? GR_REGS : NO_REGS)
209
210 #define STACK_POINTER_REGNUM 0
211 #define FUNC_RETURN_REGNUM 1
212 #define FRAME_POINTER_REGNUM 6
213 #define ARG_POINTER_REGNUM 7
214 #define STATIC_CHAIN_REGNUM 8
215 #define TRAMPOLINE_TEMP_REGNUM 9
216 #define STRUCT_VAL_REGNUM 15
217 #define CC_REGNUM 16
218
219 /* This is the register which is used to hold the address of the start
220 of the small data area, if that feature is being used. Note - this
221 register must not be call_used because otherwise library functions
222 that are compiled without small data support might clobber it.
223
224 FIXME: The function gcc/config/rx/rx.c:rx_gen_move_template() has a
225 built in copy of this register's name, rather than constructing the
226 name from this #define. */
227 #define GP_BASE_REGNUM 13
228
229 #define ELIMINABLE_REGS \
230 {{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
231 { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM }, \
232 { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }}
233
234 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
235 (OFFSET) = rx_initial_elimination_offset ((FROM), (TO))
236
237
238 #define FUNCTION_ARG_REGNO_P(N) (((N) >= 1) && ((N) <= 4))
239 #define FUNCTION_VALUE_REGNO_P(N) ((N) == FUNC_RETURN_REGNUM)
240 #define DEFAULT_PCC_STRUCT_RETURN 0
241
242 #define FIXED_REGISTERS \
243 { \
244 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 \
245 }
246
247 #define CALL_USED_REGISTERS \
248 { \
249 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 \
250 }
251
252 #define LIBCALL_VALUE(MODE) \
253 gen_rtx_REG (((GET_MODE_CLASS (MODE) != MODE_INT \
254 || COMPLEX_MODE_P (MODE) \
255 || GET_MODE_SIZE (MODE) >= 4) \
256 ? (MODE) \
257 : SImode), \
258 FUNC_RETURN_REGNUM)
259
260 /* Order of allocation of registers. */
261
262 #define REG_ALLOC_ORDER \
263 { 7, 10, 11, 12, 13, 14, 4, 3, 2, 1, 9, 8, 6, 5, 15 \
264 }
265
266 #define REGNO_IN_RANGE(REGNO, MIN, MAX) \
267 (IN_RANGE ((REGNO), (MIN), (MAX)) \
268 || (reg_renumber != NULL \
269 && reg_renumber[(REGNO)] >= (MIN) \
270 && reg_renumber[(REGNO)] <= (MAX)))
271
272 #ifdef REG_OK_STRICT
273 #define REGNO_OK_FOR_BASE_P(regno) REGNO_IN_RANGE (regno, 0, 15)
274 #else
275 #define REGNO_OK_FOR_BASE_P(regno) 1
276 #endif
277
278 #define REGNO_OK_FOR_INDEX_P(regno) REGNO_OK_FOR_BASE_P (regno)
279
280 #define RTX_OK_FOR_BASE(X, STRICT) \
281 ((STRICT) ? \
282 ( (REG_P (X) \
283 && REGNO_IN_RANGE (REGNO (X), 0, 15)) \
284 || (GET_CODE (X) == SUBREG \
285 && REG_P (SUBREG_REG (X)) \
286 && REGNO_IN_RANGE (REGNO (SUBREG_REG (X)), 0, 15))) \
287 : \
288 ( (REG_P (X) \
289 || (GET_CODE (X) == SUBREG \
290 && REG_P (SUBREG_REG (X))))))
291 \f
292
293 #define RETURN_ADDR_RTX(COUNT, FRAMEADDR) \
294 ((COUNT) == 0 \
295 ? gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, arg_pointer_rtx, GEN_INT (-4))) \
296 : NULL_RTX)
297
298 #define INCOMING_RETURN_ADDR_RTX gen_rtx_MEM (Pmode, stack_pointer_rtx)
299
300 #define ACCUMULATE_OUTGOING_ARGS 1
301
302 typedef unsigned int CUMULATIVE_ARGS;
303
304 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
305 (CUM) = 0
306
307 \f
308 #define TRAMPOLINE_SIZE (! TARGET_BIG_ENDIAN_DATA ? 14 : 20)
309 #define TRAMPOLINE_ALIGNMENT 32
310 \f
311 #define NO_PROFILE_COUNTERS 1
312 #define PROFILE_BEFORE_PROLOGUE 1
313
314 #define FUNCTION_PROFILER(FILE, LABELNO) \
315 fprintf (FILE, "\tbsr\t__mcount\n");
316 \f
317
318 #define HARD_REGNO_NREGS(REGNO, MODE) CLASS_MAX_NREGS (0, MODE)
319
320 #define HARD_REGNO_MODE_OK(REGNO, MODE) \
321 REGNO_REG_CLASS (REGNO) == GR_REGS
322
323 #define MODES_TIEABLE_P(MODE1, MODE2) \
324 ( ( GET_MODE_CLASS (MODE1) == MODE_FLOAT \
325 || GET_MODE_CLASS (MODE1) == MODE_COMPLEX_FLOAT) \
326 == ( GET_MODE_CLASS (MODE2) == MODE_FLOAT \
327 || GET_MODE_CLASS (MODE2) == MODE_COMPLEX_FLOAT))
328 \f
329
330 #define REGISTER_NAMES \
331 { \
332 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
333 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "cc" \
334 }
335
336 #define ADDITIONAL_REGISTER_NAMES \
337 { \
338 { "sp", STACK_POINTER_REGNUM } \
339 , { "fp", FRAME_POINTER_REGNUM } \
340 , { "arg", ARG_POINTER_REGNUM } \
341 , { "chain", STATIC_CHAIN_REGNUM } \
342 }
343
344 #define DATA_SECTION_ASM_OP \
345 (TARGET_AS100_SYNTAX ? "\t.SECTION D,DATA" \
346 : "\t.section D,\"aw\",@progbits\n\t.p2align 2")
347
348 #define SDATA_SECTION_ASM_OP \
349 (TARGET_AS100_SYNTAX ? "\t.SECTION D_2,DATA,ALIGN=2" \
350 : "\t.section D_2,\"aw\",@progbits\n\t.p2align 1")
351
352 #undef READONLY_DATA_SECTION_ASM_OP
353 #define READONLY_DATA_SECTION_ASM_OP \
354 (TARGET_AS100_SYNTAX ? "\t.SECTION C,ROMDATA,ALIGN=4" \
355 : "\t.section C,\"a\",@progbits\n\t.p2align 2")
356
357 #define BSS_SECTION_ASM_OP \
358 (TARGET_AS100_SYNTAX ? "\t.SECTION B,DATA,ALIGN=4" \
359 : "\t.section B,\"w\",@nobits\n\t.p2align 2")
360
361 #define SBSS_SECTION_ASM_OP \
362 (TARGET_AS100_SYNTAX ? "\t.SECTION B_2,DATA,ALIGN=2" \
363 : "\t.section B_2,\"w\",@nobits\n\t.p2align 1")
364
365 /* The following definitions are conditional depending upon whether the
366 compiler is being built or crtstuff.c is being compiled by the built
367 compiler. */
368 #if defined CRT_BEGIN || defined CRT_END
369 # ifdef __RX_AS100_SYNTAX
370 # define TEXT_SECTION_ASM_OP "\t.SECTION P,CODE"
371 # define CTORS_SECTION_ASM_OP "\t.SECTION init_array,CODE"
372 # define DTORS_SECTION_ASM_OP "\t.SECTION fini_array,CODE"
373 # define INIT_ARRAY_SECTION_ASM_OP "\t.SECTION init_array,CODE"
374 # define FINI_ARRAY_SECTION_ASM_OP "\t.SECTION fini_array,CODE"
375 # else
376 # define TEXT_SECTION_ASM_OP "\t.section P,\"ax\""
377 # define CTORS_SECTION_ASM_OP \
378 "\t.section\t.init_array,\"aw\",@init_array"
379 # define DTORS_SECTION_ASM_OP \
380 "\t.section\t.fini_array,\"aw\",@fini_array"
381 # define INIT_ARRAY_SECTION_ASM_OP \
382 "\t.section\t.init_array,\"aw\",@init_array"
383 # define FINI_ARRAY_SECTION_ASM_OP \
384 "\t.section\t.fini_array,\"aw\",@fini_array"
385 # endif
386 #else
387 # define TEXT_SECTION_ASM_OP \
388 (TARGET_AS100_SYNTAX ? "\t.SECTION P,CODE" : "\t.section P,\"ax\"")
389
390 # define CTORS_SECTION_ASM_OP \
391 (TARGET_AS100_SYNTAX ? "\t.SECTION init_array,CODE" \
392 : "\t.section\t.init_array,\"aw\",@init_array")
393
394 # define DTORS_SECTION_ASM_OP \
395 (TARGET_AS100_SYNTAX ? "\t.SECTION fini_array,CODE" \
396 : "\t.section\t.fini_array,\"aw\",@fini_array")
397
398 # define INIT_ARRAY_SECTION_ASM_OP \
399 (TARGET_AS100_SYNTAX ? "\t.SECTION init_array,CODE" \
400 : "\t.section\t.init_array,\"aw\",@init_array")
401
402 # define FINI_ARRAY_SECTION_ASM_OP \
403 (TARGET_AS100_SYNTAX ? "\t.SECTION fini_array,CODE" \
404 : "\t.section\t.fini_array,\"aw\",@fini_array")
405 #endif
406
407 #define GLOBAL_ASM_OP \
408 (TARGET_AS100_SYNTAX ? "\t.GLB\t" : "\t.global\t")
409 #define ASM_COMMENT_START " ;"
410 #define ASM_APP_ON ""
411 #define ASM_APP_OFF ""
412 #define LOCAL_LABEL_PREFIX "L"
413 #undef USER_LABEL_PREFIX
414 #define USER_LABEL_PREFIX "_"
415
416 #define LABEL_ALIGN_AFTER_BARRIER(x) rx_align_for_label ()
417
418 #define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM, LOG, MAX_SKIP) \
419 do \
420 { \
421 if ((LOG) == 0 || (MAX_SKIP) == 0) \
422 break; \
423 if (TARGET_AS100_SYNTAX) \
424 { \
425 if ((LOG) >= 2) \
426 fprintf (STREAM, "\t.ALIGN 4\t; %d alignment actually requested\n", 1 << (LOG)); \
427 else \
428 fprintf (STREAM, "\t.ALIGN 2\n"); \
429 } \
430 else \
431 fprintf (STREAM, "\t.balign %d,3,%d\n", 1 << (LOG), (MAX_SKIP)); \
432 } \
433 while (0)
434
435 #define ASM_OUTPUT_ALIGN(STREAM, LOG) \
436 do \
437 { \
438 if ((LOG) == 0) \
439 break; \
440 if (TARGET_AS100_SYNTAX) \
441 { \
442 if ((LOG) >= 2) \
443 fprintf (STREAM, "\t.ALIGN 4\t; %d alignment actually requested\n", 1 << (LOG)); \
444 else \
445 fprintf (STREAM, "\t.ALIGN 2\n"); \
446 } \
447 else \
448 fprintf (STREAM, "\t.balign %d\n", 1 << (LOG)); \
449 } \
450 while (0)
451
452 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
453 fprintf (FILE, TARGET_AS100_SYNTAX ? "\t.LWORD L%d\n" : "\t.long .L%d\n", \
454 VALUE)
455
456 /* This is how to output an element of a case-vector that is relative.
457 Note: The local label referenced by the "3b" below is emitted by
458 the tablejump insn. */
459
460 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
461 fprintf (FILE, TARGET_AS100_SYNTAX \
462 ? "\t.LWORD L%d - ?-\n" : "\t.long .L%d - 1b\n", VALUE)
463
464 #define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \
465 do \
466 { \
467 HOST_WIDE_INT size_ = (SIZE); \
468 \
469 /* The as100 assembler does not have an equivalent of the SVR4 \
470 .size pseudo-op. */ \
471 if (TARGET_AS100_SYNTAX) \
472 break; \
473 \
474 fputs (SIZE_ASM_OP, STREAM); \
475 assemble_name (STREAM, NAME); \
476 fprintf (STREAM, ", " HOST_WIDE_INT_PRINT_DEC "\n", size_); \
477 } \
478 while (0)
479
480 #define ASM_OUTPUT_MEASURED_SIZE(STREAM, NAME) \
481 do \
482 { \
483 /* The as100 assembler does not have an equivalent of the SVR4 \
484 .size pseudo-op. */ \
485 if (TARGET_AS100_SYNTAX) \
486 break; \
487 fputs (SIZE_ASM_OP, STREAM); \
488 assemble_name (STREAM, NAME); \
489 fputs (", .-", STREAM); \
490 assemble_name (STREAM, NAME); \
491 putc ('\n', STREAM); \
492 } \
493 while (0)
494
495 #define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \
496 do \
497 { \
498 /* The as100 assembler does not have an equivalent of the SVR4 \
499 .size pseudo-op. */ \
500 if (TARGET_AS100_SYNTAX) \
501 break; \
502 fputs (TYPE_ASM_OP, STREAM); \
503 assemble_name (STREAM, NAME); \
504 fputs (", ", STREAM); \
505 fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \
506 putc ('\n', STREAM); \
507 } \
508 while (0)
509
510 #undef ASM_GENERATE_INTERNAL_LABEL
511 #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
512 do \
513 { \
514 sprintf (LABEL, TARGET_AS100_SYNTAX ? "*%s%u" : "*.%s%u", \
515 PREFIX, (unsigned) (NUM)); \
516 } \
517 while (0)
518
519 #undef ASM_OUTPUT_EXTERNAL
520 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
521 do \
522 { \
523 if (TARGET_AS100_SYNTAX) \
524 targetm.asm_out.globalize_label (FILE, NAME); \
525 default_elf_asm_output_external (FILE, DECL, NAME); \
526 } \
527 while (0)
528
529 #undef ASM_OUTPUT_ALIGNED_COMMON
530 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
531 do \
532 { \
533 if (TARGET_AS100_SYNTAX) \
534 { \
535 fprintf ((FILE), "\t.GLB\t"); \
536 assemble_name ((FILE), (NAME)); \
537 fprintf ((FILE), "\n"); \
538 assemble_name ((FILE), (NAME)); \
539 switch ((ALIGN) / BITS_PER_UNIT) \
540 { \
541 case 4: \
542 fprintf ((FILE), ":\t.BLKL\t"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
543 (SIZE) / 4); \
544 break; \
545 case 2: \
546 fprintf ((FILE), ":\t.BLKW\t"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
547 (SIZE) / 2); \
548 break; \
549 default: \
550 fprintf ((FILE), ":\t.BLKB\t"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
551 (SIZE)); \
552 break; \
553 } \
554 } \
555 else \
556 { \
557 fprintf ((FILE), "%s", COMMON_ASM_OP); \
558 assemble_name ((FILE), (NAME)); \
559 fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
560 (SIZE), (ALIGN) / BITS_PER_UNIT); \
561 } \
562 } \
563 while (0)
564
565 #undef SKIP_ASM_OP
566 #define SKIP_ASM_OP (TARGET_AS100_SYNTAX ? "\t.BLKB\t" : "\t.zero\t")
567
568 #undef ASM_OUTPUT_LIMITED_STRING
569 #define ASM_OUTPUT_LIMITED_STRING(FILE, STR) \
570 do \
571 { \
572 const unsigned char *_limited_str = \
573 (const unsigned char *) (STR); \
574 unsigned ch; \
575 \
576 fprintf ((FILE), TARGET_AS100_SYNTAX \
577 ? "\t.BYTE\t\"" : "\t.string\t\""); \
578 \
579 for (; (ch = *_limited_str); _limited_str++) \
580 { \
581 int escape; \
582 \
583 switch (escape = ESCAPES[ch]) \
584 { \
585 case 0: \
586 putc (ch, (FILE)); \
587 break; \
588 case 1: \
589 fprintf ((FILE), "\\%03o", ch); \
590 break; \
591 default: \
592 putc ('\\', (FILE)); \
593 putc (escape, (FILE)); \
594 break; \
595 } \
596 } \
597 \
598 fprintf ((FILE), TARGET_AS100_SYNTAX ? "\"\n\t.BYTE\t0\n" : "\"\n");\
599 } \
600 while (0)
601
602 #undef IDENT_ASM_OP
603 #define IDENT_ASM_OP (TARGET_AS100_SYNTAX \
604 ? "\t.END\t; Built by: ": "\t.ident\t")
605
606 /* For PIC put jump tables into the text section so that the offsets that
607 they contain are always computed between two same-section symbols. */
608 #define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
609 \f
610 /* This is a version of REG_P that also returns TRUE for SUBREGs. */
611 #define RX_REG_P(rtl) (REG_P (rtl) || GET_CODE (rtl) == SUBREG)
612
613 /* Like REG_P except that this macro is true for SET expressions. */
614 #define SET_P(rtl) (GET_CODE (rtl) == SET)
615 \f
616 /* The AS100 assembler does not support .leb128 and .uleb128, but
617 the compiler-build-time configure tests will have enabled their
618 use because GAS supports them. So default to generating STABS
619 debug information instead of DWARF2 when generating AS100
620 compatible output. */
621 #undef PREFERRED_DEBUGGING_TYPE
622 #define PREFERRED_DEBUGGING_TYPE (TARGET_AS100_SYNTAX \
623 ? DBX_DEBUG : DWARF2_DEBUG)
624
625 #define INCOMING_FRAME_SP_OFFSET 4
626 #define ARG_POINTER_CFA_OFFSET(FNDECL) 4
627 #define FRAME_POINTER_CFA_OFFSET(FNDECL) 4
628 \f
629 #define TARGET_USE_FPU (! TARGET_NO_USE_FPU)
630
631 /* This macro is used to decide when RX FPU instructions can be used. */
632 #define ALLOW_RX_FPU_INSNS (TARGET_USE_FPU)
633
634 #define BRANCH_COST(SPEED,PREDICT) 1
635 #define REGISTER_MOVE_COST(MODE,FROM,TO) 2
636
637 #define SELECT_CC_MODE(OP,X,Y) rx_select_cc_mode(OP, X, Y)