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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [ctztest.c] - Rev 753

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

/* { dg-do run { target { x86_64-*-* && lp64 } } } */
/* { dg-options "-g" } */
 
volatile int vv;
 
__attribute__((noinline, noclone)) long
foo (long x)
{
  long f = __builtin_ctzl (x);
  long g = f;
  asm volatile ("" : "+r" (f));
  vv++;		/* { dg-final { gdb-test 12 "g" "f" } } */
  return f;
}
 
__attribute__((noinline, noclone)) long
bar (long x)
{
  long f = __builtin_ctzl (x);
  long g = f;
  asm volatile ("" : "+r" (f));
  vv++;		/* { dg-final { gdb-test 22 "g" "f" } } */
  return f;
}
 
int
main ()
{
  long x = vv;
  foo (x + 0x1234560UL);
  bar (x + 0x7fff8000UL);
  return 0;
}
 

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.