On Tue, 11 Aug 2009 16:36:31 -0700
Jonathan Adams <jonathan.ad...@sun.com> wrote:

> It's not quite like that;  the issue is that the load and store
> instructions in the SPARC instruction set have a signed immediate
> field of 13 bits.  That means that you can access an offset relative
> to a register (like %fp) in the range [%fp - 4096, %fp + 4095].
> 
> By setting the bias to 2047, your allowable offsets move lower, so
> you can access:
> 
>       [%fp + BIAS - 4096 - 2047), %fp + BIAS + (4095 - 2047)]
>       = [%fp + BIAS - 6143, %fp + BIAS + 2048]
>
I'm not sure I follow.
(%fp + BIAS - 4096 - 2047) is still (%fp - 4096) because +BIAS and
-2047 cancel each other out. Where do you get 6k of local storage from?

> The area between %sp and %sp+BIAS is not used for anything, and has no
> purpose.  As far as the system is concerned, you aren't allowed to
> access anything below %sp+BIAS.
>
Am I correct to asume that each 64-bit process' main stack has a wasted
area of 2047 bytes, and NOT each function's stack frame?
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to