#define MD_DEMANGLE_RETURN_ADDR(context, fs, addr) \
aarch64_demangle_return_addr (context, fs, addr)
+#define MD_FRAME_LOCAL_REGISTER_P(reg) \
+ aarch64_frame_local_register (reg)
+
static inline aarch64_ra_signing_method_t
aarch64_context_ra_state_get (struct _Unwind_Context *context)
{
aarch64_fs_ra_state_set (fs, aarch64_ra_no_signing);
}
+/* Before copying the current context to the target context, check whether
+ the register is local to this context and should not be forwarded. */
+static inline bool
+aarch64_frame_local_register(long reg)
+{
+ return (reg == AARCH64_DWARF_REGNUM_RA_STATE);
+}
+
/* Do AArch64 private extraction on ADDR_WORD based on context info CONTEXT and
unwind frame info FS. If ADDR_WORD is signed, we do address authentication
on it using CFA of current frame.
void *c = (void *) (_Unwind_Internal_Ptr) current->reg[i];
void *t = (void *) (_Unwind_Internal_Ptr)target->reg[i];
+#ifdef MD_FRAME_LOCAL_REGISTER_P
+ if (MD_FRAME_LOCAL_REGISTER_P (i))
+ continue;
+#endif
+
gcc_assert (current->by_value[i] == 0);
if (target->by_value[i] && c)
{