Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr78904-1a.c

raw
1 /* PR target/78904 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -masm=att" } */
4 /* { dg-final { scan-assembler-not "movzbl" } } */
5 /* { dg-final { scan-assembler-not "movb" } } */
6
7 struct S1
8 {
9 unsigned char pad1;
10 unsigned char val;
11 };
12
13 struct S1 test_and (struct S1 a, struct S1 b)
14 {
15 a.val &= b.val;
16
17 return a;
18 }
19
20 /* { dg-final { scan-assembler "\[ \t\]andb" } } */
21
22 struct S1 test_or (struct S1 a, struct S1 b)
23 {
24 a.val |= b.val;
25
26 return a;
27 }
28
29 /* { dg-final { scan-assembler "\[ \t\]orb" } } */
30
31 struct S1 test_xor (struct S1 a, struct S1 b)
32 {
33 a.val ^= b.val;
34
35 return a;
36 }
37
38 /* { dg-final { scan-assembler "\[ \t\]xorb" } } */
39
40 struct S1 test_add (struct S1 a, struct S1 b)
41 {
42 a.val += b.val;
43
44 return a;
45 }
46
47 /* { dg-final { scan-assembler "\[ \t\]addb" } } */
48
49 struct S1 test_sub (struct S1 a, struct S1 b)
50 {
51 a.val -= b.val;
52
53 return a;
54 }
55
56 /* { dg-final { scan-assembler "\[ \t\]subb" } } */