patch for broken thunk on sparc

Eric Botcazou ebotcazou@libertysurf.fr
Sat Apr 8 08:14:00 GMT 2006


> Could you illustrate your assertion of 'clobber the previous frame' in
> the current patch?

We decrement the stack pointer by 2 words in the thunk then write something at 
sp+92/96 (without the SPARC_STACK_ALIGN stuff).  I presume you consider that 
as a mere dynamic allocation in the previous frame, right?  I'd agree, except 
that the caller of the thunk doesn't know that the thunk is going to allocate 
stack space behind its back and write in its frame.  The compiler enforces 
some restrictions for functions that do dynamic stack allocation.

Are you convinced it's OK to do that?  If so, I'm ready to trust you but I'd 
request a comment in the code explaining it.

Another nit: why do you align the offset in 32-bit mode?  We only need word 
alignment here.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list