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-xsrand2.c] - Rev 823

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

/* { dg-do compile { target cris-*-* } } */
/* { dg-final { scan-assembler "and.w -137," } } */
/* { dg-final { scan-assembler "and.b -64," } } */
/* { dg-final { scan-assembler "and.w -139," } } */
/* { dg-final { scan-assembler "and.b -63," } } */
/* { dg-final { scan-assembler-not "and.d" } } */
/* { dg-options "-O2" } */
 
/* PR target/17984.  Test-case based on
   testsuite/gcc.dg/cris-peep2-xsrand.c.  */
 
unsigned int
andwlsr (unsigned int x)
{
  return (x >> 16) & 0xff77;
}
 
unsigned int
andblsr (unsigned int x)
{
  return (x >> 24) & 0xc0;
}
 
int
andwasr (int x)
{
  return (x >> 16) & 0xff75;
}
 
int
andbasr (int x)
{
  return (x >> 24) & 0xc1;
}
 

Go to most recent revision | 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.