From 26bbbb7b73dcd345f5f89b9c48ace1f65f038ede Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 1 Mar 2019 10:30:56 +0100 Subject: [PATCH] winebuild: Use stdcall for fastcall wrappers. This allows catching mismatched argument lists. Signed-off-by: Alexandre Julliard --- 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 d663c446bc8..269a551f177 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 d13ec317309..755cc6e5967 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 c4002e8fbce..440e638fb6c 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 44d1c2c4a80..d4091c24244 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;