CVS commit: src/sys/lib/libkern/arch/m68k

2020-04-22 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Apr 23 03:12:49 UTC 2020

Modified Files:
src/sys/lib/libkern/arch/m68k: divsi3.S modsi3.S udivsi3.S umodsi3.S

Log Message:
Remove "#ifndef __mc68010__ #error" I added when these {,u}divsi3.S and
{,u}modsi3.S were moved here (It was better to split the commit, sorry);
bootloader for sun3 still depends on them.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libkern/arch/m68k/divsi3.S \
src/sys/lib/libkern/arch/m68k/modsi3.S \
src/sys/lib/libkern/arch/m68k/umodsi3.S
cvs rdiff -u -r1.5 -r1.6 src/sys/lib/libkern/arch/m68k/udivsi3.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2020-04-22 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Apr 23 03:12:49 UTC 2020

Modified Files:
src/sys/lib/libkern/arch/m68k: divsi3.S modsi3.S udivsi3.S umodsi3.S

Log Message:
Remove "#ifndef __mc68010__ #error" I added when these {,u}divsi3.S and
{,u}modsi3.S were moved here (It was better to split the commit, sorry);
bootloader for sun3 still depends on them.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libkern/arch/m68k/divsi3.S \
src/sys/lib/libkern/arch/m68k/modsi3.S \
src/sys/lib/libkern/arch/m68k/umodsi3.S
cvs rdiff -u -r1.5 -r1.6 src/sys/lib/libkern/arch/m68k/udivsi3.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/divsi3.S
diff -u src/sys/lib/libkern/arch/m68k/divsi3.S:1.3 src/sys/lib/libkern/arch/m68k/divsi3.S:1.4
--- src/sys/lib/libkern/arch/m68k/divsi3.S:1.3	Wed Apr 22 11:58:26 2020
+++ src/sys/lib/libkern/arch/m68k/divsi3.S	Thu Apr 23 03:12:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: divsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $	*/
+/*	$NetBSD: divsi3.S,v 1.4 2020/04/23 03:12:49 rin Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -39,13 +39,13 @@
 #if 0
 	RCSID("from: @(#)divsi3.s	5.1 (Berkeley) 6/7/90")
 #else
-	RCSID("$NetBSD: divsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $")
+	RCSID("$NetBSD: divsi3.S,v 1.4 2020/04/23 03:12:49 rin Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 /* int / int */
 #ifndef __mc68010__
-#error
+/* XXX sun3 need this for bootloader */
 ENTRY(__divsi3)
 	movel	4(%sp),%d0
 	divsl	8(%sp),%d0
Index: src/sys/lib/libkern/arch/m68k/modsi3.S
diff -u src/sys/lib/libkern/arch/m68k/modsi3.S:1.3 src/sys/lib/libkern/arch/m68k/modsi3.S:1.4
--- src/sys/lib/libkern/arch/m68k/modsi3.S:1.3	Wed Apr 22 11:58:26 2020
+++ src/sys/lib/libkern/arch/m68k/modsi3.S	Thu Apr 23 03:12:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: modsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $	*/
+/*	$NetBSD: modsi3.S,v 1.4 2020/04/23 03:12:49 rin Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -39,13 +39,13 @@
 #if 0
 	RCSID("from: @(#)modsi3.s	5.1 (Berkeley) 6/7/90")
 #else
-	RCSID("$NetBSD: modsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $")
+	RCSID("$NetBSD: modsi3.S,v 1.4 2020/04/23 03:12:49 rin Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 /* int % int */
 #ifndef __mc68010__
-#error
+/* XXX sun3 need this for bootloader */
 ENTRY(__modsi3)
 	movel	4(%sp),%d1
 #ifdef __mcoldfire__
Index: src/sys/lib/libkern/arch/m68k/umodsi3.S
diff -u src/sys/lib/libkern/arch/m68k/umodsi3.S:1.3 src/sys/lib/libkern/arch/m68k/umodsi3.S:1.4
--- src/sys/lib/libkern/arch/m68k/umodsi3.S:1.3	Wed Apr 22 11:58:26 2020
+++ src/sys/lib/libkern/arch/m68k/umodsi3.S	Thu Apr 23 03:12:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: umodsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $	*/
+/*	$NetBSD: umodsi3.S,v 1.4 2020/04/23 03:12:49 rin Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -39,13 +39,13 @@
 #if 0
 	RCSID("from: @(#)umodsi3.s	5.1 (Berkeley) 6/7/90")(
 #else
-	RCSID("$NetBSD: umodsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $")
+	RCSID("$NetBSD: umodsi3.S,v 1.4 2020/04/23 03:12:49 rin Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 /* unsigned % unsigned */
 #ifndef __mc68010__
