X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Finternal%2Flibm.h;h=a2505f7ece62ba2cc494201f234c457c7b37ed4b;hb=91e1e29d6dd92c5e707f05dcc9b2a376b0d8dfa1;hp=ebcd78498d0e1ba2a0ad2937435457ef74793019;hpb=9b0fcb441a44456c7b071c7cdaf90403f81ec05a;p=musl diff --git a/src/internal/libm.h b/src/internal/libm.h index ebcd7849..a2505f7e 100644 --- a/src/internal/libm.h +++ b/src/internal/libm.h @@ -28,6 +28,17 @@ union ldshape { uint16_t se; } i; }; +#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER == __BIG_ENDIAN +/* This is the m68k variant of 80-bit long double, and this definition only works + * on archs where the alignment requirement of uint64_t is <= 4. */ +union ldshape { + long double f; + struct { + uint16_t se; + uint16_t pad; + uint64_t m; + } i; +}; #elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER == __LITTLE_ENDIAN union ldshape { long double f; @@ -42,6 +53,20 @@ union ldshape { uint64_t hi; } i2; }; +#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER == __BIG_ENDIAN +union ldshape { + long double f; + struct { + uint16_t se; + uint16_t top; + uint32_t mid; + uint64_t lo; + } i; + struct { + uint64_t hi; + uint64_t lo; + } i2; +}; #else #error Unsupported long double representation #endif @@ -128,6 +153,18 @@ do { \ (d) = __u.f; \ } while (0) +#undef __CMPLX +#undef CMPLX +#undef CMPLXF +#undef CMPLXL + +#define __CMPLX(x, y, t) \ + ((union { _Complex t __z; t __xy[2]; }){.__xy = {(x),(y)}}.__z) + +#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) + /* fdlibm kernel functions */ int __rem_pio2_large(double*,double*,int,int,int);