OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [cris-peep2-andu2.c] - Blame information for rev 149

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.