Alexandre Julliard : msvcrt: Move vtbl wrappers together with the other functions.

Alexandre Julliard julliard at winehq.org
Fri Sep 27 15:56:29 CDT 2019


Module: wine
Branch: master
Commit: 0c853f026578dd7c8aede2f716c8e55d816ccf40
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0c853f026578dd7c8aede2f716c8e55d816ccf40

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Sep 27 13:57:06 2019 +0200

msvcrt: Move vtbl wrappers together with the other functions.

The .text directive can mess up the variable definitions.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47751
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/scheduler.c | 52 ++++++++++++++++++++++++-------------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/scheduler.c
index 9e0de95740..53a9669fea 100644
--- a/dlls/msvcrt/scheduler.c
+++ b/dlls/msvcrt/scheduler.c
@@ -36,32 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
 static int context_id = -1;
 static int scheduler_id = -1;
 
-#if defined(__i386__) && !defined(__MINGW32__)
-
-#define DEFINE_VTBL_WRAPPER(off)            \
-    __ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \
-        "popl %eax\n\t"                     \
-        "popl %ecx\n\t"                     \
-        "pushl %eax\n\t"                    \
-        "movl 0(%ecx), %eax\n\t"            \
-        "jmp *" #off "(%eax)\n\t")
-
-DEFINE_VTBL_WRAPPER(0);
-DEFINE_VTBL_WRAPPER(4);
-DEFINE_VTBL_WRAPPER(8);
-DEFINE_VTBL_WRAPPER(12);
-DEFINE_VTBL_WRAPPER(16);
-DEFINE_VTBL_WRAPPER(20);
-DEFINE_VTBL_WRAPPER(24);
-DEFINE_VTBL_WRAPPER(28);
-DEFINE_VTBL_WRAPPER(32);
-DEFINE_VTBL_WRAPPER(36);
-DEFINE_VTBL_WRAPPER(40);
-DEFINE_VTBL_WRAPPER(44);
-DEFINE_VTBL_WRAPPER(48);
-
-#endif
-
 typedef enum {
     SchedulerKind,
     MaxConcurrency,
@@ -1083,6 +1057,32 @@ void __cdecl _CurrentScheduler__ScheduleTask(void (__cdecl *proc)(void*), void *
     CurrentScheduler_ScheduleTask(proc, data);
 }
 
+#if defined(__i386__) && !defined(__MINGW32__)
+
+#define DEFINE_VTBL_WRAPPER(off)            \
+    __ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \
+        "popl %eax\n\t"                     \
+        "popl %ecx\n\t"                     \
+        "pushl %eax\n\t"                    \
+        "movl 0(%ecx), %eax\n\t"            \
+        "jmp *" #off "(%eax)\n\t")
+
+DEFINE_VTBL_WRAPPER(0);
+DEFINE_VTBL_WRAPPER(4);
+DEFINE_VTBL_WRAPPER(8);
+DEFINE_VTBL_WRAPPER(12);
+DEFINE_VTBL_WRAPPER(16);
+DEFINE_VTBL_WRAPPER(20);
+DEFINE_VTBL_WRAPPER(24);
+DEFINE_VTBL_WRAPPER(28);
+DEFINE_VTBL_WRAPPER(32);
+DEFINE_VTBL_WRAPPER(36);
+DEFINE_VTBL_WRAPPER(40);
+DEFINE_VTBL_WRAPPER(44);
+DEFINE_VTBL_WRAPPER(48);
+
+#endif
+
 extern const vtable_ptr MSVCRT_type_info_vtable;
 DEFINE_RTTI_DATA0(Context, 0, ".?AVContext at Concurrency@@")
 DEFINE_RTTI_DATA1(ContextBase, 0, &Context_rtti_base_descriptor, ".?AVContextBase at details@Concurrency@@")




More information about the wine-cvs mailing list