aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-08-30 16:03:44 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-08-30 16:03:44 +0000
commit626a4b315aba6ee84b7978ddc277dd4c49c91a21 (patch)
tree9b7965e819512c57228da621827b5d93aa80ebc0 /gcc
parentae4235508ed13b83b8ffdba19829119e937205fe (diff)
downloadgcc-626a4b315aba6ee84b7978ddc277dd4c49c91a21.zip
gcc-626a4b315aba6ee84b7978ddc277dd4c49c91a21.tar.gz
gcc-626a4b315aba6ee84b7978ddc277dd4c49c91a21.tar.bz2
xtensa-protos.h (function_arg_advance): Delete.
* config/xtensa/xtensa-protos.h (function_arg_advance): Delete. (function_arg): Delete. * config/xtensa/xtensa.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete. (FUNCTION_INCOMING_ARG): Delete. * config/xtensa/xtensa.c (function_arg_advance): Rename to... (xtensa_function_arg_advance): ...this. Make static. Take a const_tree and a bool. (function_arg): Rename to... (xtensa_function_arg_1): ...this. Make static. Take a const_tree and a bool. (xtensa_function_arg, xtensa_function_incoming_arg): Nex functions. (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define. (TARGET_FUNCTION_INCOMING_ARG): Define. From-SVN: r163649
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog16
-rw-r--r--gcc/config/xtensa/xtensa-protos.h3
-rw-r--r--gcc/config/xtensa/xtensa.c40
-rw-r--r--gcc/config/xtensa/xtensa.h12
4 files changed, 51 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 685c2f6..39eb13c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-30 Nathan Froyd <froydnj@codesourcery.com>
+
+ * config/xtensa/xtensa-protos.h (function_arg_advance): Delete.
+ (function_arg): Delete.
+ * config/xtensa/xtensa.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
+ (FUNCTION_INCOMING_ARG): Delete.
+ * config/xtensa/xtensa.c (function_arg_advance): Rename to...
+ (xtensa_function_arg_advance): ...this. Make static. Take a const_tree
+ and a bool.
+ (function_arg): Rename to...
+ (xtensa_function_arg_1): ...this. Make static. Take a const_tree and
+ a bool.
+ (xtensa_function_arg, xtensa_function_incoming_arg): Nex functions.
+ (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+ (TARGET_FUNCTION_INCOMING_ARG): Define.
+
2010-08-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/21602
diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h
index 729bc84..18c08d7 100644
--- a/gcc/config/xtensa/xtensa-protos.h
+++ b/gcc/config/xtensa/xtensa-protos.h
@@ -73,9 +73,6 @@ extern reg_class_t xtensa_secondary_reload (bool, rtx, reg_class_t,
#endif /* RTX_CODE */
#ifdef TREE_CODE
-extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree);
-extern struct rtx_def *function_arg (CUMULATIVE_ARGS *, enum machine_mode,
- tree, int);
extern int function_arg_boundary (enum machine_mode, tree);
#endif /* TREE_CODE */
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 610a272..f81452a 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -140,6 +140,12 @@ static tree xtensa_build_builtin_va_list (void);
static bool xtensa_return_in_memory (const_tree, const_tree);
static tree xtensa_gimplify_va_arg_expr (tree, tree, gimple_seq *,
gimple_seq *);
+static void xtensa_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
+ const_tree, bool);
+static rtx xtensa_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
+ const_tree, bool);
+static rtx xtensa_function_incoming_arg (CUMULATIVE_ARGS *,
+ enum machine_mode, const_tree, bool);
static rtx xtensa_function_value (const_tree, const_tree, bool);
static void xtensa_init_builtins (void);
static tree xtensa_fold_builtin (tree, int, tree *, bool);
@@ -201,6 +207,12 @@ static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] =
#define TARGET_SPLIT_COMPLEX_ARG hook_bool_const_tree_true
#undef TARGET_MUST_PASS_IN_STACK
#define TARGET_MUST_PASS_IN_STACK must_pass_in_stack_var_size
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE xtensa_function_arg_advance
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG xtensa_function_arg
+#undef TARGET_FUNCTION_INCOMING_ARG
+#define TARGET_FUNCTION_INCOMING_ARG xtensa_function_incoming_arg
#undef TARGET_EXPAND_BUILTIN_SAVEREGS
#define TARGET_EXPAND_BUILTIN_SAVEREGS xtensa_builtin_saveregs
@@ -1983,8 +1995,9 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, int incoming)
/* Advance the argument to the next argument position. */
-void
-function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type)
+static void
+xtensa_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
int words, max;
int *arg_words;
@@ -2009,9 +2022,9 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type)
or 0 if the argument is to be passed on the stack. INCOMING_P is nonzero
if this is an incoming argument to the current function. */
-rtx
-function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
- int incoming_p)
+static rtx
+xtensa_function_arg_1 (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool incoming_p)
{
int regbase, words, max;
int *arg_words;
@@ -2042,6 +2055,23 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
return gen_rtx_REG (mode, regno);
}
+/* Implement TARGET_FUNCTION_ARG. */
+
+static rtx
+xtensa_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
+{
+ return xtensa_function_arg_1 (cum, mode, type, false);
+}
+
+/* Implement TARGET_FUNCTION_INCOMING_ARG. */
+
+static rtx
+xtensa_function_incoming_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
+{
+ return xtensa_function_arg_1 (cum, mode, type, true);
+}
int
function_arg_boundary (enum machine_mode mode, tree type)
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index 32819bc..153242a 100644
--- a/gcc/config/xtensa/xtensa.h
+++ b/gcc/config/xtensa/xtensa.h
@@ -618,18 +618,6 @@ typedef struct xtensa_args
#define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \
init_cumulative_args (&CUM, 1)
-/* 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) \
- function_arg_advance (&CUM, MODE, TYPE)
-
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
- function_arg (&CUM, MODE, TYPE, FALSE)
-
-#define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \
- function_arg (&CUM, MODE, TYPE, TRUE)
-
#define FUNCTION_ARG_BOUNDARY function_arg_boundary
/* Profiling Xtensa code is typically done with the built-in profiling