Make anti_adjust_stack_and_probe_stack_clash extern and use it for Z
authorAndreas Krebbel <krebbel@linux.ibm.com>
Thu, 14 May 2020 06:16:27 +0000 (08:16 +0200)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Thu, 14 May 2020 06:16:27 +0000 (08:16 +0200)
commitd3e5bae174d9d2ed115a364d5b404d179458a622
tree4bd42f68a9f4e25b5474abec76d2051be6f10613
parentf806a768e1400ec1115c3a52b1e207bb71b4ad45
Make anti_adjust_stack_and_probe_stack_clash extern and use it for Z

When compiling with -mbackchain -fstack-clash-protection currently no
probes are emitted.  This patch adjusts the "allocate_stack" expander
to call anti_adjust_stack_and_probe_stack_clash when needed. In order
to do this I had to export that function from explow.c.

Ok for mainline?

gcc/ChangeLog:

2020-05-14  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/s390.md ("allocate_stack"): Call
anti_adjust_stack_and_probe_stack_clash when stack clash
protection is enabled.
* explow.c (anti_adjust_stack_and_probe_stack_clash): Remove
prototype. Remove static.
* explow.h (anti_adjust_stack_and_probe_stack_clash): Add
prototype.

gcc/testsuite/ChangeLog:

2020-05-14  Andreas Krebbel  <krebbel@linux.ibm.com>

* gcc.target/s390/stack-clash-3.c: New test.
gcc/ChangeLog
gcc/config/s390/s390.md
gcc/explow.c
gcc/explow.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/stack-clash-3.c [new file with mode: 0644]