From 69d68ac34b943b6146bd104de03a5d4224456680 Mon Sep 17 00:00:00 2001 From: dfr Date: Sat, 22 Sep 2001 18:27:01 +0000 Subject: Fix a whole bunch of dependancy bugs and make it actually work when the size is not a multiple of eight. --- lib/libc/ia64/string/bzero.S | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lib/libc/ia64/string') diff --git a/lib/libc/ia64/string/bzero.S b/lib/libc/ia64/string/bzero.S index 5d9948a..8f0004e 100644 --- a/lib/libc/ia64/string/bzero.S +++ b/lib/libc/ia64/string/bzero.S @@ -38,28 +38,30 @@ ENTRY(bzero, 2) cmp.ltu p6,p0=17,in1 // check for small (p6) br.dptk.few 3f - add r15=-1,in1 ;; -1: mov ar.lc=r15 +1: add r15=-1,in1 ;; + mov ar.lc=r15 ;; 2: st1 [in0]=r0,1 // zero one byte br.cloop.sptk.few 2b // loop + ;; mov ar.lc=r14 // done br.ret.sptk.few rp // Zero up to 8byte alignment -3: tbit.nz p6,p0=in1,0 ;; +3: tbit.nz p6,p0=in0,0 ;; (p6) st1 [in0]=r0,1 (p6) add in1=-1,in1 - tbit.nz p6,p0=in1,1 ;; + tbit.nz p6,p0=in0,1 ;; (p6) st2 [in0]=r0,2 (p6) add in1=-2,in1 - tbit.nz p6,p0=in1,2 ;; + tbit.nz p6,p0=in0,2 ;; (p6) st4 [in0]=r0,4 (p6) add in1=-4,in1 + ;; shr.u r15=in1,3 // word count extr.u in1=in1,0,3 ;; // trailing bytes cmp.eq p6,p0=r15,r0 // check for zero @@ -67,13 +69,14 @@ ENTRY(bzero, 2) (p6) br.dpnt.few 1b // zero last bytes add r15=-1,r15 ;; - mov ar.lc=r15 + mov ar.lc=r15 ;; 4: st8 [in0]=r0,8 br.cloop.sptk.few 4b (p7) br.dpnt.few 1b // zero last bytes + ;; mov ar.lc=r14 // done br.ret.sptk.few rp -END(bzero) \ No newline at end of file +END(bzero) -- cgit v1.1