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]

[PATCH] Additional pretend args fix.


Further testing revealed a bug in my previous patch for split function args. 
We ignore the extra padding on the split arg when STACK_BOUNDARY > 
PARM_BOUNDARY.

Tested on arm-none-elf with various different stack alignment settings.
Ok?

Paul

2004-02-16  Paul Brook  <paul@codesourcery.com>

	* function.c (assign_parms): Include pretend alignment offset.

Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.498
diff -u -r1.498 function.c
--- function.c	27 Feb 2004 12:02:55 -0000	1.498
+++ function.c	28 Feb 2004 15:49:24 -0000
@@ -4591,13 +4591,9 @@
       locate_and_pad_parm (promoted_mode, passed_type, in_regs,
 			   entry_parm ? partial : 0, fndecl,
 			   &stack_args_size, &locate);
-      /* Adjust offsets to include pretend args, unless this is the
-         split arg.  */
-      if (pretend_bytes == 0)
-	{
-	  locate.slot_offset.constant += extra_pretend_bytes;
-	  locate.offset.constant += extra_pretend_bytes;
-	}
+      /* Adjust offsets to include the pretend args.  */
+      locate.slot_offset.constant += extra_pretend_bytes - pretend_bytes;
+      locate.offset.constant += extra_pretend_bytes - pretend_bytes;
 
       {
 	rtx offset_rtx;


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