+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)
#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 */
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. */
#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
#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. */
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,
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)
{
(((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. */
/* ??? 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,
/* 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