OSDN Git Service

* config/sparc/sparc.c (function_arg_slotno): In 64-bit mode, align
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Oct 2005 23:26:29 +0000 (23:26 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Oct 2005 23:26:29 +0000 (23:26 +0000)
the slot on an even boundary for any type with 16-byte alignment.

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

gcc/ChangeLog
gcc/config/sparc/sparc.c

index ef2f059..c606f83 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-17  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * config/sparc/sparc.c (function_arg_slotno): In 64-bit mode, align
+       the slot on an even boundary for any type with 16-byte alignment.
+
 2005-10-17  Hans-Peter Nilsson  <hp@axis.com>
 
        PR target/23424
index 180aaa5..0b18efd 100644 (file)
@@ -4443,7 +4443,7 @@ function_arg_slotno (const struct sparc_args *cum, enum machine_mode mode,
 
   /* For SPARC64, objects requiring 16-byte alignment get it.  */
   if (TARGET_ARCH64
-      && GET_MODE_ALIGNMENT (mode) >= 2 * BITS_PER_WORD
+      && (type ? TYPE_ALIGN (type) : GET_MODE_ALIGNMENT (mode)) >= 128
       && (slotno & 1) != 0)
     slotno++, *ppadding = 1;
 
@@ -4503,13 +4503,6 @@ function_arg_slotno (const struct sparc_args *cum, enum machine_mode mode,
 
       gcc_assert (mode == BLKmode);
 
-      /* For SPARC64, objects requiring 16-byte alignment get it.  */
-      if (TARGET_ARCH64
-         && type
-         && TYPE_ALIGN (type) >= 2 * BITS_PER_WORD
-         && (slotno & 1) != 0)
-       slotno++, *ppadding = 1;
-
       if (TARGET_ARCH32 || !type || (TREE_CODE (type) == UNION_TYPE))
        {
          if (slotno >= SPARC_INT_ARG_MAX)