diff gcc/config/moxie/moxie.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/moxie/moxie.h	Tue May 25 18:58:51 2010 +0900
+++ b/gcc/config/moxie/moxie.h	Tue Mar 22 17:18:12 2011 +0900
@@ -21,20 +21,6 @@
 #ifndef GCC_MOXIE_H
 #define GCC_MOXIE_H
 
-/* This is defined by svr4.h, which is included prior to this file.
-   However, we should undefine it for moxie-elf, since we don't provide
-   functions like access() and mkdir() in newlib.  This will have to
-   be defined again for a Linux port.  */
-#undef TARGET_POSIX_IO
-
-/* Another C string constant used much like `LINK_SPEC'.  The difference
-   between the two is that `STARTFILE_SPEC' is used at the very beginning of
-   the command given to the linker.
-
-   If this macro is not defined, a default is provided that loads the standard
-   C startup file from the usual place.  See `gcc.c'.
-
-   Defined in svr4.h.  */
 #undef  STARTFILE_SPEC
 #define STARTFILE_SPEC "crt0%O%s crti.o%s crtbegin.o%s"
 
@@ -54,6 +40,10 @@
 #undef LIB_SPEC
 #define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"
 
+#undef  LINK_SPEC
+#define LINK_SPEC "%{h*} %{v:-V} \
+		   %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic}"
+
 /* Layout of Source Language Data Types */
 
 #define INT_TYPE_SIZE 32
@@ -67,6 +57,18 @@
 
 #define DEFAULT_SIGNED_CHAR 1
 
+#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
+
 /* Registers...
 
    $fp  - frame pointer
@@ -201,11 +203,6 @@
 #define CLASS_MAX_NREGS(CLASS, MODE) \
   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
 
-/* A C expression that places additional restrictions on the register
-   class to use when it is necessary to copy value X into a register
-   in class CLASS.  */
-#define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
-
 /* The Overall Framework of an Assembler File */
 
 #undef  ASM_SPEC
@@ -236,11 +233,6 @@
 
 /* Passing Arguments in Registers */
 
-/* A C expression that controls whether a function argument is passed
-   in a register, and which register.  */
-#define FUNCTION_ARG(CUM,MODE,TYPE,NAMED) \
-  moxie_function_arg(CUM,MODE,TYPE,NAMED)
-
 /* A C type for declaring a variable that is used as the first
    argument of `FUNCTION_ARG' and other related values.  */
 #define CUMULATIVE_ARGS unsigned int
@@ -258,28 +250,8 @@
 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS) \
   (CUM = MOXIE_R0)
 
-#define MOXIE_FUNCTION_ARG_SIZE(MODE, TYPE)	\
-  ((MODE) != BLKmode ? GET_MODE_SIZE (MODE)	\
-   : (unsigned) int_size_in_bytes (TYPE))
-
-#define FUNCTION_ARG_ADVANCE(CUM,MODE,TYPE,NAMED) \
-  (CUM = (CUM < MOXIE_R6 ?                        \
-          CUM + ((3 + MOXIE_FUNCTION_ARG_SIZE(MODE,TYPE))/4) : CUM ))
-
 /* How Scalar Function Values Are Returned */
 
-/* These macros are deprecated, but we still need them for now since
-   the version of gcc we're using doesn't fully support
-   TARGET_FUNCTION_VALUE.  */
-#define FUNCTION_VALUE(VALTYPE, FUNC) \
-  moxie_function_value (VALTYPE, FUNC, 0)
-#define FUNCTION_OUTGOING_VALUE(VALTYPE, FUNC) \
-  moxie_function_value (VALTYPE, FUNC, 1)
-
-/* A C expression to create an RTX representing the place where a
-   library function returns a value of mode MODE.  */
-#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 2)
-
 /* STACK AND CALLING */
 
 /* Define this macro if pushing a word onto the stack moves the stack
@@ -315,7 +287,20 @@
    pointer registers are already assumed to be used as needed.  */
 #define EPILOGUE_USES(R) (R == MOXIE_R5)
 
-#define OVERRIDE_OPTIONS moxie_override_options ()
+/* A C expression whose value is RTL representing the location of the
+   incoming return address at the beginning of any function, before
+   the prologue.  */
+#define INCOMING_RETURN_ADDR_RTX					\
+  gen_frame_mem (Pmode,							\
+		 plus_constant (stack_pointer_rtx, UNITS_PER_WORD))
+
+/* Describe how we implement __builtin_eh_return.  */
+#define EH_RETURN_DATA_REGNO(N)	((N) < 4 ? (N+2) : INVALID_REGNUM)
+
+/* Store the return handler into the call frame.  */
+#define EH_RETURN_HANDLER_RTX						\
+  gen_frame_mem (Pmode,							\
+		 plus_constant (frame_pointer_rtx, UNITS_PER_WORD))
 
 /* Storage Layout */
 
@@ -429,10 +414,6 @@
    register in which function arguments are sometimes passed.  */
 #define FUNCTION_ARG_REGNO_P(r) (r >= MOXIE_R0 && r <= MOXIE_R5)
 
-/* A C expression that is nonzero if REGNO is the number of a hard
-   register in which the values of called function may come back.  */
-#define FUNCTION_VALUE_REGNO_P(r) (r == MOXIE_R0)
-
 /* A macro whose definition is the name of the class to which a valid
    base register must belong.  A base register is one used in an
    address which is the register value plus a displacement.  */
@@ -441,7 +422,7 @@
 #define INDEX_REG_CLASS NO_REGS
 
 #define HARD_REGNO_OK_FOR_BASE_P(NUM) \
-  ((NUM) >= 0 && (NUM) < FIRST_PSEUDO_REGISTER \
+  ((unsigned) (NUM) < FIRST_PSEUDO_REGISTER \
    && (REGNO_REG_CLASS(NUM) == GENERAL_REGS \
        || (NUM) == HARD_FRAME_POINTER_REGNUM))
 
@@ -469,8 +450,6 @@
 /* All load operations zero extend.  */
 #define LOAD_EXTEND_OP(MEM) ZERO_EXTEND
 
-#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0
-
 /* A C expression that is nonzero if X is a legitimate constant for
    an immediate operand on the target machine.  */
 #define LEGITIMATE_CONSTANT_P(X) 1