summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2002-11-11 08:11:44 +0000
committermarcel <marcel@FreeBSD.org>2002-11-11 08:11:44 +0000
commit0489f5e22ba1264432035f59b0f069b97f3ff211 (patch)
treef13c58f89616148ab473137eae4edefe8b38221f /lib
parente2616c6490bb0ea16984d873449ac5b257281d0d (diff)
downloadFreeBSD-src-0489f5e22ba1264432035f59b0f069b97f3ff211.zip
FreeBSD-src-0489f5e22ba1264432035f59b0f069b97f3ff211.tar.gz
ia64 ABI breaker:
Don't force 16-byte alignment at run-time. Do it at compile-time. This saves us the pointer fiddling by the setjmp functions and reduces complexity. While here, increase the jmp_buf by 16 bytes to an even 512 bytes. Coincidentally, due to the way alignment was handled prior to this change, the jmp_buf has not changed in size, but only in how the space is used. Prior to this change the 16 bytes were reserved for enforcing alignment; now they are reserved by us for future extensions. Therefore, this ABI breaker is relatively save: the failure is always an alignment trap.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/ia64/gen/_setjmp.S14
-rw-r--r--lib/libc/ia64/gen/setjmp.S14
-rw-r--r--lib/libc/ia64/gen/sigsetjmp.S16
3 files changed, 6 insertions, 38 deletions
diff --git a/lib/libc/ia64/gen/_setjmp.S b/lib/libc/ia64/gen/_setjmp.S
index e4e90b2..1357cfa 100644
--- a/lib/libc/ia64/gen/_setjmp.S
+++ b/lib/libc/ia64/gen/_setjmp.S
@@ -69,13 +69,6 @@
//
ENTRY(_setjmp, 1)
- //
- // Make sure buffer is aligned at 16byte boundary
- //
- add r10 = -0x10,r0 ;; // mask the lower 4 bits
- and r32 = r32, r10;;
- add r32 = 0x10, r32;; // move to next 16 byte boundary
-
add r10 = J_PREDS, r32 // skip Unats & pfs save area
add r11 = J_BSP, r32
//
@@ -200,13 +193,6 @@ END(_setjmp)
WEAK_ALIAS(_longjmp,___longjmp)
ENTRY(___longjmp, 2)
//
- // Make sure buffer is aligned at 16byte boundary
- //
- add r10 = -0x10,r0 ;; // mask the lower 4 bits
- and r32 = r32, r10;;
- add r32 = 0x10, r32;; // move to next 16 byte boundary
-
- //
// caching the return value as we do invala in the end
//
mov r8 = r33 // return value
diff --git a/lib/libc/ia64/gen/setjmp.S b/lib/libc/ia64/gen/setjmp.S
index 0ba630b..817e333 100644
--- a/lib/libc/ia64/gen/setjmp.S
+++ b/lib/libc/ia64/gen/setjmp.S
@@ -46,14 +46,10 @@
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+0x10,r14 // oset = &jb[J_SIG0]
+ add out2=J_SIG0,in0 // oset = &jb[J_SIG0]
br.call.sptk.few rp=__sys_sigprocmask
;;
mov rp=loc1
@@ -69,13 +65,9 @@ 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+0x10,r14 // set = &jb[J_SIG0]
+ add out1=J_SIG0,in0 // 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 e3a9768..37e6f95 100644
--- a/lib/libc/ia64/gen/sigsetjmp.S
+++ b/lib/libc/ia64/gen/sigsetjmp.S
@@ -45,27 +45,17 @@
*/
ENTRY(sigsetjmp, 2)
- //
- // Compensate for the pointer twiddling that setjmp does.
- //
- dep r14=r0,r32,0,4
- ;;
- add r14=J_SIGMASK+0x10,r14 // place to save mask
+ add r14=J_SIGMASK,in0 // place to save mask
+ cmp.ne p6,p7=0,in1 // save signal state?
;;
st8 [r14]=in1 // save mask value
- cmp.ne p6,p7=0,in1 // save signal state?
(p6) br.cond.dptk.many setjmp
(p7) br.cond.dpnt.many _setjmp
END(sigsetjmp)
WEAK_ALIAS(siglongjmp,__siglongjmp)
ENTRY(__siglongjmp, 2)
- //
- // Compensate for the pointer twiddling that setjmp does.
- //
- dep r14=r0,r32,0,4
- ;;
- add r14=J_SIGMASK+0x10,r14 // address of mask value
+ add r14=J_SIGMASK,in0 // address of mask value
;;
ld8 r14=[r14]
;;
OpenPOWER on IntegriCloud