diff --git a/lib/libm/Makefile b/lib/libm/Makefile index 51faf53ce09e..c11fa28f870d 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -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 diff --git a/lib/libm/arch/i387/Makefile b/lib/libm/arch/i387/Makefile index 93aaebad9069..4d37953d8fc6 100644 --- a/lib/libm/arch/i387/Makefile +++ b/lib/libm/arch/i387/Makefile @@ -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 diff --git a/lib/libm/arch/i387/e_log2.S b/lib/libm/arch/i387/e_log2.S new file mode 100644 index 000000000000..13e66f705be3 --- /dev/null +++ b/lib/libm/arch/i387/e_log2.S @@ -0,0 +1,18 @@ +/* + * Written by Rui Paulo , based on e_log.S. + * Public domain. + */ + +#include + +#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 diff --git a/lib/libm/arch/i387/e_log2f.S b/lib/libm/arch/i387/e_log2f.S new file mode 100644 index 000000000000..d362aae26bde --- /dev/null +++ b/lib/libm/arch/i387/e_log2f.S @@ -0,0 +1,18 @@ +/* + * Written by Rui Paulo , based on e_logf.S. + * Public domain. + */ + +#include + +#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