summaryrefslogtreecommitdiffstatshomepage
path: root/py/asmarm.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-06-25 13:09:07 +1000
committerDamien George <damien@micropython.org>2020-06-27 00:24:04 +1000
commitaa26fe62d8728c95d447475ced9b4a03380025ea (patch)
tree6a0147babbb940d6d0aa261a2c3fd41aaa8cd026 /py/asmarm.c
parent137df817575e06b7bd765fb230a99d108f1d4f61 (diff)
downloadmicropython-aa26fe62d8728c95d447475ced9b4a03380025ea.tar.gz
micropython-aa26fe62d8728c95d447475ced9b4a03380025ea.zip
py/asm: Add funcs/macros to emit machine code for logical-shift-right.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/asmarm.c')
-rw-r--r--py/asmarm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/asmarm.c b/py/asmarm.c
index 72b37f73a0..e91421578b 100644
--- a/py/asmarm.c
+++ b/py/asmarm.c
@@ -303,6 +303,11 @@ void asm_arm_lsl_reg_reg(asm_arm_t *as, uint rd, uint rs) {
emit_al(as, 0x1a00010 | (rd << 12) | (rs << 8) | rd);
}
+void asm_arm_lsr_reg_reg(asm_arm_t *as, uint rd, uint rs) {
+ // mov rd, rd, lsr rs
+ emit_al(as, 0x1a00030 | (rd << 12) | (rs << 8) | rd);
+}
+
void asm_arm_asr_reg_reg(asm_arm_t *as, uint rd, uint rs) {
// mov rd, rd, asr rs
emit_al(as, 0x1a00050 | (rd << 12) | (rs << 8) | rd);