Re: "gcc -O3" breaks rdtsc ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tim612 writes:
 > 
 > I use a standard sort of macro for invoking the rdtsc instruction from my
 > C++ code, and it seems wo work fine until I turn on the "-O3" optimization
 > flag. With this flag enabled, the values returned by this macro seem to be
 > garbage.
 > 
 >     #define RDTSCLL(_x)          __asm__ __volatile__ ("rdtsc" : "=A" (_x));
 > 
 > My machine:
 >     Processor: AMD Opteron(tm) Processor 248
 >     Host type: x86_64-linux
 >     GCC version: gcc (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)
 > 
 > Any ideas?

Can you supply a test case?

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux