From 6e34232ab02018e46c73b3dae6fdfe250975a52b Mon Sep 17 00:00:00 2001 From: deischen Date: Sat, 22 Dec 2001 06:06:17 +0000 Subject: 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 --- lib/libc/alpha/gen/_setjmp.S | 2 ++ lib/libc/alpha/gen/setjmp.S | 1 + 2 files changed, 3 insertions(+) (limited to 'lib/libc') diff --git a/lib/libc/alpha/gen/_setjmp.S b/lib/libc/alpha/gen/_setjmp.S index f3aa6ff..22cba2a 100644 --- a/lib/libc/alpha/gen/_setjmp.S +++ b/lib/libc/alpha/gen/_setjmp.S @@ -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) diff --git a/lib/libc/alpha/gen/setjmp.S b/lib/libc/alpha/gen/setjmp.S index 297e601..20e1135 100644 --- a/lib/libc/alpha/gen/setjmp.S +++ b/lib/libc/alpha/gen/setjmp.S @@ -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) /* -- cgit v1.1