diff options
-rw-r--r-- | lib/libc/ia64/gen/setjmp.S | 14 | ||||
-rw-r--r-- | lib/libc/ia64/gen/sigsetjmp.S | 14 |
2 files changed, 23 insertions, 5 deletions
diff --git a/lib/libc/ia64/gen/setjmp.S b/lib/libc/ia64/gen/setjmp.S index 3ea14fe..0ba630b 100644 --- a/lib/libc/ia64/gen/setjmp.S +++ b/lib/libc/ia64/gen/setjmp.S @@ -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 ;; diff --git a/lib/libc/ia64/gen/sigsetjmp.S b/lib/libc/ia64/gen/sigsetjmp.S index d9fe852..e3a9768 100644 --- a/lib/libc/ia64/gen/sigsetjmp.S +++ b/lib/libc/ia64/gen/sigsetjmp.S @@ -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] ;; |