r261176 - in /trunk/gcc: ChangeLog config/riscv...

wilson@gcc.gnu.org wilson@gcc.gnu.org
Mon Jun 4 23:44:00 GMT 2018


Author: wilson
Date: Mon Jun  4 23:44:43 2018
New Revision: 261176

URL: https://gcc.gnu.org/viewcvs?rev=261176&root=gcc&view=rev
Log:
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.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/riscv/riscv-protos.h
    trunk/gcc/config/riscv/riscv.c
    trunk/gcc/config/riscv/riscv.md



More information about the Gcc-cvs mailing list