X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Finternal%2Flibm.h;h=52ac61eca682e96d89a8cdeab9d66d1447752f2a;hb=34660d73bd0db29469d2758e1b48d2360edf3a2f;hp=46c4b56451aa32fd70929628fc4687552f71ae6a;hpb=6d3f1a39c14b12026df84f386875b094e3652990;p=musl diff --git a/src/internal/libm.h b/src/internal/libm.h index 46c4b564..52ac61ec 100644 --- a/src/internal/libm.h +++ b/src/internal/libm.h @@ -17,6 +17,7 @@ #include #include #include +#include #include "longdbl.h" @@ -32,6 +33,33 @@ union dshape { uint64_t bits; }; +#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 +#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER == __LITTLE_ENDIAN +union ldshape { + long double f; + struct { + uint64_t m; + uint16_t se; + } i; +}; +#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER == __LITTLE_ENDIAN +union ldshape { + long double f; + struct { + uint64_t lo; + uint32_t mid; + uint16_t top; + uint16_t se; + } i; + struct { + uint64_t lo; + uint64_t hi; + } i2; +}; +#else +#error Unsupported long double representation +#endif + #define FORCE_EVAL(x) do { \ if (sizeof(x) == sizeof(float)) { \ volatile float __x; \ @@ -168,12 +196,4 @@ long double __p1evll(long double, const long double *, int); #define STRICT_ASSIGN(type, lval, rval) ((lval) = (type)(rval)) #endif -/* complex */ - -#ifndef CMPLX -#define CMPLX(x, y) __CMPLX(x, y, double) -#define CMPLXF(x, y) __CMPLX(x, y, float) -#define CMPLXL(x, y) __CMPLX(x, y, long double) -#endif - #endif