Commit 631a43c5 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use a .seh handler in RtlUserThreadStart on ARM64EC.

parent 8e26b7e0
...@@ -1740,17 +1740,25 @@ void WINAPI RtlRaiseException( struct _EXCEPTION_RECORD * rec) ...@@ -1740,17 +1740,25 @@ void WINAPI RtlRaiseException( struct _EXCEPTION_RECORD * rec)
/*********************************************************************** /***********************************************************************
* RtlUserThreadStart (NTDLL.@) * RtlUserThreadStart (NTDLL.@)
*/ */
void WINAPI RtlUserThreadStart( PRTL_THREAD_START_ROUTINE entry, void *arg ) void __attribute__((naked)) RtlUserThreadStart( PRTL_THREAD_START_ROUTINE entry, void *arg )
{ {
__TRY asm( ".seh_proc RtlUserThreadStart\n\t"
{ "stp x29, x30, [sp, #-16]!\n\t"
pBaseThreadInitThunk( 0, (LPTHREAD_START_ROUTINE)entry, arg ); ".seh_save_fplr_x 16\n\t"
} ".seh_endprologue\n\t"
__EXCEPT(call_unhandled_exception_filter) "adrp x11, pBaseThreadInitThunk\n\t"
{ "ldr x11, [x11, #:lo12:pBaseThreadInitThunk]\n\t"
NtTerminateProcess( GetCurrentProcess(), GetExceptionCode() ); "adr x10, $iexit_thunk$cdecl$v$i8i8i8\n\t"
} "mov x2, x1\n\t"
__ENDTRY "mov x1, x0\n\t"
"mov x0, #0\n\t"
"adrp x16, __os_arm64x_dispatch_icall\n\t"
"ldr x16, [x16, #:lo12:__os_arm64x_dispatch_icall]\n\t"
"blr x16\n\t"
"blr x11\n\t"
"brk #1\n\t"
".seh_handler call_unhandled_exception_handler, @except\n\t"
".seh_endproc" );
} }
......
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