summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-09 14:18:51 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-09 14:18:51 +0000
commite8509befebc2a191243df50d164e2ea56724797b (patch)
tree2ec4e06ec24a8cfd7eb930a0b2916e0963f1a09a /gcc
parent54ea4630f13c969fbc6a434bd970bda77422ecac (diff)
downloadgcc-e8509befebc2a191243df50d164e2ea56724797b.tar.gz
* config/avr/avr-protos.h (function_arg): Delete.
(function_arg_advance): Delete. * config/avr/avr.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete. * config/avr/avr.c (function_arg): Rename to... (avr_function_arg): ...this. Make static. Take a const_tree and a bool. (function_arg_advance): Rename to... (avr_function_arg_advance): ...this. Make static. Take a const_tree and a bool. (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165226 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/config/avr/avr-protos.h7
-rw-r--r--gcc/config/avr/avr.c20
-rw-r--r--gcc/config/avr/avr.h5
4 files changed, 27 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8a2015ce371..6ad88a007e3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,18 @@
2010-10-09 Nathan Froyd <froydnj@codesourcery.com>
+ * config/avr/avr-protos.h (function_arg): Delete.
+ (function_arg_advance): Delete.
+ * config/avr/avr.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
+ * config/avr/avr.c (function_arg): Rename to...
+ (avr_function_arg): ...this. Make static. Take a const_tree and
+ a bool.
+ (function_arg_advance): Rename to...
+ (avr_function_arg_advance): ...this. Make static. Take a
+ const_tree and a bool.
+ (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
+2010-10-09 Nathan Froyd <froydnj@codesourcery.com>
+
* config/alpha/alpha-protos.h (function_arg): Delete.
* config/alpha/alpha.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/alpha/vms.h (FUNCTION_ARG_ADVANCE): Delete.
diff --git a/gcc/config/avr/avr-protos.h b/gcc/config/avr/avr-protos.h
index 83de685e76c..3d717a2c0db 100644
--- a/gcc/config/avr/avr-protos.h
+++ b/gcc/config/avr/avr-protos.h
@@ -42,15 +42,8 @@ extern int avr_progmem_p (tree decl, tree attributes);
#ifdef RTX_CODE /* inside TREE_CODE */
extern void init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
rtx libname, tree fndecl);
-extern rtx function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
- tree type, int named);
#endif /* RTX_CODE inside TREE_CODE */
-#ifdef HAVE_MACHINE_MODES /* inside TREE_CODE */
-extern void function_arg_advance (CUMULATIVE_ARGS *cum,
- enum machine_mode mode, tree type,
- int named);
-#endif /* HAVE_MACHINE_MODES inside TREE_CODE*/
#endif /* TREE_CODE */
#ifdef RTX_CODE
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index e300dd65bb0..c1cd7782224 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -93,6 +93,10 @@ static unsigned int avr_case_values_threshold (void);
static bool avr_frame_pointer_required_p (void);
static bool avr_can_eliminate (const int, const int);
static bool avr_class_likely_spilled_p (reg_class_t c);
+static rtx avr_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
+ const_tree, bool);
+static void avr_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
+ const_tree, bool);
/* Allocate registers from r25 to r8 for parameters for function calls. */
#define FIRST_CUM_REG 26
@@ -168,6 +172,10 @@ static const struct attribute_spec avr_attribute_table[] =
#define TARGET_ADDRESS_COST avr_address_cost
#undef TARGET_MACHINE_DEPENDENT_REORG
#define TARGET_MACHINE_DEPENDENT_REORG avr_reorg
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG avr_function_arg
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE avr_function_arg_advance
#undef TARGET_LEGITIMIZE_ADDRESS
#define TARGET_LEGITIMIZE_ADDRESS avr_legitimize_address
@@ -1566,9 +1574,9 @@ avr_num_arg_regs (enum machine_mode mode, tree type)
/* Controls whether a function argument is passed
in a register, and which register. */
-rtx
-function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
- int named ATTRIBUTE_UNUSED)
+static rtx
+avr_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
int bytes = avr_num_arg_regs (mode, type);
@@ -1581,9 +1589,9 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
/* Update the summarizer variable CUM to advance past an argument
in the argument list. */
-void
-function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
- int named ATTRIBUTE_UNUSED)
+static void
+avr_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
int bytes = avr_num_arg_regs (mode, type);
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 60a58993517..3c7c4a4b50d 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -372,8 +372,6 @@ enum reg_class {
for POST_DEC targets (PR27386). */
/*#define PUSH_ROUNDING(NPUSHED) (NPUSHED)*/
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) (function_arg (&(CUM), MODE, TYPE, NAMED))
-
typedef struct avr_args {
int nregs; /* # registers available for passing */
int regno; /* next available register number */
@@ -382,9 +380,6 @@ typedef struct avr_args {
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
init_cumulative_args (&(CUM), FNTYPE, LIBNAME, FNDECL)
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
- (function_arg_advance (&CUM, MODE, TYPE, NAMED))
-
#define FUNCTION_ARG_REGNO_P(r) function_arg_regno_p(r)
extern int avr_reg_order[];