summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-30 02:02:49 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-30 02:02:49 +0000
commit2e15d750aba52b4a94ba90fd574973adf74f72c3 (patch)
treede282819f47f9d9172dff72434c1129a8147296c /gcc/config
parentddebab8b709bd4a3d5d770243d77e423e962f188 (diff)
downloadgcc-2e15d750aba52b4a94ba90fd574973adf74f72c3.tar.gz
* builtins.c (std_build_builtin_va_list): New.
* expr.h (std_build_builtin_va_list): Declare. * defaults.h (BUILD_VA_LIST_TYPE): New. * system.h (BUILD_VA_LIST_TYPE): Poison. * target-def.h (TARGET_BUILD_BUILTIN_VA_LIST): New. * target.h (struct gcc_target): Add build_builtin_va_list. * tree.c (build_common_tree_nodes_2): Use it. * config/alpha/alpha-protos.h, config/alpha/alpha.c, config/alpha/alpha.h, config/alpha/unicosmk.h, config/d30v/d30v-protos.h, config/d30v/d30v.c, config/d30v/d30v.h, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.h, config/i860/i860-protos.h, config/i860/i860.c, config/i860/i860.h, config/i960/i960-protos.h, config/i960/i960.c, config/i960/i960.h, config/mips/iris6.h, config/mips/mips-protos.h, config/mips/mips.c, config/mips/mips.h, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.h, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h: Rename foo_build_va_list to foo_build_builtin_va_list; make it static. Define TARGET_BUILD_BUILTIN_VA_LIST. Remove BUILD_VA_LIST_TYPE. Update protos. * config/i386/i386.c (ix86_expand_carry_flag_compare): Make static. * config/iq2000/iq2000.h (BUILD_VA_LIST_TYPE): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73076 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/alpha/alpha-protos.h1
-rw-r--r--gcc/config/alpha/alpha.c7
-rw-r--r--gcc/config/alpha/alpha.h4
-rw-r--r--gcc/config/alpha/unicosmk.h1
-rw-r--r--gcc/config/d30v/d30v-protos.h1
-rw-r--r--gcc/config/d30v/d30v.c8
-rw-r--r--gcc/config/d30v/d30v.h7
-rw-r--r--gcc/config/i386/i386-protos.h1
-rw-r--r--gcc/config/i386/i386.c16
-rw-r--r--gcc/config/i386/i386.h4
-rw-r--r--gcc/config/i860/i860-protos.h4
-rw-r--r--gcc/config/i860/i860.c8
-rw-r--r--gcc/config/i860/i860.h4
-rw-r--r--gcc/config/i960/i960-protos.h1
-rw-r--r--gcc/config/i960/i960.c8
-rw-r--r--gcc/config/i960/i960.h4
-rw-r--r--gcc/config/iq2000/iq2000.h3
-rw-r--r--gcc/config/mips/iris6.h6
-rw-r--r--gcc/config/mips/mips-protos.h1
-rw-r--r--gcc/config/mips/mips.c19
-rw-r--r--gcc/config/mips/mips.h4
-rw-r--r--gcc/config/rs6000/rs6000-protos.h1
-rw-r--r--gcc/config/rs6000/rs6000.c8
-rw-r--r--gcc/config/rs6000/rs6000.h4
-rw-r--r--gcc/config/s390/s390-protos.h1
-rw-r--r--gcc/config/s390/s390.c9
-rw-r--r--gcc/config/s390/s390.h3
-rw-r--r--gcc/config/sh/sh-protos.h4
-rw-r--r--gcc/config/sh/sh.c8
-rw-r--r--gcc/config/sh/sh.h4
-rw-r--r--gcc/config/xtensa/xtensa-protos.h1
-rw-r--r--gcc/config/xtensa/xtensa.c8
-rw-r--r--gcc/config/xtensa/xtensa.h4
33 files changed, 71 insertions, 96 deletions
diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h
index 29caf8f095b..95f1ad25c7c 100644
--- a/gcc/config/alpha/alpha-protos.h
+++ b/gcc/config/alpha/alpha-protos.h
@@ -80,7 +80,6 @@ extern void print_operand (FILE *, rtx, int);
extern void print_operand_address (FILE *, rtx);
extern void alpha_initialize_trampoline (rtx, rtx, rtx, int, int, int);
-extern tree alpha_build_va_list (void);
extern void alpha_va_start (tree, rtx);
extern rtx alpha_va_arg (tree, tree);
extern rtx function_arg (CUMULATIVE_ARGS, enum machine_mode, tree, int);
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index d90103e703e..0d59c343d84 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -6080,8 +6080,8 @@ function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
return gen_rtx_REG (mode, regnum);
}
-tree
-alpha_build_va_list (void)
+static tree
+alpha_build_builtin_va_list (void)
{
tree base, ofs, record, type_decl;
@@ -10188,6 +10188,9 @@ alpha_init_libfuncs (void)
#undef TARGET_PRETEND_OUTGOING_VARARGS_NAMED
#define TARGET_PRETEND_OUTGOING_VARARGS_NAMED hook_bool_CUMULATIVE_ARGS_true
+#undef TARGET_BUILD_BUILTIN_VA_LIST
+#define TARGET_BUILD_BUILTIN_VA_LIST alpha_build_builtin_va_list
+
struct gcc_target targetm = TARGET_INITIALIZER;
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index a6d33220709..2855351e9fa 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -1679,10 +1679,6 @@ do { \
{"some_small_symbolic_operand", {SET, PARALLEL, PREFETCH, UNSPEC, \
UNSPEC_VOLATILE}},
-/* Define the `__builtin_va_list' type for the ABI. */
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = alpha_build_va_list ()
-
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
alpha_va_start (valist, nextarg)
diff --git a/gcc/config/alpha/unicosmk.h b/gcc/config/alpha/unicosmk.h
index c7f2bfe4aa7..46877fbc2bd 100644
--- a/gcc/config/alpha/unicosmk.h
+++ b/gcc/config/alpha/unicosmk.h
@@ -496,7 +496,6 @@ ssib_section () \
#undef LIB_SPEC
#define LIB_SPEC "-L/opt/ctl/craylibs/craylibs -lu -lm -lc -lsma"
-#undef BUILD_VA_LIST_TYPE
#undef EXPAND_BUILTIN_VA_START
#undef EXPAND_BUILTIN_VA_ARG
diff --git a/gcc/config/d30v/d30v-protos.h b/gcc/config/d30v/d30v-protos.h
index 7ce90afbfbb..cd5be23105a 100644
--- a/gcc/config/d30v/d30v-protos.h
+++ b/gcc/config/d30v/d30v-protos.h
@@ -103,7 +103,6 @@ extern rtx d30v_expand_builtin_saveregs PARAMS ((void));
extern void d30v_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode,
tree, int *, int));
-extern tree d30v_build_va_list PARAMS ((void));
#ifdef RTX_CODE
extern void d30v_expand_builtin_va_start PARAMS ((tree, rtx));
extern rtx d30v_expand_builtin_va_arg PARAMS ((tree, tree));
diff --git a/gcc/config/d30v/d30v.c b/gcc/config/d30v/d30v.c
index 4093ab27abf..aadba9d794c 100644
--- a/gcc/config/d30v/d30v.c
+++ b/gcc/config/d30v/d30v.c
@@ -55,6 +55,7 @@ static void d30v_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
static int d30v_adjust_cost PARAMS ((rtx, rtx, rtx, int));
static int d30v_issue_rate PARAMS ((void));
static bool d30v_rtx_costs PARAMS ((rtx, int, int, int *));
+static tree d30v_build_builtin_va_list PARAMS ((void));
/* Define the information needed to generate branch and scc insns. This is
stored from the compare operation. */
@@ -105,6 +106,9 @@ enum reg_class reg_class_from_letter[256];
#undef TARGET_ADDRESS_COST
#define TARGET_ADDRESS_COST hook_int_rtx_0
+#undef TARGET_BUILD_BUILTIN_VA_LIST
+#define TARGET_BUILD_BUILTIN_VA_LIST d30v_build_builtin_va_list
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Sometimes certain combinations of command options do not make
@@ -2201,8 +2205,8 @@ d30v_setup_incoming_varargs (cum, mode, type, pretend_size, second_time)
/* Create the va_list data type. */
-tree
-d30v_build_va_list ()
+static tree
+d30v_build_builtin_va_list ()
{
tree f_arg_ptr, f_arg_num, record, type_decl;
tree int_type_node;
diff --git a/gcc/config/d30v/d30v.h b/gcc/config/d30v/d30v.h
index 59ba9b7ba5f..6c4c0669eb6 100644
--- a/gcc/config/d30v/d30v.h
+++ b/gcc/config/d30v/d30v.h
@@ -1407,13 +1407,6 @@ typedef struct machine_function GTY(())
d30v_setup_incoming_varargs (&ARGS_SO_FAR, (int) MODE, TYPE, \
&PRETEND_ARGS_SIZE, SECOND_TIME)
-/* Build up the stdarg/varargs va_list type tree, assinging it to NODE. If not
- defined, it is assumed that va_list is a void * pointer. */
-
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = d30v_build_va_list ()
-
-
/* Implement the stdarg/varargs va_start macro. STDARG_P is nonzero if this
is stdarg.h instead of varargs.h. VALIST is the tree of the va_list
variable to initialize. NEXTARG is the machine independent notion of the
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 33469ccd3ef..60880b805e2 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -203,7 +203,6 @@ extern rtx ix86_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
#ifdef TREE_CODE
extern int ix86_return_pops_args (tree, tree, int);
-extern tree ix86_build_va_list (void);
extern int ix86_data_alignment (tree, int);
extern int ix86_local_alignment (tree, int);
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 25240acc9d7..a5d27fcbde7 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -830,7 +830,8 @@ static void x86_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
static bool x86_can_output_mi_thunk (tree, HOST_WIDE_INT, HOST_WIDE_INT, tree);
static void x86_file_start (void);
static void ix86_reorg (void);
-bool ix86_expand_carry_flag_compare (enum rtx_code, rtx, rtx, rtx*);
+static bool ix86_expand_carry_flag_compare (enum rtx_code, rtx, rtx, rtx*);
+static tree ix86_build_builtin_va_list (void);
struct ix86_address
{
@@ -1012,6 +1013,9 @@ static void init_ext_80387_constants (void);
#undef TARGET_MACHINE_DEPENDENT_REORG
#define TARGET_MACHINE_DEPENDENT_REORG ix86_reorg
+#undef TARGET_BUILD_BUILTIN_VA_LIST
+#define TARGET_BUILD_BUILTIN_VA_LIST ix86_build_builtin_va_list
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* The svr4 ABI for the i386 says that records and unions are returned
@@ -2825,8 +2829,8 @@ ix86_value_regno (enum machine_mode mode)
/* Create the va_list data type. */
-tree
-ix86_build_va_list (void)
+static tree
+ix86_build_builtin_va_list (void)
{
tree f_gpr, f_fpr, f_ovf, f_sav, record, type_decl;
@@ -9454,9 +9458,9 @@ ix86_expand_setcc (enum rtx_code code, rtx dest)
return 1; /* DONE */
}
-/* Expand comparison setting or clearing carry flag. Return true when successful
- and set pop for the operation. */
-bool
+/* Expand comparison setting or clearing carry flag. Return true when
+ successful and set pop for the operation. */
+static bool
ix86_expand_carry_flag_compare (enum rtx_code code, rtx op0, rtx op1, rtx *pop)
{
enum machine_mode mode =
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 53f9bcba6b2..d6133e9402a 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1828,10 +1828,6 @@ typedef struct ix86_args {
ix86_setup_incoming_varargs (&(CUM), (MODE), (TYPE), &(PRETEND_SIZE), \
(NO_RTL))
-/* Define the `__builtin_va_list' type for the ABI. */
-#define BUILD_VA_LIST_TYPE(VALIST) \
- ((VALIST) = ix86_build_va_list ())
-
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(VALIST, NEXTARG) \
ix86_va_start (VALIST, NEXTARG)
diff --git a/gcc/config/i860/i860-protos.h b/gcc/config/i860/i860-protos.h
index e29a5cd4895..74568af66b5 100644
--- a/gcc/config/i860/i860-protos.h
+++ b/gcc/config/i860/i860-protos.h
@@ -51,9 +51,5 @@ extern rtx i860_va_arg (tree, tree);
#endif /* TREE_CODE */
#endif /* RTX_CODE */
-#ifdef TREE_CODE
-extern tree i860_build_va_list (void);
-#endif /* TREE_CODE */
-
extern void tdesc_section (void);
diff --git a/gcc/config/i860/i860.c b/gcc/config/i860/i860.c
index a8585eff404..9946f261c7c 100644
--- a/gcc/config/i860/i860.c
+++ b/gcc/config/i860/i860.c
@@ -1813,8 +1813,8 @@ i860_saveregs (void)
The tree representing the va_list declaration is returned. */
-tree
-i860_build_va_list (void)
+static tree
+i860_build_builtin_va_list (void)
{
tree f_gpr, f_fpr, f_mem, f_sav, record, type_decl;
@@ -2117,5 +2117,7 @@ i860_init_libfuncs (void)
#undef TARGET_INIT_LIBFUNCS
#define TARGET_INIT_LIBFUNCS i860_init_libfuncs
-struct gcc_target targetm = TARGET_INITIALIZER;
+#undef TARGET_BUILD_BUILTIN_VA_LIST
+#define TARGET_BUILD_BUILTIN_VA_LIST i860_build_builtin_va_list
+struct gcc_target targetm = TARGET_INITIALIZER;
diff --git a/gcc/config/i860/i860.h b/gcc/config/i860/i860.h
index b5575ec7f1c..c600f0276ec 100644
--- a/gcc/config/i860/i860.h
+++ b/gcc/config/i860/i860.h
@@ -571,10 +571,6 @@ struct cumulative_args { int ints, floats; };
#define EXPAND_BUILTIN_SAVEREGS() \
i860_saveregs()
-/* Define the `__builtin_va_list' type for the ABI. */
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = i860_build_va_list ()
-
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
i860_va_start (valist, nextarg)
diff --git a/gcc/config/i960/i960-protos.h b/gcc/config/i960/i960-protos.h
index 5a46c4a841d..fa7941e9358 100644
--- a/gcc/config/i960/i960-protos.h
+++ b/gcc/config/i960/i960-protos.h
@@ -82,7 +82,6 @@ extern void i960_function_name_declare PARAMS ((FILE *, const char *, tree));
extern void i960_function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
extern int i960_round_align PARAMS ((int, tree));
extern void i960_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int));
-extern tree i960_build_va_list PARAMS ((void));
extern int i960_final_reg_parm_stack_space PARAMS ((int, tree));
extern int i960_reg_parm_stack_space PARAMS ((tree));
#endif /* TREE_CODE */
diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c
index c1284f48da3..4d4d23f21d8 100644
--- a/gcc/config/i960/i960.c
+++ b/gcc/config/i960/i960.c
@@ -52,6 +52,7 @@ static void i960_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree));
static bool i960_rtx_costs PARAMS ((rtx, int, int, int *));
static int i960_address_cost PARAMS ((rtx));
+static tree i960_build_builtin_va_list (void);
/* Save the operands last given to a compare for use when we
generate a scc or bcc insn. */
@@ -114,6 +115,9 @@ static int ret_label = 0;
#undef TARGET_ADDRESS_COST
#define TARGET_ADDRESS_COST i960_address_cost
+#undef TARGET_BUILD_BUILTIN_VA_LIST
+#define TARGET_BUILD_BUILTIN_VA_LIST i960_build_builtin_va_list
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Override conflicting target switch options.
@@ -2600,8 +2604,8 @@ i960_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
/* Define the `__builtin_va_list' type for the ABI. */
-tree
-i960_build_va_list ()
+static tree
+i960_build_builtin_va_list ()
{
return build_array_type (unsigned_type_node,
build_index_type (size_one_node));
diff --git a/gcc/config/i960/i960.h b/gcc/config/i960/i960.h
index 767efeb7fce..ad86dba003b 100644
--- a/gcc/config/i960/i960.h
+++ b/gcc/config/i960/i960.h
@@ -817,10 +817,6 @@ enum reg_class { NO_REGS, GLOBAL_REGS, LOCAL_REGS, LOCAL_OR_GLOBAL_REGS,
#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
i960_setup_incoming_varargs(&CUM,MODE,TYPE,&PRETEND_SIZE,NO_RTL)
-/* Define the `__builtin_va_list' type for the ABI. */
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = i960_build_va_list ()
-
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
i960_va_start (valist, nextarg)
diff --git a/gcc/config/iq2000/iq2000.h b/gcc/config/iq2000/iq2000.h
index f32d0c388c9..6bc18f3b20d 100644
--- a/gcc/config/iq2000/iq2000.h
+++ b/gcc/config/iq2000/iq2000.h
@@ -589,9 +589,6 @@ typedef struct iq2000_args {
#define STRICT_ARGUMENT_NAMING 1
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = ptr_type_node
-
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
iq2000_va_start (valist, nextarg)
diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h
index d708bcf5d96..ca8f4283b7c 100644
--- a/gcc/config/mips/iris6.h
+++ b/gcc/config/mips/iris6.h
@@ -423,12 +423,6 @@ while (0)
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
-/* Define the `__builtin_va_list' type for the ABI. On IRIX 6, this
- type is `char *'. */
-#undef BUILD_VA_LIST_TYPE
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = build_pointer_type (char_type_node)
-
#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
diff --git a/gcc/config/mips/mips-protos.h b/gcc/config/mips/mips-protos.h
index 2e31138e127..73b1bc45572 100644
--- a/gcc/config/mips/mips-protos.h
+++ b/gcc/config/mips/mips-protos.h
@@ -84,7 +84,6 @@ extern bool mips_pad_arg_upward (enum machine_mode, tree);
extern bool mips_pad_reg_upward (enum machine_mode, tree);
extern int mips_setup_incoming_varargs (const CUMULATIVE_ARGS *,
enum machine_mode, tree, int);
-extern tree mips_build_va_list (void);
extern void mips_va_start (tree, rtx);
extern struct rtx_def *mips_va_arg (tree, tree);
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index db087f144a6..d85a83d68f2 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -275,6 +275,7 @@ static int mips_adjust_cost (rtx, rtx, rtx, int);
static int mips_issue_rate (void);
static int mips_use_dfa_pipeline_interface (void);
static void mips_init_libfuncs (void);
+static tree mips_build_builtin_va_list (void);
#if TARGET_IRIX
static void irix_asm_named_section_1 (const char *, unsigned int,
@@ -792,6 +793,9 @@ const struct mips_cpu_info mips_cpu_info_table[] = {
#undef TARGET_INIT_LIBFUNCS
#define TARGET_INIT_LIBFUNCS mips_init_libfuncs
+#undef TARGET_BUILD_BUILTIN_VA_LIST
+#define TARGET_BUILD_BUILTIN_VA_LIST mips_build_builtin_va_list
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Return true if RELOC is a valid relocation number and OFFSET can be
@@ -3982,9 +3986,8 @@ mips_setup_incoming_varargs (const CUMULATIVE_ARGS *cum,
and two offsets, although we could have designed this with two pointers
and three offsets. */
-
-tree
-mips_build_va_list (void)
+static tree
+mips_build_builtin_va_list (void)
{
if (EABI_FLOAT_VARARGS_P)
{
@@ -4028,7 +4031,15 @@ mips_build_va_list (void)
return record;
}
else
- return ptr_type_node;
+ {
+#if defined(TARGET_IRIX) && !TARGET_IRIX5
+ /* On IRIX 6, this type is 'char *'. */
+ return build_pointer_type (char_type_node);
+#else
+ /* Otherwise, we use 'void *'. */
+ return ptr_type_node;
+#endif
+ }
}
/* Implement va_start. */
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 1b51913a022..a27dae3d40b 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2412,10 +2412,6 @@ typedef struct mips_args {
: ((LOC) + 15) & ~15)
-/* Define the `__builtin_va_list' type for the ABI. */
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = mips_build_va_list ()
-
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
mips_va_start (valist, nextarg)
diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h
index 35af1676152..2f50d1ef7ba 100644
--- a/gcc/config/rs6000/rs6000-protos.h
+++ b/gcc/config/rs6000/rs6000-protos.h
@@ -166,7 +166,6 @@ extern enum direction function_arg_padding (enum machine_mode, tree);
extern void optimization_options (int, int);
extern void rs6000_override_options (const char *);
extern int direct_return (void);
-extern union tree_node *rs6000_build_va_list (void);
extern int first_reg_to_save (void);
extern int first_fp_reg_to_save (void);
extern rs6000_stack_t *rs6000_stack_info (void);
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 2387ea7d367..94527017ac4 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -350,6 +350,7 @@ static rtx rs6000_spe_function_arg (CUMULATIVE_ARGS *,
static void setup_incoming_varargs (CUMULATIVE_ARGS *,
enum machine_mode, tree,
int *, int);
+static tree rs6000_build_builtin_va_list (void);
/* Hash table stuff for keeping track of TOC entries. */
@@ -554,6 +555,9 @@ static const char alt_reg_names[][8] =
#undef TARGET_PRETEND_OUTGOING_VARARGS_NAMED
#define TARGET_PRETEND_OUTGOING_VARARGS_NAMED hook_bool_CUMULATIVE_ARGS_true
+#undef TARGET_BUILD_BUILTIN_VA_LIST
+#define TARGET_BUILD_BUILTIN_VA_LIST rs6000_build_builtin_va_list
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Override command line options. Mostly we process the processor
@@ -4338,8 +4342,8 @@ setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
/* Create the va_list data type. */
-tree
-rs6000_build_va_list (void)
+static tree
+rs6000_build_builtin_va_list (void)
{
tree f_gpr, f_fpr, f_res, f_ovf, f_sav, record, type_decl;
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index a742f5308fc..d2c31099e5d 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1869,10 +1869,6 @@ typedef struct rs6000_args
the ABIs at the moment. For now, only AIX gets fixed. */
#define SPLIT_COMPLEX_ARGS (DEFAULT_ABI == ABI_AIX)
-/* Define the `__builtin_va_list' type for the ABI. */
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = rs6000_build_va_list ()
-
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
rs6000_va_start (valist, nextarg)
diff --git a/gcc/config/s390/s390-protos.h b/gcc/config/s390/s390-protos.h
index e99de323336..cad75e0abd1 100644
--- a/gcc/config/s390/s390-protos.h
+++ b/gcc/config/s390/s390-protos.h
@@ -97,7 +97,6 @@ extern int s390_agen_dep_p (rtx, rtx);
extern int s390_function_arg_pass_by_reference (enum machine_mode, tree);
extern void s390_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
tree, int);
-extern tree s390_build_va_list (void);
#ifdef RTX_CODE
extern rtx s390_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
extern void s390_va_start (tree, rtx);
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 63c2208fbeb..9a343a95b3b 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -76,6 +76,7 @@ static bool s390_rtx_costs (rtx, int, int, int *);
static int s390_address_cost (rtx);
static void s390_reorg (void);
static bool s390_valid_pointer_mode (enum machine_mode);
+static tree s390_build_builtin_va_list (void);
#undef TARGET_ASM_ALIGNED_HI_OP
#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
@@ -140,6 +141,9 @@ static bool s390_valid_pointer_mode (enum machine_mode);
#undef TARGET_VALID_POINTER_MODE
#define TARGET_VALID_POINTER_MODE s390_valid_pointer_mode
+#undef TARGET_BUILD_BUILTIN_VA_LIST
+#define TARGET_BUILD_BUILTIN_VA_LIST s390_build_builtin_va_list
+
struct gcc_target targetm = TARGET_INITIALIZER;
extern int reload_completed;
@@ -6107,7 +6111,6 @@ s390_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
long __fpr;
void *__overflow_arg_area;
void *__reg_save_area;
-
} va_list[1];
where __gpr and __fpr hold the number of general purpose
@@ -6119,8 +6122,8 @@ s390_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
saves all registers used for argument passing into this
area if the function uses variable arguments. */
-tree
-s390_build_va_list (void)
+static tree
+s390_build_builtin_va_list (void)
{
tree f_gpr, f_fpr, f_ovf, f_sav, record, type_decl;
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 1463b5035b6..610223a41f4 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -750,9 +750,6 @@ CUMULATIVE_ARGS;
/* Implementing the varargs macros. */
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = s390_build_va_list ()
-
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
s390_va_start (valist, nextarg)
diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h
index 81501b07d4b..eb2f2010400 100644
--- a/gcc/config/sh/sh-protos.h
+++ b/gcc/config/sh/sh-protos.h
@@ -103,10 +103,6 @@ extern rtx sh_va_arg (tree, tree);
#endif /* TREE_CODE */
#endif /* RTX_CODE */
-#ifdef TREE_CODE
-extern tree sh_build_va_list (void);
-#endif /* TREE_CODE */
-
extern const char *output_jump_label_table (void);
extern int sh_handle_pragma (int (*)(void), void (*)(int), const char *);
extern struct rtx_def *get_fpscr_rtx (void);
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 4207719dc44..d84a36f42f9 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -246,6 +246,7 @@ static rtx sh_builtin_saveregs (void);
static void sh_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int);
static bool sh_strict_argument_naming (CUMULATIVE_ARGS *);
static bool sh_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *);
+static tree sh_build_builtin_va_list (void);
/* Initialize the GCC target structure. */
@@ -345,6 +346,9 @@ static bool sh_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *);
#undef TARGET_PRETEND_OUTGOING_VARARGS_NAMED
#define TARGET_PRETEND_OUTGOING_VARARGS_NAMED sh_pretend_outgoing_varargs_named
+#undef TARGET_BUILD_BUILTIN_VA_LIST
+#define TARGET_BUILD_BUILTIN_VA_LIST sh_build_builtin_va_list
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Print the operand address in x to the stream. */
@@ -5911,8 +5915,8 @@ sh_builtin_saveregs (void)
/* Define the `__builtin_va_list' type for the ABI. */
-tree
-sh_build_va_list (void)
+static tree
+sh_build_builtin_va_list (void)
{
tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
tree record;
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 4ccff4b3531..907e7652593 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -2033,10 +2033,6 @@ struct sh_args {
/* Perform any needed actions needed for a function that is receiving a
variable number of arguments. */
-/* Define the `__builtin_va_list' type for the ABI. */
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = sh_build_va_list ()
-
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
sh_va_start (valist, nextarg)
diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h
index 9c37c417991..0d6d45f1640 100644
--- a/gcc/config/xtensa/xtensa-protos.h
+++ b/gcc/config/xtensa/xtensa-protos.h
@@ -96,7 +96,6 @@ extern int a7_overlap_mentioned_p (rtx);
extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree);
extern struct rtx_def *function_arg (CUMULATIVE_ARGS *, enum machine_mode,
tree, int);
-extern tree xtensa_build_va_list (void);
#endif /* TREE_CODE */
extern int xtensa_mask_immediate (int);
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 23798b00191..2e69c46f714 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -205,6 +205,7 @@ static unsigned int xtensa_multibss_section_type_flags (tree, const char *,
static void xtensa_select_rtx_section (enum machine_mode, rtx,
unsigned HOST_WIDE_INT);
static bool xtensa_rtx_costs (rtx, int, int, int *);
+static tree xtensa_build_builtin_va_list (void);
static int current_function_arg_words;
static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] =
@@ -233,6 +234,9 @@ static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] =
#undef TARGET_ADDRESS_COST
#define TARGET_ADDRESS_COST hook_int_rtx_0
+#undef TARGET_BUILD_BUILTIN_VA_LIST
+#define TARGET_BUILD_BUILTIN_VA_LIST xtensa_build_builtin_va_list
+
struct gcc_target targetm = TARGET_INITIALIZER;
@@ -2318,8 +2322,8 @@ xtensa_return_addr (int count, rtx frame)
references argument word N for 0 <= N < 6, and __va_stk[N*4] references
argument word N for N >= 6. */
-tree
-xtensa_build_va_list (void)
+static tree
+xtensa_build_builtin_va_list (void)
{
tree f_stk, f_reg, f_ndx, record, type_decl;
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index 621dd5fbbb6..dae6810ea00 100644
--- a/gcc/config/xtensa/xtensa.h
+++ b/gcc/config/xtensa/xtensa.h
@@ -930,10 +930,6 @@ typedef struct xtensa_args {
0, VOIDmode, 1, addr, Pmode); \
} while (0)
-/* Define the `__builtin_va_list' type for the ABI. */
-#define BUILD_VA_LIST_TYPE(VALIST) \
- (VALIST) = xtensa_build_va_list ()
-
/* If defined, is a C expression that produces the machine-specific
code for a call to '__builtin_saveregs'. This code will be moved
to the very beginning of the function, before any parameter access