From: Andreas Krebbel Date: Thu, 4 Nov 2021 18:37:19 +0000 (+0100) Subject: IBM Z: Define STACK_CHECK_MOVING_SP X-Git-Tag: basepoints/gcc-13~3387 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79fe28d2c4b78562de095c1843d8d3b1a1e7d2d7;p=thirdparty%2Fgcc.git IBM Z: Define STACK_CHECK_MOVING_SP 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. --- diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index fb16a455a035..186c5c6200bc 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -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). */