This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Fix for sparc64 aggregate va_arg


Hi!

Attached patch fixes va_arg passing for aggregates up to 16 bytes on
sparc64. This closes several testsuite failures on sparc64.
Will hunt the remaining ones next.

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.18 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________
1999-11-30  Jakub Jelinek  <jakub@redhat.com>

	* config/sparc/sparc.c (sparc_va_arg): Fix sparc64 va_arg
	aggregate passing for sizes <= 16 bytes.

--- sparc.c.jj	Thu Nov 25 17:41:07 1999
+++ sparc.c	Tue Nov 30 23:47:04 1999
@@ -4392,10 +4392,15 @@ sparc_va_arg (valist, type)
       if (TYPE_ALIGN (type) >= 2 * BITS_PER_WORD)
 	align = 2 * UNITS_PER_WORD;
 
-      if (AGGREGATE_TYPE_P (type) && size > 16)
+      if (AGGREGATE_TYPE_P (type))
 	{
-	  indirect = 1;
-	  size = rsize = UNITS_PER_WORD;
+	  if (size > 16)
+	    {
+	      indirect = 1;
+	      size = rsize = UNITS_PER_WORD;
+	    }
+	  else
+	    size = rsize;
 	}
     }
   else

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]