compiler.h

Go to the documentation of this file.
00001 #ifndef _BITS_COMPILER_H
00002 #define _BITS_COMPILER_H
00003 
00004 FILE_LICENCE ( GPL2_OR_LATER );
00005 
00006 #ifndef ASSEMBLY
00007 
00008 /** Declare a function with standard calling conventions */
00009 #define __asmcall __attribute__ (( cdecl, regparm(0) ))
00010 
00011 /**
00012  * Declare a function with libgcc implicit linkage
00013  *
00014  * It seems as though gcc expects its implicit arithmetic functions to
00015  * be cdecl, even if -mrtd is specified.  This is somewhat
00016  * inconsistent; for example, if -mregparm=3 is used then the implicit
00017  * functions do become regparm(3).
00018  *
00019  * The implicit calls to memcpy() and memset() which gcc can generate
00020  * do not seem to have this inconsistency; -mregparm and -mrtd affect
00021  * them in the same way as any other function.
00022  */
00023 #define __libgcc __attribute__ (( cdecl ))
00024 
00025 #endif /* ASSEMBLY */
00026 
00027 #endif /* _BITS_COMPILER_H */

Generated on Tue Apr 6 20:01:06 2010 for gPXE by  doxygen 1.5.7.1