1  /* { dg-do compile } */
       2  /* { dg-options "-O0" } */
       3  
       4  #include <x86intrin.h>
       5  
       6  extern unsigned long long int curr_deadline;
       7  extern void bar (void);
       8  
       9  __attribute__ ((target("general-regs-only")))
      10  void
      11  foo1 (void)
      12  {
      13    if (__rdtsc () < curr_deadline)
      14      return; 
      15    bar ();
      16  }
      17  
      18  __attribute__ ((target("general-regs-only")))
      19  void
      20  foo2 (unsigned int *p)
      21  {
      22    if (__rdtscp (p) < curr_deadline)
      23      return; 
      24    bar ();
      25  }