Fix build using clang-cl on windows and improve driver detection (#129)

This commit is contained in:
Jun Bo Bi 2022-09-04 17:15:40 -04:00 committed by GitHub
parent 4ed18a65c3
commit a54a3ec74e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 9 deletions

View file

@ -110,7 +110,8 @@ uint64 PPCTimer_tscToMicroseconds(uint64 us)
uint64 remainder;
#if _MSC_VER < 1923
#if _MSC_VER < 1923 || defined(__clang__)
const uint64 microseconds = udiv128(r.low, r.high, _rdtscFrequency, &remainder);
#else
const uint64 microseconds = _udiv128(r.high, r.low, _rdtscFrequency, &remainder);
@ -158,7 +159,7 @@ uint64 PPCTimer_getFromRDTSC()
#endif
uint64 remainder;
#if _MSC_VER < 1923
#if _MSC_VER < 1923 || defined(__clang__)
uint64 elapsedTick = udiv128(_rdtscAcc.low, _rdtscAcc.high, _rdtscFrequency, &remainder);
#else
uint64 elapsedTick = _udiv128(_rdtscAcc.high, _rdtscAcc.low, _rdtscFrequency, &remainder);