Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/lib/libkern/arch/m68k Adjust for coldfire
details: https://anonhg.NetBSD.org/src/rev/709e5ae0f20c
branches: trunk
changeset: 788743:709e5ae0f20c
user: matt <matt%NetBSD.org@localhost>
date: Thu Jul 18 22:14:48 2013 +0000
description:
Adjust for coldfire
diffstat:
sys/lib/libkern/arch/m68k/scanc.S | 11 ++++++++++-
sys/lib/libkern/arch/m68k/skpc.S | 10 +++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diffs (60 lines):
diff -r 033ebbc8a75b -r 709e5ae0f20c sys/lib/libkern/arch/m68k/scanc.S
--- a/sys/lib/libkern/arch/m68k/scanc.S Thu Jul 18 22:14:10 2013 +0000
+++ b/sys/lib/libkern/arch/m68k/scanc.S Thu Jul 18 22:14:48 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scanc.S,v 1.8 2013/07/18 12:42:24 matt Exp $ */
+/* $NetBSD: scanc.S,v 1.9 2013/07/18 22:14:48 matt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -51,13 +51,22 @@
movb 19(%sp),%d1 | and mask to use
movl %d2,-(%sp) | need a scratch register
clrl %d2 | clear it out
+#ifndef __mcoldfire__
subqw #1,%d0 | adjust for dbra
+#endif
Lscloop:
movb (%a0)+,%d2 | get character
movb (%a1,%d2),%d2 | get table entry
andl %d1,%d2 | mask it
+#ifdef __mcoldfire__
+ jne 1f | break out if mask matched
+ subql #1,%d0 | decrement
+ jne Lscloop | keep going til no more
+1:
+#else
dbne %d0,Lscloop | keep going til no more or non-zero
addqw #1,%d0 | overshot by one
+#endif
movl (%sp)+,%d2 | restore scratch
Lscdone:
rts
diff -r 033ebbc8a75b -r 709e5ae0f20c sys/lib/libkern/arch/m68k/skpc.S
--- a/sys/lib/libkern/arch/m68k/skpc.S Thu Jul 18 22:14:10 2013 +0000
+++ b/sys/lib/libkern/arch/m68k/skpc.S Thu Jul 18 22:14:48 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: skpc.S,v 1.8 2013/07/18 12:54:08 matt Exp $ */
+/* $NetBSD: skpc.S,v 1.9 2013/07/18 22:14:48 matt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -48,10 +48,18 @@
jeq Lskdone | nothing to do, return
movb 7(%sp),%d1 | mask to use
movl 12(%sp),%a0 | where to start
+#ifndef __mcoldfire__
subqw #1,%d0 | adjust for dbcc
+#endif
Lskloop:
cmpb (%a0)+,%d1 | compare with mask
+#ifdef __mcoldfire__
+ jne Lskdone | keep going til no more or zero
+ subql #1,%d0
+ jne Lskloop
+#else
dbne %d0,Lskloop | keep going til no more or zero
addqw #1,%d0 | overshot by one
+#endif
Lskdone:
rts
Home |
Main Index |
Thread Index |
Old Index