]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
m68k.h (FUNCTION_ARG, [...]): Delete.
authorNathan Froyd <froydnj@codesourcery.com>
Sat, 9 Oct 2010 14:20:08 +0000 (14:20 +0000)
committerNathan Froyd <froydnj@gcc.gnu.org>
Sat, 9 Oct 2010 14:20:08 +0000 (14:20 +0000)
* config/m68k/m68k.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/m68k/m68k.c (m68k_function_arg): New function.
(m68k_function_arg_advance): New function.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r165227

gcc/ChangeLog
gcc/config/m68k/m68k.c
gcc/config/m68k/m68k.h

index 6ad88a007e3ebeff032327ba35be14b0e57f5f69..f0b5968f79d921c849a9cf590c212f030b9ff6d6 100644 (file)
@@ -1,3 +1,10 @@
+2010-10-09  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * config/m68k/m68k.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
+       * config/m68k/m68k.c (m68k_function_arg): New function.
+       (m68k_function_arg_advance): New function.
+       (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
 2010-10-09  Nathan Froyd  <froydnj@codesourcery.com>
 
        * config/avr/avr-protos.h (function_arg): Delete.
index 09b7ccbd86fa9ba7c4e52da797fa355f64981f74..f032a47f6df83c02637bfa05a8d137782d3a2a0d 100644 (file)
@@ -157,6 +157,10 @@ static void m68k_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
 static void m68k_trampoline_init (rtx, tree, rtx);
 static int m68k_return_pops_args (tree, tree, int);
 static rtx m68k_delegitimize_address (rtx);
+static void m68k_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
+                                      const_tree, bool);
+static rtx m68k_function_arg (CUMULATIVE_ARGS *, enum machine_mode,
+                             const_tree, bool);
 \f
 
 /* Specify the identification number of the library being built */
@@ -283,6 +287,12 @@ const char *m68k_library_id_string = "_current_shared_library_a5_offset_";
 #undef TARGET_DELEGITIMIZE_ADDRESS
 #define TARGET_DELEGITIMIZE_ADDRESS m68k_delegitimize_address
 
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG m68k_function_arg
+
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE m68k_function_arg_advance
+
 static const struct attribute_spec m68k_attribute_table[] =
 {
   /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
@@ -1474,6 +1484,26 @@ m68k_ok_for_sibcall_p (tree decl, tree exp)
   return false;
 }
 
+/* On the m68k all args are always pushed.  */
+
+static rtx
+m68k_function_arg (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
+                  enum machine_mode mode ATTRIBUTE_UNUSED,
+                  const_tree type ATTRIBUTE_UNUSED,
+                  bool named ATTRIBUTE_UNUSED)
+{
+  return NULL_RTX;
+}
+
+static void
+m68k_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+                          const_tree type, bool named ATTRIBUTE_UNUSED)
+{
+  *cum += (mode != BLKmode
+          ? (GET_MODE_SIZE (mode) + 3) & ~3
+          : (int_size_in_bytes (type) + 3) & ~3);
+}
+
 /* Convert X to a legitimate function call memory reference and return the
    result.  */
 
index 75217bae23197ad0fd24b20811b47b6d2bdc3532..5aac599d7117add3c2819ae92a8785915889e076 100644 (file)
@@ -558,14 +558,6 @@ extern enum reg_class regno_reg_class[];
 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
  ((CUM) = 0)
 
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)   \
- ((CUM) += ((MODE) != BLKmode                  \
-           ? (GET_MODE_SIZE (MODE) + 3) & ~3   \
-           : (int_size_in_bytes (TYPE) + 3) & ~3))
-
-/* On the m68k all args are always pushed.  */
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0
-
 #define FUNCTION_PROFILER(FILE, LABELNO)  \
   asm_fprintf (FILE, "\tlea %LLP%d,%Ra0\n\tjsr mcount\n", (LABELNO))