stormy16-protos.h (xstormy16_function_arg): Delete.

* config/stormy16/stormy16-protos.h (xstormy16_function_arg): Delete.
	(xstormy16_function_arg_advance): Delete.
	* config/stormy16/stormy16.h (FUNCTION_ARG): Delete.
	(FUNCTION_ARG_ADVANCE): Delete.
	* config/stormy16/stormy16.c (xstormy16_function_arg): Make static.
	Take a const_tree and a bool.
	(xstormy16_function_arg_advance): Likewise.  Return void, updating
	the CUM parameter instead.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r166038
This commit is contained in:
Nathan Froyd 2010-10-28 19:59:07 +00:00 committed by Nathan Froyd
parent 4c05cbb2a7
commit bf425ddd46
4 changed files with 31 additions and 30 deletions

View File

@ -1,3 +1,15 @@
2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
* config/stormy16/stormy16-protos.h (xstormy16_function_arg): Delete.
(xstormy16_function_arg_advance): Delete.
* config/stormy16/stormy16.h (FUNCTION_ARG): Delete.
(FUNCTION_ARG_ADVANCE): Delete.
* config/stormy16/stormy16.c (xstormy16_function_arg): Make static.
Take a const_tree and a bool.
(xstormy16_function_arg_advance): Likewise. Return void, updating
the CUM parameter instead.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
* config/moxie/moxie-protos.h (moxie_function_arg): Delete.

View File

@ -35,13 +35,6 @@ extern void xstormy16_asm_output_aligned_common (FILE *, tree, const char *,
int, int, int);
#endif
#if defined (TREE_CODE) && defined (HAVE_MACHINE_MODES)
extern CUMULATIVE_ARGS xstormy16_function_arg_advance
(CUMULATIVE_ARGS, enum machine_mode, tree, int);
extern rtx xstormy16_function_arg
(CUMULATIVE_ARGS, enum machine_mode, tree, int);
#endif
#if defined (TREE_CODE) && defined (RTX_CODE)
extern void xstormy16_initialize_trampoline (rtx, rtx, rtx);
extern rtx xstormy16_function_value (const_tree, const_tree);

View File

@ -1247,11 +1247,10 @@ xstormy16_function_profiler (void)
sorry ("function_profiler support");
}
/* Return an updated 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.
/* Update 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 `TARGET_FUNCTION_ARG', etc.
This function need not do anything if the argument in question was
passed on the stack. The compiler knows how to track the amount of
@ -1259,25 +1258,23 @@ xstormy16_function_profiler (void)
it makes life easier for xstormy16_build_va_list if it does update
the word count. */
CUMULATIVE_ARGS
xstormy16_function_arg_advance (CUMULATIVE_ARGS cum, enum machine_mode mode,
tree type, int named ATTRIBUTE_UNUSED)
static void
xstormy16_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
/* If an argument would otherwise be passed partially in registers,
and partially on the stack, the whole of it is passed on the
stack. */
if (cum < NUM_ARGUMENT_REGISTERS
&& cum + XSTORMY16_WORD_SIZE (type, mode) > NUM_ARGUMENT_REGISTERS)
cum = NUM_ARGUMENT_REGISTERS;
if (*cum < NUM_ARGUMENT_REGISTERS
&& *cum + XSTORMY16_WORD_SIZE (type, mode) > NUM_ARGUMENT_REGISTERS)
*cum = NUM_ARGUMENT_REGISTERS;
cum += XSTORMY16_WORD_SIZE (type, mode);
return cum;
*cum += XSTORMY16_WORD_SIZE (type, mode);
}
rtx
xstormy16_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
tree type, int named ATTRIBUTE_UNUSED)
static rtx
xstormy16_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
if (mode == VOIDmode)
return const0_rtx;
@ -2663,6 +2660,11 @@ static const struct default_options xstorym16_option_optimization_table[] =
#undef TARGET_PROMOTE_PROTOTYPES
#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
#undef TARGET_FUNCTION_ARG
#define TARGET_FUNCTION_ARG xstormy16_function_arg
#undef TARGET_FUNCTION_ARG_ADVANCE
#define TARGET_FUNCTION_ARG_ADVANCE xstormy16_function_arg_advance
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY xstormy16_return_in_memory

View File

@ -337,9 +337,6 @@ enum reg_class
+ 1) \
/ 2)
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
xstormy16_function_arg (CUM, MODE, TYPE, NAMED)
/* For this platform, the value of CUMULATIVE_ARGS is the number of words
of arguments that have been passed in registers so far. */
#define CUMULATIVE_ARGS int
@ -347,9 +344,6 @@ enum reg_class
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
(CUM) = 0
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
((CUM) = xstormy16_function_arg_advance (CUM, MODE, TYPE, NAMED))
#define FUNCTION_ARG_REGNO_P(REGNO) \
((REGNO) >= FIRST_ARGUMENT_REGISTER \
&& (REGNO) < FIRST_ARGUMENT_REGISTER + NUM_ARGUMENT_REGISTERS)