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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [cris/] [peep2-andu2.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do assemble } */
2
/* { dg-final { scan-assembler "movu.w \\\$r10,\\\$" } } */
3
/* { dg-final { scan-assembler "and.w 2047,\\\$" } } */
4
/* { dg-final { scan-assembler-not "move.d \\\$r10,\\\$" } } */
5
/* { dg-final { scan-assembler "movu.b \\\$r10,\\\$" } } */
6
/* { dg-final { scan-assembler "and.b 95,\\\$" } } */
7
/* { dg-final { scan-assembler "andq -2,\\\$" } } */
8
/* { dg-options "-O2 -save-temps" } */
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.