static registers during a context switch
hi everybody,
does anybody know what happens to static registers (gr0-gr31) in case of a context switch.
in the manual, it says static registers are visible to all procedures(i guess it shouldn't otherwise on a context switch another process would have the same static registers) On the other hand, stacked registers are local to procedures and saved and restored by RSE which makes sense to me.
Quoted 6 lines · riedel
hi everybody, does anybody know what happens to static registers (gr0-gr31) in case of a context switch. in the manual, it says static registers are visible to all procedures(i guess it shouldn't otherwise on a context switch another process would have the same static registers) On the other hand, stacked registers are local to procedures and saved and restored by RSE which makes sense to me.
Normally on a context switch, only the callee saved registers are preserved (since the context switch appears as a function call to the process which initiates it). In the case of ia64, this means that gr4-gr7 are preserved from the static register set.
Signature · 2 lines
Doug Rabson Mail: [email protected] Phone: +44 20 8348 6160
If you are thinking of a context switch in the sense of switching from one process to another then ALL registers, static and stacked, are saved and restored. If you are talking about making a subroutine call then the uses of the static registers are covered by software convention and registers R4-R7 are preserved across a function call.
Conceptually the static registers are similar to the X86 registers EAX, EBX and so on. These registers are also saved and restored across context switches and have software conventions that control which ones are saved across subroutine calls.
Quoted 3 lines · riedel
hi everybody,
does anybody know what happens to static registers (gr0-gr31) in case of a context switch.
in the manual, it says static registers are visible to all procedures(i guess it shouldn't otherwise on a context switch another process would have the same static registers) On the other hand, stacked registers are local to procedures and saved and restored by RSE which makes sense to me.
Signature · 4 lines
Don Dugger "Censeo Toto nos in Kansa esse decisse." - D. Gale [email protected] Ph: 303/938-9838