comparison gcc/config/m32r/m32r.h @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents 77e2b8dfacca
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
1 /* Definitions of target machine for GNU compiler, Renesas M32R cpu. 1 /* Definitions of target machine for GNU compiler, Renesas M32R cpu.
2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 3 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify it 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 8 under the terms of the GNU General Public License as published
20 20
21 /* Things to do: 21 /* Things to do:
22 - longlong.h? 22 - longlong.h?
23 */ 23 */
24 24
25 #undef SWITCH_TAKES_ARG
26 #undef WORD_SWITCH_TAKES_ARG
27 #undef HANDLE_SYSV_PRAGMA
28 #undef SIZE_TYPE 25 #undef SIZE_TYPE
29 #undef PTRDIFF_TYPE 26 #undef PTRDIFF_TYPE
30 #undef WCHAR_TYPE 27 #undef WCHAR_TYPE
31 #undef WCHAR_TYPE_SIZE 28 #undef WCHAR_TYPE_SIZE
32 #undef TARGET_VERSION 29 #undef TARGET_VERSION
91 88
92 /* Print subsidiary information on the compiler version in use. */ 89 /* Print subsidiary information on the compiler version in use. */
93 #ifndef TARGET_VERSION 90 #ifndef TARGET_VERSION
94 #define TARGET_VERSION fprintf (stderr, " (m32r)") 91 #define TARGET_VERSION fprintf (stderr, " (m32r)")
95 #endif 92 #endif
96
97 /* Switch Recognition by gcc.c. Add -G xx support. */
98
99 #undef SWITCH_TAKES_ARG
100 #define SWITCH_TAKES_ARG(CHAR) \
101 (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
102 93
103 /* Names to predefine in the preprocessor for this target machine. */ 94 /* Names to predefine in the preprocessor for this target machine. */
104 /* __M32R__ is defined by the existing compiler so we use that. */ 95 /* __M32R__ is defined by the existing compiler so we use that. */
105 #define TARGET_CPU_CPP_BUILTINS() \ 96 #define TARGET_CPU_CPP_BUILTINS() \
106 do \ 97 do \
175 #undef CC1_SPEC 166 #undef CC1_SPEC
176 #define CC1_SPEC "%{G*} %(cc1_cpu)" 167 #define CC1_SPEC "%{G*} %(cc1_cpu)"
177 168
178 /* Options to pass on to the assembler. */ 169 /* Options to pass on to the assembler. */
179 #undef ASM_SPEC 170 #undef ASM_SPEC
180 #define ASM_SPEC "%{v} %(asm_cpu) %(relax) %{fpic|fpie:-K PIC} %{fPIC|fPIE:-K PIC}" 171 #define ASM_SPEC "%(asm_cpu) %(relax) %{fpic|fpie:-K PIC} %{fPIC|fPIE:-K PIC}"
181 172
182 #define LINK_SPEC "%{v} %(link_cpu) %(relax)" 173 #define LINK_SPEC "%{v} %(link_cpu) %(relax)"
183 174
184 #undef STARTFILE_SPEC 175 #undef STARTFILE_SPEC
185 #define STARTFILE_SPEC "%(startfile_cpu)" 176 #define STARTFILE_SPEC "%(startfile_cpu)"
300 291
301 #ifndef MULTILIB_DEFAULTS 292 #ifndef MULTILIB_DEFAULTS
302 #define MULTILIB_DEFAULTS { "mmodel=small" SUBTARGET_MULTILIB_DEFAULTS } 293 #define MULTILIB_DEFAULTS { "mmodel=small" SUBTARGET_MULTILIB_DEFAULTS }
303 #endif 294 #endif
304 295
305 /* Sometimes certain combinations of command options do not make
306 sense on a particular target machine. You can define a macro
307 `OVERRIDE_OPTIONS' to take account of this. This macro, if
308 defined, is executed once just after all the command options have
309 been parsed.
310
311 Don't use this macro to turn on various extra optimizations for
312 `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */
313
314 #ifndef SUBTARGET_OVERRIDE_OPTIONS 296 #ifndef SUBTARGET_OVERRIDE_OPTIONS
315 #define SUBTARGET_OVERRIDE_OPTIONS 297 #define SUBTARGET_OVERRIDE_OPTIONS
316 #endif 298 #endif
317
318 #define OVERRIDE_OPTIONS \
319 do \
320 { \
321 /* These need to be done at start up. \
322 It's convenient to do them here. */ \
323 m32r_init (); \
324 SUBTARGET_OVERRIDE_OPTIONS \
325 } \
326 while (0)
327
328 #ifndef SUBTARGET_OPTIMIZATION_OPTIONS
329 #define SUBTARGET_OPTIMIZATION_OPTIONS
330 #endif
331
332 #define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \
333 do \
334 { \
335 if (LEVEL == 1) \
336 flag_regmove = TRUE; \
337 \
338 if (SIZE) \
339 { \
340 flag_omit_frame_pointer = TRUE; \
341 } \
342 \
343 SUBTARGET_OPTIMIZATION_OPTIONS \
344 } \
345 while (0)
346
347 /* Define this macro if debugging can be performed even without a
348 frame pointer. If this macro is defined, GCC will turn on the
349 `-fomit-frame-pointer' option whenever `-O' is specified. */
350 #define CAN_DEBUG_WITHOUT_FP
351 299
352 /* Target machine storage layout. */ 300 /* Target machine storage layout. */
353 301
354 /* Define this if most significant bit is lowest numbered 302 /* Define this if most significant bit is lowest numbered
355 in instructions that operate on numbered bit-fields. */ 303 in instructions that operate on numbered bit-fields. */
359 #define BYTES_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0) 307 #define BYTES_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0)
360 308
361 /* Define this if most significant word of a multiword number is the lowest 309 /* Define this if most significant word of a multiword number is the lowest
362 numbered. */ 310 numbered. */
363 #define WORDS_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0) 311 #define WORDS_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0)
364
365 /* Define this macro if WORDS_BIG_ENDIAN is not constant. This must
366 be a constant value with the same meaning as WORDS_BIG_ENDIAN,
367 which will be used only when compiling libgcc2.c. Typically the
368 value will be set based on preprocessor defines. */
369 /*#define LIBGCC2_WORDS_BIG_ENDIAN 1*/
370 312
371 /* Width of a word, in units (bytes). */ 313 /* Width of a word, in units (bytes). */
372 #define UNITS_PER_WORD 4 314 #define UNITS_PER_WORD 4
373 315
374 /* Define this macro if it is advisable to hold scalars in registers 316 /* Define this macro if it is advisable to hold scalars in registers
512 SUBTARGET_CALL_USED_REGISTERS \ 454 SUBTARGET_CALL_USED_REGISTERS \
513 } 455 }
514 456
515 #define CALL_REALLY_USED_REGISTERS CALL_USED_REGISTERS 457 #define CALL_REALLY_USED_REGISTERS CALL_USED_REGISTERS
516 458
517 /* Zero or more C statements that may conditionally modify two variables
518 `fixed_regs' and `call_used_regs' (both of type `char []') after they
519 have been initialized from the two preceding macros.
520
521 This is necessary in case the fixed or call-clobbered registers depend
522 on target flags.
523
524 You need not define this macro if it has no work to do. */
525
526 #ifdef SUBTARGET_CONDITIONAL_REGISTER_USAGE
527 #define CONDITIONAL_REGISTER_USAGE SUBTARGET_CONDITIONAL_REGISTER_USAGE
528 #else
529 #define CONDITIONAL_REGISTER_USAGE \
530 do \
531 { \
532 if (flag_pic) \
533 { \
534 fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
535 call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
536 } \
537 } \
538 while (0)
539 #endif
540
541 /* If defined, an initializer for a vector of integers, containing the 459 /* If defined, an initializer for a vector of integers, containing the
542 numbers of hard registers in the order in which GCC should 460 numbers of hard registers in the order in which GCC should
543 prefer to use them (from most preferred to least). */ 461 prefer to use them (from most preferred to least). */
544 462
545 #ifndef SUBTARGET_REG_ALLOC_ORDER 463 #ifndef SUBTARGET_REG_ALLOC_ORDER
684 ((REGNO) < FIRST_PSEUDO_REGISTER \ 602 ((REGNO) < FIRST_PSEUDO_REGISTER \
685 ? GPR_P (REGNO) || (REGNO) == ARG_POINTER_REGNUM \ 603 ? GPR_P (REGNO) || (REGNO) == ARG_POINTER_REGNUM \
686 : GPR_P (reg_renumber[REGNO])) 604 : GPR_P (reg_renumber[REGNO]))
687 605
688 #define REGNO_OK_FOR_INDEX_P(REGNO) REGNO_OK_FOR_BASE_P(REGNO) 606 #define REGNO_OK_FOR_INDEX_P(REGNO) REGNO_OK_FOR_BASE_P(REGNO)
689
690 /* Given an rtx X being reloaded into a reg required to be
691 in class CLASS, return the class of reg to actually use.
692 In general this is just CLASS; but on some machines
693 in some cases it is preferable to use a more restrictive class. */
694 #define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)
695 607
696 /* Return the maximum number of consecutive registers 608 /* Return the maximum number of consecutive registers
697 needed to represent mode MODE in a register of class CLASS. */ 609 needed to represent mode MODE in a register of class CLASS. */
698 #define CLASS_MAX_NREGS(CLASS, MODE) \ 610 #define CLASS_MAX_NREGS(CLASS, MODE) \
699 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) 611 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
821 `crtl->outgoing_args_size'. No space will be pushed 733 `crtl->outgoing_args_size'. No space will be pushed
822 onto the stack for each call; instead, the function prologue should 734 onto the stack for each call; instead, the function prologue should
823 increase the stack frame size by this amount. */ 735 increase the stack frame size by this amount. */
824 #define ACCUMULATE_OUTGOING_ARGS 1 736 #define ACCUMULATE_OUTGOING_ARGS 1
825 737
826 /* Value is the number of bytes of arguments automatically
827 popped when returning from a subroutine call.
828 FUNDECL is the declaration node of the function (as a tree),
829 FUNTYPE is the data type of the function (as a tree),
830 or for a library call it is an identifier node for the subroutine name.
831 SIZE is the number of bytes of arguments passed on the stack. */
832 #define RETURN_POPS_ARGS(DECL, FUNTYPE, SIZE) 0
833
834 /* Define a data type for recording info about an argument list 738 /* Define a data type for recording info about an argument list
835 during the scan of that argument list. This data type should 739 during the scan of that argument list. This data type should
836 hold all necessary information about the function itself 740 hold all necessary information about the function itself
837 and about the args processed so far, enough to enable macros 741 and about the args processed so far, enough to enable macros
838 such as FUNCTION_ARG to determine where the next arg should go. */ 742 such as FUNCTION_ARG to determine where the next arg should go. */
849 753
850 /* 1 if N is a possible register number for function argument passing. */ 754 /* 1 if N is a possible register number for function argument passing. */
851 #define FUNCTION_ARG_REGNO_P(N) \ 755 #define FUNCTION_ARG_REGNO_P(N) \
852 ((unsigned) (N) < M32R_MAX_PARM_REGS) 756 ((unsigned) (N) < M32R_MAX_PARM_REGS)
853 757
854 /* The ROUND_ADVANCE* macros are local to this file. */
855 /* Round SIZE up to a word boundary. */
856 #define ROUND_ADVANCE(SIZE) \
857 (((SIZE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
858
859 /* Round arg MODE/TYPE up to the next word boundary. */
860 #define ROUND_ADVANCE_ARG(MODE, TYPE) \
861 ((MODE) == BLKmode \
862 ? ROUND_ADVANCE ((unsigned int) int_size_in_bytes (TYPE)) \
863 : ROUND_ADVANCE ((unsigned int) GET_MODE_SIZE (MODE)))
864
865 /* Round CUM up to the necessary point for argument MODE/TYPE. */
866 #define ROUND_ADVANCE_CUM(CUM, MODE, TYPE) (CUM)
867
868 /* Return boolean indicating arg of type TYPE and mode MODE will be passed in
869 a reg. This includes arguments that have to be passed by reference as the
870 pointer to them is passed in a reg if one is available (and that is what
871 we're given).
872 This macro is only used in this file. */
873 #define PASS_IN_REG_P(CUM, MODE, TYPE) \
874 (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) < M32R_MAX_PARM_REGS)
875
876 /* Determine where to put an argument to a function.
877 Value is zero to push the argument on the stack,
878 or a hard register in which to store the argument.
879
880 MODE is the argument's machine mode.
881 TYPE is the data type of the argument (as a tree).
882 This is null for libcalls where that information may
883 not be available.
884 CUM is a variable of type CUMULATIVE_ARGS which gives info about
885 the preceding args and about the function being called.
886 NAMED is nonzero if this argument is a named parameter
887 (otherwise it is an extra parameter matching an ellipsis). */
888 /* On the M32R the first M32R_MAX_PARM_REGS args are normally in registers
889 and the rest are pushed. */
890 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
891 (PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \
892 ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))) \
893 : 0)
894
895 /* Update the data in CUM to advance over an argument
896 of mode MODE and data type TYPE.
897 (TYPE is null for libcalls where that information may not be available.) */
898 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
899 ((CUM) = (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) \
900 + ROUND_ADVANCE_ARG ((MODE), (TYPE))))
901
902 /* If defined, a C expression that gives the alignment boundary, in bits,
903 of an argument with the specified mode and type. If it is not defined,
904 PARM_BOUNDARY is used for all arguments. */
905 #if 0
906 /* We assume PARM_BOUNDARY == UNITS_PER_WORD here. */
907 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
908 (((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) <= PARM_BOUNDARY \
909 ? PARM_BOUNDARY : 2 * PARM_BOUNDARY)
910 #endif
911 758
912 /* Function results. */ 759 /* Function results. */
913
914 /* Define how to find the value returned by a function.
915 VALTYPE is the data type of the value (as a tree).
916 If the precise function being called is known, FUNC is its FUNCTION_DECL;
917 otherwise, FUNC is 0. */
918 #define FUNCTION_VALUE(VALTYPE, FUNC) gen_rtx_REG (TYPE_MODE (VALTYPE), 0)
919
920 /* Define how to find the value returned by a library function
921 assuming the value has mode MODE. */
922 #define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 0)
923
924 /* 1 if N is a possible register number for a function value
925 as seen by the caller. */
926 /* ??? What about r1 in DI/DF values. */
927 #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
928 760
929 /* Tell GCC to use TARGET_RETURN_IN_MEMORY. */ 761 /* Tell GCC to use TARGET_RETURN_IN_MEMORY. */
930 #define DEFAULT_PCC_STRUCT_RETURN 0 762 #define DEFAULT_PCC_STRUCT_RETURN 0
931 763
932 /* Function entry and exit. */ 764 /* Function entry and exit. */
1024 (! (GET_CODE (X) == CONST \ 856 (! (GET_CODE (X) == CONST \
1025 && GET_CODE (XEXP (X, 0)) == PLUS \ 857 && GET_CODE (XEXP (X, 0)) == PLUS \
1026 && (GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF || GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF) \ 858 && (GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF || GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF) \
1027 && CONST_INT_P (XEXP (XEXP (X, 0), 1)) \ 859 && CONST_INT_P (XEXP (XEXP (X, 0), 1)) \
1028 && (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (X, 0), 1)) > 32767)) 860 && (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (X, 0), 1)) > 32767))
1029
1030 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
1031 and check its validity for a certain class.
1032 We have two alternate definitions for each of them.
1033 The usual definition accepts all pseudo regs; the other rejects
1034 them unless they have been allocated suitable hard regs.
1035 The symbol REG_OK_STRICT causes the latter definition to be used.
1036
1037 Most source files want to accept pseudo regs in the hope that
1038 they will get allocated to the class that the insn wants them to be in.
1039 Source files for reload pass need to be strict.
1040 After reload, it makes no difference, since pseudo regs have
1041 been eliminated by then. */
1042
1043 #ifdef REG_OK_STRICT
1044
1045 /* Nonzero if X is a hard reg that can be used as a base reg. */
1046 #define REG_OK_FOR_BASE_P(X) GPR_P (REGNO (X))
1047 /* Nonzero if X is a hard reg that can be used as an index. */
1048 #define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
1049
1050 #else
1051
1052 /* Nonzero if X is a hard reg that can be used as a base reg
1053 or if it is a pseudo reg. */
1054 #define REG_OK_FOR_BASE_P(X) \
1055 (GPR_P (REGNO (X)) \
1056 || (REGNO (X)) == ARG_POINTER_REGNUM \
1057 || REGNO (X) >= FIRST_PSEUDO_REGISTER)
1058 /* Nonzero if X is a hard reg that can be used as an index
1059 or if it is a pseudo reg. */
1060 #define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
1061
1062 #endif
1063
1064 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
1065 that is a valid memory address for an instruction.
1066 The MODE argument is the machine mode for the MEM expression
1067 that wants to use this address. */
1068
1069 /* Local to this file. */
1070 #define RTX_OK_FOR_BASE_P(X) (REG_P (X) && REG_OK_FOR_BASE_P (X))
1071
1072 /* Local to this file. */
1073 #define RTX_OK_FOR_OFFSET_P(X) \
1074 (CONST_INT_P (X) && INT16_P (INTVAL (X)))
1075
1076 /* Local to this file. */
1077 #define LEGITIMATE_OFFSET_ADDRESS_P(MODE, X) \
1078 (GET_CODE (X) == PLUS \
1079 && RTX_OK_FOR_BASE_P (XEXP (X, 0)) \
1080 && RTX_OK_FOR_OFFSET_P (XEXP (X, 1)))
1081
1082 /* Local to this file. */
1083 /* For LO_SUM addresses, do not allow them if the MODE is > 1 word,
1084 since more than one instruction will be required. */
1085 #define LEGITIMATE_LO_SUM_ADDRESS_P(MODE, X) \
1086 (GET_CODE (X) == LO_SUM \
1087 && (MODE != BLKmode && GET_MODE_SIZE (MODE) <= UNITS_PER_WORD)\
1088 && RTX_OK_FOR_BASE_P (XEXP (X, 0)) \
1089 && CONSTANT_P (XEXP (X, 1)))
1090
1091 /* Local to this file. */
1092 /* Is this a load and increment operation. */
1093 #define LOAD_POSTINC_P(MODE, X) \
1094 (((MODE) == SImode || (MODE) == SFmode) \
1095 && GET_CODE (X) == POST_INC \
1096 && REG_P (XEXP (X, 0)) \
1097 && RTX_OK_FOR_BASE_P (XEXP (X, 0)))
1098
1099 /* Local to this file. */
1100 /* Is this an increment/decrement and store operation. */
1101 #define STORE_PREINC_PREDEC_P(MODE, X) \
1102 (((MODE) == SImode || (MODE) == SFmode) \
1103 && (GET_CODE (X) == PRE_INC || GET_CODE (X) == PRE_DEC) \
1104 && REG_P (XEXP (X, 0)) \
1105 && RTX_OK_FOR_BASE_P (XEXP (X, 0)))
1106
1107 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
1108 do \
1109 { \
1110 if (RTX_OK_FOR_BASE_P (X)) \
1111 goto ADDR; \
1112 if (LEGITIMATE_OFFSET_ADDRESS_P ((MODE), (X))) \
1113 goto ADDR; \
1114 if (LEGITIMATE_LO_SUM_ADDRESS_P ((MODE), (X))) \
1115 goto ADDR; \
1116 if (LOAD_POSTINC_P ((MODE), (X))) \
1117 goto ADDR; \
1118 if (STORE_PREINC_PREDEC_P ((MODE), (X))) \
1119 goto ADDR; \
1120 } \
1121 while (0)
1122
1123 /* Go to LABEL if ADDR (a legitimate address expression)
1124 has an effect that depends on the machine mode it is used for. */
1125 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
1126 do \
1127 { \
1128 if (GET_CODE (ADDR) == LO_SUM) \
1129 goto LABEL; \
1130 } \
1131 while (0)
1132 861
1133 /* Condition code usage. */ 862 /* Condition code usage. */
1134 863
1135 /* Return nonzero if SELECT_CC_MODE will never return MODE for a 864 /* Return nonzero if SELECT_CC_MODE will never return MODE for a
1136 floating point inequality comparison. */ 865 floating point inequality comparison. */
1137 #define REVERSIBLE_CC_MODE(MODE) 1 /*???*/ 866 #define REVERSIBLE_CC_MODE(MODE) 1 /*???*/
1138 867
1139 /* Costs. */ 868 /* Costs. */
1140
1141 /* Compute extra cost of moving data between one register class
1142 and another. */
1143 #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) 2
1144
1145 /* Compute the cost of moving data between registers and memory. */
1146 /* Memory is 3 times as expensive as registers.
1147 ??? Is that the right way to look at it? */
1148 #define MEMORY_MOVE_COST(MODE,CLASS,IN_P) \
1149 (GET_MODE_SIZE (MODE) <= UNITS_PER_WORD ? 6 : 12)
1150 869
1151 /* The cost of a branch insn. */ 870 /* The cost of a branch insn. */
1152 /* A value of 2 here causes GCC to avoid using branches in comparisons like 871 /* A value of 2 here causes GCC to avoid using branches in comparisons like
1153 while (a < N && a). Branches aren't that expensive on the M32R so 872 while (a < N && a). Branches aren't that expensive on the M32R so
1154 we define this as 1. Defining it as 2 had a heavy hit in fp-bit.c. */ 873 we define this as 1. Defining it as 2 had a heavy hit in fp-bit.c. */
1272 { "r14", RETURN_ADDR_REGNUM }, \ 991 { "r14", RETURN_ADDR_REGNUM }, \
1273 { "r15", STACK_POINTER_REGNUM }, \ 992 { "r15", STACK_POINTER_REGNUM }, \
1274 SUBTARGET_ADDITIONAL_REGISTER_NAMES \ 993 SUBTARGET_ADDITIONAL_REGISTER_NAMES \
1275 } 994 }
1276 995
1277 /* A C expression which evaluates to true if CODE is a valid
1278 punctuation character for use in the `PRINT_OPERAND' macro. */
1279 extern char m32r_punct_chars[256];
1280 #define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
1281 m32r_punct_chars[(unsigned char) (CHAR)]
1282
1283 /* Print operand X (an rtx) in assembler syntax to file FILE.
1284 CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
1285 For `%' followed by punctuation, CODE is the punctuation and X is null. */
1286 #define PRINT_OPERAND(FILE, X, CODE) \
1287 m32r_print_operand (FILE, X, CODE)
1288
1289 /* A C compound statement to output to stdio stream STREAM the
1290 assembler syntax for an instruction operand that is a memory
1291 reference whose address is ADDR. ADDR is an RTL expression. */
1292 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
1293 m32r_print_operand_address (FILE, ADDR)
1294
1295 /* If defined, C string expressions to be used for the `%R', `%L', 996 /* If defined, C string expressions to be used for the `%R', `%L',
1296 `%U', and `%I' options of `asm_fprintf' (see `final.c'). These 997 `%U', and `%I' options of `asm_fprintf' (see `final.c'). These
1297 are useful when a single `md' file must support multiple assembler 998 are useful when a single `md' file must support multiple assembler
1298 formats. In that case, the various `tm.h' files can define these 999 formats. In that case, the various `tm.h' files can define these
1299 macros differently. */ 1000 macros differently. */
1368 #undef ASM_OUTPUT_ALIGNED_COMMON 1069 #undef ASM_OUTPUT_ALIGNED_COMMON
1369 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ 1070 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
1370 do \ 1071 do \
1371 { \ 1072 { \
1372 if (! TARGET_SDATA_NONE \ 1073 if (! TARGET_SDATA_NONE \
1373 && (SIZE) > 0 && (SIZE) <= g_switch_value) \ 1074 && (SIZE) > 0 \
1075 && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value) \
1374 fprintf ((FILE), "%s", SCOMMON_ASM_OP); \ 1076 fprintf ((FILE), "%s", SCOMMON_ASM_OP); \
1375 else \ 1077 else \
1376 fprintf ((FILE), "%s", COMMON_ASM_OP); \ 1078 fprintf ((FILE), "%s", COMMON_ASM_OP); \
1377 assemble_name ((FILE), (NAME)); \ 1079 assemble_name ((FILE), (NAME)); \
1378 fprintf ((FILE), ",%u,%u\n", (int)(SIZE), (ALIGN) / BITS_PER_UNIT);\ 1080 fprintf ((FILE), ",%u,%u\n", (int)(SIZE), (ALIGN) / BITS_PER_UNIT);\
1381 1083
1382 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ 1084 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
1383 do \ 1085 do \
1384 { \ 1086 { \
1385 if (! TARGET_SDATA_NONE \ 1087 if (! TARGET_SDATA_NONE \
1386 && (SIZE) > 0 && (SIZE) <= g_switch_value) \ 1088 && (SIZE) > 0 \
1089 && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value) \
1387 switch_to_section (get_named_section (NULL, ".sbss", 0)); \ 1090 switch_to_section (get_named_section (NULL, ".sbss", 0)); \
1388 else \ 1091 else \
1389 switch_to_section (bss_section); \ 1092 switch_to_section (bss_section); \
1390 ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ 1093 ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \
1391 last_assemble_variable_decl = DECL; \ 1094 last_assemble_variable_decl = DECL; \