-#error
+/* XXX sun3 need this for bootloader */
 ENTRY(__umodsi3)
 	movel	4(%sp),%d1
 #ifdef __mcoldfire__

Index: src/sys/lib/libkern/arch/m68k/udivsi3.S
diff -u src/sys/lib/libkern/arch/m68k/udivsi3.S:1.5 src/sys/lib/libkern/arch/m68k/udivsi3.S:1.6
--- src/sys/lib/libkern/arch/m68k/udivsi3.S:1.5	Wed Apr 22 11:58:26 2020
+++ src/sys/lib/libkern/arch/m68k/udivsi3.S	Thu Apr 23 03:12:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: udivsi3.S,v 1.5 2020/04/22 11:58:26 rin Exp $	*/
+/*	$NetBSD: udivsi3.S,v 1.6 2020/04/23 03:12:49 rin Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -39,13 +39,13 @@
 #if 0
 	RCSID("from: @(#)udivsi3.s	5.1 (Berkeley) 6/7/90")
 #else
-	RCSID("$NetBSD: udivsi3.S,v 1.5 2020/04/22 11:58:26 rin Exp $")
+	RCSID("$NetBSD: udivsi3.S,v 1.6 2020/04/23 03:12:49 rin Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 /* unsigned / unsigned */
 #ifndef __mc68010__
-#error
+/* XXX sun3 need this for bootloader */
 ENTRY(__udivsi3)
 	movel	4(%sp),%d0
 	divul	8(%sp),%d0



Re: CVS commit: src/sys/lib/libkern/arch/m68k

2020-04-22 Thread Rin Okuyama

In addition to these files in this mail:

Modified Files:
src/lib/libc/arch/m68k/gen: Makefile.inc
src/lib/libc/compiler_rt: Makefile.inc
src/sys/arch/sun68k/stand/libsa: Makefile.inc

Removed Files:
src/common/lib/libc/arch/m68k/gen: divsi3.S modsi3.S udivsi3.S umodsi3.S

However, cvs aborted since I forgot to ``cvs add'' and commit mail was
not sent. Sorry for the inconvenience...

Diffs are attached to this message.

Thanks,
rin

On 2020/04/22 20:58, Rin Okuyama wrote:

Module Name:src
Committed By:   rin
Date:   Wed Apr 22 11:58:26 UTC 2020

Added Files:
src/sys/lib/libkern/arch/m68k: divsi3.S modsi3.S udivsi3.S umodsi3.S

Log Message:
Restrict usage of m68k assembler versions of {,u}divsi3 and {,u}divsi3 to
kernel and bootloader for 68010.

They requires a special calling convention to udivsi3, and cannot to be
mixed up in normal routines provided by libgcc or compiler_rt. Although,
there's no problem for using in a controlled situation, i.e., kernel and
standalone programs.

Note that this does not affect m68k ports other than sun2, since codes
generated by gcc do not call these routines.

Assembler files are moved from common/lib/libc/arch/m68k/gen to
sys/lib/libkern/arch/m68k in order not to be compiled in libc.

Revert hack introduced to lib/libc/compiler_rt/Makefile.inc rev 1.37:
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/compiler_rt/Makefile.inc#rev1.37

Proposed on port-sun2@ with no response...
(Again, this does not affect m68k ports other than sun2.)
http://mail-index.netbsd.org/port-sun2/2020/03/10/msg000102.html


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/sys/lib/libkern/arch/m68k/divsi3.S \
 src/sys/lib/libkern/arch/m68k/modsi3.S \
 src/sys/lib/libkern/arch/m68k/umodsi3.S
cvs rdiff -u -r0 -r1.5 src/sys/lib/libkern/arch/m68k/udivsi3.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


Added files:

