diff options
Diffstat (limited to '')
| -rw-r--r-- | src/common/x64/cpu_wait.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/common/x64/cpu_wait.cpp b/src/common/x64/cpu_wait.cpp index 1fab0bfe8..cfeef6a3d 100644 --- a/src/common/x64/cpu_wait.cpp +++ b/src/common/x64/cpu_wait.cpp | |||
| @@ -33,16 +33,13 @@ __forceinline static void TPAUSE() { | |||
| 33 | } | 33 | } |
| 34 | #else | 34 | #else |
| 35 | static u64 FencedRDTSC() { | 35 | static u64 FencedRDTSC() { |
| 36 | u64 result; | 36 | u64 eax; |
| 37 | u64 edx; | ||
| 37 | asm volatile("lfence\n\t" | 38 | asm volatile("lfence\n\t" |
| 38 | "rdtsc\n\t" | 39 | "rdtsc\n\t" |
| 39 | "shl $32, %%rdx\n\t" | 40 | "lfence\n\t" |
| 40 | "or %%rdx, %0\n\t" | 41 | : "=a"(eax), "=d"(edx)); |
| 41 | "lfence" | 42 | return (edx << 32) | eax; |
| 42 | : "=a"(result) | ||
| 43 | : | ||
| 44 | : "rdx", "memory", "cc"); | ||
| 45 | return result; | ||
| 46 | } | 43 | } |
| 47 | 44 | ||
| 48 | static void TPAUSE() { | 45 | static void TPAUSE() { |