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 unsigned short pad2;
12 };
13
test_and(struct S1 a,struct S1 b)14 struct S1 test_and (struct S1 a, struct S1 b)
15 {
16 a.val &= b.val;
17
18 return a;
19 }
20
21 /* { dg-final { scan-assembler "\[ \t\]andb" } } */
22
test_or(struct S1 a,struct S1 b)23 struct S1 test_or (struct S1 a, struct S1 b)
24 {
25 a.val |= b.val;
26
27 return a;
28 }
29
30 /* { dg-final { scan-assembler "\[ \t\]orb" } } */
31
test_xor(struct S1 a,struct S1 b)32 struct S1 test_xor (struct S1 a, struct S1 b)
33 {
34 a.val ^= b.val;
35
36 return a;
37 }
38
39 /* { dg-final { scan-assembler "\[ \t\]xorb" } } */
40
test_add(struct S1 a,struct S1 b)41 struct S1 test_add (struct S1 a, struct S1 b)
42 {
43 a.val += b.val;
44
45 return a;
46 }
47
48 /* { dg-final { scan-assembler "\[ \t\]addb" } } */
49