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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [ppc-and-1.c] - Rev 149

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

/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-options "-O2" } */
 
/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,0,0,30"  } } */
/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,0,29,30"  } } */
/* { dg-final { scan-assembler-not "rldicr" } } */
 
/* Origin:Pete Steinmetz <steinmtz@us.ibm.com> */
 
/* PR 16457 - use rlwinm insn.  */
 
char *foo1 (char *p, unsigned int x)
{
  return p - (x & ~1);
}
 
char *foo2 (char *p, unsigned int x)
{
  return p - (x & 6);
}
 

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.