From 9ee2ef5108102ce2f5851fba06da3dcab585f501 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 10 Apr 2025 15:35:39 +1000 Subject: [PATCH] py/emitinlinerv32: Move include of asmrv32.h to within feature guard. Otherwise, when compiling on 16-bit systems (where `mp_uint_t` is 16 bits wide) the compiler warns about "left shift count >= width of type", from the static inline functions that have RV32_ENCODE_TYPE_xxx macros which do a lot of bit shifting. Signed-off-by: Damien George --- py/emitinlinerv32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py/emitinlinerv32.c b/py/emitinlinerv32.c index a9a81ddf16..a539242b84 100644 --- a/py/emitinlinerv32.c +++ b/py/emitinlinerv32.c @@ -30,12 +30,13 @@ #include #include -#include "py/asmrv32.h" #include "py/emit.h" #include "py/misc.h" #if MICROPY_EMIT_INLINE_RV32 +#include "py/asmrv32.h" + typedef enum { // define rules with a compile function #define DEF_RULE(rule, comp, kind, ...) PN_##rule,