Mercurial > hg > CbC > CbC_gcc
diff gcc/config/mcore/mcore.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 | b7f97abdc517 |
children | 04ced10e8804 |
line wrap: on
line diff
--- a/gcc/config/mcore/mcore.h Tue May 25 18:58:51 2010 +0900 +++ b/gcc/config/mcore/mcore.h Tue Mar 22 17:18:12 2011 +0900 @@ -1,7 +1,7 @@ /* Definitions of target machine for GNU compiler, for Motorola M*CORE Processor. Copyright (C) 1993, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, - 2008, 2009 Free Software Foundation, Inc. + 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -85,36 +85,6 @@ /* The MCore ABI says that bitfields are unsigned by default. */ #define CC1_SPEC "-funsigned-bitfields" -/* What options are we going to default to specific settings when - -O* happens; the user can subsequently override these settings. - - Omitting the frame pointer is a very good idea on the MCore. - Scheduling isn't worth anything on the current MCore implementation. */ -#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \ -{ \ - if (LEVEL) \ - { \ - flag_no_function_cse = 1; \ - flag_omit_frame_pointer = 1; \ - \ - if (LEVEL >= 2) \ - { \ - flag_caller_saves = 0; \ - flag_schedule_insns = 0; \ - flag_schedule_insns_after_reload = 0; \ - } \ - } \ - if (SIZE) \ - { \ - target_flags &= ~MASK_HARDLIT; \ - } \ -} - -/* What options are we going to force to specific settings, - regardless of what the user thought he wanted. - We also use this for some post-processing of options. */ -#define OVERRIDE_OPTIONS mcore_override_options () - /* Target machine storage Layout. */ #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ @@ -136,12 +106,6 @@ numbered. */ #define WORDS_BIG_ENDIAN (! TARGET_LITTLE_END) -#define LIBGCC2_WORDS_BIG_ENDIAN 1 -#ifdef __MCORELE__ -#undef LIBGCC2_WORDS_BIG_ENDIAN -#define LIBGCC2_WORDS_BIG_ENDIAN 0 -#endif - #define MAX_BITS_PER_WORD 32 /* Width of a word, in units (bytes). */ @@ -155,16 +119,10 @@ /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY 32 -/* Doubles must be aligned to an 8 byte boundary. */ -#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ - ((MODE != BLKmode && (GET_MODE_SIZE (MODE) == 8)) \ - ? BIGGEST_ALIGNMENT : PARM_BOUNDARY) - /* Boundary (in *bits*) on which stack pointer should be aligned. */ #define STACK_BOUNDARY (TARGET_8ALIGN ? 64 : 32) /* Largest increment in UNITS we allow the stack to grow in a single operation. */ -extern int mcore_stack_increment; #define STACK_UNITS_MAXSTEP 4096 /* Allocation boundary (in *bits*) for the code of a function. */ @@ -416,82 +374,23 @@ #define INDEX_REG_CLASS NO_REGS #define BASE_REG_CLASS GENERAL_REGS -/* Get reg_class from a letter such as appears in the machine - description. */ -extern const enum reg_class reg_class_from_letter[]; - -#define REG_CLASS_FROM_LETTER(C) \ - (ISLOWER (C) ? reg_class_from_letter[(C) - 'a'] : NO_REGS) - -/* The letters I, J, K, L, M, N, O, and P in a register constraint string - can be used to stand for particular ranges of immediate operands. - This macro defines what the ranges are. - C is the letter, and VALUE is a constant value. - Return 1 if VALUE is in the range specified by C. - I: loadable by movi (0..127) - J: arithmetic operand 1..32 - K: shift operand 0..31 - L: negative arithmetic operand -1..-32 - M: powers of two, constants loadable by bgeni - N: powers of two minus 1, constants loadable by bmaski, including -1 - O: allowed by cmov with two constants +/- 1 of each other - P: values we will generate 'inline' -- without an 'lrw' - - Others defined for use after reload - Q: constant 1 - R: a label - S: 0/1/2 cleared bits out of 32 [for bclri's] - T: 2 set bits out of 32 [for bseti's] - U: constant 0 - xxxS: 1 cleared bit out of 32 (complement of power of 2). for bclri - xxxT: 2 cleared bits out of 32. for pairs of bclris. */ -#define CONST_OK_FOR_I(VALUE) (((HOST_WIDE_INT)(VALUE)) >= 0 && ((HOST_WIDE_INT)(VALUE)) <= 0x7f) -#define CONST_OK_FOR_J(VALUE) (((HOST_WIDE_INT)(VALUE)) > 0 && ((HOST_WIDE_INT)(VALUE)) <= 32) -#define CONST_OK_FOR_L(VALUE) (((HOST_WIDE_INT)(VALUE)) < 0 && ((HOST_WIDE_INT)(VALUE)) >= -32) -#define CONST_OK_FOR_K(VALUE) (((HOST_WIDE_INT)(VALUE)) >= 0 && ((HOST_WIDE_INT)(VALUE)) <= 31) -#define CONST_OK_FOR_M(VALUE) (exact_log2 (VALUE) >= 0 && exact_log2 (VALUE) <= 30) -#define CONST_OK_FOR_N(VALUE) (((HOST_WIDE_INT)(VALUE)) == -1 || (exact_log2 ((VALUE) + 1) >= 0 && exact_log2 ((VALUE) + 1) <= 30)) -#define CONST_OK_FOR_O(VALUE) (CONST_OK_FOR_I(VALUE) || \ - CONST_OK_FOR_M(VALUE) || \ - CONST_OK_FOR_N(VALUE) || \ - CONST_OK_FOR_M((HOST_WIDE_INT)(VALUE) - 1) || \ - CONST_OK_FOR_N((HOST_WIDE_INT)(VALUE) + 1)) - -#define CONST_OK_FOR_P(VALUE) (mcore_const_ok_for_inline (VALUE)) - -#define CONST_OK_FOR_LETTER_P(VALUE, C) \ - ((C) == 'I' ? CONST_OK_FOR_I (VALUE) \ - : (C) == 'J' ? CONST_OK_FOR_J (VALUE) \ - : (C) == 'L' ? CONST_OK_FOR_L (VALUE) \ - : (C) == 'K' ? CONST_OK_FOR_K (VALUE) \ - : (C) == 'M' ? CONST_OK_FOR_M (VALUE) \ - : (C) == 'N' ? CONST_OK_FOR_N (VALUE) \ - : (C) == 'P' ? CONST_OK_FOR_P (VALUE) \ - : (C) == 'O' ? CONST_OK_FOR_O (VALUE) \ - : 0) - -/* Similar, but for floating constants, and defining letters G and H. - Here VALUE is the CONST_DOUBLE rtx itself. */ -#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ - ((C) == 'G' ? CONST_OK_FOR_I (CONST_DOUBLE_HIGH (VALUE)) \ - && CONST_OK_FOR_I (CONST_DOUBLE_LOW (VALUE)) \ - : 0) - -/* Letters in the range `Q' through `U' in a register constraint string - may be defined in a machine-dependent fashion to stand for arbitrary - operand types. */ -#define EXTRA_CONSTRAINT(OP, C) \ - ((C) == 'R' ? (GET_CODE (OP) == MEM \ - && GET_CODE (XEXP (OP, 0)) == LABEL_REF) \ - : (C) == 'S' ? (GET_CODE (OP) == CONST_INT \ - && mcore_num_zeros (INTVAL (OP)) <= 2) \ - : (C) == 'T' ? (GET_CODE (OP) == CONST_INT \ - && mcore_num_ones (INTVAL (OP)) == 2) \ - : (C) == 'Q' ? (GET_CODE (OP) == CONST_INT \ - && INTVAL(OP) == 1) \ - : (C) == 'U' ? (GET_CODE (OP) == CONST_INT \ - && INTVAL(OP) == 0) \ - : 0) +/* Convenience wrappers around insn_const_int_ok_for_constraint. */ +#define CONST_OK_FOR_I(VALUE) \ + insn_const_int_ok_for_constraint (VALUE, CONSTRAINT_I) +#define CONST_OK_FOR_J(VALUE) \ + insn_const_int_ok_for_constraint (VALUE, CONSTRAINT_J) +#define CONST_OK_FOR_L(VALUE) \ + insn_const_int_ok_for_constraint (VALUE, CONSTRAINT_L) +#define CONST_OK_FOR_K(VALUE) \ + insn_const_int_ok_for_constraint (VALUE, CONSTRAINT_K) +#define CONST_OK_FOR_M(VALUE) \ + insn_const_int_ok_for_constraint (VALUE, CONSTRAINT_M) +#define CONST_OK_FOR_N(VALUE) \ + insn_const_int_ok_for_constraint (VALUE, CONSTRAINT_N) +#define CONST_OK_FOR_O(VALUE) \ + insn_const_int_ok_for_constraint (VALUE, CONSTRAINT_O) +#define CONST_OK_FOR_P(VALUE) \ + insn_const_int_ok_for_constraint (VALUE, CONSTRAINT_P) /* Given an rtx X being reloaded into a reg required to be in class CLASS, return the class of reg to actually use. @@ -540,16 +439,6 @@ /* Offset of first parameter from the argument pointer register value. */ #define FIRST_PARM_OFFSET(FNDECL) 0 -/* Value is the number of byte of arguments automatically - popped when returning from a subroutine call. - FUNTYPE is the data type of the function (as a tree), - or for a library call it is an identifier node for the subroutine name. - SIZE is the number of bytes of arguments passed on the stack. - - On the MCore, the callee does not pop any of its arguments that were passed - on the stack. */ -#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 - /* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). If the precise function being called is known, FUNC is its FUNCTION_DECL; @@ -606,18 +495,6 @@ #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ ((CUM) = 0) -/* Update the data in CUM to advance over an argument - of mode MODE and data type TYPE. - (TYPE is null for libcalls where that information may not be - available.) */ -#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - ((CUM) = (ROUND_REG ((CUM), (MODE)) \ - + ((NAMED) * mcore_num_arg_regs (MODE, TYPE)))) \ - -/* Define where to put the arguments to a function. */ -#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - mcore_function_arg (CUM, MODE, TYPE, NAMED) - /* Call the function profiler with a given profile label. */ #define FUNCTION_PROFILER(STREAM,LABELNO) \ { \ @@ -756,9 +633,18 @@ /* 'char' is signed by default. */ #define DEFAULT_SIGNED_CHAR 0 -/* The type of size_t unsigned int. */ +#undef SIZE_TYPE #define SIZE_TYPE "unsigned int" +#undef PTRDIFF_TYPE +#define PTRDIFF_TYPE "int" + +#undef WCHAR_TYPE +#define WCHAR_TYPE "long int" + +#undef WCHAR_TYPE_SIZE +#define WCHAR_TYPE_SIZE BITS_PER_WORD + /* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */ #define MOVE_MAX 4 @@ -817,6 +703,8 @@ #undef TARGET_ASM_NAMED_SECTION #define TARGET_ASM_NAMED_SECTION mcore_asm_named_section +#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (SImode, LK_REG) + /* This is how to output an insn to push a register on the stack. It need not be very fast code. */ #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ @@ -960,15 +848,4 @@ } \ while (0) -/* Print operand X (an rtx) in assembler syntax to file FILE. - CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. - For `%' followed by punctuation, CODE is the punctuation and X is null. */ -#define PRINT_OPERAND(STREAM, X, CODE) mcore_print_operand (STREAM, X, CODE) - -/* Print a memory address as an operand to reference that memory location. */ -#define PRINT_OPERAND_ADDRESS(STREAM,X) mcore_print_operand_address (STREAM, X) - -#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ - ((CHAR)=='.' || (CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^' || (CHAR) == '!') - #endif /* ! GCC_MCORE_H */