1 /* { dg-options "-mthumb -Os" } */
2 /* { dg-require-effective-target arm_thumb2_ok } */
3 /* { dg-final { scan-assembler "ands" } } */
4
5 struct S {
6 int bi_buf;
7 int bi_valid;
8 };
9
10 int tz (struct S* p, int bits, int value)
11 {
12 if (p == 0) return 1;
13 p->bi_valid = bits;
14 p->bi_buf = value & ((1 << bits) - 1);
15 return 0;
16 }