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]
Other format: [Raw text]

[SPARC] Fix PR target/44942


We have roughly the same long-standing bug on SPARC64 as on x86-64...

Straightforward fix attached but it will require some extensive testing before 
being installed on the 3 branches like the x86-64 fix.


2010-07-25  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/44942
	* config/sparc/sparc.c (function_arg_advance): Always take into account
	the padding, if any.


-- 
Eric Botcazou
Index: config/sparc/sparc.c
===================================================================
--- config/sparc/sparc.c	(revision 162521)
+++ config/sparc/sparc.c	(working copy)
@@ -5814,9 +5814,8 @@ function_arg_advance (struct sparc_args
   /* We pass 0 for incoming_p here, it doesn't matter.  */
   slotno = function_arg_slotno (cum, mode, type, named, 0, &regno, &padding);
 
-  /* If register required leading padding, add it.  */
-  if (slotno != -1)
-    cum->words += padding;
+  /* If argument requires leading padding, add it.  */
+  cum->words += padding;
 
   if (TARGET_ARCH32)
     {

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