include: Define fastcall assembly wrappers globally.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9a6dc66a1e
commit
62fa748f23
|
@ -35,25 +35,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 );
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue