summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-11-26 08:13:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-11-26 08:13:49 +0000
commit667dcc6f8a56d14cbf7f4791112d8764c22032a9 (patch)
tree25c35f0e1547d6761b12abc39d538f0e440b9b12 /sys
parent99755e53931851f3e2271391f80456f62bd7d600 (diff)
the bcopy() found here was not handling overlapping. Merge it nicely with
the ovbcopy() code ok miod
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/sparc/locore.s10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/sparc/sparc/locore.s b/sys/arch/sparc/sparc/locore.s
index ac109ebffeb..4ff11d0231c 100644
--- a/sys/arch/sparc/sparc/locore.s
+++ b/sys/arch/sparc/sparc/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.73 2007/10/10 15:53:52 art Exp $ */
+/* $OpenBSD: locore.s,v 1.74 2007/11/26 08:13:48 deraadt Exp $ */
/* $NetBSD: locore.s,v 1.73 1997/09/13 20:36:48 pk Exp $ */
/*
@@ -4719,7 +4719,7 @@ ENTRY(qzero)
nop
/*
- * kernel bcopy/memcpy
+ * memcpy (which internally contains the non-overlapping bcopy code)
* Assumes regions do not overlap; has no useful return value.
*
* Must not use %g7 (see copyin/copyout above).
@@ -4735,7 +4735,6 @@ ENTRY(memcpy)
mov %o0, %o3
mov %o1, %o0
mov %o3, %o1
-ENTRY(bcopy)
cmp %o2, BCOPY_SMALL
Lbcopy_start:
bge,a Lbcopy_fancy ! if >= this many, go be fancy.
@@ -4901,9 +4900,10 @@ Lbcopy_done:
retl
stb %o4,[%o1]
/*
- * ovbcopy(src, dst, len): like bcopy, but regions may overlap.
+ * bcopy(src, dst, len): regions may overlap, of course.
*/
-ENTRY(ovbcopy)
+ALTENTRY(ovbcopy)
+ENTRY(bcopy)
cmp %o0, %o1 ! src < dst?
bgeu Lbcopy_start ! no, go copy forwards as via bcopy
cmp %o2, BCOPY_SMALL! (check length for doublecopy first)