Compensate for the way that _setjmp aligns the start of jmp_buf.

This commit is contained in:
Doug Rabson 2001-10-26 08:26:45 +00:00
parent 3f2d9117d4
commit fc5ccf726e
2 changed files with 23 additions and 5 deletions

View File

@ -46,10 +46,14 @@
ENTRY(setjmp, 1)
alloc loc0=ar.pfs,1,2,3,0
mov loc1=rp
//
// Compensate for the pointer twiddling that setjmp does.
//
dep r14=r0,r32,0,4
;;
mov out0=1 // how = SIG_BLOCK
mov out1=0 // set = NULL
add out2=J_SIG0,in0 // oset = &jb[J_SIG0]
add out2=J_SIG0+0x10,r14 // oset = &jb[J_SIG0]
br.call.sptk.few rp=__sys_sigprocmask
;;
mov rp=loc1
@ -65,9 +69,13 @@ END(setjmp)
ENTRY(__longjmp, 2)
alloc loc0=ar.pfs,2,2,3,0
mov loc1=rp
;;
//
// Compensate for the pointer twiddling that setjmp does.
//
dep r14=r0,r32,0,4
;;
mov out0=3 // how = SIG_SETMASK
add out1=J_SIG0,in0 // set = &jb[J_SIG0]
add out1=J_SIG0+0x10,r14 // set = &jb[J_SIG0]
mov out2=0 // oset = NULL
br.call.sptk.few rp=__sys_sigprocmask
;;

View File

@ -45,7 +45,12 @@
*/
ENTRY(sigsetjmp, 2)
add r14=J_SIGMASK,in0 // place to save mask
//
// Compensate for the pointer twiddling that setjmp does.
//
dep r14=r0,r32,0,4
;;
add r14=J_SIGMASK+0x10,r14 // place to save mask
;;
st8 [r14]=in1 // save mask value
cmp.ne p6,p7=0,in1 // save signal state?
@ -55,7 +60,12 @@ END(sigsetjmp)
WEAK_ALIAS(siglongjmp,__siglongjmp)
ENTRY(__siglongjmp, 2)
add r14=J_SIGMASK,in0 // address of mask value
//
// Compensate for the pointer twiddling that setjmp does.
//
dep r14=r0,r32,0,4
;;
add r14=J_SIGMASK+0x10,r14 // address of mask value
;;
ld8 r14=[r14]
;;