[PATCH, GCC/ARM, 6/10] Clear GPRs inline when calling nscall function
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pr60650-2.c
blobc44d7b5f9d2cb9ebc18e3a9bb7ca443944a9390b
1 /* { dg-do compile } */
2 /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
3 /* { dg-options "-O2 -fno-omit-frame-pointer -march=armv7-a" } */
5 int a, h, j;
6 long long d, e, i;
7 int f;
8 int
9 fn1 (void *p1, int p2)
11 switch (p2)
12 case 8:
14 register int b = *(long long *) p1, c asm ("r2");
15 asm ("%0": "=r" (a), "=r" (c):"r" (b), "r" (0));
16 *(long long *) p1 = c;
20 int
21 fn2 ()
23 int k;
24 k = f;
25 while (1)
27 fn1 (&i, sizeof i);
28 e = d + k;
29 switch (d)
30 case 0:
33 register int l asm ("r4");
34 register int m asm ("r0");
35 asm (" .err .endif\n\t": "=r" (h), "=r" (j):"r" (m),
36 "r"
37 (l));;
38 });