Home | History | Annotate | Line # | Download | only in softfloat
      1  1.5   matt /* $NetBSD: mips-gcc.h,v 1.5 2011/06/27 06:40:26 matt Exp $ */
      2  1.2   matt 
      3  1.2   matt /*
      4  1.2   matt -------------------------------------------------------------------------------
      5  1.2   matt One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
      6  1.2   matt -------------------------------------------------------------------------------
      7  1.2   matt */
      8  1.2   matt #ifdef __MIPSEB__
      9  1.2   matt #define BIGENDIAN
     10  1.2   matt #else
     11  1.2   matt #define LITTLEENDIAN
     12  1.2   matt #endif
     13  1.2   matt 
     14  1.2   matt /*
     15  1.2   matt -------------------------------------------------------------------------------
     16  1.2   matt The macro `BITS64' can be defined to indicate that 64-bit integer types are
     17  1.2   matt supported by the compiler.
     18  1.2   matt -------------------------------------------------------------------------------
     19  1.2   matt */
     20  1.2   matt #define BITS64
     21  1.2   matt 
     22  1.2   matt /*
     23  1.2   matt -------------------------------------------------------------------------------
     24  1.2   matt Each of the following `typedef's defines the most convenient type that holds
     25  1.2   matt integers of at least as many bits as specified.  For example, `uint8' should
     26  1.2   matt be the most convenient type that can hold unsigned integers of as many as
     27  1.2   matt 8 bits.  The `flag' type must be able to hold either a 0 or 1.  For most
     28  1.2   matt implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
     29  1.2   matt to the same as `int'.
     30  1.2   matt -------------------------------------------------------------------------------
     31  1.2   matt */
     32  1.2   matt typedef int flag;
     33  1.2   matt typedef int uint8;
     34  1.2   matt typedef int int8;
     35  1.2   matt typedef int uint16;
     36  1.2   matt typedef int int16;
     37  1.2   matt typedef unsigned int uint32;
     38  1.2   matt typedef signed int int32;
     39  1.2   matt #ifdef BITS64
     40  1.2   matt typedef unsigned long long int uint64;
     41  1.2   matt typedef signed long long int int64;
     42  1.2   matt #endif
     43  1.2   matt 
     44  1.2   matt /*
     45  1.2   matt -------------------------------------------------------------------------------
     46  1.2   matt Each of the following `typedef's defines a type that holds integers
     47  1.2   matt of _exactly_ the number of bits specified.  For instance, for most
     48  1.2   matt implementation of C, `bits16' and `sbits16' should be `typedef'ed to
     49  1.2   matt `unsigned short int' and `signed short int' (or `short int'), respectively.
     50  1.2   matt -------------------------------------------------------------------------------
     51  1.2   matt */
     52  1.2   matt typedef unsigned char bits8;
     53  1.2   matt typedef signed char sbits8;
     54  1.2   matt typedef unsigned short int bits16;
     55  1.2   matt typedef signed short int sbits16;
     56  1.2   matt typedef unsigned int bits32;
     57  1.2   matt typedef signed int sbits32;
     58  1.2   matt #ifdef BITS64
     59  1.2   matt typedef unsigned long long int bits64;
     60  1.2   matt typedef signed long long int sbits64;
     61  1.2   matt #endif
     62  1.2   matt 
     63  1.2   matt #ifdef BITS64
     64  1.2   matt /*
     65  1.2   matt -------------------------------------------------------------------------------
     66  1.2   matt The `LIT64' macro takes as its argument a textual integer literal and
     67  1.2   matt if necessary ``marks'' the literal as having a 64-bit integer type.
     68  1.2   matt For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
     69  1.2   matt appended with the letters `LL' standing for `long long', which is `gcc's
     70  1.2   matt name for the 64-bit integer type.  Some compilers may allow `LIT64' to be
     71  1.2   matt defined as the identity macro:  `#define LIT64( a ) a'.
     72  1.2   matt -------------------------------------------------------------------------------
     73  1.2   matt */
     74  1.2   matt #define LIT64( a ) a##LL
     75  1.2   matt #endif
     76  1.2   matt 
     77  1.2   matt /*
     78  1.2   matt -------------------------------------------------------------------------------
     79  1.2   matt The macro `INLINE' can be used before functions that should be inlined.  If
     80  1.2   matt a compiler does not support explicit inlining, this macro should be defined
     81  1.2   matt to be `static'.
     82  1.2   matt -------------------------------------------------------------------------------
     83  1.2   matt */
     84  1.2   matt #define INLINE static inline
     85  1.2   matt 
     86  1.2   matt /*
     87  1.2   matt -------------------------------------------------------------------------------
     88  1.3  pooka The MIPS FPA is odd in that it stores doubles high-order word first, no matter
     89  1.2   matt what the endianness of the CPU.  VFP is sane.
     90  1.2   matt -------------------------------------------------------------------------------
     91  1.2   matt */
     92  1.2   matt #if defined(SOFTFLOAT_FOR_GCC)
     93  1.4  pooka #define FLOAT64_DEMANGLE(a)	(a)
     94  1.4  pooka #define FLOAT64_MANGLE(a)	(a)
     95  1.2   matt #endif
     96