forked from Imagelibrary/rtems
Simplify TLS support in context switch
There is no need to save the thread pointer in _CPU_Context_switch() since it is a thread invariant. It is initialized once in _CPU_Context_Initialize().
This commit is contained in:
@@ -59,7 +59,11 @@
|
||||
PUBLIC(_CPU_Context_switch)
|
||||
SYM(_CPU_Context_switch):
|
||||
st %g5, [%o0 + G5_OFFSET] ! save the global registers
|
||||
st %g7, [%o0 + G7_OFFSET]
|
||||
|
||||
/*
|
||||
* No need to save the thread pointer %g7 since it is a thread
|
||||
* invariant. It is initialized once in _CPU_Context_Initialize().
|
||||
*/
|
||||
|
||||
std %l0, [%o0 + L0_OFFSET] ! save the local registers
|
||||
std %l2, [%o0 + L2_OFFSET]
|
||||
|
||||
@@ -336,7 +336,6 @@ PROC (_CPU_Context_switch):
|
||||
PPC_GPR_STORE r30, PPC_CONTEXT_OFFSET_GPR30(r3)
|
||||
PPC_GPR_STORE r31, PPC_CONTEXT_OFFSET_GPR31(r3)
|
||||
|
||||
stw r2, PPC_CONTEXT_OFFSET_GPR2(r3)
|
||||
stw r11, PPC_CONTEXT_OFFSET_ISR_DISPATCH_DISABLE(r3)
|
||||
|
||||
#ifdef PPC_MULTILIB_ALTIVEC
|
||||
|
||||
Reference in New Issue
Block a user