Patchwork [SPARC] Fix PR target/44942

login
register
mail settings
Submitter Eric Botcazou
Date July 25, 2010, 9:56 p.m.
Message ID <201007252356.09847.ebotcazou@adacore.com>
Download mbox | patch
Permalink /patch/59886/
State New
Headers show

Comments

Eric Botcazou - July 25, 2010, 9:56 p.m.
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 - Aug. 6, 2010, 11:24 p.m.
> 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.

Applied on all branches.

Patch

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)
     {