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]

Re: 2.95: Dec 21 patch kit


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

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