pa-protos.h (function_arg): Delete.
* config/pa/pa-protos.h (function_arg): Delete. * config/pa/pa.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete. * config/pa/pa.c (function_arg): Rename to... (pa_function_arg): ...this. Make static. Take a const_tree and a bool. (pa_function_arg_advance): New function. (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define. From-SVN: r165228
This commit is contained in:
parent
13d3961c15
commit
fd29bdaffe
4 changed files with 38 additions and 24 deletions
|
@ -1,3 +1,13 @@
|
|||
2010-10-09 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* config/pa/pa-protos.h (function_arg): Delete.
|
||||
* config/pa/pa.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
|
||||
* config/pa/pa.c (function_arg): Rename to...
|
||||
(pa_function_arg): ...this. Make static. Take a const_tree and
|
||||
a bool.
|
||||
(pa_function_arg_advance): New function.
|
||||
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
|
||||
|
||||
2010-10-09 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* config/m68k/m68k.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
|
||||
|
|
|
@ -151,10 +151,6 @@ extern int cmpib_comparison_operator (rtx, enum machine_mode);
|
|||
/* Miscellaneous functions in pa.c. */
|
||||
#ifdef TREE_CODE
|
||||
extern int reloc_needed (tree);
|
||||
#ifdef RTX_CODE
|
||||
extern rtx function_arg (CUMULATIVE_ARGS *, enum machine_mode,
|
||||
tree, int);
|
||||
#endif
|
||||
extern bool pa_return_in_memory (const_tree, const_tree);
|
||||
#endif /* TREE_CODE */
|
||||
|
||||
|
|
|
@ -160,6 +160,10 @@ static bool pa_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
|
|||
const_tree, bool);
|
||||
static int pa_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
|
||||
tree, bool);
|
||||
static void pa_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
|
||||
const_tree, bool);
|
||||
static rtx pa_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
|
||||
const_tree, bool);
|
||||
static struct machine_function * pa_init_machine_status (void);
|
||||
static reg_class_t pa_secondary_reload (bool, rtx, reg_class_t,
|
||||
enum machine_mode,
|
||||
|
@ -334,6 +338,10 @@ static size_t n_deferred_plabels = 0;
|
|||
#define TARGET_CALLEE_COPIES hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true
|
||||
#undef TARGET_ARG_PARTIAL_BYTES
|
||||
#define TARGET_ARG_PARTIAL_BYTES pa_arg_partial_bytes
|
||||
#undef TARGET_FUNCTION_ARG
|
||||
#define TARGET_FUNCTION_ARG pa_function_arg
|
||||
#undef TARGET_FUNCTION_ARG_ADVANCE
|
||||
#define TARGET_FUNCTION_ARG_ADVANCE pa_function_arg_advance
|
||||
|
||||
#undef TARGET_EXPAND_BUILTIN_SAVEREGS
|
||||
#define TARGET_EXPAND_BUILTIN_SAVEREGS hppa_builtin_saveregs
|
||||
|
@ -9365,6 +9373,23 @@ pa_function_value_regno_p (const unsigned int regno)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* 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.) */
|
||||
|
||||
static void
|
||||
pa_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
|
||||
const_tree type, bool named ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int arg_size = FUNCTION_ARG_SIZE (mode, type);
|
||||
|
||||
cum->nargs_prototype--;
|
||||
cum->words += (arg_size
|
||||
+ ((cum->words & 01)
|
||||
&& type != NULL_TREE
|
||||
&& arg_size > 1));
|
||||
}
|
||||
|
||||
/* Return the location of a parameter that is passed in a register or NULL
|
||||
if the parameter has any component that is passed in memory.
|
||||
|
||||
|
@ -9373,9 +9398,9 @@ pa_function_value_regno_p (const unsigned int regno)
|
|||
|
||||
??? We might want to restructure this so that it looks more like other
|
||||
ports. */
|
||||
rtx
|
||||
function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
|
||||
int named ATTRIBUTE_UNUSED)
|
||||
static rtx
|
||||
pa_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
|
||||
const_tree type, bool named ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int max_arg_words = (TARGET_64BIT ? 8 : 4);
|
||||
int alignment = 0;
|
||||
|
|
|
@ -634,17 +634,6 @@ struct hppa_args {int words, nargs_prototype, incoming, indirect; };
|
|||
? (HOST_WIDE_INT) GET_MODE_SIZE (MODE) \
|
||||
: int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
||||
|
||||
/* 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) \
|
||||
{ (CUM).nargs_prototype--; \
|
||||
(CUM).words += FUNCTION_ARG_SIZE(MODE, TYPE) \
|
||||
+ (((CUM).words & 01) && (TYPE) != 0 \
|
||||
&& FUNCTION_ARG_SIZE(MODE, TYPE) > 1); \
|
||||
}
|
||||
|
||||
/* 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.
|
||||
|
@ -707,12 +696,6 @@ struct hppa_args {int words, nargs_prototype, incoming, indirect; };
|
|||
#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
|
||||
function_arg_padding ((MODE), (TYPE))
|
||||
|
||||
/* Do not expect to understand this without reading it several times. I'm
|
||||
tempted to try and simply it, but I worry about breaking something. */
|
||||
|
||||
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
|
||||
function_arg (&CUM, MODE, TYPE, NAMED)
|
||||
|
||||
/* 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, `PARM_BOUNDARY' is used for all arguments. */
|
||||
|
|
Loading…
Add table
Reference in a new issue