Skip to content

Commit f157cbe

Browse files
committed
Address review comments.
1 parent f73b344 commit f157cbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/lib/xray/xray_tsc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ namespace __xray {
9696
inline bool probeRequiredCPUFeatures() XRAY_NEVER_INSTRUMENT { return true; }
9797

9898
ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
99-
#if defined(__clang__)
99+
#if __has_builtin(__builtin_readcyclecounter)
100100
return __builtin_readcyclecounter();
101101
#else
102102
uint64_t Cycles;
103-
asm volatile("stckf %0" : /* No output. */ : "Q"(Cycles) : "cc");
103+
asm volatile("stckf %0" : : "Q"(Cycles) : "cc");
104104
return Cycles;
105105
#endif
106106
}

0 commit comments

Comments
 (0)