Commit c8717ea3 by Nathan Froyd Committed by Nathan Froyd

mips-protos.h (mips_function_arg_advance): Delete

	* config/mips/mips-protos.h (mips_function_arg_advance): Delete
	(mips_function_arg): Delete.
	(mips_function_arg_boundary): Take a const_tree.
	* config/mips/mips.c (mips_function_arg_boundary): Likewise.
	(mips_arg_info): Likewise.
	(mips_setup_incoming_varargs): Call mips_function_arg_advance
	instead of FUNCTION_ARG_ADVANCE.
	(mips_function_arg_advance): Adjust prototype.  Make static.
	(mips_function_arg): Likewise.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
	* config/mips/mips.h (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Delete.

From-SVN: r163587
parent 7c8232a2
2010-08-27 Nathan Froyd <froydnj@codesourcery.com> 2010-08-27 Nathan Froyd <froydnj@codesourcery.com>
* config/mips/mips-protos.h (mips_function_arg_advance): Delete
(mips_function_arg): Delete.
(mips_function_arg_boundary): Take a const_tree.
* config/mips/mips.c (mips_function_arg_boundary): Likewise.
(mips_arg_info): Likewise.
(mips_setup_incoming_varargs): Call mips_function_arg_advance
instead of FUNCTION_ARG_ADVANCE.
(mips_function_arg_advance): Adjust prototype. Make static.
(mips_function_arg): Likewise.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
* config/mips/mips.h (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Delete.
2010-08-27 Nathan Froyd <froydnj@codesourcery.com>
* config/rs6000/rs6000.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete. * config/rs6000/rs6000.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/rs6000/rs6000-protos.h (function_arg_advance): Delete. * config/rs6000/rs6000-protos.h (function_arg_advance): Delete.
(function_arg): Delete. (function_arg): Delete.
......
...@@ -240,11 +240,7 @@ extern bool mips_expand_block_move (rtx, rtx, rtx); ...@@ -240,11 +240,7 @@ extern bool mips_expand_block_move (rtx, rtx, rtx);
extern void mips_expand_synci_loop (rtx, rtx); extern void mips_expand_synci_loop (rtx, rtx);
extern void mips_init_cumulative_args (CUMULATIVE_ARGS *, tree); extern void mips_init_cumulative_args (CUMULATIVE_ARGS *, tree);
extern void mips_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, extern int mips_function_arg_boundary (enum machine_mode, const_tree);
tree, int);
extern rtx mips_function_arg (const CUMULATIVE_ARGS *,
enum machine_mode, tree, int);
extern int mips_function_arg_boundary (enum machine_mode, tree);
extern bool mips_pad_arg_upward (enum machine_mode, const_tree); extern bool mips_pad_arg_upward (enum machine_mode, const_tree);
extern bool mips_pad_reg_upward (enum machine_mode, tree); extern bool mips_pad_reg_upward (enum machine_mode, tree);
......
...@@ -4701,7 +4701,7 @@ mips_init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype) ...@@ -4701,7 +4701,7 @@ mips_init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype)
static void static void
mips_get_arg_info (struct mips_arg_info *info, const CUMULATIVE_ARGS *cum, mips_get_arg_info (struct mips_arg_info *info, const CUMULATIVE_ARGS *cum,
enum machine_mode mode, tree type, int named) enum machine_mode mode, const_tree type, bool named)
{ {
bool doubleword_aligned_p; bool doubleword_aligned_p;
unsigned int num_bytes, num_words, max_regs; unsigned int num_bytes, num_words, max_regs;
...@@ -4834,11 +4834,11 @@ mips_strict_argument_naming (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED) ...@@ -4834,11 +4834,11 @@ mips_strict_argument_naming (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
return !TARGET_OLDABI; return !TARGET_OLDABI;
} }
/* Implement FUNCTION_ARG. */ /* Implement TARGET_FUNCTION_ARG. */
rtx static rtx
mips_function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode, mips_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
tree type, int named) const_tree type, bool named)
{ {
struct mips_arg_info info; struct mips_arg_info info;
...@@ -4960,11 +4960,11 @@ mips_function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode, ...@@ -4960,11 +4960,11 @@ mips_function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
return gen_rtx_REG (mode, mips_arg_regno (&info, TARGET_HARD_FLOAT)); return gen_rtx_REG (mode, mips_arg_regno (&info, TARGET_HARD_FLOAT));
} }
/* Implement FUNCTION_ARG_ADVANCE. */ /* Implement TARGET_FUNCTION_ARG_ADVANCE. */
void static void
mips_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, mips_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
tree type, int named) const_tree type, bool named)
{ {
struct mips_arg_info info; struct mips_arg_info info;
...@@ -5013,7 +5013,7 @@ mips_arg_partial_bytes (CUMULATIVE_ARGS *cum, ...@@ -5013,7 +5013,7 @@ mips_arg_partial_bytes (CUMULATIVE_ARGS *cum,
to STACK_BOUNDARY bits if the type requires it. */ to STACK_BOUNDARY bits if the type requires it. */
int int
mips_function_arg_boundary (enum machine_mode mode, tree type) mips_function_arg_boundary (enum machine_mode mode, const_tree type)
{ {
unsigned int alignment; unsigned int alignment;
...@@ -5346,7 +5346,7 @@ mips_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode, ...@@ -5346,7 +5346,7 @@ mips_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
argument. Advance a local copy of CUM past the last "real" named argument. Advance a local copy of CUM past the last "real" named
argument, to find out how many registers are left over. */ argument, to find out how many registers are left over. */
local_cum = *cum; local_cum = *cum;
FUNCTION_ARG_ADVANCE (local_cum, mode, type, true); mips_function_arg_advance (&local_cum, mode, type, true);
/* Found out how many registers we need to save. */ /* Found out how many registers we need to save. */
gp_saved = MAX_ARGS_IN_REGISTERS - local_cum.num_gprs; gp_saved = MAX_ARGS_IN_REGISTERS - local_cum.num_gprs;
...@@ -16469,6 +16469,10 @@ void mips_function_profiler (FILE *file) ...@@ -16469,6 +16469,10 @@ void mips_function_profiler (FILE *file)
#define TARGET_CALLEE_COPIES mips_callee_copies #define TARGET_CALLEE_COPIES mips_callee_copies
#undef TARGET_ARG_PARTIAL_BYTES #undef TARGET_ARG_PARTIAL_BYTES
#define TARGET_ARG_PARTIAL_BYTES mips_arg_partial_bytes #define TARGET_ARG_PARTIAL_BYTES mips_arg_partial_bytes
#undef TARGET_FUNCTION_ARG
#define TARGET_FUNCTION_ARG mips_function_arg
#undef TARGET_FUNCTION_ARG_ADVANCE
#define TARGET_FUNCTION_ARG_ADVANCE mips_function_arg_advance
#undef TARGET_MODE_REP_EXTENDED #undef TARGET_MODE_REP_EXTENDED
#define TARGET_MODE_REP_EXTENDED mips_mode_rep_extended #define TARGET_MODE_REP_EXTENDED mips_mode_rep_extended
......
...@@ -2249,29 +2249,6 @@ typedef struct mips_args { ...@@ -2249,29 +2249,6 @@ typedef struct mips_args {
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
mips_init_cumulative_args (&CUM, FNTYPE) mips_init_cumulative_args (&CUM, FNTYPE)
/* Update the data in CUM to advance over an argument
of mode MODE and data type TYPE.
(TYPE is null for libcalls where that information may not be available.) */
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
mips_function_arg_advance (&CUM, MODE, TYPE, NAMED)
/* Determine where to put an argument to a function.
Value is zero to push the argument on the stack,
or a hard register in which to store the argument.
MODE is the argument's machine mode.
TYPE is the data type of the argument (as a tree).
This is null for libcalls where that information may
not be available.
CUM is a variable of type CUMULATIVE_ARGS which gives info about
the preceding args and about the function being called.
NAMED is nonzero if this argument is a named parameter
(otherwise it is an extra parameter matching an ellipsis). */
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
mips_function_arg (&CUM, MODE, TYPE, NAMED)
#define FUNCTION_ARG_BOUNDARY mips_function_arg_boundary #define FUNCTION_ARG_BOUNDARY mips_function_arg_boundary
#define FUNCTION_ARG_PADDING(MODE, TYPE) \ #define FUNCTION_ARG_PADDING(MODE, TYPE) \
......
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