* config/bfin/bfin-protos.h (function_arg, function_arg_advance):
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Oct 2010 13:22:00 +0000 (13:22 +0000)
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Oct 2010 13:22:00 +0000 (13:22 +0000)
Delete.
* config/bfin/bfin.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/bfin/bfin.c (function_arg_advance): Rename to...
(bfin_function_arg_advance): ...this.  Make static.  Take const_tree
and bool arguments.
(function_arg): Rename to...
(bfin_function_arg): ...this.  Make static.  Take const_tree and bool
arguments.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

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

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

index 4b01503..7a1e1fc 100644 (file)
@@ -1,5 +1,18 @@
 2010-10-08  Nathan Froyd  <froydnj@codesourcery.com>
 
+       * config/bfin/bfin-protos.h (function_arg, function_arg_advance):
+       Delete.
+       * config/bfin/bfin.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
+       * config/bfin/bfin.c (function_arg_advance): Rename to...
+       (bfin_function_arg_advance): ...this.  Make static.  Take const_tree
+       and bool arguments.
+       (function_arg): Rename to...
+       (bfin_function_arg): ...this.  Make static.  Take const_tree and bool
+       arguments.
+       (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
+2010-10-08  Nathan Froyd  <froydnj@codesourcery.com>
+
        * config/score/score-protos.h (score_function_arg): Delete.
        (score_function_arg_advance): Delete.
        * config/score/score3.h (score3_function_arg_advance): Take a
index 1e18307..d713ae5 100644 (file)
@@ -65,8 +65,6 @@
 
 #define Mmode enum machine_mode
 
-extern rtx function_arg (CUMULATIVE_ARGS *, Mmode, tree, int);
-extern void function_arg_advance (CUMULATIVE_ARGS *, Mmode, tree, int);
 extern bool function_arg_regno_p (int);
 
 extern const char *output_load_immediate (rtx *);
index da5a8ee..1ef311b 100644 (file)
@@ -1907,9 +1907,9 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
    of mode MODE and data type TYPE.
    (TYPE is null for libcalls where that information may not be available.)  */
 
-void
-function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
-                     int named ATTRIBUTE_UNUSED)
+static void
+bfin_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+                          const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   int count, bytes, words;
 
@@ -1946,9 +1946,9 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
    NAMED is nonzero if this argument is a named parameter
     (otherwise it is an extra parameter matching an ellipsis).  */
 
-struct rtx_def *
-function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
-             int named ATTRIBUTE_UNUSED)
+static rtx
+bfin_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+                  const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   int bytes
     = (mode == BLKmode) ? int_size_in_bytes (type) : GET_MODE_SIZE (mode);
@@ -6634,6 +6634,12 @@ bfin_expand_builtin (tree exp, rtx target ATTRIBUTE_UNUSED,
 #undef TARGET_ARG_PARTIAL_BYTES
 #define TARGET_ARG_PARTIAL_BYTES bfin_arg_partial_bytes
 
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG bfin_function_arg
+
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE bfin_function_arg_advance
+
 #undef TARGET_PASS_BY_REFERENCE
 #define TARGET_PASS_BY_REFERENCE bfin_pass_by_reference
 
index 11cc5ca..70ed6dc 100644 (file)
@@ -815,22 +815,6 @@ typedef struct {
   int call_cookie;             /* Do special things for this call */
 } CUMULATIVE_ARGS;
 
-/* Define where to put the arguments to a function.
-   Value is zero to push the argument on the stack,
-   or a hard register in which to store the argument.
-
-   MODE is the argument's machine mode.
-   TYPE is the data type of the argument (as a tree).
-    This is null for libcalls where that information may
-    not be available.
-   CUM is a variable of type CUMULATIVE_ARGS which gives info about
-    the preceding args and about the function being called.
-   NAMED is nonzero if this argument is a named parameter
-    (otherwise it is an extra parameter matching an ellipsis).  */
-
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-  (function_arg (&CUM, MODE, TYPE, NAMED))
-
 #define FUNCTION_ARG_REGNO_P(REGNO) function_arg_regno_p (REGNO)
 
 
@@ -840,12 +824,6 @@ typedef struct {
 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT, N_NAMED_ARGS)        \
   (init_cumulative_args (&CUM, FNTYPE, LIBNAME))
 
-/* 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, NAMED))
-
 /* Define how to find the value returned by a function.
    VALTYPE is the data type of the value (as a tree).
    If the precise function being called is known, FUNC is its FUNCTION_DECL;