arc-protos.h: Remove the prototype for arc_setup_incoming_varargs.
authorKazu Hirata <kazu@cs.umass.edu>
Fri, 6 Feb 2004 05:41:12 +0000 (05:41 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 6 Feb 2004 05:41:12 +0000 (05:41 +0000)
* config/arc/arc-protos.h: Remove the prototype for
arc_setup_incoming_varargs.
* config/arc/arc.c (TARGET_ASM_EXTERNAL_LIBCALL): New.
(TARGET_SETUP_INCOMING_VARARGS): Likewise.
(arc_setup_incoming_varargs): Make it static.
(arc_external_libcall): Likewise.
* config/arc/arc.h (SETUP_INCOMING_VARARGS): Remove.
Remove the commented-out definition of
ASM_OUTPUT_EXTERNAL_LIBCALL.

From-SVN: r77374

gcc/ChangeLog
gcc/config/arc/arc-protos.h
gcc/config/arc/arc.c
gcc/config/arc/arc.h

index c480609b67f05de3aeafd22e0d5aaf65d786336f..ca4e7cd992ec562ffdca796ad004d4c61c349a2d 100644 (file)
@@ -1,3 +1,15 @@
+2004-02-06  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/arc/arc-protos.h: Remove the prototype for
+       arc_setup_incoming_varargs.
+       * config/arc/arc.c (TARGET_ASM_EXTERNAL_LIBCALL): New.
+       (TARGET_SETUP_INCOMING_VARARGS): Likewise.
+       (arc_setup_incoming_varargs): Make it static.
+       (arc_external_libcall): Likewise.
+       * config/arc/arc.h (SETUP_INCOMING_VARARGS): Remove.
+       Remove the commented-out definition of
+       ASM_OUTPUT_EXTERNAL_LIBCALL.
+
 2004-02-05  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
 
        * config/sh/t-linux (SHLIB_INSTALL): Prepend $$(DESTDIR)
index 681e9e1ad92af747ce8db916e479a888e14995f4..da9f70afe4beefa9e1e8f09d0d2abca7aa8c2818 100644 (file)
@@ -59,8 +59,6 @@ extern int shift_operator (rtx, enum machine_mode);
 
 #ifdef TREE_CODE
 extern enum arc_function_type arc_compute_function_type (tree);
-extern void arc_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
-                                       tree, int *, int);
 #endif /* TREE_CODE */
 
 
index e8e40199177f493e807f282faef337d3fb639380..c838f32ea83c90f7b10d376bc478cfa2ca08f1bb 100644 (file)
@@ -96,8 +96,11 @@ static void arc_output_function_prologue (FILE *, HOST_WIDE_INT);
 static void arc_output_function_epilogue (FILE *, HOST_WIDE_INT);
 static void arc_file_start (void);
 static void arc_internal_label (FILE *, const char *, unsigned long);
+static void arc_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
+                                       tree, int *, int);
 static bool arc_rtx_costs (rtx, int, int, int *);
 static int arc_address_cost (rtx);
+static void arc_external_libcall (rtx);
 static bool arc_return_in_memory (tree, tree);
 \f
 /* Initialize the GCC target structure.  */
@@ -118,6 +121,8 @@ static bool arc_return_in_memory (tree, tree);
 #define TARGET_ATTRIBUTE_TABLE arc_attribute_table
 #undef TARGET_ASM_INTERNAL_LABEL
 #define TARGET_ASM_INTERNAL_LABEL arc_internal_label
+#undef TARGET_ASM_EXTERNAL_LIBCALL
+#define TARGET_ASM_EXTERNAL_LIBCALL arc_external_libcall
 
 #undef TARGET_RTX_COSTS
 #define TARGET_RTX_COSTS arc_rtx_costs
@@ -136,6 +141,9 @@ static bool arc_return_in_memory (tree, tree);
 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY arc_return_in_memory
 
