summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2001-09-22 18:27:01 +0000
committerdfr <dfr@FreeBSD.org>2001-09-22 18:27:01 +0000
commit69d68ac34b943b6146bd104de03a5d4224456680 (patch)
tree2728b76a0310b20af0abb6f09839a5c81720e90d /lib
parent8a0f924b1537b2acc7e02a5f545e5bc79f3dd40e (diff)
downloadFreeBSD-src-69d68ac34b943b6146bd104de03a5d4224456680.zip
FreeBSD-src-69d68ac34b943b6146bd104de03a5d4224456680.tar.gz
Fix a whole bunch of dependancy bugs and make it actually work when the
size is not a multiple of eight.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/ia64/string/bzero.S17
1 files changed, 10 insertions, 7 deletions
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)
OpenPOWER on IntegriCloud