OSDN Git Service

* gcc.dg/intmax_t-1.c: Remove mmix-*-* from dg-error statement.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / cris-peep2-andu2.c
1 /* { dg-do compile { target cris-*-* } } */
2 /* { dg-final { scan-assembler "movu.w \\\$r10,\\\$r" } } */
3 /* { dg-final { scan-assembler "and.w 2047,\\\$r" } } */
4 /* { dg-final { scan-assembler-not "move.d \\\$r10,\\\$r" } } */
5 /* { dg-final { scan-assembler "movu.b \\\$r10,\\\$r" } } */
6 /* { dg-final { scan-assembler "and.b 95,\\\$r" } } */
7 /* { dg-final { scan-assembler "andq -2,\\\$r" } } */
8 /* { dg-options "-O2" } */
9
10 /* Test the "andu" peephole2 trivially, register operand.  */
11
12 unsigned int
13 and_peep2_hi (unsigned int y, unsigned int *x)
14 {
15   *x = y & 0x7ff;
16   return y;
17 }
18
19 unsigned int
20 and_peep2_qi (unsigned int y, unsigned int *x)
21 {
22   *x = y & 0x5f;
23   return y;
24 }
25
26
27 unsigned int
28 and_peep2_q (unsigned int y, unsigned int *x)
29 {
30   *x = y & 0xfe;
31   return y;
32 }