diff options
Diffstat (limited to 'libm/powerpc')
| -rw-r--r-- | libm/powerpc/Makefile.arch | 18 | ||||
| -rw-r--r-- | libm/powerpc/s_ceil.c | 4 | ||||
| -rw-r--r-- | libm/powerpc/s_copysign.c | 3 | ||||
| -rw-r--r-- | libm/powerpc/s_floor.c | 4 | ||||
| -rw-r--r-- | libm/powerpc/s_frexp.c | 3 | ||||
| -rw-r--r-- | libm/powerpc/s_ldexp.c | 3 | ||||
| -rw-r--r-- | libm/powerpc/s_logb.c | 4 | ||||
| -rw-r--r-- | libm/powerpc/s_modf.c | 2 | ||||
| -rw-r--r-- | libm/powerpc/s_nearbyint.c | 2 | ||||
| -rw-r--r-- | libm/powerpc/s_rint.c | 3 | ||||
| -rw-r--r-- | libm/powerpc/s_round.c | 2 | ||||
| -rw-r--r-- | libm/powerpc/s_trunc.c | 2 | ||||
| -rw-r--r-- | libm/powerpc/w_scalb.c | 7 |
13 files changed, 37 insertions, 20 deletions
diff --git a/libm/powerpc/Makefile.arch b/libm/powerpc/Makefile.arch index 7eb68bb59..7c7600f80 100644 --- a/libm/powerpc/Makefile.arch +++ b/libm/powerpc/Makefile.arch @@ -1,28 +1,18 @@ # Makefile for uClibc # -# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> +# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> # # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -libm_ARCH_DIR:=$(top_srcdir)libm/powerpc -libm_ARCH_OUT:=$(top_builddir)libm/powerpc - libm_ARCH_SRC:=$(wildcard $(libm_ARCH_DIR)/*.c) libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_DIR)/%.c,$(libm_ARCH_OUT)/%.o,$(libm_ARCH_SRC)) libm_ARCH_OBJS:=$(libm_ARCH_OBJ) ifeq ($(DOPIC),y) -libm-a-$(DO_C99_MATH)+=$(libm_ARCH_OBJS:.o=.os) +libm-a-y+=$(libm_ARCH_OBJS:.o=.os) else -libm-a-$(DO_C99_MATH)+=$(libm_ARCH_OBJS) +libm-a-y+=$(libm_ARCH_OBJS) endif -libm-so-$(DO_C99_MATH)+=$(libm_ARCH_OBJS:.o=.os) - -libm-multi-$(DO_C99_MATH)+=$(libm_ARCH_SRC) - -objclean-y+=libm_arch_objclean - -libm_arch_objclean: - $(RM) $(libm_ARCH_OUT)/*.{o,os} +libm-so-y+=$(libm_ARCH_OBJS:.o=.os) diff --git a/libm/powerpc/s_ceil.c b/libm/powerpc/s_ceil.c index f6680eedf..8db5ce537 100644 --- a/libm/powerpc/s_ceil.c +++ b/libm/powerpc/s_ceil.c @@ -21,6 +21,7 @@ * * *******************************************************************************/ +#include <math.h> #include <endian.h> static const double twoTo52 = 4503599627370496.0; @@ -48,6 +49,7 @@ typedef union * Ceil(x) returns the smallest integer not less than x. * *******************************************************************************/ +libm_hidden_proto(ceil) double ceil ( double x ) { DblInHex xInHex,OldEnvironment; @@ -108,4 +110,4 @@ double ceil ( double x ) *******************************************************************************/ return ( x ); } - +libm_hidden_def(ceil) diff --git a/libm/powerpc/s_copysign.c b/libm/powerpc/s_copysign.c index d3fb5f40b..1a988ac87 100644 --- a/libm/powerpc/s_copysign.c +++ b/libm/powerpc/s_copysign.c @@ -22,6 +22,7 @@ * * *******************************************************************************/ +#include <math.h> #include "../fp_private.h" /******************************************************************************* @@ -34,6 +35,7 @@ * suggested in the IEEE standard 754. * *******************************************************************************/ +libm_hidden_proto(copysign) double copysign ( double arg2, double arg1 ) { union @@ -54,3 +56,4 @@ double copysign ( double arg2, double arg1 ) return y.dbl; } +libm_hidden_def(copysign) diff --git a/libm/powerpc/s_floor.c b/libm/powerpc/s_floor.c index 0ddbb9b66..ff3436707 100644 --- a/libm/powerpc/s_floor.c +++ b/libm/powerpc/s_floor.c @@ -21,6 +21,7 @@ * * *******************************************************************************/ +#include <math.h> #include <endian.h> static const double twoTo52 = 4503599627370496.0; @@ -48,6 +49,7 @@ typedef union * Floor(x) returns the largest integer not greater than x. * *******************************************************************************/ +libm_hidden_proto(floor) double floor ( double x ) { DblInHex xInHex,OldEnvironment; @@ -108,4 +110,4 @@ double floor ( double x ) *******************************************************************************/ return ( x ); } - +libm_hidden_def(floor) diff --git a/libm/powerpc/s_frexp.c b/libm/powerpc/s_frexp.c index 7c998f81a..001aaf708 100644 --- a/libm/powerpc/s_frexp.c +++ b/libm/powerpc/s_frexp.c @@ -39,6 +39,7 @@ typedef union double dbl; } DblInHex; +libm_hidden_proto(frexp) double frexp ( double value, int *eptr ) { DblInHex argument; @@ -61,4 +62,4 @@ double frexp ( double value, int *eptr ) argument.words.hi = ( argument.words.hi & 0x800fffff ) | 0x3fe00000; return argument.dbl; } - +libm_hidden_def(frexp) diff --git a/libm/powerpc/s_ldexp.c b/libm/powerpc/s_ldexp.c index 7e52352ae..10100d7c2 100644 --- a/libm/powerpc/s_ldexp.c +++ b/libm/powerpc/s_ldexp.c @@ -37,6 +37,7 @@ typedef union double dbl; } DblInHex; +libm_hidden_proto(ldexp) double ldexp ( double value, int exp ) { if ( exp > SHRT_MAX ) @@ -45,4 +46,4 @@ double ldexp ( double value, int exp ) exp = -SHRT_MAX; return scalb ( value, exp ); } - +libm_hidden_def(ldexp) diff --git a/libm/powerpc/s_logb.c b/libm/powerpc/s_logb.c index 3caecd95f..81daa412e 100644 --- a/libm/powerpc/s_logb.c +++ b/libm/powerpc/s_logb.c @@ -32,6 +32,7 @@ * Standard 754. * *******************************************************************************/ +#include <math.h> #include <endian.h> typedef union @@ -60,6 +61,7 @@ static const DblInHex minusInf = {{ 0xFFF00000, 0x00000000 }}; ******************************************************************************** *******************************************************************************/ +libm_hidden_proto(logb) double logb ( double x ) { DblInHex xInHex; @@ -102,4 +104,4 @@ double logb ( double x ) return ( xInHex.dbl - klTod ); } } - +libm_hidden_def(logb) diff --git a/libm/powerpc/s_modf.c b/libm/powerpc/s_modf.c index cb8338a90..b9d69445d 100644 --- a/libm/powerpc/s_modf.c +++ b/libm/powerpc/s_modf.c @@ -280,6 +280,7 @@ long int roundtol ( double x ) * modf is the double implementation. * *******************************************************************************/ +libm_hidden_proto(modf) double modf ( double x, double *iptr ) { register double OldEnvironment, xtrunc; @@ -340,3 +341,4 @@ double modf ( double x, double *iptr ) return ( argument.dbl ); } } +libm_hidden_def(modf) diff --git a/libm/powerpc/s_nearbyint.c b/libm/powerpc/s_nearbyint.c index f2d7ded35..068e21378 100644 --- a/libm/powerpc/s_nearbyint.c +++ b/libm/powerpc/s_nearbyint.c @@ -15,6 +15,7 @@ static const double twoTo52 = 4503599627370496.0; +libm_hidden_proto(nearbyint) double nearbyint ( double x ) { double y; @@ -34,3 +35,4 @@ double nearbyint ( double x ) asm ("mtfsf 255,%0" : /*NULLOUT*/ : /*IN*/ "f" ( OldEnvironment )); return ( y ); } +libm_hidden_def(nearbyint) diff --git a/libm/powerpc/s_rint.c b/libm/powerpc/s_rint.c index c229515c4..dd2ae585e 100644 --- a/libm/powerpc/s_rint.c +++ b/libm/powerpc/s_rint.c @@ -70,6 +70,7 @@ static const double doubleToLong = 4503603922337792.0; // 2^52 static const DblInHex Huge = {{ 0x7FF00000, 0x00000000 }}; static const DblInHex TOWARDZERO = {{ 0x00000000, 0x00000001 }}; +libm_hidden_proto(rint) /******************************************************************************* * * * The function rint rounds its double argument to integral value * @@ -155,4 +156,4 @@ double rint ( double x ) *******************************************************************************/ return ( x ); } - +libm_hidden_def(rint) diff --git a/libm/powerpc/s_round.c b/libm/powerpc/s_round.c index a0f72ebe3..62d5936d9 100644 --- a/libm/powerpc/s_round.c +++ b/libm/powerpc/s_round.c @@ -29,6 +29,7 @@ static const double twoTo52 = 4503599627370496.0; * * *******************************************************************************/ +libm_hidden_proto(round) double round ( double x ) { DblInHex argument, OldEnvironment; @@ -111,3 +112,4 @@ double round ( double x ) *******************************************************************************/ return ( x ); } +libm_hidden_def(round) diff --git a/libm/powerpc/s_trunc.c b/libm/powerpc/s_trunc.c index 7db7606b6..f793992a7 100644 --- a/libm/powerpc/s_trunc.c +++ b/libm/powerpc/s_trunc.c @@ -27,6 +27,7 @@ static const double twoTo52 = 4503599627370496.0; * * *******************************************************************************/ +libm_hidden_proto(trunc) double trunc ( double x ) { DblInHex argument,OldEnvironment; @@ -85,3 +86,4 @@ double trunc ( double x ) *******************************************************************************/ return ( x ); } +libm_hidden_def(trunc) diff --git a/libm/powerpc/w_scalb.c b/libm/powerpc/w_scalb.c index fe23ece53..408136001 100644 --- a/libm/powerpc/w_scalb.c +++ b/libm/powerpc/w_scalb.c @@ -19,6 +19,7 @@ ** ***********************************************************************/ +#include <math.h> #include <endian.h> typedef union @@ -50,7 +51,12 @@ static const double twoToM1022 = 2.225073858507201383e-308; // 0x1p-1022 Calls: none. ***********************************************************************/ +libm_hidden_proto(scalb) +#ifdef _SCALB_INT double scalb ( double x, int n ) +#else +double scalb ( double x, double n ) +#endif { DblInHex xInHex; @@ -85,3 +91,4 @@ double scalb ( double x, int n ) xInHex.words.hi = ( ( unsigned long ) ( n + 1023 ) ) << 20; return ( x * xInHex.dbl ); } +libm_hidden_def(scalb) |
