Files
micropython/py
Alessandro Gatti a1684ad2c1 py/asmrv32: Refactor register-indexed load/store emitters.
This commit shortens register-indexed load/store emitter functions, by
reusing integer-indexed equivalent operations as part of the sequence
generation process.

Before these changes, register-indexed load/store emitters would follow
two steps to generate the sequence: generate opcodes to fix up the
register offset to make it point to the exact position in memory where
the operation should take place, and then perform the load/store
operation itself using 0 as an offset from the recalculated address
register.

Since there is already a generic optimised emitter for integer-indexed
load/stores, that bit of code can be reused rather than having an ad-hoc
implementation that is tailored to operate on an offset of 0.  Removing
the custom emitter code in favour of calling the general integer-indexed
emitter saves around 150 bytes without any changes in the emitter
behaviour (generating the same opcode sequence and making use of future
improvement in that emitter too).

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2025-11-03 13:21:46 +11:00
..
2025-07-25 10:56:02 +10:00
2025-09-16 13:04:42 +10:00
2025-02-25 16:11:33 +11:00