diff options
author | marcel <marcel@FreeBSD.org> | 2002-08-23 03:47:50 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2002-08-23 03:47:50 +0000 |
commit | e1124db23a589e1d1236be6a72665e1315adacbd (patch) | |
tree | 92349c2b91643067ce22ca023e79fc1f85f98da3 | |
parent | da601a39acf6f61f64f7bc6f86c7e7a2493eefd9 (diff) | |
download | FreeBSD-src-e1124db23a589e1d1236be6a72665e1315adacbd.zip FreeBSD-src-e1124db23a589e1d1236be6a72665e1315adacbd.tar.gz |
We cannot use an alloc with only inputs and/or locals. The kernel
assumes that the parameters are passed in output registers. Remove
the alloc entirely, but don't depend on the kernel not trashing
our registers.
-rw-r--r-- | lib/libc/ia64/sys/sbrk.S | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/lib/libc/ia64/sys/sbrk.S b/lib/libc/ia64/sys/sbrk.S index 03e0766..f46f344 100644 --- a/lib/libc/ia64/sys/sbrk.S +++ b/lib/libc/ia64/sys/sbrk.S @@ -38,16 +38,21 @@ EXPORT(curbrk) .text ENTRY(sbrk, 1) - alloc r14=ar.pfs,1,2,0,0 - - add loc0=@ltoff(curbrk),gp ;; - ld8 loc0=[loc0] ;; - ld8 loc1=[loc0] - cmp.eq p6,p0=in0,r0 -(p6) br.dpnt.few 1f - add in0=r14,in0 + add r14 = @ltoff(curbrk), gp + ;; + ld8 r14 = [r14] + cmp.eq p6, p0 = in0, r0 + ;; + ld8 ret0 = [r14] +(p6) br.ret.sptk.few rp + ;; + add in0 = ret0, in0 CALLSYS_ERROR(break) - st8 [loc0]=in0 -1: mov ret0=loc1 - br.ret.sptk.few rp + add r14 = @ltoff(curbrk), gp + ;; + ld8 r14 = [r14] + ;; + ld8 ret0 = [r14] + st8 [r14] = in0 + br.ret.sptk.few rp END(sbrk) |