S/390: Fix PR84332 ICE with stack clash protection
commite7ac5daa971b8209175b18428327d3f7302fbe5d
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Aug 2018 07:06:23 +0000 (9 07:06 +0000)
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Aug 2018 07:06:23 +0000 (9 07:06 +0000)
treef338f7e98d354131d75dc1a24163a914cabe35b4
parenta653da730df65424843c770c5cc1c9a4a57a90b9
S/390: Fix PR84332 ICE with stack clash protection

Our implementation of the stack probe requires the probe interval to
be used as displacement in an address operand.  The maximum probe
interval currently is 64k.  This would exceed short displacements.
Trim that value down to 4k if that happens.  This might result in too
many probes being generated only on the oldest supported machine level
z900.

gcc/ChangeLog:

2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>

PR target/84332
* config/s390/s390.c (s390_option_override_internal): Reduce the
stack-clash-protection-probe-interval param if it would be too big
for z900.

gcc/testsuite/ChangeLog:

2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>

PR target/84332
* gcc.target/s390/pr84332.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263441 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/s390/s390.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/pr84332.c [new file with mode: 0644]