Fix Clang build.

This commit is contained in:
Mike Pall
2020-07-02 01:24:39 +02:00
parent 18eef08fb8
commit 384d6d56f4
8 changed files with 10 additions and 10 deletions

View File

@@ -79,7 +79,7 @@ static void strscan_double(uint64_t x, TValue *o, int32_t ex2, int32_t neg)
/* Avoid double rounding for denormals. */
if (LJ_UNLIKELY(ex2 <= -1075 && x != 0)) {
/* NYI: all of this generates way too much code on 32 bit CPUs. */
#if defined(__GNUC__) && LJ_64
#if (defined(__GNUC__) || defined(__clang__)) && LJ_64
int32_t b = (int32_t)(__builtin_clzll(x)^63);
#else
int32_t b = (x>>32) ? 32+(int32_t)lj_fls((uint32_t)(x>>32)) :