Debian Codegraph @

gcc/testsuite/gcc.target/alpha/stwa-bwa.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mno-bwx -msafe-bwa" } */
3 /* { dg-skip-if "" { *-*-* } { "-O0" } } */
4
5 typedef union
6 {
7 int i;
8 short c;
9 }
10 short_a;
11
12 void
13 stwa (short_a *p, short v)
14 {
15 p->c = v;
16 }
17
18 /* Expect assembly such as:
19
20 zapnot $17,3,$17
21 $L2:
22 ldl_l $1,0($16)
23 zapnot $1,252,$1
24 bis $17,$1,$1
25 stl_c $1,0($16)
26 beq $1,$L2
27
28 without any INSWL or MSKWL instructions and without address masking. */
29
30 /* { dg-final { scan-assembler-times "\\sldl_l\\s" 1 } } */
31 /* { dg-final { scan-assembler-times "\\sstl_c\\s" 1 } } */
32 /* { dg-final { scan-assembler-times "\\szapnot\\s\\\$\[0-9\]+,3,\\\$\[0-9\]+\\s" 1 } } */
33 /* { dg-final { scan-assembler-times "\\szapnot\\s\\\$\[0-9\]+,252,\\\$\[0-9\]+\\s" 1 } } */
34 /* { dg-final { scan-assembler-not "\\sbic\\s\\\$\[0-9\]+,7,\\\$\[0-9\]+\\s" } } */
35 /* { dg-final { scan-assembler-not "\\s(?:inswl|mskwl)\\s" } } */