On 2010-5-3 8:16 AM, Mark Cave-Ayland wrote:
Tarl Neustaedter wrote:
Those are all SPARC registers. What it's doing is copying the registers to a buffer, presumably to be restored later.
It looks like the trap registers (%tstate, %tnpc, %tt) are prefixed by %tl-c - which is presumably the trap-level pointer.
Another thought about this: surely the act of invoking normal functions within OpenBIOS is enough to cause the register window to shift. Does that mean that the CIF needs to take a snapshot of the registers upon entry and then map this snapshot to forth words such as %g0, %g1 etc.? Otherwise it all seems a bit useless.
Let me look this up later today.
The registers referenced should be in a saved register block (when forth is invoked, it has to save registers from the caller), not live. The forth compiler needs registers itself, so it had to save the caller's information somewhere.