Alexandre Julliard : winebuild: Use stdcall for fastcall wrappers.

Alexandre Julliard julliard at winehq.org
Fri Mar 1 16:42:10 CST 2019


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Mar  1 10:30:56 2019 +0100

winebuild: Use stdcall for fastcall wrappers.

This allows catching mismatched argument lists.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/hal/hal.c                       | 4 ++--
 dlls/ntdll/rtl.c                     | 2 +-
 dlls/ntoskrnl.exe/ntoskrnl_private.h | 4 ++--
 tools/winebuild/spec32.c             | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/hal/hal.c b/dlls/hal/hal.c
index d663c44..269a551 100644
--- a/dlls/hal/hal.c
+++ b/dlls/hal/hal.c
@@ -36,13 +36,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl);
 
 #ifdef __i386__
 #define DEFINE_FASTCALL1_WRAPPER(func) \
-    __ASM_GLOBAL_FUNC( __fastcall_ ## func, \
+    __ASM_STDCALL_FUNC( __fastcall_ ## func, 4, \
                        "popl %eax\n\t" \
                        "pushl %ecx\n\t" \
                        "pushl %eax\n\t" \
                        "jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
 #define DEFINE_FASTCALL_WRAPPER(func,args) \
-    __ASM_GLOBAL_FUNC( __fastcall_ ## func, \
+    __ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
                        "popl %eax\n\t" \
                        "pushl %edx\n\t" \
                        "pushl %ecx\n\t" \
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index d13ec31..755cc6e 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -52,7 +52,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
 
 #ifdef __i386__
 #define DEFINE_FASTCALL_WRAPPER(func,args) \
-    __ASM_GLOBAL_FUNC( __fastcall_ ## func, \
+    __ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
                        "popl %eax\n\t" \
                        "pushl %edx\n\t" \
                        "pushl %ecx\n\t" \
diff --git a/dlls/ntoskrnl.exe/ntoskrnl_private.h b/dlls/ntoskrnl.exe/ntoskrnl_private.h
index c4002e8..440e638 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl_private.h
+++ b/dlls/ntoskrnl.exe/ntoskrnl_private.h
@@ -30,13 +30,13 @@ struct _OBJECT_TYPE {
 
 #ifdef __i386__
 #define DEFINE_FASTCALL1_WRAPPER(func) \
-    __ASM_GLOBAL_FUNC( __fastcall_ ## func, \
+    __ASM_STDCALL_FUNC( __fastcall_ ## func, 4, \
                        "popl %eax\n\t" \
                        "pushl %ecx\n\t" \
                        "pushl %eax\n\t" \
                        "jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
 #define DEFINE_FASTCALL_WRAPPER(func,args) \
-    __ASM_GLOBAL_FUNC( __fastcall_ ## func, \
+    __ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
                        "popl %eax\n\t" \
                        "pushl %edx\n\t" \
                        "pushl %ecx\n\t" \
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 44d1c2c..d4091c2 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -968,7 +968,7 @@ void output_def_file( DLLSPEC *spec, int include_private )
             else if (strcmp(name, odp->link_name)) /* try to reduce output */
             {
                 output( "=%s", odp->link_name );
-                if (!kill_at && target_cpu == CPU_x86 && !(odp->flags & (FLAG_THISCALL | FLAG_FASTCALL)))
+                if (!kill_at && target_cpu == CPU_x86 && !(odp->flags & FLAG_THISCALL))
                     output( "@%d", at_param );
             }
             break;




More information about the wine-cvs mailing list