Move clang path to __builtin_clz

This commit is contained in:
Beyley Thomas
2023-09-17 00:55:12 -07:00
parent fcf9ed6d35
commit 04756ae9bc

View File

@@ -19,9 +19,7 @@ int getExp(int val)
asm("clz %0, %1\n":"=r"(i):"r"(val&0x3FF)); asm("clz %0, %1\n":"=r"(i):"r"(val&0x3FF));
return 31-i; return 31-i;
#else #else
unsigned int i; return 31 - __builtin_clz(val & 0x3FF);
for (i = 9; (i > 0) && !((val >> i) & 1); --i);
return i;
#endif #endif
} }