[Bug inline-asm/43112] 'A' constraint's behavior not compliant with doc under x86-64
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Feb 18 08:56:00 GMT 2010
------- Comment #1 from jakub at gcc dot gnu dot org 2010-02-18 08:56 -------
You just misunderstand it. You'd need a 128-bit int __attribute__((mode (TI)))
value if you want it to mean a pair, because for -m64 registers are 64-bit.
If you use smaller precision type, "A" constraint acts just as a constraint
allowing both ax and dx registers and it is up to the compiler which one it
chooses.
rdtsc returns result in %eax and %edx, even for 64-bit code, so you need to use
unsigned int low, high;
"=a" (low), "=d" (high)
and then combine that into a 64-bit value.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43112
More information about the Gcc-bugs
mailing list