On the 68010, we are forced to do bytewise compares

and copies if the two addresses aren't of the same
evenness.
This commit is contained in:
fredette 2001-05-17 21:24:08 +00:00
parent e80c95ddb2
commit 3085bd52b8
2 changed files with 40 additions and 4 deletions

View File

@ -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 @@ ENTRY(bcmp)
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

View File

@ -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 @@ ENTRY(bcopy)
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 @@ Lbcback:
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)