diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index b48aa669b2a..3a5091e6772 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -3121,7 +3121,7 @@ __ASM_STDCALL_FUNC( ExitProcess, 4, /* Shrinker depend on this particular ExitPr ".byte 0x6A, 0x00\n\t" /* pushl $0 */ ".byte 0x68, 0x00, 0x00, 0x00, 0x00\n\t" /* pushl $0 - 4 bytes immediate */ "pushl 8(%ebp)\n\t" - "call " __ASM_NAME("RtlExitUserProcess") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("RtlExitUserProcess",4) "\n\t" "leave\n\t" "ret $4" ) #else diff --git a/dlls/krnl386.exe16/kernel16_private.h b/dlls/krnl386.exe16/kernel16_private.h index 59b7a35c972..1fb4968a8e4 100644 --- a/dlls/krnl386.exe16/kernel16_private.h +++ b/dlls/krnl386.exe16/kernel16_private.h @@ -309,14 +309,14 @@ static inline DWORD stack32_pop( CONTEXT *context ) "leal -(0x2cc+4)(%esp),%esp\n\t" /* sizeof(CONTEXT) + space for %eax */ \ "movl %eax,-4(%ebp)\n\t" \ "pushl %esp\n\t" /* context */ \ - "call " __ASM_NAME("RtlCaptureContext") __ASM_STDCALL(4) "\n\t" \ + "call " __ASM_STDCALL("RtlCaptureContext",4) "\n\t" \ "movl -4(%ebp),%eax\n\t" \ "movl %eax,0xb0(%esp)\n\t" /* context->Eax */ \ "pushl %esp\n\t" /* context */ \ - "call " __ASM_NAME("__regs_") #name __ASM_STDCALL(4) "\n\t" \ + "call " __ASM_STDCALL("__regs_" #name,4) "\n\t" \ "pushl %esp\n\t" /* context */ \ "pushl $-2\n\t" /* GetCurrentThread() */ \ - "call " __ASM_NAME("NtSetContextThread") __ASM_STDCALL(8) "\n\t" \ + "call " __ASM_STDCALL("NtSetContextThread",8) "\n\t" \ "ret" ) /* fake ret to make copy protections happy */ #endif /* __WINE_KERNEL16_PRIVATE_H */ diff --git a/dlls/krnl386.exe16/ne_module.c b/dlls/krnl386.exe16/ne_module.c index 16d2f2805ad..1979358f4d7 100644 --- a/dlls/krnl386.exe16/ne_module.c +++ b/dlls/krnl386.exe16/ne_module.c @@ -2051,7 +2051,7 @@ void WINAPI MapHInstSL16( CONTEXT *context ) */ __ASM_STDCALL_FUNC( MapHInstLS, 0, "pushl %eax\n\t" - "call " __ASM_NAME("MapHModuleLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("MapHModuleLS",4) "\n\t" "ret" ) /*************************************************************************** @@ -2059,7 +2059,7 @@ __ASM_STDCALL_FUNC( MapHInstLS, 0, */ __ASM_STDCALL_FUNC( MapHInstSL, 0, "pushl %eax\n\t" - "call " __ASM_NAME("MapHModuleSL") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("MapHModuleSL",4) "\n\t" "ret" ) /*************************************************************************** @@ -2069,7 +2069,7 @@ __ASM_STDCALL_FUNC( MapHInstLS_PN, 0, "testl %eax,%eax\n\t" "jz 1f\n\t" "pushl %eax\n\t" - "call " __ASM_NAME("MapHModuleLS") __ASM_STDCALL(4) "\n" + "call " __ASM_STDCALL("MapHModuleLS",4) "\n" "1:\tret" ) /*************************************************************************** @@ -2079,5 +2079,5 @@ __ASM_STDCALL_FUNC( MapHInstSL_PN, 0, "andl $0xffff,%eax\n\t" "jz 1f\n\t" "pushl %eax\n\t" - "call " __ASM_NAME("MapHModuleSL") __ASM_STDCALL(4) "\n" + "call " __ASM_STDCALL("MapHModuleSL",4) "\n" "1:\tret" ) diff --git a/dlls/krnl386.exe16/selector.c b/dlls/krnl386.exe16/selector.c index fa9dd522316..8c45d6af049 100644 --- a/dlls/krnl386.exe16/selector.c +++ b/dlls/krnl386.exe16/selector.c @@ -551,7 +551,7 @@ __ASM_STDCALL_FUNC( SMapLS, 0, "testl $0xffff0000,%eax\n\t" "jz 1f\n\t" "pushl %eax\n\t" - "call " __ASM_NAME("MapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("MapLS",4) "\n\t" "movl %eax,%edx\n" "1:\tret" ) @@ -561,7 +561,7 @@ __ASM_STDCALL_FUNC( SMapLS, 0, __ASM_STDCALL_FUNC( SUnMapLS, 0, "pushl %eax\n\t" /* preserve eax */ "pushl %eax\n\t" - "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("UnMapLS",4) "\n\t" "popl %eax\n\t" "ret" ) @@ -575,7 +575,7 @@ __ASM_STDCALL_FUNC( SUnMapLS, 0, */ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_8, 0, "movl 8(%ebp),%eax\n\t" - "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("SMapLS",4) "\n\t" "movl %edx,8(%ebp)\n\t" "ret" ) @@ -584,7 +584,7 @@ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_8, 0, */ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_12, 0, "movl 12(%ebp),%eax\n\t" - "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("SMapLS",4) "\n\t" "movl %edx,12(%ebp)\n\t" "ret" ) @@ -593,7 +593,7 @@ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_12, 0, */ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_16, 0, "movl 16(%ebp),%eax\n\t" - "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("SMapLS",4) "\n\t" "movl %edx,16(%ebp)\n\t" "ret" ) @@ -602,7 +602,7 @@ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_16, 0, */ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_20, 0, "movl 20(%ebp),%eax\n\t" - "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("SMapLS",4) "\n\t" "movl %edx,20(%ebp)\n\t" "ret" ) @@ -611,7 +611,7 @@ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_20, 0, */ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_24, 0, "movl 24(%ebp),%eax\n\t" - "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("SMapLS",4) "\n\t" "movl %edx,24(%ebp)\n\t" "ret" ) @@ -620,7 +620,7 @@ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_24, 0, */ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_28, 0, "movl 28(%ebp),%eax\n\t" - "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("SMapLS",4) "\n\t" "movl %edx,28(%ebp)\n\t" "ret" ) @@ -629,7 +629,7 @@ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_28, 0, */ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_32, 0, "movl 32(%ebp),%eax\n\t" - "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("SMapLS",4) "\n\t" "movl %edx,32(%ebp)\n\t" "ret" ) @@ -638,7 +638,7 @@ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_32, 0, */ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_36, 0, "movl 36(%ebp),%eax\n\t" - "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("SMapLS",4) "\n\t" "movl %edx,36(%ebp)\n\t" "ret" ) @@ -647,7 +647,7 @@ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_36, 0, */ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_40, 0, "movl 40(%ebp),%eax\n\t" - "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("SMapLS",4) "\n\t" "movl %edx,40(%ebp)\n\t" "ret" ) @@ -657,7 +657,7 @@ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_40, 0, __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_8, 0, "pushl %eax\n\t" /* preserve eax */ "pushl 8(%ebp)\n\t" - "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("UnMapLS",4) "\n\t" "movl $0,8(%ebp)\n\t" "popl %eax\n\t" "ret" ) @@ -668,7 +668,7 @@ __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_8, 0, __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_12, 0, "pushl %eax\n\t" /* preserve eax */ "pushl 12(%ebp)\n\t" - "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("UnMapLS",4) "\n\t" "movl $0,12(%ebp)\n\t" "popl %eax\n\t" "ret" ) @@ -679,7 +679,7 @@ __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_12, 0, __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_16, 0, "pushl %eax\n\t" /* preserve eax */ "pushl 16(%ebp)\n\t" - "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("UnMapLS",4) "\n\t" "movl $0,16(%ebp)\n\t" "popl %eax\n\t" "ret" ) @@ -690,7 +690,7 @@ __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_16, 0, __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_20, 0, "pushl %eax\n\t" /* preserve eax */ "pushl 20(%ebp)\n\t" - "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("UnMapLS",4) "\n\t" "movl $0,20(%ebp)\n\t" "popl %eax\n\t" "ret" ) @@ -701,7 +701,7 @@ __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_20, 0, __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_24, 0, "pushl %eax\n\t" /* preserve eax */ "pushl 24(%ebp)\n\t" - "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("UnMapLS",4) "\n\t" "movl $0,24(%ebp)\n\t" "popl %eax\n\t" "ret" ) @@ -712,7 +712,7 @@ __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_24, 0, __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_28, 0, "pushl %eax\n\t" /* preserve eax */ "pushl 28(%ebp)\n\t" - "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("UnMapLS",4) "\n\t" "movl $0,28(%ebp)\n\t" "popl %eax\n\t" "ret" ) @@ -723,7 +723,7 @@ __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_28, 0, __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_32, 0, "pushl %eax\n\t" /* preserve eax */ "pushl 32(%ebp)\n\t" - "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("UnMapLS",4) "\n\t" "movl $0,32(%ebp)\n\t" "popl %eax\n\t" "ret" ) @@ -734,7 +734,7 @@ __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_32, 0, __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_36, 0, "pushl %eax\n\t" /* preserve eax */ "pushl 36(%ebp)\n\t" - "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("UnMapLS",4) "\n\t" "movl $0,36(%ebp)\n\t" "popl %eax\n\t" "ret" ) @@ -745,7 +745,7 @@ __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_36, 0, __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_40, 0, "pushl %eax\n\t" /* preserve eax */ "pushl 40(%ebp)\n\t" - "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("UnMapLS",4) "\n\t" "movl $0,40(%ebp)\n\t" "popl %eax\n\t" "ret" ) diff --git a/dlls/krnl386.exe16/thunk.c b/dlls/krnl386.exe16/thunk.c index f3ca174598f..b4ba7d23651 100644 --- a/dlls/krnl386.exe16/thunk.c +++ b/dlls/krnl386.exe16/thunk.c @@ -2126,7 +2126,7 @@ __ASM_STDCALL_FUNC( CommonUnimpStub, 0, __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "pushl %eax\n\t" __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") - "call " __ASM_NAME("__regs_CommonUnimpStub") __ASM_STDCALL(8) "\n\t" + "call " __ASM_STDCALL("__regs_CommonUnimpStub",8) "\n\t" __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") "popl %ecx\n\t" __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c index 7974587c4a7..255d0e12cd0 100644 --- a/dlls/ntdll/relay.c +++ b/dlls/ntdll/relay.c @@ -1320,7 +1320,7 @@ void WINAPI DECLSPEC_HIDDEN __regs_SNOOP_Return( void **stack ) "leal 12(%esp),%eax\n\t" \ "pushl %eax\n\t" \ __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") \ - "call " __ASM_NAME("__regs_" #name) __ASM_STDCALL(4) "\n\t" \ + "call " __ASM_STDCALL("__regs_" #name,4) "\n\t" \ __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") \ "popl %edx\n\t" \ __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") \ diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 053c87da833..b4e88d125f1 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -2518,7 +2518,7 @@ __ASM_STDCALL_FUNC( RtlUnwind, 16, "pushl %eax\n\t" "leal 4(%esp),%eax\n\t" /* context */ "xchgl %eax,(%esp)\n\t" - "call " __ASM_NAME("RtlCaptureContext") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("RtlCaptureContext",4) "\n\t" "leal 24(%ebp),%eax\n\t" "movl %eax,0xc4(%esp)\n\t" /* context->Esp */ "pushl %esp\n\t" @@ -2526,7 +2526,7 @@ __ASM_STDCALL_FUNC( RtlUnwind, 16, "pushl 16(%ebp)\n\t" "pushl 12(%ebp)\n\t" "pushl 8(%ebp)\n\t" - "call " __ASM_NAME("__regs_RtlUnwind") __ASM_STDCALL(20) "\n\t" + "call " __ASM_STDCALL("__regs_RtlUnwind",20) "\n\t" "leave\n\t" __ASM_CFI(".cfi_def_cfa %esp,4\n\t") __ASM_CFI(".cfi_same_value %ebp\n\t") @@ -2577,7 +2577,7 @@ __ASM_STDCALL_FUNC( RtlRaiseException, 4, __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "leal -0x2cc(%esp),%esp\n\t" /* sizeof(CONTEXT) */ "pushl %esp\n\t" /* context */ - "call " __ASM_NAME("RtlCaptureContext") __ASM_STDCALL(4) "\n\t" + "call " __ASM_STDCALL("RtlCaptureContext",4) "\n\t" "movl 4(%ebp),%eax\n\t" /* return address */ "movl 8(%ebp),%ecx\n\t" /* rec */ "movl %eax,12(%ecx)\n\t" /* rec->ExceptionAddress */ diff --git a/dlls/winecrt0/exception.c b/dlls/winecrt0/exception.c index d141d287e56..91f37180135 100644 --- a/dlls/winecrt0/exception.c +++ b/dlls/winecrt0/exception.c @@ -36,7 +36,7 @@ __ASM_GLOBAL_FUNC( __wine_rtl_unwind, "pushl 12(%ebp)\n\t" /* record */ "pushl 16(%ebp)\n\t" /* target */ "pushl 8(%ebp)\n\t" /* frame */ - "call " __ASM_NAME("RtlUnwind") __ASM_STDCALL(16) "\n\t" + "call " __ASM_STDCALL("RtlUnwind",16) "\n\t" "call *16(%ebp)" ) #elif defined(__GNUC__) && defined(__x86_64__) diff --git a/include/wine/asm.h b/include/wine/asm.h index 4f3d0e4d1d0..c1a6819cd52 100644 --- a/include/wine/asm.h +++ b/include/wine/asm.h @@ -28,9 +28,9 @@ #endif #if defined(_WIN32) && defined(__i386__) -# define __ASM_STDCALL(args) "@" #args +# define __ASM_STDCALL(name,args) __ASM_NAME(name) "@" #args #else -# define __ASM_STDCALL(args) "" +# define __ASM_STDCALL(name,args) __ASM_NAME(name) #endif #ifdef __GCC_HAVE_DWARF2_CFI_ASM @@ -61,7 +61,7 @@ #define __ASM_GLOBAL_FUNC(name,code) __ASM_DEFINE_FUNC(__ASM_NAME(#name),code) -#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(__ASM_NAME(#name) __ASM_STDCALL(args),code) +#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(__ASM_STDCALL(#name,args),code) /* fastcall support */ @@ -72,14 +72,14 @@ "popl %eax\n\t" \ "pushl %ecx\n\t" \ "pushl %eax\n\t" \ - "jmp " __ASM_NAME(#func) __ASM_STDCALL(4) ) + "jmp " __ASM_STDCALL(#func,4) ) # define DEFINE_FASTCALL_WRAPPER(func,args) \ __ASM_STDCALL_FUNC( __fastcall_ ## func, args, \ "popl %eax\n\t" \ "pushl %edx\n\t" \ "pushl %ecx\n\t" \ "pushl %eax\n\t" \ - "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) ) + "jmp " __ASM_STDCALL(#func,args) ) #else /* __i386__ */ @@ -108,7 +108,7 @@ "popl %eax\n\t" \ "pushl %ecx\n\t" \ "pushl %eax\n\t" \ - "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) ) + "jmp " __ASM_STDCALL(#func,args) ) # endif /* _MSC_VER */ # define THISCALL(func) (void *)__thiscall_ ## func