Commit 3e29e2aa by Kazu Hirata Committed by Kazu Hirata

fr30-protos.h: Remove the prototype for fr30_setup_incoming_varargs.

	* config/fr30/fr30-protos.h: Remove the prototype for
	fr30_setup_incoming_varargs.
	Update the prototypes for fr30_num_arg_regs and
	fr30_function_arg_partial_nregs.
	* config/fr30/fr30.c (TARGET_STRUCT_VALUE_RTX): New.
	(TARGET_SETUP_INCOMING_VARARGS): Likewise.
	(fr30_setup_incoming_varargs): Make it static.
	Add argument second_time.  Don't do anything when second_time
	is nonzero.
	(fr30_num_arg_regs): Change the type of the first argument to
	enum machine_mode.
	(fr30_function_arg_partial_nregs): Change the type of the
	second argument to enum machine_mode.
	* config/fr30/fr30.h (STRUCT_VALUE): Remove.
	(SETUP_INCOMING_VARARGS): Remove.

From-SVN: r77375
parent 07ba2efb
2004-02-06 Kazu Hirata <kazu@cs.umass.edu> 2004-02-06 Kazu Hirata <kazu@cs.umass.edu>
* config/fr30/fr30-protos.h: Remove the prototype for
fr30_setup_incoming_varargs.
Update the prototypes for fr30_num_arg_regs and
fr30_function_arg_partial_nregs.
* config/fr30/fr30.c (TARGET_STRUCT_VALUE_RTX): New.
(TARGET_SETUP_INCOMING_VARARGS): Likewise.
(fr30_setup_incoming_varargs): Make it static.
Add argument second_time. Don't do anything when second_time
is nonzero.
(fr30_num_arg_regs): Change the type of the first argument to
enum machine_mode.
(fr30_function_arg_partial_nregs): Change the type of the
second argument to enum machine_mode.
* config/fr30/fr30.h (STRUCT_VALUE): Remove.
(SETUP_INCOMING_VARARGS): Remove.
2004-02-06 Kazu Hirata <kazu@cs.umass.edu>
* config/arc/arc-protos.h: Remove the prototype for * config/arc/arc-protos.h: Remove the prototype for
arc_setup_incoming_varargs. arc_setup_incoming_varargs.
* config/arc/arc.c (TARGET_ASM_EXTERNAL_LIBCALL): New. * config/arc/arc.c (TARGET_ASM_EXTERNAL_LIBCALL): New.
......
...@@ -29,6 +29,9 @@ extern void fr30_print_operand_address (FILE *, rtx); ...@@ -29,6 +29,9 @@ extern void fr30_print_operand_address (FILE *, rtx);
extern rtx fr30_move_double (rtx *); extern rtx fr30_move_double (rtx *);
#ifdef TREE_CODE #ifdef TREE_CODE
extern rtx fr30_va_arg (tree, tree); extern rtx fr30_va_arg (tree, tree);
extern int fr30_num_arg_regs (enum machine_mode, tree);
extern int fr30_function_arg_partial_nregs (CUMULATIVE_ARGS,
enum machine_mode, tree, int);
#endif /* TREE_CODE */ #endif /* TREE_CODE */
#ifdef HAVE_MACHINE_MODES #ifdef HAVE_MACHINE_MODES
#define Mmode enum machine_mode #define Mmode enum machine_mode
...@@ -43,9 +46,3 @@ extern int fr30_const_double_is_zero (rtx); ...@@ -43,9 +46,3 @@ extern int fr30_const_double_is_zero (rtx);
#undef Mmode #undef Mmode
#endif /* HAVE_MACHINE_MODES */ #endif /* HAVE_MACHINE_MODES */
#endif /* RTX_CODE */ #endif /* RTX_CODE */
#ifdef TREE_CODE
extern int fr30_num_arg_regs (int, tree);
extern int fr30_function_arg_partial_nregs (CUMULATIVE_ARGS, int, tree, int);
extern void fr30_setup_incoming_varargs (CUMULATIVE_ARGS, int, tree, int *);
#endif /* TREE_CODE */
...@@ -121,6 +121,8 @@ static struct fr30_frame_info current_frame_info; ...@@ -121,6 +121,8 @@ static struct fr30_frame_info current_frame_info;
/* Zero structure to initialize current_frame_info. */ /* Zero structure to initialize current_frame_info. */
static struct fr30_frame_info zero_frame_info; static struct fr30_frame_info zero_frame_info;
static void fr30_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
tree, int *, int);
static rtx fr30_pass_by_reference (tree, tree); static rtx fr30_pass_by_reference (tree, tree);
static rtx fr30_pass_by_value (tree, tree); static rtx fr30_pass_by_value (tree, tree);
...@@ -152,6 +154,12 @@ static rtx fr30_pass_by_value (tree, tree); ...@@ -152,6 +154,12 @@ static rtx fr30_pass_by_value (tree, tree);
#undef TARGET_PROMOTE_PROTOTYPES #undef TARGET_PROMOTE_PROTOTYPES
#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
#undef TARGET_STRUCT_VALUE_RTX
#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null
#undef TARGET_SETUP_INCOMING_VARARGS
#define TARGET_SETUP_INCOMING_VARARGS fr30_setup_incoming_varargs
struct gcc_target targetm = TARGET_INITIALIZER; struct gcc_target targetm = TARGET_INITIALIZER;
/* Returns the number of bytes offset between FROM_REG and TO_REG /* Returns the number of bytes offset between FROM_REG and TO_REG
...@@ -662,9 +670,8 @@ fr30_print_operand (FILE *file, rtx x, int code) ...@@ -662,9 +670,8 @@ fr30_print_operand (FILE *file, rtx x, int code)
/* Compute the number of word sized registers needed to hold a /* Compute the number of word sized registers needed to hold a
function argument of mode INT_MODE and tree type TYPE. */ function argument of mode INT_MODE and tree type TYPE. */
int int
fr30_num_arg_regs (int int_mode, tree type) fr30_num_arg_regs (enum machine_mode mode, tree type)
{ {
enum machine_mode mode = (enum machine_mode) int_mode;
int size; int size;
if (MUST_PASS_IN_STACK (mode, type)) if (MUST_PASS_IN_STACK (mode, type))
...@@ -687,7 +694,7 @@ fr30_num_arg_regs (int int_mode, tree type) ...@@ -687,7 +694,7 @@ fr30_num_arg_regs (int int_mode, tree type)
parameters to the function. */ parameters to the function. */
int int
fr30_function_arg_partial_nregs (CUMULATIVE_ARGS cum, int int_mode, fr30_function_arg_partial_nregs (CUMULATIVE_ARGS cum, enum machine_mode mode,
tree type, int named) tree type, int named)
{ {
/* Unnamed arguments, ie those that are prototyped as ... /* Unnamed arguments, ie those that are prototyped as ...
...@@ -702,7 +709,7 @@ fr30_function_arg_partial_nregs (CUMULATIVE_ARGS cum, int int_mode, ...@@ -702,7 +709,7 @@ fr30_function_arg_partial_nregs (CUMULATIVE_ARGS cum, int int_mode,
are needed because the parameter must be passed on the stack) are needed because the parameter must be passed on the stack)
then return zero, as this parameter does not require partial then return zero, as this parameter does not require partial
register, partial stack stack space. */ register, partial stack stack space. */
if (cum + fr30_num_arg_regs (int_mode, type) <= FR30_NUM_ARG_REGS) if (cum + fr30_num_arg_regs (mode, type) <= FR30_NUM_ARG_REGS)
return 0; return 0;
/* Otherwise return the number of registers that would be used. */ /* Otherwise return the number of registers that would be used. */
......
...@@ -817,12 +817,6 @@ enum reg_class ...@@ -817,12 +817,6 @@ enum reg_class
If not defined, this defaults to the value 1. */ If not defined, this defaults to the value 1. */
#define DEFAULT_PCC_STRUCT_RETURN 1 #define DEFAULT_PCC_STRUCT_RETURN 1
/* If the structure value address is not passed in a register, define
`STRUCT_VALUE' as an expression returning an RTX for the place where the
address is passed. If it returns 0, the address is passed as an "invisible"
first argument. */
#define STRUCT_VALUE 0
/*}}}*/ /*}}}*/
/*{{{ Generating Code for Profiling. */ /*{{{ Generating Code for Profiling. */
...@@ -846,13 +840,6 @@ enum reg_class ...@@ -846,13 +840,6 @@ enum reg_class
} }
/*}}}*/ /*}}}*/
/*{{{ Implementing the VARARGS Macros. */
#define SETUP_INCOMING_VARARGS(ARGS_SO_FAR, MODE, TYPE, PRETEND_ARGS_SIZE, SECOND_TIME) \
if (! SECOND_TIME) \
fr30_setup_incoming_varargs (ARGS_SO_FAR, MODE, TYPE, & PRETEND_ARGS_SIZE)
/*}}}*/
/*{{{ Trampolines for Nested Functions. */ /*{{{ Trampolines for Nested Functions. */
/* On the FR30, the trampoline is: /* On the FR30, the trampoline is:
......
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