Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/stack-check-alloca-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
3 /* { dg-require-effective-target supports_stack_clash_protection } */
4
5 #define SIZE y
6 #include "stack-check-alloca.h"
7
8 /* { dg-final { scan-assembler-times {str\s+xzr, \[sp, 1024\]} 2 } } */
9 /* { dg-final { scan-assembler-times {str\s+xzr, \[sp\]} 1 } } */
10
11 /* Dynamic alloca, expect loop, and 2 probes with 1kB offset and 1 at sp.
12 1st probe is inside the loop for the full guard-size allocations, second
13 probe is for the case where residual is zero and the final probe for when
14 residiual is > 1024 bytes. */