aarch64-gcc.h revision 1.1
11.1Smatt/* $NetBSD: aarch64-gcc.h,v 1.1 2014/08/10 05:47:37 matt Exp $ */ 21.1Smatt 31.1Smatt/* 41.1Smatt------------------------------------------------------------------------------- 51.1SmattOne of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. 61.1Smatt------------------------------------------------------------------------------- 71.1Smatt*/ 81.1Smatt#include <machine/endian.h> 91.1Smatt#if _BYTE_ORDER == _BIG_ENDIAN 101.1Smatt#define BIGENDIAN 111.1Smatt#endif 121.1Smatt#if _BYTE_ORDER == _LITTLE_ENDIAN 131.1Smatt#define LITTLEENDIAN 141.1Smatt#endif 151.1Smatt 161.1Smatt/* 171.1Smatt------------------------------------------------------------------------------- 181.1SmattThe macro `BITS64' can be defined to indicate that 64-bit integer types are 191.1Smattsupported by the compiler. 201.1Smatt------------------------------------------------------------------------------- 211.1Smatt*/ 221.1Smatt#define BITS64 231.1Smatt 241.1Smatt/* 251.1Smatt------------------------------------------------------------------------------- 261.1SmattEach of the following `typedef's defines the most convenient type that holds 271.1Smattintegers of at least as many bits as specified. For example, `uint8' should 281.1Smattbe the most convenient type that can hold unsigned integers of as many as 291.1Smatt8 bits. The `flag' type must be able to hold either a 0 or 1. For most 301.1Smattimplementations of C, `flag', `uint8', and `int8' should all be `typedef'ed 311.1Smattto the same as `int'. 321.1Smatt------------------------------------------------------------------------------- 331.1Smatt*/ 341.1Smatttypedef int flag; 351.1Smatttypedef int uint8; 361.1Smatttypedef int int8; 371.1Smatttypedef int uint16; 381.1Smatttypedef int int16; 391.1Smatttypedef unsigned int uint32; 401.1Smatttypedef signed int int32; 411.1Smatt#ifdef BITS64 421.1Smatttypedef unsigned long long int uint64; 431.1Smatttypedef signed long long int int64; 441.1Smatt#endif 451.1Smatt 461.1Smatt/* 471.1Smatt------------------------------------------------------------------------------- 481.1SmattEach of the following `typedef's defines a type that holds integers 491.1Smattof _exactly_ the number of bits specified. For instance, for most 501.1Smattimplementation of C, `bits16' and `sbits16' should be `typedef'ed to 511.1Smatt`unsigned short int' and `signed short int' (or `short int'), respectively. 521.1Smatt------------------------------------------------------------------------------- 531.1Smatt*/ 541.1Smatttypedef unsigned char bits8; 551.1Smatttypedef signed char sbits8; 561.1Smatttypedef unsigned short int bits16; 571.1Smatttypedef signed short int sbits16; 581.1Smatttypedef unsigned int bits32; 591.1Smatttypedef signed int sbits32; 601.1Smatt#ifdef BITS64 611.1Smatttypedef unsigned long long int bits64; 621.1Smatttypedef signed long long int sbits64; 631.1Smatt#endif 641.1Smatt 651.1Smatt#ifdef BITS64 661.1Smatt/* 671.1Smatt------------------------------------------------------------------------------- 681.1SmattThe `LIT64' macro takes as its argument a textual integer literal and 691.1Smattif necessary ``marks'' the literal as having a 64-bit integer type. 701.1SmattFor example, the GNU C Compiler (`gcc') requires that 64-bit literals be 711.1Smattappended with the letters `LL' standing for `long long', which is `gcc's 721.1Smattname for the 64-bit integer type. Some compilers may allow `LIT64' to be 731.1Smattdefined as the identity macro: `#define LIT64( a ) a'. 741.1Smatt------------------------------------------------------------------------------- 751.1Smatt*/ 761.1Smatt#define LIT64( a ) a##LL 771.1Smatt#endif 781.1Smatt 791.1Smatt/* 801.1Smatt------------------------------------------------------------------------------- 811.1SmattThe macro `INLINE' can be used before functions that should be inlined. If 821.1Smatta compiler does not support explicit inlining, this macro should be defined 831.1Smattto be `static'. 841.1Smatt------------------------------------------------------------------------------- 851.1Smatt*/ 861.1Smatt#define INLINE static inline 871.1Smatt 881.1Smatt#define FLOAT64_DEMANGLE(a) (a) 891.1Smatt#define FLOAT64_MANGLE(a) (a) 90