aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-10-28 20:02:25 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-10-28 20:02:25 +0000
commita6a54b6fd1c70a193f64203cdf00120ae2caa580 (patch)
treeb8f24a08e9b8637555bf29b1a0bad4c396c0b4ce /gcc
parentda15f931e57b8783d9fa6c4e5f18e62eadc16ff7 (diff)
downloadgcc-a6a54b6fd1c70a193f64203cdf00120ae2caa580.zip
gcc-a6a54b6fd1c70a193f64203cdf00120ae2caa580.tar.gz
gcc-a6a54b6fd1c70a193f64203cdf00120ae2caa580.tar.bz2
crx-protos.h (crx_function_arg): Delete.
* config/crx/crx-protos.h (crx_function_arg): Delete. (crx_function_arg_advance): Delete. * config/crx/crx.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete. * config/crx/crx.c (crx_function_arg): Make static. Take a const_tree and a bool. (crx_function_arg_advance): Make static. Take a const_tree and a bool. (enough_regs_for_param): Take a const_tree. (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define. From-SVN: r166040
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/crx/crx-protos.h2
-rw-r--r--gcc/config/crx/crx.c30
-rw-r--r--gcc/config/crx/crx.h6
4 files changed, 34 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ba72067..b413735 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,17 @@
2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
+ * config/crx/crx-protos.h (crx_function_arg): Delete.
+ (crx_function_arg_advance): Delete.
+ * config/crx/crx.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
+ * config/crx/crx.c (crx_function_arg): Make static. Take a
+ const_tree and a bool.
+ (crx_function_arg_advance): Make static. Take a const_tree and
+ a bool.
+ (enough_regs_for_param): Take a const_tree.
+ (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
+2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
+
* config/m68hc11/m68hc11-protos.h (m68hc11_function_arg): Delete.
(m68hc11_function_arg_advance): Delete.
* config/m68hc11/m68hc11.h (FUNCTION_ARG): Delete.
diff --git a/gcc/config/crx/crx-protos.h b/gcc/config/crx/crx-protos.h
index b35051d..208616d 100644
--- a/gcc/config/crx/crx-protos.h
+++ b/gcc/config/crx/crx-protos.h
@@ -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 */
diff --git a/gcc/config/crx/crx.c b/gcc/config/crx/crx.c
index 3dd642d..5fc963a 100644
--- a/gcc/config/crx/crx.c
+++ b/gcc/config/crx/crx.c
@@ -130,6 +130,10 @@ static bool crx_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_U
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 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 */
@@ -155,6 +159,16 @@ static bool crx_can_eliminate (const int, const 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 */
/*****************************************************************************/
@@ -429,7 +443,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;
@@ -452,11 +466,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;
@@ -520,11 +534,11 @@ crx_init_cumulative_args (CUMULATIVE_ARGS * cum, tree fntype,
}
}
-/* Implements the macro FUNCTION_ARG_ADVANCE defined in crx.h. */
+/* Implements 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;
diff --git a/gcc/config/crx/crx.h b/gcc/config/crx/crx.h
index 6982eb2..eac1594 100644
--- a/gcc/config/crx/crx.h
+++ b/gcc/config/crx/crx.h
@@ -300,9 +300,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
{
@@ -318,9 +315,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)
/*****************************************************************************/