From: fennecdjay Date: Wed, 7 Feb 2024 21:48:05 +0000 (+0100) Subject: :art: fix x32 compat X-Git-Tag: nightly~100 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=23d1c9e6bdf284a6d628bdc9085767b4aa4de238;p=gwion.git :art: fix x32 compat --- diff --git a/src/emit/emit.c b/src/emit/emit.c index 6b99fe65..77d1109b 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1,3 +1,4 @@ +#include #include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" @@ -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) {