diff options
author | Alessandro Gatti <a.gatti@frob.it> | 2025-04-17 00:27:28 +0200 |
---|---|---|
committer | Alessandro Gatti <a.gatti@frob.it> | 2025-05-21 01:50:11 +0200 |
commit | 1d37caa3679c86ef4fe43d2f9e6ac13074498433 (patch) | |
tree | 8830966badd8c401730eccf6a894ceb71f321e0d /py/asmarm.h | |
parent | 186caf9f0326c9d61494a7d5c6d0408c0fef8485 (diff) |
py/emitnative: Improve Viper register-indexed code for Arm.
This commit lets the Viper code generator use optimised code sequences
for register-indexed load and store operations when generating Arm code.
The existing code defaulted to generic multi-operations code sequences
for Arm code on most cases. Now optimised implementations are provided
for register-indexed loads and stores of all data sizes, taking at most
two machine opcodes for each operation.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'py/asmarm.h')
-rw-r--r-- | py/asmarm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/py/asmarm.h b/py/asmarm.h index 4a4253aef..20b4757d2 100644 --- a/py/asmarm.h +++ b/py/asmarm.h @@ -116,6 +116,12 @@ void asm_arm_ldrb_reg_reg(asm_arm_t *as, uint rd, uint rn); void asm_arm_str_reg_reg(asm_arm_t *as, uint rd, uint rm, uint byte_offset); void asm_arm_strh_reg_reg(asm_arm_t *as, uint rd, uint rm); void asm_arm_strb_reg_reg(asm_arm_t *as, uint rd, uint rm); + +// load from array +void asm_arm_ldr_reg_reg_reg(asm_arm_t *as, uint rd, uint rm, uint rn); +void asm_arm_ldrh_reg_reg_reg(asm_arm_t *as, uint rd, uint rm, uint rn); +void asm_arm_ldrb_reg_reg_reg(asm_arm_t *as, uint rd, uint rm, uint rn); + // store to array void asm_arm_str_reg_reg_reg(asm_arm_t *as, uint rd, uint rm, uint rn); void asm_arm_strh_reg_reg_reg(asm_arm_t *as, uint rd, uint rm, uint rn); |