i386: Insert ENDBR after __morestack call
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 18 Apr 2018 19:14:28 +0000 (19:14 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 18 Apr 2018 19:14:28 +0000 (12:14 -0700)
commit8953574fa9a0398611d76a9ff2b8a3bc981f9c68
treef64a1e19793f41f95f64754dee671bbf106b84d0
parent05b14480611a6791e11f8f5811ca291e79ddbb46
i386: Insert ENDBR after __morestack call

Since __morestack will jump back to its callee via indirect call, we
need to insert ENDBR after calling __morestack.

gcc/

PR target/85388
* config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
ENDBR after calling __morestack.

gcc/testsuite/

PR target/85388
* gcc.dg/pr85388-1.c: New test.
* gcc.dg/pr85388-2.c: Likewise.
* gcc.dg/pr85388-3.c: Likewise.
* gcc.dg/pr85388-4.c: Likewise.
* gcc.dg/pr85388-5.c: Likewise.
* gcc.dg/pr85388-6.c: Likewise.

From-SVN: r259475
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr85388-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr85388-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr85388-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr85388-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr85388-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr85388-6.c [new file with mode: 0644]