Debian Codegraph @

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

raw
1 /* PR target/78904 */
2 /* { dg-do compile { target { ! ia32 } } } */
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 unsigned short pad2;
12 unsigned int pad3;
13 };
14
15 struct S1 test_and (struct S1 a, struct S1 b)
16 {
17 a.val &= b.val;
18
19 return a;
20 }
21
22 /* { dg-final { scan-assembler "\[ \t\]andb" } } */
23
24 struct S1 test_or (struct S1 a, struct S1 b)
25 {
26 a.val |= b.val;
27
28 return a;
29 }
30
31 /* { dg-final { scan-assembler "\[ \t\]orb" } } */
32
33 struct S1 test_xor (struct S1 a, struct S1 b)
34 {
35 a.val ^= b.val;
36
37 return a;
38 }
39
40 /* { dg-final { scan-assembler "\[ \t\]xorb" } } */
41
42 struct S1 test_add (struct S1 a, struct S1 b)
43 {
44 a.val += b.val;
45
46 return a;
47 }
48
49 /* { dg-final { scan-assembler "\[ \t\]addb" } } */
50
51 struct S1 test_sub (struct S1 a, struct S1 b)
52 {
53 a.val -= b.val;
54
55 return a;
56 }
57
58 /* { dg-final { scan-assembler "\[ \t\]subb" } } */