@@ -32,10 +32,8 @@ extern enum reg_class crx_secondary_reload_class (enum reg_class, enum machine_m
/* Passing function arguments. */
extern int crx_function_arg_regno_p (int);
#ifdef TREE_CODE
-extern void crx_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
#ifdef RTX_CODE
extern void crx_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);
-extern rtx crx_function_arg (struct cumulative_args *, enum machine_mode, tree, int);
#endif /* RTX_CODE */
#endif /* TREE_CODE */
@@ -131,6 +131,10 @@ static int crx_address_cost (rtx, bool);
static bool crx_legitimate_address_p (enum machine_mode, rtx, bool);
static bool crx_can_eliminate (const int, const int);
static void crx_option_optimization (int, int);
+static rtx crx_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
+ const_tree, bool);
+static void crx_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
+ const_tree, bool);
/*****************************************************************************/
/* RTL VALIDITY */
@@ -156,6 +160,16 @@ static void crx_option_optimization (int, int);
#define TARGET_RETURN_IN_MEMORY crx_return_in_memory
/*****************************************************************************/
+/* PASSING FUNCTION ARGUMENTS */
+/*****************************************************************************/
+
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG crx_function_arg
+
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE crx_function_arg_advance
+
+/*****************************************************************************/
/* RELATIVE COSTS OF OPERATIONS */
/*****************************************************************************/
@@ -421,7 +435,7 @@ crx_hard_regno_mode_ok (int regno, enum machine_mode mode)
* the number of registers needed else 0. */
static int
-enough_regs_for_param (CUMULATIVE_ARGS * cum, tree type,
+enough_regs_for_param (CUMULATIVE_ARGS * cum, const_tree type,
enum machine_mode mode)
{
int type_size;
@@ -444,11 +458,11 @@ enough_regs_for_param (CUMULATIVE_ARGS * cum, tree type,
return 0;
}
-/* Implements the macro FUNCTION_ARG defined in crx.h. */
+/* Implements TARGET_FUNCTION_ARG. */
-rtx
-crx_function_arg (CUMULATIVE_ARGS * cum, enum machine_mode mode, tree type,
- int named ATTRIBUTE_UNUSED)
+static rtx
+crx_function_arg (CUMULATIVE_ARGS * cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
last_parm_in_reg = 0;
@@ -512,11 +526,11 @@ crx_init_cumulative_args (CUMULATIVE_ARGS * cum, tree fntype,
}
}
-/* Implements the macro FUNCTION_ARG_ADVANCE defined in crx.h. */
+/* Implements the TARGET_FUNCTION_ARG_ADVANCE. */
-void
+static void
crx_function_arg_advance (CUMULATIVE_ARGS * cum, enum machine_mode mode,
- tree type, int named ATTRIBUTE_UNUSED)
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
/* l holds the number of registers required */
int l = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
@@ -305,9 +305,6 @@ enum reg_class
#define PUSH_ROUNDING(BYTES) (((BYTES) + 3) & ~3)
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
- ((rtx) crx_function_arg(&(CUM), (MODE), (TYPE), (NAMED)))
-
#ifndef CUMULATIVE_ARGS
struct cumulative_args
{
@@ -323,9 +320,6 @@ struct cumulative_args
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
crx_init_cumulative_args(&(CUM), (FNTYPE), (LIBNAME))
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
- crx_function_arg_advance(&(CUM), (MODE), (TYPE), (NAMED))
-
#define FUNCTION_ARG_REGNO_P(REGNO) crx_function_arg_regno_p(REGNO)
/*****************************************************************************/