This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/21249] incorrect code generation for rdtsc on x86_64
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Apr 2005 13:11:15 -0000
- Subject: [Bug inline-asm/21249] incorrect code generation for rdtsc on x86_64
- References: <20050427130600.21249.tfautre@pandora.be>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-27 13:11 -------
What do you mean, it is generating wrong code?
Actually you are using inline-asm wrong, try the following instead:
#define rdtsc(low,high) \
__asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
This comes from the kernel.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21249