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 Friday 22 December 2000 13:09, Bernd Schmidt wrote:
> 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.

It caused no problems in the mainline so far, the only problem arised through 
the fact that the mainline relied on pad_to_arg_alignment to init 
alignment_pad. But this is not the case in the gcc-2_95-branch. The patch 
will only affect targets where REG_PARM_STACK_SPACE() can be 0 and checking 
the target directories says that it possibly affects i960, mips, rs6000 and 
v850. rs6000 and mips are tested heavily in the mainline and I think someone 
(Nick Clifton?)  builds v850 mainline compilers regularly. This leaves i960 
as a platform to break Even if I would suspect a possible breakage, I think 
fixing powerpc-linux as the #2 Linux platform far outweighs possible problems 
on i960.

Franz.

> 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

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