Index: src/sys/lib/libkern/arch/m68k/divsi3.S
diff -u /dev/null src/sys/lib/libkern/arch/m68k/divsi3.S:1.3
--- /dev/null   Wed Apr 22 11:58:26 2020
+++ src/sys/lib/libkern/arch/m68k/divsi3.S  Wed Apr 22 11:58:26 2020
@@ -0,0 +1,71 @@
+/* $NetBSD: divsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $   */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+
+#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
+   RCSID("from: @(#)divsi3.s  5.1 (Berkeley) 6/7/90")
+#else
+   RCSID("$NetBSD: divsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $")
+#endif
+#endif /* LIBC_SCCS and not lint */
+
+/* int / int */
+#ifndef __mc68010__
+#error
+ENTRY(__divsi3)
+   movel   4(%sp),%d0
+   divsl   8(%sp),%d0
+   rts
+END(__divsi3)
+#else
+ENTRY(__divsi3)
+| NB: this requires that __udivsi3 preserve %a0:
+   movel   4(%sp), %d1 | load the dividend
+   bpl 1f
+   negl4(%sp)  | store abs(dividend)
+1: movel   8(%sp), %d0 | load the divisor
+   bpl 2f
+   negl8(%sp)  | store abs(divisor)
+2: eorl%d1, %d0
+   bpl 3f  | branch if sgn(divisor) == sgn(dividend)
+   movel   (%sp)+, %a0 | pop return address
+   pea (.Lret,%pc) | push our return address
+3: 

CVS commit: src/sys/lib/libkern/arch/m68k

2020-04-22 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Apr 22 11:58:26 UTC 2020

Added Files:
src/sys/lib/libkern/arch/m68k: divsi3.S modsi3.S udivsi3.S umodsi3.S

Log Message:
Restrict usage of m68k assembler versions of {,u}divsi3 and {,u}divsi3 to
kernel and bootloader for 68010.

They requires a special calling convention to udivsi3, and cannot to be
mixed up in normal routines provided by libgcc or compiler_rt. Although,
there's no problem for using in a controlled situation, i.e., kernel and
standalone programs.

Note that this does not affect m68k ports other than sun2, since codes
generated by gcc do not call these routines.

Assembler files are moved from common/lib/libc/arch/m68k/gen to
sys/lib/libkern/arch/m68k in order not to be compiled in libc.

Revert hack introduced to lib/libc/compiler_rt/Makefile.inc rev 1.37:
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/compiler_rt/Makefile.inc#rev1.37

Proposed on port-sun2@ with no response...
(Again, this does not affect m68k ports other than sun2.)
http://mail-index.netbsd.org/port-sun2/2020/03/10/msg000102.html


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/sys/lib/libkern/arch/m68k/divsi3.S \
src/sys/lib/libkern/arch/m68k/modsi3.S \
src/sys/lib/libkern/arch/m68k/umodsi3.S
cvs rdiff -u -r0 -r1.5 src/sys/lib/libkern/arch/m68k/udivsi3.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/lib/libkern/arch/m68k/divsi3.S
diff -u /dev/null src/sys/lib/libkern/arch/m68k/divsi3.S:1.3
--- /dev/null	Wed Apr 22 11:58:26 2020
+++ src/sys/lib/libkern/arch/m68k/divsi3.S	Wed Apr 22 11:58:26 2020
@@ -0,0 +1,71 @@
+/*	$NetBSD: divsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $	*/
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+
+#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
+	RCSID("from: @(#)divsi3.s	5.1 (Berkeley) 6/7/90")
+#else
+	RCSID("$NetBSD: divsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $")
+#endif
+#endif /* LIBC_SCCS and not lint */
+
+/* int / int */
+#ifndef __mc68010__
+#error
+ENTRY(__divsi3)
+	movel	4(%sp),%d0
+	divsl	8(%sp),%d0
+	rts
+END(__divsi3)
+#else
+ENTRY(__divsi3)
+| NB: this requires that __udivsi3 preserve %a0:
+	movel	4(%sp), %d1	| load the dividend
+	bpl	1f
+	negl	4(%sp)		| store abs(dividend)
+1:	movel	8(%sp), %d0	| load the divisor
+	bpl	2f
+	negl	8(%sp)		| store abs(divisor)
+2:	eorl	%d1, %d0
+	bpl	3f		| branch if sgn(divisor) == sgn(dividend)
+	movel	(%sp)+, %a0	| pop return address
+	pea	(.Lret,%pc)	| push our return address
+3:	jmp	_C_LABEL(__udivsi3)
+.Lret:	negl	%d0		| negate quotient
+	jmp	(%a0)
+END(__divsi3)
+#endif /* __mc68010__ */
Index: src/sys/lib/libkern/arch/m68k/modsi3.S
diff -u /dev/null src/sys/lib/libkern/arch/m68k/modsi3.S:1.3
--- /dev/null	Wed Apr 22 11:58:26 2020
+++ src/sys/lib/libkern/arch/m68k/modsi3.S	Wed Apr 22 11:58:26 2020
@@ -0,0 +1,77 @@
+/*	$NetBSD: modsi3.S,v 1.3 2020/04/22 11:58:26 rin Exp $	*/
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * the Systems Programming Group of the University of Utah Computer
+ * Science Department.
+ *
+ * 

