summaryrefslogtreecommitdiffstatshomepage
path: root/py/emit.h
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/emit.h
parent5a778ebc378d7a1bc9716177950c9e8ac000bb56 (diff)
downloadmicropython-8338f663523d675847b8c0b9b92977b76995de8f.tar.gz
micropython-8338f663523d675847b8c0b9b92977b76995de8f.zip
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/emit.h')
-rw-r--r--py/emit.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/emit.h b/py/emit.h
index 26f978ba59..0c5019f07a 100644
--- a/py/emit.h
+++ b/py/emit.h
@@ -201,6 +201,7 @@ extern const emit_method_table_t emit_native_thumb_method_table;
extern const emit_method_table_t emit_native_arm_method_table;
extern const emit_method_table_t emit_native_xtensa_method_table;
extern const emit_method_table_t emit_native_xtensawin_method_table;
+extern const emit_method_table_t emit_native_rv32_method_table;
extern const mp_emit_method_table_id_ops_t mp_emit_bc_method_table_load_id_ops;
extern const mp_emit_method_table_id_ops_t mp_emit_bc_method_table_store_id_ops;
@@ -213,6 +214,7 @@ emit_t *emit_native_thumb_new(mp_emit_common_t *emit_common, mp_obj_t *error_slo
emit_t *emit_native_arm_new(mp_emit_common_t *emit_common, mp_obj_t *error_slot, uint *label_slot, mp_uint_t max_num_labels);
emit_t *emit_native_xtensa_new(mp_emit_common_t *emit_common, mp_obj_t *error_slot, uint *label_slot, mp_uint_t max_num_labels);
emit_t *emit_native_xtensawin_new(mp_emit_common_t *emit_common, mp_obj_t *error_slot, uint *label_slot, mp_uint_t max_num_labels);
+emit_t *emit_native_rv32_new(mp_emit_common_t *emit_common, mp_obj_t *error_slot, uint *label_slot, mp_uint_t max_num_labels);
void emit_bc_set_max_num_labels(emit_t *emit, mp_uint_t max_num_labels);
@@ -223,6 +225,7 @@ void emit_native_thumb_free(emit_t *emit);
void emit_native_arm_free(emit_t *emit);
void emit_native_xtensa_free(emit_t *emit);
void emit_native_xtensawin_free(emit_t *emit);
+void emit_native_rv32_free(emit_t *emit);
void mp_emit_bc_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scope);
bool mp_emit_bc_end_pass(emit_t *emit);