summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-04-10 15:35:39 +1000
committerDamien George <damien@micropython.org>2025-04-14 11:13:19 +1000
commit9ee2ef5108102ce2f5851fba06da3dcab585f501 (patch)
tree06615feae48beca4d3c672dd37ddf3e36c787017 /py
parent0b3ad98ea97bc504bb594639f5fcced5b5397eec (diff)
downloadmicropython-9ee2ef5108102ce2f5851fba06da3dcab585f501.tar.gz
micropython-9ee2ef5108102ce2f5851fba06da3dcab585f501.zip
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 <damien@micropython.org>
Diffstat (limited to 'py')
-rw-r--r--py/emitinlinerv32.c3
1 files changed, 2 insertions, 1 deletions
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 <stdio.h>
#include <string.h>
-#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,