aboutsummaryrefslogtreecommitdiff
path: root/gcc/explow.h
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.ibm.com>2020-05-14 08:16:27 +0200
committerAndreas Krebbel <krebbel@linux.ibm.com>2020-05-14 08:16:27 +0200
commitd3e5bae174d9d2ed115a364d5b404d179458a622 (patch)
tree4bd42f68a9f4e25b5474abec76d2051be6f10613 /gcc/explow.h
parentf806a768e1400ec1115c3a52b1e207bb71b4ad45 (diff)
downloadgcc-d3e5bae174d9d2ed115a364d5b404d179458a622.zip
gcc-d3e5bae174d9d2ed115a364d5b404d179458a622.tar.gz
gcc-d3e5bae174d9d2ed115a364d5b404d179458a622.tar.bz2
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.
Diffstat (limited to 'gcc/explow.h')
-rw-r--r--gcc/explow.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/explow.h b/gcc/explow.h
index cc44bf8..0df8c62 100644
--- a/gcc/explow.h
+++ b/gcc/explow.h
@@ -69,6 +69,10 @@ extern void anti_adjust_stack (rtx);
/* Add some bytes to the stack while probing it. An rtx says how many. */
extern void anti_adjust_stack_and_probe (rtx, bool);
+/* Add some bytes to the stack while probing it. An rtx says how
+ many. Add additional probes to prevent stack clashing attacks. */
+extern void anti_adjust_stack_and_probe_stack_clash (rtx);
+
/* Support for building allocation/probing loops for stack-clash
protection of dyamically allocated stack space. */
extern void compute_stack_clash_protection_loop_data (rtx *, rtx *, rtx *,