OSDN Git Service

* config/xtensa/xtensa-protos.h (function_arg_advance): Delete.
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Aug 2010 16:03:44 +0000 (16:03 +0000)
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Aug 2010 16:03:44 +0000 (16:03 +0000)
(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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163649 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/xtensa/xtensa-protos.h
gcc/config/xtensa/xtensa.c
gcc/config/xtensa/xtensa.h

index 685c2f6..39eb13c 100644 (file)
@@ -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
index 729bc84..18c08d7 100644 (file)
@@ -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 */
 
index 610a272..f81452a 100644 (file)
@@ -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)
index 32819bc..153242a 100644 (file)
@@ -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