aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-11-02 14:50:28 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-11-02 14:50:28 +0000
commit5239874d719f7bc6ba6615e3972c2e5f9187b63a (patch)
tree54a3f96a18f481077566dce5b13cd84c22cfe938 /gcc
parent6b3456d1ff836cfc40033b9b238c5dcd9b18d9cb (diff)
downloadgcc-5239874d719f7bc6ba6615e3972c2e5f9187b63a.zip
gcc-5239874d719f7bc6ba6615e3972c2e5f9187b63a.tar.gz
gcc-5239874d719f7bc6ba6615e3972c2e5f9187b63a.tar.bz2
microblaze-protos.h (function_arg): Delete.
* config/microblaze/microblaze-protos.h (function_arg): Delete. (function_arg_advance): Delete. * config/microblaze/microblaze.h (FUNCTION_ARG_ADVANCE): Delete. (FUNCTION_ARG): Delete. * config/microblaze/microblaze.c (function_arg_advance): Rename to... (microblaze_function_arg_advance): ...this. Make static. Take a const_tree and a bool. (function-arg): Rename to... (microblaze_function_arg): ...this. Make static. Take a const_tree and a bool. (microblaze_expand_prologue): Call targetm.calls.function_arg and targetm.calls.function_arg_advance. (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define. From-SVN: r166188
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog32
-rw-r--r--gcc/config/microblaze/microblaze-protos.h6
-rw-r--r--gcc/config/microblaze/microblaze.c28
-rw-r--r--gcc/config/microblaze/microblaze.h6
4 files changed, 35 insertions, 37 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f16a436..874fc97 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-02 Nathan Froyd <froydnj@codesourcery.com>
+
+ * config/microblaze/microblaze-protos.h (function_arg): Delete.
+ (function_arg_advance): Delete.
+ * config/microblaze/microblaze.h (FUNCTION_ARG_ADVANCE): Delete.
+ (FUNCTION_ARG): Delete.
+ * config/microblaze/microblaze.c (function_arg_advance): Rename to...
+ (microblaze_function_arg_advance): ...this. Make static. Take a
+ const_tree and a bool.
+ (function-arg): Rename to...
+ (microblaze_function_arg): ...this. Make static. Take a const_tree
+ and a bool.
+ (microblaze_expand_prologue): Call targetm.calls.function_arg and
+ targetm.calls.function_arg_advance.
+ (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
2010-11-02 Iain Sandoe <iains@gcc.gnu.org>
Merge from FSF "apple/trunk" branch.
@@ -488,22 +504,6 @@
2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
- * config/microblaze/microblaze-protos.h (function_arg): Delete.
- (function_arg_advance): Delete.
- * config/microblaze/microblaze.h (FUNCTION_ARG_ADVANCE): Delete.
- (FUNCTION_ARG): Delete.
- * config/microblaze/microblaze.c (function_arg_advance): Rename to...
- (microblaze_function_arg_advance): ...this. Make static. Take a
- const_tree and a bool.
- (function-arg): Rename to...
- (microblaze_function_arg): ...this. Make static. Take a const_tree
- and a bool.
- (microblaze_expand_prologue): Call targetm.calls.function_arg and
- targetm.calls.function_arg_advance.
- (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
-
-2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
-
* score.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h
index ca8ca6e..56dca55 100644
--- a/gcc/config/microblaze/microblaze-protos.h
+++ b/gcc/config/microblaze/microblaze-protos.h
@@ -52,12 +52,6 @@ extern void microblaze_declare_object (FILE *, const char *, const char *,
extern void microblaze_asm_output_ident (FILE *, const char *);
#endif /* RTX_CODE */
-#ifdef TREE_CODE
-extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
- tree, int);
-extern rtx function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
-#endif /* TREE_CODE */
-
/* Declare functions in microblaze-c.c. */
extern void microblaze_cpp_define (struct cpp_reader *);
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
index 1c1d788..bcf845b 100644
--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -1088,9 +1088,9 @@ init_cumulative_args (CUMULATIVE_ARGS * cum, tree fntype,
/* Advance the argument to the next argument position. */
-void
-function_arg_advance (CUMULATIVE_ARGS * cum, enum machine_mode mode,
- tree type, int named ATTRIBUTE_UNUSED)
+static void
+microblaze_function_arg_advance (CUMULATIVE_ARGS * cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
cum->arg_number++;
switch (mode)
@@ -1143,9 +1143,10 @@ function_arg_advance (CUMULATIVE_ARGS * cum, enum machine_mode mode,
/* Return an RTL expression containing the register for the given mode,
or 0 if the argument is to be passed on the stack. */
-rtx
-function_arg (CUMULATIVE_ARGS * cum, enum machine_mode mode,
- tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
+static rtx
+microblaze_function_arg (CUMULATIVE_ARGS * cum, enum machine_mode mode,
+ const_tree type ATTRIBUTE_UNUSED,
+ bool named ATTRIBUTE_UNUSED)
{
rtx ret;
int regbase = -1;
@@ -2268,7 +2269,8 @@ microblaze_expand_prologue (void)
passed_mode = Pmode;
}
- entry_parm = FUNCTION_ARG (args_so_far, passed_mode, passed_type, 1);
+ entry_parm = targetm.calls.function_arg (&args_so_far, passed_mode,
+ passed_type, true);
if (entry_parm)
{
@@ -2288,7 +2290,8 @@ microblaze_expand_prologue (void)
break;
}
- FUNCTION_ARG_ADVANCE (args_so_far, passed_mode, passed_type, 1);
+ targetm.calls.function_arg_advance (&args_so_far, passed_mode,
+ passed_type, true);
next_arg = TREE_CHAIN (cur_arg);
if (next_arg == 0)
@@ -2302,7 +2305,8 @@ microblaze_expand_prologue (void)
/* Split parallel insn into a sequence of insns. */
- next_arg_reg = FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1);
+ next_arg_reg = targetm.calls.function_arg (&args_so_far, VOIDmode,
+ void_type_node, true);
if (next_arg_reg != 0 && GET_CODE (next_arg_reg) == PARALLEL)
{
rtvec adjust = XVEC (next_arg_reg, 0);
@@ -2999,6 +3003,12 @@ microblaze_adjust_cost (rtx insn ATTRIBUTE_UNUSED, rtx link,
#undef TARGET_ARG_PARTIAL_BYTES
#define TARGET_ARG_PARTIAL_BYTES function_arg_partial_bytes
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG microblaze_function_arg
+
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE microblaze_function_arg_advance
+
#undef TARGET_CAN_ELIMINATE
#define TARGET_CAN_ELIMINATE microblaze_can_eliminate
diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h
index 2ce22f1..63fd4f6 100644
--- a/gcc/config/microblaze/microblaze.h
+++ b/gcc/config/microblaze/microblaze.h
@@ -496,12 +496,6 @@ typedef struct microblaze_args
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS) \
init_cumulative_args (&CUM, FNTYPE, LIBNAME)
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
- function_arg_advance (&CUM, MODE, TYPE, NAMED)
-
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
- function_arg( &CUM, MODE, TYPE, NAMED)
-
#define NO_PROFILE_COUNTERS 1
#define FUNCTION_PROFILER(FILE, LABELNO) { \