From c08bd962f2f00e09e46989c18fcdd8cbbc2caf6d Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Thu, 12 Feb 2015 13:35:19 +0100 Subject: [PATCH] Remove the non-standard finite() function. --- i387/Make.files | 2 +- i387/s_finite.S | 23 ----------------------- include/openlibm_math.h | 2 -- src/Make.files | 1 - src/s_finite.c | 31 ------------------------------- src/s_finitef.c | 34 ---------------------------------- 6 files changed, 1 insertion(+), 92 deletions(-) delete mode 100644 i387/s_finite.S delete mode 100644 src/s_finite.c delete mode 100644 src/s_finitef.c diff --git a/i387/Make.files b/i387/Make.files index abfb4fe..369c541 100644 --- a/i387/Make.files +++ b/i387/Make.files @@ -1,6 +1,6 @@ $(CUR_SRCS) = e_exp.S e_fmod.S e_log.S e_log10.S \ e_remainder.S e_sqrt.S s_ceil.S s_copysign.S \ - s_finite.S s_floor.S s_llrint.S s_logb.S s_lrint.S \ + s_floor.S s_llrint.S s_logb.S s_lrint.S \ s_remquo.S s_rint.S s_tan.S s_trunc.S ifneq ($(OS), WINNT) diff --git a/i387/s_finite.S b/i387/s_finite.S deleted file mode 100644 index 41015b4..0000000 --- a/i387/s_finite.S +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Written by: - * J.T. Conklin (jtc@netbsd.org) - * Public domain. - */ - -#include -//__FBSDID("$FreeBSD: src/lib/msun/i387/s_finite.S,v 1.10 2011/01/07 16:13:12 kib Exp $") - -ENTRY(finite) - movl 8(%esp),%eax - andl $0x7ff00000, %eax - cmpl $0x7ff00000, %eax - setneb %al - andl $0x000000ff, %eax - ret -END(finite) - - -/* Enable stack protection */ -#if defined(__linux__) && defined(__ELF__) -.section .note.GNU-stack,"",%progbits -#endif diff --git a/include/openlibm_math.h b/include/openlibm_math.h index faa30de..f786eb5 100644 --- a/include/openlibm_math.h +++ b/include/openlibm_math.h @@ -303,7 +303,6 @@ double trunc(double); * BSD math library entry points */ #if __BSD_VISIBLE -int finite(double) __pure2; int isnanf(float) __pure2; /* @@ -390,7 +389,6 @@ float fminf(float, float) __pure2; */ #if __BSD_VISIBLE float dremf(float, float); -int finitef(float) __pure2; float j0f(float); float j1f(float); float jnf(int, float); diff --git a/src/Make.files b/src/Make.files index 8c8bf07..ef79a4a 100644 --- a/src/Make.files +++ b/src/Make.files @@ -15,7 +15,6 @@ $(CUR_SRCS) = common.c \ s_copysign.c s_copysignf.c s_cos.c s_cosf.c \ s_csqrt.c s_csqrtf.c s_erf.c s_erff.c \ s_exp2.c s_exp2f.c s_expm1.c s_expm1f.c s_fabs.c s_fabsf.c s_fdim.c \ - s_finite.c s_finitef.c \ s_floor.c s_floorf.c s_fma.c s_fmaf.c \ s_fmax.c s_fmaxf.c s_fmin.c \ s_fminf.c s_fpclassify.c \ diff --git a/src/s_finite.c b/src/s_finite.c deleted file mode 100644 index 8118140..0000000 --- a/src/s_finite.c +++ /dev/null @@ -1,31 +0,0 @@ -/* @(#)s_finite.c 5.1 93/09/24 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -#include "cdefs-compat.h" -//__FBSDID("$FreeBSD: src/lib/msun/src/s_finite.c,v 1.9 2008/02/22 02:30:35 das Exp $"); - -/* - * finite(x) returns 1 is x is finite, else 0; - * no branching! - */ - -#include - -#include "math_private.h" - -DLLEXPORT int -finite(double x) -{ - int32_t hx; - GET_HIGH_WORD(hx,x); - return (int)((u_int32_t)((hx&0x7fffffff)-0x7ff00000)>>31); -} diff --git a/src/s_finitef.c b/src/s_finitef.c deleted file mode 100644 index b26b0c7..0000000 --- a/src/s_finitef.c +++ /dev/null @@ -1,34 +0,0 @@ -/* s_finitef.c -- float version of s_finite.c. - * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -#include "cdefs-compat.h" -//__FBSDID("$FreeBSD: src/lib/msun/src/s_finitef.c,v 1.7 2008/02/22 02:30:35 das Exp $"); - -/* - * finitef(x) returns 1 is x is finite, else 0; - * no branching! - */ - -#include - -#include "math_private.h" - -DLLEXPORT int -finitef(float x) -{ - int32_t ix; - GET_FLOAT_WORD(ix,x); - return (int)((u_int32_t)((ix&0x7fffffff)-0x7f800000)>>31); -}