diff options
-rw-r--r-- | lib/libm/Makefile | 13 | ||||
-rw-r--r-- | lib/libm/arch/i387/s_llrint.S | 35 | ||||
-rw-r--r-- | lib/libm/arch/i387/s_llrintf.S | 35 | ||||
-rw-r--r-- | lib/libm/arch/i387/s_lrint.S | 34 | ||||
-rw-r--r-- | lib/libm/arch/i387/s_lrintf.S | 34 | ||||
-rw-r--r-- | lib/libm/src/s_llrint.c (renamed from lib/libm/src/llrint.c) | 4 | ||||
-rw-r--r-- | lib/libm/src/s_llrintf.c (renamed from lib/libm/src/llrintf.c) | 2 | ||||
-rw-r--r-- | lib/libm/src/s_lrint.c (renamed from lib/libm/src/lrint.c) | 2 | ||||
-rw-r--r-- | lib/libm/src/s_lrintf.c (renamed from lib/libm/src/lrintf.c) | 2 |
9 files changed, 150 insertions, 11 deletions
diff --git a/lib/libm/Makefile b/lib/libm/Makefile index 617cc78cafe..57cb541cb30 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.28 1995/11/20 22:06:19 jtc Exp $ -# $OpenBSD: Makefile,v 1.40 2006/07/12 07:26:08 brad Exp $ +# $OpenBSD: Makefile,v 1.41 2006/09/25 20:25:41 kettenis Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -61,8 +61,9 @@ ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_fmod.S e_log.S e_log10.S \ s_atan.S s_atanf.S s_ceil.S s_ceilf.S s_copysign.S s_copysignf.S \ s_cos.S s_cosf.S s_finite.S s_finitef.S s_floor.S s_floorf.S \ s_ilogb.S s_ilogbf.S s_log1p.S s_log1pf.S s_logb.S s_logbf.S \ - s_rint.S s_rintf.S s_scalbn.S s_scalbnf.S s_significand.S \ - s_significandf.S s_sin.S s_sinf.S s_tan.S s_tanf.S + s_llrint.S s_llrintf.S s_lrint.S s_lrintf.S s_rint.S s_rintf.S\ + s_scalbn.S s_scalbnf.S s_significand.S s_significandf.S \ + s_sin.S s_sinf.S s_tan.S s_tanf.S .elif (${MACHINE_ARCH} == "amd64") .PATH: ${.CURDIR}/arch/amd64 CPPFLAGS+=-I${.CURDIR}/arch/amd64 @@ -108,14 +109,14 @@ COMMON_SRCS = e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \ e_sinh.c e_sinhf.c e_sqrt.c e_sqrtf.c \ k_cos.c k_cosf.c k_rem_pio2.c k_rem_pio2f.c k_sin.c k_sinf.c \ k_standard.c k_tan.c k_tanf.c \ - lrint.c lrintf.c llrint.c llrintf.c lround.c lroundf.c llround.c \ - llroundf.c \ + lround.c lroundf.c llround.c llroundf.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_cbrt.c s_cbrtf.c s_ceil.c \ s_ceilf.c s_copysign.c s_copysignf.c s_cos.c s_cosf.c s_erf.c s_erff.c \ s_expm1.c s_expm1f.c s_fabsf.c s_finite.c s_finitef.c \ s_floor.c s_floorf.c s_frexpf.c s_ilogb.c s_ilogbf.c \ s_isinff.c s_isnanf.c s_ldexpf.c s_lib_version.c s_log1p.c \ - s_log1pf.c s_logb.c s_logbf.c s_matherr.c s_modff.c \ + s_log1pf.c s_logb.c s_logbf.c s_llrint.c s_llrintf.c s_lrint.c \ + s_lrintf.c s_matherr.c s_modff.c \ s_nextafter.c s_nextafterf.c s_rint.c s_rintf.c s_round.c s_roundf.c \ s_scalbn.c s_scalbnf.c s_signgam.c s_significand.c s_significandf.c \ s_sin.c s_sinf.c s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_trunc.c s_truncf.c \ diff --git a/lib/libm/arch/i387/s_llrint.S b/lib/libm/arch/i387/s_llrint.S new file mode 100644 index 00000000000..6a801834b0c --- /dev/null +++ b/lib/libm/arch/i387/s_llrint.S @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2005 David Schultz <das@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> + +ENTRY(llrint) + fldl 4(%esp) + subl $8,%esp + fistpll (%esp) + popl %eax + popl %edx + ret diff --git a/lib/libm/arch/i387/s_llrintf.S b/lib/libm/arch/i387/s_llrintf.S new file mode 100644 index 00000000000..7d3e9500150 --- /dev/null +++ b/lib/libm/arch/i387/s_llrintf.S @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2005 David Schultz <das@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> + +ENTRY(llrintf) + flds 4(%esp) + subl $8,%esp + fistpll (%esp) + popl %eax + popl %edx + ret diff --git a/lib/libm/arch/i387/s_lrint.S b/lib/libm/arch/i387/s_lrint.S new file mode 100644 index 00000000000..fb43e6b57fb --- /dev/null +++ b/lib/libm/arch/i387/s_lrint.S @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2005 David Schultz <das@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> + +ENTRY(lrint) + fldl 4(%esp) + subl $4,%esp + fistpl (%esp) + popl %eax + ret diff --git a/lib/libm/arch/i387/s_lrintf.S b/lib/libm/arch/i387/s_lrintf.S new file mode 100644 index 00000000000..07e1ff4d2af --- /dev/null +++ b/lib/libm/arch/i387/s_lrintf.S @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2005 David Schultz <das@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> + +ENTRY(lrintf) + flds 4(%esp) + subl $4,%esp + fistpl (%esp) + popl %eax + ret diff --git a/lib/libm/src/llrint.c b/lib/libm/src/s_llrint.c index c92da9e3c7d..56c321f3d41 100644 --- a/lib/libm/src/llrint.c +++ b/lib/libm/src/s_llrint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: llrint.c,v 1.1 2005/11/17 20:07:40 otto Exp $ */ +/* $OpenBSD: s_llrint.c,v 1.1 2006/09/25 20:25:41 kettenis Exp $ */ /* $NetBSD: llrint.c,v 1.2 2004/10/13 15:18:32 drochner Exp $ */ /* @@ -11,4 +11,4 @@ #define RESTYPE_MIN LLONG_MIN #define RESTYPE_MAX LLONG_MAX -#include "lrint.c" +#include "s_lrint.c" diff --git a/lib/libm/src/llrintf.c b/lib/libm/src/s_llrintf.c index 2a242afb13d..36a806f3880 100644 --- a/lib/libm/src/llrintf.c +++ b/lib/libm/src/s_llrintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: llrintf.c,v 1.1 2005/11/17 20:07:40 otto Exp $ */ +/* $OpenBSD: s_llrintf.c,v 1.1 2006/09/25 20:25:41 kettenis Exp $ */ /* $NetBSD: llrintf.c,v 1.2 2004/10/13 15:18:32 drochner Exp $ */ /* diff --git a/lib/libm/src/lrint.c b/lib/libm/src/s_lrint.c index 146bc81b10f..43684f3c503 100644 --- a/lib/libm/src/lrint.c +++ b/lib/libm/src/s_lrint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lrint.c,v 1.1 2005/11/17 20:07:40 otto Exp $ */ +/* $OpenBSD: s_lrint.c,v 1.1 2006/09/25 20:25:41 kettenis Exp $ */ /* $NetBSD: lrint.c,v 1.3 2004/10/13 15:18:32 drochner Exp $ */ /*- diff --git a/lib/libm/src/lrintf.c b/lib/libm/src/s_lrintf.c index 2db9fa21342..d045e116517 100644 --- a/lib/libm/src/lrintf.c +++ b/lib/libm/src/s_lrintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lrintf.c,v 1.2 2005/11/17 20:51:56 otto Exp $ */ +/* $OpenBSD: s_lrintf.c,v 1.1 2006/09/25 20:25:41 kettenis Exp $ */ /* $NetBSD: lrintf.c,v 1.3 2004/10/13 15:18:32 drochner Exp $ */ /*- |