CVS commit: src/sys/lib/libkern/arch/powerpc
Module Name:src Committed By: rin Date: Sat Jul 24 05:29:26 UTC 2021 Modified Files: src/sys/lib/libkern/arch/powerpc: Makefile.inc Log Message: For evbppc, use C version of memcpy(3), memcmp(3), and memmove(3) consistently for *.{po,pico,go} (for RUMP), in order to avoid alignment faults for 403. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/lib/libkern/arch/powerpc/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/powerpc/Makefile.inc diff -u src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.31 src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.32 --- src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.31 Sat Jul 2 03:35:03 2011 +++ src/sys/lib/libkern/arch/powerpc/Makefile.inc Sat Jul 24 05:29:26 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.31 2011/07/02 03:35:03 matt Exp $ +# $NetBSD: Makefile.inc,v 1.32 2021/07/24 05:29:26 rin Exp $ SRCS+= bswap16.c bswap32.c SRCS+= htonl.c htons.c ntohl.c ntohs.c @@ -9,7 +9,9 @@ SRCS+= gprsavrest.S # Disable the asm versions on evbppc because they break the Explora .if ${MACHINE} == "evbppc" -memcpy.o: memcpy.c -memcmp.o: memcmp.c -memmove.o: memmove.c +. for name in memcmp memcpy memmove +.for suffix in o po pico go +${name}.${suffix}: ${name}.c +.endfor +. endfor .endif
CVS commit: src/sys/lib/libkern/arch/m68k
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
CVS commit: src/sys/lib/libkern/arch/m68k
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
Module Name:src Committed By: ad Date: Mon Jan 27 22:06:13 UTC 2020 Modified Files: src/sys/lib/libkern/arch/i386: Makefile.inc src/sys/lib/libkern/arch/x86_64: Makefile.inc Log Message: Make x86 use the C version of memcmp(). To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/lib/libkern/arch/i386/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/sys/lib/libkern/arch/x86_64/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/i386/Makefile.inc diff -u src/sys/lib/libkern/arch/i386/Makefile.inc:1.31 src/sys/lib/libkern/arch/i386/Makefile.inc:1.32 --- src/sys/lib/libkern/arch/i386/Makefile.inc:1.31 Fri Aug 14 19:23:53 2009 +++ src/sys/lib/libkern/arch/i386/Makefile.inc Mon Jan 27 22:06:13 2020 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.31 2009/08/14 19:23:53 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.32 2020/01/27 22:06:13 ad Exp $ SRCS+= byte_swap_2.S byte_swap_4.S ffs.S -SRCS+= memchr.S memcmp.S memcpy.S memmove.S memset.S +SRCS+= memchr.S memcpy.S memmove.S memset.S SRCS+= random.S SRCS+= strcat.S strchr.S strcmp.S SRCS+= strcpy.S strlen.S Index: src/sys/lib/libkern/arch/x86_64/Makefile.inc diff -u src/sys/lib/libkern/arch/x86_64/Makefile.inc:1.6 src/sys/lib/libkern/arch/x86_64/Makefile.inc:1.7 --- src/sys/lib/libkern/arch/x86_64/Makefile.inc:1.6 Thu Jan 14 02:09:46 2010 +++ src/sys/lib/libkern/arch/x86_64/Makefile.inc Mon Jan 27 22:06:13 2020 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.6 2010/01/14 02:09:46 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.7 2020/01/27 22:06:13 ad Exp $ SRCS+= byte_swap_2.S byte_swap_4.S byte_swap_8.S SRCS+= ffs.S -SRCS+= memchr.S memcmp.S memcpy.S memmove.S memset.S +SRCS+= memchr.S memcpy.S memmove.S memset.S SRCS+= strcat.S strchr.S strcmp.S SRCS+= strcpy.S strlen.S SRCS+= strrchr.S
CVS commit: src/sys/lib/libkern/arch/aarch64
Module Name:src Committed By: ryo Date: Fri Mar 16 07:56:50 UTC 2018 Modified Files: src/sys/lib/libkern/arch/aarch64: Makefile.inc Log Message: use memmove.S To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libkern/arch/aarch64/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/aarch64/Makefile.inc diff -u src/sys/lib/libkern/arch/aarch64/Makefile.inc:1.1 src/sys/lib/libkern/arch/aarch64/Makefile.inc:1.2 --- src/sys/lib/libkern/arch/aarch64/Makefile.inc:1.1 Sun Aug 10 05:47:38 2014 +++ src/sys/lib/libkern/arch/aarch64/Makefile.inc Fri Mar 16 07:56:50 2018 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.1 2014/08/10 05:47:38 matt Exp $ +# $NetBSD: Makefile.inc,v 1.2 2018/03/16 07:56:50 ryo Exp $ SRCS+= byte_swap_2.S byte_swap_4.S byte_swap_8.S SRCS+= memcmp.S SRCS+= memcpy.S +SRCS+= memmove.S SRCS+= memset.S -#SRCS+= memmove.S #SRCS+= strcmp.S #SRCS+= strncmp.S
CVS commit: src/sys/lib/libkern/arch/x86_64
Module Name:src Committed By: maxv Date: Mon Oct 30 17:13:39 UTC 2017 Modified Files: src/sys/lib/libkern/arch/x86_64: random.S scanc.S skpc.S Log Message: Add END(). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/lib/libkern/arch/x86_64/random.S \ src/sys/lib/libkern/arch/x86_64/scanc.S \ src/sys/lib/libkern/arch/x86_64/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/x86_64/random.S diff -u src/sys/lib/libkern/arch/x86_64/random.S:1.2 src/sys/lib/libkern/arch/x86_64/random.S:1.3 --- src/sys/lib/libkern/arch/x86_64/random.S:1.2 Mon Apr 28 20:24:06 2008 +++ src/sys/lib/libkern/arch/x86_64/random.S Mon Oct 30 17:13:39 2017 @@ -1,6 +1,6 @@ -/* $NetBSD: random.S,v 1.2 2008/04/28 20:24:06 martin Exp $ */ +/* $NetBSD: random.S,v 1.3 2017/10/30 17:13:39 maxv Exp $ */ -/*- +/* * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * @@ -88,3 +88,4 @@ ENTRY(random) subl $0x7fff,%eax movl %eax,randseed(%rip) ret +END(random) Index: src/sys/lib/libkern/arch/x86_64/scanc.S diff -u src/sys/lib/libkern/arch/x86_64/scanc.S:1.2 src/sys/lib/libkern/arch/x86_64/scanc.S:1.3 --- src/sys/lib/libkern/arch/x86_64/scanc.S:1.2 Mon Apr 28 20:24:06 2008 +++ src/sys/lib/libkern/arch/x86_64/scanc.S Mon Oct 30 17:13:39 2017 @@ -1,6 +1,6 @@ -/* $NetBSD: scanc.S,v 1.2 2008/04/28 20:24:06 martin Exp $ */ +/* $NetBSD: scanc.S,v 1.3 2017/10/30 17:13:39 maxv Exp $ */ -/*- +/* * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * @@ -53,3 +53,4 @@ ENTRY(scanc) 2: movl %ecx,%eax ret +END(scanc) Index: src/sys/lib/libkern/arch/x86_64/skpc.S diff -u src/sys/lib/libkern/arch/x86_64/skpc.S:1.2 src/sys/lib/libkern/arch/x86_64/skpc.S:1.3 --- src/sys/lib/libkern/arch/x86_64/skpc.S:1.2 Mon Apr 28 20:24:06 2008 +++ src/sys/lib/libkern/arch/x86_64/skpc.S Mon Oct 30 17:13:39 2017 @@ -1,6 +1,6 @@ -/* $NetBSD: skpc.S,v 1.2 2008/04/28 20:24:06 martin Exp $ */ +/* $NetBSD: skpc.S,v 1.3 2017/10/30 17:13:39 maxv Exp $ */ -/*- +/* * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * @@ -47,3 +47,4 @@ ENTRY(skpc) 1: movl %ecx,%eax ret +END(skpc)
CVS commit: src/sys/lib/libkern/arch/ia64
Module Name:src Committed By: scole Date: Fri Aug 5 17:10:48 UTC 2016 Modified Files: src/sys/lib/libkern/arch/ia64: Makefile.inc Removed Files: src/sys/lib/libkern/arch/ia64: memcpy.S Log Message: PR port-ia64/51261 Use common/lib/libc/arch/ia64/string functions To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libkern/arch/ia64/Makefile.inc cvs rdiff -u -r1.1 -r0 src/sys/lib/libkern/arch/ia64/memcpy.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/ia64/Makefile.inc diff -u src/sys/lib/libkern/arch/ia64/Makefile.inc:1.4 src/sys/lib/libkern/arch/ia64/Makefile.inc:1.5 --- src/sys/lib/libkern/arch/ia64/Makefile.inc:1.4 Fri Aug 14 19:23:54 2009 +++ src/sys/lib/libkern/arch/ia64/Makefile.inc Fri Aug 5 17:10:48 2016 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.4 2009/08/14 19:23:54 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.5 2016/08/05 17:10:48 scole Exp $ # SRCS+= ffs.c SRCS+= divdi3.S divsi3.S modsi3.S moddi3.S udivdi3.S udivsi3.S SRCS+= umoddi3.S umodsi3.S bswap64.S bswap32.S bswap16.S ntohl.S htonl.S -SRCS+= memcpy.S +SRCS+= bcopy.S bzero.S ffs.S memcpy.S memmove.S
CVS commit: src/sys/lib/libkern/arch/m68k
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
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
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
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
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/hppa
Module Name:src Committed By: pooka Date: Thu Mar 13 16:09:11 UTC 2014 Modified Files: src/sys/lib/libkern/arch/hppa: Makefile.inc Log Message: remove compiler-rt duplicates to fix build To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libkern/arch/hppa/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/hppa/Makefile.inc diff -u src/sys/lib/libkern/arch/hppa/Makefile.inc:1.11 src/sys/lib/libkern/arch/hppa/Makefile.inc:1.12 --- src/sys/lib/libkern/arch/hppa/Makefile.inc:1.11 Tue Sep 22 09:57:16 2009 +++ src/sys/lib/libkern/arch/hppa/Makefile.inc Thu Mar 13 16:09:11 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.11 2009/09/22 09:57:16 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.12 2014/03/13 16:09:11 pooka Exp $ SRCS+= milli.S SRCS+= bcopy.S memcpy.S memmove.S @@ -8,5 +8,4 @@ SRCS+= bcopy.S memcpy.S memmove.S SRCS+= spcopy.S .endif -SRCS+= ashrdi3.c divdi3.c SRCS+= ffs.c bswap16.c bswap32.c
CVS commit: src/sys/lib/libkern/arch
Module Name:src Committed By: nakayama Date: Fri Mar 7 20:23:09 UTC 2014 Modified Files: src/sys/lib/libkern/arch/sparc: random.S src/sys/lib/libkern/arch/sparc64: random.S Log Message: Align explicitly to make kernels compiled by clang generate properly aligned code. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libkern/arch/sparc/random.S cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libkern/arch/sparc64/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/sparc/random.S diff -u src/sys/lib/libkern/arch/sparc/random.S:1.4 src/sys/lib/libkern/arch/sparc/random.S:1.5 --- src/sys/lib/libkern/arch/sparc/random.S:1.4 Thu Sep 12 15:36:17 2013 +++ src/sys/lib/libkern/arch/sparc/random.S Fri Mar 7 20:23:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: random.S,v 1.4 2013/09/12 15:36:17 joerg Exp $ */ +/* $NetBSD: random.S,v 1.5 2014/03/07 20:23:09 nakayama Exp $ */ /* * Copyright (c) 1990,1993 The Regents of the University of California. @@ -43,6 +43,7 @@ #include machine/asm.h .data + .align 4 randseed: .long 1 Index: src/sys/lib/libkern/arch/sparc64/random.S diff -u src/sys/lib/libkern/arch/sparc64/random.S:1.4 src/sys/lib/libkern/arch/sparc64/random.S:1.5 --- src/sys/lib/libkern/arch/sparc64/random.S:1.4 Thu Sep 12 15:36:17 2013 +++ src/sys/lib/libkern/arch/sparc64/random.S Fri Mar 7 20:23:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: random.S,v 1.4 2013/09/12 15:36:17 joerg Exp $ */ +/* $NetBSD: random.S,v 1.5 2014/03/07 20:23:09 nakayama Exp $ */ /* * Copyright (c) 1990,1993 The Regents of the University of California. @@ -43,6 +43,7 @@ #include machine/asm.h .data + .align 4 randseed: .long 1
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Wed Aug 21 08:30:18 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: clzsi2.S Log Message: Thumbify To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/lib/libkern/arch/arm/clzsi2.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/arm/clzsi2.S diff -u src/sys/lib/libkern/arch/arm/clzsi2.S:1.5 src/sys/lib/libkern/arch/arm/clzsi2.S:1.6 --- src/sys/lib/libkern/arch/arm/clzsi2.S:1.5 Sun Aug 11 04:58:01 2013 +++ src/sys/lib/libkern/arch/arm/clzsi2.S Wed Aug 21 08:30:18 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: clzsi2.S,v 1.5 2013/08/11 04:58:01 matt Exp $ */ +/* $NetBSD: clzsi2.S,v 1.6 2013/08/21 08:30:18 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -30,7 +30,6 @@ #include machine/asm.h .text -ENTRY(__clzdi2) #ifdef __ARMEB__ #define HI r0 #define LO r1 @@ -39,22 +38,26 @@ ENTRY(__clzdi2) #define LO r0 #endif #if defined(_ARM_ARCH_5) -#ifdef __thumb__ - cmp HI, #0 - beq 1f +#if defined(__thumb__) defined(_ARM_ARCH_T2) +ENTRY(__clzdi2) + cbz HI, 1f clz r0, HI /* count leading zeros in high word */ RET 1: clz r0, LO /* yes, count in low word */ - add r0, r0, #32 /* and add the bits in the high word */ + adds r0, r0, #32 /* and add the bits in the high word */ RET +END(__clzdi2) #else +ARM_ENTRY(__clzdi2) teq HI, #0 /* high word all zero? */ clzne r0, HI /* count leading zeros in high word */ clzeq r0, LO /* yes, count in low word */ addeq r0, r0, #32 /* and add the bits in the high word */ RET +END(__clzdi2) #endif #else +ARM_ENTRY(__clzdi2) movs r3, HI movne r0, #31 bne .L_clz @@ -63,14 +66,20 @@ ENTRY(__clzdi2) bne .L_clz mov r0, #64 RET -#endif END(__clzdi2) +#endif -ENTRY(__clzsi2) #if defined(_ARM_ARCH_5) +#if defined(_ARM_ARCH_7) +ENTRY(__clzsi2) +#else +ARM_ENTRY(__clzsi2) +#endif clz r0, r0 RET +END(__clzsi2) #else +ARM_ENTRY(__clzsi2) movs r3, r0 moveq r0, #32 RETc(eq) @@ -115,5 +124,5 @@ ENTRY(__clzsi2) #endif #endif /* __OPTIMIZE_SIZE__ */ RET -#endif /* _ARM_ARCH_5 */ END(__clzsi2) +#endif /* _ARM_ARCH_5 */
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Tue Aug 20 21:43:03 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: Makefile.inc Log Message: Some assembly files need to compiled -marm since they are Thumb compatible. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/lib/libkern/arch/arm/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/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.19 src/sys/lib/libkern/arch/arm/Makefile.inc:1.20 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.19 Mon Aug 12 23:22:12 2013 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Tue Aug 20 21:43:03 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.19 2013/08/12 23:22:12 matt Exp $ +# $NetBSD: Makefile.inc,v 1.20 2013/08/20 21:43:03 matt Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S @@ -9,5 +9,17 @@ SRCS+= modsi3.S umodsi3.S .if !empty(MACHINE_ARCH:Mearm*) SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S __aeabi_lcmp.c __aeabi_ulcmp.c SRCS+= unwind_stub.c -.else +.endif +.if empty(MACHINE_ARCH:Mearmv7*) +CPUFLAGS.ffs.S+= -marm +.endif +CPUFLAGS.divide.S+= -marm +CPUFLAGS.memcmp.S+= -marm +CPUFLAGS.memcpy.S+= -marm +CPUFLAGS.memmove.S+= -marm +CPUFLAGS.memset.S+= -marm +.if empty(CPPFLAGS:M-D_STANDALONE) +CPUFLAGS.strcpy.S+= -marm +CPUFLAGS.strlcpy.S+= -marm +CPUFLAGS.strncpy.S+= -marm .endif
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Mon Aug 12 23:42:14 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: unwind_stub.c Log Message: Fix typos (prX not cpX) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libkern/arch/arm/unwind_stub.c 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/arm/unwind_stub.c diff -u src/sys/lib/libkern/arch/arm/unwind_stub.c:1.1 src/sys/lib/libkern/arch/arm/unwind_stub.c:1.2 --- src/sys/lib/libkern/arch/arm/unwind_stub.c:1.1 Mon Aug 12 23:22:12 2013 +++ src/sys/lib/libkern/arch/arm/unwind_stub.c Mon Aug 12 23:42:14 2013 @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: unwind_stub.c,v 1.1 2013/08/12 23:22:12 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: unwind_stub.c,v 1.2 2013/08/12 23:42:14 matt Exp $); #include arm/ehabi.h @@ -39,6 +39,6 @@ __aeabi_unwind_cpp_stub(_Unwind_State st return _URC_FAILURE; } -__weak_alias(__aeabi_unwind_cpp_cp0, __aeabi_unwind_cpp_stub) -__weak_alias(__aeabi_unwind_cpp_cp1, __aeabi_unwind_cpp_stub) -__weak_alias(__aeabi_unwind_cpp_cp2, __aeabi_unwind_cpp_stub) +__weak_alias(__aeabi_unwind_cpp_pr0, __aeabi_unwind_cpp_stub) +__weak_alias(__aeabi_unwind_cpp_pr1, __aeabi_unwind_cpp_stub) +__weak_alias(__aeabi_unwind_cpp_pr2, __aeabi_unwind_cpp_stub)
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Sun Aug 11 04:58:01 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: clzsi2.S Log Message: Support thumb To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libkern/arch/arm/clzsi2.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/arm/clzsi2.S diff -u src/sys/lib/libkern/arch/arm/clzsi2.S:1.4 src/sys/lib/libkern/arch/arm/clzsi2.S:1.5 --- src/sys/lib/libkern/arch/arm/clzsi2.S:1.4 Sat Sep 1 11:24:36 2012 +++ src/sys/lib/libkern/arch/arm/clzsi2.S Sun Aug 11 04:58:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: clzsi2.S,v 1.4 2012/09/01 11:24:36 matt Exp $ */ +/* $NetBSD: clzsi2.S,v 1.5 2013/08/11 04:58:01 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -39,11 +39,21 @@ ENTRY(__clzdi2) #define LO r0 #endif #if defined(_ARM_ARCH_5) +#ifdef __thumb__ + cmp HI, #0 + beq 1f + clz r0, HI /* count leading zeros in high word */ + RET +1: clz r0, LO /* yes, count in low word */ + add r0, r0, #32 /* and add the bits in the high word */ + RET +#else teq HI, #0 /* high word all zero? */ clzne r0, HI /* count leading zeros in high word */ clzeq r0, LO /* yes, count in low word */ addeq r0, r0, #32 /* and add the bits in the high word */ RET +#endif #else movs r3, HI movne r0, #31
CVS commit: src/sys/lib/libkern/arch/m68k
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
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
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
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
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
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
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/arm
Module Name:src Committed By: matt Date: Thu Jun 20 07:29:50 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: Makefile.inc Log Message: modsi3/umodsi3 are only needed !EABI arm To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/lib/libkern/arch/arm/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/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.16 src/sys/lib/libkern/arch/arm/Makefile.inc:1.17 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.16 Thu May 2 03:56:42 2013 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Thu Jun 20 07:29:50 2013 @@ -1,10 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.16 2013/05/02 03:56:42 matt Exp $ +# $NetBSD: Makefile.inc,v 1.17 2013/06/20 07:29:50 matt Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S -SRCS+= divsi3.S udivsi3.S divide.S clzsi2.S modsi3.S umodsi3.S +SRCS+= divsi3.S udivsi3.S divide.S clzsi2.S SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S .if !empty(MACHINE_ARCH:Mearm*) SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S __aeabi_lcmp.c __aeabi_ulcmp.c +.else +SRCS+= modsi3.S umodsi3.S .endif
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Fri Jun 21 05:06:24 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: Makefile.inc Log Message: Add back {,u}modsi3 for libkern since if we are building standalone tools we might be using the old ABI and might need them. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/lib/libkern/arch/arm/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/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.17 src/sys/lib/libkern/arch/arm/Makefile.inc:1.18 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.17 Thu Jun 20 07:29:50 2013 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Fri Jun 21 05:06:24 2013 @@ -1,12 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.17 2013/06/20 07:29:50 matt Exp $ +# $NetBSD: Makefile.inc,v 1.18 2013/06/21 05:06:24 matt Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S SRCS+= divsi3.S udivsi3.S divide.S clzsi2.S SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S +SRCS+= modsi3.S umodsi3.S .if !empty(MACHINE_ARCH:Mearm*) SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S __aeabi_lcmp.c __aeabi_ulcmp.c .else -SRCS+= modsi3.S umodsi3.S .endif
CVS commit: src/sys/lib/libkern/arch/sparc
Module Name:src Committed By: nakayama Date: Sun Mar 17 04:45:47 UTC 2013 Modified Files: src/sys/lib/libkern/arch/sparc: Makefile.inc Log Message: Revert previous. christos fixed the root cause. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/lib/libkern/arch/sparc/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/sparc/Makefile.inc diff -u src/sys/lib/libkern/arch/sparc/Makefile.inc:1.35 src/sys/lib/libkern/arch/sparc/Makefile.inc:1.36 --- src/sys/lib/libkern/arch/sparc/Makefile.inc:1.35 Thu Mar 14 11:53:34 2013 +++ src/sys/lib/libkern/arch/sparc/Makefile.inc Sun Mar 17 04:45:46 2013 @@ -1,10 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.35 2013/03/14 11:53:34 nakayama Exp $ +# $NetBSD: Makefile.inc,v 1.36 2013/03/17 04:45:46 nakayama Exp $ SRCS+= ffs.S -.if (${MACHINE} != sparc64) || defined(RUMPTOP) -# provided by memcpyset.s on sparc64 32-bit kernel SRCS+= memset.S -.endif SRCS+= strlen.S SRCS+= htonl.S htons.S ntohl.S ntohs.S SRCS+= random.S
CVS commit: src/sys/lib/libkern/arch/sparc64
Module Name:src Committed By: nakayama Date: Sun Mar 17 04:47:17 UTC 2013 Modified Files: src/sys/lib/libkern/arch/sparc64: Makefile.inc Log Message: Remove duplicate source files. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/lib/libkern/arch/sparc64/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/sparc64/Makefile.inc diff -u src/sys/lib/libkern/arch/sparc64/Makefile.inc:1.10 src/sys/lib/libkern/arch/sparc64/Makefile.inc:1.11 --- src/sys/lib/libkern/arch/sparc64/Makefile.inc:1.10 Fri Aug 14 19:23:55 2009 +++ src/sys/lib/libkern/arch/sparc64/Makefile.inc Sun Mar 17 04:47:16 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.10 2009/08/14 19:23:55 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.11 2013/03/17 04:47:16 nakayama Exp $ SRCS+= ffs.S SRCS+= strlen.S @@ -7,7 +7,6 @@ SRCS+= random.S SRCS+= bswap16.c bswap32.c -SRCS+= umul.S mul.S rem.S sdiv.S udiv.S umul.S urem.S SRCS+= mul.S saveregs.S umul.S # `source' files built from m4 source
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Wed Feb 6 07:18:17 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: Makefile.inc Log Message: Modify earm rule to match any machine_arch starting with earm. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/lib/libkern/arch/arm/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/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.14 src/sys/lib/libkern/arch/arm/Makefile.inc:1.15 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.14 Wed Jan 23 22:34:37 2013 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Wed Feb 6 07:18:15 2013 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile.inc,v 1.14 2013/01/23 22:34:37 matt Exp $ +# $NetBSD: Makefile.inc,v 1.15 2013/02/06 07:18:15 matt Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S SRCS+= divsi3.S udivsi3.S divide.S clzsi2.S modsi3.S umodsi3.S SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S -.if ${MACHINE_ARCH} == earm || ${MACHINE_ARCH} == earmeb +.if ${MACHINE_ARCH:Mearm*} != SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S __aeabi_lcmp.c __aeabi_ulcmp.c .endif
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: macallan Date: Wed Jan 23 20:38:28 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: Makefile.inc Log Message: pull in strnlen.S To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/lib/libkern/arch/arm/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/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.12 src/sys/lib/libkern/arch/arm/Makefile.inc:1.13 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.12 Tue Oct 30 16:36:03 2012 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Wed Jan 23 20:38:27 2013 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.12 2012/10/30 16:36:03 christos Exp $ +# $NetBSD: Makefile.inc,v 1.13 2013/01/23 20:38:27 macallan Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S SRCS+= divsi3.S udivsi3.S divide.S clzsi2.S modsi3.S umodsi3.S -SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S +SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S strnlen.S .if ${MACHINE_ARCH} == earm || ${MACHINE_ARCH} == earmeb SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S __aeabi_lcmp.c __aeabi_ulcmp.c
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: christos Date: Tue Oct 30 16:36:03 UTC 2012 Modified Files: src/sys/lib/libkern/arch/arm: Makefile.inc Log Message: add new divsi3 related files. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libkern/arch/arm/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/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.11 src/sys/lib/libkern/arch/arm/Makefile.inc:1.12 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.11 Tue Oct 9 22:15:31 2012 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Tue Oct 30 12:36:03 2012 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.11 2012/10/10 02:15:31 christos Exp $ +# $NetBSD: Makefile.inc,v 1.12 2012/10/30 16:36:03 christos Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S -SRCS+= divsi3.S clzsi2.S modsi3.S umodsi3.S +SRCS+= divsi3.S udivsi3.S divide.S clzsi2.S modsi3.S umodsi3.S SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S .if ${MACHINE_ARCH} == earm || ${MACHINE_ARCH} == earmeb
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Mon Aug 6 02:14:57 UTC 2012 Modified Files: src/sys/lib/libkern/arch/arm: Makefile.inc Log Message: If earm*, compile new aeabi runtime routines. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/lib/libkern/arch/arm/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/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.9 src/sys/lib/libkern/arch/arm/Makefile.inc:1.10 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.9 Fri Aug 14 19:23:53 2009 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Mon Aug 6 02:14:57 2012 @@ -1,6 +1,10 @@ -# $NetBSD: Makefile.inc,v 1.9 2009/08/14 19:23:53 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.10 2012/08/06 02:14:57 matt Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S SRCS+= divsi3.S clzsi2.S SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S + +.if ${MACHINE_ARCH} == earm || ${MACHINE_ARCH} == earmeb +SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S __aeabi_lcmp.c __aeabi_ulcmp.c +.endif
CVS commit: src/sys/lib/libkern/arch/powerpc
Module Name:src Committed By: christos Date: Fri Oct 28 02:00:50 UTC 2011 Modified Files: src/sys/lib/libkern/arch/powerpc: gprsavrest.S Log Message: shouldn't need .size for ppc64. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libkern/arch/powerpc/gprsavrest.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/powerpc/gprsavrest.S diff -u src/sys/lib/libkern/arch/powerpc/gprsavrest.S:1.3 src/sys/lib/libkern/arch/powerpc/gprsavrest.S:1.4 --- src/sys/lib/libkern/arch/powerpc/gprsavrest.S:1.3 Fri Aug 12 10:48:00 2011 +++ src/sys/lib/libkern/arch/powerpc/gprsavrest.S Thu Oct 27 22:00:50 2011 @@ -29,23 +29,28 @@ #include powerpc/asm.h -__RCSID($NetBSD: gprsavrest.S,v 1.3 2011/08/12 14:48:00 matt Exp $) +__RCSID($NetBSD: gprsavrest.S,v 1.4 2011/10/28 02:00:50 christos Exp $) #ifndef RESTGPR -#define RESTGPR(n) RESTOREXGPR(_restgpr_,n,_x) -#define RESTGPR_END(n) RESTOREXGPR_END(_restgpr_,n,_x) -#define SAVEGPR(n) SAVEXGPR(_savegpr_,n,) -#define SAVEGPR_END(n) SAVEXGPR_END(_savegpr_,n,) +# define RESTGPR(n) RESTOREXGPR(_restgpr_,n,_x) +# define RESTGPR_END(n) RESTOREXGPR_END(_restgpr_,n,_x) +# define SAVEGPR(n) SAVEXGPR(_savegpr_,n,) +# define SAVEGPR_END(n) SAVEXGPR_END(_savegpr_,n,) #endif #define RESTOREXGPR(a,n,b) \ .hidden a##n##b; ENTRY_NOPROFILE(a##n##b); lwz n,(-4*(32-n))(11) -#define RESTOREXGPR_END(a,n,b) \ - .size a##n##b,.-a##n##b #define SAVEXGPR(a,n,b) \ .hidden a##n##b; ENTRY_NOPROFILE(a##n##b); stw n,(-4*(32-n))(11) -#define SAVEXGPR_END(a,n,b) \ +#ifdef _LP64 +# define SAVEXGPR_END(a,n,b) +# define RESTOREXGPR_END(a,n,b) +#else +# define SAVEXGPR_END(a,n,b) \ + .size a##n##b,.-a##n##b +# define RESTOREXGPR_END(a,n,b) \ .size a##n##b,.-a##n##b +#endif RESTGPR(14) RESTGPR(15)
CVS commit: src/sys/lib/libkern/arch/powerpc
Module Name:src Committed By: matt Date: Fri Aug 12 14:48:00 UTC 2011 Modified Files: src/sys/lib/libkern/arch/powerpc: gprsavrest.S Log Message: Fix bug when only restoring r31 (lr was not being restored properly). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/lib/libkern/arch/powerpc/gprsavrest.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/powerpc/gprsavrest.S diff -u src/sys/lib/libkern/arch/powerpc/gprsavrest.S:1.2 src/sys/lib/libkern/arch/powerpc/gprsavrest.S:1.3 --- src/sys/lib/libkern/arch/powerpc/gprsavrest.S:1.2 Sat Jul 2 23:36:02 2011 +++ src/sys/lib/libkern/arch/powerpc/gprsavrest.S Fri Aug 12 14:48:00 2011 @@ -29,7 +29,7 @@ #include powerpc/asm.h -__RCSID($NetBSD: gprsavrest.S,v 1.2 2011/07/02 23:36:02 mrg Exp $) +__RCSID($NetBSD: gprsavrest.S,v 1.3 2011/08/12 14:48:00 matt Exp $) #ifndef RESTGPR #define RESTGPR(n) RESTOREXGPR(_restgpr_,n,_x) @@ -64,8 +64,8 @@ RESTGPR(28) RESTGPR(29) RESTGPR(30) - lwz 0,4(11) RESTGPR(31) + lwz 0,4(11) mtlr 0 mr 1,11 blr
CVS commit: src/sys/lib/libkern/arch/sh3
Module Name:src Committed By: uwe Date: Fri Aug 5 01:59:40 UTC 2011 Modified Files: src/sys/lib/libkern/arch/sh3: sdivsi3.S udivsi3.S Log Message: Reword the comment about millicode nature of these functions and add it to sdivsi3.S too. Remove !_KERNEL code left over from the days when we shared these files with userland. Use .L prefix for local label. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libkern/arch/sh3/sdivsi3.S cvs rdiff -u -r1.10 -r1.11 src/sys/lib/libkern/arch/sh3/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/sh3/sdivsi3.S diff -u src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.11 src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.12 --- src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.11 Thu Jul 14 09:48:03 2011 +++ src/sys/lib/libkern/arch/sh3/sdivsi3.S Fri Aug 5 01:59:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sdivsi3.S,v 1.11 2011/07/14 09:48:03 mrg Exp $ */ +/* $NetBSD: sdivsi3.S,v 1.12 2011/08/05 01:59:39 uwe Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,9 +36,26 @@ #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: sdivsi3.S,v 1.11 2011/07/14 09:48:03 mrg Exp $) + RCSID($NetBSD: sdivsi3.S,v 1.12 2011/08/05 01:59:39 uwe Exp $) #endif +/* + * IMPOTANT: This function is special. + * + * This function is an auxiliary millicode function that is + * referenced by the code generated by gcc for signed integer + * division. But gcc does NOT treat a call to this function as an + * ordinary function call - it can clobber only R1, R2 and R3. + * + * See the definition of divsi3_i1 in gcc/config/sh/sh.md + * + * As the consequence this function cannot be called via any + * indirection that assumes normal calling convention: + * + * . cannot have _PROF_PROLOGUE + * . cannot be called via PLT (not relevant for kernel) + */ + #ifdef __ELF__ .hidden __sdivsi3 @@ -51,7 +68,7 @@ mov r5, r1 tst r1, r1 - bt div_by_zero + bt .L_div_by_zero mov #0, r2 div0s r2, r0 @@ -70,33 +87,6 @@ rts addc r2, r0 -div_by_zero: -#ifdef _KERNEL +.L_div_by_zero: rts mov #0, r0 -#else - mov.l r14, @-r15 - sts.l pr, @-r15 - mov r15, r14 - - mov.l L_raise, r1 -#ifdef PIC -1: bsrf r1 -#else - jsr @r1 -#endif - mov #8, r4 /* delay slot. 8 - SIGFPE. */ - mov #0, r0 - - lds.l @r15+, pr - rts - mov.l @r15+, r14 - - .align 2 -L_raise: -#ifdef PIC - .long _C_LABEL(raise)-(1b+4) -#else - .long _C_LABEL(raise) -#endif -#endif Index: src/sys/lib/libkern/arch/sh3/udivsi3.S diff -u src/sys/lib/libkern/arch/sh3/udivsi3.S:1.10 src/sys/lib/libkern/arch/sh3/udivsi3.S:1.11 --- src/sys/lib/libkern/arch/sh3/udivsi3.S:1.10 Thu Jul 14 09:48:04 2011 +++ src/sys/lib/libkern/arch/sh3/udivsi3.S Fri Aug 5 01:59:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: udivsi3.S,v 1.10 2011/07/14 09:48:04 mrg Exp $ */ +/* $NetBSD: udivsi3.S,v 1.11 2011/08/05 01:59:39 uwe Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,26 +36,24 @@ #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: udivsi3.S,v 1.10 2011/07/14 09:48:04 mrg Exp $) + RCSID($NetBSD: udivsi3.S,v 1.11 2011/08/05 01:59:39 uwe Exp $) #endif /* * IMPOTANT: This function is special. * - * This function is an auxiliary function that is referenced by the - * code generated by gcc for integer division. But gcc does NOT treat - * a call to this function as an ordinary function call w.r.t. the set - * of register this call clobbers. See the definition of udivsi3_i1 - * in gcc/config/sh/sh.md. - * - * Any call to this function MUST NOT clobber any registers besides r4 - * and r0, where the result is returned. At the time of the call the - * r4 contains the first argument, so we are only left with r0, and we - * cannot do anything meaningful using only one register. The - * consequences are: + * This function is an auxiliary millicode function that is + * referenced by the code generated by gcc for unsigned integer + * division. But gcc does NOT treat a call to this function as an + * ordinary function call - it can clobber only R4. * - * . this function cannot have _PROF_PROLOGUE - * . this function cannot be called via PLT + * See the definition of udivsi3_i1 in gcc/config/sh/sh.md + * + * As the consequence this function cannot be called via any + * indirection that assumes normal calling convention: + * + * . cannot have _PROF_PROLOGUE + * . cannot be called via PLT (not relevant for kernel) */ @@ -67,7 +65,7 @@ /* r0 = r4 / r5 */ NENTRY(__udivsi3) tst r5, r5 - bt div_by_zero + bt .L_div_by_zero mov #0, r0 div0u @@ -83,33 +81,6 @@ rts mov r4, r0 -div_by_zero: -#ifdef _KERNEL +.L_div_by_zero: rts mov #0, r0 -#else - mov.l r14, @-r15 - sts.l pr, @-r15 - mov r15, r14 - - mov.l L_raise, r1 -#ifdef PIC -1: bsrf r1 -#else - jsr @r1 -#endif - mov #8, r4 /* delay slot. 8 -
CVS commit: src/sys/lib/libkern/arch/sh3
Module Name:src Committed By: uwe Date: Fri Aug 5 02:00:25 UTC 2011 Modified Files: src/sys/lib/libkern/arch/sh3: sdivsi3_i4i.S udivsi3_i4i.S Log Message: Reword the comment about millicode nature of these functions and add it to sdivsi3_i4i.S too. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S \ src/sys/lib/libkern/arch/sh3/udivsi3_i4i.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/sh3/sdivsi3_i4i.S diff -u src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S:1.1 src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S:1.2 --- src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S:1.1 Thu Aug 4 03:20:09 2011 +++ src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S Fri Aug 5 02:00:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sdivsi3_i4i.S,v 1.1 2011/08/04 03:20:09 uwe Exp $ */ +/* $NetBSD: sdivsi3_i4i.S,v 1.2 2011/08/05 02:00:25 uwe Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,10 +36,33 @@ #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: sdivsi3_i4i.S,v 1.1 2011/08/04 03:20:09 uwe Exp $) + RCSID($NetBSD: sdivsi3_i4i.S,v 1.2 2011/08/05 02:00:25 uwe Exp $) #endif -/* See comments in udivsi3_i4i.S */ +/* + * IMPOTANT: This function is special. + * + * This function is an auxiliary millicode function that is + * referenced by the code generated by gcc for signed integer + * division. But gcc does NOT treat a call to this function as an + * ordinary function call - it can clobber only R1, MACL and MACH. + * + * See the definition of divsi3_i4_int in gcc/config/sh/sh.md + * + * As the consequence this function cannot be called via any + * indirection that assumes normal calling convention: + * + * . cannot have _PROF_PROLOGUE + * . cannot be called via PLT (not relevant for kernel) + * + * XXX: uwe: Older gcc used __sdivsi3; newer uses __sdivsi3_i4i - a + * heavily tuned version that is NOT compatible with __sdivsi3 because + * it clobbers different registers. We don't want to link the kernel + * against libgcc and we don't have resources to write heavily tuned + * version ourselves, so clone __sdivsi3 but adjust the code to + * conform to the __sdivsi3_i4i clobber spec. + */ + #ifdef __ELF__ .hidden __sdivsi3_i4i Index: src/sys/lib/libkern/arch/sh3/udivsi3_i4i.S diff -u src/sys/lib/libkern/arch/sh3/udivsi3_i4i.S:1.1 src/sys/lib/libkern/arch/sh3/udivsi3_i4i.S:1.2 --- src/sys/lib/libkern/arch/sh3/udivsi3_i4i.S:1.1 Thu Aug 4 03:20:09 2011 +++ src/sys/lib/libkern/arch/sh3/udivsi3_i4i.S Fri Aug 5 02:00:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: udivsi3_i4i.S,v 1.1 2011/08/04 03:20:09 uwe Exp $ */ +/* $NetBSD: udivsi3_i4i.S,v 1.2 2011/08/05 02:00:25 uwe Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,39 +36,31 @@ #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: udivsi3_i4i.S,v 1.1 2011/08/04 03:20:09 uwe Exp $) + RCSID($NetBSD: udivsi3_i4i.S,v 1.2 2011/08/05 02:00:25 uwe Exp $) #endif /* - * XXX: uwe: this is a kludge... - * - * For unsigned integer division gcc used to emit a call to __udivsi3 - * millicode function that uses compiler-private ABI. Newer gcc - * uses heavily tuned __udivsi3_i4i that is NOT compatible with - * __udivsi3 because it's expected to clobber different registers. We - * don't want to link the kernel against libgcc and we don't have - * resources to write heavily tuned version ourselves, so clone - * __udivsi3 but adjust it to conform to the __udivsi3_i4i clobber - * spec. - */ - -/* * IMPOTANT: This function is special. * - * This function is an auxiliary function that is referenced by the - * code generated by gcc for integer division. But gcc does NOT treat - * a call to this function as an ordinary function call w.r.t. the set - * of register this call clobbers. See the definition of udivsi3_i1 - * in gcc/config/sh/sh.md. - * - * Any call to this function MUST NOT clobber any registers besides r4 - * and r0, where the result is returned. At the time of the call the - * r4 contains the first argument, so we are only left with r0, and we - * cannot do anything meaningful using only one register. The - * consequences are: - * - * . this function cannot have _PROF_PROLOGUE - * . this function cannot be called via PLT + * This function is an auxiliary millicode function that is + * referenced by the code generated by gcc for unsigned integer + * division. But gcc does NOT treat a call to this function as an + * ordinary function call - it can clobber only R1, MACL and MACH. + * + * See the definition of udivsi3_i4_int in gcc/config/sh/sh.md + * + * As the consequence this function cannot be called via any + * indirection that assumes normal calling convention: + * + * . cannot have _PROF_PROLOGUE + * . cannot be called via PLT (not relevant for kernel) + * + * XXX: uwe: Older gcc used __udivsi3;
CVS commit: src/sys/lib/libkern/arch/sh3
Module Name:src Committed By: uwe Date: Thu Aug 4 03:20:10 UTC 2011 Modified Files: src/sys/lib/libkern/arch/sh3: Makefile.inc Added Files: src/sys/lib/libkern/arch/sh3: sdivsi3_i4i.S udivsi3_i4i.S Log Message: For unsignad integer division gcc used to emit a call to __udivsi3 millicode function that uses compiler-private ABI. Newer gcc uses heavily tuned __udivsi3_i4i that is NOT compatible with __udivsi3 because it's expected to clobber different registers. We don't want to link the kernel against libgcc and we don't have resources to write heavily tuned version ourselves, so clone __udivsi3 but adjust it to conform to the __udivsi3_i4i clobber spec. Ditto for signed division. You can make gcc use old routines with -mdiv=call-div1 to avoid few extra instructions to save/restore the right registers in the signed division funcion. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/lib/libkern/arch/sh3/Makefile.inc cvs rdiff -u -r0 -r1.1 src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S \ src/sys/lib/libkern/arch/sh3/udivsi3_i4i.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/sh3/Makefile.inc diff -u src/sys/lib/libkern/arch/sh3/Makefile.inc:1.18 src/sys/lib/libkern/arch/sh3/Makefile.inc:1.19 --- src/sys/lib/libkern/arch/sh3/Makefile.inc:1.18 Fri Aug 14 19:23:54 2009 +++ src/sys/lib/libkern/arch/sh3/Makefile.inc Thu Aug 4 03:20:09 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.18 2009/08/14 19:23:54 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.19 2011/08/04 03:20:09 uwe Exp $ SRCS+= ffs.S SRCS+= memset.S @@ -6,4 +6,7 @@ SRCS+= ashiftrt.S ashlsi3.S ashrsi3.S lshrsi3.S movstr.S movstr_i4.S SRCS+= movstrSI.S movstrSI12_i4.S mulsi3.S sdivsi3.S udivsi3.S +# newer gcc uses different integer division millicode by default +SRCS+= sdivsi3_i4i.S udivsi3_i4i.S + NO_SRCS+= bswap64.c Added files: Index: src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S diff -u /dev/null src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S:1.1 --- /dev/null Thu Aug 4 03:20:10 2011 +++ src/sys/lib/libkern/arch/sh3/sdivsi3_i4i.S Thu Aug 4 03:20:09 2011 @@ -0,0 +1,85 @@ +/* $NetBSD: sdivsi3_i4i.S,v 1.1 2011/08/04 03:20:09 uwe Exp $ */ + +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. + * + * 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. + * + * from: @(#)udivsi3.s 5.1 (Berkeley) 5/15/90 + */ + +#include machine/asm.h +#if defined(LIBC_SCCS) + RCSID($NetBSD: sdivsi3_i4i.S,v 1.1 2011/08/04 03:20:09 uwe Exp $) +#endif + +/* See comments in udivsi3_i4i.S */ + +#ifdef __ELF__ + .hidden __sdivsi3_i4i +#endif + + +/* r0 = r4 / r5 */ +NENTRY(__sdivsi3_i4i) + mov r4, r0 + mov r5, r1 + + tst r1, r1 + bt .L_div_by_zero + + !! this version cannot clobber r2 and r3, but can clobber macl/mach + lds r2, macl + lds r3, mach + + mov #0, r2 + div0s r2, r0 + subc r3, r3 + subc r2, r0 + div0s r1, r3 +#define DIVSTEP rotcl r0; div1 r1, r3 + /* repeat 32 times */ + DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; + DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; + DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; + DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; DIVSTEP; +#undef DIVSTEP + rotcl r0 + + addc r2, r0 + + sts mach, r3 + sts macl, r2 +
CVS commit: src/sys/lib/libkern/arch/sh3
Module Name:src Committed By: mrg Date: Thu Jul 14 09:48:04 UTC 2011 Modified Files: src/sys/lib/libkern/arch/sh3: sdivsi3.S udivsi3.S Log Message: revert the _i4i aliases. they are not the right thing. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/lib/libkern/arch/sh3/sdivsi3.S cvs rdiff -u -r1.9 -r1.10 src/sys/lib/libkern/arch/sh3/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/sh3/sdivsi3.S diff -u src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.10 src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.11 --- src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.10 Wed Jul 6 01:29:54 2011 +++ src/sys/lib/libkern/arch/sh3/sdivsi3.S Thu Jul 14 09:48:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sdivsi3.S,v 1.10 2011/07/06 01:29:54 mrg Exp $ */ +/* $NetBSD: sdivsi3.S,v 1.11 2011/07/14 09:48:03 mrg Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,7 +36,7 @@ #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: sdivsi3.S,v 1.10 2011/07/06 01:29:54 mrg Exp $) + RCSID($NetBSD: sdivsi3.S,v 1.11 2011/07/14 09:48:03 mrg Exp $) #endif @@ -46,7 +46,6 @@ /* r0 = r4 / r5 */ -WEAK_ALIAS(__sdivsi3_i4i,__sdivsi3) NENTRY(__sdivsi3) mov r4, r0 mov r5, r1 Index: src/sys/lib/libkern/arch/sh3/udivsi3.S diff -u src/sys/lib/libkern/arch/sh3/udivsi3.S:1.9 src/sys/lib/libkern/arch/sh3/udivsi3.S:1.10 --- src/sys/lib/libkern/arch/sh3/udivsi3.S:1.9 Wed Jul 6 01:29:54 2011 +++ src/sys/lib/libkern/arch/sh3/udivsi3.S Thu Jul 14 09:48:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: udivsi3.S,v 1.9 2011/07/06 01:29:54 mrg Exp $ */ +/* $NetBSD: udivsi3.S,v 1.10 2011/07/14 09:48:04 mrg Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,7 +36,7 @@ #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: udivsi3.S,v 1.9 2011/07/06 01:29:54 mrg Exp $) + RCSID($NetBSD: udivsi3.S,v 1.10 2011/07/14 09:48:04 mrg Exp $) #endif /* @@ -65,7 +65,6 @@ /* r0 = r4 / r5 */ -WEAK_ALIAS(__udivsi3_i4i,__udivsi3) NENTRY(__udivsi3) tst r5, r5 bt div_by_zero
CVS commit: src/sys/lib/libkern/arch/sh3
Module Name:src Committed By: mrg Date: Wed Jul 6 01:29:54 UTC 2011 Modified Files: src/sys/lib/libkern/arch/sh3: sdivsi3.S udivsi3.S Log Message: add weak aliases for __sdivsi3_i4i and __udivsi3_i4i. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/lib/libkern/arch/sh3/sdivsi3.S cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libkern/arch/sh3/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/sh3/sdivsi3.S diff -u src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.9 src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.10 --- src/sys/lib/libkern/arch/sh3/sdivsi3.S:1.9 Wed Jan 7 22:15:18 2009 +++ src/sys/lib/libkern/arch/sh3/sdivsi3.S Wed Jul 6 01:29:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sdivsi3.S,v 1.9 2009/01/07 22:15:18 uwe Exp $ */ +/* $NetBSD: sdivsi3.S,v 1.10 2011/07/06 01:29:54 mrg Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,7 +36,7 @@ #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: sdivsi3.S,v 1.9 2009/01/07 22:15:18 uwe Exp $) + RCSID($NetBSD: sdivsi3.S,v 1.10 2011/07/06 01:29:54 mrg Exp $) #endif @@ -46,6 +46,7 @@ /* r0 = r4 / r5 */ +WEAK_ALIAS(__sdivsi3_i4i,__sdivsi3) NENTRY(__sdivsi3) mov r4, r0 mov r5, r1 Index: src/sys/lib/libkern/arch/sh3/udivsi3.S diff -u src/sys/lib/libkern/arch/sh3/udivsi3.S:1.8 src/sys/lib/libkern/arch/sh3/udivsi3.S:1.9 --- src/sys/lib/libkern/arch/sh3/udivsi3.S:1.8 Wed Jan 7 22:15:18 2009 +++ src/sys/lib/libkern/arch/sh3/udivsi3.S Wed Jul 6 01:29:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: udivsi3.S,v 1.8 2009/01/07 22:15:18 uwe Exp $ */ +/* $NetBSD: udivsi3.S,v 1.9 2011/07/06 01:29:54 mrg Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,7 +36,7 @@ #include machine/asm.h #if defined(LIBC_SCCS) - RCSID($NetBSD: udivsi3.S,v 1.8 2009/01/07 22:15:18 uwe Exp $) + RCSID($NetBSD: udivsi3.S,v 1.9 2011/07/06 01:29:54 mrg Exp $) #endif /* @@ -65,6 +65,7 @@ /* r0 = r4 / r5 */ +WEAK_ALIAS(__udivsi3_i4i,__udivsi3) NENTRY(__udivsi3) tst r5, r5 bt div_by_zero
CVS commit: src/sys/lib/libkern/arch/powerpc
Module Name:src Committed By: matt Date: Sat Jul 2 03:35:04 UTC 2011 Modified Files: src/sys/lib/libkern/arch/powerpc: Makefile.inc Added Files: src/sys/lib/libkern/arch/powerpc: gprsavrest.S Log Message: Add the _restgpr* and _savegpr* entries that GCC 4.5 wants. This file is designed to support the other GCC 4.5 variants that may be required. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/lib/libkern/arch/powerpc/Makefile.inc cvs rdiff -u -r0 -r1.1 src/sys/lib/libkern/arch/powerpc/gprsavrest.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/powerpc/Makefile.inc diff -u src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.30 src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.31 --- src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.30 Mon Jan 17 08:23:57 2011 +++ src/sys/lib/libkern/arch/powerpc/Makefile.inc Sat Jul 2 03:35:03 2011 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.30 2011/01/17 08:23:57 matt Exp $ +# $NetBSD: Makefile.inc,v 1.31 2011/07/02 03:35:03 matt Exp $ SRCS+= bswap16.c bswap32.c SRCS+= htonl.c htons.c ntohl.c ntohs.c SRCS+= syncicache.c SRCS+= ffs.S memset.S strlen.S +SRCS+= gprsavrest.S # Disable the asm versions on evbppc because they break the Explora .if ${MACHINE} == evbppc Added files: Index: src/sys/lib/libkern/arch/powerpc/gprsavrest.S diff -u /dev/null src/sys/lib/libkern/arch/powerpc/gprsavrest.S:1.1 --- /dev/null Sat Jul 2 03:35:04 2011 +++ src/sys/lib/libkern/arch/powerpc/gprsavrest.S Sat Jul 2 03:35:03 2011 @@ -0,0 +1,127 @@ +/*- + * Copyright (c) 2011 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 powerpc/asm.h + +__RCSID($NetBSD: gprsavrest.S,v 1.1 2011/07/02 03:35:03 matt Exp $) + +#ifndef RESTGPR +#define RESTGPR(n) RESTOREXGPR(_restgpr_,n,_x) +#define RESTGPR_END(n) RESTOREXGPR_END(_restgpr,n,_x) +#define SAVEGPR(n) SAVEXGPR(_savegpr_,n,) +#define SAVEGPR_END(n) SAVEXGPR_END(_savegpr,n,) +#endif + +#define RESTOREXGPR(a,n,b) \ + .hidden a##n##b; ENTRY_NOPROFILE(a##n##b); lwz n,(-4*(32-n))(11) +#define RESTOREXGPR_END(a,n,b) \ + .size a##n##b,.-a##n##b +#define SAVEXGPR(a,n,b) \ + .hidden a##n##b; ENTRY_NOPROFILE(a##n##b); stw n,(-4*(32-n))(11) +#define SAVEXGPR_END(a,n,b) \ + .size a##n##b,.-a##n##b + + RESTGPR(14) + RESTGPR(15) + RESTGPR(16) + RESTGPR(17) + RESTGPR(18) + RESTGPR(19) + RESTGPR(20) + RESTGPR(21) + RESTGPR(22) + RESTGPR(23) + RESTGPR(24) + RESTGPR(25) + RESTGPR(26) + RESTGPR(27) + RESTGPR(28) + RESTGPR(29) + RESTGPR(30) + lwz 0,4(11) + RESTGPR(31) + mtlr 0 + mr 1,11 + blr + RESTGPR_END(14) + RESTGPR_END(15) + RESTGPR_END(16) + RESTGPR_END(17) + RESTGPR_END(18) + RESTGPR_END(19) + RESTGPR_END(20) + RESTGPR_END(21) + RESTGPR_END(22) + RESTGPR_END(23) + RESTGPR_END(24) + RESTGPR_END(25) + RESTGPR_END(26) + RESTGPR_END(27) + RESTGPR_END(28) + RESTGPR_END(29) + RESTGPR_END(30) + RESTGPR_END(31) + + SAVEGPR(14) + SAVEGPR(15) + SAVEGPR(16) + SAVEGPR(17) + SAVEGPR(18) + SAVEGPR(19) + SAVEGPR(20) + SAVEGPR(21) + SAVEGPR(22) + SAVEGPR(23) + SAVEGPR(24) + SAVEGPR(25) + SAVEGPR(26) + SAVEGPR(27) + SAVEGPR(28) + SAVEGPR(29) + SAVEGPR(30) + SAVEGPR(31) + blr + SAVEGPR_END(14) + SAVEGPR_END(15) + SAVEGPR_END(16) + SAVEGPR_END(17) + SAVEGPR_END(18) + SAVEGPR_END(19) + SAVEGPR_END(20) + SAVEGPR_END(21) + SAVEGPR_END(22) + SAVEGPR_END(23) + SAVEGPR_END(24) + SAVEGPR_END(25) + SAVEGPR_END(26) + SAVEGPR_END(27) + SAVEGPR_END(28) + SAVEGPR_END(29)
CVS commit: src/sys/lib/libkern/arch/sparc
Module Name:src Committed By: mrg Date: Mon Jun 13 03:23:53 UTC 2011 Modified Files: src/sys/lib/libkern/arch/sparc: divrem.m4 Log Message: catch up with the userland copy: revision 1.6 date: 2011/03/23 20:54:35; author: martin; state: Exp; lines: +2 -2 Avoid using %g7 fixes rump on sparc, at least somewhat. tested that normal kernels runs fine this with this change, too. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libkern/arch/sparc/divrem.m4 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/sparc/divrem.m4 diff -u src/sys/lib/libkern/arch/sparc/divrem.m4:1.8 src/sys/lib/libkern/arch/sparc/divrem.m4:1.9 --- src/sys/lib/libkern/arch/sparc/divrem.m4:1.8 Sun Dec 11 12:24:44 2005 +++ src/sys/lib/libkern/arch/sparc/divrem.m4 Mon Jun 13 03:23:53 2011 @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: Header: divrem.m4,v 1.4 92/06/25 13:23:57 torek Exp - * $NetBSD: divrem.m4,v 1.8 2005/12/11 12:24:44 christos Exp $ + * $NetBSD: divrem.m4,v 1.9 2011/06/13 03:23:53 mrg Exp $ */ /* @@ -89,7 +89,7 @@ /* m4 reminder: ifelse(a,b,c,d) = if a is b, then c, else d */ define(T, `%g1') -define(SC, `%g7') +define(SC, `%g5') ifelse(S, `true', `define(SIGN, `%g6')') /*
CVS commit: src/sys/lib/libkern/arch/hppa
Module Name:src Committed By: skrll Date: Mon Jan 31 12:10:59 UTC 2011 Modified Files: src/sys/lib/libkern/arch/hppa: bcopy.S Log Message: This file needs opt_multiprocessor.h early so we pick up the right definition from cpu.h, etc. XXX should revisit the _STANDALONE vs _KERNEL split To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/lib/libkern/arch/hppa/bcopy.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/hppa/bcopy.S diff -u src/sys/lib/libkern/arch/hppa/bcopy.S:1.13 src/sys/lib/libkern/arch/hppa/bcopy.S:1.14 --- src/sys/lib/libkern/arch/hppa/bcopy.S:1.13 Mon Jan 24 15:01:30 2011 +++ src/sys/lib/libkern/arch/hppa/bcopy.S Mon Jan 31 12:10:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bcopy.S,v 1.13 2011/01/24 15:01:30 skrll Exp $ */ +/* $NetBSD: bcopy.S,v 1.14 2011/01/31 12:10:58 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -36,13 +36,20 @@ #undef _LOCORE #define _LOCORE /* XXX fredette - unfortunate */ +#if defined(SPCOPY) !defined(_STANDALONE) + +#include opt_multiprocessor.h + #include machine/cpu.h + +#endif + #include machine/asm.h #include machine/frame.h #include machine/reg.h #if defined(LIBC_SCCS) !defined(lint) -RCSID($NetBSD: bcopy.S,v 1.13 2011/01/24 15:01:30 skrll Exp $) +RCSID($NetBSD: bcopy.S,v 1.14 2011/01/31 12:10:58 skrll Exp $) #endif /* LIBC_SCCS and not lint */ /* @@ -486,8 +493,6 @@ #if defined(SPCOPY) !defined(_STANDALONE) -#include opt_multiprocessor.h - #include sys/errno.h #include assym.h
CVS commit: src/sys/lib/libkern/arch/hppa
Module Name:src Committed By: skrll Date: Mon Jan 24 15:01:30 UTC 2011 Modified Files: src/sys/lib/libkern/arch/hppa: bcopy.S Log Message: Fix build. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/lib/libkern/arch/hppa/bcopy.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/hppa/bcopy.S diff -u src/sys/lib/libkern/arch/hppa/bcopy.S:1.12 src/sys/lib/libkern/arch/hppa/bcopy.S:1.13 --- src/sys/lib/libkern/arch/hppa/bcopy.S:1.12 Sat Jan 22 10:58:44 2011 +++ src/sys/lib/libkern/arch/hppa/bcopy.S Mon Jan 24 15:01:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bcopy.S,v 1.12 2011/01/22 10:58:44 skrll Exp $ */ +/* $NetBSD: bcopy.S,v 1.13 2011/01/24 15:01:30 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -33,8 +33,6 @@ * Copy routines for NetBSD/hppa. */ -#include opt_multiprocessor.h - #undef _LOCORE #define _LOCORE /* XXX fredette - unfortunate */ @@ -44,7 +42,7 @@ #include machine/reg.h #if defined(LIBC_SCCS) !defined(lint) -RCSID($NetBSD: bcopy.S,v 1.12 2011/01/22 10:58:44 skrll Exp $) +RCSID($NetBSD: bcopy.S,v 1.13 2011/01/24 15:01:30 skrll Exp $) #endif /* LIBC_SCCS and not lint */ /* @@ -487,6 +485,9 @@ #endif #if defined(SPCOPY) !defined(_STANDALONE) + +#include opt_multiprocessor.h + #include sys/errno.h #include assym.h
CVS commit: src/sys/lib/libkern/arch/hppa
Module Name:src Committed By: skrll Date: Sat Jan 22 10:58:44 UTC 2011 Modified Files: src/sys/lib/libkern/arch/hppa: bcopy.S Log Message: Fix MULTIPROCESSOR curlwp/curcpu handling... missed in previous commit. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libkern/arch/hppa/bcopy.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/hppa/bcopy.S diff -u src/sys/lib/libkern/arch/hppa/bcopy.S:1.11 src/sys/lib/libkern/arch/hppa/bcopy.S:1.12 --- src/sys/lib/libkern/arch/hppa/bcopy.S:1.11 Sat Mar 20 23:31:30 2010 +++ src/sys/lib/libkern/arch/hppa/bcopy.S Sat Jan 22 10:58:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bcopy.S,v 1.11 2010/03/20 23:31:30 chs Exp $ */ +/* $NetBSD: bcopy.S,v 1.12 2011/01/22 10:58:44 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -33,15 +33,18 @@ * Copy routines for NetBSD/hppa. */ +#include opt_multiprocessor.h + #undef _LOCORE #define _LOCORE /* XXX fredette - unfortunate */ +#include machine/cpu.h #include machine/asm.h #include machine/frame.h #include machine/reg.h #if defined(LIBC_SCCS) !defined(lint) -RCSID($NetBSD: bcopy.S,v 1.11 2010/03/20 23:31:30 chs Exp $) +RCSID($NetBSD: bcopy.S,v 1.12 2011/01/22 10:58:44 skrll Exp $) #endif /* LIBC_SCCS and not lint */ /* @@ -498,7 +501,7 @@ /* * Setup the fault handler, which will fill in %ret0 if triggered. */ - mfctl CR_CURLWP, %r31 + GET_CURLWP(%r31) #ifdef DIAGNOSTIC comb,,n %r0, %r31, Lspcopy_curlwp_ok ldil L%panic, %r1
CVS commit: src/sys/lib/libkern/arch/powerpc
Module Name:src Committed By: matt Date: Mon Jan 17 07:07:36 UTC 2011 Modified Files: src/sys/lib/libkern/arch/powerpc: memset.S Log Message: Don't define _NOREGNAMES since all of libkern is now compiled with it. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/lib/libkern/arch/powerpc/memset.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/powerpc/memset.S diff -u src/sys/lib/libkern/arch/powerpc/memset.S:1.6 src/sys/lib/libkern/arch/powerpc/memset.S:1.7 --- src/sys/lib/libkern/arch/powerpc/memset.S:1.6 Sun Mar 4 06:03:12 2007 +++ src/sys/lib/libkern/arch/powerpc/memset.S Mon Jan 17 07:07:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: memset.S,v 1.6 2007/03/04 06:03:12 christos Exp $ */ +/* $NetBSD: memset.S,v 1.7 2011/01/17 07:07:36 matt Exp $ */ /*- * Copyright (C) 2003 Matt Thomas m...@3am-software.com @@ -29,7 +29,6 @@ */ /*--*/ -#define _NOREGNAMES #include machine/asm.h /*--*/
CVS commit: src/sys/lib/libkern/arch/powerpc
Module Name:src Committed By: matt Date: Sun Jan 16 03:22:19 UTC 2011 Modified Files: src/sys/lib/libkern/arch/powerpc: Makefile.inc Log Message: Add -D_NOREGNAMES To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/lib/libkern/arch/powerpc/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/powerpc/Makefile.inc diff -u src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.28 src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.29 --- src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.28 Fri Aug 14 19:23:54 2009 +++ src/sys/lib/libkern/arch/powerpc/Makefile.inc Sun Jan 16 03:22:19 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.28 2009/08/14 19:23:54 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.29 2011/01/16 03:22:19 matt Exp $ SRCS+= bswap16.c bswap32.c SRCS+= htonl.c htons.c ntohl.c ntohs.c @@ -6,6 +6,8 @@ SRCS+= ffs.S memset.S strlen.S +CPPFLAGS+= -D_NOREGNAMES + # Disable the asm versions on evbppc because they break the Explora .if ${MACHINE} == evbppc memcpy.o: memcpy.c
CVS commit: src/sys/lib/libkern/arch/i386
Module Name:src Committed By: pooka Date: Tue Sep 7 20:35:51 UTC 2010 Modified Files: src/sys/lib/libkern/arch/i386: random.S Log Message: Rename jump label to something a little more negative. No, I'm not doing it for cosmetic value or out of angst. See, PIC_PROLOGUE on i386 uses the 1 label internally. Now, everything would be fine and dandy for the first 551245 calls to random. After that p+q is negative and the jump is taken. However, it is taken into the middle of PIC_PROLOGUE instead of where upon superficial examination we assumed we are jumping. This causes wrong(tm) things to happen and ret triggers a jump into hyperspace. (no, I did not see that coming) To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/lib/libkern/arch/i386/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/i386/random.S diff -u src/sys/lib/libkern/arch/i386/random.S:1.5 src/sys/lib/libkern/arch/i386/random.S:1.6 --- src/sys/lib/libkern/arch/i386/random.S:1.5 Sun Jan 4 17:10:46 2009 +++ src/sys/lib/libkern/arch/i386/random.S Tue Sep 7 20:35:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: random.S,v 1.5 2009/01/04 17:10:46 pooka Exp $ */ +/* $NetBSD: random.S,v 1.6 2010/09/07 20:35:50 pooka Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -83,12 +83,12 @@ shld $1,%eax,%edx andl $0x7fff,%eax addl %edx,%eax - js 1f + js neg PIC_PROLOGUE movl %eax,PIC_GOTOFF(randseed) PIC_EPILOGUE ret -1: +neg: subl $0x7fff,%eax PIC_PROLOGUE movl %eax,PIC_GOTOFF(randseed)
CVS commit: src/sys/lib/libkern/arch/mips
Module Name:src Committed By: pgoyette Date: Wed Jan 20 18:13:40 UTC 2010 Modified Files: src/sys/lib/libkern/arch/mips: Makefile.inc Log Message: Remove kern_assert.c - it's not needed here cuz it's already pulled in by sys/lib/libkern/Makefile.libkern OK pooka@ To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/lib/libkern/arch/mips/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/mips/Makefile.inc diff -u src/sys/lib/libkern/arch/mips/Makefile.inc:1.22 src/sys/lib/libkern/arch/mips/Makefile.inc:1.23 --- src/sys/lib/libkern/arch/mips/Makefile.inc:1.22 Wed Jan 20 03:36:26 2010 +++ src/sys/lib/libkern/arch/mips/Makefile.inc Wed Jan 20 18:13:40 2010 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.22 2010/01/20 03:36:26 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.23 2010/01/20 18:13:40 pgoyette Exp $ # # There are likely more that we will notice when we go native NO_SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c NO_SRCS+= __main.c -SRCS+= kern_assert.c memchr.c memcmp.c random.c scanc.c \ +SRCS+= memchr.c memcmp.c random.c scanc.c \ skpc.c strcat.c strcpy.c strcasecmp.c \ strncasecmp.c strncmp.c strncpy.c strtoul.c
CVS commit: src/sys/lib/libkern/arch/mips
Module Name:src Committed By: pooka Date: Wed Jan 20 03:36:26 UTC 2010 Modified Files: src/sys/lib/libkern/arch/mips: Makefile.inc Log Message: __assert.c - kern_assert.c (I don't fully understand why __assert.c is needed here. maybe it can be removed, but I don't have time to do a full set of mips builds tonight) To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/lib/libkern/arch/mips/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/mips/Makefile.inc diff -u src/sys/lib/libkern/arch/mips/Makefile.inc:1.21 src/sys/lib/libkern/arch/mips/Makefile.inc:1.22 --- src/sys/lib/libkern/arch/mips/Makefile.inc:1.21 Mon Dec 14 00:48:35 2009 +++ src/sys/lib/libkern/arch/mips/Makefile.inc Wed Jan 20 03:36:26 2010 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.21 2009/12/14 00:48:35 matt Exp $ +# $NetBSD: Makefile.inc,v 1.22 2010/01/20 03:36:26 pooka Exp $ # # There are likely more that we will notice when we go native NO_SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c NO_SRCS+= __main.c -SRCS+= __assert.c memchr.c memcmp.c random.c scanc.c \ +SRCS+= kern_assert.c memchr.c memcmp.c random.c scanc.c \ skpc.c strcat.c strcpy.c strcasecmp.c \ strncasecmp.c strncmp.c strncpy.c strtoul.c
CVS commit: src/sys/lib/libkern/arch/hppa
Module Name:src Committed By: skrll Date: Thu Dec 10 07:57:02 UTC 2009 Modified Files: src/sys/lib/libkern/arch/hppa: bcopy.S Log Message: Rename L_ADDR to L_PCB To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/lib/libkern/arch/hppa/bcopy.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/hppa/bcopy.S diff -u src/sys/lib/libkern/arch/hppa/bcopy.S:1.9 src/sys/lib/libkern/arch/hppa/bcopy.S:1.10 --- src/sys/lib/libkern/arch/hppa/bcopy.S:1.9 Tue Dec 1 09:06:17 2009 +++ src/sys/lib/libkern/arch/hppa/bcopy.S Thu Dec 10 07:57:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bcopy.S,v 1.9 2009/12/01 09:06:17 skrll Exp $ */ +/* $NetBSD: bcopy.S,v 1.10 2009/12/10 07:57:02 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include machine/reg.h #if defined(LIBC_SCCS) !defined(lint) -RCSID($NetBSD: bcopy.S,v 1.9 2009/12/01 09:06:17 skrll Exp $) +RCSID($NetBSD: bcopy.S,v 1.10 2009/12/10 07:57:02 skrll Exp $) #endif /* LIBC_SCCS and not lint */ /* @@ -515,7 +515,7 @@ Lspcopy_curlwp_ok: #endif /* DIAGNOSTIC */ ldilL%spcopy_fault, %r1 - ldw L_ADDR(%r31), %r31 + ldw L_PCB(%r31), %r31 ldo R%spcopy_fault(%r1), %r1 ldi EFAULT, %ret0 stw %r1, PCB_ONFAULT(%r31)
CVS commit: src/sys/lib/libkern/arch/hppa
Module Name:src Committed By: pooka Date: Tue Sep 22 09:57:16 UTC 2009 Modified Files: src/sys/lib/libkern/arch/hppa: Makefile.inc Log Message: Don't build spcopy for rumpkern. Fixes hp700 build failure pointed out by nick. XXX: spcopy should be in the main kernel instead of libkern in any case To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/lib/libkern/arch/hppa/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/hppa/Makefile.inc diff -u src/sys/lib/libkern/arch/hppa/Makefile.inc:1.10 src/sys/lib/libkern/arch/hppa/Makefile.inc:1.11 --- src/sys/lib/libkern/arch/hppa/Makefile.inc:1.10 Fri Aug 14 19:23:53 2009 +++ src/sys/lib/libkern/arch/hppa/Makefile.inc Tue Sep 22 09:57:16 2009 @@ -1,7 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.10 2009/08/14 19:23:53 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.11 2009/09/22 09:57:16 pooka Exp $ SRCS+= milli.S -SRCS+= bcopy.S spcopy.S memcpy.S memmove.S +SRCS+= bcopy.S memcpy.S memmove.S + +# XXX: spcopy does not really belong in libkern in the first place +.ifndef RUMPKERNEL +SRCS+= spcopy.S +.endif SRCS+= ashrdi3.c divdi3.c SRCS+= ffs.c bswap16.c bswap32.c
CVS commit: src/sys/lib/libkern/arch
Module Name:src Committed By: dsl Date: Wed Aug 12 21:20:41 UTC 2009 Modified Files: src/sys/lib/libkern/arch/alpha: Makefile.inc src/sys/lib/libkern/arch/arm: Makefile.inc src/sys/lib/libkern/arch/hppa: Makefile.inc src/sys/lib/libkern/arch/i386: Makefile.inc src/sys/lib/libkern/arch/ia64: Makefile.inc src/sys/lib/libkern/arch/m68k: Makefile.inc src/sys/lib/libkern/arch/mips: Makefile.inc src/sys/lib/libkern/arch/powerpc: Makefile.inc src/sys/lib/libkern/arch/sh3: Makefile.inc src/sys/lib/libkern/arch/sparc: Makefile.inc src/sys/lib/libkern/arch/sparc64: Makefile.inc src/sys/lib/libkern/arch/usermode: Makefile.inc src/sys/lib/libkern/arch/vax: Makefile.inc src/sys/lib/libkern/arch/x86_64: Makefile.inc Log Message: Split the lines that add .c to SRCS from those that add .S No changes (apart from the order) intended. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/lib/libkern/arch/alpha/Makefile.inc cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libkern/arch/arm/Makefile.inc cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libkern/arch/hppa/Makefile.inc cvs rdiff -u -r1.28 -r1.29 src/sys/lib/libkern/arch/i386/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/sys/lib/libkern/arch/ia64/Makefile.inc cvs rdiff -u -r1.27 -r1.28 src/sys/lib/libkern/arch/m68k/Makefile.inc cvs rdiff -u -r1.18 -r1.19 src/sys/lib/libkern/arch/mips/Makefile.inc cvs rdiff -u -r1.26 -r1.27 src/sys/lib/libkern/arch/powerpc/Makefile.inc cvs rdiff -u -r1.16 -r1.17 src/sys/lib/libkern/arch/sh3/Makefile.inc cvs rdiff -u -r1.32 -r1.33 src/sys/lib/libkern/arch/sparc/Makefile.inc cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libkern/arch/sparc64/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libkern/arch/usermode/Makefile.inc cvs rdiff -u -r1.21 -r1.22 src/sys/lib/libkern/arch/vax/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libkern/arch/x86_64/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/alpha/Makefile.inc diff -u src/sys/lib/libkern/arch/alpha/Makefile.inc:1.26 src/sys/lib/libkern/arch/alpha/Makefile.inc:1.27 --- src/sys/lib/libkern/arch/alpha/Makefile.inc:1.26 Wed Mar 18 12:25:06 2009 +++ src/sys/lib/libkern/arch/alpha/Makefile.inc Wed Aug 12 21:20:40 2009 @@ -1,15 +1,19 @@ -# $NetBSD: Makefile.inc,v 1.26 2009/03/18 12:25:06 tsutsui Exp $ +# $NetBSD: Makefile.inc,v 1.27 2009/08/12 21:20:40 dsl Exp $ -SRCS+= __main.c __assert.c _mcount.S \ - imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c \ - byte_swap_2.S byte_swap_4.S bswap64.c \ - ffs.S \ - memchr.c memcmp.c memcpy.S memmove.S memset.c \ - softfloat.c \ - strcat.c strcmp.c strcpy.c strlen.c strcasecmp.c \ - strncasecmp.c strncmp.c strncpy.c strtoul.c \ - scanc.c skpc.c \ - random.c +SRCS+= _mcount.S +SRCS+= byte_swap_2.S byte_swap_4.S +SRCS+= ffs.S +SRCS+= memcpy.S memmove.S + +SRCS+= __main.c __assert.c +SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c +SRCS+= bswap64.c +SRCS+= memchr.c memcmp.c memset.c +SRCS+= softfloat.c +SRCS+= strcat.c strcmp.c strcpy.c strlen.c strcasecmp.c +SRCS+= strncasecmp.c strncmp.c strncpy.c strtoul.c +SRCS+= scanc.c skpc.c +SRCS+= random.c # `source' files built from m4 source SRCS+= __divqu.S __divq.S __divlu.S __divl.S Index: src/sys/lib/libkern/arch/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.7 src/sys/lib/libkern/arch/arm/Makefile.inc:1.8 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.7 Tue Oct 14 03:16:20 2008 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Wed Aug 12 21:20:40 2009 @@ -1,10 +1,14 @@ -# $NetBSD: Makefile.inc,v 1.7 2008/10/14 03:16:20 matt Exp $ - -SRCS+= __assert.c __main.c bswap64.c byte_swap_2.S byte_swap_4.S \ - ffs.S imax.c imin.c lmax.c lmin.c max.c min.c random.c scanc.c \ - skpc.c strcat.c strcasecmp.c \ - strcpy.c strlen.c strncasecmp.c \ - strncpy.c strtoul.c ulmax.c ulmin.c +# $NetBSD: Makefile.inc,v 1.8 2009/08/12 21:20:40 dsl Exp $ +SRCS+= byte_swap_2.S byte_swap_4.S +SRCS+= ffs.S SRCS+= divsi3.S clzsi2.S -SRCS+= memchr.c memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S +SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S + +SRCS+= __assert.c __main.c bswap64.c +SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c random.c scanc.c +SRCS+= skpc.c strcat.c strcasecmp.c +SRCS+= strcpy.c strlen.c strncasecmp.c +SRCS+= strncpy.c strtoul.c ulmax.c ulmin.c + +SRCS+= memchr.c Index: src/sys/lib/libkern/arch/hppa/Makefile.inc diff -u src/sys/lib/libkern/arch/hppa/Makefile.inc:1.8 src/sys/lib/libkern/arch/hppa/Makefile.inc:1.9 --- src/sys/lib/libkern/arch/hppa/Makefile.inc:1.8 Wed Mar 18 12:25:06 2009 +++ src/sys/lib/libkern/arch/hppa/Makefile.inc Wed Aug 12 21:20:40 2009 @@ -1,14 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.8 2009/03/18 12:25:06 tsutsui Exp $ - -# $OpenBSD: Makefile.inc,v 1.14 2000/12/29 19:04:41 mickey Exp
CVS commit: src/sys/lib/libkern/arch/m68k
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
CVS commit: src/sys/lib/libkern/arch/ia64
Module Name:src Committed By: kiyohara Date: Mon Jul 20 11:23:04 UTC 2009 Modified Files: src/sys/lib/libkern/arch/ia64: Makefile.inc Added Files: src/sys/lib/libkern/arch/ia64: bswap64.S byte_swap_8.S Log Message: Fix little bit, and add a few files. current status is to see following thread. http://mail-index.netbsd.org/port-ia64/2009/06/18/msg000102.html To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libkern/arch/ia64/Makefile.inc cvs rdiff -u -r0 -r1.1 src/sys/lib/libkern/arch/ia64/bswap64.S \ src/sys/lib/libkern/arch/ia64/byte_swap_8.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/ia64/Makefile.inc diff -u src/sys/lib/libkern/arch/ia64/Makefile.inc:1.1 src/sys/lib/libkern/arch/ia64/Makefile.inc:1.2 --- src/sys/lib/libkern/arch/ia64/Makefile.inc:1.1 Fri Apr 7 13:57:43 2006 +++ src/sys/lib/libkern/arch/ia64/Makefile.inc Mon Jul 20 11:23:04 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.1 2006/04/07 13:57:43 cherry Exp $ +# $NetBSD: Makefile.inc,v 1.2 2009/07/20 11:23:04 kiyohara Exp $ # SRCS+= __assert.c __main.c memset.c skpc.c scanc.c random.c \ @@ -8,5 +8,5 @@ memchr.c SRCS+= divdi3.S divsi3.S modsi3.S moddi3.S udivdi3.S udivsi3.S \ - umoddi3.S umodsi3.S bswap32.S bswap16.S ntohl.S htonl.S \ + umoddi3.S umodsi3.S bswap64.S bswap32.S bswap16.S ntohl.S htonl.S \ memcpy.S Added files: Index: src/sys/lib/libkern/arch/ia64/bswap64.S diff -u /dev/null src/sys/lib/libkern/arch/ia64/bswap64.S:1.1 --- /dev/null Mon Jul 20 11:23:04 2009 +++ src/sys/lib/libkern/arch/ia64/bswap64.S Mon Jul 20 11:23:04 2009 @@ -0,0 +1,37 @@ +/* $NetBSD: bswap64.S,v 1.1 2009/07/20 11:23:04 kiyohara Exp $ */ + +/*- + * Copyright (c) 1996 Carnegie-Mellon University. + * All rights reserved. + * + * Author: Chris G. Demetriou + * + * Permission to use, copy, modify and distribute this software and + * its documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS AS IS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or software.distribut...@cs.cmu.edu + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + * + * from: NetBSD: htonl.S,v 1.1 1996/04/17 22:36:52 cgd + * from: src/sys/libkern/ia64/htonl.S,v 1.2 2002/02/18 20:35:21 + * + * $FreeBSD$ + */ + +#define NAME bswap64 + +#include byte_swap_8.S Index: src/sys/lib/libkern/arch/ia64/byte_swap_8.S diff -u /dev/null src/sys/lib/libkern/arch/ia64/byte_swap_8.S:1.1 --- /dev/null Mon Jul 20 11:23:04 2009 +++ src/sys/lib/libkern/arch/ia64/byte_swap_8.S Mon Jul 20 11:23:04 2009 @@ -0,0 +1,45 @@ +/* $NetBSD: byte_swap_8.S,v 1.1 2009/07/20 11:23:04 kiyohara Exp $ */ + +/*- + * Copyright (c) 1996 Carnegie-Mellon University. + * All rights reserved. + * + * Author: Chris G. Demetriou + * + * Permission to use, copy, modify and distribute this software and + * its documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS AS IS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or software.distribut...@cs.cmu.edu + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ + +#include machine/asm.h + +#ifndef NAME +#error NAME not defined +#endif + +/* + * Byte-swap a 8-byte quantity. + * (Convert 0x0123456789012345 to 0x4523018967452301.) + * + * Argument is an unsigned 8-byte integer (u_int64_t). + */ +ENTRY(NAME, 1) + mux1 r8=in0,@rev + br.ret.sptk.few rp +END(NAME)