------- Comment #4 from pinskia at gcc dot gnu dot org 2006-03-12 18:58 -------
This is invalid inline-asm:
static inline uint64_t read_time(void)
{
uint64_t a, d;
asm volatile( "rdtsc\n\t"
: "=a" (a), "=d" (d)
);
return (d << 32) | (a & 0xffffffff);
}
-----
The correct way to implement this inline is:
static inline uint64_t read_time(void)
{
uint32_t a, d;
asm volatile( "rdtsc\n\t"
: "=a" (a), "=d" (d)
);
return (((uint64_t)d) << 32) | (((uint64_t)a) & 0xffffffff);
}
After that it works :).
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |minor
Keywords| |error-recovery, ice-on-
| |invalid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26655