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.4 plans


On Wednesday 21 March 2001 18:18, Bernd Schmidt wrote:
> On Wed, 21 Mar 2001, Franz Sirl wrote:
> > Analysis? Again? Oh no ;-). The problem is that locate_and_pad_parm()
> > aligns the stackpointer for each argument even if the target ABI puts
> > this argument in a register and doesn't mean to allocate any stack space
> > for it (REGPARM_STACK_SPACE()==0). Now, if the stackpointer is currently
> > on a "odd" 32bit boundary and you pass for example a double in a
> > register, the stackpointer gets aligned to an "even" 32bit boundary. This
> > means that all arguments that don't fit into registers are now put into
> > the wrong stackslot.
>
> Yes, but while that may be wrong, it only fails to work because the code
> for the called function uses the correct offsets, right?  I'd like to find
> the piece of code that handles this correctly for the called function. 
> Since we have to make the two behave identically, I'd like to take a look
> at it.

No, the caller is right and the callee uses the wrong offsets. This is 
handled in assign_parms in function.c which in turn calls 
locate_and_pad_parm. Only here things go wrong cause the current offset gets 
aligned even if the parameter lives in a register and REG_PARM_STACK_SPACE() 
returns 0.

Franz.


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