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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-final { scan-assembler-not "and.d " } } */
/* { dg-final { scan-assembler-not "move.d " } } */
/* { dg-final { scan-assembler "cLear.b" } } */
/* { dg-final { scan-assembler "movu.b" } } */
/* { dg-final { scan-assembler "and.b" } } */
/* { dg-final { scan-assembler "movu.w" } } */
/* { dg-final { scan-assembler "and.w" } } */
/* { dg-final { scan-assembler "andq" } } */
/* { dg-options "-O2" } */
 
/* Test the "andu" peephole2 trivially, memory operand.  */
 
int
clearb (int x, int *y)
{
  return *y & 0xff00;
}
 
int
andb (int x, int *y)
{
  return *y & 0x3f;
}
 
int
andw (int x, int *y)
{
  return *y & 0xfff;
}
 
int
andq (int x, int *y)
{
  return *y & 0xf0;
}
 
int
andq2 (int x, int *y)
{
  return *y & 0xfff0;
}
 

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.