Remove building with NOCRYPTO option
[minix.git] / sys / external / bsd / compiler_rt / dist / lib / builtins / ppc / DD.h
blobfc3e41cbe07e7c42295d1e0067713d22e8ef0192
1 #ifndef __DD_HEADER
2 #define __DD_HEADER
4 #include "../int_lib.h"
6 typedef union {
7 long double ld;
8 struct {
9 double hi;
10 double lo;
11 }s;
12 }DD;
14 typedef union {
15 double d;
16 uint64_t x;
17 } doublebits;
19 #define LOWORDER(xy,xHi,xLo,yHi,yLo) \
20 (((((xHi)*(yHi) - (xy)) + (xHi)*(yLo)) + (xLo)*(yHi)) + (xLo)*(yLo))
22 static inline double __attribute__((always_inline))
23 local_fabs(double x)
25 doublebits result = { .d = x };
26 result.x &= UINT64_C(0x7fffffffffffffff);
27 return result.d;
30 static inline double __attribute__((always_inline))
31 high26bits(double x)
33 doublebits result = { .d = x };
34 result.x &= UINT64_C(0xfffffffff8000000);
35 return result.d;
38 static inline int __attribute__((always_inline))
39 different_sign(double x, double y)
41 doublebits xsignbit = { .d = x }, ysignbit = { .d = y };
42 int result = (int)(xsignbit.x >> 63) ^ (int)(ysignbit.x >> 63);
43 return result;
46 #endif /* __DD_HEADER */