OSDN Git Service

* config/frv/frv-protos.h (frv_function_arg): Delete.
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Oct 2010 19:45:32 +0000 (19:45 +0000)
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Oct 2010 19:45:32 +0000 (19:45 +0000)
(frv_function_arg_advance): Delete.
* config/frv/frv.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/frv/frv.c (frv_function_arg): Rename to...
(frv_function_arg_1): Make static.  Take const_tree and bool
arguments.
(frv_function_arg, frv_function_incoming_arg): New functions.
(frv_function_arg_advance): Make static.  Take a const_tree and
a bool.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_INCOMING_ARG): Define.
(TARGET_FUNCTION_ARG_ADVANCE): Define.

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

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

index 3a6a557..de9a475 100644 (file)
@@ -1,3 +1,17 @@
+2010-10-28  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * config/frv/frv-protos.h (frv_function_arg): Delete.
+       (frv_function_arg_advance): Delete.
+       * config/frv/frv.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
+       * config/frv/frv.c (frv_function_arg): Rename to...
+       (frv_function_arg_1): Make static.  Take const_tree and bool
+       arguments.
+       (frv_function_arg, frv_function_incoming_arg): New functions.
+       (frv_function_arg_advance): Make static.  Take a const_tree and
+       a bool.
+       (TARGET_FUNCTION_ARG, TARGET_FUNCTION_INCOMING_ARG): Define.
+       (TARGET_FUNCTION_ARG_ADVANCE): Define.
+
 2010-10-28  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/46153
index 68c2a57..af9f1cd 100644 (file)
@@ -53,13 +53,6 @@ extern void frv_init_cumulative_args         (CUMULATIVE_ARGS *, tree,
                                                 rtx, tree, int);
 
 extern int frv_function_arg_boundary           (enum machine_mode, tree);
-extern rtx frv_function_arg                    (CUMULATIVE_ARGS *,
-                                                enum machine_mode,
-                                                tree, int, int);
-
-extern void frv_function_arg_advance           (CUMULATIVE_ARGS *,
-                                                enum machine_mode,
-                                                tree, int);
 extern bool frv_function_value_regno_p         (const unsigned int);
 #endif /* TREE_CODE */
 
index 4cbcfca..adc6911 100644 (file)
@@ -388,6 +388,12 @@ static rtx frv_struct_value_rtx                    (tree, int);
 static bool frv_must_pass_in_stack (enum machine_mode mode, const_tree type);
 static int frv_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
                                  tree, bool);
+static rtx frv_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
+                            const_tree, bool);
+static rtx frv_function_incoming_arg (CUMULATIVE_ARGS *, enum machine_mode,
+                                     const_tree, bool);
+static void frv_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
+                                      const_tree, bool);
 static void frv_output_dwarf_dtprel            (FILE *, int, rtx)
   ATTRIBUTE_UNUSED;
 static reg_class_t frv_secondary_reload                (bool, rtx, reg_class_t,
@@ -486,6 +492,12 @@ static const struct default_options frv_option_optimization_table[] =
 #define TARGET_PASS_BY_REFERENCE hook_pass_by_reference_must_pass_in_stack
 #undef TARGET_ARG_PARTIAL_BYTES
 #define TARGET_ARG_PARTIAL_BYTES frv_arg_partial_bytes
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG frv_function_arg
+#undef TARGET_FUNCTION_INCOMING_ARG
+#define TARGET_FUNCTION_INCOMING_ARG frv_function_incoming_arg
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE frv_function_arg_advance
 
 #undef TARGET_EXPAND_BUILTIN_SAVEREGS
 #define TARGET_EXPAND_BUILTIN_SAVEREGS frv_expand_builtin_saveregs
@@ -3190,12 +3202,10 @@ frv_function_arg_boundary (enum machine_mode mode ATTRIBUTE_UNUSED,
   return BITS_PER_WORD;
 }
 
-rtx
-frv_function_arg (CUMULATIVE_ARGS *cum,
-                  enum machine_mode mode,
-                  tree type ATTRIBUTE_UNUSED,
-                  int named,
-                  int incoming ATTRIBUTE_UNUSED)
+static rtx
+frv_function_arg_1 (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
+                   const_tree type ATTRIBUTE_UNUSED, bool named,
+                   bool incoming ATTRIBUTE_UNUSED)
 {
   enum machine_mode xmode = (mode == BLKmode) ? SImode : mode;
   int arg_num = *cum;
@@ -3229,6 +3239,20 @@ frv_function_arg (CUMULATIVE_ARGS *cum,
   return ret;
 }
 
+static rtx
+frv_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+                 const_tree type, bool named)
+{
+  return frv_function_arg_1 (cum, mode, type, named, false);
+}
+
+static rtx
+frv_function_incoming_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+                          const_tree type, bool named)
+{
+  return frv_function_arg_1 (cum, mode, type, named, true);
+}
+
 \f
 /* A C statement (sans semicolon) to update the summarizer variable CUM to
    advance past an argument in the argument list.  The values MODE, TYPE and
@@ -3239,11 +3263,11 @@ frv_function_arg (CUMULATIVE_ARGS *cum,
    the stack.  The compiler knows how to track the amount of stack space used
    for arguments without any special help.  */
 
-void
+static void
 frv_function_arg_advance (CUMULATIVE_ARGS *cum,
                           enum machine_mode mode,
-                          tree type ATTRIBUTE_UNUSED,
-                          int named)
+                          const_tree type ATTRIBUTE_UNUSED,
+                          bool named)
 {
   enum machine_mode xmode = (mode == BLKmode) ? SImode : mode;
   int bytes = GET_MODE_SIZE (xmode);
index 99e6643..fc0f293 100644 (file)
@@ -1546,23 +1546,6 @@ typedef struct frv_stack {
 
 #define FRV_NUM_ARG_REGS        6
 
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED)                    \
-  frv_function_arg (&CUM, MODE, TYPE, NAMED, FALSE)
-
-/* Define this macro if the target machine has "register windows", so that the
-   register in which a function sees an arguments is not necessarily the same
-   as the one in which the caller passed the argument.
-
-   For such machines, `FUNCTION_ARG' computes the register in which the caller
-   passes the value, and `FUNCTION_INCOMING_ARG' should be defined in a similar
-   fashion to tell the function being called where the arguments will arrive.
-
-   If `FUNCTION_INCOMING_ARG' is not defined, `FUNCTION_ARG' serves both
-   purposes.  */
-
-#define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED)                  \
-  frv_function_arg (&CUM, MODE, TYPE, NAMED, TRUE)
-
 /* A C type for declaring a variable that is used as the first argument of
    `FUNCTION_ARG' and other related values.  For some target machines, the type
    `int' suffices and can hold the number of bytes of argument so far.
@@ -1605,17 +1588,6 @@ typedef struct frv_stack {
 #define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \
   frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, NULL, TRUE)
 
-/* A C statement (sans semicolon) to update the summarizer variable CUM to
-   advance past an argument in the argument list.  The values MODE, TYPE and
-   NAMED describe that argument.  Once this is done, the variable CUM is
-   suitable for analyzing the *following* argument with `FUNCTION_ARG', etc.
-
-   This macro need not do anything if the argument in question was passed on
-   the stack.  The compiler knows how to track the amount of stack space used
-   for arguments without any special help.  */
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)                   \
-  frv_function_arg_advance (&CUM, MODE, TYPE, NAMED)
-
 /* If defined, a C expression that gives the alignment boundary, in bits, of an
    argument with the specified mode and type.  If it is not defined,
    `PARM_BOUNDARY' is used for all arguments.  */