Port-sparc64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Stack bias



On Mon, Aug 10, 2009 at 09:33:47AM +1000, matthew green wrote:
> 
>    Hi, I'm reading Sparc V9 ABI document, which talks about stack bias.
>    Could anyone explain why there is a stack bias and what the stack looks
>    like with the bias, i.e. is it something I need to worry about when
>    writing sparc assembly?
> 
> 
> the stack bias is -2047 in 64 bit mode.  i understand it has 2 main
> benefits.  (a) %sp & 1 == 1 means we have 64 bit mode.  (b) it allows
> the 13-bit offset instructions to access a larger stack frame directly.
> 
> you need to worry about it.  i recommend reading some of the low
> level kernel assembler for sparc64 port for examples on how to use
> it sanely.

Doesn't it also allow leaf functions to write above the stack pointer
without interrupts trashing such local data?

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index