Commit 9c6a2bee by Nathan Froyd Committed by Nathan Froyd

arm-protos.h (arm_function_arg_advance): Delete.

	* config/arm/arm-protos.h (arm_function_arg_advance): Delete.
	(arm_function_arg): Delete.
	(arm_needs_doubleword_align): Take a const_tree.
	* config/arm/arm.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
	* config/arm/arm.c (aapcs_select_call_coproc): Take a const_tree.
	(aapcs_layout_arg, arm_needs_doubleword_align): Likewise.
	(arm_function_arg): Make static.  Take a const_tree and a bool.
	(arm_function_arg_advance): Likewise.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r163683
parent a478ffff
2010-08-31 Nathan Froyd <froydnj@codesourcery.com>
* config/arm/arm-protos.h (arm_function_arg_advance): Delete.
(arm_function_arg): Delete.
(arm_needs_doubleword_align): Take a const_tree.
* config/arm/arm.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/arm/arm.c (aapcs_select_call_coproc): Take a const_tree.
(aapcs_layout_arg, arm_needs_doubleword_align): Likewise.
(arm_function_arg): Make static. Take a const_tree and a bool.
(arm_function_arg_advance): Likewise.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
2010-08-31 Andi Kleen <ak@linux.intel.com> 2010-08-31 Andi Kleen <ak@linux.intel.com>
* common.opt (fwhopr=): Update for -fwhopr=jobserver * common.opt (fwhopr=): Update for -fwhopr=jobserver
......
...@@ -153,13 +153,10 @@ extern unsigned int arm_sync_loop_insns (rtx , rtx *); ...@@ -153,13 +153,10 @@ extern unsigned int arm_sync_loop_insns (rtx , rtx *);
extern bool arm_output_addr_const_extra (FILE *, rtx); extern bool arm_output_addr_const_extra (FILE *, rtx);
#if defined TREE_CODE #if defined TREE_CODE
extern rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
extern void arm_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree); extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
extern bool arm_pad_arg_upward (enum machine_mode, const_tree); extern bool arm_pad_arg_upward (enum machine_mode, const_tree);
extern bool arm_pad_reg_upward (enum machine_mode, tree, int); extern bool arm_pad_reg_upward (enum machine_mode, tree, int);
extern bool arm_needs_doubleword_align (enum machine_mode, tree); extern bool arm_needs_doubleword_align (enum machine_mode, const_tree);
#endif #endif
extern int arm_apply_result_size (void); extern int arm_apply_result_size (void);
extern rtx aapcs_libcall_value (enum machine_mode); extern rtx aapcs_libcall_value (enum machine_mode);
......
...@@ -164,6 +164,10 @@ static void emit_constant_insn (rtx cond, rtx pattern); ...@@ -164,6 +164,10 @@ static void emit_constant_insn (rtx cond, rtx pattern);
static rtx emit_set_insn (rtx, rtx); static rtx emit_set_insn (rtx, rtx);
static int arm_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode, static int arm_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool); tree, bool);
static rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
static void arm_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
static rtx aapcs_allocate_return_reg (enum machine_mode, const_tree, static rtx aapcs_allocate_return_reg (enum machine_mode, const_tree,
const_tree); const_tree);
static int aapcs_select_return_coproc (const_tree, const_tree); static int aapcs_select_return_coproc (const_tree, const_tree);
...@@ -377,6 +381,10 @@ static const struct attribute_spec arm_attribute_table[] = ...@@ -377,6 +381,10 @@ static const struct attribute_spec arm_attribute_table[] =
#define TARGET_PASS_BY_REFERENCE arm_pass_by_reference #define TARGET_PASS_BY_REFERENCE arm_pass_by_reference
#undef TARGET_ARG_PARTIAL_BYTES #undef TARGET_ARG_PARTIAL_BYTES
#define TARGET_ARG_PARTIAL_BYTES arm_arg_partial_bytes #define TARGET_ARG_PARTIAL_BYTES arm_arg_partial_bytes
#undef TARGET_FUNCTION_ARG
#define TARGET_FUNCTION_ARG arm_function_arg
#undef TARGET_FUNCTION_ARG_ADVANCE
#define TARGET_FUNCTION_ARG_ADVANCE arm_function_arg_advance
#undef TARGET_SETUP_INCOMING_VARARGS #undef TARGET_SETUP_INCOMING_VARARGS
#define TARGET_SETUP_INCOMING_VARARGS arm_setup_incoming_varargs #define TARGET_SETUP_INCOMING_VARARGS arm_setup_incoming_varargs
...@@ -4178,7 +4186,7 @@ static struct ...@@ -4178,7 +4186,7 @@ static struct
static int static int
aapcs_select_call_coproc (CUMULATIVE_ARGS *pcum, enum machine_mode mode, aapcs_select_call_coproc (CUMULATIVE_ARGS *pcum, enum machine_mode mode,
tree type) const_tree type)
{ {
int i; int i;
...@@ -4290,7 +4298,7 @@ aapcs_libcall_value (enum machine_mode mode) ...@@ -4290,7 +4298,7 @@ aapcs_libcall_value (enum machine_mode mode)
numbers referred to here are those in the AAPCS. */ numbers referred to here are those in the AAPCS. */
static void static void
aapcs_layout_arg (CUMULATIVE_ARGS *pcum, enum machine_mode mode, aapcs_layout_arg (CUMULATIVE_ARGS *pcum, enum machine_mode mode,
tree type, int named) const_tree type, bool named)
{ {
int nregs, nregs2; int nregs, nregs2;
int ncrn; int ncrn;
...@@ -4455,7 +4463,7 @@ arm_init_cumulative_args (CUMULATIVE_ARGS *pcum, tree fntype, ...@@ -4455,7 +4463,7 @@ arm_init_cumulative_args (CUMULATIVE_ARGS *pcum, tree fntype,
/* Return true if mode/type need doubleword alignment. */ /* Return true if mode/type need doubleword alignment. */
bool bool
arm_needs_doubleword_align (enum machine_mode mode, tree type) arm_needs_doubleword_align (enum machine_mode mode, const_tree type)
{ {
return (GET_MODE_ALIGNMENT (mode) > PARM_BOUNDARY return (GET_MODE_ALIGNMENT (mode) > PARM_BOUNDARY
|| (type && TYPE_ALIGN (type) > PARM_BOUNDARY)); || (type && TYPE_ALIGN (type) > PARM_BOUNDARY));
...@@ -4473,11 +4481,17 @@ arm_needs_doubleword_align (enum machine_mode mode, tree type) ...@@ -4473,11 +4481,17 @@ arm_needs_doubleword_align (enum machine_mode mode, tree type)
CUM is a variable of type CUMULATIVE_ARGS which gives info about CUM is a variable of type CUMULATIVE_ARGS which gives info about
the preceding args and about the function being called. the preceding args and about the function being called.
NAMED is nonzero if this argument is a named parameter NAMED is nonzero if this argument is a named parameter
(otherwise it is an extra parameter matching an ellipsis). */ (otherwise it is an extra parameter matching an ellipsis).
rtx On the ARM, normally the first 16 bytes are passed in registers r0-r3; all
other arguments are passed on the stack. If (NAMED == 0) (which happens
only in assign_parms, since TARGET_SETUP_INCOMING_VARARGS is
defined), say it is passed in the stack (function_prologue will
indeed make it pass in the stack if necessary). */
static rtx
arm_function_arg (CUMULATIVE_ARGS *pcum, enum machine_mode mode, arm_function_arg (CUMULATIVE_ARGS *pcum, enum machine_mode mode,
tree type, int named) const_tree type, bool named)
{ {
int nregs; int nregs;
...@@ -4550,9 +4564,13 @@ arm_arg_partial_bytes (CUMULATIVE_ARGS *pcum, enum machine_mode mode, ...@@ -4550,9 +4564,13 @@ arm_arg_partial_bytes (CUMULATIVE_ARGS *pcum, enum machine_mode mode,
return 0; return 0;
} }
void /* Update the data in PCUM to advance over an argument
of mode MODE and data type TYPE.
(TYPE is null for libcalls where that information may not be available.) */
static void
arm_function_arg_advance (CUMULATIVE_ARGS *pcum, enum machine_mode mode, arm_function_arg_advance (CUMULATIVE_ARGS *pcum, enum machine_mode mode,
tree type, bool named) const_tree type, bool named)
{ {
if (pcum->pcs_variant <= ARM_PCS_AAPCS_LOCAL) if (pcum->pcs_variant <= ARM_PCS_AAPCS_LOCAL)
{ {
......
...@@ -1737,27 +1737,6 @@ typedef struct ...@@ -1737,27 +1737,6 @@ typedef struct
MACHMODE aapcs_vfp_rmode; MACHMODE aapcs_vfp_rmode;
} CUMULATIVE_ARGS; } CUMULATIVE_ARGS;
/* Define where to put the arguments 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).
On the ARM, normally the first 16 bytes are passed in registers r0-r3; all
other arguments are passed on the stack. If (NAMED == 0) (which happens
only in assign_parms, since TARGET_SETUP_INCOMING_VARARGS is
defined), say it is passed in the stack (function_prologue will
indeed make it pass in the stack if necessary). */
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
arm_function_arg (&(CUM), (MODE), (TYPE), (NAMED))
#define FUNCTION_ARG_PADDING(MODE, TYPE) \ #define FUNCTION_ARG_PADDING(MODE, TYPE) \
(arm_pad_arg_upward (MODE, TYPE) ? upward : downward) (arm_pad_arg_upward (MODE, TYPE) ? upward : downward)
...@@ -1776,12 +1755,6 @@ typedef struct ...@@ -1776,12 +1755,6 @@ typedef struct
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \ #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
arm_init_cumulative_args (&(CUM), (FNTYPE), (LIBNAME), (FNDECL)) arm_init_cumulative_args (&(CUM), (FNTYPE), (LIBNAME), (FNDECL))
/* 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) \
arm_function_arg_advance (&(CUM), (MODE), (TYPE), (NAMED))
/* If defined, a C expression that gives the alignment boundary, in bits, of an /* 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, argument with the specified mode and type. If it is not defined,
`PARM_BOUNDARY' is used for all arguments. */ `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