CVS commit: src/sys/lib/libkern/arch/m68k

2020-04-22 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Apr 22 11:58:26 UTC 2020

Added Files:
src/sys/lib/libkern/arch/m68k: divsi3.S modsi3.S udivsi3.S umodsi3.S

Log Message:
Restrict usage of m68k assembler versions of {,u}divsi3 and {,u}divsi3 to
kernel and bootloader for 68010.

They requires a special calling convention to udivsi3, and cannot to be
mixed up in normal routines provided by libgcc or compiler_rt. Although,
there's no problem for using in a controlled situation, i.e., kernel and
standalone programs.

Note that this does not affect m68k ports other than sun2, since codes
generated by gcc do not call these routines.

Assembler files are moved from common/lib/libc/arch/m68k/gen to
sys/lib/libkern/arch/m68k in order not to be compiled in libc.

Revert hack introduced to lib/libc/compiler_rt/Makefile.inc rev 1.37:
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/compiler_rt/Makefile.inc#rev1.37

Proposed on port-sun2@ with no response...
(Again, this does not affect m68k ports other than sun2.)
http://mail-index.netbsd.org/port-sun2/2020/03/10/msg000102.html


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.3 src/sys/lib/libkern/arch/m68k/divsi3.S \
src/sys/lib/libkern/arch/m68k/modsi3.S \
src/sys/lib/libkern/arch/m68k/umodsi3.S
cvs rdiff -u -r0 -r1.5 src/sys/lib/libkern/arch/m68k/udivsi3.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2015-07-30 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Jul 30 15:29:52 UTC 2015

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
Revert untested and unnecessary change in previous rev 1.36.

Our autobuild doesn't always reflect the latest fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/Makefile.inc
diff -u src/sys/lib/libkern/arch/m68k/Makefile.inc:1.36 src/sys/lib/libkern/arch/m68k/Makefile.inc:1.37
--- src/sys/lib/libkern/arch/m68k/Makefile.inc:1.36	Thu Jul 30 07:44:40 2015
+++ src/sys/lib/libkern/arch/m68k/Makefile.inc	Thu Jul 30 15:29:52 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.36 2015/07/30 07:44:40 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.37 2015/07/30 15:29:52 tsutsui Exp $
 
 SRCS+=	bswap16.S bswap32.S bswap64.S
 SRCS+=	memcmp.S memcpy.S memmove.S memset.S
@@ -12,7 +12,7 @@ SRCS+=	ffs.S
 SRCS+=	mulsi3.S divsi3.S udivsi3.S modsi3.S umodsi3.S
 .endif
 .if defined(MACHINE_ARCH)  ${MACHINE_ARCH} == m68k
-SRCS+=	mulsi3.S random.S
+SRCS+=	random.S
 .else
 random.o random.po random.pico random.d: random.c
 .endif



CVS commit: src/sys/lib/libkern/arch/m68k

2015-07-30 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Jul 30 15:29:52 UTC 2015

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
Revert untested and unnecessary change in previous rev 1.36.

Our autobuild doesn't always reflect the latest fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2015-07-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jul 30 07:44:40 UTC 2015

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
add mulsi3, needed by inet_addr.o


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2015-07-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jul 30 07:44:40 UTC 2015

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
add mulsi3, needed by inet_addr.o


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/Makefile.inc
diff -u src/sys/lib/libkern/arch/m68k/Makefile.inc:1.35 src/sys/lib/libkern/arch/m68k/Makefile.inc:1.36
--- src/sys/lib/libkern/arch/m68k/Makefile.inc:1.35	Mon Sep  8 08:12:19 2014
+++ src/sys/lib/libkern/arch/m68k/Makefile.inc	Thu Jul 30 03:44:40 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.35 2014/09/08 12:12:19 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.36 2015/07/30 07:44:40 christos Exp $
 
 SRCS+=	bswap16.S bswap32.S bswap64.S
 SRCS+=	memcmp.S memcpy.S memmove.S memset.S
@@ -12,7 +12,7 @@ SRCS+=	ffs.S
 SRCS+=	mulsi3.S divsi3.S udivsi3.S modsi3.S umodsi3.S
 .endif
 .if defined(MACHINE_ARCH)  ${MACHINE_ARCH} == m68k
-SRCS+=	random.S
+SRCS+=	mulsi3.S random.S
 .else
 random.o random.po random.pico random.d: random.c
 .endif



CVS commit: src/sys/lib/libkern/arch/m68k

