xref: /netbsd/lib/libc/arch/m68k/softfloat/m68k-gcc.h (revision 4e11af46)
1*4e11af46Sperry /*	$NetBSD: m68k-gcc.h,v 1.2 2005/12/24 21:11:16 perry Exp $	*/
28a1eb34dSjmmv 
38a1eb34dSjmmv /*
48a1eb34dSjmmv -------------------------------------------------------------------------------
58a1eb34dSjmmv One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
68a1eb34dSjmmv -------------------------------------------------------------------------------
78a1eb34dSjmmv */
88a1eb34dSjmmv #include <machine/endian.h>
98a1eb34dSjmmv #if _BYTE_ORDER == _BIG_ENDIAN
108a1eb34dSjmmv #define BIGENDIAN
118a1eb34dSjmmv #endif
128a1eb34dSjmmv #if _BYTE_ORDER == _LITTLE_ENDIAN
138a1eb34dSjmmv #define LITTLEENDIAN
148a1eb34dSjmmv #endif
158a1eb34dSjmmv 
168a1eb34dSjmmv /*
178a1eb34dSjmmv -------------------------------------------------------------------------------
188a1eb34dSjmmv The macro `BITS64' can be defined to indicate that 64-bit integer types are
198a1eb34dSjmmv supported by the compiler.
208a1eb34dSjmmv -------------------------------------------------------------------------------
218a1eb34dSjmmv */
228a1eb34dSjmmv #define BITS64
238a1eb34dSjmmv 
248a1eb34dSjmmv /*
258a1eb34dSjmmv -------------------------------------------------------------------------------
268a1eb34dSjmmv Each of the following `typedef's defines the most convenient type that holds
278a1eb34dSjmmv integers of at least as many bits as specified.  For example, `uint8' should
288a1eb34dSjmmv be the most convenient type that can hold unsigned integers of as many as
298a1eb34dSjmmv 8 bits.  The `flag' type must be able to hold either a 0 or 1.  For most
308a1eb34dSjmmv implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
318a1eb34dSjmmv to the same as `int'.
328a1eb34dSjmmv -------------------------------------------------------------------------------
338a1eb34dSjmmv */
348a1eb34dSjmmv typedef int flag;
358a1eb34dSjmmv typedef int uint8;
368a1eb34dSjmmv typedef int int8;
378a1eb34dSjmmv typedef int uint16;
388a1eb34dSjmmv typedef int int16;
398a1eb34dSjmmv typedef unsigned int uint32;
408a1eb34dSjmmv typedef signed int int32;
418a1eb34dSjmmv #ifdef BITS64
428a1eb34dSjmmv typedef unsigned long long int uint64;
438a1eb34dSjmmv typedef signed long long int int64;
448a1eb34dSjmmv #endif
458a1eb34dSjmmv 
468a1eb34dSjmmv /*
478a1eb34dSjmmv -------------------------------------------------------------------------------
488a1eb34dSjmmv Each of the following `typedef's defines a type that holds integers
498a1eb34dSjmmv of _exactly_ the number of bits specified.  For instance, for most
508a1eb34dSjmmv implementation of C, `bits16' and `sbits16' should be `typedef'ed to
518a1eb34dSjmmv `unsigned short int' and `signed short int' (or `short int'), respectively.
528a1eb34dSjmmv -------------------------------------------------------------------------------
538a1eb34dSjmmv */
548a1eb34dSjmmv typedef unsigned char bits8;
558a1eb34dSjmmv typedef signed char sbits8;
568a1eb34dSjmmv typedef unsigned short int bits16;
578a1eb34dSjmmv typedef signed short int sbits16;
588a1eb34dSjmmv typedef unsigned int bits32;
598a1eb34dSjmmv typedef signed int sbits32;
608a1eb34dSjmmv #ifdef BITS64
618a1eb34dSjmmv typedef unsigned long long int bits64;
628a1eb34dSjmmv typedef signed long long int sbits64;
638a1eb34dSjmmv #endif
648a1eb34dSjmmv 
658a1eb34dSjmmv #ifdef BITS64
668a1eb34dSjmmv /*
678a1eb34dSjmmv -------------------------------------------------------------------------------
688a1eb34dSjmmv The `LIT64' macro takes as its argument a textual integer literal and
698a1eb34dSjmmv if necessary ``marks'' the literal as having a 64-bit integer type.
708a1eb34dSjmmv For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
718a1eb34dSjmmv appended with the letters `LL' standing for `long long', which is `gcc's
728a1eb34dSjmmv name for the 64-bit integer type.  Some compilers may allow `LIT64' to be
738a1eb34dSjmmv defined as the identity macro:  `#define LIT64( a ) a'.
748a1eb34dSjmmv -------------------------------------------------------------------------------
758a1eb34dSjmmv */
768a1eb34dSjmmv #define LIT64( a ) a##LL
778a1eb34dSjmmv #endif
788a1eb34dSjmmv 
798a1eb34dSjmmv /*
808a1eb34dSjmmv -------------------------------------------------------------------------------
818a1eb34dSjmmv The macro `INLINE' can be used before functions that should be inlined.  If
828a1eb34dSjmmv a compiler does not support explicit inlining, this macro should be defined
838a1eb34dSjmmv to be `static'.
848a1eb34dSjmmv -------------------------------------------------------------------------------
858a1eb34dSjmmv */
86*4e11af46Sperry #define INLINE static inline
878a1eb34dSjmmv 
888a1eb34dSjmmv #define FLOAT64_DEMANGLE(a)	(a)
898a1eb34dSjmmv #define FLOAT64_MANGLE(a)	(a)
90