Module: wine Branch: master Commit: 41e708dafa0e917951a9cfb331f97a09d46b2aa6 URL: https://gitlab.winehq.org/wine/wine/-/commit/41e708dafa0e917951a9cfb331f97a0...
Author: Brendan Shanks bshanks@codeweavers.com Date: Thu Feb 9 15:03:05 2023 -0800
ntdll: Use __ASM_LOCAL_LABEL in syscall dispatchers.
Fixes compile error on ARM64 macOS.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54256
---
dlls/ntdll/unix/signal_arm.c | 8 ++++---- dlls/ntdll/unix/signal_arm64.c | 8 ++++---- dlls/ntdll/unix/signal_i386.c | 8 ++++---- dlls/ntdll/unix/signal_x86_64.c | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index 8180bc52b46..681c2e3c0c1 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -1701,7 +1701,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "ldr r5, [r4]\n\t" /* table->ServiceTable */ "ldr ip, [r5, ip, lsl #2]\n\t" "blx ip\n" - ".L__wine_syscall_dispatcher_return:\n\t" + __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" "ldr ip, [r8, #0x44]\n\t" /* frame->restore_flags */ #ifndef __SOFTFP__ "tst ip, #4\n\t" /* CONTEXT_FLOATING_POINT */ @@ -1722,12 +1722,12 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "5:\tmovw r0, #0x000d\n\t" /* STATUS_INVALID_PARAMETER */ "movt r0, #0xc000\n\t" "add sp, sp, #0x10\n\t" - "b .L__wine_syscall_dispatcher_return\n\t" + "b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" ".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" "mov r8, r0\n\t" "mov r0, r1\n\t" - "b .L__wine_syscall_dispatcher_return" ) + "b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )
/*********************************************************************** @@ -1762,7 +1762,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "ldr sp, [r8, #0x38]\n\t" "add r8, r8, #0x10\n\t" "ldm r8, {r4-r12,pc}\n\t" - "1:\tb .L__wine_syscall_dispatcher_return" ) + "1:\tb " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )
/*********************************************************************** diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index bd9818c808a..d94b335bc8d 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -1522,7 +1522,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "ldr x16, [x16, x20, lsl 3]\n\t" "blr x16\n\t" "mov sp, x22\n" - ".L__wine_syscall_dispatcher_return:\n\t" + __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" "ldp x18, x19, [sp, #0x90]\n\t" "ldp x20, x21, [sp, #0xa0]\n\t" "ldp x22, x23, [sp, #0xb0]\n\t" @@ -1567,12 +1567,12 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "ret x16\n" "4:\tmov x0, #0xc0000000\n\t" /* STATUS_INVALID_PARAMETER */ "movk x0, #0x000d\n\t" - "b .L__wine_syscall_dispatcher_return\n\t" + "b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" ".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" "mov sp, x0\n\t" "mov x0, x1\n\t" - "b .L__wine_syscall_dispatcher_return" ) + "b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )
/*********************************************************************** @@ -1607,7 +1607,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "mov x0, x2\n\t" /* args */ "blr x16\n\t" "ldr w16, [sp, #0x10c]\n\t" /* frame->restore_flags */ - "cbnz w16, .L__wine_syscall_dispatcher_return\n\t" + "cbnz w16, " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" "ldr x18, [sp, #0x90]\n\t" "ldp x16, x17, [sp, #0xf8]\n\t" "mov sp, x16\n\t" diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c index 1cea685d995..a567aa31b2a 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c @@ -2630,7 +2630,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "call *(%eax,%edx,4)\n\t" "leal -0x34(%ebp),%esp\n"
- ".L__wine_syscall_dispatcher_return:\t" + __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\t" __ASM_CFI_CFA_IS_AT1(esp, 0x0c) __ASM_CFI_REG_IS_AT1(esp, esp, 0x0c) __ASM_CFI_REG_IS_AT1(eip, esp, 0x08) @@ -2707,7 +2707,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "iret\n" __ASM_CFI("\t.cfi_restore_state\n") "6:\tmovl $0xc000000d,%eax\n\t" /* STATUS_INVALID_PARAMETER */ - "jmp .L__wine_syscall_dispatcher_return\n\t" + "jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t"
".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" @@ -2722,7 +2722,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "movl 8(%esp),%eax\n\t" "movl 4(%esp),%esp\n\t" __ASM_CFI(".cfi_restore_state\n\t") - "jmp .L__wine_syscall_dispatcher_return" ) + "jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )
/*********************************************************************** @@ -2769,7 +2769,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, __ASM_CFI_REG_IS_AT1(esi, esp, 0x30) __ASM_CFI_REG_IS_AT1(ebp, esp, 0x34) "testw $0xffff,2(%esp)\n\t" /* frame->restore_flags */ - "jnz .L__wine_syscall_dispatcher_return\n\t" + "jnz " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" "movl 0x08(%esp),%ecx\n\t" /* frame->eip */ __ASM_CFI(".cfi_register %eip, %ecx\n\t") "movl 0x0c(%esp),%esp\n\t" /* frame->esp */ diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 54babc7d964..13fe7051c66 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2757,7 +2757,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "leaq -0x98(%rbp),%rcx\n\t" /* $rcx is now pointing to "frame" again */ __ASM_CFI(".cfi_restore_state\n") - ".L__wine_syscall_dispatcher_return:\n\t" + __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" "movl 0x94(%rcx),%edx\n\t" /* frame->restore_flags */ #ifdef __linux__ "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ @@ -2849,7 +2849,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" "movl 0xb0(%rcx),%r14d\n\t" /* frame->syscall_flags */ "movq %rdx,%rax\n\t" - "jmp .L__wine_syscall_dispatcher_return" ) + "jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )
/*********************************************************************** @@ -2930,7 +2930,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "movdqa 0x240(%rcx),%xmm14\n\t" "movdqa 0x250(%rcx),%xmm15\n\t" "testl $0xffff,0x94(%rcx)\n\t" /* frame->restore_flags */ - "jnz .L__wine_syscall_dispatcher_return\n\t" + "jnz " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" #ifdef __linux__ "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ "jz 1f\n\t"