Rémi Bernon : winebus.sys: Move fastcall wrapper together with the functions.
Alexandre Julliard
julliard at winehq.org
Mon Sep 20 16:26:21 CDT 2021
Module: wine
Branch: master
Commit: 65403bb0676cfe40fda9775f29a80a967462c66a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=65403bb0676cfe40fda9775f29a80a967462c66a
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Mon Sep 20 09:37:07 2021 +0200
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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winebus.sys/main.c | 29 ++++++++++++-----------------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c
index ffe54fcbf87..b5130a7908e 100644
--- a/dlls/winebus.sys/main.c
+++ b/dlls/winebus.sys/main.c
@@ -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;
More information about the wine-cvs
mailing list