Module: wine Branch: master Commit: c908ad6fcd19ec2bd8bb1df4086a7026df645c3e URL: https://gitlab.winehq.org/wine/wine/-/commit/c908ad6fcd19ec2bd8bb1df4086a702...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Jun 14 11:15:13 2023 +0200
kernelbase: Don't define stdcall functions on non-i386.
---
dlls/kernelbase/debug.c | 9 ++++++++- dlls/kernelbase/thread.c | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlls/kernelbase/debug.c b/dlls/kernelbase/debug.c index df1b9a63604..4353b0590f3 100644 --- a/dlls/kernelbase/debug.c +++ b/dlls/kernelbase/debug.c @@ -118,8 +118,10 @@ BOOL WINAPI DECLSPEC_HOTPATCH DebugActiveProcessStop( DWORD pid ) /*********************************************************************** * DebugBreak (kernelbase.@) */ -#if defined(__i386__) || defined(__x86_64__) +#ifdef __i386__ __ASM_STDCALL_FUNC( DebugBreak, 0, "jmp " __ASM_STDCALL("DbgBreakPoint", 0) ) +#elif defined(__x86_64__) +__ASM_GLOBAL_FUNC( DebugBreak, "jmp " __ASM_NAME("DbgBreakPoint") ) #else void WINAPI DebugBreak(void) { @@ -347,7 +349,12 @@ void WINAPI DECLSPEC_HOTPATCH RaiseException( DWORD code, DWORD flags, DWORD cou RtlRaiseException( &record ); } #endif + +#ifdef __i386__ __ASM_STDCALL_IMPORT(RaiseException,16) +#else +__ASM_GLOBAL_IMPORT(RaiseException) +#endif
/******************************************************************* * RaiseFailFastException (kernelbase.@) diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c index ccedb62f930..bb1145e3f66 100644 --- a/dlls/kernelbase/thread.c +++ b/dlls/kernelbase/thread.c @@ -807,7 +807,7 @@ __ASM_STDCALL_FUNC( switch_fiber, 8, "movl 0xc4(%ecx),%esp\n\t" /* new->Esp */ "jmp *0xb8(%ecx)" ) /* new->Eip */ #elif defined(__x86_64__) -__ASM_STDCALL_FUNC( switch_fiber, 8, +__ASM_GLOBAL_FUNC( switch_fiber, "movq %rbx,0x90(%rcx)\n\t" /* old->Rbx */ "leaq 0x8(%rsp),%rax\n\t" "movq %rax,0x98(%rcx)\n\t" /* old->Rsp */ @@ -851,7 +851,7 @@ __ASM_STDCALL_FUNC( switch_fiber, 8, "movq 0x98(%rdx),%rsp\n\t" /* new->Rsp */ "jmp *0xf8(%rdx)" ) /* new->Rip */ #elif defined(__arm__) -__ASM_STDCALL_FUNC( switch_fiber, 8, +__ASM_GLOBAL_FUNC( switch_fiber, "str r4, [r0, #0x14]\n\t" /* old->R4 */ "str r5, [r0, #0x18]\n\t" /* old->R5 */ "str r6, [r0, #0x1c]\n\t" /* old->R6 */ @@ -874,7 +874,7 @@ __ASM_STDCALL_FUNC( switch_fiber, 8, "ldr r2, [r1, #0x40]\n\t" /* new->Pc */ "bx r2" ) #elif defined(__aarch64__) -__ASM_STDCALL_FUNC( switch_fiber, 8, +__ASM_GLOBAL_FUNC( switch_fiber, "stp x19, x20, [x0, #0xa0]\n\t" /* old->X19,X20 */ "stp x21, x22, [x0, #0xb0]\n\t" /* old->X21,X22 */ "stp x23, x24, [x0, #0xc0]\n\t" /* old->X23,X24 */