Commit 62fa748f authored by Alexandre Julliard's avatar Alexandre Julliard

include: Define fastcall assembly wrappers globally.

parent 9a6dc66a
......@@ -36,25 +36,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl);
#ifdef __i386__
#define DEFINE_FASTCALL1_WRAPPER(func) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, 4, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
#define DEFINE_FASTCALL_WRAPPER(func,args) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
#define DEFINE_FASTCALL1_WRAPPER(func) /* nothing */
#define DEFINE_FASTCALL_WRAPPER(func,args) /* nothing */
#endif
#ifdef __i386__
extern void * WINAPI call_fastcall_func1( void *func, const void *a );
__ASM_STDCALL_FUNC( call_fastcall_func1, 8,
......
......@@ -50,18 +50,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
#ifdef __i386__
#define DEFINE_FASTCALL_WRAPPER(func,args) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
#define DEFINE_FASTCALL_WRAPPER(func,args) /* nothing */
#endif
/* CRC polynomial 0xedb88320 */
static const DWORD CRC_table[256] =
{
......
......@@ -60,24 +60,4 @@ extern POBJECT_TYPE PsProcessType;
extern POBJECT_TYPE PsThreadType;
extern POBJECT_TYPE SeTokenObjectType;
#ifdef __i386__
#define DEFINE_FASTCALL1_WRAPPER(func) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, 4, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
#define DEFINE_FASTCALL_WRAPPER(func,args) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
#define DEFINE_FASTCALL1_WRAPPER(func) /* nothing */
#define DEFINE_FASTCALL_WRAPPER(func,args) /* nothing */
#endif
#endif
......@@ -63,4 +63,29 @@
#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(__ASM_NAME(#name) __ASM_STDCALL(args),code)
/* fastcall support */
#ifdef __i386__
# define DEFINE_FASTCALL1_WRAPPER(func) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, 4, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
# define DEFINE_FASTCALL_WRAPPER(func,args) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else /* __i386__ */
# define DEFINE_FASTCALL1_WRAPPER(func) /* nothing */
# define DEFINE_FASTCALL_WRAPPER(func,args) /* nothing */
#endif /* __i386__ */
#endif /* __WINE_WINE_ASM_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment