[Midnightbsd-cvs] src: lib/libc: Remove powerpc and alpha bits.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Apr 28 02:17:06 EDT 2008


Log Message:
-----------
Remove powerpc and alpha bits.

Modified Files:
--------------
    src/lib/libc:
        Makefile (r1.3 -> r1.4)

Removed Files:
-------------
    src/lib/libc/alpha:
        Makefile.inc
        SYS.h
        _fpmath.h
        arith.h
    src/lib/libc/alpha/gen:
        Makefile.inc
        _ctx_start.S
        _set_tp.c
        _setjmp.S
        divrem.m4
        fabs.S
        flt_rounds.c
        fpgetmask.c
        fpgetround.c
        fpgetsticky.c
        fpsetmask.c
        fpsetround.c
        infinity.c
        makecontext.c
        modf.c
        rfork_thread.S
        setjmp.S
        signalcontext.c
        sigsetjmp.S
    src/lib/libc/alpha/net:
        Makefile.inc
        byte_swap_2.S
        byte_swap_4.S
        htonl.S
        htons.S
        ntohl.S
        ntohs.S
    src/lib/libc/alpha/stdlib:
        Makefile.inc
    src/lib/libc/alpha/string:
        Makefile.inc
        bcopy.S
        bzero.S
        ffs.S
        memcpy.S
        memmove.S
    src/lib/libc/alpha/sys:
        Makefile.inc
        Ovfork.S
        brk.S
        cerror.S
        exect.S
        fork.S
        pipe.S
        ptrace.S
        sbrk.S
        setlogin.S
        sigreturn.S
    src/lib/libc/powerpc:
        Makefile.inc
        SYS.h
        _fpmath.h
        arith.h
    src/lib/libc/powerpc/gen:
        Makefile.inc
        _ctx_start.S
        _set_tp.c
        _setjmp.S
        fabs.S
        flt_rounds.c
        fpgetmask.c
        fpgetround.c
        fpgetsticky.c
        fpsetmask.c
        fpsetround.c
        infinity.c
        makecontext.c
        modf.c
        setjmp.S
        signalcontext.c
        sigsetjmp.S
        syncicache.c
    src/lib/libc/powerpc/net:
        Makefile.inc
        htonl.S
        htons.S
        ntohl.S
        ntohs.S
    src/lib/libc/powerpc/sys:
        Makefile.inc
        brk.S
        cerror.S
        exect.S
        pipe.S
        ptrace.S
        sbrk.S
        setlogin.S

-------------- next part --------------
--- lib/libc/alpha/SYS.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*	From: NetBSD: SYS.h,v 1.5 1997/05/02 18:15:15 kleink Exp */
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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.
- *
- * $FreeBSD: src/lib/libc/alpha/SYS.h,v 1.16 2003/10/29 10:45:00 tjr Exp $
- */
-
-#include <machine/asm.h>
-#include <sys/syscall.h>
-
-#define	CALLSYS_ERROR(name)					\
-	CALLSYS_NOERROR(name);					\
-	br	gp, LLABEL(name,0);				\
-LLABEL(name,0):							\
-	LDGP(gp);						\
-	beq	a3, LLABEL(name,1);				\
-	jmp	zero, .cerror;					\
-LLABEL(name,1):
-
-
-#define	SYSCALL(name)						\
-LEAF(__CONCAT(__sys_,name),0);		/* XXX # of args? */	\
-	WEAK_ALIAS(name, __CONCAT(__sys_,name));		\
-	WEAK_ALIAS(__CONCAT(_,name), __CONCAT(__sys_,name));	\
-	CALLSYS_ERROR(name)
-
-#define	SYSCALL_NOERROR(name)					\
-LEAF(__CONCAT(__sys_,name),0);		/* XXX # of args? */	\
-	WEAK_ALIAS(name, __CONCAT(__sys_,name));		\
-	WEAK_ALIAS(__CONCAT(_,name), __CONCAT(__sys_,name));	\
-	CALLSYS_NOERROR(name)
-
-
-#define RSYSCALL(name)						\
-	SYSCALL(name);						\
-	RET;							\
-END(__CONCAT(__sys_,name))
-
-#define RSYSCALL_NOERROR(name)					\
-	SYSCALL_NOERROR(name);					\
-	RET;							\
-END(__CONCAT(__sys_,name))
-
-
-#define	PSEUDO(name)						\
-LEAF(__CONCAT(__sys_,name),0);		/* XXX # of args? */	\
-	WEAK_ALIAS(__CONCAT(_,name), __CONCAT(__sys_, name));	\
-	CALLSYS_ERROR(name);					\
-	RET;							\
-END(__CONCAT(__sys_,name))
--- lib/libc/alpha/Makefile.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD: src/lib/libc/alpha/Makefile.inc,v 1.7 2005/01/15 05:23:56 das Exp $
-#
-# Machine dependent definitions for the alpha architecture.
-#
-
-#
-# Alpha is 64-bit, so it doesn't need quad functions:
-#
-NO_QUAD=
-
-# On Alpha, long double is just double precision.
-MDSRCS+=machdep_ldisd.c
--- lib/libc/alpha/_fpmath.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c) 2002, 2003 David Schultz <das at FreeBSD.ORG>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD: src/lib/libc/alpha/_fpmath.h,v 1.6 2005/03/07 04:55:21 das Exp $
- */
-
-union IEEEl2bits {
-	long double	e;
-	struct {
-		unsigned int	manl	:32;
-		unsigned int	manh	:20;
-		unsigned int	exp	:11;
-		unsigned int	sign	:1;
-	} bits;
-};
-
-#define	mask_nbit_l(u)	((void)0)
-#define	LDBL_IMPLICIT_NBIT
-#define	LDBL_NBIT	0
-
-#define	LDBL_MANH_SIZE	20
-#define	LDBL_MANL_SIZE	32
-
-#define	LDBL_TO_ARRAY32(u, a) do {			\
-	(a)[0] = (uint32_t)(u).bits.manl;		\
-	(a)[1] = (uint32_t)(u).bits.manh;		\
-} while(0)
--- lib/libc/alpha/arith.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * MD header for contrib/netlib/gdtoa
- *
- * $FreeBSD: src/lib/libc/alpha/arith.h,v 1.2 2003/05/08 13:50:43 das Exp $
- */
-
-/*
- * NOTE: The definitions in this file must be correct or strtod(3) and
- * floating point formats in printf(3) will break!  The file can be
- * generated by running contrib/gdtoa/arithchk.c on the target
- * architecture.  See contrib/gdtoa/gdtoaimp.h for details.
- */
-
-#define IEEE_8087
-#define Arith_Kind_ASL 1
-#define Long int
-#define Intcast (int)(long)
-#define Double_Align
-#define X64_bit_pointers
-#define Sudden_Underflow
--- lib/libc/alpha/gen/fpgetmask.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1995 Christopher G. Demetriou
- * All rights reserved.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Christopher G. Demetriou
- *	for the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- *	$NetBSD: fpgetmask.c,v 1.1 1995/04/29 05:10:55 cgd Exp $
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/fpgetmask.c,v 1.6 2004/01/09 16:52:08 nectar Exp $");
-
-#include <sys/types.h>
-#include <ieeefp.h>
-#include <machine/sysarch.h>
-
-struct params {
-        u_int64_t mask;
-};
-
-fp_except_t
-fpgetmask()
-{
-        struct params p;
-
-	sysarch(ALPHA_GET_FPMASK, &p);
-	return((fp_except_t) p.mask);
-}
--- lib/libc/alpha/gen/divrem.m4
+++ /dev/null
@@ -1,198 +0,0 @@
-/*	$NetBSD: divrem.m4,v 1.7 1996/10/17 03:08:04 cgd Exp $	*/
-/* $FreeBSD: src/lib/libc/alpha/gen/divrem.m4,v 1.4 2004/11/27 20:59:49 peadar Exp $ */
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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.
- */
-
-/*
- * Division and remainder.
- *
- * The use of m4 is modeled after the sparc code, but the algorithm is
- * simple binary long division.
- *
- * Note that the loops could probably benefit from unrolling.
- */
-
-/*
- * M4 Parameters
- * NAME		name of function to generate
- * OP		OP=div: t10 / t11 -> t12; OP=rem: t10 % t11 -> t12
- * S		S=true: signed; S=false: unsigned
- * WORDSIZE	total number of bits
- */
-
-define(A, `t10')
-define(B, `t11')
-define(RESULT, `t12')
-
-define(BIT, `t0')
-define(I, `t1')
-define(CC, `t2')
-define(T_0, `t3')
-ifelse(S, `true', `define(NEG, `t4')')
-
-#include <machine/asm.h>
-
-NESTED(NAME, 0, 0, t9, 0, 0)			/* Get the right ra */
-	lda	sp, -64(sp)
-	stq	BIT, 0(sp)
-	stq	I, 8(sp)
-	stq	CC, 16(sp)
-	stq	T_0, 24(sp)
-ifelse(S, `true',
-`	stq	NEG, 32(sp)')
-	stq	A, 40(sp)
-	stq	B, 48(sp)
-	mov	zero, RESULT			/* Initialize result to zero */
-
-ifelse(S, `true',
-`
-	/* Compute sign of result.  If either is negative, this is easy.  */
-	or	A, B, NEG			/* not the sign, but... */
-	srl	NEG, WORDSIZE - 1, NEG		/* rather, or of high bits */
-	blbc	NEG, Ldoit			/* neither negative? do it! */
-
-ifelse(OP, `div',
-`	xor	A, B, NEG			/* THIS is the sign! */
-', `	mov	A, NEG				/* sign follows A. */
-')
-	srl	NEG, WORDSIZE - 1, NEG		/* make negation the low bit. */
-
-	srl	A, WORDSIZE - 1, I		/* is A negative? */
-	blbc	I, LnegB			/* no. */
-	/* A is negative; flip it. */
-ifelse(WORDSIZE, `32', `
-	/* top 32 bits may be random junk */
-	zap	A, 0xf0, A
-')
-	subq	zero, A, A
-	srl	B, WORDSIZE - 1, I		/* is B negative? */
-	blbc	I, Ldoit			/* no. */
-LnegB:
-	/* B is definitely negative, no matter how we got here. */
-ifelse(WORDSIZE, `32', `
-	/* top 32 bits may be random junk */
-	zap	B, 0xf0, B
-')
-	subq	zero, B, B
-Ldoit:
-')
-ifelse(WORDSIZE, `32', `
-	/*
-	 * Clear the top 32 bits of each operand, as they may
-	 * sign extension (if negated above), or random junk.
-	 */
-	zap	A, 0xf0, A
-	zap	B, 0xf0, B
-')
-
-	/* kill the special cases. */
-	beq	B, Ldotrap			/* division by zero! */
-
-	cmpult	A, B, CC			/* A < B? */
-	/* RESULT is already zero, from above.  A is untouched. */
-	bne	CC, Lret_result
-
-	cmpeq	A, B, CC			/* A == B? */
-	cmovne	CC, 1, RESULT
-	cmovne	CC, zero, A
-	bne	CC, Lret_result
-
-	/*
-	 * Find out how many bits of zeros are at the beginning of the divisor.
-	 */
-LBbits:
-	ldiq	T_0, 1				/* I = 0; BIT = 1<<WORDSIZE-1 */
-	mov	zero, I
-	sll	T_0, WORDSIZE-1, BIT
-LBloop:
-	and	B, BIT, CC			/* if bit in B is set, done. */
-	bne	CC, LAbits
-	addq	I, 1, I				/* increment I, shift bit */
-	srl	BIT, 1, BIT
-	cmplt	I, WORDSIZE-1, CC		/* if I leaves one bit, done. */
-	bne	CC, LBloop
-
-LAbits:
-	beq	I, Ldodiv			/* If I = 0, divide now.  */
-	ldiq	T_0, 1				/* BIT = 1<<WORDSIZE-1 */
-	sll	T_0, WORDSIZE-1, BIT
-
-LAloop:
-	and	A, BIT, CC			/* if bit in A is set, done. */
-	bne	CC, Ldodiv
-	subq	I, 1, I				/* decrement I, shift bit */
-	srl     BIT, 1, BIT 
-	bne	I, LAloop			/* If I != 0, loop again */
-
-Ldodiv:
-	sll	B, I, B				/* B <<= i */
-	ldiq	T_0, 1
-	sll	T_0, I, BIT
-
-Ldivloop:
-	cmpult	A, B, CC
-	or	RESULT, BIT, T_0
-	cmoveq	CC, T_0, RESULT
-	subq	A, B, T_0
-	cmoveq	CC, T_0, A
-	srl	BIT, 1, BIT	
-	srl	B, 1, B
-	beq	A, Lret_result
-	bne	BIT, Ldivloop
-
-Lret_result:
-ifelse(OP, `div',
-`', `	mov	A, RESULT
-')
-ifelse(S, `true',
-`
-	/* Check to see if we should negate it. */
-	subq	zero, RESULT, T_0
-	cmovlbs	NEG, T_0, RESULT
-')
-
-	ldq	BIT, 0(sp)
-	ldq	I, 8(sp)
-	ldq	CC, 16(sp)
-	ldq	T_0, 24(sp)
-ifelse(S, `true',
-`	ldq	NEG, 32(sp)')
-	ldq	A, 40(sp)
-	ldq	B, 48(sp)
-	lda	sp, 64(sp)
-	ret	zero, (t9), 1
-
-Ldotrap:
-	ldiq	a0, -2			/* This is the signal to SIGFPE! */
-	call_pal PAL_gentrap
-ifelse(OP, `div',
-`', `	mov	zero, A			/* so that zero will be returned */
-')
-	br	zero, Lret_result
-
-END(NAME)
--- lib/libc/alpha/gen/_ctx_start.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2001 Daniel Eischen <deischen at freebsd.org>
- * All rights reserved.
- *
- * 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. Neither the name of the author 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 AUTHOR 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 AUTHOR 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 <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/_ctx_start.S,v 1.2 2003/01/19 00:17:02 obrien Exp $");
-
-/*
- * A0-A5 are the first 6 arguments to the start routine with the
- * remaining arguments (if any) placed on the stack.  S0 is the
- * address of the user-supplied start routine, and S1 is the pointer
- * to the ucontext.
- */
-	.set	noreorder
-LEAF(_ctx_start,0)
-	mov	s0, t12
-	jsr	ra, (s0)	/* call start routine; args already set */
-	LDGP(ra)
-	mov	s1, a0		/* load A0 (arg 1) with pointer to ucontext */
-	CALL(_ctx_done)		/* call context completion routine */
-	CALL(abort)		/* should never return from above call */
-	RET
-END(_ctx_start)
--- lib/libc/alpha/gen/_setjmp.S
+++ /dev/null
@@ -1,127 +0,0 @@
-/*	$NetBSD: _setjmp.S,v 1.2 1996/10/17 03:08:03 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/_setjmp.S,v 1.9 2003/01/19 00:17:02 obrien Exp $");
-
-/*
- * C library -- _setjmp, _longjmp
- *
- *	_longjmp(a,v)
- * will generate a "return(v)" from
- * the last call to
- *	_setjmp(a)
- * by restoring registers from the stack,
- * The previous signal state is NOT restored.
- */
-
-	.set	noreorder
-
-LEAF(_setjmp, 1)
-	LDGP(pv)
-	stq	ra, (2 * 8)(a0)			/* sc_pc = return address */
-	stq	s0, (( 9 + 4) * 8)(a0)		/* saved bits of sc_regs */
-	stq	s1, ((10 + 4) * 8)(a0)
-	stq	s2, ((11 + 4) * 8)(a0)
-	stq	s3, ((12 + 4) * 8)(a0)
-	stq	s4, ((13 + 4) * 8)(a0)
-	stq	s5, ((14 + 4) * 8)(a0)
-	stq	s6, ((15 + 4) * 8)(a0)
-	stq	ra, ((26 + 4) * 8)(a0)
-	stq	t12,((27 + 4) * 8)(a0)
-	stq	sp, ((30 + 4) * 8)(a0)
-	ldiq	t0, 0xacedbadd			/* sigcontext magic number */
-	stq	t0, ((31 + 4) * 8)(a0)		/* magic in sc_regs[31] */
-	/* Too bad we can't check if we actually used FP */
-	ldiq	t0, 1
-	stq	t0, (36 * 8)(a0)		/* say we've used FP.  */
-	stt	fs0, ((2 + 37) * 8)(a0)		/* saved bits of sc_fpregs */
-	stt	fs1, ((3 + 37) * 8)(a0)
-	stt	fs2, ((4 + 37) * 8)(a0)
-	stt	fs3, ((5 + 37) * 8)(a0)
-	stt	fs4, ((6 + 37) * 8)(a0)
-	stt	fs5, ((7 + 37) * 8)(a0)
-	stt	fs6, ((8 + 37) * 8)(a0)
-	stt	fs7, ((9 + 37) * 8)(a0)
-	mf_fpcr ft0				/* get FP control reg */
-	stt	ft0, (69 * 8)(a0)		/* and store it in sc_fpcr */
-	stq	zero, (70 * 8)(a0)		/* FP software control XXX */
-	stq	zero, (71 * 8)(a0)		/* sc_reserved[0] */
-	stq	zero, (72 * 8)(a0)		/* sc_reserved[1] */
-	stq	zero, (73 * 8)(a0)		/* sc_xxx[0] */
-	stq	zero, (74 * 8)(a0)		/* sc_xxx[1] */
-	stq	zero, (75 * 8)(a0)		/* sc_xxx[2] */
-	stq	zero, (76 * 8)(a0)		/* sc_xxx[3] */
-	stq	zero, (77 * 8)(a0)		/* sc_xxx[4] */
-	stq	zero, (78 * 8)(a0)		/* sc_xxx[5] */
-	stq	zero, (79 * 8)(a0)		/* sc_xxx[6] */
-	stq	zero, (80 * 8)(a0)		/* sc_xxx[7] */
-
-	mov	zero, v0			/* return zero */
-	RET
-END(_setjmp)
-
-XLEAF(_longjmp, 2)
-LEAF(___longjmp, 2)
-	LDGP(pv)
-	ldq	t0, ((31 + 4) * 8)(a0)		/* magic in sc_regs[31] */
-	ldiq	t1, 0xacedbadd
-	cmpeq	t0, t1, t0
-	beq	t0, botch			/* If the magic was bad, punt */
-
-	ldq	ra, (2 * 8)(a0)			/* sc_pc = return address */
-	ldq	s0, (( 9 + 4) * 8)(a0)		/* saved bits of sc_regs */
-	ldq	s1, ((10 + 4) * 8)(a0)
-	ldq	s2, ((11 + 4) * 8)(a0)
-	ldq	s3, ((12 + 4) * 8)(a0)
-	ldq	s4, ((13 + 4) * 8)(a0)
-	ldq	s5, ((14 + 4) * 8)(a0)
-	ldq	s6, ((15 + 4) * 8)(a0)
-	/* ldq	ra, ((26 + 4) * 8)(a0)		set above */
-	ldq	t12,((27 + 4) * 8)(a0)
-	ldq	sp, ((30 + 4) * 8)(a0)
-	ldt	fs0, ((2 + 37) * 8)(a0)		/* saved bits of sc_fpregs */
-	ldt	fs1, ((3 + 37) * 8)(a0)
-	ldt	fs2, ((4 + 37) * 8)(a0)
-	ldt	fs3, ((5 + 37) * 8)(a0)
-	ldt	fs4, ((6 + 37) * 8)(a0)
-	ldt	fs5, ((7 + 37) * 8)(a0)
-	ldt	fs6, ((8 + 37) * 8)(a0)
-	ldt	fs7, ((9 + 37) * 8)(a0)
-	ldt	ft0, (69 * 8)(a0)		/* get sc_fpcr */
-	mt_fpcr	ft0				/* and restore it. */
-
-	mov	a1, v0				/* return second arg */
-	RET
-
-botch:
-	CALL(longjmperror)
-	CALL(abort)
-	RET					/* "can't" get here... */
-END(___longjmp)
--- lib/libc/alpha/gen/infinity.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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.
- *
- *	$NetBSD: infinity.c,v 1.1 1995/02/10 17:50:23 cgd Exp $
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/infinity.c,v 1.7 2003/02/08 20:37:48 mike Exp $");
-
-#include <math.h>
-
-/* bytes for +Infinity on an Alpha (IEEE double format) */
-const union __infinity_un __infinity = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
-
-/* bytes for NaN */
-const union __nan_un __nan = { { 0, 0, 0xc0, 0xff } };
--- lib/libc/alpha/gen/sigsetjmp.S
+++ /dev/null
@@ -1,64 +0,0 @@
-/*	$NetBSD: sigsetjmp.S,v 1.2 1996/10/17 03:08:07 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/sigsetjmp.S,v 1.8 2003/01/19 00:17:02 obrien Exp $");
-
-/*
- * C library -- sigsetjmp, siglongjmp
- *
- *	siglongjmp(a,v)
- * will generate a "return(v)" from
- * the last call to
- *	sigsetjmp(a, mask)
- * by restoring registers from the stack.
- * If `mask' is non-zero, the previous signal
- * state will be restored.
- */
-
-	.set	noreorder
-
-LEAF(sigsetjmp, 2)
-	LDGP(pv)
-	stq	a1, (81 * 8)(a0)		/* save the mask */
-	bne	a1, Lsavesig			/* if !zero, save signals */
-	jmp	zero, _setjmp				/* else don't. */
-Lsavesig:
-	jmp	zero, setjmp
-END(sigsetjmp)
-
-XLEAF(siglongjmp, 2)
-LEAF(__siglongjmp, 2)
-	LDGP(pv)
-	ldq	t0, (81 * 8)(a0)		/* get the mask */
-	bne	t0, Lrestoresig			/* if !zero, restore signals */
-	jmp	zero, ___longjmp
-Lrestoresig:
-	jmp	zero, __longjmp
-END(__siglongjmp)
--- lib/libc/alpha/gen/setjmp.S
+++ /dev/null
@@ -1,138 +0,0 @@
-/*	$NetBSD: setjmp.S,v 1.3 1997/12/05 02:06:27 thorpej Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/setjmp.S,v 1.17 2003/11/14 03:21:22 jeff Exp $");
-
-#include "SYS.h"
-
-/*
- * C library -- setjmp, longjmp
- *
- *	longjmp(a,v)
- * will generate a "return(v)" from
- * the last call to
- *	setjmp(a)
- * by restoring registers from the stack,
- * and the previous signal state.
- */
-
-	.set	noreorder
-
-LEAF(setjmp, 1)
-	LDGP(pv)
-	stq	ra, (2 * 8)(a0)			/* sc_pc = return address */
-	stq	s0, (( 9 + 4) * 8)(a0)		/* saved bits of sc_regs */
-	stq	s1, ((10 + 4) * 8)(a0)
-	stq	s2, ((11 + 4) * 8)(a0)
-	stq	s3, ((12 + 4) * 8)(a0)
-	stq	s4, ((13 + 4) * 8)(a0)
-	stq	s5, ((14 + 4) * 8)(a0)
-	stq	s6, ((15 + 4) * 8)(a0)
-	stq	ra, ((26 + 4) * 8)(a0)
-	stq	t12,((27 + 4) * 8)(a0)
-	stq	sp, ((30 + 4) * 8)(a0)
-
-	/*
-	 * get signal information
-	 */
-	mov	a0, s0				/* squirrel away ptr to sc */
-
-	/* see what's blocked */
-	lda	a2, (71 * 8)(a0)		/* oset: sc_reserved */
-	mov	zero, a1			/* set:	 NULL */
-	addq	a1, 1, a0			/* how:	 SIG_BLOCK */
-	CALL(_sigprocmask)			/* see what's blocked */
-
-	lda	sp, -24(sp)			/* sizeof struct sigaltstack */
-	mov	zero, a0
-	mov	sp, a1
-	CALL(_sigaltstack)
-	ldl	t0, 16(sp)			/* offset of ss_flags */
-	lda	sp, 24(sp)			/* sizeof struct sigaltstack */
-	ldq	ra, ((26 + 4) * 8)(s0)		/* restore return address */
-	blt	v0, botch			/* check for error */
-	and	t0, 0x1, t0			/* get SA_ONSTACK flag */
-	stq	t0, (0 * 8)(s0)			/* and save it in sc_onstack */
-	/*
-	 * Restore old s0 and a0, and continue saving registers
-	 */
-	mov	s0, a0
-	ldq	s0, (( 9 + 4) * 8)(a0)
-
-	ldiq	t0, 0xacedbadd			/* sigcontext magic number */
-	stq	t0, ((31 + 4) * 8)(a0)		/* magic in sc_regs[31] */
-	/* Too bad we can't check if we actually used FP */
-	ldiq	t0, 1
-	stq	t0, (36 * 8)(a0)		/* say we've used FP.  */
-	stt	fs0, ((2 + 37) * 8)(a0)		/* saved bits of sc_fpregs */
-	stt	fs1, ((3 + 37) * 8)(a0)
-	stt	fs2, ((4 + 37) * 8)(a0)
-	stt	fs3, ((5 + 37) * 8)(a0)
-	stt	fs4, ((6 + 37) * 8)(a0)
-	stt	fs5, ((7 + 37) * 8)(a0)
-	stt	fs6, ((8 + 37) * 8)(a0)
-	stt	fs7, ((9 + 37) * 8)(a0)
-	mf_fpcr	ft0				/* get FP control reg */
-	stt	ft0, (69 * 8)(a0)		/* and store it in sc_fpcr */
-	stq	zero, (70 * 8)(a0)		/* FP software control XXX */
-	stq	zero, (71 * 8)(a0)		/* sc_reserved[0] */
-	stq	zero, (72 * 8)(a0)		/* sc_reserved[1] */
-	stq	zero, (73 * 8)(a0)		/* sc_xxx[0] */
-	stq	zero, (74 * 8)(a0)		/* sc_xxx[1] */
-	stq	zero, (75 * 8)(a0)		/* sc_xxx[2] */
-	stq	zero, (76 * 8)(a0)		/* sc_xxx[3] */
-	stq	zero, (77 * 8)(a0)		/* sc_xxx[4] */
-	stq	zero, (78 * 8)(a0)		/* sc_xxx[5] */
-	stq	zero, (79 * 8)(a0)		/* sc_xxx[6] */
-	stq	zero, (80 * 8)(a0)		/* sc_xxx[7] */
-
-	mov	zero, v0			/* return zero */
-	RET
-END(setjmp)
-
-XLEAF(longjmp, 2)
-LEAF(__longjmp, 2)
-	LDGP(pv)
-	mov	a1, s1				/* save return value */
-	mov	a0, s0				/* save the sc pointer */
-	/* restore the mask */
-	mov	zero, a2			/* oset:  NULL */
-	lda	a1, (71 * 8)(a0)		/* set: sc_reserved */
-	addq	a2, 3, a0			/* how:	 SIG_SET */
-	CALL(_sigprocmask)			/* restore the mask */
-	mov	s0, a0				/* restore the sc pointer */
-	mov	s1, a1				/* restore the return value */
-	jmp	zero, ___longjmp		/* use ___longjmp to return */
-
-botch:
-	CALL(longjmperror)
-	CALL(abort)
-	RET					/* "can't" get here... */
-END(__longjmp)
--- lib/libc/alpha/gen/flt_rounds.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1995 Christopher G. Demetriou
- * All rights reserved.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Christopher G. Demetriou
- *	for the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- *	$NetBSD: flt_rounds.c,v 1.2 1997/07/18 00:30:30 thorpej Exp $
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/flt_rounds.c,v 1.4 2004/03/16 20:41:12 des Exp $");
-
-#include <sys/types.h>
-#include <machine/float.h>
-
-static const int map[] = {
-	0,	/* round to zero */
-	3,	/* round to negative infinity */
-	1,	/* round to nearest */
-	2	/* round to positive infinity */
-};
-
-int
-__flt_rounds()
-{
-	union {
-		double fpcrval;
-		u_int64_t intval;
-	} u;
-
-	__asm__("trapb");
-	__asm__("mf_fpcr %0" : "=f" (u.fpcrval));
-	__asm__("trapb");
-
-	return map[(u.intval >> 58) & 0x3];
-}
--- lib/libc/alpha/gen/fpsetround.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1995 Christopher G. Demetriou
- * All rights reserved.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Christopher G. Demetriou
- *	for the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- *	$NetBSD: fpsetround.c,v 1.1 1995/04/29 05:09:57 cgd Exp $
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/fpsetround.c,v 1.6 2004/03/16 20:41:12 des Exp $");
-
-#include <sys/types.h>
-#include <ieeefp.h>
-#include <machine/fpu.h>
-
-fp_rnd_t
-fpsetround(rnd_dir)
-	fp_rnd_t rnd_dir;
-{
-	union {
-		double fpcrval;
-		u_int64_t intval;
-	} u;
-	u_int64_t old, new;
-
-	GET_FPCR(u.fpcrval);
-
-	old = u.intval;
-	new = old & (~FPCR_DYN_MASK);
-	new |= ((long) rnd_dir << FPCR_DYN_SHIFT) & FPCR_DYN_MASK;
-
-	u.intval = new;
-	SET_FPCR(u.fpcrval);
-
-	return ((old & FPCR_DYN_MASK) >> FPCR_DYN_SHIFT);
-}
--- lib/libc/alpha/gen/fabs.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/*	$NetBSD: fabs.S,v 1.2 1996/10/17 03:08:05 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/fabs.S,v 1.3 2003/01/19 00:17:02 obrien Exp $");
-
-LEAF(fabs, 1)
-	cpys	fzero, fa0, fv0
-	RET
-END(fabs)
--- lib/libc/alpha/gen/signalcontext.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2003 Marcel Moolenaar
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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 <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/signalcontext.c,v 1.1 2003/08/09 05:37:54 deischen Exp $");
-
-#include <sys/param.h>
-#include <sys/ucontext.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <strings.h>
-
-typedef void (*handler_t)(uint64_t, uint64_t, uint64_t);
-
-/* Prototypes */
-static void ctx_wrapper(ucontext_t *ucp, handler_t func, uint64_t *args);
-
-__weak_reference(__signalcontext, signalcontext);
-
-int
-__signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func)
-{
-	uint64_t *args;
-	siginfo_t *sig_si;
-	ucontext_t *sig_uc;
-	uint64_t sp;
-
-	/* Bail out if we don't have a valid ucontext pointer. */
-	if (ucp == NULL)
-		abort();
-
-	/*
-	 * Build a signal frame and copy the arguments of signal handler
-	 * 'func' onto the stack. We only need 3 arguments, but we
-	 * create room for 4 so that we are 16-byte aligned.
-	 */
-	sp = (ucp->uc_mcontext.mc_regs[FRAME_SP] - sizeof(ucontext_t)) & ~15UL;
-	sig_uc = (ucontext_t *)sp;
-	bcopy(ucp, sig_uc, sizeof(*sig_uc));
-	sp = (sp - sizeof(siginfo_t)) & ~15UL;
-	sig_si = (siginfo_t *)sp;
-	bzero(sig_si, sizeof(*sig_si));
-	sig_si->si_signo = sig;
-	sp -= 4 * sizeof(uint64_t);
-	args = (uint64_t *)sp;
-	args[0] = sig;
-	args[1] = (intptr_t)sig_si;
-	args[2] = (intptr_t)sig_uc;
-	args[3] = 0;
-
-	/*
-	 * Setup the ucontext of the signal handler.
-	 */
-	bzero(&ucp->uc_mcontext, sizeof(ucp->uc_mcontext));
-	ucp->uc_link = sig_uc;
-	sigdelset(&ucp->uc_sigmask, sig);
-
-	ucp->uc_mcontext.mc_format = _MC_REV0_TRAPFRAME;
-	ucp->uc_mcontext.mc_regs[FRAME_A0] = (register_t)ucp;
-	ucp->uc_mcontext.mc_regs[FRAME_A1] = (register_t)func;
-	ucp->uc_mcontext.mc_regs[FRAME_A1] = (register_t)args;
-	ucp->uc_mcontext.mc_regs[FRAME_SP] = (register_t)sp;
-	ucp->uc_mcontext.mc_regs[FRAME_PC] = (register_t)ctx_wrapper;
-	ucp->uc_mcontext.mc_regs[FRAME_RA] = (register_t)ctx_wrapper;
-	ucp->uc_mcontext.mc_regs[FRAME_T12] = (register_t)ctx_wrapper;
-	return (0);
-}
-
-static void
-ctx_wrapper(ucontext_t *ucp, handler_t func, uint64_t *args)
-{
-
-	(*func)(args[0], args[1], args[2]);
-	if (ucp->uc_link == NULL)
-		exit(0);
-	setcontext((const ucontext_t *)ucp->uc_link);
-	/* should never get here */
-	abort();
-	/* NOTREACHED */
-}
--- lib/libc/alpha/gen/rfork_thread.S
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * Copyright (c) 2000 Peter Wemm <peter at FreeBSD.org>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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 <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/rfork_thread.S,v 1.2 2003/01/19 00:17:02 obrien Exp $");
-
-#include "SYS.h"
-#include <sys/syscall.h>
-/* #include <machine/pal.h> */
-
-/*
- * This is pretty evil and based mostly on examples from other syscall
- * stubs and code that gcc generated.   Correctness is uncertain, but it
- * seems to work quite happily.
- */
-LEAF(rfork_thread, 1)
-	br gp,L1			/* XXX profiling */
-L1:
-        LDGP(pv)
-	lda sp,-16(sp)
-	stq ra,0(sp)
-	mov a3,a5
-	CALLSYS_ERROR(rfork)
-        beq v0,$child
-	addl v0,zero,v0
-	ldq ra,0(sp)
-	lda sp,16(sp)
-	RET
-$child:
-	mov a1,sp
-	lda sp,-16(sp)
-	stq zero,0(sp)
-	mov a5,a0
-	mov a2,t12
-	jsr ra,(t12),0
-	ldgp gp,0(ra)
-	mov v0,a0
-#ifdef SYS_exit
-	CALLSYS_NOERROR(exit)
-#else
-	CALLSYS_NOERROR(sys_exit)
-#endif
-END(rfork_thread)
--- lib/libc/alpha/gen/fpgetround.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1995 Christopher G. Demetriou
- * All rights reserved.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Christopher G. Demetriou
- *	for the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- *	$NetBSD: fpgetround.c,v 1.1 1995/04/29 05:09:55 cgd Exp $
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/fpgetround.c,v 1.6 2004/03/16 20:41:12 des Exp $");
-
-#include <sys/types.h>
-#include <ieeefp.h>
-#include <machine/fpu.h>
-
-fp_rnd_t
-fpgetround()
-{
-	union {
-		double fpcrval;
-		u_int64_t intval;
-	} u;
-
-	GET_FPCR(u.fpcrval);
-
-	return ((u.intval & FPCR_DYN_MASK) >> FPCR_DYN_SHIFT);
-}
--- lib/libc/alpha/gen/makecontext.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 2001 Daniel M. Eischen <deischen at freebsd.org>
- * All rights reserved.
- *
- * 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. Neither the name of the author 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 AUTHOR 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 AUTHOR 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 <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/makecontext.c,v 1.4 2004/01/06 19:28:07 nectar Exp $");
-
-#include <sys/param.h>
-#include <sys/signal.h>
-
-#include <errno.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ucontext.h>
-#include <unistd.h>
-
-
-/* Prototypes */
-extern void _ctx_start(int argc, ...);
-
-
-__weak_reference(__makecontext, makecontext);
-
-void
-_ctx_done (ucontext_t *ucp)
-{
-	if (ucp->uc_link == NULL)
-		exit(0);
-	else {
-		/*
-		 * Since this context has finished, don't allow it
-		 * to be restarted without being reinitialized (via
-		 * setcontext or swapcontext).
-		 */
-		ucp->uc_mcontext.mc_format = 0;
-
-		/* Set context to next one in link */
-		/* XXX - what to do for error, abort? */
-		setcontext((const ucontext_t *)ucp->uc_link);
-		abort();	/* should never get here */
-	}
-}
-
-void
-__makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...)
-{
-	va_list 	ap;
-	char		*stack_top;
-	intptr_t	*argp;
-	int		i;
-
-	if (ucp == NULL)
-		return;
-	else if ((ucp->uc_stack.ss_sp == NULL) ||
-	    (ucp->uc_stack.ss_size < MINSIGSTKSZ)) {
-		/*
-		 * This should really return -1 with errno set to ENOMEM
-		 * or something, but the spec says that makecontext is
-		 * a void function.   At least make sure that the context
-		 * isn't valid so it can't be used without an error.
-		 */
-		ucp->uc_mcontext.mc_format = 0;
-	}
-	/* XXX - Do we want to sanity check argc? */
-	else if ((argc < 0) || (argc > NCARGS)) {
-		ucp->uc_mcontext.mc_format = 0;
-	}
-	/*
-	 * Make sure the context is valid.  For now, we only allow
-	 * trapframe format contexts to be used for makecontext.
-	 */
-	else if (ucp->uc_mcontext.mc_format == _MC_REV0_TRAPFRAME) {
-		/*
-		 * Alpha passes the first 6 parameters in registers and
-		 * remaining parameters on the stack.  Set up the context
-		 * accordingly, with the user start routine in register
-		 * S0, and the context start wrapper (_ctx_start) in the
-		 * program counter and return address.  The context must
-		 * be in trapframe format.
-		 *
-		 * Note: The context start wrapper needs to retrieve the
-		 *       ucontext pointer.  Place this in register S1
-		 *       which must be saved by the callee.
-		 */
-		stack_top = (char *)(ucp->uc_stack.ss_sp +
-		    ucp->uc_stack.ss_size - sizeof(double));
-		stack_top = (char *)ALIGN(stack_top);
-
-		/*
-		 * Adjust top of stack to allow for any additional integer
-		 * arguments beyond 6.
-		 */
-		if (argc > 6)
-			stack_top = stack_top - (sizeof(intptr_t) * (argc - 6));
-
-		argp = (intptr_t *)stack_top;
-
-		va_start(ap, argc);
-		for (i = 0; i < argc; i++) {
-			switch (i) {
-			case 0:	ucp->uc_mcontext.mc_regs[FRAME_A0] =
-				    (unsigned long)va_arg(ap, intptr_t);
-				break;
-
-			case 1: ucp->uc_mcontext.mc_regs[FRAME_A1] =
-				    (unsigned long)va_arg(ap, intptr_t);
-				break;
-
-			case 2:	ucp->uc_mcontext.mc_regs[FRAME_A2] =
-				    (unsigned long)va_arg(ap, intptr_t);
-				break;
-
-			case 3:	ucp->uc_mcontext.mc_regs[FRAME_A3] =
-				    (unsigned long)va_arg(ap, intptr_t);
-				break;
-
-			case 4:	ucp->uc_mcontext.mc_regs[FRAME_A4] =
-				    (unsigned long)va_arg(ap, intptr_t);
-				break;
-
-			case 5:	ucp->uc_mcontext.mc_regs[FRAME_A5] =
-				    (unsigned long)va_arg(ap, intptr_t);
-				break;
-
-			default:
-				*argp = va_arg(ap, intptr_t);
-				argp++;
-				break;
-			}
-		}
-		va_end(ap);
-
-		/*
-		 * The start routine and ucontext are placed in registers
-		 * S0 and S1 respectively.
-		 */
-		ucp->uc_mcontext.mc_regs[FRAME_S0] = (unsigned long)start;
-		ucp->uc_mcontext.mc_regs[FRAME_S1] = (unsigned long)ucp;
-
-		/*
-		 * Set the machine context to point to the top of the stack,
-		 * and the program counter and return address to the context
-		 * start wrapper.
-		 */
-		ucp->uc_mcontext.mc_regs[FRAME_SP] = (unsigned long)stack_top;
-		ucp->uc_mcontext.mc_regs[FRAME_PC] = (unsigned long)_ctx_start;
-		ucp->uc_mcontext.mc_regs[FRAME_RA] = (unsigned long)_ctx_start;
-		ucp->uc_mcontext.mc_regs[FRAME_T12] = (unsigned long)_ctx_start;
-	}
-}
--- lib/libc/alpha/gen/_set_tp.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*-
- * Copyright (c) 2004 Doug Rabson
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- *	$FreeBSD: src/lib/libc/alpha/gen/_set_tp.c,v 1.2 2004/08/16 08:12:29 dfr Exp $
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/_set_tp.c,v 1.2 2004/08/16 08:12:29 dfr Exp $");
-
-#include <sys/types.h>
-#include <machine/alpha_cpu.h>
-
-void
-_set_tp(void *tp)
-{
-
-    alpha_pal_wrunique((uintptr_t) tp);
-}
--- lib/libc/alpha/gen/Makefile.inc
+++ /dev/null
@@ -1,47 +0,0 @@
-# $FreeBSD: src/lib/libc/alpha/gen/Makefile.inc,v 1.16 2005/03/15 15:53:38 das Exp $
-
-SRCS+=	_setjmp.S _set_tp.c fabs.S infinity.c ldexp.c modf.c setjmp.S
-SRCS+=	flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
-	fpsetround.c
-
-SRCS+=	sigsetjmp.S
-SRCS+=	__divqu.S __divq.S __divlu.S __divl.S
-SRCS+=	__remqu.S __remq.S __remlu.S __reml.S
-SRCS+=	rfork_thread.S
-SRCS+=	_ctx_start.S makecontext.c signalcontext.c
-
-CLEANFILES+=	__divqu.S __divq.S __divlu.S __divl.S
-CLEANFILES+=	__remqu.S __remq.S __remlu.S __reml.S
-
-
-__divqu.S: ${.CURDIR}/alpha/gen/divrem.m4
-	m4 -DNAME=__divqu -DOP=div -DS=false -DWORDSIZE=64 \
-		${.ALLSRC} > ${.TARGET}
-
-__divq.S: ${.CURDIR}/alpha/gen/divrem.m4
-	m4 -DNAME=__divq -DOP=div -DS=true -DWORDSIZE=64 \
-		${.ALLSRC} > ${.TARGET}
-
-__divlu.S: ${.CURDIR}/alpha/gen/divrem.m4
-	m4 -DNAME=__divlu -DOP=div -DS=false -DWORDSIZE=32 \
-		${.ALLSRC} > ${.TARGET}
-
-__divl.S: ${.CURDIR}/alpha/gen/divrem.m4
-	m4 -DNAME=__divl -DOP=div -DS=true -DWORDSIZE=32 \
-		${.ALLSRC} > ${.TARGET}
-
-__remqu.S: ${.CURDIR}/alpha/gen/divrem.m4
-	m4 -DNAME=__remqu -DOP=rem -DS=false -DWORDSIZE=64 \
-		${.ALLSRC} > ${.TARGET}
-
-__remq.S: ${.CURDIR}/alpha/gen/divrem.m4
-	m4 -DNAME=__remq -DOP=rem -DS=true -DWORDSIZE=64 \
-		${.ALLSRC} > ${.TARGET}
-
-__remlu.S: ${.CURDIR}/alpha/gen/divrem.m4
-	m4 -DNAME=__remlu -DOP=rem -DS=false -DWORDSIZE=32 \
-		${.ALLSRC} > ${.TARGET}
-
-__reml.S: ${.CURDIR}/alpha/gen/divrem.m4
-	m4 -DNAME=__reml -DOP=rem -DS=true -DWORDSIZE=32 \
-		${.ALLSRC} > ${.TARGET}
--- lib/libc/alpha/gen/fpsetmask.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1995 Christopher G. Demetriou
- * All rights reserved.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Christopher G. Demetriou
- *	for the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- *	$NetBSD: fpsetmask.c,v 1.1 1995/04/29 05:11:01 cgd Exp $
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/fpsetmask.c,v 1.5 2004/01/09 16:52:08 nectar Exp $");
-
-#include <sys/types.h>
-#include <ieeefp.h>
-#include <machine/sysarch.h>
-
-struct params {
-	u_int64_t mask;
-};
-
-fp_except_t
-fpsetmask(mask)
-	fp_except_t mask;
-{
-	struct params p;
-
-	p.mask = (u_int64_t) mask;
-	sysarch(ALPHA_SET_FPMASK, &p);
-	return ((fp_except_t) p.mask);
-}
--- lib/libc/alpha/gen/modf.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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.
- *
- *	$NetBSD: modf.c,v 1.1 1995/02/10 17:50:25 cgd Exp $
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/modf.c,v 1.3 2001/11/07 22:12:52 obrien Exp $");
-
-#include <sys/types.h>
-#include <machine/ieee.h>
-#include <errno.h>
-#include <math.h>
-
-/*
- * double modf(double val, double *iptr)
- * returns: f and i such that |f| < 1.0, (f + i) = val, and
- *	sign(f) == sign(i) == sign(val).
- *
- * Beware signedness when doing subtraction, and also operand size!
- */
-double
-modf(val, iptr)
-	double val, *iptr;
-{
-	union doub {
-		double v;
-		struct ieee_double s;
-	} u, v;
-	u_int64_t frac;
-
-	/*
-	 * If input is Inf or NaN, return it and leave i alone.
-	 */
-	u.v = val;
-	if (u.s.dbl_exp == DBL_EXP_INFNAN)
-		return (u.v);
-
-	/*
-	 * If input can't have a fractional part, return
-	 * (appropriately signed) zero, and make i be the input.
-	 */
-	if ((int)u.s.dbl_exp - DBL_EXP_BIAS > DBL_FRACBITS - 1) {
-		*iptr = u.v;
-		v.v = 0.0;
-		v.s.dbl_sign = u.s.dbl_sign;
-		return (v.v);
-	}
-
-	/*
-	 * If |input| < 1.0, return it, and set i to the appropriately
-	 * signed zero.
-	 */
-	if (u.s.dbl_exp < DBL_EXP_BIAS) {
-		v.v = 0.0;
-		v.s.dbl_sign = u.s.dbl_sign;
-		*iptr = v.v;
-		return (u.v);
-	}
-
-	/*
-	 * There can be a fractional part of the input.
-	 * If you look at the math involved for a few seconds, it's
-	 * plain to see that the integral part is the input, with the
-	 * low (DBL_FRACBITS - (exponent - DBL_EXP_BIAS)) bits zeroed,
-	 * the the fractional part is the part with the rest of the
-	 * bits zeroed.  Just zeroing the high bits to get the
-	 * fractional part would yield a fraction in need of
-	 * normalization.  Therefore, we take the easy way out, and
-	 * just use subtraction to get the fractional part.
-	 */
-	v.v = u.v;
-	/* Zero the low bits of the fraction, the sleazy way. */
-	frac = ((u_int64_t)v.s.dbl_frach << 32) + v.s.dbl_fracl;
-	frac >>= DBL_FRACBITS - (u.s.dbl_exp - DBL_EXP_BIAS);
-	frac <<= DBL_FRACBITS - (u.s.dbl_exp - DBL_EXP_BIAS);
-	v.s.dbl_fracl = frac & 0xffffffff;
-	v.s.dbl_frach = frac >> 32;
-	*iptr = v.v;
-
-	u.v -= v.v;
-	u.s.dbl_sign = v.s.dbl_sign;
-	return (u.v);
-}
--- lib/libc/alpha/gen/fpgetsticky.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1995 Christopher G. Demetriou
- * All rights reserved.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Christopher G. Demetriou
- *	for the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- *	$NetBSD: fpgetsticky.c,v 1.1 1995/04/29 05:10:59 cgd Exp $
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/fpgetsticky.c,v 1.5 2004/03/16 20:41:12 des Exp $");
-
-#include <sys/types.h>
-#include <ieeefp.h>
-#include <machine/fpu.h>
-
-fp_except_t
-fpgetsticky()
-{
-	union {
-		double fpcrval;
-		u_int64_t intval;
-	} u;
-
-	GET_FPCR(u.fpcrval);
-	return (((u.intval >> IEEE_STATUS_TO_FPCR_SHIFT) & IEEE_STATUS_MASK)
-					 >> IEEE_STATUS_TO_EXCSUM_SHIFT);
-}
--- lib/libc/alpha/string/ffs.S
+++ /dev/null
@@ -1,92 +0,0 @@
-/*	$NetBSD: ffs.S,v 1.3 1996/10/17 03:08:13 cgd Exp $	*/
-
-/*
- * Copyright (c) 1995 Christopher G. Demetriou
- * All rights reserved.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Christopher G. Demetriou
- *	for the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/string/ffs.S,v 1.2 2003/01/19 00:17:03 obrien Exp $");
-
-LEAF(ffs, 1)
-	addl	a0, 0, t0
-	beq	t0, Lallzero
-
-	/*
-	 * Initialize return value (v0), and set up t1 so that it
-	 * contains the mask with only the lowest bit set.
-	 */
-	subl	zero, t0, t1
-	ldil	v0, 1
-	and	t0, t1, t1
-
-	and	t1, 0xff, t2
-	bne	t2, Ldo8
-
-	/*
-	 * If lower 16 bits empty, add 16 to result and use upper 16.
-	 */
-	zapnot	t1, 0x03, t3
-	bne	t3, Ldo16
-	sra	t1, 16, t1
-	addl	v0, 16, v0
-
-Ldo16:
-	/*
-	 * If lower 8 bits empty, add 8 to result and use upper 8.
-	 */
-	and	t1, 0xff, t4
-	bne	t4, Ldo8
-	sra	t1, 8, t1
-	addl	v0, 8, v0
-
-Ldo8:
-	and	t1, 0x0f, t5		/* lower 4 of 8 empty? */
-	and	t1, 0x33, t6		/* lower 2 of each 4 empty? */
-	and	t1, 0x55, t7		/* lower 1 of each 2 empty? */
-
-	/* If lower 4 bits empty, add 4 to result. */
-	bne	t5, Ldo4
-	addl	v0, 4, v0
-
-Ldo4:	/* If lower 2 bits of each 4 empty, add 2 to result. */
-	bne	t6, Ldo2
-	addl	v0, 2, v0
-
-Ldo2:	/* If lower bit of each 2 empty, add 1 to result. */
-	bne	t7, Ldone
-	addl	v0, 1, v0
-
-Ldone:
-	RET
-
-Lallzero:
-	bis	zero, zero, v0
-	RET
-END(ffs)
--- lib/libc/alpha/string/bzero.S
+++ /dev/null
@@ -1,111 +0,0 @@
-/*	$NetBSD: bzero.S,v 1.2 1996/10/17 03:08:12 cgd Exp $	*/
-
-/*
- * Copyright (c) 1995 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Trevor Blackwell
- *
- * 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/string/bzero.S,v 1.2 2003/01/19 00:17:03 obrien Exp $");
-
-LEAF(bzero,2)
-	ble	a1,bzero_done
-	bic	a1,63,t3	/* t3 is # bytes to do 64 bytes at a time */
-
-	/* If nothing in first word, ignore it */
-	subq	zero,a0,t0
-	and	t0,7,t0		/* t0 = (0-size)%8 */
-	beq	t0,bzero_nostart1
-
-	cmpult	a1,t0,t1	/* if size > size%8 goto noshort */
-	beq	t1,bzero_noshort
-
-	/*
-	 * The whole thing is less than a word.
-	 * Mask off 1..7 bytes, and finish.
-	 */
-	ldq_u	t2,0(a0)
-	lda	t0,-1(zero)	/* t0=-1 */
-	mskql	t0,a1,t0	/* Get ff in bytes (a0%8)..((a0+a1-1)%8) */
-	insql	t0,a0,t0
-	bic	t2,t0,t2	/* zero those bytes in word */
-	stq_u	t2,0(a0)
-	RET
-
-bzero_noshort:
-	/* Handle the first partial word */
-	ldq_u	t2,0(a0)
-	subq	a1,t0,a1
-	mskql	t2,a0,t2	/* zero bytes (a0%8)..7 in word */
-	stq_u	t2,0(a0)
-
-	addq	a0,t0,a0	/* round a0 up to next word */
-	bic	a1,63,t3	/* recalc t3 (# bytes to do 64 bytes at a
-				   time) */
-
-bzero_nostart1:
-	/*
-	 * Loop, zeroing 64 bytes at a time
-	 */
-	beq	t3,bzero_lp_done
-bzero_lp:
-	stq	zero,0(a0)
-	stq	zero,8(a0)
-	stq	zero,16(a0)
-	stq	zero,24(a0)
-	subq	t3,64,t3
-	stq	zero,32(a0)
-	stq	zero,40(a0)
-	stq	zero,48(a0)
-	stq	zero,56(a0)
-	addq	a0,64,a0
-	bne	t3,bzero_lp
-
-bzero_lp_done:
-	/*
-	 * Handle the last 0..7 words.
-	 * We mask off the low bits, so we don't need an extra
-	 * compare instruction for the loop (just a bne. heh-heh)
-	 */
-	and	a1,0x38,t4
-	beq	t4,bzero_finish_lp_done
-bzero_finish_lp:
-	stq	zero,0(a0)
-	subq	t4,8,t4
-	addq	a0,8,a0
-	bne	t4,bzero_finish_lp
-
-	/* Do the last partial word */
-bzero_finish_lp_done:
-	and	a1,7,t5		/* 0..7 bytes left */
-	beq	t5,bzero_done	/* mskqh won't change t0 if t5==0, but I
-				   don't want to touch, say, a new VM page */
-	ldq	t0,0(a0)
-	mskqh	t0,t5,t0
-	stq	t0,0(a0)
-bzero_done:
-	RET
-
-	END(bzero)
--- lib/libc/alpha/string/bcopy.S
+++ /dev/null
@@ -1,289 +0,0 @@
-/*	$NetBSD: bcopy.S,v 1.3 1996/10/17 03:08:11 cgd Exp $	*/
-
-/*
- * Copyright (c) 1995 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Trevor Blackwell.  Support for use as memcpy() and memmove()
- *	   added by Chris 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/string/bcopy.S,v 1.2 2003/01/19 00:17:03 obrien Exp $");
-
-#if defined(MEMCOPY) || defined(MEMMOVE)
-#ifdef MEMCOPY
-#define	FUNCTION	memcpy
-#else
-#define FUNCTION	memmove
-#endif
-#define	SRCREG		a1
-#define	DSTREG		a0
-#else /* !(defined(MEMCOPY) || defined(MEMMOVE)) */
-#define	FUNCTION	bcopy
-#define	SRCREG		a0
-#define	DSTREG		a1
-#endif /* !(defined(MEMCOPY) || defined(MEMMOVE)) */
-
-#define	SIZEREG		a2
-
-/*
- * Copy bytes.
- *
- * void bcopy(char *from, char *to, size_t len);
- * char *memcpy(void *to, const void *from, size_t len);
- * char *memmove(void *to, const void *from, size_t len);
- *
- * No matter how invoked, the source and destination registers
- * for calculation.  There's no point in copying them to "working"
- * registers, since the code uses their values "in place," and
- * copying them would be slower.
- */
-
-LEAF(FUNCTION,3)
-
-#if defined(MEMCOPY) || defined(MEMMOVE)
-	/* set up return value, while we still can */
-	mov	DSTREG,v0
-#endif
-
-	/* Check for negative length */
-	ble	SIZEREG,bcopy_done
-
-	/* Check for overlap */
-	subq	DSTREG,SRCREG,t5
-	cmpult	t5,SIZEREG,t5
-	bne	t5,bcopy_overlap
-
-	/* a3 = end address */
-	addq	SRCREG,SIZEREG,a3
-
-	/* Get the first word */
-	ldq_u	t2,0(SRCREG)
-
-	/* Do they have the same alignment? */
-	xor	SRCREG,DSTREG,t0
-	and	t0,7,t0
-	and	DSTREG,7,t1
-	bne	t0,bcopy_different_alignment
-
-	/* src & dst have same alignment */
-	beq	t1,bcopy_all_aligned
-
-	ldq_u	t3,0(DSTREG)
-	addq	SIZEREG,t1,SIZEREG
-	mskqh	t2,SRCREG,t2
-	mskql	t3,SRCREG,t3
-	or	t2,t3,t2
-
-	/* Dst is 8-byte aligned */
-
-bcopy_all_aligned:
-	/* If less than 8 bytes,skip loop */
-	subq	SIZEREG,1,t0
-	and	SIZEREG,7,SIZEREG
-	bic	t0,7,t0
-	beq	t0,bcopy_samealign_lp_end
-
-bcopy_samealign_lp:
-	stq_u	t2,0(DSTREG)
-	addq	DSTREG,8,DSTREG
-	ldq_u	t2,8(SRCREG)
-	subq	t0,8,t0
-	addq	SRCREG,8,SRCREG
-	bne	t0,bcopy_samealign_lp
-
-bcopy_samealign_lp_end:
-	/* If we're done, exit */
-	bne	SIZEREG,bcopy_small_left
-	stq_u	t2,0(DSTREG)
-	RET
-
-bcopy_small_left:
-	mskql	t2,SIZEREG,t4
-	ldq_u	t3,0(DSTREG)
-	mskqh	t3,SIZEREG,t3
-	or	t4,t3,t4
-	stq_u	t4,0(DSTREG)
-	RET
-
-bcopy_different_alignment:
-	/*
-	 * this is the fun part
-	 */
-	addq	SRCREG,SIZEREG,a3
-	cmpule	SIZEREG,8,t0
-	bne	t0,bcopy_da_finish
-
-	beq	t1,bcopy_da_noentry
-
-	/* Do the initial partial word */
-	subq	zero,DSTREG,t0
-	and	t0,7,t0
-	ldq_u	t3,7(SRCREG)
-	extql	t2,SRCREG,t2
-	extqh	t3,SRCREG,t3
-	or	t2,t3,t5
-	insql	t5,DSTREG,t5
-	ldq_u	t6,0(DSTREG)
-	mskql	t6,DSTREG,t6
-	or	t5,t6,t5
-	stq_u	t5,0(DSTREG)
-	addq	SRCREG,t0,SRCREG
-	addq	DSTREG,t0,DSTREG
-	subq	SIZEREG,t0,SIZEREG
-	ldq_u	t2,0(SRCREG)
-
-bcopy_da_noentry:
-	subq	SIZEREG,1,t0
-	bic	t0,7,t0
-	and	SIZEREG,7,SIZEREG
-	beq	t0,bcopy_da_finish2
-
-bcopy_da_lp:
-	ldq_u	t3,7(SRCREG)
-	addq	SRCREG,8,SRCREG
-	extql	t2,SRCREG,t4
-	extqh	t3,SRCREG,t5
-	subq	t0,8,t0
-	or	t4,t5,t5
-	stq	t5,0(DSTREG)
-	addq	DSTREG,8,DSTREG
-	beq	t0,bcopy_da_finish1
-	ldq_u	t2,7(SRCREG)
-	addq	SRCREG,8,SRCREG
-	extql	t3,SRCREG,t4
-	extqh	t2,SRCREG,t5
-	subq	t0,8,t0
-	or	t4,t5,t5
-	stq	t5,0(DSTREG)
-	addq	DSTREG,8,DSTREG
-	bne	t0,bcopy_da_lp
-
-bcopy_da_finish2:
-	/* Do the last new word */
-	mov	t2,t3
-
-bcopy_da_finish1:
-	/* Do the last partial word */
-	ldq_u	t2,-1(a3)
-	extql	t3,SRCREG,t3
-	extqh	t2,SRCREG,t2
-	or	t2,t3,t2
-	br	zero,bcopy_samealign_lp_end
-
-bcopy_da_finish:
-	/* Do the last word in the next source word */
-	ldq_u	t3,-1(a3)
-	extql	t2,SRCREG,t2
-	extqh	t3,SRCREG,t3
-	or	t2,t3,t2
-	insqh	t2,DSTREG,t3
-	insql	t2,DSTREG,t2
-	lda	t4,-1(zero)
-	mskql	t4,SIZEREG,t5
-	cmovne	t5,t5,t4
-	insqh	t4,DSTREG,t5
-	insql	t4,DSTREG,t4
-	addq	DSTREG,SIZEREG,a4
-	ldq_u	t6,0(DSTREG)
-	ldq_u	t7,-1(a4)
-	bic	t6,t4,t6
-	bic	t7,t5,t7
-	and	t2,t4,t2
-	and	t3,t5,t3
-	or	t2,t6,t2
-	or	t3,t7,t3
-	stq_u	t3,-1(a4)
-	stq_u	t2,0(DSTREG)
-	RET
-
-bcopy_overlap:
-	/*
-	 * Basically equivalent to previous case, only backwards.
-	 * Not quite as highly optimized
-	 */
-	addq	SRCREG,SIZEREG,a3
-	addq	DSTREG,SIZEREG,a4
-
-	/* less than 8 bytes - don't worry about overlap */
-	cmpule	SIZEREG,8,t0
-	bne	t0,bcopy_ov_short
-
-	/* Possibly do a partial first word */
-	and	a4,7,t4
-	beq	t4,bcopy_ov_nostart2
-	subq	a3,t4,a3
-	subq	a4,t4,a4
-	ldq_u	t1,0(a3)
-	subq	SIZEREG,t4,SIZEREG
-	ldq_u	t2,7(a3)
-	ldq	t3,0(a4)
-	extql	t1,a3,t1
-	extqh	t2,a3,t2
-	or	t1,t2,t1
-	mskqh	t3,t4,t3
-	mskql	t1,t4,t1
-	or	t1,t3,t1
-	stq	t1,0(a4)
-
-bcopy_ov_nostart2:
-	bic	SIZEREG,7,t4
-	and	SIZEREG,7,SIZEREG
-	beq	t4,bcopy_ov_lp_end
-
-bcopy_ov_lp:
-	/* This could be more pipelined, but it doesn't seem worth it */
-	ldq_u	t0,-8(a3)
-	subq	a4,8,a4
-	ldq_u	t1,-1(a3)
-	subq	a3,8,a3
-	extql	t0,a3,t0
-	extqh	t1,a3,t1
-	subq	t4,8,t4
-	or	t0,t1,t0
-	stq	t0,0(a4)
-	bne	t4,bcopy_ov_lp
-
-bcopy_ov_lp_end:
-	beq	SIZEREG,bcopy_done
-
-	ldq_u	t0,0(SRCREG)
-	ldq_u	t1,7(SRCREG)
-	ldq_u	t2,0(DSTREG)
-	extql	t0,SRCREG,t0
-	extqh	t1,SRCREG,t1
-	or	t0,t1,t0
-	insql	t0,DSTREG,t0
-	mskql	t2,DSTREG,t2
-	or	t2,t0,t2
-	stq_u	t2,0(DSTREG)
-
-bcopy_done:
-	RET
-
-bcopy_ov_short:
-	ldq_u	t2,0(SRCREG)
-	br	zero,bcopy_da_finish
-
-	END(FUNCTION)
--- lib/libc/alpha/string/Makefile.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-# $FreeBSD: src/lib/libc/alpha/string/Makefile.inc,v 1.2 1999/08/27 23:58:10 peter Exp $
-
-MDSRCS+=	bcopy.S bzero.S ffs.S memcpy.S memmove.S
--- lib/libc/alpha/string/memmove.S
+++ /dev/null
@@ -1,7 +0,0 @@
-/*	$NetBSD: memmove.S,v 1.1 1995/08/13 00:40:48 cgd Exp $	*/
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/string/memmove.S,v 1.2 2003/01/19 00:17:03 obrien Exp $");
-
-#define MEMMOVE
-#include "bcopy.S"
--- lib/libc/alpha/string/memcpy.S
+++ /dev/null
@@ -1,8 +0,0 @@
-/*	$NetBSD: memcpy.S,v 1.1 1995/08/13 00:40:47 cgd Exp $	*/
-
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/string/memcpy.S,v 1.2 2003/01/19 00:17:03 obrien Exp $");
-
-#define MEMCOPY
-#include "bcopy.S"
Index: Makefile
===================================================================
RCS file: /home/cvs/src/lib/libc/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -L lib/libc/Makefile -L lib/libc/Makefile -u -r1.3 -r1.4
--- lib/libc/Makefile
+++ lib/libc/Makefile
@@ -33,9 +33,7 @@
 .include "${.CURDIR}/compat-43/Makefile.inc"
 .include "${.CURDIR}/gdtoa/Makefile.inc"
 .include "${.CURDIR}/gen/Makefile.inc"
-.if ${MACHINE_ARCH} != "powerpc"
 .include "${.CURDIR}/gmon/Makefile.inc"
-.endif
 .include "${.CURDIR}/locale/Makefile.inc"
 .include "${.CURDIR}/ohash/Makefile.inc"
 .include "${.CURDIR}/net/Makefile.inc"
--- lib/libc/alpha/sys/exect.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*	$NetBSD: exect.S,v 1.2 1996/10/17 03:08:18 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/sys/exect.S,v 1.2 2003/01/19 00:17:03 obrien Exp $");
-
-#include "SYS.h"
-
-LEAF(exect, 3)
-	CALLSYS_ERROR(execve)
-	RET
-END(exect)
--- lib/libc/alpha/sys/ptrace.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*	$NetBSD: ptrace.S,v 1.4 1996/11/08 00:51:24 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/sys/ptrace.S,v 1.2 2003/01/19 00:17:03 obrien Exp $");
-
-#include "SYS.h"
-
-LEAF(ptrace, 4)
-	LDGP(pv)
-	stl	zero, errno
-	CALLSYS_ERROR(ptrace)
-	RET
-END(ptrace)
--- lib/libc/alpha/sys/brk.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*	$NetBSD: brk.S,v 1.4 1996/10/17 03:08:15 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/sys/brk.S,v 1.2 2003/01/19 00:17:03 obrien Exp $");
-
-#include "SYS.h"
-
-	.globl	_end
-IMPORT(curbrk, 8)
-
-	.data
-EXPORT(minbrk)
-	.quad	_end
-
-	.text
-LEAF(brk, 1)
-	br	pv, L1				/* XXX profiling */
-L1:	LDGP(pv)
-	ldq	v0, minbrk
-	cmpult  a0, v0, t0
-	cmovne  t0, v0, a0
-	CALLSYS_ERROR(break)
-	stq	a0, curbrk
-	mov	zero, v0
-	RET
-END(brk)
--- lib/libc/alpha/sys/fork.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*	$NetBSD: fork.S,v 1.1 1995/02/10 17:50:34 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/sys/fork.S,v 1.5 2003/08/16 18:59:08 marcel Exp $");
-
-#include "SYS.h"
-
-SYSCALL(fork)
-	cmovne	a4, zero, v0		/* a4 (rv[1]) != 0, child */
-	RET
-END(__sys_fork)
--- lib/libc/alpha/sys/setlogin.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*	$NetBSD: setlogin.S,v 1.1 1995/02/10 17:50:39 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/sys/setlogin.S,v 1.4 2003/08/16 18:59:08 marcel Exp $");
-
-#include "SYS.h"
-
-IMPORT(_logname_valid, 4)			/* in _getlogin() */
-
-SYSCALL(setlogin)
-	stl	zero, _logname_valid		/* clear it */
-	RET
-END(__sys_setlogin)
--- lib/libc/alpha/sys/cerror.S
+++ /dev/null
@@ -1,56 +0,0 @@
-/*	$NetBSD: cerror.S,v 1.4 1996/11/08 00:52:46 cgd Exp $ 	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/sys/cerror.S,v 1.6 2003/01/19 00:17:03 obrien Exp $");
-
-#include "SYS.h"
-
-#define	FRAME_SIZE		16
-#define	FRAME_RA_OFFSET		0
-#define	FRAME_V0_OFFSET		8
-
-NESTED(.cerror, 0, FRAME_SIZE, ra, IM_RA|IM_V0, 0)
-	br	t0, L1
-L1:	LDGP(t0)
-
-	lda	sp, -FRAME_SIZE(sp)
-	stq	ra, FRAME_RA_OFFSET(sp)
-	stq	v0, FRAME_V0_OFFSET(sp)
-
-	CALL(__error)
-
-	ldq	t0, FRAME_V0_OFFSET(sp)
-	stl	t0, 0(v0)
-
-	ldiq	v0, -1
-	ldq	ra, FRAME_RA_OFFSET(sp)
-	lda	sp, FRAME_SIZE(sp)
-	RET
-END(.cerror)
--- lib/libc/alpha/sys/Makefile.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD: src/lib/libc/alpha/sys/Makefile.inc,v 1.12 2003/08/11 07:14:06 bms Exp $
-
-MDASM+=	Ovfork.S brk.S cerror.S exect.S fork.S pipe.S ptrace.S \
-	sbrk.S setlogin.S sigreturn.S
-
-# Don't generate default code for these syscalls:
-NOASM=	break.o exit.o ftruncate.o getdomainname.o getlogin.o \
-	lseek.o mmap.o openbsd_poll.o pread.o \
-	pwrite.o setdomainname.o sstk.o truncate.o uname.o vfork.o yield.o
-
-PSEUDO=	_getlogin.o _exit.o
-
--- lib/libc/alpha/sys/sbrk.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*	$NetBSD: sbrk.S,v 1.4 1996/10/17 03:08:20 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/sys/sbrk.S,v 1.3 2003/01/19 00:17:03 obrien Exp $");
-
-#include "SYS.h"
-
-	.globl	_end
-
-	.data
-EXPORT(curbrk)
-	.quad	_end
-
-	.text
-LEAF(sbrk, 1)
-	br	pv, L1				/* XXX profiling */
-L1:	LDGP(pv)
-	ldq	a1, curbrk
-	beq	a0, L2
-	addq	a0, a1, a0
-	CALLSYS_ERROR(break)
-	stq	a0, curbrk
-L2:
-	mov	a1, v0
-	RET
-END(sbrk)
--- lib/libc/alpha/sys/sigreturn.S
+++ /dev/null
@@ -1,41 +0,0 @@
-/*	$NetBSD: sigreturn.S,v 1.1 1995/02/10 17:50:42 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/sys/sigreturn.S,v 1.4 2003/01/19 00:17:03 obrien Exp $");
-
-#include "SYS.h"
-
-/*
- * We must preserve the state of the registers as the user has set them up.
- * However, that doesn't involve any special work on the Alpha.
- * (XXX PROFILING)
- */
-
-RSYSCALL(sigreturn)
--- lib/libc/alpha/sys/Ovfork.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*	$NetBSD: Ovfork.S,v 1.1 1995/02/10 17:50:29 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/sys/Ovfork.S,v 1.5 2003/08/16 18:59:08 marcel Exp $");
-
-#include "SYS.h"
-
-SYSCALL(vfork)
-	cmovne	a4, zero, v0		/* a4 (rv[1]) != 0, child */
-	RET
-END(__sys_vfork)
--- lib/libc/alpha/sys/pipe.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*	$NetBSD: pipe.S,v 1.1 1995/02/10 17:50:35 cgd Exp $	*/
-
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/sys/pipe.S,v 1.5 2003/08/16 18:59:08 marcel Exp $");
-
-#include "SYS.h"
-
-SYSCALL(pipe)
-	stl	v0, 0(a0)
-	stl	a4, 4(a0)
-	mov	zero, v0
-	RET
-END(__sys_pipe)
--- lib/libc/powerpc/SYS.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-
- * Copyright (c) 2002 Benno Rice.  All rights reserved.
- * Copyright (c) 2002 David E. O'Brien.  All rights reserved.
- *
- * 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 author nor the names of any contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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.
- *
- *	$NetBSD: SYS.h,v 1.8 2002/01/14 00:55:56 thorpej Exp $
- * $FreeBSD: src/lib/libc/powerpc/SYS.h,v 1.6 2003/01/18 23:26:04 obrien Exp $
- */
-
-#include <sys/syscall.h>
-#include <machine/asm.h>
-
-#define _SYSCALL(x)						\
-	.text;							\
-	.align 2;						\
-	li	0,(__CONCAT(SYS_,x));				\
-	sc
-
-#define	SYSCALL(x)						\
-	.text;							\
-	.align 2;						\
-2:	b	PIC_PLT(CNAME(HIDENAME(cerror)));		\
-ENTRY(__CONCAT(__sys_,x));					\
-	.weak	CNAME(x);					\
-	.set	CNAME(x),CNAME(__CONCAT(__sys_,x));		\
-	.weak	CNAME(__CONCAT(_,x));				\
-	.set	CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x));	\
-	_SYSCALL(x);						\
-	bso	2b
-
-#define	PSEUDO(x)						\
-	.text;							\
-	.align 2;						\
-ENTRY(__CONCAT(__sys_,x));					\
-	.weak	CNAME(__CONCAT(_,x));				\
-	.set	CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x));	\
-	_SYSCALL(x);						\
-	bnslr;							\
-	b	PIC_PLT(CNAME(HIDENAME(cerror)))
-
-#define	RSYSCALL(x)						\
-	.text;							\
-	.align 2;						\
-2:	b	PIC_PLT(CNAME(HIDENAME(cerror)));		\
-ENTRY(__CONCAT(__sys_,x));					\
-	.weak	CNAME(x);					\
-	.set	CNAME(x),CNAME(__CONCAT(__sys_,x));		\
-	.weak	CNAME(__CONCAT(_,x));				\
-	.set	CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x));	\
-	_SYSCALL(x);						\
-	bnslr;							\
-	b	PIC_PLT(CNAME(HIDENAME(cerror)))
--- lib/libc/powerpc/Makefile.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD: src/lib/libc/powerpc/Makefile.inc,v 1.1 2005/01/15 05:26:32 das Exp $
-
-# Long double is 64-bits
-MDSRCS+=machdep_ldisd.c
-
--- lib/libc/powerpc/_fpmath.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c) 2003 David Schultz <das at FreeBSD.ORG>
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD: src/lib/libc/powerpc/_fpmath.h,v 1.7 2005/03/07 04:55:22 das Exp $
- */
-
-union IEEEl2bits {
-	long double	e;
-	struct {
-		unsigned int		sign	:1;
-		unsigned int		exp	:11;
-		unsigned int		manh	:20;
-		unsigned int		manl	:32;
-	} bits;
-};
-
-#define	mask_nbit_l(u)	((void)0)
-#define	LDBL_IMPLICIT_NBIT
-#define	LDBL_NBIT	0
-
-#define	LDBL_MANH_SIZE	20
-#define	LDBL_MANL_SIZE	32
-
-#define	LDBL_TO_ARRAY32(u, a) do {			\
-	(a)[0] = (uint32_t)(u).bits.manl;		\
-	(a)[1] = (uint32_t)(u).bits.manh;		\
-} while(0)
--- lib/libc/powerpc/arith.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * MD header for contrib/gdtoa
- *
- * $FreeBSD: src/lib/libc/powerpc/arith.h,v 1.2 2003/05/08 13:50:44 das Exp $
- */
-
-/*
- * NOTE: The definitions in this file must be correct or strtod(3) and
- * floating point formats in printf(3) will break!  The file can be
- * generated by running contrib/gdtoa/arithchk.c on the target
- * architecture.  See contrib/gdtoa/gdtoaimp.h for details.
- */
-
-#define IEEE_MC68k
-#define Arith_Kind_ASL 2
-#define Double_Align
--- lib/libc/powerpc/gen/fpgetmask.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*	$NetBSD: fpgetmask.c,v 1.3 2002/01/13 21:45:47 thorpej Exp $	*/
-
-/*
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dan Winship.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 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 <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpgetmask.c,v 1.1 2004/02/12 09:11:06 grehan Exp $");
-
-#include <sys/types.h>
-#include <ieeefp.h>
-
-fp_except_t
-fpgetmask()
-{
-	u_int64_t fpscr;
-
-	__asm__("mffs %0" : "=f"(fpscr));
-	return ((fp_except_t)((fpscr >> 3) & 0x1f));
-}
--- lib/libc/powerpc/gen/fpgetround.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*	$NetBSD: fpgetround.c,v 1.3 2002/01/13 21:45:47 thorpej Exp $	*/
-
-/*
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dan Winship.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 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 <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpgetround.c,v 1.1 2004/02/12 09:11:06 grehan Exp $");
-
-#include <sys/types.h>
-#include <ieeefp.h>
-
-fp_rnd_t
-fpgetround()
-{
-	u_int64_t fpscr;
-
-	__asm__("mffs %0" : "=f"(fpscr));
-	return ((fp_rnd_t)(fpscr & 0x3));
-}
--- lib/libc/powerpc/gen/_ctx_start.S
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2004 Suleiman Souhlal
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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 <machine/asm.h>
-
- __FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/_ctx_start.S,v 1.1 2004/03/02 06:22:24 grehan Exp $");
-
-	.globl  CNAME(_ctx_done)
-	.globl  CNAME(abort)
-
- ENTRY(_ctx_start)
-	mtlr	%r14
-	blrl			/* branch to start function */
-	mr	%r3,%r15	/* pass pointer to ucontext as argument */
-	bl	PIC_PLT(CNAME(_ctx_done)) /* branch to ctxt completion func */
-	/*
-	 * we should never return from the
-	 * above branch.
-	 */
-	bl	PIC_PLT(CNAME(abort))	/* abort */
--- lib/libc/powerpc/gen/makecontext.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2004 Suleiman Souhlal
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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 <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/makecontext.c,v 1.2 2004/07/19 12:05:07 grehan Exp $");
-
-#include <sys/param.h>
-
-#include <stdarg.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <ucontext.h>
-
-__weak_reference(__makecontext, makecontext);
-
-void _ctx_done(ucontext_t *ucp);
-void _ctx_start(void);
-
-void
-_ctx_done(ucontext_t *ucp)
-{
-	if (ucp->uc_link == NULL)
-		exit(0);
-	else {
-		/* invalidate context */
-		ucp->uc_mcontext.mc_len = 0;
-
-		setcontext((const ucontext_t *)ucp->uc_link);
-
-		abort(); /* should never return from above call */
-	}
-}
-
-void
-__makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...)
-{
-	mcontext_t *mc;
-	char *sp;
-	va_list ap;
-	int i, regargs, stackargs;
-
-	/* Sanity checks */
-	if ((ucp == NULL) || (argc < 0) || (argc > NCARGS)
-	    || (ucp->uc_stack.ss_sp == NULL)
-	    || (ucp->uc_stack.ss_size < MINSIGSTKSZ)) {
-		/* invalidate context */
-		ucp->uc_mcontext.mc_len = 0;
-		return;
-	}
-
-	/*
-	 * The stack must have space for the frame pointer, saved
-	 * link register, overflow arguments, and be 16-byte
-	 * aligned.
-	 */
-	stackargs = (argc > 8) ? argc - 8 : 0;
-	sp = (char *) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size
-		- sizeof(uint32_t)*(stackargs + 2);
-	sp = (char *)((uint32_t)sp & ~0x1f);
-
-	mc = &ucp->uc_mcontext;
-
-	/*
-	 * Up to 8 register args. Assumes all args are 32-bit and
-	 * integer only. Not sure how to cater for floating point,
-	 * although 64-bit args will work if aligned correctly
-	 * in the arg list.
-	 */
-	regargs = (argc > 8) ? 8 : argc;
-	va_start(ap, argc);
-	for (i = 0; i < regargs; i++)
-		mc->mc_gpr[3 + i] = va_arg(ap, uint32_t);
-
-	/*
-	 * Overflow args go onto the stack
-	 */
-	if (argc > 8) {
-		uint32_t *argp;
-
-		/* Skip past frame pointer and saved LR */
-		argp = (uint32_t *)sp + 2;
-
-		for (i = 0; i < stackargs; i++)
-			*argp++ = va_arg(ap, uint32_t);
-	}
-	va_end(ap);
-
-	/*
-	 * Use caller-saved regs 14/15 to hold params that _ctx_start
-	 * will use to invoke the user-supplied func
-	 */
-	mc->mc_srr0 = (uint32_t) _ctx_start;
-	mc->mc_gpr[1] = (uint32_t) sp;		/* new stack pointer */
-	mc->mc_gpr[14] = (uint32_t) start;	/* r14 <- start */
-	mc->mc_gpr[15] = (uint32_t) ucp;	/* r15 <- ucp */
-}
--- lib/libc/powerpc/gen/_setjmp.S
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-/*      $NetBSD: _setjmp.S,v 1.1 1997/03/29 20:55:53 thorpej Exp $      */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/_setjmp.S,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-
-/*
- * C library -- _setjmp, _longjmp
- *
- *      _longjmp(a,v)
- * will generate a "return(v?v:1)" from the last call to
- *      _setjmp(a)
- * by restoring registers from the stack.
- * The previous signal state is NOT restored.
- *
- * jmpbuf layout:
- *     +------------+
- *     |   unused   |
- *     +------------+
- *     |   unused   |
- *     |            |
- *     | (4 words)  |
- *     |            |
- *     +------------+
- *     | saved regs |
- *     |    ...     |	
- */
-
-ENTRY(_setjmp)
-	mflr	%r11
-	mfcr	%r12
-	mr	%r10,%r1
-	mr	%r9,%r2
-	stmw	%r9,20(%r3)
-	li	%r3,0
-	blr
-
-ENTRY(_longjmp)
-	lmw	%r9,20(%r3)
-	mtlr	%r11
-	mtcr	%r12
-	mr	%r2,%r9
-	mr	%r1,%r10
-	or.	%r3,%r4,%r4
-	bnelr
-	li	%r3,1
-	blr
--- lib/libc/powerpc/gen/_set_tp.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*-
- * Copyright (c) 2004 Doug Rabson
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- *	$FreeBSD: src/lib/libc/powerpc/gen/_set_tp.c,v 1.1 2004/08/15 16:18:03 dfr Exp $
- */
-
-void
-_set_tp(void *tpval)
-{
-	register void* tp __asm__("r2");
-
-	tp = (char*) tpval + 0x7008;
-}
--- lib/libc/powerpc/gen/infinity.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <sys/cdefs.h>
-#if 0
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: infinity.c,v 1.2 1998/11/14 19:31:02 christos Exp $");
-#endif /* LIBC_SCCS and not lint */
-#endif
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/infinity.c,v 1.2 2003/02/08 20:37:53 mike Exp $");
-
-/* infinity.c */
-
-#include <math.h>
-
-/* bytes for +Infinity on powerpc */
-const union __infinity_un __infinity = { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } };
-
-/* bytes for NaN */
-const union __nan_un __nan = { { 0xff, 0xc0, 0, 0 } };
--- lib/libc/powerpc/gen/syncicache.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 1995-1997, 1999 Wolfgang Solfrank.
- * Copyright (C) 1995-1997, 1999 TooLs GmbH.
- * All rights reserved.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by TooLs GmbH.
- * 4. The name of TooLs GmbH may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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.
- *
- * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $
- */
-
-#ifndef lint
-static const char rcsid[] =
-  "$FreeBSD: src/lib/libc/powerpc/gen/syncicache.c,v 1.2 2004/01/21 05:04:25 grehan Exp $";
-#endif /* not lint */
-
-#include <sys/param.h>
-#if	defined(_KERNEL) || defined(_STANDALONE)
-#include <sys/time.h>
-#include <sys/proc.h>
-#include <vm/vm.h>
-#endif
-#include <sys/sysctl.h>
-
-#include <machine/cpu.h>
-
-#if	defined(_KERNEL) || defined(_STANDALONE)
-#ifndef	CACHELINESIZE
-#error "Must know the size of a cache line"
-#endif
-#else
-#include <stdlib.h>
-
-static void getcachelinesize(void);
-
-static int _cachelinesize;
-#define	CACHELINESIZE	_cachelinesize
-
-static void
-getcachelinesize()
-{
-	static int	cachemib[] = { CTL_MACHDEP, CPU_CACHELINE };
-	int		clen;
-
-	clen = sizeof(_cachelinesize);
-
-	if (sysctl(cachemib, sizeof(cachemib) / sizeof(cachemib[0]),
-	    &_cachelinesize, &clen, NULL, 0) < 0 || !_cachelinesize) {
-		abort();
-	}
-}
-#endif
-
-void
-__syncicache(void *from, int len)
-{
-	int	l, off;
-	char	*p;
-
-#if	!defined(_KERNEL) && !defined(_STANDALONE)
-	if (!_cachelinesize)
-		getcachelinesize();
-#endif	
-	off = (u_int)from & (CACHELINESIZE - 1);
-	l = len += off;
-	p = (char *)from - off;
-	do {
-		__asm __volatile ("dcbst 0,%0" :: "r"(p));
-		p += CACHELINESIZE;
-	} while ((l -= CACHELINESIZE) > 0);
-	__asm __volatile ("sync");
-	p = (char *)from - off;
-	do {
-		__asm __volatile ("icbi 0,%0" :: "r"(p));
-		p += CACHELINESIZE;
-	} while ((len -= CACHELINESIZE) > 0);
-	__asm __volatile ("sync; isync");
-}
--- lib/libc/powerpc/gen/sigsetjmp.S
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-/*      $NetBSD: sigsetjmp.S,v 1.4 1998/10/03 12:30:38 tsubai Exp $     */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/sigsetjmp.S,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-
-/*
- * C library -- sigsetjmp, siglongjmp
- *
- *      siglongjmp(a,v)
- * will generate a "return(v?v:1)" from the last call to
- *      sigsetjmp(a, savemask)
- * by restoring registers from the stack.
- * The previous signal state is restored if savemask is non-zero
- *
- * jmpbuf layout:
- *     +------------+
- *     |  savemask  |
- *     +------------+
- *     | sig state  |
- *     |            |
- *     | (4 words)  |
- *     |            |
- *     +------------+
- *     | saved regs |
- *     |    ...     |
- */
-
-	
-#include <sys/syscall.h>
-
-ENTRY(sigsetjmp)
-	mr	%r6,%r3
-	stw	%r4,0(%r3)
-	or.	%r7,%r4,%r4
-	beq	1f
-	li	%r3,1			/* SIG_BLOCK, but doesn't matter */
-					/*            since set == NULL  */
-	li	%r4,0			/* set = NULL */
-	mr	%r5,%r6			/* &oset */
-	addi	%r5,%r5,4
-	li	%r0, SYS_sigprocmask   /* sigprocmask(SIG_BLOCK, NULL, &oset)*/
-	sc				/* assume no error       XXX */
-1:
-	mflr	%r11
-	mfcr	%r12
-	mr	%r10,%r1
-	mr	%r9,%r2
-	stmw	%r9,20(%r6)
-	li	%r3,0
-	blr
-
-ENTRY(siglongjmp)
-	lmw	%r9,20(%r3)
-	lwz	%r7,0(%r3)
-	mr	%r6,%r4
-	mtlr	%r11
-	mtcr	%r12
-	mr	%r2,%r9
-	mr	%r1,%r10
-	or.	%r7,%r7,%r7
-	beq	1f
-	mr	%r4,%r3
-	li	%r3,3			/* SIG_SETMASK */
-	addi	%r4,%r4,4		/* &set */
-	li	%r5,0			/* oset = NULL */
-	li	%r0,SYS_sigprocmask	/* sigprocmask(SIG_SET, &set, NULL) */
-	sc				/* assume no error       XXX */
-1:
-	or.	%r3,%r6,%r6
-	bnelr
-	li	%r3,1
-	blr
--- lib/libc/powerpc/gen/setjmp.S
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-/*      $NetBSD: setjmp.S,v 1.3 1998/10/03 12:30:38 tsubai Exp $        */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/setjmp.S,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-
-#include <sys/syscall.h>
-	
-/*
- * C library -- setjmp, longjmp
- *
- *      longjmp(a,v)
- * will generate a "return(v?v:1)" from the last call to
- *      setjmp(a)
- * by restoring registers from the stack.
- * The previous signal state is restored.
- *
- * jmpbuf layout:
- *     +------------+
- *     |   unused   |
- *     +------------+
- *     | sig state  |
- *     |            |
- *     | (4 words)  |
- *     |            |
- *     +------------+
- *     | saved regs |
- *     |    ...     |
- */
-
-ENTRY(setjmp)
-	mr	%r6,%r3
-	li	%r3,1			/* SIG_BLOCK, but doesn't matter */
-					/*            since set == NULL  */
-	li	%r4,0			/* set = NULL */
-	mr	%r5,%r6			/* &oset */
-	addi	%r5,%r5,4
-	li	%r0, SYS_sigprocmask	/*sigprocmask(SIG_BLOCK, NULL, &oset)*/
-	sc				/*assume no error       XXX */
-	mflr	%r11			/* r11 <- link reg */
-	mfcr	%r12			/* r12 <- condition reg */
-	mr	%r10,%r1		/* r10 <- stackptr */
-	mr	%r9,%r2			/*  r9 <- global ptr */
-	stmw	%r9,20(%r6)
-	li	%r3,0			/* return (0) */
-	blr
-
-	.weak CNAME(longjmp)
-	.set CNAME(longjmp),CNAME(__longjmp)
-ENTRY(__longjmp)
-	lmw	%r9,20(%r3)		/* restore regs */
-	mr	%r6,%r4			/* save val param */
-	mtlr	%r11			/* r11 -> link reg */
-	mtcr	%r12			/* r12 -> condition reg */
-	mr	%r2,%r9			/* r9  -> global ptr */
-	mr	%r1,%r10		/* r10 -> stackptr */
-	mr	%r4,%r3
-	li	%r3,3			/* SIG_SETMASK */
-	addi	%r4,%r4,4		/* &set */
-	li	%r5,0			/* oset = NULL */
-	li	%r0,SYS_sigprocmask	/* sigprocmask(SIG_SET, &set, NULL) */
-	sc                              /* assume no error       XXX */
-	or.	%r3,%r6,%r6
-	bnelr
-	li	%r3,1
-	blr
-
--- lib/libc/powerpc/gen/Makefile.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD: src/lib/libc/powerpc/gen/Makefile.inc,v 1.8 2005/03/15 15:53:38 das Exp $
-
-SRCS += _ctx_start.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \
-	fpgetsticky.c fpsetmask.c fpsetround.c \
-	infinity.c ldexp.c makecontext.c modf.c _setjmp.S \
-	setjmp.S sigsetjmp.S signalcontext.c syncicache.c \
-	_set_tp.c
-
-
--- lib/libc/powerpc/gen/flt_rounds.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*	$NetBSD: flt_rounds.c,v 1.4.10.3 2002/03/22 20:41:53 nathanw Exp $	*/
-
-/*
- * Copyright (c) 1996 Mark Brinicombe
- * All rights reserved.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Mark Brinicombe
- *	for the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/flt_rounds.c,v 1.1 2004/02/12 09:11:06 grehan Exp $");
-
-#include <sys/types.h>
-#include <machine/float.h>
-
-static const int map[] = {
-	1,	/* round to nearest */
-	0,	/* round to zero */
-	2,	/* round to positive infinity */
-	3	/* round to negative infinity */
-};
-
-int
-__flt_rounds()
-{
-	uint64_t fpscr;
-
-	__asm__ __volatile("mffs %0" : "=f"(fpscr));
-	return map[(fpscr & 0x03)];
-}
--- lib/libc/powerpc/gen/modf.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1994, 1995 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.Distribution at 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.
- *
- *	$NetBSD: modf.c,v 1.1 1995/02/10 17:50:25 cgd Exp $
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/modf.c,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-
-#include <sys/types.h>
-#include <machine/ieee.h>
-#include <errno.h>
-#include <math.h>
-
-/*
- * double modf(double val, double *iptr)
- * returns: f and i such that |f| < 1.0, (f + i) = val, and
- *	sign(f) == sign(i) == sign(val).
- *
- * Beware signedness when doing subtraction, and also operand size!
- */
-double
-modf(val, iptr)
-	double val, *iptr;
-{
-	union doub {
-		double v;
-		struct ieee_double s;
-	} u, v;
-	u_int64_t frac;
-
-	/*
-	 * If input is Inf or NaN, return it and leave i alone.
-	 */
-	u.v = val;
-	if (u.s.dbl_exp == DBL_EXP_INFNAN)
-		return (u.v);
-
-	/*
-	 * If input can't have a fractional part, return
-	 * (appropriately signed) zero, and make i be the input.
-	 */
-	if ((int)u.s.dbl_exp - DBL_EXP_BIAS > DBL_FRACBITS - 1) {
-		*iptr = u.v;
-		v.v = 0.0;
-		v.s.dbl_sign = u.s.dbl_sign;
-		return (v.v);
-	}
-
-	/*
-	 * If |input| < 1.0, return it, and set i to the appropriately
-	 * signed zero.
-	 */
-	if (u.s.dbl_exp < DBL_EXP_BIAS) {
-		v.v = 0.0;
-		v.s.dbl_sign = u.s.dbl_sign;
-		*iptr = v.v;
-		return (u.v);
-	}
-
-	/*
-	 * There can be a fractional part of the input.
-	 * If you look at the math involved for a few seconds, it's
-	 * plain to see that the integral part is the input, with the
-	 * low (DBL_FRACBITS - (exponent - DBL_EXP_BIAS)) bits zeroed,
-	 * the the fractional part is the part with the rest of the
-	 * bits zeroed.  Just zeroing the high bits to get the
-	 * fractional part would yield a fraction in need of
-	 * normalization.  Therefore, we take the easy way out, and
-	 * just use subtraction to get the fractional part.
-	 */
-	v.v = u.v;
-	/* Zero the low bits of the fraction, the sleazy way. */
-	frac = ((u_int64_t)v.s.dbl_frach << 32) + v.s.dbl_fracl;
-	frac >>= DBL_FRACBITS - (u.s.dbl_exp - DBL_EXP_BIAS);
-	frac <<= DBL_FRACBITS - (u.s.dbl_exp - DBL_EXP_BIAS);
-	v.s.dbl_fracl = frac & 0xffffffff;
-	v.s.dbl_frach = frac >> 32;
-	*iptr = v.v;
-
-	u.v -= v.v;
-	u.s.dbl_sign = v.s.dbl_sign;
-	return (u.v);
-}
--- lib/libc/powerpc/gen/fpsetround.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*	$NetBSD: fpsetround.c,v 1.3 2002/01/13 21:45:48 thorpej Exp $	*/
-
-/*
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dan Winship.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 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 <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpsetround.c,v 1.1 2004/02/12 09:11:06 grehan Exp $");
-
-#include <sys/types.h>
-#include <ieeefp.h>
-
-fp_rnd_t
-fpsetround(fp_rnd_t rnd_dir)
-{
-	u_int64_t fpscr;
-	fp_rnd_t old;
-
-	__asm__ __volatile("mffs %0" : "=f"(fpscr));
-	old = (fp_rnd_t)(fpscr & 0x3);
-	fpscr = (fpscr & 0xfffffffc) | rnd_dir;
-	__asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr));
-	return (old);
-}
--- lib/libc/powerpc/gen/fpsetmask.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*	$NetBSD: fpsetmask.c,v 1.3 2002/01/13 21:45:48 thorpej Exp $	*/
-
-/*
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dan Winship.
- *
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 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 <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fpsetmask.c,v 1.1 2004/02/12 09:11:06 grehan Exp $");
-
-#include <sys/types.h>
-#include <ieeefp.h>
-
-fp_except_t
-fpsetmask(fp_except_t mask)
-{
-	u_int64_t fpscr;
-	fp_rnd_t old;
-
-	__asm__("mffs %0" : "=f"(fpscr));
-	old = (fp_rnd_t)((fpscr >> 3) & 0x1f);
-	fpscr = (fpscr & 0xffffff07) | (mask << 3);
-	__asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr));
-	return (old);
-}
--- lib/libc/powerpc/gen/fpgetsticky.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*	$NetBSD: fpgetsticky.c,v 1.3 2002/01/13 21:45:48 thorpej Exp $	*/
-
-/*
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- * 
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dan Winship.
- * 
- * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 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.
- *
- * $FreeBSD: src/lib/libc/powerpc/gen/fpgetsticky.c,v 1.1 2004/02/12 09:11:06 grehan Exp $
- */
-
-#include <sys/cdefs.h>
-
-#include "namespace.h"
-
-#include <sys/types.h>
-#include <ieeefp.h>
-
-#ifdef __weak_alias
-__weak_alias(fpgetsticky,_fpgetsticky)
-#endif
-
-fp_except_t
-fpgetsticky()
-{
-	u_int64_t fpscr;
-
-	__asm__ __volatile("mffs %0" : "=f"(fpscr));
-	return ((fp_except_t)((fpscr >> 25) & 0x1f));
-}
--- lib/libc/powerpc/gen/fabs.S
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2004 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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 <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/fabs.S,v 1.1 2004/02/12 09:11:06 grehan Exp $");
-
-/*
- * double fabs(double)
- */
-ENTRY(fabs)
-	fabs	%f1,%f1
-	blr
--- lib/libc/powerpc/gen/signalcontext.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2004 Marcel Moolenaar, Peter Grehan
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR 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 <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/gen/signalcontext.c,v 1.1 2004/07/19 12:08:03 grehan Exp $");
-
-#include <sys/param.h>
-#include <sys/ucontext.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <strings.h>
-
-typedef void (*handler_t)(uint32_t, uint32_t, uint32_t);
-
-/* Prototypes */
-static void ctx_wrapper(ucontext_t *ucp, handler_t func, uint32_t sig,
-			uint32_t sig_si, uint32_t sig_uc);
-
-__weak_reference(__signalcontext, signalcontext);
-
-int
-__signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func)
-{
-	siginfo_t *sig_si;
-	ucontext_t *sig_uc;
-	uint32_t sp;
-
-	/* Bail out if we don't have a valid ucontext pointer. */
-	if (ucp == NULL)
-		abort();
-
-	/*
-	 * Build a 16-byte-aligned signal frame
-	 */
-	sp = (ucp->uc_mcontext.mc_gpr[1] - sizeof(ucontext_t)) & ~15UL;
-	sig_uc = (ucontext_t *)sp;
-	bcopy(ucp, sig_uc, sizeof(*sig_uc));
-	sp = (sp - sizeof(siginfo_t)) & ~15UL;
-	sig_si = (siginfo_t *)sp;
-	bzero(sig_si, sizeof(*sig_si));
-	sig_si->si_signo = sig;
-
-	/*
-	 * Subtract 8 bytes from stack to allow for frameptr
-	 */
-	sp -= 2*sizeof(uint32_t);
-	sp &= ~15UL;
-
-	/*
-	 * Setup the ucontext of the signal handler.
-	 */
-	bzero(&ucp->uc_mcontext, sizeof(ucp->uc_mcontext));
-	ucp->uc_link = sig_uc;
-	sigdelset(&ucp->uc_sigmask, sig);
-
-	ucp->uc_mcontext.mc_vers = _MC_VERSION;
-	ucp->uc_mcontext.mc_len = sizeof(struct __mcontext);
-	ucp->uc_mcontext.mc_srr0 = (uint32_t) ctx_wrapper;
-	ucp->uc_mcontext.mc_gpr[1] = (uint32_t) sp;
-	ucp->uc_mcontext.mc_gpr[3] = (uint32_t) func;
-	ucp->uc_mcontext.mc_gpr[4] = (uint32_t) sig;
-	ucp->uc_mcontext.mc_gpr[5] = (uint32_t) sig_si;
-	ucp->uc_mcontext.mc_gpr[6] = (uint32_t) sig_uc;
-
-	return (0);
-}
-
-static void
-ctx_wrapper(ucontext_t *ucp, handler_t func, uint32_t sig, uint32_t sig_si,
-	    uint32_t sig_uc)
-{
-
-	(*func)(sig, sig_si, sig_uc);
-	if (ucp->uc_link == NULL)
-		exit(0);
-	setcontext((const ucontext_t *)ucp->uc_link);
-	/* should never get here */
-	abort();
-	/* NOTREACHED */
-}
--- lib/libc/powerpc/net/ntohl.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * Copyright (c) 2002 David O'Brien
- * All rights reserved.
- *
- * 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 author nor the names of any contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/net/ntohl.S,v 1.1 2002/05/15 20:40:35 obrien Exp $");
-
-/* hostorder = ntohl(netorder) */
-
-        .weak CNAME(ntohl)
-        .set CNAME(ntohl),CNAME(__ntohl)
-ENTRY(__ntohl)
-	blr
--- lib/libc/powerpc/net/htons.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * Copyright (c) 2002 David O'Brien
- * All rights reserved.
- *
- * 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 author nor the names of any contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/net/htons.S,v 1.1 2002/05/15 20:40:35 obrien Exp $");
-
-/* netorder = htons(hostorder) */
-
-        .weak CNAME(htons)
-        .set CNAME(htons),CNAME(__htons)
-ENTRY(__htons)
-	blr
--- lib/libc/powerpc/net/Makefile.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-#	@(#)Makefile.inc	8.1 (Berkeley) 6/4/93
-# $FreeBSD: src/lib/libc/powerpc/net/Makefile.inc,v 1.1 2002/05/15 20:40:35 obrien Exp $
-
-SRCS+=	htonl.S htons.S ntohl.S ntohs.S
--- lib/libc/powerpc/net/ntohs.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*-
- * Copyright (c) 2002 David O'Brien
- * All rights reserved.
- *
- * 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 author nor the names of any contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/net/ntohs.S,v 1.1 2002/05/15 20:40:35 obrien Exp $");
-
-/* hostorder = ntohs(netorder) */
-
-#include <machine/asm.h>
-
-        .weak CNAME(ntohs)
-        .set CNAME(ntohs),CNAME(__ntohs)
-ENTRY(__ntohs)
-	blr
--- lib/libc/powerpc/net/htonl.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * Copyright (c) 2002 David O'Brien
- * All rights reserved.
- *
- * 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 author nor the names of any contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/net/htonl.S,v 1.1 2002/05/15 20:40:35 obrien Exp $");
-
-/* netorder = htonl(hostorder) */
-
-        .weak CNAME(htonl)
-        .set CNAME(htonl),CNAME(__htonl)
-ENTRY(__htonl)
-	blr
--- lib/libc/alpha/net/ntohl.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/*	$NetBSD: ntohl.S,v 1.1 1996/04/17 22:36:57 cgd 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/net/ntohl.S,v 1.3 2003/01/19 00:17:02 obrien Exp $");
-
-#define	ALIAS	ntohl
-#define	NAME	__ntohl
-
-#include "byte_swap_4.S"
--- lib/libc/alpha/net/htons.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/*	$NetBSD: htons.S,v 1.1 1996/04/17 22:36:54 cgd 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/net/htons.S,v 1.3 2003/01/19 00:17:02 obrien Exp $");
-
-#define	ALIAS	htons
-#define	NAME	__htons
-
-#include "byte_swap_2.S"
--- lib/libc/alpha/net/Makefile.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-# $FreeBSD: src/lib/libc/alpha/net/Makefile.inc,v 1.2 1999/08/27 23:58:09 peter Exp $
-
-SRCS+=  htonl.S htons.S ntohl.S ntohs.S
--- lib/libc/alpha/net/byte_swap_4.S
+++ /dev/null
@@ -1,55 +0,0 @@
-/*	$NetBSD: byte_swap_4.S,v 1.2 1996/10/17 03:08:09 cgd 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/net/byte_swap_4.S,v 1.3 2003/01/19 00:17:02 obrien Exp $");
-
-#if !defined(ALIAS) || !defined(NAME)
-#error ALIAS or NAME not defined
-#endif
-
-/*
- * Byte-swap a 4-byte quantity.  (Convert 0x01234567 to 0x67452301.)
- *
- * Argument is an unsigned 4-byte integer (u_int32_t).
- */
-XLEAF(ALIAS, 1)
-LEAF(NAME, 1)			/* a0 contains 0x01234567 */
-	extbl	a0, 0, t0	/* t0 = 0x      67 */
-	extbl	a0, 1, t1	/* t1 = 0x      45 */
-	extbl	a0, 2, t2	/* t2 = 0x      23 */
-	extbl	a0, 3, t3	/* t3 = 0x      01 */
-	sll	t0, 24, t0	/* t0 = 0x67       */
-	sll	t1, 16, t1	/* t1 = 0x  45     */
-	sll	t2, 8, t2	/* t2 = 0x    23   */
-	or	t3, t0, v0	/* v0 = 0x67    01 */
-	or	t1, t2, t1	/* t1 = 0x  4523   */
-	or	t1, v0, v0	/* v0 = 0x67452301 */
-	RET
-END(NAME)
--- lib/libc/alpha/net/ntohs.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/*	$NetBSD: ntohs.S,v 1.1 1996/04/17 22:37:02 cgd 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/net/ntohs.S,v 1.3 2003/01/19 00:17:02 obrien Exp $");
-
-#define	ALIAS	ntohs
-#define	NAME	__ntohs
-
-#include "byte_swap_2.S"
--- lib/libc/alpha/net/byte_swap_2.S
+++ /dev/null
@@ -1,49 +0,0 @@
-/*	$NetBSD: byte_swap_2.S,v 1.2 1996/10/17 03:08:08 cgd 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/net/byte_swap_2.S,v 1.3 2003/01/19 00:17:02 obrien Exp $");
-
-#if !defined(ALIAS) || !defined(NAME)
-#error ALIAS or NAME not defined
-#endif
-
-/*
- * Byte-swap a 2-byte quantity.  (Convert 0x0123 to 0x2301.)
- *
- * Argument is an unsigned 2-byte integer (u_int16_t).
- */
-XLEAF(ALIAS, 1)
-LEAF(NAME, 1)			/* a0 contains 0x0123 */
-	extbl	a0, 0, t0	/* t0 = 0x  23 */
-	extbl	a0, 1, t1	/* t1 = 0x  01 */
-	sll	t0, 8, t0	/* t1 = 0x23   */
-	or	t0, t1, v0	/* v0 = 0x2301 */
-	RET
-END(NAME)
--- lib/libc/alpha/net/htonl.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/*	$NetBSD: htonl.S,v 1.1 1996/04/17 22:36:52 cgd 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.Distribution at 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>
-__FBSDID("$FreeBSD: src/lib/libc/alpha/net/htonl.S,v 1.3 2003/01/19 00:17:02 obrien Exp $");
-
-#define	ALIAS	htonl
-#define	NAME	__htonl
-
-#include "byte_swap_4.S"
--- lib/libc/alpha/stdlib/Makefile.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-# $FreeBSD: src/lib/libc/alpha/stdlib/Makefile.inc,v 1.3 1999/08/27 23:58:09 peter Exp $
-
-MDSRCS+=	abs.c div.c labs.c ldiv.c
--- lib/libc/powerpc/sys/cerror.S
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-/*      $NetBSD: cerror.S,v 1.5 2000/01/27 14:58:48 kleink Exp $        */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/sys/cerror.S,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-	
-#include "SYS.h"
-
-	.globl  HIDENAME(cerror)
-	.globl  CNAME(__error)
-
-	/*
-	 * The __error() function is thread aware. For non-threaded
-	 * programs and the initial threaded in threaded programs,
-	 * it returns a pointer to the global errno variable.
-	 */
-HIDENAME(cerror):
-	mflr	%r0
-	stwu	%r1,-16(%r1)		/* allocate new stack frame */
-	stw	%r0,20(%r1)		/* and save lr, r31 */
-	stw	%r31,8(%r1)
-	mr	%r31,%r3          /* stash errval in callee-saved register */
-	bl	PIC_PLT(CNAME(__error))
-	stw	%r31,0(%r3)		/* store errval into &errno */
-	lwz	%r0,20(%r1)
-	lwz	%r31,8(%r1)
-	mtlr	%r0
-	la	%r1,16(%r1)
-	li	%r3,-1
-	li	%r4,-1
-	blr				/* return to callers caller */
-
-
--- lib/libc/powerpc/sys/exect.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-/*      $NetBSD: exect.S,v 1.3 1998/05/25 15:28:03 ws Exp $     */
-	
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/sys/exect.S,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-
-#include "SYS.h"
-
-ENTRY(exect)
-	li	%r0,SYS_execve
-	sc
-	bso	1f
-	blr
-1:
-	b	PIC_PLT(HIDENAME(cerror))
--- lib/libc/powerpc/sys/Makefile.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-# $FreeBSD: src/lib/libc/powerpc/sys/Makefile.inc,v 1.2 2003/08/11 07:14:07 bms Exp $
-
-MDASM+=	brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S
-
-# Don't generate default code for these syscalls:
-NOASM=	break.o exit.o ftruncate.o getdomainname.o getlogin.o \
-	lseek.o mmap.o openbsd_poll.o pread.o \
-	pwrite.o setdomainname.o sstk.o truncate.o uname.o yield.o
-
-PSEUDO=	_getlogin.o _exit.o
-
--- lib/libc/powerpc/sys/sbrk.S
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-/*      $NetBSD: sbrk.S,v 1.8 2000/06/26 06:25:44 kleink Exp $  */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/sys/sbrk.S,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-
-#include "SYS.h"
-
-	.globl	HIDENAME(curbrk)
-	.globl	CNAME(_end)
-
-	.data
-HIDENAME(curbrk):
-	.long	CNAME(_end)
-
-	.text
-ENTRY(sbrk)
-
-#ifdef PIC
-	mflr	%r10
-	bl	_GLOBAL_OFFSET_TABLE_ at local-4
-	mflr	%r5
-	mtlr	%r10
-	lwz	%r5,HIDENAME(curbrk)@got(%r5)
-	lwz	%r6,0(%r5)
-#else
-	lis	%r5,HIDENAME(curbrk)@ha
-	lwz	%r6,HIDENAME(curbrk)@l(%r5)	/* r6 = old break */
-#endif
-	cmpwi	%r3,0				/* sbrk(0) - return curbrk */
-	beq	1f
-	add	%r3,%r3,%r6
-	mr	%r7,%r3				/* r7 = new break */
-	li	%r0,SYS_break
-	sc					/* break(new_break) */
-	bso	2f
-#ifdef PIC
-	stw     %r7,0(%r5)
-#else
-	stw     %r7,HIDENAME(curbrk)@l(%r5)	/* record new break */
-#endif
-1:
-	mr      %r3,%r6				/* set return value */
-	blr
-2:
-	b	PIC_PLT(HIDENAME(cerror))
--- lib/libc/powerpc/sys/ptrace.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-/*      $NetBSD: ptrace.S,v 1.3 2000/02/23 20:16:57 kleink Exp $        */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/sys/ptrace.S,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-
-#include "SYS.h"
-
-ENTRY(ptrace)
-	mflr	%r0
-	stwu	%r1,-32(%r1)
-	stw	%r0,36(%r1)
-	stw	%r3,8(%r1)
-	stw	%r4,12(%r1)
-	stw	%r5,16(%r1)
-	stw	%r6,20(%r1)
-
-	bl	PIC_PLT(CNAME(__error))
-	li	%r7,0
-	stw	%r7,0(%r3)
-
-	lwz	%r3,8(%r1)
-	lwz	%r4,12(%r1)
-	lwz	%r5,16(%r1)
-	lwz	%r0,36(%r1)
-	lwz	%r6,20(%r1)
-	mtlr	%r0
-	la	%r1,32(%r1)
-	li	%r0,SYS_ptrace
-	sc
-	bso	1f
-	blr
-1:
-	b	PIC_PLT(HIDENAME(cerror))
--- lib/libc/powerpc/sys/brk.S
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-/*      $NetBSD: brk.S,v 1.9 2000/06/26 06:25:43 kleink Exp $   */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/sys/brk.S,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-
-#include "SYS.h"
-
-        .globl  HIDENAME(curbrk)
-        .globl  HIDENAME(minbrk)
-        .globl  CNAME(_end)
-
-        .data
-HIDENAME(minbrk):
-        .long   CNAME(_end)
-
-        .text
-
-ENTRY(brk)
-#ifdef PIC
-	mflr    %r10
-	bl	_GLOBAL_OFFSET_TABLE_ at local-4
-	mflr	%r9
-	mtlr	%r10
-	lwz	%r5,HIDENAME(minbrk)@got(%r9)
-	lwz	%r6,0(%r5)
-#else
-	lis	%r5,HIDENAME(minbrk)@ha
-	lwz	%r6,HIDENAME(minbrk)@l(%r5)
-#endif
-	cmplw   %r6,%r3			/* if (minbrk <= r3) */
-	bgt     0f
-	mr	%r6,%r3			/* r6 = r3 */
-0:
-	mr      %r3,%r6			/* new break value */
-	li      %r0,SYS_break
-	sc				/* assume, that r5 is kept */
-	bso	1f
-#ifdef PIC
-	lwz	%r7,HIDENAME(curbrk)@got(%r9)
-	stw	%r6,0(%r7)
-#else
-	lis	%r7,HIDENAME(curbrk)@ha /* record new break */
-	stw	%r6,HIDENAME(curbrk)@l(%r7)
-#endif
-	blr				/* return 0 */
-
-1:
-	b	PIC_PLT(HIDENAME(cerror))
--- lib/libc/powerpc/sys/setlogin.S
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-/*      $NetBSD: setlogin.S,v 1.3 1998/11/24 11:14:57 tsubai Exp $      */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/sys/setlogin.S,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-	
-#include "SYS.h"
-
-	.globl  CNAME(_logname_valid)		/* in _getlogin() */
-
-SYSCALL(setlogin)
-#ifdef PIC
-	mflr	%r10
-	bl	_GLOBAL_OFFSET_TABLE_ at local-4
-	mflr	%r4
-	lwz	%r4,CNAME(_logname_valid)@got(%r4)
-	li	%r5,%r0
-	stw	%r5,0(%r4)
-	mtlr	%r10
-#else
-	lis	%r4,CNAME(_logname_valid)@ha
-	li	%r5,0
-	stw	%r5,CNAME(_logname_valid)@l(%r4)
-#endif
-	blr
--- lib/libc/powerpc/sys/pipe.S
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * All rights reserved.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-/*      $NetBSD: pipe.S,v 1.6 2000/09/28 08:38:54 kleink Exp $  */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD: src/lib/libc/powerpc/sys/pipe.S,v 1.1 2002/12/04 07:25:14 grehan Exp $");
-
-#include "SYS.h"
-
-ENTRY(pipe)
-	mr	%r5,%r3		/* save pointer */
-	li	%r0,SYS_pipe
-	sc			/* r5 is preserved */
-	bso	1f
-	stw	%r3,0(%r5)	/* success, store fds */
-	stw	%r4,4(%r5)
-	li	%r3,0
-	blr			/* and return 0 */
-1:
-	b	PIC_PLT(HIDENAME(cerror))


More information about the Midnightbsd-cvs mailing list