diff options
author | jeff <jeff@FreeBSD.org> | 2003-11-14 03:21:22 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-11-14 03:21:22 +0000 |
commit | 296889def06a5d1ceb9563f9342017b5e7734841 (patch) | |
tree | ba9b9ed621260f3c481ebdba978b0eddbd8ef5ec /lib | |
parent | 8a33824d16ac40895b89707be527cb5c7e9eaa73 (diff) | |
download | FreeBSD-src-296889def06a5d1ceb9563f9342017b5e7734841.zip FreeBSD-src-296889def06a5d1ceb9563f9342017b5e7734841.tar.gz |
- Use the magic for ___sigreturn in __sigset.
- In __sigreturn call sigprocmask() to restore our signal state rather than
returning through sigreturn(). jmp to ___sigreturn to restore our register
state following this.
Requested by: pete
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/alpha/gen/setjmp.S | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/libc/alpha/gen/setjmp.S b/lib/libc/alpha/gen/setjmp.S index 5e154f5..779684d 100644 --- a/lib/libc/alpha/gen/setjmp.S +++ b/lib/libc/alpha/gen/setjmp.S @@ -86,7 +86,7 @@ LEAF(setjmp, 1) mov s0, a0 ldq s0, (( 9 + 4) * 8)(a0) - ldiq t0, 0xacedbade /* sigcontext magic number */ + ldiq t0, 0xacedbadd /* sigcontext magic number */ stq t0, ((31 + 4) * 8)(a0) /* magic in sc_regs[31] */ /* Too bad we can't check if we actually used FP */ ldiq t0, 1 @@ -120,8 +120,16 @@ END(setjmp) XLEAF(longjmp, 2) LEAF(__longjmp, 2) LDGP(pv) - stq a1, (( 0 + 4) * 8)(a0) /* save return value */ - CALL(_sigreturn) /* use sigreturn to return */ + mov a1, s1 /* save return value */ + mov a0, s0 /* save the sc pointer */ + /* restore the mask */ + mov zero, a2 /* oset: NULL */ + lda a1, (71 * 8)(a0) /* set: sc_reserved */ + addq a2, 3, a0 /* how: SIG_SET */ + CALL(_sigprocmask) /* restore the mask */ + mov s0, a0 /* restore the sc pointer */ + mov s1, a1 /* restore the return value */ + jmp zero, ___longjmp /* use ___longjmp to return */ botch: CALL(longjmperror) |