Debian Codegraph @

gcc/testsuite/gcc.target/arc/interrupt-6.c

raw
1 /* { dg-do compile } */
2 /* { dg-skip-if "Not available for ARCv1" { arc700 || arc6xx } } */
3 /* { dg-options "-O2 -mirq-ctrl-saved=r0-ilink" } */
4
5 /* Check if ilink is recognized. Check how FP and BLINK are saved.
6 BLINK is saved last on the stack because the IRQ autosave will do
7 first r0-ilink. To avoid this ABI exception, one needs to autosave
8 always blink when using the IRQ autosave feature. */
9
10 extern int bar (void *);
11
12 void __attribute__ ((interrupt("ilink")))
13 foo(void)
14 {
15 int *p = __builtin_alloca (10);
16 bar (p);
17 }
18 /* { dg-final { scan-assembler-not ".*fp,\\\[sp" } } */
19 /* { dg-final { scan-assembler "pop_s.*blink" } } */
20 /* { dg-final { scan-assembler "push_s.*blink" } } */