]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
IBM Z: Define STACK_CHECK_MOVING_SP
authorAndreas Krebbel <krebbel@linux.ibm.com>
Thu, 4 Nov 2021 18:37:19 +0000 (19:37 +0100)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Thu, 4 Nov 2021 18:40:33 +0000 (19:40 +0100)
With -fstack-check the stack probes emitted access memory below the
stack pointer.

gcc/ChangeLog:

* config/s390/s390.h (STACK_CHECK_MOVING_SP): New macro
definition.

gcc/config/s390/s390.h

index fb16a455a035f1833839d339d625a8a5a2bfb675..186c5c6200bcf6c41a9dbe0c6b6ed61f48ce160b 100644 (file)
@@ -332,6 +332,11 @@ extern const char *s390_host_detect_local_cpu (int argc, const char **argv);
 
 #define STACK_SIZE_MODE (Pmode)
 
+/* Make the stack pointer to be moved downwards while issuing stack probes with
+   -fstack-check.  We need this to prevent memory below the stack pointer from
+   being accessed.  */
+#define STACK_CHECK_MOVING_SP 1
+
 #ifndef IN_LIBGCC2
 
 /* Width of a word, in units (bytes).  */