Home | History | Annotate | Download | only in builtins
      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 
     22 typedef unsigned su_int;
     23 typedef int si_int;
     24 
     25 typedef unsigned long long du_int;
     26 typedef long long di_int;
     27 
     28 typedef union
     29 {
     30     di_int all;
     31     struct
     32     {
     33         su_int low;
     34         si_int high;
     35     } s;
     36 } dwords;
     37 
     38 typedef union
     39 {
     40     du_int all;
     41     struct
     42     {
     43         su_int low;
     44         su_int high;
     45     } s;
     46 } udwords;
     47 
     48 typedef 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 
     57 di_int __divdi3(di_int a, di_int b);
     58 di_int __moddi3(di_int a, di_int b);
     59 du_int __umoddi3(du_int a, du_int b);
     60 di_int __divmoddi4(di_int a, di_int b, di_int* rem);
     61 du_int __udivmoddi4(du_int a, du_int b, du_int* rem);
     62 
     63 #endif /* INT_LIB_H */
     64