Add i387 FPU routines for log2(3) and log2f(3).

ok christos@
This commit is contained in:
rpaulo 2005-07-21 20:58:21 +00:00
parent c34c8aeb78
commit 1185f13617
4 changed files with 52 additions and 16 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.67 2005/07/21 16:58:39 christos Exp $
# $NetBSD: Makefile,v 1.68 2005/07/21 20:58:21 rpaulo Exp $
#
# @(#)Makefile 5.1beta 93/09/24
#
@ -56,13 +56,13 @@ ARCH_SRCS = s_copysign.S s_copysignf.S lrint.S
.if (defined(I387_LIBM) || (${MACHINE_ARCH} == "x86_64"))
.PATH: ${.CURDIR}/arch/i387
ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_expf.S e_fmod.S e_log.S \
e_logf.S e_log10.S e_log10f.S e_remainder.S e_remainderf.S \
e_scalb.S e_scalbf.S e_sqrt.S e_sqrtf.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 lrint.S
e_logf.S e_log10.S e_log10f.S e_log2.S e_log2f.S e_remainder.S \
e_remainderf.S e_scalb.S e_scalbf.S e_sqrt.S e_sqrtf.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 lrint.S
.else
SUBDIR=arch/i387
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.5 2004/07/01 17:30:48 drochner Exp $
# $NetBSD: Makefile,v 1.6 2005/07/21 20:58:21 rpaulo Exp $
#
NOLINT= # defined
@ -7,13 +7,13 @@ USE_SHLIBDIR= yes
LIB= m387
SRCS=e_acos.S e_asin.S e_atan2.S e_exp.S e_expf.S e_fmod.S e_log.S \
e_logf.S e_log10.S e_log10f.S e_remainder.S e_remainderf.S \
e_scalb.S e_scalbf.S e_sqrt.S e_sqrtf.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 \
e_logf.S e_log10.S e_log10f.S e_log2.S e_log2f.S e_remainder.S \
e_remainderf.S e_scalb.S e_scalbf.S e_sqrt.S e_sqrtf.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 \
lrint.S
.include <bsd.lib.mk>

View File

@ -0,0 +1,18 @@
/*
* Written by Rui Paulo <rpaulo@NetBSD.org>, based on e_log.S.
* Public domain.
*/
#include <machine/asm.h>
#include "abi.h"
RCSID("$NetBSD: e_log2.S,v 1.1 2005/07/21 20:58:21 rpaulo Exp $")
ENTRY(__ieee754_log2)
XMM_ONE_ARG_DOUBLE_PROLOGUE
fld1
fldl ARG_DOUBLE_ONE
fyl2x
XMM_DOUBLE_EPILOGUE
ret

View File

@ -0,0 +1,18 @@
/*
* Written by Rui Paulo <rpaulo@NetBSD.org>, based on e_logf.S.
* Public domain.
*/
#include <machine/asm.h>
#include "abi.h"
RCSID("$NetBSD: e_log2f.S,v 1.1 2005/07/21 20:58:21 rpaulo Exp $")
ENTRY(__ieee754_log2f)
XMM_ONE_ARG_FLOAT_PROLOGUE
fld1
flds ARG_FLOAT_ONE
fyl2x
XMM_FLOAT_EPILOGUE
ret