[compiler-rt] r315306 - [XRay][compiler-rt] Fix rdtscp support check for x86_64
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 10 05:44:20 PDT 2017
Author: dberris
Date: Tue Oct 10 05:44:20 2017
New Revision: 315306
URL: http://llvm.org/viewvc/llvm-project?rev=315306&view=rev
Log:
[XRay][compiler-rt] Fix rdtscp support check for x86_64
Follow-up to D29438.
Modified:
compiler-rt/trunk/lib/xray/xray_x86_64.cc
Modified: compiler-rt/trunk/lib/xray/xray_x86_64.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_x86_64.cc?rev=315306&r1=315305&r2=315306&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_x86_64.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_x86_64.cc Tue Oct 10 05:44:20 2017
@@ -258,9 +258,9 @@ bool probeRequiredCPUFeatures() XRAY_NEV
// We check whether rdtscp support is enabled. According to the x86_64 manual,
// level should be set at 0x80000001, and we should have a look at bit 27 in
- // EDX. That's 0x8000000 (or 1u << 26).
+ // EDX. That's 0x8000000 (or 1u << 27).
__get_cpuid(0x80000001, &EAX, &EBX, &ECX, &EDX);
- if (!(EDX & (1u << 26))) {
+ if (!(EDX & (1u << 27))) {
Report("Missing rdtscp support.\n");
return false;
}
More information about the llvm-commits
mailing list