mirror of git://gcc.gnu.org/git/gcc.git
builtins.c (std_build_builtin_va_list): New.
* 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. From-SVN: r73076
This commit is contained in:
parent
12d104a2b9
commit
c35d187fc3
|
@ -1,3 +1,33 @@
|
|||
2003-10-29 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2003-10-29 James E Wilson <wilson@specifixinc.com>
|
||||
|
||||
* recog.c (asm_operand_ok): Add missing break after case 'X'.
|
||||
|
|
|
@ -3910,6 +3910,14 @@ stabilize_va_list (tree valist, int needs_lvalue)
|
|||
return valist;
|
||||
}
|
||||
|
||||
/* The "standard" definition of va_list is void*. */
|
||||
|
||||
tree
|
||||
std_build_builtin_va_list (void)
|
||||
{
|
||||
return ptr_type_node;
|
||||
}
|
||||
|
||||
/* The "standard" implementation of va_start: just assign `nextarg' to
|
||||
the variable. */
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -382,10 +382,6 @@ do { fputs (integer_asm_op (POINTER_SIZE / UNITS_PER_WORD, TRUE), FILE); \
|
|||
#define POINTER_SIZE BITS_PER_WORD
|
||||
#endif
|
||||
|
||||
#ifndef BUILD_VA_LIST_TYPE
|
||||
#define BUILD_VA_LIST_TYPE(X) ((X) = ptr_type_node)
|
||||
#endif
|
||||
|
||||
#ifndef PIC_OFFSET_TABLE_REGNUM
|
||||
#define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM
|
||||
#endif
|
||||
|
|
|
@ -331,6 +331,7 @@ extern rtx gen_cond_trap (enum rtx_code, rtx, rtx, rtx);
|
|||
|
||||
/* Functions from builtins.c: */
|
||||
extern rtx expand_builtin (tree, rtx, rtx, enum machine_mode, int);
|
||||
extern tree std_build_builtin_va_list (void);
|
||||
extern void std_expand_builtin_va_start (tree, rtx);
|
||||
extern rtx std_expand_builtin_va_arg (tree, tree);
|
||||
extern rtx expand_builtin_va_arg (tree, tree);
|
||||
|
|
|
@ -594,7 +594,7 @@ typedef char _Bool;
|
|||
ASM_SIMPLIFY_DWARF_ADDR INIT_TARGET_OPTABS INIT_SUBTARGET_OPTABS \
|
||||
INIT_GOFAST_OPTABS MULSI3_LIBCALL MULDI3_LIBCALL DIVSI3_LIBCALL \
|
||||
DIVDI3_LIBCALL UDIVSI3_LIBCALL UDIVDI3_LIBCALL MODSI3_LIBCALL \
|
||||
MODDI3_LIBCALL UMODSI3_LIBCALL UMODDI3_LIBCALL
|
||||
MODDI3_LIBCALL UMODSI3_LIBCALL UMODDI3_LIBCALL BUILD_VA_LIST_TYPE
|
||||
|
||||
/* Other obsolete target macros, or macros that used to be in target
|
||||
headers and were not used, and may be obsolete or may never have
|
||||
|
|
|
@ -316,6 +316,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#define TARGET_MACHINE_DEPENDENT_REORG 0
|
||||
|
||||
#define TARGET_BUILD_BUILTIN_VA_LIST std_build_builtin_va_list
|
||||
|
||||
#define TARGET_GET_PCH_VALIDITY default_get_pch_validity
|
||||
#define TARGET_PCH_VALID_P default_pch_valid_p
|
||||
|
||||
|
@ -377,6 +379,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
TARGET_ADDRESS_COST, \
|
||||
TARGET_DWARF_REGISTER_SPAN, \
|
||||
TARGET_MACHINE_DEPENDENT_REORG, \
|
||||
TARGET_BUILD_BUILTIN_VA_LIST, \
|
||||
TARGET_GET_PCH_VALIDITY, \
|
||||
TARGET_PCH_VALID_P, \
|
||||
TARGET_HAVE_NAMED_SECTIONS, \
|
||||
|
|
|
@ -382,6 +382,9 @@ struct gcc_target
|
|||
delayed-branch scheduling. */
|
||||
void (* machine_dependent_reorg) (void);
|
||||
|
||||
/* Create the __builtin_va_list type. */
|
||||
tree (* build_builtin_va_list) (void);
|
||||
|
||||
/* Validity-checking routines for PCH files, target-specific.
|
||||
get_pch_validity returns a pointer to the data to be stored,
|
||||
and stores the size in its argument. pch_valid_p gets the same
|
||||
|
|
|
@ -4916,8 +4916,7 @@ build_common_tree_nodes_2 (int short_double)
|
|||
layout_type (complex_long_double_type_node);
|
||||
|
||||
{
|
||||
tree t;
|
||||
BUILD_VA_LIST_TYPE (t);
|
||||
tree t = (*targetm.build_builtin_va_list) ();
|
||||
|
||||
/* Many back-ends define record types without setting TYPE_NAME.
|
||||
If we copied the record type here, we'd keep the original
|
||||
|
|
Loading…
Reference in New Issue