fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / machine / powerpc / fix64.h
blobce948209167c48e95367a98d9e3fe0c079f49356
1 #ifndef _FIX64_H_
3 #define _FIX64_H_
5 #include <ieeefp.h>
6 #include <math.h>
7 #include <float.h>
8 #include <errno.h>
9 #include <sys/config.h>
11 #ifdef __IEEE_LITTLE_ENDIAN
12 #define IEEE_8087
13 #endif
15 #ifdef __IEEE_BIG_ENDIAN
16 #define IEEE_MC68k
17 #endif
19 #ifdef __Z8000__
20 #define Just_16
21 #endif
23 #if defined(IEEE_8087) + defined(IEEE_MC68k) + defined(VAX) + defined(IBM) != 1
24 Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined.
25 #endif
27 union long_double_union
29 long double ld;
30 __uint32_t i[4];
33 typedef union long_double_union LONG_DOUBLE_UNION;
35 extern void _simdstrtold (char *, char **, LONG_DOUBLE_UNION *);
36 extern int _simdldcheck (LONG_DOUBLE_UNION *);
38 #define SIMD_LDBL_MANT_DIG 113
40 #ifdef IEEE_8087
41 # define word0(x) (x.i[3])
42 # define word1(x) (x.i[2])
43 # define word2(x) (x.i[1])
44 # define word3(x) (x.i[0])
45 #else /* !IEEE_8087 */
46 # define word0(x) (x.i[0])
47 # define word1(x) (x.i[1])
48 # define word2(x) (x.i[2])
49 # define word3(x) (x.i[3])
50 #endif /* !IEEE_8087 */
52 #undef Exp_shift
53 #define Exp_shift 16
54 #undef Exp_mask
55 #define Exp_mask ((__uint32_t)0x7fff0000L)
56 #undef Exp_msk1
57 #define Exp_msk1 ((__uint32_t)0x00010000L)
58 #undef Bias
59 #define Bias 16383
60 #undef Ebits
61 #define Ebits 15
62 #undef Sign_bit
63 #define Sign_bit ((__uint32_t)0x80000000L)
64 #define init(x) {}
66 union fix64_union
68 __uint64_t ll;
69 __uint32_t j[2];
72 #ifdef __LITTLE_ENDIAN__
73 # define hiword(y) (y.j[1])
74 # define loword(y) (y.j[0])
75 #else /* __BIG_ENDIAN__ */
76 # define hiword(y) (y.j[0])
77 # define loword(y) (y.j[1])
78 #endif /* __BIG_ENDIAN__ */
80 #endif /* _FIX64_H_ */