2014-09-08 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Sep  8 12:12:19 UTC 2014

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
Revert 1.33 and 1.34 for now, until either .INVISIBLE is reinstanciated
or random.S dropped.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/Makefile.inc
diff -u src/sys/lib/libkern/arch/m68k/Makefile.inc:1.34 src/sys/lib/libkern/arch/m68k/Makefile.inc:1.35
--- src/sys/lib/libkern/arch/m68k/Makefile.inc:1.34	Mon Sep  1 07:32:35 2014
+++ src/sys/lib/libkern/arch/m68k/Makefile.inc	Mon Sep  8 12:12:19 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.34 2014/09/01 07:32:35 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.35 2014/09/08 12:12:19 joerg Exp $
 
 SRCS+=	bswap16.S bswap32.S bswap64.S
 SRCS+=	memcmp.S memcpy.S memmove.S memset.S
@@ -11,6 +11,8 @@ SRCS+=	ffs.S
 .if defined(MACHINE_ARCH)  (${MACHINE_ARCH} == m68000)
 SRCS+=	mulsi3.S divsi3.S udivsi3.S modsi3.S umodsi3.S
 .endif
-.if defined(MACHINE_ARCH)  (${MACHINE_ARCH} != m68k)
-random.S: .INVISIBLE
+.if defined(MACHINE_ARCH)  ${MACHINE_ARCH} == m68k
+SRCS+=	random.S
+.else
+random.o random.po random.pico random.d: random.c
 .endif



CVS commit: src/sys/lib/libkern/arch/m68k

2014-09-08 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Sep  8 12:12:19 UTC 2014

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
Revert 1.33 and 1.34 for now, until either .INVISIBLE is reinstanciated
or random.S dropped.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2014-09-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Sep  1 07:32:35 UTC 2014

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
Make random.S invisible for coldfire too (e.g. anything not m68k)


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/Makefile.inc
diff -u src/sys/lib/libkern/arch/m68k/Makefile.inc:1.33 src/sys/lib/libkern/arch/m68k/Makefile.inc:1.34
--- src/sys/lib/libkern/arch/m68k/Makefile.inc:1.33	Wed Aug 27 08:51:37 2014
+++ src/sys/lib/libkern/arch/m68k/Makefile.inc	Mon Sep  1 07:32:35 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.33 2014/08/27 08:51:37 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.34 2014/09/01 07:32:35 matt Exp $
 
 SRCS+=	bswap16.S bswap32.S bswap64.S
 SRCS+=	memcmp.S memcpy.S memmove.S memset.S
@@ -10,5 +10,7 @@ SRCS+=	ffs.S
 
 .if defined(MACHINE_ARCH)  (${MACHINE_ARCH} == m68000)
 SRCS+=	mulsi3.S divsi3.S udivsi3.S modsi3.S umodsi3.S
+.endif
+.if defined(MACHINE_ARCH)  (${MACHINE_ARCH} != m68k)
 random.S: .INVISIBLE
 .endif



CVS commit: src/sys/lib/libkern/arch/m68k

2014-09-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Sep  1 07:32:35 UTC 2014

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
Make random.S invisible for coldfire too (e.g. anything not m68k)


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2014-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 27 08:51:37 UTC 2014

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
use .INVISIBLE to hide random.S, instead of extra rules.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/Makefile.inc
diff -u src/sys/lib/libkern/arch/m68k/Makefile.inc:1.32 src/sys/lib/libkern/arch/m68k/Makefile.inc:1.33
--- src/sys/lib/libkern/arch/m68k/Makefile.inc:1.32	Tue Mar 18 14:20:43 2014
+++ src/sys/lib/libkern/arch/m68k/Makefile.inc	Wed Aug 27 04:51:37 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.32 2014/03/18 18:20:43 riastradh Exp $
+#	$NetBSD: Makefile.inc,v 1.33 2014/08/27 08:51:37 christos Exp $
 
 SRCS+=	bswap16.S bswap32.S bswap64.S
 SRCS+=	memcmp.S memcpy.S memmove.S memset.S
@@ -10,9 +10,5 @@ SRCS+=	ffs.S
 
 .if defined(MACHINE_ARCH)  (${MACHINE_ARCH} == m68000)
 SRCS+=	mulsi3.S divsi3.S udivsi3.S modsi3.S umodsi3.S
-.endif
-.if defined(MACHINE_ARCH)  ${MACHINE_ARCH} == m68k
-SRCS+=	random.S
-.else
-random.o random.po random.pico random.d: random.c
+random.S: .INVISIBLE
 .endif



CVS commit: src/sys/lib/libkern/arch/m68k

