- Move and update assembler functions definition macros from port.h (added by Steven around revision 7000) to config.h as it is now in Wine.
- Update related __ASM macros.

svn path=/trunk/; revision=46327
This commit is contained in:
Aleksey Bragin 2010-03-21 22:27:26 +00:00
parent 9657b28db9
commit 11604ef89b
2 changed files with 12 additions and 24 deletions

View file

@ -979,17 +979,28 @@
#define YYTEXT_POINTER 1 #define YYTEXT_POINTER 1
/* Define to a macro to output a .cfi assembly pseudo-op */ /* Define to a macro to output a .cfi assembly pseudo-op */
#define __ASM_CFI(x) #define __ASM_CFI(str) str
/* Define to a macro to define an assembly function */
#define __ASM_DEFINE_FUNC(name,suffix,code) asm(".text\n\t.align 4\n\t.globl _" #name suffix "\n\t.def _" #name suffix "; .scl 2; .type 32; .endef\n_" #name suffix ":\n\t.cfi_startproc\n\t" code "\n\t.cfi_endproc");
/* Define to a macro to generate an assembly function directive */ /* Define to a macro to generate an assembly function directive */
#define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef" #define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"
/* Define to a macro to generate an assembly function with C calling
convention */
#define __ASM_GLOBAL_FUNC(name,code) __ASM_DEFINE_FUNC(name,"",code)
/* Define to a macro to generate an assembly name from a C symbol */ /* Define to a macro to generate an assembly name from a C symbol */
#define __ASM_NAME(name) "_" name #define __ASM_NAME(name) "_" name
/* Define to a macro to generate an stdcall suffix */ /* Define to a macro to generate an stdcall suffix */
#define __ASM_STDCALL(args) "@" #args #define __ASM_STDCALL(args) "@" #args
/* Define to a macro to generate an assembly function with stdcall calling
convention */
#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(name,__ASM_STDCALL(args),code)
/* Define to empty if `const' does not conform to ANSI C. */ /* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */ /* #undef const */

View file

@ -148,29 +148,6 @@ struct statfs;
#endif #endif
/* Macros to define assembler functions somewhat portably */
#if defined(__GNUC__) && !defined(__INTERIX) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__APPLE__)
# define __ASM_GLOBAL_FUNC(name,code) \
__asm__( ".text\n\t" \
".align 4\n\t" \
".globl " __ASM_NAME(#name) "\n\t" \
__ASM_FUNC(#name) "\n" \
__ASM_NAME(#name) ":\n\t" \
code \
"\n\t.previous" );
#else /* defined(__GNUC__) && !defined(__MINGW32__) && !defined(__APPLE__) */
# define __ASM_GLOBAL_FUNC(name,code) \
void __asm_dummy_##name(void) { \
asm( ".align 4\n\t" \
".globl " __ASM_NAME(#name) "\n\t" \
__ASM_FUNC(#name) "\n" \
__ASM_NAME(#name) ":\n\t" \
code ); \
}
#endif /* __GNUC__ */
/* Constructor functions */ /* Constructor functions */
#ifdef __GNUC__ #ifdef __GNUC__