Commit 28cb7667 by Richard Henderson Committed by Richard Henderson

frv-protos.h (frv_expand_builtin_va_arg): Remove.

        * config/frv/frv-protos.h (frv_expand_builtin_va_arg): Remove.
        * config/frv/frv.c (TARGET_GIMPLIFY_VA_ARG_EXPR): New.
        (frv_gimplify_va_arg_expr): Rewrite from frv_expand_builtin_va_arg.
        * config/frv/frv.h (EXPAND_BUILTIN_VA_ARG): Remove.

From-SVN: r84329
parent c6db08cd
2004-07-08 Richard Henderson <rth@redhat.com>
* config/frv/frv-protos.h (frv_expand_builtin_va_arg): Remove.
* config/frv/frv.c (TARGET_GIMPLIFY_VA_ARG_EXPR): New.
(frv_gimplify_va_arg_expr): Rewrite from frv_expand_builtin_va_arg.
* config/frv/frv.h (EXPAND_BUILTIN_VA_ARG): Remove.
* config/i860/i860-protos.h (i860_va_arg): Remove.
* config/i860/i860.c (TARGET_GIMPLIFY_VA_ARG_EXPR): New.
(i860_gimplify_va_arg_expr): Rewrite from i860_va_arg.
......
......@@ -93,7 +93,6 @@ extern int frv_function_arg_callee_copies (CUMULATIVE_ARGS *,
tree, int);
extern void frv_expand_builtin_va_start (tree, rtx);
extern rtx frv_expand_builtin_va_arg (tree, tree);
#endif /* TREE_CODE */
extern int frv_expand_block_move (rtx *);
......
......@@ -286,6 +286,7 @@ static void frv_output_const_unspec (FILE *,
const struct frv_unspec *);
static bool frv_function_ok_for_sibcall (tree, tree);
static rtx frv_struct_value_rtx (tree, int);
static tree frv_gimplify_va_arg_expr (tree, tree, tree *, tree *);
/* Initialize the GCC target structure. */
#undef TARGET_ASM_FUNCTION_PROLOGUE
......@@ -331,6 +332,8 @@ static rtx frv_struct_value_rtx (tree, int);
#define TARGET_EXPAND_BUILTIN_SAVEREGS frv_expand_builtin_saveregs
#undef TARGET_SETUP_INCOMING_VARARGS
#define TARGET_SETUP_INCOMING_VARARGS frv_setup_incoming_varargs
#undef TARGET_GIMPLIFY_VA_ARG_EXPR
#define TARGET_GIMPLIFY_VA_ARG_EXPR frv_gimplify_va_arg_expr
struct gcc_target targetm = TARGET_INITIALIZER;
......@@ -2081,30 +2084,13 @@ frv_expand_builtin_va_start (tree valist, rtx nextarg)
/* Expand __builtin_va_arg to do the va_arg macro. */
rtx
frv_expand_builtin_va_arg (tree valist, tree type)
static tree
frv_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
{
rtx addr;
rtx mem;
rtx reg;
if (TARGET_DEBUG_ARG)
{
fprintf (stderr, "va_arg:\n");
debug_tree (type);
}
if (! AGGREGATE_TYPE_P (type))
return std_expand_builtin_va_arg (valist, type);
addr = std_expand_builtin_va_arg (valist, ptr_type_node);
mem = gen_rtx_MEM (Pmode, addr);
reg = gen_reg_rtx (Pmode);
set_mem_alias_set (mem, get_varargs_alias_set ());
emit_move_insn (reg, mem);
return reg;
if (AGGREGATE_TYPE_P (type))
return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
else
return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
}
......
......@@ -2147,12 +2147,6 @@ struct machine_function GTY(())
#define EXPAND_BUILTIN_VA_START(VALIST, NEXTARG) \
(frv_expand_builtin_va_start(VALIST, NEXTARG))
/* Implement the stdarg/varargs va_arg macro. VALIST is the variable of type
va_list as a tree, TYPE is the type passed to va_arg. */
#define EXPAND_BUILTIN_VA_ARG(VALIST, TYPE) \
(frv_expand_builtin_va_arg (VALIST, TYPE))
/* Trampolines for Nested Functions. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment