aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2002-08-23 03:47:50 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2002-08-23 03:47:50 +0000
commit31582c4e81dd7723f9215b95fb85e1bdb9c21dda (patch)
tree92349c2b91643067ce22ca023e79fc1f85f98da3 /lib
parentad32f726db85cda48ed3d72ca0607cc285f7b703 (diff)
downloadsrc-31582c4e81dd7723f9215b95fb85e1bdb9c21dda.tar.gz
src-31582c4e81dd7723f9215b95fb85e1bdb9c21dda.zip
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.
Notes
Notes: svn path=/head/; revision=102298
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/ia64/sys/sbrk.S27
1 files changed, 16 insertions, 11 deletions
diff --git a/lib/libc/ia64/sys/sbrk.S b/lib/libc/ia64/sys/sbrk.S
index 03e076628420..f46f34491e76 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)