summaryrefslogtreecommitdiff
path: root/libm
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-10-26 10:15:05 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-10-26 10:15:05 +0000
commit6d0c300ebf07eafbda54a3caa3d9902265d1312a (patch)
tree32863c3c77b1b135301aeb74a0d32b0308b842d3 /libm
parentbddfb866b0a7c70010083c3786ef4285643d4241 (diff)
Remove s_ceilf.c and s_floorf.c, ceilf and floorf are provided by the float_wrapper. I hope that __ceilf and __floorf are not needed anywhere. Use only __finite from s_finite.c, disabled in fpmacros.c. Allow IMA compiling, 2 files: s_lib_version.c and w_cabs.c have to be reworked for complete IMA.
Diffstat (limited to 'libm')
-rw-r--r--libm/Makefile2
-rw-r--r--libm/Makefile.in10
-rw-r--r--libm/fpmacros.c2
-rw-r--r--libm/s_ceilf.c62
-rw-r--r--libm/s_finite.c5
-rw-r--r--libm/s_floorf.c71
6 files changed, 13 insertions, 139 deletions
diff --git a/libm/Makefile b/libm/Makefile
index 6170232e1..73101be89 100644
--- a/libm/Makefile
+++ b/libm/Makefile
@@ -60,7 +60,7 @@ CSRC := e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c\
w_cosh.c w_drem.c w_exp.c w_fmod.c w_gamma.c w_gamma_r.c\
w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c w_lgamma_r.c\
w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c\
- w_sqrt.c fpmacros.c nan.c s_ceilf.c s_floorf.c
+ w_sqrt.c fpmacros.c nan.c
FL_MOBJ := acosf.o acoshf.o asinf.o asinhf.o atan2f.o atanf.o atanhf.o cbrtf.o \
ceilf.o copysignf.o cosf.o coshf.o erfcf.o erff.o exp2f.o expf.o \
expm1f.o fabsf.o fdimf.o floorf.o fmaf.o fmaxf.o fminf.o fmodf.o \
diff --git a/libm/Makefile.in b/libm/Makefile.in
index baef02a30..ddc8dfa16 100644
--- a/libm/Makefile.in
+++ b/libm/Makefile.in
@@ -24,7 +24,7 @@ CFLAGS+=$(SSP_ALL_CFLAGS)
CFLAGS+=-D_IEEE_LIBM -D_ISOC99_SOURCE -D_SVID_SOURCE
-DOMULTI=n
+#DOMULTI=n
LIB_NAME:=libm
@@ -49,7 +49,7 @@ CSRC:= e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c \
w_cosh.c w_drem.c w_exp.c w_fmod.c w_gamma.c w_gamma_r.c \
w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c w_lgamma_r.c \
w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c \
- w_sqrt.c fpmacros.c nan.c s_ceilf.c s_floorf.c
+ w_sqrt.c fpmacros.c nan.c
FL_MOBJ:=acosf.o acoshf.o asinf.o asinhf.o atan2f.o atanf.o atanhf.o cbrtf.o \
ceilf.o copysignf.o cosf.o coshf.o erfcf.o erff.o exp2f.o expf.o \
expm1f.o fabsf.o fdimf.o floorf.o fmaf.o fmaxf.o fminf.o fmodf.o \
@@ -92,6 +92,9 @@ FL_MOBJ:=$(filter-out $(patsubst s_%.o,%.o,$(notdir $(libm_ARCH_OBJS))),$(FL_MOB
endif
endif
+LIBM_NO_MULTI:=s_lib_version.c w_cabs.c
+CSRC:=$(filter-out $(LIBM_NO_MULTI),$(CSRC))
+
libm_SRC:=$(patsubst %.c,$(libm_DIR)/%.c,$(CSRC))
libm_OBJ:=$(patsubst $(libm_DIR)/%.c,$(libm_OUT)/%.o,$(libm_SRC))
@@ -100,7 +103,7 @@ libm_MOBJ:=$(patsubst %.o,$(libm_OUT)/%.o,$(FL_MOBJ))
libm_DEF:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ))))
-libm_OBJS:=$(libm_OBJ) $(libm_MOBJ)
+libm_OBJS:=$(libm_OBJ) $(libm_MOBJ) $(patsubst %.c,$(libm_OUT)/%.o,$(LIBM_NO_MULTI))
$(libm_MOBJ) $(libm_MOBJ:.o=.os): $(libm_MSRC)
$(compile.m)
@@ -113,6 +116,7 @@ CFLAGS-multi-$(UCLIBC_HAS_FLOATS)+=$(libm_DEF)
libm-multi-$(UCLIBC_HAS_FLOATS)+=$(libm_SRC) $(libm_MSRC)
#libm-multi-$(UCLIBC_HAS_FLOATS)+=$(libm_MSRC)
#libm-nomulti-$(UCLIBC_HAS_FLOATS)+=$(libm_OBJ)
+libm-nomulti-$(UCLIBC_HAS_FLOATS)+=$(patsubst %.c,$(libm_OUT)/%.o,$(LIBM_NO_MULTI))
objclean-y+=libm_clean
diff --git a/libm/fpmacros.c b/libm/fpmacros.c
index 78cc46e9a..57c6b5a7a 100644
--- a/libm/fpmacros.c
+++ b/libm/fpmacros.c
@@ -160,11 +160,13 @@ int __finitef ( float x )
}
weak_alias (__finitef, finitef)
+#if 0 /* use __finite in s_finite.c */
int __finite ( double x )
{
return ( __fpclassify ( x ) >= FP_ZERO );
}
weak_alias (__finite, finite)
+#endif
/***********************************************************************
diff --git a/libm/s_ceilf.c b/libm/s_ceilf.c
deleted file mode 100644
index d43bede8c..000000000
--- a/libm/s_ceilf.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* s_ceilf.c -- float version of s_ceil.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.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_ceilf.c,v 1.4 1995/05/10 20:46:55 jtc Exp $";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float huge = 1.0e30;
-#else
-static float huge = 1.0e30;
-#endif
-
-#ifdef __STDC__
- float __ceilf(float x)
-#else
- float __ceilf(x)
- float x;
-#endif
-{
- int32_t i0,j0;
- u_int32_t i;
-
- GET_FLOAT_WORD(i0,x);
- j0 = ((i0>>23)&0xff)-0x7f;
- if(j0<23) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0<0) {i0=0x80000000;}
- else if(i0!=0) { i0=0x3f800000;}
- }
- } else {
- i = (0x007fffff)>>j0;
- if((i0&i)==0) return x; /* x is integral */
- if(huge+x>(float)0.0) { /* raise inexact flag */
- if(i0>0) i0 += (0x00800000)>>j0;
- i0 &= (~i);
- }
- }
- } else {
- if(j0==0x80) return x+x; /* inf or NaN */
- else return x; /* x is integral */
- }
- SET_FLOAT_WORD(x,i0);
- return x;
-}
-weak_alias (__ceilf, ceilf)
diff --git a/libm/s_finite.c b/libm/s_finite.c
index 428570c14..a3385bcde 100644
--- a/libm/s_finite.c
+++ b/libm/s_finite.c
@@ -23,9 +23,9 @@ static char rcsid[] = "$NetBSD: s_finite.c,v 1.8 1995/05/10 20:47:17 jtc Exp $";
#include "math_private.h"
#ifdef __STDC__
- int finite(double x)
+ int __finite(double x)
#else
- int finite(x)
+ int __finite(x)
double x;
#endif
{
@@ -33,3 +33,4 @@ static char rcsid[] = "$NetBSD: s_finite.c,v 1.8 1995/05/10 20:47:17 jtc Exp $";
GET_HIGH_WORD(hx,x);
return (int)((u_int32_t)((hx&0x7fffffff)-0x7ff00000)>>31);
}
+weak_alias(__finite,finite)
diff --git a/libm/s_floorf.c b/libm/s_floorf.c
deleted file mode 100644
index 1cdc792c6..000000000
--- a/libm/s_floorf.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* s_floorf.c -- float version of s_floor.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.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_floorf.c,v 1.4 1995/05/10 20:47:22 jtc Exp $";
-#endif
-
-/*
- * floorf(x)
- * Return x rounded toward -inf to integral value
- * Method:
- * Bit twiddling.
- * Exception:
- * Inexact flag raised if x not equal to floorf(x).
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float huge = 1.0e30;
-#else
-static float huge = 1.0e30;
-#endif
-
-#ifdef __STDC__
- float __floorf(float x)
-#else
- float __floorf(x)
- float x;
-#endif
-{
- int32_t i0,j0;
- u_int32_t i;
- GET_FLOAT_WORD(i0,x);
- j0 = ((i0>>23)&0xff)-0x7f;
- if(j0<23) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0>=0) {i0=0;}
- else if((i0&0x7fffffff)!=0)
- { i0=0xbf800000;}
- }
- } else {
- i = (0x007fffff)>>j0;
- if((i0&i)==0) return x; /* x is integral */
- if(huge+x>(float)0.0) { /* raise inexact flag */
- if(i0<0) i0 += (0x00800000)>>j0;
- i0 &= (~i);
- }
- }
- } else {
- if(j0==0x80) return x+x; /* inf or NaN */
- else return x; /* x is integral */
- }
- SET_FLOAT_WORD(x,i0);
- return x;
-}
-weak_alias (__floorf, floorf)