Commit a6a54b6f by Nathan Froyd Committed by Nathan Froyd

crx-protos.h (crx_function_arg): Delete.

	* config/crx/crx-protos.h (crx_function_arg): Delete.
	(crx_function_arg_advance): Delete.
	* config/crx/crx.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
	* config/crx/crx.c (crx_function_arg): Make static.  Take a
	const_tree and a bool.
	(crx_function_arg_advance): Make static.  Take a const_tree and
	a bool.
	(enough_regs_for_param): Take a const_tree.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r166040
parent da15f931
2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
* config/crx/crx-protos.h (crx_function_arg): Delete.
(crx_function_arg_advance): Delete.
* config/crx/crx.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/crx/crx.c (crx_function_arg): Make static. Take a
const_tree and a bool.
(crx_function_arg_advance): Make static. Take a const_tree and
a bool.
(enough_regs_for_param): Take a const_tree.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
* config/m68hc11/m68hc11-protos.h (m68hc11_function_arg): Delete.
(m68hc11_function_arg_advance): Delete.
* config/m68hc11/m68hc11.h (FUNCTION_ARG): Delete.
......@@ -32,10 +32,8 @@ extern enum reg_class crx_secondary_reload_class (enum reg_class, enum machine_m
/* Passing function arguments. */
extern int crx_function_arg_regno_p (int);
#ifdef TREE_CODE
extern void crx_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
#ifdef RTX_CODE
extern void crx_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);
extern rtx crx_function_arg (struct cumulative_args *, enum machine_mode, tree, int);
#endif /* RTX_CODE */
#endif /* TREE_CODE */
......
......@@ -130,6 +130,10 @@ static bool crx_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_U
static int crx_address_cost (rtx, bool);
static bool crx_legitimate_address_p (enum machine_mode, rtx, bool);
static bool crx_can_eliminate (const int, const int);
static rtx crx_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
static void crx_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
/*****************************************************************************/
/* RTL VALIDITY */
......@@ -155,6 +159,16 @@ static bool crx_can_eliminate (const int, const int);
#define TARGET_RETURN_IN_MEMORY crx_return_in_memory
/*****************************************************************************/
/* PASSING FUNCTION ARGUMENTS */
/*****************************************************************************/
#undef TARGET_FUNCTION_ARG
#define TARGET_FUNCTION_ARG crx_function_arg
#undef TARGET_FUNCTION_ARG_ADVANCE
#define TARGET_FUNCTION_ARG_ADVANCE crx_function_arg_advance
/*****************************************************************************/
/* RELATIVE COSTS OF OPERATIONS */
/*****************************************************************************/
......@@ -429,7 +443,7 @@ crx_hard_regno_mode_ok (int regno, enum machine_mode mode)
* the number of registers needed else 0. */
static int
enough_regs_for_param (CUMULATIVE_ARGS * cum, tree type,
enough_regs_for_param (CUMULATIVE_ARGS * cum, const_tree type,
enum machine_mode mode)
{
int type_size;
......@@ -452,11 +466,11 @@ enough_regs_for_param (CUMULATIVE_ARGS * cum, tree type,
return 0;
}
/* Implements the macro FUNCTION_ARG defined in crx.h. */
/* Implements TARGET_FUNCTION_ARG. */
rtx
crx_function_arg (CUMULATIVE_ARGS * cum, enum machine_mode mode, tree type,
int named ATTRIBUTE_UNUSED)
static rtx
crx_function_arg (CUMULATIVE_ARGS * cum, enum machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
last_parm_in_reg = 0;
......@@ -520,11 +534,11 @@ crx_init_cumulative_args (CUMULATIVE_ARGS * cum, tree fntype,
}
}
/* Implements the macro FUNCTION_ARG_ADVANCE defined in crx.h. */
/* Implements TARGET_FUNCTION_ARG_ADVANCE. */
void
static void
crx_function_arg_advance (CUMULATIVE_ARGS * cum, enum machine_mode mode,
tree type, int named ATTRIBUTE_UNUSED)
const_tree type, bool named ATTRIBUTE_UNUSED)
{
/* l holds the number of registers required */
int l = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
......
......@@ -300,9 +300,6 @@ enum reg_class
#define PUSH_ROUNDING(BYTES) (((BYTES) + 3) & ~3)
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
((rtx) crx_function_arg(&(CUM), (MODE), (TYPE), (NAMED)))
#ifndef CUMULATIVE_ARGS
struct cumulative_args
{
......@@ -318,9 +315,6 @@ struct cumulative_args
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
crx_init_cumulative_args(&(CUM), (FNTYPE), (LIBNAME))
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
crx_function_arg_advance(&(CUM), (MODE), (TYPE), (NAMED))
#define FUNCTION_ARG_REGNO_P(REGNO) crx_function_arg_regno_p(REGNO)
/*****************************************************************************/
......
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