Added macros that can possibly make it easier to optimize functions using forced inlining and regparm.

This commit is contained in:
Jan Vidar Krey 2009-07-09 17:01:30 +02:00
parent e68cbd0cde
commit 3db2ec5e22

View File

@ -25,6 +25,23 @@
/* #define MEMORY_DEBUG */
/* #define DEBUG_SENDQ 1 */
#if USE_REGPARM && __GNUC__ >= 3
#define REGPRM1 __attribute__((regparm(1)))
#define REGPRM2 __attribute__((regparm(2)))
#define REGPRM3 __attribute__((regparm(3)))
#else
#define REGPRM1
#define REGPRM2
#define REGPRM3
#endif
#ifndef FORCEINLINE
#if __GNUC__ < 3
#define FORCEINLINE inline
#else
#define FORCEINLINE inline __attribute__((always_inline))
#endif
#endif
#ifndef _GNU_SOURCE