2014-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 27 08:51:37 UTC 2014

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
use .INVISIBLE to hide random.S, instead of extra rules.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:16:40 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: random.S

Log Message:
Don't use %d2 (violates the ABI since it wasn't saved), use %a0 instead.
Use a pcrelative access for the local data avoiding the GOT.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libkern/arch/m68k/random.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/random.S
diff -u src/sys/lib/libkern/arch/m68k/random.S:1.4 src/sys/lib/libkern/arch/m68k/random.S:1.5
--- src/sys/lib/libkern/arch/m68k/random.S:1.4	Tue Jan  6 01:24:56 2009
+++ src/sys/lib/libkern/arch/m68k/random.S	Thu Jul 18 12:16:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: random.S,v 1.4 2009/01/06 01:24:56 pooka Exp $	*/
+/*	$NetBSD: random.S,v 1.5 2013/07/18 12:16:40 matt Exp $	*/
 
 /*
  * Copyright (c) 1990,1993 The Regents of the University of California.
@@ -48,22 +48,14 @@ ASLOCAL(randseed)
 
 ENTRY(random)
 	movl	#16807, %d0
-#ifdef PIC
-	lea	%pc@(_GLOBAL_OFFSET_TABLE_@GOTPC), %a0
-	movl	_ASM_LABEL(randseed)@GOT(%a0), %d2
-	mulsl	(%d2), %d1:%d0
-#else
-	mulsl	_ASM_LABEL(randseed), %d1:%d0
-#endif
+	LEA_LCL(_ASM_LABEL(randseed),%a0)
+	mulsl	(%a0), %d1:%d0
 	lsll	#1, %d0
 	roxll	#2, %d1
 	addl	%d1, %d0
 	moveql	#1, %d1
 	addxl	%d1, %d0
 	lsrl	#1, %d0
-#ifdef PIC
-	movl	%d0, (%d2)
-#else
-	movl	%d0, _ASM_LABEL(randseed)
-#endif
+	movl	%d0, (%a0)
 	rts
+END(random)



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:29:30 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: skpc.S

Log Message:
Convert to morotola syntax


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/lib/libkern/arch/m68k/skpc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/skpc.S
diff -u src/sys/lib/libkern/arch/m68k/skpc.S:1.6 src/sys/lib/libkern/arch/m68k/skpc.S:1.7
--- src/sys/lib/libkern/arch/m68k/skpc.S:1.6	Tue Feb  8 20:20:27 2011
+++ src/sys/lib/libkern/arch/m68k/skpc.S	Thu Jul 18 12:29:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: skpc.S,v 1.6 2011/02/08 20:20:27 rmind Exp $	*/
+/*	$NetBSD: skpc.S,v 1.7 2013/07/18 12:29:30 matt Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,13 +44,13 @@
  *	skpc(mask, count, startc)
  */
 ENTRY(skpc)
-	movl	%sp@(8),%d0	| get length
+	movl	8(%sp),%d0	| get length
 	jeq	Lskdone		| nothing to do, return
-	movb	%sp@(7),%d1	| mask to use
-	movl	%sp@(12),%a0	| where to start
+	movb	7(%sp),%d1	| mask to use
+	movl	12(%sp),%a0	| where to start
 	subqw	#1,%d0		| adjust for dbcc
 Lskloop:
-	cmpb	%a0@+,%d1	| compate with mask
+	cmpb	(%a0)+,%d1	| compate with mask
 	dbne	%d0,Lskloop	| keep going til no more or zero
 	addqw	#1,%d0		| overshot by one
 Lskdone:



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:40:42 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: scanc.S

Log Message:
Convert to motorola syntax


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/lib/libkern/arch/m68k/scanc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/scanc.S
diff -u src/sys/lib/libkern/arch/m68k/scanc.S:1.6 src/sys/lib/libkern/arch/m68k/scanc.S:1.7
--- src/sys/lib/libkern/arch/m68k/scanc.S:1.6	Tue Feb  8 20:20:27 2011
+++ src/sys/lib/libkern/arch/m68k/scanc.S	Thu Jul 18 12:40:42 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: scanc.S,v 1.6 2011/02/08 20:20:27 rmind Exp $	*/
+/*	$NetBSD: scanc.S,v 1.7 2013/07/18 12:40:42 matt Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,20 +44,20 @@
  *	scanc(count, startc, table, mask)
  */
 ENTRY(scanc)
-	movl	%sp@(4),%d0	| get length
+	movl	4(%sp),%d0	| get length
 	jeq	Lscdone		| nothing to do, return
