summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2025-05-22 14:03:53 +0200
committerDamien George <damien@micropython.org>2025-06-10 11:29:02 +1000
commit901c96dc554100513523cc9136161126e8cda436 (patch)
tree81baf3a5c89c5e5f672958170363c501b2c3808f
parent84ad2c6cd04a1c51d706f9b25b81cad52c6c5802 (diff)
py/emitnative: Remove redundant RV32 Viper int-indexed code.
This commit removes redundant RV32 implementations of certain int-indexed code generation operations (32-bit load/store and 16-bit load). Those operations were already available as part of the native emitter API but were not exposed to the Viper code generator. As part of the introduction of more specialised load and store API calls to int-indexed Viper load/store generator bits, the existing native emitter implementations are reused, thus making the Viper implementations redundant. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
-rw-r--r--py/emitnative.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/py/emitnative.c b/py/emitnative.c
index dba9c7169..8ac9810c8 100644
--- a/py/emitnative.c
+++ b/py/emitnative.c
@@ -1567,12 +1567,6 @@ static void emit_native_load_subscr(emit_t *emit) {
#ifdef ASM_LOAD16_REG_REG_OFFSET
ASM_LOAD16_REG_REG_OFFSET(emit->as, REG_RET, reg_base, index_value);
#else
- #if N_RV32
- if (FIT_SIGNED(index_value, 11)) {
- asm_rv32_opcode_lhu(emit->as, REG_RET, reg_base, index_value << 1);
- break;
- }
- #endif
if (index_value != 0) {
// index is a non-zero immediate
need_reg_single(emit, reg_index, 0);
@@ -1589,12 +1583,6 @@ static void emit_native_load_subscr(emit_t *emit) {
#ifdef ASM_LOAD32_REG_REG_OFFSET
ASM_LOAD32_REG_REG_OFFSET(emit->as, REG_RET, reg_base, index_value);
#else
- #if N_RV32
- if (FIT_SIGNED(index_value, 10)) {
- asm_rv32_opcode_lw(emit->as, REG_RET, reg_base, index_value << 2);
- break;
- }
- #endif
if (index_value != 0) {
// index is a non-zero immediate
need_reg_single(emit, reg_index, 0);
@@ -1855,12 +1843,6 @@ static void emit_native_store_subscr(emit_t *emit) {
#ifdef ASM_STORE32_REG_REG_OFFSET
ASM_STORE32_REG_REG_OFFSET(emit->as, reg_value, reg_base, index_value);
#else
- #if N_RV32
- if (FIT_SIGNED(index_value, 10)) {
- asm_rv32_opcode_sw(emit->as, reg_value, reg_base, index_value << 2);
- break;
- }
- #endif
if (index_value != 0) {
// index is a non-zero immediate
#if N_ARM