diff options
author | H.J. Lu <hjl@gcc.gnu.org> | 2016-03-30 05:38:36 -0700 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2016-03-30 05:38:36 -0700 |
commit | 41ec61d3ef99e27e1d2584836ce8c6483c628689 (patch) | |
tree | 5d8238b92b23513b70abcdb0a8fbab5089543d85 | |
parent | a5463d23252d2e2532f2499381a9bdfbce39abd4 (diff) | |
download | gcc-41ec61d3ef99e27e1d2584836ce8c6483c628689.zip gcc-41ec61d3ef99e27e1d2584836ce8c6483c628689.tar.gz gcc-41ec61d3ef99e27e1d2584836ce8c6483c628689.tar.bz2 |
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
-rw-r--r-- | gcc/config/i386/i386.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1639704..f700a25 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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) |