From 31582c4e81dd7723f9215b95fb85e1bdb9c21dda Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Fri, 23 Aug 2002 03:47:50 +0000 Subject: 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. --- lib/libc/ia64/sys/sbrk.S | 27 ++++++++++++++++----------- 1 file 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) -- cgit v1.3