Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mno-bwx -mno-safe-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 ldl $1,0($16)
22 zapnot $1,252,$1
23 bis $17,$1,$17
24 stl $17,0($16)
25
26 without any INSWL or MSKWL instructions and without address masking. */
27
28 /* { dg-final { scan-assembler-times "\\sldl\\s" 1 } } */
29 /* { dg-final { scan-assembler-times "\\sstl\\s" 1 } } */
30 /* { dg-final { scan-assembler-times "\\szapnot\\s\\\$\[0-9\]+,3,\\\$\[0-9\]+\\s" 1 } } */
31 /* { dg-final { scan-assembler-times "\\szapnot\\s\\\$\[0-9\]+,252,\\\$\[0-9\]+\\s" 1 } } */
32 /* { dg-final { scan-assembler-not "\\sbic\\s\\\$\[0-9\]+,7,\\\$\[0-9\]+\\s" } } */
33 /* { dg-final { scan-assembler-not "\\s(?:inswl|mskwl)\\s" } } */