summaryrefslogtreecommitdiffstats
path: root/lib/libc/alpha/gen
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2001-12-22 06:06:17 +0000
committerdeischen <deischen@FreeBSD.org>2001-12-22 06:06:17 +0000
commit6e34232ab02018e46c73b3dae6fdfe250975a52b (patch)
tree3dad715821adf1d11a250d0b0fbccd55646fcc05 /lib/libc/alpha/gen
parentd81575874181dc6c7941b7bb6d8ad2ed6c24c418 (diff)
downloadFreeBSD-src-6e34232ab02018e46c73b3dae6fdfe250975a52b.zip
FreeBSD-src-6e34232ab02018e46c73b3dae6fdfe250975a52b.tar.gz
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>
Diffstat (limited to 'lib/libc/alpha/gen')
-rw-r--r--lib/libc/alpha/gen/_setjmp.S2
-rw-r--r--lib/libc/alpha/gen/setjmp.S1
2 files changed, 3 insertions, 0 deletions
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)
/*
OpenPOWER on IntegriCloud