Save and restore t12 in the jmp_buf. t12 is used during function

calls.

This change allows libc_r to create thread contexts with a different
stack and return address.

With much detective work by: Bernd Walter <ticso@cicely.de>
This commit is contained in:
Daniel Eischen 2001-12-22 06:06:17 +00:00
parent ec55a6050d
commit 8572518672
2 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,7 @@ LEAF(_setjmp, 1)
stq s5, ((14 + 4) * 8)(a0)
stq s6, ((15 + 4) * 8)(a0)
stq ra, ((26 + 4) * 8)(a0)
stq t12,((27 + 4) * 8)(a0)
stq sp, ((30 + 4) * 8)(a0)
ldiq t0, 0xacedbadd /* sigcontext magic number */
stq t0, ((31 + 4) * 8)(a0) /* magic in sc_regs[31] */
@ -104,6 +105,7 @@ LEAF(___longjmp, 2)
ldq s5, ((14 + 4) * 8)(a0)
ldq s6, ((15 + 4) * 8)(a0)
/* ldq ra, ((26 + 4) * 8)(a0) set above */
ldq t12,((27 + 4) * 8)(a0)
ldq sp, ((30 + 4) * 8)(a0)
ldt fs0, ((2 + 37) * 8)(a0) /* saved bits of sc_fpregs */
ldt fs1, ((3 + 37) * 8)(a0)

View File

@ -55,6 +55,7 @@ LEAF(setjmp, 1)
stq s5, ((14 + 4) * 8)(a0)
stq s6, ((15 + 4) * 8)(a0)
stq ra, ((26 + 4) * 8)(a0)
stq t12,((27 + 4) * 8)(a0)
stq sp, ((30 + 4) * 8)(a0)
/*