Skip to content

Commit

Permalink
🎨 fix x32 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
fennecdjay committed Feb 7, 2024
1 parent 87e5f90 commit 23d1c9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/emit/emit.c
@@ -1,3 +1,4 @@
#include <limits.h>
#include "gwion_util.h"
#include "gwion_ast.h"
#include "gwion_env.h"
Expand Down Expand Up @@ -622,7 +623,7 @@ ANN static m_bool emit_prim_range(const Emitter emit, Range **data) {
}

static inline m_uint int2pow2(const m_uint x) {
return x == 1 ? 2 : 1<<(64-__builtin_clzl(x));
return x == 1 ? 2 : 1<<((CHAR_BIT * sizeof(m_uint))-__builtin_clzl(x));
}

ANN static m_bool emit_prim_dict(const Emitter emit, Exp* *data) {
Expand Down

0 comments on commit 23d1c9e

Please sign in to comment.