1

What criteria does a register window need to hold in order to be considered valid or invalid?

My understanding is that, if a window contains information relative to some function, say, in a chain of functions, then it contains valid information. If the out registers of a window would overlap the contents (in registers) of a valid window then it is considered invalid (or if the OS reserved that window as invalid for trap handling).

However, this is not explained in great detail by the SPARC V8 manual or the System V ABI for SPARC, in my opinion.

So, again, my question is: When is a window considered to be valid or contain valid information and when is it considered to be invalid?

Thanks

BVCGAAV
  • 301
  • 1
  • 4
  • 11

1 Answers1

0

The WIM (Window Invalid Mask) register holds the information about invalid and valid registers, while the CWP (Current Window Pointer) holds the currently used register window. For each register it holds a bit about the validity.

If the WIM is set to 1 the window is considered invalid and causes a trap when the CWP is changed during a SAVE or RETSTORE op or when a trap is executed.

I found this in the SPARC v8 Architecture Manual on p. 27 and p. 30

paradx
  • 74
  • 12