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 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 */
24 #include "endianness.h"
27 /* If compiling for kernel use, call panic() instead of abort(). */
29 extern void panic (const char *, ...);
30 #define compilerrt_abort() \
31 panic("%s:%d: abort in %s", __FILE__, __LINE__, __FUNCTION__)
33 #define compilerrt_abort() abort()
36 #if !defined(INFINITY) && defined(HUGE_VAL)
37 #define INFINITY HUGE_VAL
41 typedef unsigned su_int;
43 typedef long long di_int;
44 typedef unsigned long long du_int;
51 #if _YUGA_LITTLE_ENDIAN
57 #endif /* _YUGA_LITTLE_ENDIAN */
66 #if _YUGA_LITTLE_ENDIAN
72 #endif /* _YUGA_LITTLE_ENDIAN */
78 typedef int ti_int __attribute__ ((mode (TI)));
79 typedef unsigned tu_int __attribute__ ((mode (TI)));
86 #if _YUGA_LITTLE_ENDIAN
92 #endif /* _YUGA_LITTLE_ENDIAN */
101 #if _YUGA_LITTLE_ENDIAN
107 #endif /* _YUGA_LITTLE_ENDIAN */
111 static inline ti_int make_ti(di_int h, di_int l) {
118 static inline tu_int make_tu(du_int h, du_int l) {
125 #endif /* __x86_64 */
141 #if _YUGA_LITTLE_ENDIAN
147 #endif /* _YUGA_LITTLE_ENDIAN */
156 #endif /* INT_LIB_H */