This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 2.95: Dec 21 patch kit
- To: Bernd Schmidt <bernds at redhat dot com>
- Subject: Re: 2.95: Dec 21 patch kit
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Mon, 1 Jan 2001 18:37:44 +0100
- Cc: <gcc-patches at gcc dot gnu dot org>
- References: <Pine.LNX.4.30.0012261608470.24133-100000@host140.cambridge.redhat.com>
On Tuesday 26 December 2000 17:10, Bernd Schmidt wrote:
> On Fri, 22 Dec 2000, Franz Sirl wrote:
> > The patch will only affect targets where REG_PARM_STACK_SPACE() can be 0
>
> Also targets that don't define REG_PARM_STACK_SPACE, it seems to me.
OK, then what about this variation?
Franz.
Index: gcc/function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.90.4.4
diff -u -p -r1.90.4.4 function.c
--- gcc/function.c 2000/12/22 14:19:57 1.90.4.4
+++ gcc/function.c 2001/01/01 17:33:30
@@ -5283,7 +5293,18 @@ locate_and_pad_parm (passed_mode, type,
- offset_ptr->constant);
}
#else /* !ARGS_GROW_DOWNWARD */
- pad_to_arg_alignment (initial_offset_ptr, boundary);
+ if (!in_regs
+#ifdef REG_PARM_STACK_SPACE
+ || REG_PARM_STACK_SPACE (fndecl) > 0
+#else
+ /* For the gcc-2_95-branch we want to make sure not to break something
+ on platforms which pass argument in registers but don't define
+ REG_PARM_STACK_SPACE. So we force the original behaviour here. */
+ || 1
+#endif
+ )
+ pad_to_arg_alignment (initial_offset_ptr, boundary);
+
*offset_ptr = *initial_offset_ptr;
#ifdef PUSH_ROUNDING