Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/stack-check-prologue-17.c

raw
1 /* { dg-options "-O2 -fstack-clash-protection -fomit-frame-pointer --param stack-clash-protection-guard-size=12 -fno-stack-protector" } */
2 /* { dg-final { check-function-bodies "**" "" } } */
3
4 void f(int, ...);
5 void g();
6
7 /*
8 ** test1:
9 ** ...
10 ** str x30, \[sp\]
11 ** sub sp, sp, #1024
12 ** cbnz w0, .*
13 ** bl g
14 ** ...
15 */
16 int test1(int z) {
17 __uint128_t x = 0;
18 int y[0x400];
19 if (z)
20 {
21 f(0, 0, 0, 0, 0, 0, 0, &y,
22 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
23 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
24 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
25 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x);
26 }
27 g();
28 return 1;
29 }
30
31 /*
32 ** test2:
33 ** ...
34 ** str x30, \[sp\]
35 ** sub sp, sp, #1040
36 ** str xzr, \[sp, #?1024\]
37 ** cbnz w0, .*
38 ** bl g
39 ** ...
40 */
41 int test2(int z) {
42 __uint128_t x = 0;
43 int y[0x400];
44 if (z)
45 {
46 f(0, 0, 0, 0, 0, 0, 0, &y,
47 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
48 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
49 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
50 x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
51 x);
52 }
53 g();
54 return 1;
55 }