arc: Add DWARF2 alternate CFA column.
authorClaudiu Zissulescu <claziss@synopsys.com>
Wed, 5 Jan 2022 13:22:10 +0000 (15:22 +0200)
committerClaudiu Zissulescu <claziss@synopsys.com>
Fri, 14 Jan 2022 10:24:52 +0000 (12:24 +0200)
commit68a650ba57a446fef31722cc2d5ac0752dc1b531
tree3ead14d9a44f620e662dd74d1d01f8d9d24a5053
parentb3989a7b1069ef9ed56911d96e1ad153e506aabb
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>
gcc/config/arc/arc.h
gcc/testsuite/gcc.target/arc/cancel-1.c [new file with mode: 0644]
libgcc/config/arc/linux-unwind.h