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/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/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/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