3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-10-28 04:59:18 -07:00
parent e24481dacd
commit d0dac83143

View file

@ -68,12 +68,17 @@ inline uint64_t _trailing_zeros64(uint64_t x) {
for (; 0 == (x & 1) && r < 64; ++r, x >>= 1); for (; 0 == (x & 1) && r < 64; ++r, x >>= 1);
return r; return r;
} }
#if defined(_WINDOWS) && !defined(_M_ARM) && !defined(_M_ARM64)
// _trailing_zeros32 already defined using intrinsics
#else
inline uint32_t _trailing_zeros32(uint32_t x) { inline uint32_t _trailing_zeros32(uint32_t x) {
uint32_t r = 0; uint32_t r = 0;
for (; 0 == (x & 1) && r < 32; ++r, x >>= 1); for (; 0 == (x & 1) && r < 32; ++r, x >>= 1);
return r; return r;
} }
#endif #endif
#endif
#define _bit_min(x, y) (y + ((x - y) & ((int)(x - y) >> 31))) #define _bit_min(x, y) (y + ((x - y) & ((int)(x - y) >> 31)))