Commit 41e708da authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

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
parent 1362b0c0
...@@ -1701,7 +1701,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, ...@@ -1701,7 +1701,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"ldr r5, [r4]\n\t" /* table->ServiceTable */ "ldr r5, [r4]\n\t" /* table->ServiceTable */
"ldr ip, [r5, ip, lsl #2]\n\t" "ldr ip, [r5, ip, lsl #2]\n\t"
"blx ip\n" "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 */ "ldr ip, [r8, #0x44]\n\t" /* frame->restore_flags */
#ifndef __SOFTFP__ #ifndef __SOFTFP__
"tst ip, #4\n\t" /* CONTEXT_FLOATING_POINT */ "tst ip, #4\n\t" /* CONTEXT_FLOATING_POINT */
...@@ -1722,12 +1722,12 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, ...@@ -1722,12 +1722,12 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"5:\tmovw r0, #0x000d\n\t" /* STATUS_INVALID_PARAMETER */ "5:\tmovw r0, #0x000d\n\t" /* STATUS_INVALID_PARAMETER */
"movt r0, #0xc000\n\t" "movt r0, #0xc000\n\t"
"add sp, sp, #0x10\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" ".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n"
__ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t"
"mov r8, r0\n\t" "mov r8, r0\n\t"
"mov r0, r1\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, ...@@ -1762,7 +1762,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher,
"ldr sp, [r8, #0x38]\n\t" "ldr sp, [r8, #0x38]\n\t"
"add r8, r8, #0x10\n\t" "add r8, r8, #0x10\n\t"
"ldm r8, {r4-r12,pc}\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") )
/*********************************************************************** /***********************************************************************
......
...@@ -1522,7 +1522,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, ...@@ -1522,7 +1522,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"ldr x16, [x16, x20, lsl 3]\n\t" "ldr x16, [x16, x20, lsl 3]\n\t"
"blr x16\n\t" "blr x16\n\t"
"mov sp, x22\n" "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 x18, x19, [sp, #0x90]\n\t"
"ldp x20, x21, [sp, #0xa0]\n\t" "ldp x20, x21, [sp, #0xa0]\n\t"
"ldp x22, x23, [sp, #0xb0]\n\t" "ldp x22, x23, [sp, #0xb0]\n\t"
...@@ -1567,12 +1567,12 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, ...@@ -1567,12 +1567,12 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"ret x16\n" "ret x16\n"
"4:\tmov x0, #0xc0000000\n\t" /* STATUS_INVALID_PARAMETER */ "4:\tmov x0, #0xc0000000\n\t" /* STATUS_INVALID_PARAMETER */
"movk x0, #0x000d\n\t" "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" ".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n"
__ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t"
"mov sp, x0\n\t" "mov sp, x0\n\t"
"mov x0, x1\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, ...@@ -1607,7 +1607,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher,
"mov x0, x2\n\t" /* args */ "mov x0, x2\n\t" /* args */
"blr x16\n\t" "blr x16\n\t"
"ldr w16, [sp, #0x10c]\n\t" /* frame->restore_flags */ "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" "ldr x18, [sp, #0x90]\n\t"
"ldp x16, x17, [sp, #0xf8]\n\t" "ldp x16, x17, [sp, #0xf8]\n\t"
"mov sp, x16\n\t" "mov sp, x16\n\t"
......
...@@ -2630,7 +2630,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, ...@@ -2630,7 +2630,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"call *(%eax,%edx,4)\n\t" "call *(%eax,%edx,4)\n\t"
"leal -0x34(%ebp),%esp\n" "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_CFA_IS_AT1(esp, 0x0c)
__ASM_CFI_REG_IS_AT1(esp, esp, 0x0c) __ASM_CFI_REG_IS_AT1(esp, esp, 0x0c)
__ASM_CFI_REG_IS_AT1(eip, esp, 0x08) __ASM_CFI_REG_IS_AT1(eip, esp, 0x08)
...@@ -2707,7 +2707,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, ...@@ -2707,7 +2707,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"iret\n" "iret\n"
__ASM_CFI("\t.cfi_restore_state\n") __ASM_CFI("\t.cfi_restore_state\n")
"6:\tmovl $0xc000000d,%eax\n\t" /* STATUS_INVALID_PARAMETER */ "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" ".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n"
__ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t"
...@@ -2722,7 +2722,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, ...@@ -2722,7 +2722,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"movl 8(%esp),%eax\n\t" "movl 8(%esp),%eax\n\t"
"movl 4(%esp),%esp\n\t" "movl 4(%esp),%esp\n\t"
__ASM_CFI(".cfi_restore_state\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, ...@@ -2769,7 +2769,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher,
__ASM_CFI_REG_IS_AT1(esi, esp, 0x30) __ASM_CFI_REG_IS_AT1(esi, esp, 0x30)
__ASM_CFI_REG_IS_AT1(ebp, esp, 0x34) __ASM_CFI_REG_IS_AT1(ebp, esp, 0x34)
"testw $0xffff,2(%esp)\n\t" /* frame->restore_flags */ "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 */ "movl 0x08(%esp),%ecx\n\t" /* frame->eip */
__ASM_CFI(".cfi_register %eip, %ecx\n\t") __ASM_CFI(".cfi_register %eip, %ecx\n\t")
"movl 0x0c(%esp),%esp\n\t" /* frame->esp */ "movl 0x0c(%esp),%esp\n\t" /* frame->esp */
......
...@@ -2757,7 +2757,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, ...@@ -2757,7 +2757,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"leaq -0x98(%rbp),%rcx\n\t" "leaq -0x98(%rbp),%rcx\n\t"
/* $rcx is now pointing to "frame" again */ /* $rcx is now pointing to "frame" again */
__ASM_CFI(".cfi_restore_state\n") __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 */ "movl 0x94(%rcx),%edx\n\t" /* frame->restore_flags */
#ifdef __linux__ #ifdef __linux__
"testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */
...@@ -2849,7 +2849,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, ...@@ -2849,7 +2849,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
__ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t"
"movl 0xb0(%rcx),%r14d\n\t" /* frame->syscall_flags */ "movl 0xb0(%rcx),%r14d\n\t" /* frame->syscall_flags */
"movq %rdx,%rax\n\t" "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, ...@@ -2930,7 +2930,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher,
"movdqa 0x240(%rcx),%xmm14\n\t" "movdqa 0x240(%rcx),%xmm14\n\t"
"movdqa 0x250(%rcx),%xmm15\n\t" "movdqa 0x250(%rcx),%xmm15\n\t"
"testl $0xffff,0x94(%rcx)\n\t" /* frame->restore_flags */ "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__ #ifdef __linux__
"testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */
"jz 1f\n\t" "jz 1f\n\t"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment