9 // Prototypes for internal functions
10 extern int32_t rem_pio2q (__float128
, __float128
*);
11 extern void __kernel_sincosq (__float128
, __float128
, __float128
*, __float128
*, int);
12 extern __float128
__kernel_sinq (__float128
, __float128
, int);
13 extern __float128
__kernel_cosq (__float128
, __float128
);
17 // Frankly, if you have __float128, you have 64-bit integers, right?
23 // If we don't have macros to know endianess, assume little endian
24 #if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
25 # define __LITTLE_ENDIAN__ 1
29 // Main union type we use to manipulate the floating-point type
39 uint64_t mant_high
:48;
44 uint64_t mant_high
:48;
84 uint64_t mant_high
:47;
89 uint64_t mant_high
:47;
99 /* Get two 64 bit ints from a long double. */
100 #define GET_FLT128_WORDS64(ix0,ix1,d) \
102 ieee854_float128 u; \
104 (ix0) = u.words64.high; \
105 (ix1) = u.words64.low; \
108 /* Set a long double from two 64 bit ints. */
109 #define SET_FLT128_WORDS64(d,ix0,ix1) \
111 ieee854_float128 u; \
112 u.words64.high = (ix0); \
113 u.words64.low = (ix1); \
117 /* Get the more significant 64 bits of a long double mantissa. */
118 #define GET_FLT128_MSW64(v,d) \
120 ieee854_float128 u; \
122 (v) = u.words64.high; \
125 /* Set the more significant 64 bits of a long double mantissa from an int. */
126 #define SET_FLT128_MSW64(d,v) \
128 ieee854_float128 u; \
130 u.words64.high = (v); \
134 /* Get the least significant 64 bits of a long double mantissa. */
135 #define GET_FLT128_LSW64(v,d) \
137 ieee854_float128 u; \
139 (v) = u.words64.low; \
143 #define IEEE854_FLOAT128_BIAS 0x3fff