1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

ntdll: Implement __C_specific_handler on ARM64EC.

This commit is contained in:
Alexandre Julliard 2024-03-13 11:03:01 +01:00
parent 7b5267cf63
commit c47d6ef1f7
2 changed files with 40 additions and 0 deletions

View file

@ -2333,6 +2333,40 @@ void __attribute__((naked)) __chkstk_arm64ec(void)
}
/*******************************************************************
* __C_ExecuteExceptionFilter
*/
LONG __attribute__((naked)) __C_ExecuteExceptionFilter( EXCEPTION_POINTERS *ptrs, void *frame,
PEXCEPTION_FILTER filter, BYTE *nonvolatile )
{
asm( ".seh_proc _C_ExecuteExceptionFilter\n\t"
"stp x29, x30, [sp, #-80]!\n\t"
".seh_save_fplr_x 80\n\t"
"stp x19, x20, [sp, #16]\n\t"
".seh_save_regp x19, 16\n\t"
"stp x21, x22, [sp, #32]\n\t"
".seh_save_regp x21, 32\n\t"
"stp x25, x26, [sp, #48]\n\t"
".seh_save_regp x25, 48\n\t"
"str x27, [sp, #64]\n\t"
".seh_save_reg x27, 64\n\t"
".seh_endprologue\n\t"
"ldp x19, x20, [x3, #0]\n\t" /* nonvolatile regs */
"ldp x21, x22, [x3, #16]\n\t"
"ldp x25, x26, [x3, #48]\n\t"
"ldr x27, [x3, #64]\n\t"
"ldr x1, [x3, #80]\n\t" /* x29 = frame */
"blr x2\n\t" /* filter */
"ldp x19, x20, [sp, #16]\n\t"
"ldp x21, x22, [sp, #32]\n\t"
"ldp x25, x26, [sp, #48]\n\t"
"ldr x27, [sp, #64]\n\t"
"ldp x29, x30, [sp], #80\n\t"
"ret\n\t"
".seh_endproc" );
}
/***********************************************************************
* RtlRaiseException (NTDLL.@)
*/

View file

@ -2204,6 +2204,12 @@ EXCEPTION_DISPOSITION WINAPI __C_specific_handler( EXCEPTION_RECORD *rec, void *
ULONG_PTR pc = dispatch->ControlPc;
unsigned int i;
#ifdef __arm64ec__
if (RtlIsEcCode( pc ))
return __C_specific_handler_arm64( rec, frame, (ARM64_NT_CONTEXT *)context,
(DISPATCHER_CONTEXT_ARM64 *)dispatch );
#endif
TRACE( "%p %p %p %p pc %Ix\n", rec, frame, context, dispatch, pc );
if (TRACE_ON(unwind)) DUMP_SCOPE_TABLE( base, table );