ntdll: Make __wine_syscall_dispatcher_return a separate function to fix Xcode 16 build errors.

LLVM no longer allows non-private labels to appear between
.cfi_startproc/endproc when targeting Mach-O.
For consistency, also modify ARM and i386.
This commit is contained in:
Brendan Shanks 2024-06-19 15:36:27 -07:00 committed by Alexandre Julliard
parent 1953d1e774
commit 802a52cb1b
4 changed files with 11 additions and 12 deletions

View file

@ -1252,9 +1252,9 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"5:\tmovw r0, #0x000d\n\t" /* STATUS_INVALID_PARAMETER */
"movt r0, #0xc000\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"
"b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )
__ASM_GLOBAL_FUNC( __wine_syscall_dispatcher_return,
"mov r8, r0\n\t"
"mov r0, r1\n\t"
"b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )

View file

@ -1607,9 +1607,9 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"ret x16\n"
"4:\tmov x0, #0xc0000000\n\t" /* STATUS_INVALID_PARAMETER */
"movk x0, #0x000d\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"
"b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )
__ASM_GLOBAL_FUNC( __wine_syscall_dispatcher_return,
"mov sp, x0\n\t"
"mov x0, x1\n\t"
"b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )

View file

@ -2768,10 +2768,9 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
__ASM_CFI("\t.cfi_restore_state\n")
"6:\tmovl $0xc000000d,%eax\n\t" /* STATUS_INVALID_PARAMETER */
"jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t"
"jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )
".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n"
__ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t"
__ASM_GLOBAL_FUNC( __wine_syscall_dispatcher_return,
"movl 8(%esp),%eax\n\t"
"movl 4(%esp),%esp\n\t"
"jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )

View file

@ -2876,9 +2876,9 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
__ASM_CFI("\t.cfi_restore_state\n")
"5:\tmovl $0xc000000d,%eax\n\t" /* STATUS_INVALID_PARAMETER */
"movq %rsp,%rcx\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"
"jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") )
__ASM_GLOBAL_FUNC( __wine_syscall_dispatcher_return,
"movq %rdi,%rcx\n\t"
"movl 0xb0(%rcx),%r14d\n\t" /* frame->syscall_flags */
"movq %rsi,%rax\n\t"