LLVM 17 or 18 no longer allow non-private labels to appear between .cfi_startproc/endproc when targeting Mach-O.
Similar fixes as in commit 295d521b11644fb76c36854336b13c2155bb7d79.
Since this is needed for 2 out of 4 architectures, would it be better to do it for all 4 and then modify the shared `__wine_syscall_dispatcher_return()` prototype?
-- v2: ntdll: Make __wine_syscall_dispatcher_return a separate function to fix Xcode 16 build errors.
From: Brendan Shanks bshanks@codeweavers.com
LLVM no longer allows non-private labels to appear between .cfi_startproc/endproc when targeting Mach-O. For consistency, also modify ARM and i386. --- dlls/ntdll/unix/signal_arm.c | 6 +++--- dlls/ntdll/unix/signal_arm64.c | 6 +++--- dlls/ntdll/unix/signal_i386.c | 5 ++--- dlls/ntdll/unix/signal_x86_64.c | 6 +++--- 4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index a477d8d2ed8..77d66909135 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -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") ) diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index 58911d9b1f2..667bc1108cf 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -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") ) diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c index 6457f0221bd..61d41ec3589 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c @@ -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") ) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index a163d5d0b33..e84044fa805 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -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"
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=146426
Your paranoid android.
=== debian11b (64 bit WoW report) ===
wsdapi: discovery.c:1077: Test failed: Hello message not received discovery.c:1078: Test failed: EndpointReference not received discovery.c:1079: Test failed: AppSequence not received discovery.c:1080: Test failed: MetadataVersion not received discovery.c:1081: Test failed: Hello message metadata not received discovery.c:1082: Test failed: Custom header not received discovery.c:1083: Test failed: Wine namespace not received discovery.c:1084: Test failed: Body and Hello elements not received discovery.c:1085: Test failed: Custom body element not received discovery.c:1086: Test failed: Types not received discovery.c:1087: Test failed: XML namespaces not received discovery.c:1088: Test failed: Scopes not received discovery.c:1089: Test failed: XAddrs not received
On Wed Jun 19 22:56:24 2024 +0000, Alexandre Julliard wrote:
Couldn't `__wine_syscall_dispatcher_return` simply be made into a separate function?
Good idea, that's clean and works.