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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [cris/] [peep2-xsrand.c] - Rev 691

Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-final { scan-assembler "and.w " } } */
/* { dg-final { scan-assembler "and.b " } } */
/* { dg-final { scan-assembler-not "and.d" } } */
/* { dg-options "-O2" } */
 
/* Test the "asrandb", "asrandw", "lsrandb" and "lsrandw" peephole2:s
   trivially.  */
 
unsigned int
andwlsr (unsigned int x)
{
  return (x >> 17) & 0x7ff;
}
 
unsigned int
andblsr (unsigned int x)
{
  return (x >> 25) & 0x5f;
}
 
int
andwasr (int x)
{
  return (x >> 17) & 0x7ff;
}
 
int
andbasr (int x)
{
  return (x >> 25) & 0x5f;
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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