aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2022-01-05 15:22:10 +0200
committerClaudiu Zissulescu <claziss@synopsys.com>2022-01-14 12:24:52 +0200
commit68a650ba57a446fef31722cc2d5ac0752dc1b531 (patch)
tree3ead14d9a44f620e662dd74d1d01f8d9d24a5053 /libgcc
parentb3989a7b1069ef9ed56911d96e1ad153e506aabb (diff)
downloadgcc-68a650ba57a446fef31722cc2d5ac0752dc1b531.zip
gcc-68a650ba57a446fef31722cc2d5ac0752dc1b531.tar.gz
gcc-68a650ba57a446fef31722cc2d5ac0752dc1b531.tar.bz2
arc: Add DWARF2 alternate CFA column.
Add DWARF 2 CFA column which tracks the return address from a signal handler context. This value must not correspond to a hard register and must be out of the range of DWARF_FRAME_REGNUM(). gcc/ * config/arc/arc.h (DWARF_FRAME_REGNUM): Update definition. (DWARF_FRAME_RETURN_COLUMN): Use RETURN_ADDR_REGNUM macro. (INCOMING_RETURN_ADDR_RTX): Likewise. (DWARF_ALT_FRAME_RETURN_COLUMN): Define. gcc/testsuite/ * gcc.target/arc/cancel-1.c: New file. libgcc/ * config/arc/linux-unwind.h (arc_fallback_frame_state): Use DWARF_ALT_FRAME_RETURN_COLUMN macro. Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/config/arc/linux-unwind.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/libgcc/config/arc/linux-unwind.h b/libgcc/config/arc/linux-unwind.h
index 1d8c0c5..be42a31 100644
--- a/libgcc/config/arc/linux-unwind.h
+++ b/libgcc/config/arc/linux-unwind.h
@@ -120,10 +120,11 @@ arc_fallback_frame_state (struct _Unwind_Context *context,
= ((_Unwind_Ptr) &(regs[i])) - new_cfa;
}
- fs->regs.reg[31].how = REG_SAVED_VAL_OFFSET;
- fs->regs.reg[31].loc.offset = ((_Unwind_Ptr) (regs[ret])) - new_cfa;
-
- fs->retaddr_column = 31;
+ fs->signal_frame = 1;
+ fs->retaddr_column = __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__;
+ fs->regs.reg[fs->retaddr_column].how = REG_SAVED_VAL_OFFSET;
+ fs->regs.reg[fs->retaddr_column].loc.offset =
+ ((_Unwind_Ptr) (regs[ret])) - new_cfa;
return _URC_NO_REASON;
}