Commit 65403bb0 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winebus.sys: Move fastcall wrapper together with the functions.

The .text directive sometimes makes the global variables go in the wrong section. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47751Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 7608538b
......@@ -41,23 +41,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(plugplay);
WINE_DECLARE_DEBUG_CHANNEL(hid_report);
#if defined(__i386__) && !defined(_WIN32)
extern void * WINAPI wrap_fastcall_func1( void *func, const void *a );
__ASM_STDCALL_FUNC( wrap_fastcall_func1, 8,
"popl %ecx\n\t"
"popl %eax\n\t"
"xchgl (%esp),%ecx\n\t"
"jmp *%eax" );
#define call_fastcall_func1(func,a) wrap_fastcall_func1(func,a)
#else
#define call_fastcall_func1(func,a) func(a)
#endif
static DRIVER_OBJECT *driver_obj;
static DEVICE_OBJECT *mouse_obj;
......@@ -359,6 +342,18 @@ static void bus_unlink_hid_device(DEVICE_OBJECT *device)
RtlLeaveCriticalSection(&device_list_cs);
}
#if defined(__i386__) && !defined(_WIN32)
extern void * WINAPI wrap_fastcall_func1(void *func, const void *a);
__ASM_STDCALL_FUNC(wrap_fastcall_func1, 8,
"popl %ecx\n\t"
"popl %eax\n\t"
"xchgl (%esp),%ecx\n\t"
"jmp *%eax");
#define call_fastcall_func1(func,a) wrap_fastcall_func1(func,a)
#else
#define call_fastcall_func1(func,a) func(a)
#endif
static NTSTATUS build_device_relations(DEVICE_RELATIONS **devices)
{
struct device_extension *ext;
......
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