summaryrefslogtreecommitdiff
path: root/lib/libc/arch/x86_64/gen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/arch/x86_64/gen')
-rw-r--r--lib/libc/arch/x86_64/gen/Makefile.inc7
-rw-r--r--lib/libc/arch/x86_64/gen/_setjmp.S82
-rw-r--r--lib/libc/arch/x86_64/gen/alloca.S13
-rw-r--r--lib/libc/arch/x86_64/gen/fabs.S17
-rw-r--r--lib/libc/arch/x86_64/gen/flt_rounds.S30
-rw-r--r--lib/libc/arch/x86_64/gen/fpgetmask.S27
-rw-r--r--lib/libc/arch/x86_64/gen/fpgetround.S26
-rw-r--r--lib/libc/arch/x86_64/gen/fpgetsticky.S28
-rw-r--r--lib/libc/arch/x86_64/gen/fpsetmask.S42
-rw-r--r--lib/libc/arch/x86_64/gen/fpsetround.S49
-rw-r--r--lib/libc/arch/x86_64/gen/fpsetsticky.S43
-rw-r--r--lib/libc/arch/x86_64/gen/frexp.c74
-rw-r--r--lib/libc/arch/x86_64/gen/infinity.c12
-rw-r--r--lib/libc/arch/x86_64/gen/isinf.c51
-rw-r--r--lib/libc/arch/x86_64/gen/isnan.c51
-rw-r--r--lib/libc/arch/x86_64/gen/ldexp.c57
-rw-r--r--lib/libc/arch/x86_64/gen/modf.S91
-rw-r--r--lib/libc/arch/x86_64/gen/setjmp.S103
-rw-r--r--lib/libc/arch/x86_64/gen/sigsetjmp.S107
19 files changed, 0 insertions, 910 deletions
diff --git a/lib/libc/arch/x86_64/gen/Makefile.inc b/lib/libc/arch/x86_64/gen/Makefile.inc
deleted file mode 100644
index a150d95eba0..00000000000
--- a/lib/libc/arch/x86_64/gen/Makefile.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.1 2004/01/28 01:44:44 mickey Exp $
-
-SRCS+= _setjmp.S alloca.S fabs.S frexp.c infinity.c isinf.c isnan.c ldexp.c \
- modf.S setjmp.S sigsetjmp.S
-SRCS+= flt_rounds.S fpgetmask.S fpgetround.S fpgetsticky.S fpsetmask.S \
- fpsetround.S fpsetsticky.S
-
diff --git a/lib/libc/arch/x86_64/gen/_setjmp.S b/lib/libc/arch/x86_64/gen/_setjmp.S
deleted file mode 100644
index d9a59f7aa14..00000000000
--- a/lib/libc/arch/x86_64/gen/_setjmp.S
+++ /dev/null
@@ -1,82 +0,0 @@
-/* $OpenBSD: _setjmp.S,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-/* $NetBSD: _setjmp.S,v 1.1 2001/06/19 00:25:02 fvdl Exp $ */
-
-/*
- * Copyright (c) 2001 Wasabi Systems, Inc.
- * All rights reserved.
- *
- * Written by Frank van der Linden for Wasabi Systems, Inc.
- *
- * 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 for the NetBSD Project by
- * Wasabi Systems, Inc.
- * 4. The name of Wasabi Systems, Inc. may not be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC
- * 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>
-#include <machine/setjmp.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.
- * The previous signal state is NOT restored.
- */
-
-ENTRY(_setjmp)
- movq (%rsp),%r11
- movq %rbx,(_JB_RBX * 8)(%rdi)
- movq %rbp,(_JB_RBP * 8)(%rdi)
- movq %r12,(_JB_R12 * 8)(%rdi)
- movq %r13,(_JB_R13 * 8)(%rdi)
- movq %r14,(_JB_R14 * 8)(%rdi)
- movq %r15,(_JB_R15 * 8)(%rdi)
- movq %rsp,(_JB_RSP * 8)(%rdi)
- movq %r11,(_JB_PC * 8)(%rdi)
-
- xorl %eax,%eax
- ret
-
-ENTRY(_longjmp)
- movq (_JB_RBX * 8)(%rdi),%rbx
- movq (_JB_RBP * 8)(%rdi),%rbp
- movq (_JB_R12 * 8)(%rdi),%r12
- movq (_JB_R13 * 8)(%rdi),%r13
- movq (_JB_R14 * 8)(%rdi),%r14
- movq (_JB_R15 * 8)(%rdi),%r15
- movq (_JB_RSP * 8)(%rdi),%rsp
- movq (_JB_PC * 8)(%rdi),%r11
-
- movl %esi,%eax
- testl %eax,%eax
- jnz 1f
- incl %eax
-1: movq %r11,0(%rsp)
- ret
diff --git a/lib/libc/arch/x86_64/gen/alloca.S b/lib/libc/arch/x86_64/gen/alloca.S
deleted file mode 100644
index 8c15583012c..00000000000
--- a/lib/libc/arch/x86_64/gen/alloca.S
+++ /dev/null
@@ -1,13 +0,0 @@
-/* $OpenBSD: alloca.S,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-/* $NetBSD: alloca.S,v 1.1 2001/06/19 00:25:02 fvdl Exp $ */
-
-#include <machine/asm.h>
-
-ENTRY(alloca)
- popq %rdx
- movq %rsp,%rcx
- addq $15,%rdi /* round up to 16 bytes */
- andq $~15,%rdi
- subq %rdi,%rsp
- movq %rsp,%rax
- jmp *%rdx
diff --git a/lib/libc/arch/x86_64/gen/fabs.S b/lib/libc/arch/x86_64/gen/fabs.S
deleted file mode 100644
index ab31ac612fb..00000000000
--- a/lib/libc/arch/x86_64/gen/fabs.S
+++ /dev/null
@@ -1,17 +0,0 @@
-/* $OpenBSD: fabs.S,v 1.2 2004/02/08 17:29:57 deraadt Exp $ */
-/* $NetBSD: fabs.S,v 1.1 2001/06/19 00:25:02 fvdl Exp $ */
-
-#include <machine/asm.h>
-
-/*
- * Ok, this sucks. Is there really no way to push an xmm register onto
- * the FP stack directly?
- */
-
-ENTRY(fabs)
- movsd %xmm0, -8(%rsp)
- fldl -8(%rsp)
- fabs
- fstpl -8(%rsp)
- movsd -8(%rsp),%xmm0
- ret
diff --git a/lib/libc/arch/x86_64/gen/flt_rounds.S b/lib/libc/arch/x86_64/gen/flt_rounds.S
deleted file mode 100644
index 009c59ab64a..00000000000
--- a/lib/libc/arch/x86_64/gen/flt_rounds.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* $OpenBSD: flt_rounds.S,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-/* $NetBSD: flt_rounds.S,v 1.2 2002/06/06 23:04:35 fvdl Exp $ */
-
-/*
- * Written by J.T. Conklin, Apr 4, 1995
- * Public domain.
- */
-
-#include <machine/asm.h>
-
- .text
- _ALIGN_TEXT
-_map:
- .byte 1 /* round to nearest */
- .byte 3 /* round to negative infinity */
- .byte 2 /* round to positive infinity */
- .byte 0 /* round to zero */
-
-ENTRY(__flt_rounds)
- fnstcw -4(%rsp)
- movl -4(%rsp),%eax
- shrl $10,%eax
- andl $3,%eax
-#ifdef PIC
- leaq PIC_GOT(_map),%rcx
- movb (%rcx,%rax,1),%al
-#else
- movb _map(,%rax,1),%al
-#endif
- ret
diff --git a/lib/libc/arch/x86_64/gen/fpgetmask.S b/lib/libc/arch/x86_64/gen/fpgetmask.S
deleted file mode 100644
index 688ba49cddc..00000000000
--- a/lib/libc/arch/x86_64/gen/fpgetmask.S
+++ /dev/null
@@ -1,27 +0,0 @@
-/* $OpenBSD: fpgetmask.S,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-/* $NetBSD: fpgetmask.S,v 1.3 2002/06/12 19:17:22 fvdl Exp $ */
-
-/*
- * Written by J.T. Conklin, Apr 4, 1995
- * Public domain.
- */
-
-#include <machine/asm.h>
-
-/*
- * XXX only read x87 control word here. If an application only
- * uses the fp* interface to manipulate FP bits, it should
- * always remain in sync with the SSE mxcsr register.
- */
-
-#ifdef WEAK_ALIAS
-WEAK_ALIAS(fpgetmask, _fpgetmask)
-ENTRY(_fpgetmask)
-#else
-ENTRY(fpgetmask)
-#endif
- fnstcw -4(%rsp)
- movl -4(%rsp),%eax
- notl %eax
- andl $63,%eax
- ret
diff --git a/lib/libc/arch/x86_64/gen/fpgetround.S b/lib/libc/arch/x86_64/gen/fpgetround.S
deleted file mode 100644
index 5220b3ef396..00000000000
--- a/lib/libc/arch/x86_64/gen/fpgetround.S
+++ /dev/null
@@ -1,26 +0,0 @@
-/* $OpenBSD: fpgetround.S,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-/* $NetBSD: fpgetround.S,v 1.3 2002/06/12 19:17:22 fvdl Exp $ */
-
-/*
- * Written by J.T. Conklin, Apr 4, 1995
- * Public domain.
- */
-
-#include <machine/asm.h>
-
-/*
- * XXX store only x87 state. If an application only uses the fp*
- * interface, this should be in sync with the SSE mxcsr register.
- */
-
-#ifdef WEAK_ALIAS
-WEAK_ALIAS(fpgetround, _fpgetround)
-ENTRY(_fpgetround)
-#else
-ENTRY(fpgetround)
-#endif
- fnstcw -4(%rsp)
- movl -4(%rsp),%eax
- rorl $10,%eax
- andl $3,%eax
- ret
diff --git a/lib/libc/arch/x86_64/gen/fpgetsticky.S b/lib/libc/arch/x86_64/gen/fpgetsticky.S
deleted file mode 100644
index fd12e2b500a..00000000000
--- a/lib/libc/arch/x86_64/gen/fpgetsticky.S
+++ /dev/null
@@ -1,28 +0,0 @@
-/* $OpenBSD: fpgetsticky.S,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-/* $NetBSD: fpgetsticky.S,v 1.3 2002/06/12 19:17:22 fvdl Exp $ */
-
-/*
- * Written by Frank van der Linden at Wasabi Systems for NetBSD.
- * Public domain.
- *
- */
-
-#include <machine/asm.h>
-
-/*
- * XXX read both the x87 and SSE status words here, and OR
- * them to get a complete picture of exceptions.
- */
-
-#ifdef WEAK_ALIAS
-WEAK_ALIAS(fpgetsticky, _fpgetsticky)
-ENTRY(_fpgetsticky)
-#else
-ENTRY(fpgetsticky)
-#endif
- fnstsw -4(%rsp)
- stmxcsr -8(%rsp)
- movl -4(%rsp),%eax
- orl -8(%rsp),%eax
- andl $63,%eax
- ret
diff --git a/lib/libc/arch/x86_64/gen/fpsetmask.S b/lib/libc/arch/x86_64/gen/fpsetmask.S
deleted file mode 100644
index 665d55e8e47..00000000000
--- a/lib/libc/arch/x86_64/gen/fpsetmask.S
+++ /dev/null
@@ -1,42 +0,0 @@
-/* $OpenBSD: fpsetmask.S,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-/* $NetBSD: fpsetmask.S,v 1.3 2002/06/12 19:17:22 fvdl Exp $ */
-
-/*
- * Written by Frank van der Linden at Wasabi Systems for NetBSD.
- * Public domain.
- */
-
-#include <machine/asm.h>
-
-/*
- * XXX set both the x87 control word and the SSE mxcsr register.
- * Applications should only set exception and round flags
- * via the fp*() interface, otherwise the status words
- * will get our of sync.
- */
-
-#ifdef WEAK_ALIAS
-WEAK_ALIAS(fpsetmask, _fpsetmask)
-ENTRY(_fpsetmask)
-#else
-ENTRY(fpsetmask)
-#endif
- fnstcw -4(%rsp)
- stmxcsr -8(%rsp)
- andl $63,%edi
- notl %edi
-
- movl -4(%rsp),%edx
- movl %edx,%eax
- andl %edi,%edx
- movl %edx,-4(%rsp)
-
- movl -8(%rsp),%edx
- roll $7,%edi
- andl %edi,%edx
- movl %edx,-8(%rsp)
-
- fldcw -4(%rsp)
- ldmxcsr -8(%rsp)
- andl $63,%eax
- ret
diff --git a/lib/libc/arch/x86_64/gen/fpsetround.S b/lib/libc/arch/x86_64/gen/fpsetround.S
deleted file mode 100644
index b8508f8b6bd..00000000000
--- a/lib/libc/arch/x86_64/gen/fpsetround.S
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $OpenBSD: fpsetround.S,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-/* $NetBSD: fpsetround.S,v 1.3 2002/06/12 19:17:22 fvdl Exp $ */
-
-/*
- * Written by Frank van der Linden at Wasabi Systems for NetBSD.
- * Public domain.
- */
-
-#include <machine/asm.h>
-
-/*
- * XXX set both the x87 control word and the SSE mxcsr register.
- * Applications should only set exception and round flags
- * via the fp*() interface, otherwise the status words
- * will get our of sync.
- */
-
-
-#ifdef WEAK_ALIAS
-WEAK_ALIAS(fpsetround, _fpsetround)
-ENTRY(_fpsetround)
-#else
-ENTRY(fpsetround)
-#endif
- fnstcw -4(%rsp)
- stmxcsr -8(%rsp)
-
- andl $3,%edi
-
- movl -4(%rsp),%edx
- rorl $10,%edx
- movl %edx,%eax
- andl $3,%eax
-
- andl $~3,%edx
- orl %edi,%edx
- roll $10,%edx
- movl %edx,-4(%rsp)
-
- movl -8(%rsp),%edx
- rorl $13,%edx
- andl $~3,%edx
- orl %edi,%edx
- roll $13,%edx
- movl %edx,-8(%rsp)
-
- ldmxcsr -8(%rsp)
- fldcw -4(%rsp)
- ret
diff --git a/lib/libc/arch/x86_64/gen/fpsetsticky.S b/lib/libc/arch/x86_64/gen/fpsetsticky.S
deleted file mode 100644
index c8e61101a12..00000000000
--- a/lib/libc/arch/x86_64/gen/fpsetsticky.S
+++ /dev/null
@@ -1,43 +0,0 @@
-/* $OpenBSD: fpsetsticky.S,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-/* $NetBSD: fpsetsticky.S,v 1.3 2002/06/12 19:17:23 fvdl Exp $ */
-
-/*
- * Written by Frank van der Linden at Wasabi Systems for NetBSD
- * Public domain.
- */
-
-#include <machine/asm.h>
-
-/*
- * XXX set both the x87 status word and the SSE mxcsr register.
- * Applications should only set exception and round flags
- * via the fp*() interface, otherwise the status words
- * will get our of sync.
- */
-
-
-#ifdef WEAK_ALIAS
-WEAK_ALIAS(fpsetsticky, _fpsetsticky)
-ENTRY(_fpsetsticky)
-#else
-ENTRY(fpsetsticky)
-#endif
- fnstenv -28(%rsp)
- stmxcsr -32(%rsp)
-
- andl $63,%edi
-
- movl -24(%rsp),%eax
- movl %eax,%edx
- andl $63,%eax
-
- orl %edi,%edx
- movl %edx,-24(%rsp)
-
- movl -32(%rsp),%edx
- orl %edi,%edx
- movl %edx,-32(%rsp)
-
- ldmxcsr -32(%rsp)
- fldenv -28(%rsp)
- ret
diff --git a/lib/libc/arch/x86_64/gen/frexp.c b/lib/libc/arch/x86_64/gen/frexp.c
deleted file mode 100644
index bc84467fa9e..00000000000
--- a/lib/libc/arch/x86_64/gen/frexp.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* $OpenBSD: frexp.c,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: frexp.c,v 1.1 2004/01/28 01:44:45 mickey Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <machine/ieee.h>
-
-/*
- * Split the given value into a fraction in the range [0.5, 1.0) and
- * an exponent, such that frac * (2^exp) == value. If value is 0,
- * return 0.
- */
-double
-frexp(value, eptr)
- double value;
- int *eptr;
-{
- union {
- double v;
- struct ieee_double s;
- } u;
-
- if (value) {
- /*
- * Fractions in [0.5..1.0) have an exponent of 2^-1.
- * Leave Inf and NaN alone, however.
- * WHAT ABOUT DENORMS?
- */
- u.v = value;
- if (u.s.dbl_exp != DBL_EXP_INFNAN) {
- *eptr = u.s.dbl_exp - (DBL_EXP_BIAS - 1);
- u.s.dbl_exp = DBL_EXP_BIAS - 1;
- }
- return (u.v);
- } else {
- *eptr = 0;
- return ((double)0);
- }
-}
diff --git a/lib/libc/arch/x86_64/gen/infinity.c b/lib/libc/arch/x86_64/gen/infinity.c
deleted file mode 100644
index d1c2aa9a2f4..00000000000
--- a/lib/libc/arch/x86_64/gen/infinity.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: infinity.c,v 1.2 2004/02/08 17:31:44 deraadt Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-/* infinity.c */
-
-#include <math.h>
-
-/* bytes for +Infinity on a 387 */
-char __infinity[] __attribute__((__aligned__(sizeof(double)))) =
- { 0, 0, 0, 0, 0, 0, (char)0xf0, 0x7f };
-
diff --git a/lib/libc/arch/x86_64/gen/isinf.c b/lib/libc/arch/x86_64/gen/isinf.c
deleted file mode 100644
index 6d29660d7f2..00000000000
--- a/lib/libc/arch/x86_64/gen/isinf.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* $OpenBSD: isinf.c,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: isinf.c,v 1.1 2004/01/28 01:44:45 mickey Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <machine/ieee.h>
-
-int
-isinf(d)
- double d;
-{
- struct ieee_double *p = (struct ieee_double *)&d;
-
- return (p->dbl_exp == DBL_EXP_INFNAN &&
- p->dbl_frach == 0 && p->dbl_fracl == 0);
-}
diff --git a/lib/libc/arch/x86_64/gen/isnan.c b/lib/libc/arch/x86_64/gen/isnan.c
deleted file mode 100644
index 5df82ecce25..00000000000
--- a/lib/libc/arch/x86_64/gen/isnan.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* $OpenBSD: isnan.c,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: isnan.c,v 1.1 2004/01/28 01:44:45 mickey Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <machine/ieee.h>
-
-int
-isnan(d)
- double d;
-{
- struct ieee_double *p = (struct ieee_double *)&d;
-
- return (p->dbl_exp == DBL_EXP_INFNAN &&
- (p->dbl_frach != 0 || p->dbl_fracl != 0));
-}
diff --git a/lib/libc/arch/x86_64/gen/ldexp.c b/lib/libc/arch/x86_64/gen/ldexp.c
deleted file mode 100644
index b3e95956652..00000000000
--- a/lib/libc/arch/x86_64/gen/ldexp.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $OpenBSD: ldexp.c,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Charles Hannum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ldexp.c,v 1.1 2004/01/28 01:44:45 mickey Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * ldexp(value, exp): return value * (2 ** exp).
- */
-
-double
-ldexp (double value, int exp)
-{
- double temp;
-#if __GNUC__ >= 2
- __asm ("fscale"
- : "=t" (temp)
- : "0" (value), "u" ((double)exp));
-#else
- __asm ("fscale; fstp %%st(1)"
- : "=f" (temp)
- : "f" (value), "0" ((double)exp));
-#endif
- return (temp);
-}
diff --git a/lib/libc/arch/x86_64/gen/modf.S b/lib/libc/arch/x86_64/gen/modf.S
deleted file mode 100644
index 44ef74ab668..00000000000
--- a/lib/libc/arch/x86_64/gen/modf.S
+++ /dev/null
@@ -1,91 +0,0 @@
-/* $OpenBSD: modf.S,v 1.2 2004/02/08 17:29:39 deraadt Exp $ */
-/* $NetBSD: modf.S,v 1.1 2001/06/19 00:25:03 fvdl Exp $ */
-
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Sean Eric Fagan.
- *
- * 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 University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)modf.s 5.5 (Berkeley) 3/18/91
- */
-
-#include <machine/asm.h>
-
-/*
- * modf(value, iptr): return fractional part of value, and stores the
- * integral part into iptr (a pointer to double).
- *
- * Written by Sean Eric Fagan (sef@kithrup.COM)
- * Sun Mar 11 20:27:30 PST 1990
- */
-
-/* With CHOP mode on, frndint behaves as TRUNC does. Useful. */
-ENTRY(modf)
-
- /*
- * Set chop mode.
- */
- fnstcw -12(%rsp)
- movw -12(%rsp),%dx
- orw $3072,%dx
- movw %dx,-16(%rsp)
- fldcw -16(%rsp)
-
- /*
- * Get integral part.
- */
- movsd %xmm0,-24(%rsp)
- fldl -24(%rsp)
- frndint
- fstpl -8(%rsp)
-
- /*
- * Restore control word.
- */
- fldcw -12(%rsp)
-
- /*
- * Store integral part.
- */
- movsd -8(%rsp),%xmm0
- movsd %xmm0,(%rdi)
-
- /*
- * Get fractional part and return it.
- */
- fldl -24(%rsp)
- fsubl -8(%rsp)
- fstpl -8(%rsp)
- movsd -8(%rsp),%xmm0
-
- ret
diff --git a/lib/libc/arch/x86_64/gen/setjmp.S b/lib/libc/arch/x86_64/gen/setjmp.S
deleted file mode 100644
index b7ae81f2141..00000000000
--- a/lib/libc/arch/x86_64/gen/setjmp.S
+++ /dev/null
@@ -1,103 +0,0 @@
-/* $OpenBSD: setjmp.S,v 1.2 2004/02/09 21:25:08 deraadt Exp $ */
-/* $NetBSD: __setjmp14.S,v 1.1 2001/06/19 00:25:02 fvdl Exp $ */
-
-/*
- * Copyright (c) 2001 Wasabi Systems, Inc.
- * All rights reserved.
- *
- * Written by Frank van der Linden for Wasabi Systems, Inc.
- *
- * 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 for the NetBSD Project by
- * Wasabi Systems, Inc.
- * 4. The name of Wasabi Systems, Inc. may not be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC
- * 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>
-#include <machine/setjmp.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.
- * The previous signal state is restored.
- */
-
-ENTRY(setjmp)
- pushq %rdi
- xorq %rdi,%rdi
-#ifdef PIC
- call PIC_PLT(_C_LABEL(sigblock))
-#else
- call _C_LABEL(sigblock)
-#endif
- popq %rdi
- movq %rax,(_JB_SIGMASK * 8)(%rdi)
-
- movq (%rsp),%r11
- movq %rbx,(_JB_RBX * 8)(%rdi)
- movq %rbp,(_JB_RBP * 8)(%rdi)
- movq %r12,(_JB_R12 * 8)(%rdi)
- movq %r13,(_JB_R13 * 8)(%rdi)
- movq %r14,(_JB_R14 * 8)(%rdi)
- movq %r15,(_JB_R15 * 8)(%rdi)
- movq %rsp,(_JB_RSP * 8)(%rdi)
- movq %r11,(_JB_PC * 8)(%rdi)
-
-2: xorl %eax,%eax
- ret
-
-ENTRY(longjmp)
- movq %rdi,%r12
- movl %esi,%r8d
-
- movq (_JB_SIGMASK * 8)(%rdi),%rdi
- pushq %r8
-#ifdef PIC
- call PIC_PLT(_C_LABEL(sigsetmask))
-#else
- call _C_LABEL(sigsetmask)
-#endif
- popq %r8
- movq (_JB_RBX * 8)(%r12),%rbx
- movq (_JB_RBP * 8)(%r12),%rbp
- movq (_JB_R13 * 8)(%r12),%r13
- movq (_JB_R14 * 8)(%r12),%r14
- movq (_JB_R15 * 8)(%r12),%r15
- movq (_JB_RSP * 8)(%r12),%rsp
- movq (_JB_PC * 8)(%r12),%r11
- movq (_JB_R12 * 8)(%r12),%r12
-
- movl %r8d,%eax
- testl %eax,%eax
- jnz 1f
- incl %eax
-1: movq %r11,0(%rsp)
- ret
diff --git a/lib/libc/arch/x86_64/gen/sigsetjmp.S b/lib/libc/arch/x86_64/gen/sigsetjmp.S
deleted file mode 100644
index e4c26d50927..00000000000
--- a/lib/libc/arch/x86_64/gen/sigsetjmp.S
+++ /dev/null
@@ -1,107 +0,0 @@
-/* $OpenBSD: sigsetjmp.S,v 1.2 2004/02/09 21:25:08 deraadt Exp $ */
-/* $NetBSD: __setjmp14.S,v 1.1 2001/06/19 00:25:02 fvdl Exp $ */
-
-/*
- * Copyright (c) 2001 Wasabi Systems, Inc.
- * All rights reserved.
- *
- * Written by Frank van der Linden for Wasabi Systems, Inc.
- *
- * 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 for the NetBSD Project by
- * Wasabi Systems, Inc.
- * 4. The name of Wasabi Systems, Inc. may not be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC
- * 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>
-#include <machine/setjmp.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.
- * The previous signal state is restored.
- */
-
-ENTRY(sigsetjmp)
- movl %esi,(_JB_SIGFLAG * 8)(%rdi)
- testl %esi,%esi
- jz 2f
-
- pushq %rdi
- xorq %rdi,%rdi
-#ifdef PIC
- call PIC_PLT(_C_LABEL(sigblock))
-#else
- call _C_LABEL(sigblock)
-#endif
- popq %rdi
- movq %rax,(_JB_SIGMASK * 8)(%rdi)
-
-2: movq (%rsp),%r11
- movq %rbx,(_JB_RBX * 8)(%rdi)
- movq %rbp,(_JB_RBP * 8)(%rdi)
- movq %r12,(_JB_R12 * 8)(%rdi)
- movq %r13,(_JB_R13 * 8)(%rdi)
- movq %r14,(_JB_R14 * 8)(%rdi)
- movq %r15,(_JB_R15 * 8)(%rdi)
- movq %rsp,(_JB_RSP * 8)(%rdi)
- movq %r11,(_JB_PC * 8)(%rdi)
-
-2: xorl %eax,%eax
- ret
-
-ENTRY(siglongjmp)
- movq %rdi,%r12
- pushq %rsi
- cmpl $0, (_JB_SIGFLAG * 8)(%rdi)
- jz 2f
-
- movq (_JB_SIGMASK * 8)(%rdi),%rdi
-#ifdef PIC
- call PIC_PLT(_C_LABEL(sigsetmask))
-#else
- call _C_LABEL(sigsetmask)
-#endif
-2: popq %rax
- movq (_JB_RBX * 8)(%r12),%rbx
- movq (_JB_RBP * 8)(%r12),%rbp
- movq (_JB_R13 * 8)(%r12),%r13
- movq (_JB_R14 * 8)(%r12),%r14
- movq (_JB_R15 * 8)(%r12),%r15
- movq (_JB_RSP * 8)(%r12),%rsp
- movq (_JB_PC * 8)(%r12),%r11
- movq (_JB_R12 * 8)(%r12),%r12
-
- testl %eax,%eax
- jnz 1f
- incl %eax
-1: movq %r11,0(%rsp)
- ret