Author: tkreuzer
Date: Mon Oct 20 07:17:06 2008
New Revision: 36840
URL:
http://svn.reactos.org/svn/reactos?rev=36840&view=rev
Log:
fix __rdtsc on amd64 build, "=A" doesn't work.
Modified:
branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h
Modified: branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h [iso-8859-1] Mon Oct 20
07:17:06 2008
@@ -1054,9 +1054,15 @@
static __inline__ __attribute__((always_inline)) unsigned long long __rdtsc(void)
{
+#ifdef _M_AMD64
+ unsigned long long low, high;
+ __asm__ __volatile__("rdtsc" : "=a"(low), "=d"(high));
+ return low | (high << 32);
+#else
unsigned long long retval;
__asm__ __volatile__("rdtsc" : "=A"(retval));
return retval;
+#endif
}
static __inline__ __attribute__((always_inline)) void __writeeflags(uintptr_t Value)