diff options
Diffstat (limited to 'libm')
-rw-r--r-- | libm/fp_private.h | 3 | ||||
-rw-r--r-- | libm/fpmacros.c | 8 | ||||
-rw-r--r-- | libm/math_private.h | 10 | ||||
-rw-r--r-- | libm/powerpc/Makefile.arch | 4 | ||||
-rw-r--r-- | libm/powerpc/s_ceil.c | 4 | ||||
-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 | 3 | ||||
-rw-r--r-- | libm/powerpc/s_rint.c | 3 | ||||
-rw-r--r-- | libm/powerpc/s_round.c | 3 | ||||
-rw-r--r-- | libm/powerpc/s_trunc.c | 3 | ||||
-rw-r--r-- | libm/powerpc/w_scalb.c | 4 |
14 files changed, 39 insertions, 20 deletions
diff --git a/libm/fp_private.h b/libm/fp_private.h index 505400e33..0ddb616c4 100644 --- a/libm/fp_private.h +++ b/libm/fp_private.h @@ -70,10 +70,11 @@ *******************************************************************************/ #include <stdint.h> +#include <endian.h> typedef struct /* Hex representation of a double. */ { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) uint32_t high; uint32_t low; #else diff --git a/libm/fpmacros.c b/libm/fpmacros.c index 57c6b5a7a..2624054d0 100644 --- a/libm/fpmacros.c +++ b/libm/fpmacros.c @@ -248,7 +248,7 @@ int __isinfl ( long double x ) } return 0; } -weak_alias (__isinfl, isinfl); +weak_alias (__isinfl, isinfl) #endif /*********************************************************************** @@ -271,14 +271,14 @@ int __isnanf ( float x ) z.fval = x; return (((z.lval&FEXP_MASK) == FEXP_MASK) && ((z.lval&FFRAC_MASK) != 0)); } -weak_alias (__isnanf, isnanf); +weak_alias (__isnanf, isnanf) int __isnan ( double x ) { int class = __fpclassify(x); return ( class == FP_NAN ); } -weak_alias (__isnan, isnan); +weak_alias (__isnan, isnan) #if 0 int __isnanl ( long double x ) @@ -286,6 +286,6 @@ int __isnanl ( long double x ) int class = __fpclassify(x); return ( class == FP_NAN ); } -weak_alias (__isnanl, isnanl); +weak_alias (__isnanl, isnanl) #endif diff --git a/libm/math_private.h b/libm/math_private.h index 2f6ebb0d9..c4f513fb2 100644 --- a/libm/math_private.h +++ b/libm/math_private.h @@ -186,11 +186,11 @@ extern double __ieee754_scalb __P((double,double)); #endif /* fdlibm kernel function */ -extern double __kernel_standard __P((double,double,int)); -extern double __kernel_sin __P((double,double,int)); -extern double __kernel_cos __P((double,double)); -extern double __kernel_tan __P((double,double,int)); -extern int __kernel_rem_pio2 __P((double*,double*,int,int,int,const int*)); +extern double __kernel_standard __P((double,double,int)) attribute_hidden; +extern double __kernel_sin __P((double,double,int)) attribute_hidden; +extern double __kernel_cos __P((double,double)) attribute_hidden; +extern double __kernel_tan __P((double,double,int)) attribute_hidden; +extern int __kernel_rem_pio2 __P((double*,double*,int,int,int,const int*)) attribute_hidden; /* ieee style elementary float functions */ diff --git a/libm/powerpc/Makefile.arch b/libm/powerpc/Makefile.arch index c6d39676a..7eb68bb59 100644 --- a/libm/powerpc/Makefile.arch +++ b/libm/powerpc/Makefile.arch @@ -13,7 +13,11 @@ libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_DIR)/%.c,$(libm_ARCH_OUT)/%.o,$(libm_ARCH_ libm_ARCH_OBJS:=$(libm_ARCH_OBJ) +ifeq ($(DOPIC),y) +libm-a-$(DO_C99_MATH)+=$(libm_ARCH_OBJS:.o=.os) +else libm-a-$(DO_C99_MATH)+=$(libm_ARCH_OBJS) +endif libm-so-$(DO_C99_MATH)+=$(libm_ARCH_OBJS:.o=.os) libm-multi-$(DO_C99_MATH)+=$(libm_ARCH_SRC) diff --git a/libm/powerpc/s_ceil.c b/libm/powerpc/s_ceil.c index fd073de7b..f6680eedf 100644 --- a/libm/powerpc/s_ceil.c +++ b/libm/powerpc/s_ceil.c @@ -21,13 +21,15 @@ * * *******************************************************************************/ +#include <endian.h> + static const double twoTo52 = 4503599627370496.0; static const unsigned long signMask = 0x80000000ul; typedef union { struct { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) unsigned long int hi; unsigned long int lo; #else diff --git a/libm/powerpc/s_floor.c b/libm/powerpc/s_floor.c index 94677b4d2..0ddbb9b66 100644 --- a/libm/powerpc/s_floor.c +++ b/libm/powerpc/s_floor.c @@ -21,13 +21,15 @@ * * *******************************************************************************/ +#include <endian.h> + static const double twoTo52 = 4503599627370496.0; static const unsigned long signMask = 0x80000000ul; typedef union { struct { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) unsigned long int hi; unsigned long int lo; #else diff --git a/libm/powerpc/s_frexp.c b/libm/powerpc/s_frexp.c index 9909f2ce7..7c998f81a 100644 --- a/libm/powerpc/s_frexp.c +++ b/libm/powerpc/s_frexp.c @@ -21,13 +21,14 @@ #include <limits.h> #include <math.h> +#include <endian.h> static const double two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */ typedef union { struct { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) unsigned long int hi; unsigned long int lo; #else diff --git a/libm/powerpc/s_ldexp.c b/libm/powerpc/s_ldexp.c index ce9ec8b1b..7e52352ae 100644 --- a/libm/powerpc/s_ldexp.c +++ b/libm/powerpc/s_ldexp.c @@ -21,11 +21,12 @@ #include <limits.h> #include <math.h> +#include <endian.h> typedef union { struct { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) unsigned long int hi; unsigned long int lo; #else diff --git a/libm/powerpc/s_logb.c b/libm/powerpc/s_logb.c index 23c7270f9..3caecd95f 100644 --- a/libm/powerpc/s_logb.c +++ b/libm/powerpc/s_logb.c @@ -32,10 +32,12 @@ * Standard 754. * *******************************************************************************/ +#include <endian.h> + typedef union { struct { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) unsigned long int hi; unsigned long int lo; #else diff --git a/libm/powerpc/s_modf.c b/libm/powerpc/s_modf.c index f4344bda8..cb8338a90 100644 --- a/libm/powerpc/s_modf.c +++ b/libm/powerpc/s_modf.c @@ -45,13 +45,14 @@ #include <limits.h> #include <math.h> +#include <endian.h> #define SET_INVALID 0x01000000UL typedef union { struct { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) unsigned long int hi; unsigned long int lo; #else diff --git a/libm/powerpc/s_rint.c b/libm/powerpc/s_rint.c index 72c4834d0..c229515c4 100644 --- a/libm/powerpc/s_rint.c +++ b/libm/powerpc/s_rint.c @@ -46,13 +46,14 @@ #include <limits.h> #include <math.h> +#include <endian.h> #define SET_INVALID 0x01000000UL typedef union { struct { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) unsigned long int hi; unsigned long int lo; #else diff --git a/libm/powerpc/s_round.c b/libm/powerpc/s_round.c index 81f4d0fec..a0f72ebe3 100644 --- a/libm/powerpc/s_round.c +++ b/libm/powerpc/s_round.c @@ -1,10 +1,11 @@ #include <limits.h> #include <math.h> +#include <endian.h> typedef union { struct { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) unsigned long int hi; unsigned long int lo; #else diff --git a/libm/powerpc/s_trunc.c b/libm/powerpc/s_trunc.c index 4b61355ea..7db7606b6 100644 --- a/libm/powerpc/s_trunc.c +++ b/libm/powerpc/s_trunc.c @@ -1,10 +1,11 @@ #include <limits.h> #include <math.h> +#include <endian.h> typedef union { struct { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) unsigned long int hi; unsigned long int lo; #else diff --git a/libm/powerpc/w_scalb.c b/libm/powerpc/w_scalb.c index c93c74b68..fe23ece53 100644 --- a/libm/powerpc/w_scalb.c +++ b/libm/powerpc/w_scalb.c @@ -19,10 +19,12 @@ ** ***********************************************************************/ +#include <endian.h> + typedef union { struct { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) unsigned long int hi; unsigned long int lo; #else |