mn10300-protos.h (function_arg): Delete.
authorNathan Froyd <froydnj@codesourcery.com>
Thu, 28 Oct 2010 19:55:43 +0000 (19:55 +0000)
committerNathan Froyd <froydnj@gcc.gnu.org>
Thu, 28 Oct 2010 19:55:43 +0000 (19:55 +0000)
* config/mn10300/mn10300-protos.h (function_arg): Delete.
* config/mn10300/mn10300.h (FUNCTION_ARG): Delete.
(FUNCTION_ARG_ADVANCE): Delete.
* config/mn10300/mn10300.c (function_arg): Rename to...
(mn10300_function_arg): ...this.  Make static.  Take a const_tree
and a bool.
(mn10300_function_arg_advance): New function.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r166036

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

index daae755efa21d2df870aa7cad9d886f6cdce36d0..709b3644d1038804ffb7dc01ef8d3705fe62fa00 100644 (file)
@@ -1,3 +1,14 @@
+2010-10-28  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * config/mn10300/mn10300-protos.h (function_arg): Delete.
+       * config/mn10300/mn10300.h (FUNCTION_ARG): Delete.
+       (FUNCTION_ARG_ADVANCE): Delete.
+       * config/mn10300/mn10300.c (function_arg): Rename to...
+       (mn10300_function_arg): ...this.  Make static.  Take a const_tree
+       and a bool.
+       (mn10300_function_arg_advance): New function.
+       (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
 2010-10-28  Nathan Froyd  <froydnj@codesourcery.com>
 
        * config/iq2000/iq2000-protos.h (function_arg): Delete.
index 23d428cec224ac7b8a01ef6836c11688c16031f6..ebf915e8e7e35c8b1200710ae442203a17b440b6 100644 (file)
@@ -43,10 +43,6 @@ extern int   mn10300_symbolic_operand (rtx, Mmode);
 extern bool  mn10300_wide_const_load_uses_clr (rtx operands[2]);
 #endif /* RTX_CODE */
 
-#ifdef TREE_CODE
-extern struct rtx_def * mn10300_function_arg (CUMULATIVE_ARGS *, Mmode, tree, int);
-#endif /* TREE_CODE */
-
 extern int   mn10300_can_use_return_insn (void);
 extern void  mn10300_expand_prologue (void);
 extern void  mn10300_expand_epilogue (void);
index 2187463d083e0b2645290e9c437ffad87956cc53..4599a100abc140a0ffb474c31325dc45dc0913be 100644 (file)
@@ -1417,9 +1417,9 @@ mn10300_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
 /* Return an RTX to represent where a value with mode MODE will be returned
    from a function.  If the result is NULL_RTX, the argument is pushed.  */
 
-rtx
+static rtx
 mn10300_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
-                     tree type, int named ATTRIBUTE_UNUSED)
+                     const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   rtx result = NULL_RTX;
   int size, align;
@@ -1464,6 +1464,19 @@ mn10300_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
   return result;
 }
 
+/* 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.)  */
+
+static void
+mn10300_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+                             const_tree type, bool named ATTRIBUTE_UNUSED)
+{
+  cum->nbytes += (mode != BLKmode
+                 ? (GET_MODE_SIZE (mode) + 3) & ~3
+                 : (int_size_in_bytes (type) + 3) & ~3);
+}
+
 /* Return the number of bytes of registers to use for an argument passed
    partially in registers and partially in memory.  */
 
@@ -2303,6 +2316,10 @@ mn10300_select_cc_mode (rtx x)
 #define TARGET_CALLEE_COPIES hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true
 #undef  TARGET_ARG_PARTIAL_BYTES
 #define TARGET_ARG_PARTIAL_BYTES mn10300_arg_partial_bytes
+#undef  TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG mn10300_function_arg
+#undef  TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE mn10300_function_arg_advance
 
 #undef  TARGET_EXPAND_BUILTIN_SAVEREGS
 #define TARGET_EXPAND_BUILTIN_SAVEREGS mn10300_builtin_saveregs
index 96a07e8fcdf1ef501f77752b9bb32aa163b8f967..58f2719cba95155b22ac71fc860bf2a4ebad5d74 100644 (file)
@@ -534,31 +534,6 @@ struct cum_arg
 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
  ((CUM).nbytes = 0)
 
-/* 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)   \
- ((CUM).nbytes += ((MODE) != BLKmode                   \
-                  ? (GET_MODE_SIZE (MODE) + 3) & ~3    \
-                  : (int_size_in_bytes (TYPE) + 3) & ~3))
-
-/* 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) \
-  mn10300_function_arg (&(CUM), MODE, TYPE, NAMED)
-
 #define FUNCTION_VALUE_REGNO_P(N)  mn10300_function_value_regno_p (N)
 
 #define DEFAULT_PCC_STRUCT_RETURN 0