This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug inline-asm/43112] 'A' constraint's behavior not compliant with doc under x86-64



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]