summaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/hp-timing.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64/hp-timing.h')
-rw-r--r--sysdeps/x86_64/hp-timing.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/sysdeps/x86_64/hp-timing.h b/sysdeps/x86_64/hp-timing.h
index e132dacab6..89501fc3f4 100644
--- a/sysdeps/x86_64/hp-timing.h
+++ b/sysdeps/x86_64/hp-timing.h
@@ -17,15 +17,23 @@
<http://www.gnu.org/licenses/>. */
#ifndef _HP_TIMING_H
+#define _HP_TIMING_H 1
-/* We can use some of the i686 implementation without changes. */
-# include <sysdeps/i386/i686/hp-timing.h>
+/* We always assume having the timestamp register. */
+#define HP_TIMING_AVAIL (1)
+
+/* We indeed have inlined functions. */
+#define HP_TIMING_INLINE (1)
+
+/* We use 64bit values for the times. */
+typedef unsigned long long int hp_timing_t;
/* The "=A" constraint used in 32-bit mode does not work in 64-bit mode. */
-# undef HP_TIMING_NOW
-# define HP_TIMING_NOW(Var) \
+#define HP_TIMING_NOW(Var) \
({ unsigned int _hi, _lo; \
asm volatile ("rdtsc" : "=a" (_lo), "=d" (_hi)); \
(Var) = ((unsigned long long int) _hi << 32) | _lo; })
+#include <hp-timing-common.h>
+
#endif /* hp-timing.h */