From e7b8ec290314a24d67f8256c75b34a6a627c5205 Mon Sep 17 00:00:00 2001 From: jakub Date: Sun, 16 Jan 2011 16:44:35 +0000 Subject: PR fortran/46416 * quadmath.h (cbrtq, finiteq, isnanq, signbitq, sqrtq): Remove const from prototype argument. (cimagq, conjq, cprojq, crealq, fdimq, fmaxq, fminq, ilogbq, llrintq, log2q, lrintq, nearbyintq, remquoq): New prototypes. (__quadmath_extern_inline): Define. (cimagq, conjq, crealq): New inlines. * Makefile.am (libquadmath_la_SOURCES): Add math/cimagq.c, math/conjq.c, math/cprojq.c, math/crealq.c, math/fdimq.c, math/fmaxq.c, math/fminq.c, math/ilogbq.c, math/llrintq.c, math/log2q.c, math/lrintq.c, math/nearbyintq.c and math/remquoq.c. * Makefile.in: Regenerated. * quadmath_weak.h (cimagq, conjq, cprojq, crealq, fdimq, fmaxq, fminq, ilogbq, llrintq, log2q, lrintq, nearbyintq, remquoq): Add. * quadmath-imp.h (__LITTLE_ENDIAN__): Don't define. (ieee854_float128): Use __BYTE_ORDER == __ORDER_BIG_ENDIAN__ tests instead of __BIG_ENDIAN__. * quadmath.map (QUADMATH_1.0): Add cimagq, conjq, cprojq, crealq, fdimq, fmaxq, fminq, ilogbq, llrintq, log2q, lrintq, nearbyintq and remquoq. * libquadmath.texi (cimagq, conjq, cprojq, crealq, fdimq, fmaxq, fminq, ilogbq, llrintq, log2q, lrintq, nearbyintq, remquoq): Add. * math/cprojq.c: New file. * math/ilogbq.c: New file. * math/fminq.c: New file. * math/llrintq.c: New file. * math/log2q.c: New file. * math/lrintq.c: New file. * math/crealq.c: New file. * math/nearbyintq.c: New file. * math/fmaxq.c: New file. * math/conjq.c: New file. * math/remquoq.c: New file. * math/cimagq.c: New file. * math/fdimq.c: New file. * math/ldexpq.c: Include errno.h. Set errno to ERANGE if needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168854 138bc75d-0d04-0410-961f-82ee72b054a4 --- libquadmath/quadmath-imp.h | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'libquadmath/quadmath-imp.h') diff --git a/libquadmath/quadmath-imp.h b/libquadmath/quadmath-imp.h index 5404c9eef99..58e3146e364 100644 --- a/libquadmath/quadmath-imp.h +++ b/libquadmath/quadmath-imp.h @@ -42,12 +42,6 @@ extern __float128 __quadmath_kernel_cosq (__float128, __float128); #endif -// If we don't have macros to know endianess, assume little endian -#if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) -# define __LITTLE_ENDIAN__ 1 -#endif - - // Main union type we use to manipulate the floating-point type typedef union { @@ -55,13 +49,12 @@ typedef union struct { -#if __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ unsigned negative:1; unsigned exponent:15; uint64_t mant_high:48; uint64_t mant_low:64; -#endif -#if __LITTLE_ENDIAN__ +#else uint64_t mant_low:64; uint64_t mant_high:48; unsigned exponent:15; @@ -71,11 +64,10 @@ typedef union struct { -#if __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ uint64_t high; uint64_t low; -#endif -#if __LITTLE_ENDIAN__ +#else uint64_t low; uint64_t high; #endif @@ -83,13 +75,12 @@ typedef union struct { -#if __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ uint32_t w0; uint32_t w1; uint32_t w2; uint32_t w3; -#endif -#if __LITTLE_ENDIAN__ +#else uint32_t w3; uint32_t w2; uint32_t w1; @@ -99,14 +90,13 @@ typedef union struct { -#if __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ unsigned negative:1; unsigned exponent:15; unsigned quiet_nan:1; uint64_t mant_high:47; uint64_t mant_low:64; -#endif -#if __LITTLE_ENDIAN__ +#else uint64_t mant_low:64; uint64_t mant_high:47; unsigned quiet_nan:1; -- cgit v1.2.1