summaryrefslogtreecommitdiff
path: root/py/compile.c
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2024-06-08 11:00:08 +0200
committerDamien George <damien@micropython.org>2024-06-21 15:06:07 +1000
commit8338f663523d675847b8c0b9b92977b76995de8f (patch)
tree7058f782f01fd1a211a18c73456565f4f26f77aa /py/compile.c
parent5a778ebc378d7a1bc9716177950c9e8ac000bb56 (diff)
py/asmrv32: Add RISC-V RV32IMC native code emitter.
This adds a native code generation backend for RISC-V RV32I CPUs, currently limited to the I, M, and C instruction sets. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'py/compile.c')
-rw-r--r--py/compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/compile.c b/py/compile.c
index 62757de3c..9b012f878 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -102,6 +102,7 @@ static const emit_method_table_t *emit_native_table[] = {
&emit_native_thumb_method_table,
&emit_native_xtensa_method_table,
&emit_native_xtensawin_method_table,
+ &emit_native_rv32_method_table,
};
#elif MICROPY_EMIT_NATIVE
@@ -118,6 +119,8 @@ static const emit_method_table_t *emit_native_table[] = {
#define NATIVE_EMITTER(f) emit_native_xtensa_##f
#elif MICROPY_EMIT_XTENSAWIN
#define NATIVE_EMITTER(f) emit_native_xtensawin_##f
+#elif MICROPY_EMIT_RV32
+#define NATIVE_EMITTER(f) emit_native_rv32_##f
#else
#error "unknown native emitter"
#endif