Debian Codegraph @

gcc/testsuite/gcc.target/riscv/xtheadint-push-pop.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv32gc_xtheadint -mabi=ilp32d" { target { rv32 } } } */
3 /* { dg-options "-march=rv64gc_xtheadint -mabi=lp64d" { target { rv64 } } } */
4
5 extern void f (void);
6
7 __attribute__ ((interrupt))
8 void func_default (void)
9 {
10 f ();
11 }
12
13 __attribute__ ((interrupt ("machine")))
14 void func_machine (void)
15 {
16 f ();
17 }
18
19 /* { dg-final { scan-assembler-times {\mth\.ipush\M} 2 { target { rv32 } } } } */
20 /* { dg-final { scan-assembler-times {\mth\.ipop\M} 2 { target { rv32 } } } } */
21
22
23 __attribute__ ((interrupt ("user")))
24 void func_usr (void)
25 {
26 f ();
27 }
28
29 __attribute__ ((interrupt ("supervisor")))
30 void func_supervisor (void)
31 {
32 f ();
33 }
34
35 /* { dg-final { scan-assembler-not {\mth\.ipush\M} { target { rv64 } } } } */
36 /* { dg-final { scan-assembler-not {\mth\.ipop\M} { target { rv64 } } } } */