Properly check conflict between DRAP register and __builtin_eh_return

Since %ecx can't be used for both DRAP register and __builtin_eh_return,
we need to check if crtl->drap_reg uses %ecx before using %ecx for
__builtin_eh_return.

	PR target/70439
	* config/i386/i386.c (ix86_expand_epilogue): Properly check
	conflict between DRAP register and __builtin_eh_return.

From-SVN: r234559
This commit is contained in:
H.J. Lu 2016-03-30 05:38:36 -07:00
parent a5463d2325
commit 41ec61d3ef

View File

@ -13463,9 +13463,11 @@ ix86_expand_epilogue (int style)
rtx sa = EH_RETURN_STACKADJ_RTX;
rtx_insn *insn;
/* Stack align doesn't work with eh_return. */
gcc_assert (!stack_realign_drap);
/* Neither does regparm nested functions. */
/* %ecx can't be used for both DRAP register and eh_return. */
if (crtl->drap_reg)
gcc_assert (REGNO (crtl->drap_reg) != CX_REG);
/* regparm nested functions don't work with eh_return. */
gcc_assert (!ix86_static_chain_on_stack);
if (frame_pointer_needed)