re PR target/83641 (-fstack-clash-protection generates incorrect CFI on i386)
authorJeff Law <law@gcc.gnu.org>
Wed, 3 Jan 2018 21:25:10 +0000 (14:25 -0700)
committerJeff Law <law@gcc.gnu.org>
Wed, 3 Jan 2018 21:25:10 +0000 (14:25 -0700)
commit4bfb8e1143f4626e12df348a1bde34030c0fb2e7
treeb9a574fdad7d1e20dfd6905d89379d0a719e9370
parente3bd17639b20e009238b15b2354bb0e87e29703e
re PR target/83641 (-fstack-clash-protection generates incorrect CFI on i386)

PR target/83641
* config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
and add REG_CFA_ADJUST_CFA notes in that case to both insns.

PR target/83641
* config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
explicitly probe *sp in a noreturn function if there were any callee
register saves or frame pointer is needed.

PR target/83641
* gcc.target/i386/stack-check-17.c: New test.
* gcc.target/i386/stack-check-12.c: Drop unnecessary asm.

From-SVN: r256191
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/stack-check-12.c
gcc/testsuite/gcc.target/i386/stack-check-17.c [new file with mode: 0644]