The following inline assembly is generating correct code on x86 but not on x86_64 (Counter is a uint64_t):
asm volatile ( "rdtsc" : "=A" (Counter) ); -- Summary: incorrect code generation for rdtsc on x86_64 Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: inline-asm AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tfautre at pandora dot be CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21249