Commit 88a1f47f by Nathan Froyd Committed by Nathan Froyd

frv-protos.h (frv_function_arg): Delete.

	* config/frv/frv-protos.h (frv_function_arg): Delete.
	(frv_function_arg_advance): Delete.
	* config/frv/frv.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
	* config/frv/frv.c (frv_function_arg): Rename to...
	(frv_function_arg_1): Make static.  Take const_tree and bool
	arguments.
	(frv_function_arg, frv_function_incoming_arg): New functions.
	(frv_function_arg_advance): Make static.  Take a const_tree and
	a bool.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_INCOMING_ARG): Define.
	(TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r166033
parent 46e0720d
2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
* config/frv/frv-protos.h (frv_function_arg): Delete.
(frv_function_arg_advance): Delete.
* config/frv/frv.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/frv/frv.c (frv_function_arg): Rename to...
(frv_function_arg_1): Make static. Take const_tree and bool
arguments.
(frv_function_arg, frv_function_incoming_arg): New functions.
(frv_function_arg_advance): Make static. Take a const_tree and
a bool.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_INCOMING_ARG): Define.
(TARGET_FUNCTION_ARG_ADVANCE): Define.
2010-10-28 Uros Bizjak <ubizjak@gmail.com>
PR target/46153
......@@ -53,13 +53,6 @@ extern void frv_init_cumulative_args (CUMULATIVE_ARGS *, tree,
rtx, tree, int);
extern int frv_function_arg_boundary (enum machine_mode, tree);
extern rtx frv_function_arg (CUMULATIVE_ARGS *,
enum machine_mode,
tree, int, int);
extern void frv_function_arg_advance (CUMULATIVE_ARGS *,
enum machine_mode,
tree, int);
extern bool frv_function_value_regno_p (const unsigned int);
#endif /* TREE_CODE */
......
......@@ -388,6 +388,12 @@ static rtx frv_struct_value_rtx (tree, int);
static bool frv_must_pass_in_stack (enum machine_mode mode, const_tree type);
static int frv_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
static rtx frv_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
static rtx frv_function_incoming_arg (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
static void frv_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
static void frv_output_dwarf_dtprel (FILE *, int, rtx)
ATTRIBUTE_UNUSED;
static reg_class_t frv_secondary_reload (bool, rtx, reg_class_t,
......@@ -486,6 +492,12 @@ static const struct default_options frv_option_optimization_table[] =
#define TARGET_PASS_BY_REFERENCE hook_pass_by_reference_must_pass_in_stack
#undef TARGET_ARG_PARTIAL_BYTES
#define TARGET_ARG_PARTIAL_BYTES frv_arg_partial_bytes
#undef TARGET_FUNCTION_ARG
#define TARGET_FUNCTION_ARG frv_function_arg
#undef TARGET_FUNCTION_INCOMING_ARG
#define TARGET_FUNCTION_INCOMING_ARG frv_function_incoming_arg
#undef TARGET_FUNCTION_ARG_ADVANCE
#define TARGET_FUNCTION_ARG_ADVANCE frv_function_arg_advance
#undef TARGET_EXPAND_BUILTIN_SAVEREGS
#define TARGET_EXPAND_BUILTIN_SAVEREGS frv_expand_builtin_saveregs
......@@ -3190,12 +3202,10 @@ frv_function_arg_boundary (enum machine_mode mode ATTRIBUTE_UNUSED,
return BITS_PER_WORD;
}
rtx
frv_function_arg (CUMULATIVE_ARGS *cum,
enum machine_mode mode,
tree type ATTRIBUTE_UNUSED,
int named,
int incoming ATTRIBUTE_UNUSED)
static rtx
frv_function_arg_1 (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
const_tree type ATTRIBUTE_UNUSED, bool named,
bool incoming ATTRIBUTE_UNUSED)
{
enum machine_mode xmode = (mode == BLKmode) ? SImode : mode;
int arg_num = *cum;
......@@ -3229,6 +3239,20 @@ frv_function_arg (CUMULATIVE_ARGS *cum,
return ret;
}
static rtx
frv_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
const_tree type, bool named)
{
return frv_function_arg_1 (cum, mode, type, named, false);
}
static rtx
frv_function_incoming_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
const_tree type, bool named)
{
return frv_function_arg_1 (cum, mode, type, named, true);
}
/* A C statement (sans semicolon) to update the summarizer variable CUM to
advance past an argument in the argument list. The values MODE, TYPE and
......@@ -3239,11 +3263,11 @@ frv_function_arg (CUMULATIVE_ARGS *cum,
the stack. The compiler knows how to track the amount of stack space used
for arguments without any special help. */
void
static void
frv_function_arg_advance (CUMULATIVE_ARGS *cum,
enum machine_mode mode,
tree type ATTRIBUTE_UNUSED,
int named)
const_tree type ATTRIBUTE_UNUSED,
bool named)
{
enum machine_mode xmode = (mode == BLKmode) ? SImode : mode;
int bytes = GET_MODE_SIZE (xmode);
......
......@@ -1546,23 +1546,6 @@ typedef struct frv_stack {
#define FRV_NUM_ARG_REGS 6
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
frv_function_arg (&CUM, MODE, TYPE, NAMED, FALSE)
/* Define this macro if the target machine has "register windows", so that the
register in which a function sees an arguments is not necessarily the same
as the one in which the caller passed the argument.
For such machines, `FUNCTION_ARG' computes the register in which the caller
passes the value, and `FUNCTION_INCOMING_ARG' should be defined in a similar
fashion to tell the function being called where the arguments will arrive.
If `FUNCTION_INCOMING_ARG' is not defined, `FUNCTION_ARG' serves both
purposes. */
#define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \
frv_function_arg (&CUM, MODE, TYPE, NAMED, TRUE)
/* A C type for declaring a variable that is used as the first argument of
`FUNCTION_ARG' and other related values. For some target machines, the type
`int' suffices and can hold the number of bytes of argument so far.
......@@ -1605,17 +1588,6 @@ typedef struct frv_stack {
#define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \
frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, NULL, TRUE)
/* A C statement (sans semicolon) to update the summarizer variable CUM to
advance past an argument in the argument list. The values MODE, TYPE and
NAMED describe that argument. Once this is done, the variable CUM is
suitable for analyzing the *following* argument with `FUNCTION_ARG', etc.
This macro need not do anything if the argument in question was passed on
the stack. The compiler knows how to track the amount of stack space used
for arguments without any special help. */
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
frv_function_arg_advance (&CUM, MODE, TYPE, NAMED)
/* If defined, a C expression that gives the alignment boundary, in bits, of an
argument with the specified mode and type. If it is not defined,
`PARM_BOUNDARY' is used for all arguments. */
......
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