avr-protos.h (function_arg): Delete.

* config/avr/avr-protos.h (function_arg): Delete.
	(function_arg_advance): Delete.
	* config/avr/avr.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
	* config/avr/avr.c (function_arg): Rename to...
	(avr_function_arg): ...this.  Make static.  Take a const_tree and
	a bool.
	(function_arg_advance):	Rename to...
	(avr_function_arg_advance): ...this.  Make static.  Take a
	const_tree and a bool.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r165226
This commit is contained in:
Nathan Froyd 2010-10-09 14:18:51 +00:00 committed by Nathan Froyd
parent 0c3a9758c0
commit 733bdfbd68
4 changed files with 27 additions and 18 deletions

View File

@ -1,3 +1,16 @@
2010-10-09 Nathan Froyd <froydnj@codesourcery.com>
* config/avr/avr-protos.h (function_arg): Delete.
(function_arg_advance): Delete.
* config/avr/avr.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/avr/avr.c (function_arg): Rename to...
(avr_function_arg): ...this. Make static. Take a const_tree and
a bool.
(function_arg_advance): Rename to...
(avr_function_arg_advance): ...this. Make static. Take a
const_tree and a bool.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
2010-10-09 Nathan Froyd <froydnj@codesourcery.com>
* config/alpha/alpha-protos.h (function_arg): Delete.

View File

@ -42,15 +42,8 @@ extern int avr_progmem_p (tree decl, tree attributes);
#ifdef RTX_CODE /* inside TREE_CODE */
extern void init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
rtx libname, tree fndecl);
extern rtx function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
tree type, int named);
#endif /* RTX_CODE inside TREE_CODE */
#ifdef HAVE_MACHINE_MODES /* inside TREE_CODE */
extern void function_arg_advance (CUMULATIVE_ARGS *cum,
enum machine_mode mode, tree type,
int named);
#endif /* HAVE_MACHINE_MODES inside TREE_CODE*/
#endif /* TREE_CODE */
#ifdef RTX_CODE

View File

@ -93,6 +93,10 @@ static unsigned int avr_case_values_threshold (void);
static bool avr_frame_pointer_required_p (void);
static bool avr_can_eliminate (const int, const int);
static bool avr_class_likely_spilled_p (reg_class_t c);
static rtx avr_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
static void avr_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
/* Allocate registers from r25 to r8 for parameters for function calls. */
#define FIRST_CUM_REG 26
@ -168,6 +172,10 @@ static const struct attribute_spec avr_attribute_table[] =
#define TARGET_ADDRESS_COST avr_address_cost
#undef TARGET_MACHINE_DEPENDENT_REORG
#define TARGET_MACHINE_DEPENDENT_REORG avr_reorg
#undef TARGET_FUNCTION_ARG
#define TARGET_FUNCTION_ARG avr_function_arg
#undef TARGET_FUNCTION_ARG_ADVANCE
#define TARGET_FUNCTION_ARG_ADVANCE avr_function_arg_advance
#undef TARGET_LEGITIMIZE_ADDRESS
#define TARGET_LEGITIMIZE_ADDRESS avr_legitimize_address
@ -1566,9 +1574,9 @@ avr_num_arg_regs (enum machine_mode mode, tree type)
/* Controls whether a function argument is passed
in a register, and which register. */
rtx
function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
int named ATTRIBUTE_UNUSED)
static rtx
avr_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
int bytes = avr_num_arg_regs (mode, type);
@ -1581,9 +1589,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
/* Update the summarizer variable CUM to advance past an argument
in the argument list. */
void
function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
int named ATTRIBUTE_UNUSED)
static void
avr_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
int bytes = avr_num_arg_regs (mode, type);

View File

@ -372,8 +372,6 @@ enum reg_class {
for POST_DEC targets (PR27386). */
/*#define PUSH_ROUNDING(NPUSHED) (NPUSHED)*/
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) (function_arg (&(CUM), MODE, TYPE, NAMED))
typedef struct avr_args {
int nregs; /* # registers available for passing */
int regno; /* next available register number */
@ -382,9 +380,6 @@ typedef struct avr_args {
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
init_cumulative_args (&(CUM), FNTYPE, LIBNAME, FNDECL)
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
(function_arg_advance (&CUM, MODE, TYPE, NAMED))
#define FUNCTION_ARG_REGNO_P(r) function_arg_regno_p(r)
extern int avr_reg_order[];