]> gcc.gnu.org Git - gcc.git/commitdiff
mcore-protos.h (mcore_function_arg): Delete.
authorNathan Froyd <froydnj@codesourcery.com>
Thu, 28 Oct 2010 20:07:06 +0000 (20:07 +0000)
committerNathan Froyd <froydnj@gcc.gnu.org>
Thu, 28 Oct 2010 20:07:06 +0000 (20:07 +0000)
* config/mcore/mcore-protos.h (mcore_function_arg): Delete.
* config/mcore/mcore.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/mcore/mcore.c (mcore_function_arg): Declare.  Make static.
Take a const_tree and a bool.
(mcore_function_arg_advance): New function.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r166043

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

index 6d1519e3cfb1609906116dce1190d4f333854663..a4b63903accb90524e900b8b21cb87938922c782 100644 (file)
@@ -1,3 +1,12 @@
+2010-10-28  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * config/mcore/mcore-protos.h (mcore_function_arg): Delete.
+       * config/mcore/mcore.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
+       * config/mcore/mcore.c (mcore_function_arg): Declare.  Make static.
+       Take a const_tree and a bool.
+       (mcore_function_arg_advance): New function.
+       (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
 2010-10-28  Nathan Froyd  <froydnj@codesourcery.com>
 
        * config/h8300/h8300-protos.h (function_arg): Delete.
index 2093f16ec197f2031313869dc8f88df71e8a08dd..b9f8f330737bfc7e7eb224fa917bf8ba6e622da0 100644 (file)
@@ -65,8 +65,5 @@ extern int          mcore_arith_S_operand             (rtx);
 extern const char * mcore_output_move                          (rtx, rtx *, enum machine_mode);
 extern const char * mcore_output_movedouble                    (rtx *, enum machine_mode);
 extern int          const_ok_for_mcore                  (HOST_WIDE_INT);
-#ifdef TREE_CODE
-extern rtx          mcore_function_arg                 (CUMULATIVE_ARGS, enum machine_mode, tree, int);
-#endif /* TREE_CODE */
 #endif /* HAVE_MACHINE_MODES */
 #endif /* RTX_CODE */
index 9bacc5caee061d46dfca085609471c68bb7bd62c..3bd17299b116e52b1bde0b19559f2294e26dd1b2 100644 (file)
@@ -142,6 +142,12 @@ static bool       mcore_return_in_memory   (const_tree, const_tree);
 static int        mcore_arg_partial_bytes       (CUMULATIVE_ARGS *,
                                                 enum machine_mode,
                                                 tree, bool);
+static rtx        mcore_function_arg            (CUMULATIVE_ARGS *,
+                                                enum machine_mode,
+                                                const_tree, bool);
+static void       mcore_function_arg_advance    (CUMULATIVE_ARGS *,
+                                                enum machine_mode,
+                                                const_tree, bool);
 static void       mcore_asm_trampoline_template (FILE *);
 static void       mcore_trampoline_init                (rtx, tree, rtx);
 static void       mcore_option_override                (void);
@@ -229,6 +235,10 @@ static const struct default_options mcore_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       mcore_arg_partial_bytes
+#undef  TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG            mcore_function_arg
+#undef  TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE    mcore_function_arg_advance
 
 #undef  TARGET_SETUP_INCOMING_VARARGS
 #define TARGET_SETUP_INCOMING_VARARGS  mcore_setup_incoming_varargs
@@ -2804,9 +2814,9 @@ mcore_function_value (const_tree valtype, const_tree func)
    NPARM_REGS words is at least partially passed in a register unless
    its data type forbids.  */
 
-rtx
-mcore_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
-                   tree type, int named)
+static rtx
+mcore_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+                   const_tree type, bool named)
 {
   int arg_reg;
   
@@ -2816,7 +2826,7 @@ mcore_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
   if (targetm.calls.must_pass_in_stack (mode, type))
     return 0;
 
-  arg_reg = ROUND_REG (cum, mode);
+  arg_reg = ROUND_REG (*cum, mode);
   
   if (arg_reg < NPARM_REGS)
     return handle_structs_in_regs (mode, type, FIRST_PARM_REG + arg_reg);
@@ -2824,6 +2834,14 @@ mcore_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
   return 0;
 }
 
+static void
+mcore_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+                           const_tree type, bool named ATTRIBUTE_UNUSED)
+{
+  *cum = (ROUND_REG (*cum, mode)
+         + (int)named * mcore_num_arg_regs (mode, type));
+}
+
 /* Returns the number of bytes of argument registers required to hold *part*
    of a parameter of machine mode MODE and type TYPE (which may be NULL if
    the type is not known).  If the argument fits entirely in the argument
index 8efe64f2bf0df8ebd7b9597865f10f44bc2fc85c..515865854ae69b4bb679c089ed368411f792e365 100644 (file)
@@ -559,18 +559,6 @@ extern const enum reg_class reg_class_from_letter[];
 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
   ((CUM) = 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) = (ROUND_REG ((CUM), (MODE))                      \
-          + ((NAMED) * mcore_num_arg_regs (MODE, TYPE)))) \
-
-/* Define where to put the arguments to a function.  */
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-  mcore_function_arg (CUM, MODE, TYPE, NAMED)
-
 /* Call the function profiler with a given profile label.  */
 #define FUNCTION_PROFILER(STREAM,LABELNO)              \
 {                                                      \
This page took 0.148105 seconds and 5 git commands to generate.