Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/m68k/string On the 68010, we are forced to do ...
details: https://anonhg.NetBSD.org/src/rev/e05007a338de
branches: trunk
changeset: 510043:e05007a338de
user: fredette <fredette%NetBSD.org@localhost>
date: Thu May 17 21:24:08 2001 +0000
description:
On the 68010, we are forced to do bytewise compares
and copies if the two addresses aren't of the same
evenness.
diffstat:
lib/libc/arch/m68k/string/bcmp.S | 16 ++++++++++++++--
lib/libc/arch/m68k/string/bcopy.S | 28 ++++++++++++++++++++++++++--
2 files changed, 40 insertions(+), 4 deletions(-)
diffs (93 lines):
diff -r 9d283b85789e -r e05007a338de lib/libc/arch/m68k/string/bcmp.S
--- a/lib/libc/arch/m68k/string/bcmp.S Thu May 17 21:21:07 2001 +0000
+++ b/lib/libc/arch/m68k/string/bcmp.S Thu May 17 21:24:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcmp.S,v 1.11 1999/10/25 23:48:14 thorpej Exp $ */
+/* $NetBSD: bcmp.S,v 1.12 2001/05/17 21:24:08 fredette Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
#if 0
RCSID("from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90")
#else
- RCSID("$NetBSD: bcmp.S,v 1.11 1999/10/25 23:48:14 thorpej Exp $")
+ RCSID("$NetBSD: bcmp.S,v 1.12 2001/05/17 21:24:08 fredette Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@@ -95,6 +95,18 @@
cmpl #8,%d1
jlt Lbcbyte
+#ifdef __mc68010__
+ /*
+ * The 68010 cannot access a word or long on an odd boundary,
+ * period. If the source and the destination addresses aren't
+ * of the same evenness, we're forced to do a bytewise compare.
+ */
+ movl %a0,%d0
+ addl %a1,%d0
+ btst #0,%d0
+ jne Lbcbyte
+#endif /* __mc68010__ */
+
/* word align */
movl %a0,%d0
btst #0,%d0
diff -r 9d283b85789e -r e05007a338de lib/libc/arch/m68k/string/bcopy.S
--- a/lib/libc/arch/m68k/string/bcopy.S Thu May 17 21:21:07 2001 +0000
+++ b/lib/libc/arch/m68k/string/bcopy.S Thu May 17 21:24:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcopy.S,v 1.15 1999/10/25 23:48:14 thorpej Exp $ */
+/* $NetBSD: bcopy.S,v 1.16 2001/05/17 21:24:08 fredette Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
#if 0
RCSID("from: @(#)bcopy.s 5.1 (Berkeley) 5/12/90")
#else
- RCSID("$NetBSD: bcopy.S,v 1.15 1999/10/25 23:48:14 thorpej Exp $")
+ RCSID("$NetBSD: bcopy.S,v 1.16 2001/05/17 21:24:08 fredette Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@@ -112,6 +112,18 @@
cmpl #8,%d1
jlt Lbcfbyte
+#ifdef __mc68010__
+ /*
+ * The 68010 cannot access a word or long on an odd boundary,
+ * period. If the source and the destination addresses aren't
+ * of the same evenness, we're forced to do a bytewise copy.
+ */
+ movl %a0,%d0
+ addl %a1,%d0
+ btst #0,%d0
+ jne Lbcfbyte
+#endif /* __mc68010__ */
+
/* word align */
movl %a1,%d0
btst #0,%d0 | if (dst & 1)
@@ -183,6 +195,18 @@
cmpl #8,%d1
jlt Lbcbbyte
+#ifdef __mc68010__
+ /*
+ * The 68010 cannot access a word or long on an odd boundary,
+ * period. If the source and the destination addresses aren't
+ * of the same evenness, we're forced to do a bytewise copy.
+ */
+ movl %a0,%d0
+ addl %a1,%d0
+ btst #0,%d0
+ jne Lbcbbyte
+#endif /* __mc68010__ */
+
/* word align */
movl %a1,%d0
btst #0,%d0 | if (dst & 1)
Home |
Main Index |
Thread Index |
Old Index