]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Don't clobber retval when __builtin_eh_return called.
authorJim Wilson <jimw@sifive.com>
Mon, 4 Jun 2018 23:44:43 +0000 (23:44 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 4 Jun 2018 23:44:43 +0000 (16:44 -0700)
commitfd1e52dc252b33f918891458774f784e96fdf47e
tree03263010be208d5849160a44dc4bb222b68e0daa
parent7f5a3982462c30aab676a3bf09ef4a62a30c7696
RISC-V: Don't clobber retval when __builtin_eh_return called.

gcc/
* config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
to int.
* config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
and maybe_eh_return.  Change regno to unsigned int.  Use new args to
handle EH_RETURN_DATA_REGNO registers properly.
(riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
(riscv_expand_epilogue): Update comment.  Change argument name and
type.  Update code to use new name and type.  Pass new args to
riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
EXCEPTION_RETURN.
* config/riscv/riscv.md (NORMAL_RETURN): New.
(SIBCALL_RETURN, EXCEPTION_RETURN): New.
(epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
(eh_return): Call gen_eh_return_internal and emit barrier.
(eh_return_internal): Call riscv_expand_epilogue.

From-SVN: r261176
gcc/ChangeLog
gcc/config/riscv/riscv-protos.h
gcc/config/riscv/riscv.c
gcc/config/riscv/riscv.md