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) + SAVEGPR_END(30) + SAVEGPR_END(31)