This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Additional pretend args fix.
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 28 Feb 2004 15:58:39 +0000
- Subject: [PATCH] Additional pretend args fix.
- Organization: CodeSourcery
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;