1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-03 04:24:11 +01:00

[util] Fix compiling with clang/clang-cl

This commit is contained in:
Joshua Ashton 2019-08-06 22:22:58 +01:00 committed by Philip Rebohle
parent 590834660e
commit d579f07238

View File

@ -29,11 +29,11 @@ namespace dxvk::bit {
} }
inline uint32_t tzcnt(uint32_t n) { inline uint32_t tzcnt(uint32_t n) {
#if defined(_MSC_VER) #if defined(_MSC_VER) && !defined(__clang__)
return _tzcnt_u32(n); return _tzcnt_u32(n);
#elif defined(__BMI__) #elif defined(__BMI__)
return __tzcnt_u32(n); return __tzcnt_u32(n);
#elif defined(__GNUC__) #elif defined(__GNUC__) || defined(__clang__)
uint32_t res; uint32_t res;
uint32_t tmp; uint32_t tmp;
asm ( asm (