Fix code generation for buildtin_longjmp with CET.
authorIgor Tsimbalist <igor.v.tsimbalist@intel.com>
Mon, 27 Nov 2017 11:54:17 +0000 (12:54 +0100)
committerIgor Tsimbalist <itsimbal@gcc.gnu.org>
Mon, 27 Nov 2017 11:54:17 +0000 (12:54 +0100)
commit39335d1486c5f39182bd0cca6af52a49386319cb
tree3409928bed4c483d33634a4bace037146a604b81
parentbe025a2d99772df9ccea1b8b0aba5833bd8fc32c
Fix code generation for buildtin_longjmp with CET.

According to the description of  inssp instruction from Intel CET it
adusts the shadow stack pointer (ssp) only by value in the range of
[0..255]. As a number of adjustment could be greater than 255 there
should be a loop generated to adjust ssp.

gcc/
* config/i386/i386.md: Add a loop with incssp.
* testsuite/gcc.target/i386/cet-sjlj-1.c: Fix test.
* testsuite/gcc.target/i386/cet-sjlj-4.c: Likewise.

From-SVN: r255164
gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/cet-sjlj-1.c
gcc/testsuite/gcc.target/i386/cet-sjlj-4.c