1 #ifndef UAE_INLINE_H 2 #define UAE_INLINE_H 3 4 #ifdef HAVE_CONFIG_H 5 #include "config.h" 6 #endif 7 8 // FIXME: could be named funcattr.h or something, perhaps 9 // FIXME: move regparams here? 10 11 #if defined(HAVE_FUNC_ATTRIBUTE_ALWAYS_INLINE) 12 #define UAE_STATIC_INLINE static __inline__ __attribute__ ((always_inline)) 13 #elif defined(_MSC_VER) 14 #define UAE_STATIC_INLINE static __forceinline 15 #else 16 #define UAE_STATIC_INLINE static inline 17 #endif 18 19 #if defined(HAVE_FUNC_ATTRIBUTE_NOINLINE) 20 #define UAE_NOINLINE __attribute__ ((noinline)) 21 #elif defined(_MSC_VER) 22 #define UAE_NOINLINE __declspec(noinline) 23 #else 24 #define UAE_NOINLINE 25 #endif 26 27 #if defined(HAVE_FUNC_ATTRIBUTE_NORETURN) 28 #define UAE_NORETURN __attribute__ ((noreturn)) 29 #elif defined(_MSC_VER) 30 #define UAE_NORETURN __declspec(noreturn) 31 #else 32 #define UAE_NORETURN 33 #endif 34 35 #ifndef STATIC_INLINE 36 #define STATIC_INLINE UAE_STATIC_INLINE 37 #endif 38 39 #ifndef NOINLINE 40 #define NOINLINE UAE_NOINLINE 41 #endif 42 43 #ifndef NORETURN 44 #define NORETURN UAE_NORETURN 45 #endif 46 47 #endif /* UAE_INLINE_H */ 48