From 23d1c9e6bdf284a6d628bdc9085767b4aa4de238 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Wed, 7 Feb 2024 22:48:05 +0100 Subject: [PATCH] :art: fix x32 compat --- src/emit/emit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.43.0