]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.target/aarch64/sve/pcs/saves_4_be.c
aarch64: Treat p12-p15 as call-preserved in SVE PCS functions
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / pcs / saves_4_be.c
CommitLineData
c600df9a
RS
1/* { dg-do compile } */
2/* { dg-options "-O -mbig-endian -fno-stack-clash-protection -g" } */
2171a920 3/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
c600df9a
RS
4
5void standard_callee (__SVInt8_t *);
6
7/*
8** calls_standard:
9** addvl sp, sp, #-1
10** (
11** stp x29, x30, \[sp, -16\]!
12** |
13** sub sp, sp, #?16
14** stp x29, x30, \[sp\]
15** )
16** mov x29, sp
cb26919c 17** addvl sp, sp, #-18
c600df9a
RS
18** str p4, \[sp\]
19** str p5, \[sp, #1, mul vl\]
20** str p6, \[sp, #2, mul vl\]
21** str p7, \[sp, #3, mul vl\]
22** str p8, \[sp, #4, mul vl\]
23** str p9, \[sp, #5, mul vl\]
24** str p10, \[sp, #6, mul vl\]
25** str p11, \[sp, #7, mul vl\]
cb26919c
RS
26** str p12, \[sp, #8, mul vl\]
27** str p13, \[sp, #9, mul vl\]
28** str p14, \[sp, #10, mul vl\]
29** str p15, \[sp, #11, mul vl\]
c600df9a 30** ptrue p0\.b, all
cb26919c
RS
31** st1d z8\.d, p0, \[sp, #2, mul vl\]
32** st1d z9\.d, p0, \[sp, #3, mul vl\]
33** st1d z10\.d, p0, \[sp, #4, mul vl\]
34** st1d z11\.d, p0, \[sp, #5, mul vl\]
35** st1d z12\.d, p0, \[sp, #6, mul vl\]
36** st1d z13\.d, p0, \[sp, #7, mul vl\]
c600df9a 37** addvl x11, sp, #16
cb26919c
RS
38** st1d z14\.d, p0, \[x11, #-8, mul vl\]
39** st1d z15\.d, p0, \[x11, #-7, mul vl\]
40** str z16, \[sp, #10, mul vl\]
41** str z17, \[sp, #11, mul vl\]
42** str z18, \[sp, #12, mul vl\]
43** str z19, \[sp, #13, mul vl\]
44** str z20, \[sp, #14, mul vl\]
45** str z21, \[sp, #15, mul vl\]
46** str z22, \[sp, #16, mul vl\]
47** str z23, \[sp, #17, mul vl\]
48** addvl x0, sp, #18
c600df9a
RS
49** add x0, x0, #?16
50** bl standard_callee
51** ptrue p0\.b, all
cb26919c
RS
52** ld1d z8\.d, p0/z, \[sp, #2, mul vl\]
53** ld1d z9\.d, p0/z, \[sp, #3, mul vl\]
54** ld1d z10\.d, p0/z, \[sp, #4, mul vl\]
55** ld1d z11\.d, p0/z, \[sp, #5, mul vl\]
56** ld1d z12\.d, p0/z, \[sp, #6, mul vl\]
57** ld1d z13\.d, p0/z, \[sp, #7, mul vl\]
c600df9a 58** addvl x11, sp, #16
cb26919c
RS
59** ld1d z14\.d, p0/z, \[x11, #-8, mul vl\]
60** ld1d z15\.d, p0/z, \[x11, #-7, mul vl\]
61** ldr z16, \[sp, #10, mul vl\]
62** ldr z17, \[sp, #11, mul vl\]
63** ldr z18, \[sp, #12, mul vl\]
64** ldr z19, \[sp, #13, mul vl\]
65** ldr z20, \[sp, #14, mul vl\]
66** ldr z21, \[sp, #15, mul vl\]
67** ldr z22, \[sp, #16, mul vl\]
68** ldr z23, \[sp, #17, mul vl\]
c600df9a
RS
69** ldr p4, \[sp\]
70** ldr p5, \[sp, #1, mul vl\]
71** ldr p6, \[sp, #2, mul vl\]
72** ldr p7, \[sp, #3, mul vl\]
73** ldr p8, \[sp, #4, mul vl\]
74** ldr p9, \[sp, #5, mul vl\]
75** ldr p10, \[sp, #6, mul vl\]
76** ldr p11, \[sp, #7, mul vl\]
cb26919c
RS
77** ldr p12, \[sp, #8, mul vl\]
78** ldr p13, \[sp, #9, mul vl\]
79** ldr p14, \[sp, #10, mul vl\]
80** ldr p15, \[sp, #11, mul vl\]
81** addvl sp, sp, #18
c600df9a
RS
82** (
83** ldp x29, x30, \[sp\], 16
84** addvl sp, sp, #1
85** |
86** ldp x29, x30, \[sp\]
87** addvl sp, sp, #1
88** add sp, sp, #?16
89** )
90** ret
91*/
92void calls_standard (__SVInt8_t x) { __SVInt8_t tmp; standard_callee (&tmp); }