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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [sparc/] [popc.c] - Rev 691

Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-options "-mcpu=niagara2" } */
int test_popcount(int a)
{
  return __builtin_popcount(a);
}
 
long test_popcountl(long a)
{
  return __builtin_popcountl(a);
}
 
long long test_popcountll(long long a)
{
  return __builtin_popcountll(a);
}
 
/* { dg-final { scan-assembler-times "popc\t%" 3 } } */
 

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.