[Bug target/26655] ICE in ix86_secondary_memory_needed, at config/i386/i386.c:16446
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Mar 12 18:58:00 GMT 2006
------- 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
More information about the Gcc-bugs
mailing list