+#undef TARGET_SETUP_INCOMING_VARARGS
+#define TARGET_SETUP_INCOMING_VARARGS arc_setup_incoming_varargs
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Called by OVERRIDE_OPTIONS to initialize various things.  */
@@ -774,7 +782,7 @@ arc_double_limm_p (rtx value)
    aligned.  So we round the space up if necessary, and leave it to va_start
    to compensate.  */
 
-void
+static void
 arc_setup_incoming_varargs (CUMULATIVE_ARGS *cum,
                             enum machine_mode mode,
                             tree type ATTRIBUTE_UNUSED,
@@ -2365,6 +2373,26 @@ arc_internal_label (FILE *stream, const char *prefix, unsigned long labelno)
   default_internal_label (stream, prefix, labelno);
 }
 
+/* Worker function for TARGET_ASM_EXTERNAL_LIBCALL.  */
+
+static void
+arc_external_libcall (rtx fun ATTRIBUTE_UNUSED)
+{
+#if 0
+/* On the ARC we want to have libgcc's for multiple cpus in one binary.
+   We can't use `assemble_name' here as that will call ASM_OUTPUT_LABELREF
+   and we'll get another suffix added on if -mmangle-cpu.  */
+  if (TARGET_MANGLE_CPU_LIBGCC)
+    {
+      fprintf (FILE, "\t.rename\t_%s, _%s%s\n",
+              XSTR (SYMREF, 0), XSTR (SYMREF, 0),
+              arc_mangle_suffix);
+    }
+#endif
+}
+
+/* Worker function for TARGET_RETURN_IN_MEMORY.  */
+
 static bool
 arc_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
 {
index bd0992c832d41d557b4468a8299a89d2c7c2b36d..42441d837dcfab60cb129578c54fffe8c3ceffc4 100644 (file)
@@ -731,9 +731,6 @@ FUNCTION_ARG_PASS_BY_REFERENCE ((CUM), (MODE), (TYPE), (NAMED))
 (((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) <= PARM_BOUNDARY \
  ? PARM_BOUNDARY \
  : 2 * PARM_BOUNDARY)
-
-#define SETUP_INCOMING_VARARGS(ARGS_SO_FAR, MODE, TYPE, PRETEND_SIZE, NO_RTL) \
-arc_setup_incoming_varargs(&ARGS_SO_FAR, MODE, TYPE, &PRETEND_SIZE, NO_RTL)
 \f
 /* Function results.  */
 
@@ -752,7 +749,7 @@ arc_setup_incoming_varargs(&ARGS_SO_FAR, MODE, TYPE, &PRETEND_SIZE, NO_RTL)
 /* ??? What about r1 in DI/DF values.  */
 #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
 
-/* Tell GCC to use RETURN_IN_MEMORY.  */
+/* Tell GCC to use TARGET_RETURN_IN_MEMORY.  */
 #define DEFAULT_PCC_STRUCT_RETURN 0
 \f
 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
@@ -1075,25 +1072,6 @@ extern const char *arc_text_section, *arc_data_section, *arc_rodata_section;
 /* Globalizing directive for a label.  */
 #define GLOBAL_ASM_OP "\t.global\t"
 
-/* A C statement (sans semicolon) to output on FILE an assembler pseudo-op to
-   declare a library function name external.  The name of the library function
-   is given by SYMREF, which has type RTX and is a SYMBOL_REF.  */
-#if 0
-/* On the ARC we want to have libgcc's for multiple cpus in one binary.
-   We can't use `assemble_name' here as that will call ASM_OUTPUT_LABELREF
-   and we'll get another suffix added on if -mmangle-cpu.  */
-extern const char *arc_mangle_cpu;
-#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, SYMREF) \
-do {                                                   \
-  if (TARGET_MANGLE_CPU_LIBGCC)                                \
-    {                                                  \
-      fprintf (FILE, "\t.rename\t_%s, _%s%s\n",                \
-              XSTR (SYMREF, 0), XSTR (SYMREF, 0),      \
-              arc_mangle_suffix);                      \
-    }                                                  \
-} while (0)
-#endif
-
 /* This is how to output a reference to a user-level label named NAME.
    `assemble_name' uses this.  */
 /* We mangle all user labels to provide protection from linking code