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:
parent
7608538b40
commit
65403bb067
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue