OSDN Git Service

* ginclude/varargs.h: Replace with stub which issues #error.
[pf3gnuchains/gcc-fork.git] / gcc / config / arc / arc.h
index 651d81e..db8b8d4 100644 (file)
@@ -43,13 +43,17 @@ Boston, MA 02111-1307, USA.  */
 #define TARGET_VERSION fprintf (stderr, " (arc)")
 
 /* Names to predefine in the preprocessor for this target machine.  */
-#define CPP_PREDEFINES "-Acpu=arc -Amachine=arc -D__arc__"
-
-/* Additional flags for the preprocessor.  */
-#define CPP_SPEC "\
-%{!mcpu=*:-D__base__} %{mcpu=base:-D__base__} \
-%{EB:-D__big_endian__} \
-"
+#define TARGET_CPU_CPP_BUILTINS()              \
+  do                                           \
+    {                                          \
+       builtin_define ("__arc__");             \
+       if (TARGET_BIG_ENDIAN)                  \
+         builtin_define ("__big_endian__");    \
+       if (arc_cpu_type == 0)                  \
+         builtin_define ("__base__");          \
+       builtin_assert ("cpu=arc");             \
+       builtin_assert ("machine=arc");         \
+    } while (0)
 
 /* Pass -mmangle-cpu if we get -mcpu=*.
    Doing it this way lets one have it on as default with -mcpu=*,
@@ -661,15 +665,9 @@ extern enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
    a reg.  This includes arguments that have to be passed by reference as the
    pointer to them is passed in a reg if one is available (and that is what
    we're given).
-   When passing arguments NAMED is always 1.  When receiving arguments NAMED
-   is 1 for each argument except the last in a stdarg/varargs function.  In
-   a stdarg function we want to treat the last named arg as named.  In a
-   varargs function we want to treat the last named arg (which is
-   `__builtin_va_alist') as unnamed.
    This macro is only used in this file.  */
-#define PASS_IN_REG_P(CUM, MODE, TYPE, NAMED) \
-((!current_function_varargs || (NAMED))                                        \
- && (CUM) < MAX_ARC_PARM_REGS                                          \
+#define PASS_IN_REG_P(CUM, MODE, TYPE) \
+((CUM) < MAX_ARC_PARM_REGS                                             \
  && ((ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))                                \
       + ROUND_ADVANCE_ARG ((MODE), (TYPE))                             \
       <= MAX_ARC_PARM_REGS)))
@@ -689,7 +687,7 @@ extern enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
 /* On the ARC the first MAX_ARC_PARM_REGS args are normally in registers
    and the rest are pushed.  */
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-(PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED))                                \
+(PASS_IN_REG_P ((CUM), (MODE), (TYPE)                                \
  ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)))     \
  : 0)
 
@@ -986,15 +984,6 @@ do { \
     goto LABEL;                                \
 }
 \f
-/* Condition code usage.  */
-
-/* Some insns set all condition code flags, some only set the ZNC flags, and
-   some only set the ZN flags.  */
-
-#define EXTRA_CC_MODES \
-       CC(CCZNCmode, "CCZNC") \
-       CC(CCZNmode, "CCZN")
-
 /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
    return the mode to be used for the comparison.  */
 #define SELECT_CC_MODE(OP, X, Y) \
@@ -1102,12 +1091,12 @@ extern const char *arc_text_section, *arc_data_section, *arc_rodata_section;
 #if defined (CRT_INIT) || defined (CRT_FINI)
 #define TEXT_SECTION_ASM_OP    "\t.section .text"
 #else
-#define TEXT_SECTION_ASM_OP    arc_text_section /*"\t.section .text"*/
+#define TEXT_SECTION_ASM_OP    arc_text_section
 #endif
-#define DATA_SECTION_ASM_OP    arc_data_section /*"\t.section .data"*/
+#define DATA_SECTION_ASM_OP    arc_data_section
 
-#undef CONST_SECTION_ASM_OP
-#define CONST_SECTION_ASM_OP   arc_rodata_section /*"\t.section .rodata"*/
+#undef  READONLY_DATA_SECTION_ASM_OP
+#define READONLY_DATA_SECTION_ASM_OP   arc_rodata_section
 
 #define BSS_SECTION_ASM_OP     "\t.section .bss"
 
@@ -1117,35 +1106,6 @@ extern const char *arc_text_section, *arc_data_section, *arc_rodata_section;
    This macro is irrelevant if there is no separate readonly data section.  */
 /*#define JUMP_TABLES_IN_TEXT_SECTION*/
 
-/* Define this macro if references to a symbol must be treated
-   differently depending on something about the variable or
-   function named by the symbol (such as what section it is in).
-
-   The macro definition, if any, is executed immediately after the
-   rtl for DECL or other node is created.
-   The value of the rtl will be a `mem' whose address is a
-   `symbol_ref'.
-
-   The usual thing for this macro to do is to store a flag in the
-   `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
-   name string in the `symbol_ref' (if one bit is not enough
-   information).  */
-
-/* On the ARC, function addresses are not the same as normal addresses.
-   Branch to absolute address insns take an address that is right-shifted
-   by 2.  We encode the fact that we have a function here, and then emit a
-   special assembler op when outputting the address.  */
-#define ENCODE_SECTION_INFO(DECL, FIRST)               \
-do {                                                   \
-  if (TREE_CODE (DECL) == FUNCTION_DECL)               \
-    SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;   \
-} while (0)
-
-/* Decode SYM_NAME and store the real name part in VAR, sans
-   the characters that encode section info.  Define this macro if
-   ENCODE_SECTION_INFO alters the symbol's name string.  */
-/*#define STRIP_NAME_ENCODING(VAR, SYM_NAME)*/
-
 /* For DWARF.  Marginally different than default so output is "prettier"
    (and consistent with above).  */
 #define PUSHSECTION_ASM_OP "\t.section "
@@ -1320,12 +1280,7 @@ arc_print_operand (FILE, X, CODE)
 
 /* A C compound statement to output to stdio stream STREAM the
    assembler syntax for an instruction operand that is a memory
-   reference whose address is ADDR.  ADDR is an RTL expression.
-
-   On some machines, the syntax for a symbolic address depends on
-   the section that the address refers to.  On these machines,
-   define the macro `ENCODE_SECTION_INFO' to store the information
-   into the `symbol_ref', and then check for it here.  */
+   reference whose address is ADDR.  ADDR is an RTL expression.  */
 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
 arc_print_operand_address (FILE, ADDR)