RISC-V: Fix epilogue unwind info with fp and single sp adjust.
authorJim Wilson <jimw@sifive.com>
Sat, 17 Nov 2018 23:31:01 +0000 (23:31 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Sat, 17 Nov 2018 23:31:01 +0000 (15:31 -0800)
commitb579523b7bcd02739e6f06fe21a7ac6eb24dd6ec
tree42b0503525877eab5d73704ad1d0d31fb7beda2a
parent9472dfbf21e34bbca599c15fd31c7341af3fda29
RISC-V: Fix epilogue unwind info with fp and single sp adjust.

gcc/
* config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
(riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
(riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset.  Set it
to step2 if frame_pointer_needed and step1 is 0.

From-SVN: r266241
gcc/ChangeLog
gcc/config/riscv/riscv.c