Debian Codegraph @

gcc/testsuite/g++.target/riscv/mvc-symbols3.C

raw
1 /* { dg-do compile } */
2 /* { dg-require-ifunc "" } */
3 /* { dg-options "-O0 -march=rv64gc -mabi=lp64" } */
4
5 __attribute__((target_clones("default", "arch=+v", "arch=+zba,+zbb")))
6 int foo ();
7
8 __attribute__((target_clones("arch=+zba,+zbb", "arch=+v", "default")))
9 int foo (int);
10
11 int bar()
12 {
13 return foo ();
14 }
15
16 int bar(int x)
17 {
18 return foo (x);
19 }
20
21 /* When updating any of the symbol names in these tests, make sure to also
22 update any tests for their absence in mvc-symbolsN.C */
23
24 /* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0\"" } } */
25 /* { dg-final { scan-assembler-times ".option arch, rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_v1p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0" 0 } } */
26 /* { dg-final { scan-assembler-times ".option arch, rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zba1p0_zbb1p0" 0 } } */
27
28 /* { dg-final { scan-assembler-times "\n_Z3foov\.default:\n" 0 } } */
29 /* { dg-final { scan-assembler-times "\n_Z3foov\.arch__v:\n" 0 } } */
30 /* { dg-final { scan-assembler-times "\n_Z3foov\.arch__zba__zbb:\n" 0 } } */
31 /* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
32 /* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov(?:@plt)?\n" 1 } } */
33 /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, @gnu_indirect_function\n" 1 } } */
34 /* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */
35
36 /* { dg-final { scan-assembler-times "\n_Z3fooi\.default:\n" 0 } } */
37 /* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__v:\n" 0 } } */
38 /* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__zba__zbb:\n" 0 } } */
39 /* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 1 } } */
40 /* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi(?:@plt)?\n" 1 } } */
41 /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, @gnu_indirect_function\n" 1 } } */
42 /* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 1 } } */