2.95: Dec 21 patch kit

Bernd Schmidt bernds@redhat.com
Fri Dec 22 04:09:00 GMT 2000


On Thu, 21 Dec 2000, Franz Sirl wrote:

> Well, if you are going to include these part of my patchkit, what about the
> part that fixes complex-5c for PPC? For the middle-end it's just a matter
> of moving around the rtx_equal_function_value_matters prototype, so it can
> be used in rs6000.md. Not too important though.

I haven't quite made up my mind yet.

> Thanks. This only leaves my locate_and_pad_parm()/function.c patch on my
> wishlist of patches I seriously want to have in. Any chance you can
> consider it? I promise I will shut up then :-).

For reference, the patch in question is below.  According to Franz, for
execute/20001017-1.c the compiler computes a different stack layout for
the caller and the called function, so that they disagree about where to
find the arguments.  The patch is applied to the mainline.

I hesitate to apply it.  While I agree that the bug deserves fixing, I
also think that this change has a high risk of unexpected side effects on
other targets.
In this case it may be better to live with a known defect than risking
to introduce new ones.


Bernd

Index: gcc/function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.90.4.3
diff -u -p -r1.90.4.3 function.c
--- gcc/function.c	2000/05/24 06:01:57	1.90.4.3
+++ gcc/function.c	2000/11/25 18:14:10
@@ -5274,7 +5293,13 @@ 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
+#endif
+      )
+    pad_to_arg_alignment (initial_offset_ptr, boundary);
+
   *offset_ptr = *initial_offset_ptr;

 #ifdef PUSH_ROUNDING



More information about the Gcc-patches mailing list