_uw op;
int set_pc;
int set_pac = 0;
+ int set_pac_sp = 0;
_uw reg;
+ _uw sp;
set_pc = 0;
for (;;)
#if defined(TARGET_HAVE_PACBTI)
if (set_pac)
{
- _uw sp;
_uw lr;
_uw pac;
- _Unwind_VRS_Get (context, _UVRSC_CORE, R_SP, _UVRSD_UINT32, &sp);
+ if (!set_pac_sp)
+ _Unwind_VRS_Get (context, _UVRSC_CORE, R_SP, _UVRSD_UINT32,
+ &sp);
_Unwind_VRS_Get (context, _UVRSC_CORE, R_LR, _UVRSD_UINT32, &lr);
_Unwind_VRS_Get (context, _UVRSC_PAC, R_IP,
_UVRSD_UINT32, &pac);
continue;
}
+ /* Use current VSP as modifier in PAC validation. */
+ if (op == 0xb5)
+ {
+ _Unwind_VRS_Get (context, _UVRSC_CORE, R_SP, _UVRSD_UINT32, &sp);
+ set_pac_sp = 1;
+ continue;
+ }
+
if ((op & 0xfc) == 0xb4) /* Obsolete FPA. */
return _URC_FAILURE;