1 /* ===-- int_lib.h - configuration header for compiler-rt -----------------===
3 * The LLVM Compiler Infrastructure
5 * This file is distributed under the University of Illinois Open Source
6 * License. See LICENSE.TXT for details.
8 * ===----------------------------------------------------------------------===
10 * This file is a configuration header for compiler-rt.
11 * This file is not part of the interface of this library.
13 * ===----------------------------------------------------------------------===
19 /* Assumption: signed integral is 2's complement */
20 /* Assumption: right shift of signed negative is arithmetic shift */
23 #include "endianness.h"
26 /* If compiling for kernel use, call panic() instead of abort(). */
28 extern void panic (const char *, ...);
29 #define compilerrt_abort() \
30 panic("%s:%d: abort in %s", __FILE__, __LINE__, __FUNCTION__)
32 #define compilerrt_abort() abort()
35 #if !defined(INFINITY) && defined(HUGE_VAL)
36 #define INFINITY HUGE_VAL
40 typedef unsigned su_int;
42 typedef long long di_int;
43 typedef unsigned long long du_int;
50 #if _YUGA_LITTLE_ENDIAN
56 #endif /* _YUGA_LITTLE_ENDIAN */
65 #if _YUGA_LITTLE_ENDIAN
71 #endif /* _YUGA_LITTLE_ENDIAN */
77 typedef int ti_int __attribute__ ((mode (TI)));
78 typedef unsigned tu_int __attribute__ ((mode (TI)));
85 #if _YUGA_LITTLE_ENDIAN
91 #endif /* _YUGA_LITTLE_ENDIAN */
100 #if _YUGA_LITTLE_ENDIAN
106 #endif /* _YUGA_LITTLE_ENDIAN */
110 static inline ti_int make_ti(di_int h, di_int l) {
117 static inline tu_int make_tu(du_int h, du_int l) {
124 #endif /* __x86_64 */
140 #if _YUGA_LITTLE_ENDIAN
146 #endif /* _YUGA_LITTLE_ENDIAN */
155 #endif /* INT_LIB_H */