-	movl	%sp@(8),%a0	| start of scan
-	movl	%sp@(12),%a1	| table to compare with
-	movb	%sp@(19),%d1	| and mask to use
-	movw	%d2,%sp@-	| need a scratch register
+	movl	8(%sp),%a0	| start of scan
+	movl	12(%sp),%a1	| table to compare with
+	movb	19(%sp),%d1	| and mask to use
+	movw	%d2,-(%sp)	| need a scratch register
 	clrw	%d2		| clear it out
 	subqw	#1,%d0		| adjust for dbra
 Lscloop:
-	movb	%a0@+,%d2	| get character
-	movb	%a1@(0,%d2:w),%d2 | get table entry
+	movb	(%a0)+,%d2	| get character
+	movb	(%a1,%d2:w),%d2	| get table entry
 	andb	%d1,%d2		| mask it
 	dbne	%d0,Lscloop	| keep going til no more or non-zero
 	addqw	#1,%d0		| overshot by one
-	movw	%sp@+,%d2	| restore scratch
+	movw	(%sp)+,%d2	| restore scratch
 Lscdone:
 	rts



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:42:24 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: scanc.S

Log Message:
Keep stack longword aligned.
Use longword ops for %d2.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libkern/arch/m68k/scanc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/scanc.S
diff -u src/sys/lib/libkern/arch/m68k/scanc.S:1.7 src/sys/lib/libkern/arch/m68k/scanc.S:1.8
--- src/sys/lib/libkern/arch/m68k/scanc.S:1.7	Thu Jul 18 12:40:42 2013
+++ src/sys/lib/libkern/arch/m68k/scanc.S	Thu Jul 18 12:42:24 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: scanc.S,v 1.7 2013/07/18 12:40:42 matt Exp $	*/
+/*	$NetBSD: scanc.S,v 1.8 2013/07/18 12:42:24 matt Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -49,15 +49,15 @@ ENTRY(scanc)
 	movl	8(%sp),%a0	| start of scan
 	movl	12(%sp),%a1	| table to compare with
 	movb	19(%sp),%d1	| and mask to use
-	movw	%d2,-(%sp)	| need a scratch register
-	clrw	%d2		| clear it out
+	movl	%d2,-(%sp)	| need a scratch register
+	clrl	%d2		| clear it out
 	subqw	#1,%d0		| adjust for dbra
 Lscloop:
 	movb	(%a0)+,%d2	| get character
-	movb	(%a1,%d2:w),%d2	| get table entry
-	andb	%d1,%d2		| mask it
+	movb	(%a1,%d2),%d2	| get table entry
+	andl	%d1,%d2		| mask it
 	dbne	%d0,Lscloop	| keep going til no more or non-zero
 	addqw	#1,%d0		| overshot by one
-	movw	(%sp)+,%d2	| restore scratch
+	movl	(%sp)+,%d2	| restore scratch
 Lscdone:
 	rts



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:53:09 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
Reorder a little to make clearer.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/Makefile.inc
diff -u src/sys/lib/libkern/arch/m68k/Makefile.inc:1.30 src/sys/lib/libkern/arch/m68k/Makefile.inc:1.31
--- src/sys/lib/libkern/arch/m68k/Makefile.inc:1.30	Fri Aug 14 19:23:54 2009
+++ src/sys/lib/libkern/arch/m68k/Makefile.inc	Thu Jul 18 12:53:09 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.30 2009/08/14 19:23:54 dsl Exp $
+#	$NetBSD: Makefile.inc,v 1.31 2013/07/18 12:53:09 matt Exp $
 
 SRCS+=	bswap16.S bswap32.S bswap64.S
 SRCS+=	memcmp.S memcpy.S memmove.S memset.S
@@ -10,7 +10,9 @@ SRCS+=	ffs.S
 
 .if defined(MACHINE_ARCH)  (${MACHINE_ARCH} == m68000)
 SRCS+=	mulsi3.S divsi3.S udivsi3.S modsi3.S umodsi3.S
-random.o random.d: random.c
-.else
+.endif
+.if defined(MACHINE_ARCH)  ${MACHINE_ARCH} == m68k
 SRCS+=	random.S
+.else
+random.o random.po random.pico random.d: random.c
 .endif



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:54:08 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: skpc.S

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libkern/arch/m68k/skpc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/skpc.S
diff -u src/sys/lib/libkern/arch/m68k/skpc.S:1.7 src/sys/lib/libkern/arch/m68k/skpc.S:1.8
--- src/sys/lib/libkern/arch/m68k/skpc.S:1.7	Thu Jul 18 12:29:30 2013
+++ src/sys/lib/libkern/arch/m68k/skpc.S	Thu Jul 18 12:54:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: skpc.S,v 1.7 2013/07/18 12:29:30 matt Exp $	*/
+/*	$NetBSD: skpc.S,v 1.8 2013/07/18 12:54:08 matt Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -50,7 +50,7 @@ ENTRY(skpc)
 	movl	12(%sp),%a0	| where to start
 	subqw	#1,%d0		| adjust for dbcc
 Lskloop:
-	cmpb	(%a0)+,%d1	| compate with mask
+	cmpb	(%a0)+,%d1	| compare with mask
 	dbne	%d0,Lskloop	| keep going til no more or zero
 	addqw	#1,%d0		| overshot by one
 Lskdone:



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 22:14:48 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: scanc.S skpc.S

Log Message:
Adjust for coldfire


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libkern/arch/m68k/scanc.S \
src/sys/lib/libkern/arch/m68k/skpc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/scanc.S
diff -u src/sys/lib/libkern/arch/m68k/scanc.S:1.8 src/sys/lib/libkern/arch/m68k/scanc.S:1.9
--- src/sys/lib/libkern/arch/m68k/scanc.S:1.8	Thu Jul 18 12:42:24 2013
+++ src/sys/lib/libkern/arch/m68k/scanc.S	Thu Jul 18 22:14:48 2013
@@ -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 @@ ENTRY(scanc)
 	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
Index: src/sys/lib/libkern/arch/m68k/skpc.S
diff -u src/sys/lib/libkern/arch/m68k/skpc.S:1.8 src/sys/lib/libkern/arch/m68k/skpc.S:1.9
--- src/sys/lib/libkern/arch/m68k/skpc.S:1.8	Thu Jul 18 12:54:08 2013
+++ src/sys/lib/libkern/arch/m68k/skpc.S	Thu Jul 18 22:14:48 2013
@@ -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 @@ ENTRY(skpc)
 	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



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:16:40 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: random.S

Log Message:
Don't use %d2 (violates the ABI since it wasn't saved), use %a0 instead.
Use a pcrelative access for the local data avoiding the GOT.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libkern/arch/m68k/random.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:29:30 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: skpc.S

Log Message:
Convert to morotola syntax


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/lib/libkern/arch/m68k/skpc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:40:42 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: scanc.S

Log Message:
Convert to motorola syntax


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/lib/libkern/arch/m68k/scanc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:42:24 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: scanc.S

Log Message:
Keep stack longword aligned.
Use longword ops for %d2.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libkern/arch/m68k/scanc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:53:09 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
Reorder a little to make clearer.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 12:54:08 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: skpc.S

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libkern/arch/m68k/skpc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2013-07-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 18 22:14:48 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/m68k: scanc.S skpc.S

Log Message:
Adjust for coldfire


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libkern/arch/m68k/scanc.S \
src/sys/lib/libkern/arch/m68k/skpc.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/lib/libkern/arch/m68k

2009-08-12 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Aug 12 21:24:57 UTC 2009

Modified Files:
src/sys/lib/libkern/arch/m68k: Makefile.inc

Log Message:
Remove some .c files accidentally left on the .S lines


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/lib/libkern/arch/m68k/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arch/m68k/Makefile.inc
diff -u src/sys/lib/libkern/arch/m68k/Makefile.inc:1.28 src/sys/lib/libkern/arch/m68k/Makefile.inc:1.29
--- src/sys/lib/libkern/arch/m68k/Makefile.inc:1.28	Wed Aug 12 21:20:40 2009
+++ src/sys/lib/libkern/arch/m68k/Makefile.inc	Wed Aug 12 21:24:57 2009
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile.inc,v 1.28 2009/08/12 21:20:40 dsl Exp $
+#	$NetBSD: Makefile.inc,v 1.29 2009/08/12 21:24:57 dsl Exp $
 
 SRCS+=	bswap16.S bswap32.S bswap64.S
-SRCS+=	memchr.c memcmp.S memcpy.S memmove.S memset.S
-SRCS+=	strcat.S strchr.S strcmp.S strcasecmp.c
-SRCS+=	strcpy.S strlen.S strncmp.S strncasecmp.c strncpy.S strrchr.S
+SRCS+=	memcmp.S memcpy.S memmove.S memset.S
+SRCS+=	strcat.S strchr.S strcmp.S
+SRCS+=	strcpy.S strlen.S strncmp.S strncpy.S strrchr.S
 SRCS+=	scanc.S skpc.S
 SRCS+=	htonl.S htons.S ntohl.S ntohs.S
 SRCS+=	ffs.S