Module: wine Branch: master Commit: 8c1f96f7abd2307c3fc3e998fe16927cc4aaccb4 URL: https://gitlab.winehq.org/wine/wine/-/commit/8c1f96f7abd2307c3fc3e998fe16927...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Mar 13 11:24:26 2024 +0100
ntdll: Always use SEH support on ARM64.
---
dlls/ntdll/relay.c | 6 +++--- dlls/ntdll/signal_arm64.c | 25 +++++++++++-------------- dlls/ntdll/signal_arm64ec.c | 6 +++--- 3 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c index ecb76eaedbd..959dde9a5f5 100644 --- a/dlls/ntdll/relay.c +++ b/dlls/ntdll/relay.c @@ -646,10 +646,10 @@ void WINAPI relay_trace_exit( struct relay_descr *descr, unsigned int idx, extern LONGLONG CDECL call_entry_point( void *func, int nb_args, const INT_PTR *args ); __ASM_GLOBAL_FUNC( call_entry_point, "stp x29, x30, [SP,#-16]!\n\t" - __ASM_SEH(".seh_save_fplr_x 16\n\t") + ".seh_save_fplr_x 16\n\t" "mov x29, SP\n\t" - __ASM_SEH(".seh_set_fp\n\t") - __ASM_SEH(".seh_endprologue\n\t") + ".seh_set_fp\n\t" + ".seh_endprologue\n\t" "ldr x8, [x2, #-32]\n\t" "mov x9, x0\n\t" "cbz w1, 2f\n\t" diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 6bd99df3ff1..2568cf1ae22 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -305,8 +305,8 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context ) * KiUserExceptionDispatcher (NTDLL.@) */ __ASM_GLOBAL_FUNC( KiUserExceptionDispatcher, - __ASM_SEH(".seh_context\n\t") - __ASM_SEH(".seh_endprologue\n\t") + ".seh_context\n\t" + ".seh_endprologue\n\t" "adr x16, " __ASM_NAME("pWow64PrepareForException") "\n\t" "ldr x16, [x16]\n\t" "cbz x16, 1f\n\t" @@ -323,10 +323,10 @@ __ASM_GLOBAL_FUNC( KiUserExceptionDispatcher, * KiUserApcDispatcher (NTDLL.@) */ __ASM_GLOBAL_FUNC( KiUserApcDispatcher, - __ASM_SEH(".seh_context\n\t") + ".seh_context\n\t" "nop\n\t" - __ASM_SEH(".seh_stackalloc 0x30\n\t") - __ASM_SEH(".seh_endprologue\n\t") + ".seh_stackalloc 0x30\n\t" + ".seh_endprologue\n\t" "ldp x16, x0, [sp]\n\t" /* func, arg1 */ "ldp x1, x2, [sp, #0x10]\n\t" /* arg2, arg3 */ "add x3, sp, #0x30\n\t" /* context (FIXME) */ @@ -660,13 +660,10 @@ __ASM_GLOBAL_FUNC( __C_ExecuteExceptionFilter, */ __ASM_GLOBAL_FUNC( RtlRaiseException, "sub sp, sp, #0x3b0\n\t" /* 0x390 (context) + 0x20 */ + ".seh_stackalloc 0x3b0\n\t" "stp x29, x30, [sp]\n\t" - __ASM_SEH(".seh_stackalloc 0x3b0\n\t") - __ASM_SEH(".seh_save_fplr 0\n\t") - __ASM_SEH(".seh_endprologue\n\t") - __ASM_CFI(".cfi_def_cfa x29, 944\n\t") - __ASM_CFI(".cfi_offset x30, -936\n\t") - __ASM_CFI(".cfi_offset x29, -944\n\t") + ".seh_save_fplr 0\n\t" + ".seh_endprologue\n\t" "mov x29, sp\n\t" "str x0, [sp, #0x10]\n\t" "add x0, sp, #0x20\n\t" @@ -741,15 +738,15 @@ void __cdecl NTDLL_longjmp( _JUMP_BUFFER *buf, int retval ) */ __ASM_GLOBAL_FUNC( RtlUserThreadStart, "stp x29, x30, [sp, #-16]!\n\t" - __ASM_SEH(".seh_save_fplr_x 16\n\t") - __ASM_SEH(".seh_endprologue\n\t") + ".seh_save_fplr_x 16\n\t" + ".seh_endprologue\n\t" "adr x8, " __ASM_NAME("pBaseThreadInitThunk") "\n\t" "ldr x8, [x8]\n\t" "mov x2, x1\n\t" "mov x1, x0\n\t" "mov x0, #0\n\t" "blr x8\n\t" - __ASM_SEH(".seh_handler " __ASM_NAME("call_unhandled_exception_handler") ", @except") ) + ".seh_handler call_unhandled_exception_handler, @except" )
/****************************************************************** * LdrInitializeThunk (NTDLL.@) diff --git a/dlls/ntdll/signal_arm64ec.c b/dlls/ntdll/signal_arm64ec.c index 55ed12a609a..8ec2575c786 100644 --- a/dlls/ntdll/signal_arm64ec.c +++ b/dlls/ntdll/signal_arm64ec.c @@ -1758,10 +1758,10 @@ static void __attribute__((used)) dispatch_apc( void (CALLBACK *func)(ULONG_PTR, NtContinue( &context.AMD64_Context, alertable ); } __ASM_GLOBAL_FUNC( "#KiUserApcDispatcher", - __ASM_SEH(".seh_context\n\t") + ".seh_context\n\t" "nop\n\t" - __ASM_SEH(".seh_stackalloc 0x30\n\t") - __ASM_SEH(".seh_endprologue\n\t") + ".seh_stackalloc 0x30\n\t" + ".seh_endprologue\n\t" "ldp x0, x1, [sp]\n\t" /* func, arg1 */ "ldp x2, x3, [sp, #0x10]\n\t" /* arg2, arg3 */ "ldr w4, [sp, #0x20]\n\t" /* alertable */