]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/lib/builtins/int_types.h
1 /* ===-- int_lib.h - configuration header for compiler-rt -----------------===
3 * The LLVM Compiler Infrastructure
5 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
8 * ===----------------------------------------------------------------------===
10 * This file is not part of the interface of this library.
12 * This file defines various standard types, most importantly a number of unions
13 * used to access parts of larger types.
15 * ===----------------------------------------------------------------------===
21 #include "int_endianness.h"
24 typedef unsigned su_int
;
26 typedef long long di_int
;
27 typedef unsigned long long du_int
;
34 #if _YUGA_LITTLE_ENDIAN
40 #endif /* _YUGA_LITTLE_ENDIAN */
49 #if _YUGA_LITTLE_ENDIAN
55 #endif /* _YUGA_LITTLE_ENDIAN */
59 /* MIPS64 issue: PR 20098 */
60 #if defined(__LP64__) && !(defined(__mips__) && defined(__clang__))
61 #define CRT_HAS_128BIT
65 typedef int ti_int
__attribute__ ((mode (TI
)));
66 typedef unsigned tu_int
__attribute__ ((mode (TI
)));
73 #if _YUGA_LITTLE_ENDIAN
79 #endif /* _YUGA_LITTLE_ENDIAN */
88 #if _YUGA_LITTLE_ENDIAN
94 #endif /* _YUGA_LITTLE_ENDIAN */
98 static __inline ti_int
make_ti(di_int h
, di_int l
) {
105 static __inline tu_int
make_tu(du_int h
, du_int l
) {
112 #endif /* CRT_HAS_128BIT */
128 #if _YUGA_LITTLE_ENDIAN
134 #endif /* _YUGA_LITTLE_ENDIAN */
143 #if __STDC_VERSION__ >= 199901L
144 typedef float _Complex Fcomplex
;
145 typedef double _Complex Dcomplex
;
146 typedef long double _Complex Lcomplex
;
148 #define COMPLEX_REAL(x) __real__(x)
149 #define COMPLEX_IMAGINARY(x) __imag__(x)
151 typedef struct { float real
, imaginary
; } Fcomplex
;
153 typedef struct { double real
, imaginary
; } Dcomplex
;
155 typedef struct { long double real
, imaginary
; } Lcomplex
;
157 #define COMPLEX_REAL(x) (x).real
158 #define COMPLEX_IMAGINARY(x) (x).imaginary
160 #endif /* INT_TYPES_H */