1/* ===-- int_lib.h - configuration header for compiler-rt -----------------=== 2 * 3 * The LLVM Compiler Infrastructure 4 * 5 * This file is dual licensed under the MIT and the University of Illinois Open 6 * Source Licenses. See LICENSE.TXT for details. 7 * 8 * ===----------------------------------------------------------------------=== 9 * 10 * This file is a configuration header for compiler-rt. 11 * This file is not part of the interface of this library. 12 * 13 * ===----------------------------------------------------------------------=== 14 */ 15 16#ifndef INT_LIB_H 17#define INT_LIB_H 18 19#define FLT_MANT_DIG __FLT_MANT_DIG__ 20#define CHAR_BIT 8 21 22typedef unsigned su_int; 23typedef int si_int; 24 25typedef unsigned long long du_int; 26typedef long long di_int; 27 28typedef union 29{ 30 di_int all; 31 struct 32 { 33 su_int low; 34 si_int high; 35 } s; 36} dwords; 37 38typedef union 39{ 40 du_int all; 41 struct 42 { 43 su_int low; 44 su_int high; 45 } s; 46} udwords; 47 48typedef union 49{ 50 su_int u; 51 float f; 52} float_bits; 53 54/* Assumption: Signed integral is 2's complement. */ 55/* Assumption: Right shift of signed negative is arithmetic shift. */ 56 57di_int __divdi3(di_int a, di_int b); 58di_int __moddi3(di_int a, di_int b); 59du_int __umoddi3(du_int a, du_int b); 60di_int __divmoddi4(di_int a, di_int b, di_int* rem); 61du_int __udivmoddi4(du_int a, du_int b, du_int* rem); 62 63#endif /* INT_LIB_H */ 64