diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-28 15:09:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 15:09:35 +0200 |
commit | 40efd2ab56c2296da4524085a133021f7731e67f (patch) | |
tree | a43b51a4056ad7664346a63f145c889da1f59d16 /src/common/x64/native_clock.cpp | |
parent | Merge pull request #10002 from german77/log (diff) | |
parent | telemetry: Add waitpkg instruction (diff) | |
download | yuzu-40efd2ab56c2296da4524085a133021f7731e67f.tar yuzu-40efd2ab56c2296da4524085a133021f7731e67f.tar.gz yuzu-40efd2ab56c2296da4524085a133021f7731e67f.tar.bz2 yuzu-40efd2ab56c2296da4524085a133021f7731e67f.tar.lz yuzu-40efd2ab56c2296da4524085a133021f7731e67f.tar.xz yuzu-40efd2ab56c2296da4524085a133021f7731e67f.tar.zst yuzu-40efd2ab56c2296da4524085a133021f7731e67f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/x64/native_clock.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp index 76c66e7ee..277b00662 100644 --- a/src/common/x64/native_clock.cpp +++ b/src/common/x64/native_clock.cpp @@ -27,16 +27,13 @@ __forceinline static u64 FencedRDTSC() { } #else static u64 FencedRDTSC() { - u64 result; + u64 eax; + u64 edx; asm volatile("lfence\n\t" "rdtsc\n\t" - "shl $32, %%rdx\n\t" - "or %%rdx, %0\n\t" - "lfence" - : "=a"(result) - : - : "rdx", "memory", "cc"); - return result; + "lfence\n\t" + : "=a"(eax), "=d"(edx)); + return (edx << 32) | eax; } #endif |