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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [cris-peep2-xsrand.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* { dg-do compile { target cris-*-* } } */
2
/* { dg-final { scan-assembler "and.w " } } */
3
/* { dg-final { scan-assembler "and.b " } } */
4
/* { dg-final { scan-assembler-not "and.d" } } */
5
/* { dg-options "-O2" } */
6
 
7
/* Test the "asrandb", "asrandw", "lsrandb" and "lsrandw" peephole2:s
8
   trivially.  */
9
 
10
unsigned int
11
andwlsr (unsigned int x)
12
{
13
  return (x >> 17) & 0x7ff;
14
}
15
 
16
unsigned int
17
andblsr (unsigned int x)
18
{
19
  return (x >> 25) & 0x5f;
20
}
21
 
22
int
23
andwasr (int x)
24
{
25
  return (x >> 17) & 0x7ff;
26
}
27
 
28
int
29
andbasr (int x)
30
{
31
  return (x >> 25) & 0x5f;
32
}

powered by: WebSVN 2.1.0

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