Port-sparc64 archive

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

Re: Stack bias



>> "Without stack" != "using %o6 as a stack pointer".  Leaf routines
>> may very well need %sp for nothing at all - everything they need of
>> the stack may come off %fp.
> They can instead use %fp for whatever they like, but need to leave
> %sp untouched.

...?!

The one that's shared with another stack frame can be scribbled on, but
the one that's not must not be?

That's pretty seriously twisted.  Do you have any idea why such a
bizarre design was chosen for the ABI?

It seems to me this also means that the "low bit of %o6" test is not
safe.  The scenario: routine A calls (leaf) routine B, and B scribbles
on (its) %fp.  When B returns, for at least one instruction, A's %sp
will be whatever trash B left there; an interrupt during that interval
is likely to destroy the high halves of all A's registers.  But if I
can think of this in thirty seconds, ABI designers surely can with all
the time at their disposal, so I must be missing something.  What?

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index