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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [atomic-fence.c] - Rev 689

Compare with Previous | Blame | View Log

/* Test __atomic routines for existence and execution with each valid 
   memory model.  */
/* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
 
 
/* Test that __atomic_{thread,signal}_fence builtins execute.  */
 
main ()
{
  __atomic_thread_fence (__ATOMIC_RELAXED);
  __atomic_thread_fence (__ATOMIC_CONSUME);
  __atomic_thread_fence (__ATOMIC_ACQUIRE);
  __atomic_thread_fence (__ATOMIC_RELEASE);
  __atomic_thread_fence (__ATOMIC_ACQ_REL);
  __atomic_thread_fence (__ATOMIC_SEQ_CST);
 
  __atomic_signal_fence (__ATOMIC_RELAXED);
  __atomic_signal_fence (__ATOMIC_CONSUME);
  __atomic_signal_fence (__ATOMIC_ACQUIRE);
  __atomic_signal_fence (__ATOMIC_RELEASE);
  __atomic_signal_fence (__ATOMIC_ACQ_REL);
  __atomic_signal_fence (__ATOMIC_SEQ_CST);
 
  return 0;
}
 
 

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.