diff options
Diffstat (limited to 'lib/libc/ia64/string/bzero.S')
-rw-r--r-- | lib/libc/ia64/string/bzero.S | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/libc/ia64/string/bzero.S b/lib/libc/ia64/string/bzero.S index a7ff010..5d9948a 100644 --- a/lib/libc/ia64/string/bzero.S +++ b/lib/libc/ia64/string/bzero.S @@ -35,10 +35,11 @@ ENTRY(bzero, 2) mov r14=ar.lc // save ar.lc - cmp.geu p6,p0=17,in1 // check for small -(p6) br.dptk.few 2f + cmp.ltu p6,p0=17,in1 // check for small +(p6) br.dptk.few 3f -1: mov ar.lc=in1 + add r15=-1,in1 ;; +1: mov ar.lc=r15 2: st1 [in0]=r0,1 // zero one byte br.cloop.sptk.few 2b // loop @@ -46,8 +47,8 @@ ENTRY(bzero, 2) br.ret.sptk.few rp // Zero up to 8byte alignment - - tbit.nz p6,p0=in1,0 ;; + +3: tbit.nz p6,p0=in1,0 ;; (p6) st1 [in0]=r0,1 (p6) add in1=-1,in1 @@ -65,9 +66,10 @@ ENTRY(bzero, 2) cmp.ne p7,p0=in1,r0 (p6) br.dpnt.few 1b // zero last bytes + add r15=-1,r15 ;; mov ar.lc=r15 -3: st8 [in0]=r0,8 - br.cloop.sptk.few 3b +4: st8 [in0]=r0,8 + br.cloop.sptk.few 4b (p7) br.dpnt.few 1b // zero last bytes |