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=47751
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-09-20 09:37:07 +02:00 committed by Alexandre Julliard
parent 7608538b40
commit 65403bb067
1 changed files with 12 additions and 17 deletions

View File

@ -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;