aboutsummaryrefslogtreecommitdiff
path: root/py/asmx64.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-05-20 14:30:30 +1000
committerDamien George <damien@micropython.org>2022-05-23 14:21:16 +1000
commit94955e8e3d7c6ca264c72218fdfc8e4716bb693f (patch)
tree3e011140292fcf285b173c9e446579e02a3f0a2c /py/asmx64.h
parent8af5e2551fb2605c03e36400003feccb6d1acafd (diff)
py/asm: Add ASM_LOAD16_REG_REG_OFFSET macro for load-u16 with offset.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/asmx64.h')
-rw-r--r--py/asmx64.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/asmx64.h b/py/asmx64.h
index 1a4987f5c..d132ee193 100644
--- a/py/asmx64.h
+++ b/py/asmx64.h
@@ -207,6 +207,7 @@ void asm_x64_call_ind(asm_x64_t *as, size_t fun_id, int temp_r32);
#define ASM_LOAD_REG_REG_OFFSET(as, reg_dest, reg_base, word_offset) asm_x64_mov_mem64_to_r64((as), (reg_base), 8 * (word_offset), (reg_dest))
#define ASM_LOAD8_REG_REG(as, reg_dest, reg_base) asm_x64_mov_mem8_to_r64zx((as), (reg_base), 0, (reg_dest))
#define ASM_LOAD16_REG_REG(as, reg_dest, reg_base) asm_x64_mov_mem16_to_r64zx((as), (reg_base), 0, (reg_dest))
+#define ASM_LOAD16_REG_REG_OFFSET(as, reg_dest, reg_base, uint16_offset) asm_x64_mov_mem16_to_r64zx((as), (reg_base), 2 * (uint16_offset), (reg_dest))
#define ASM_LOAD32_REG_REG(as, reg_dest, reg_base) asm_x64_mov_mem32_to_r64zx((as), (reg_base), 0, (reg_dest))
#define ASM_STORE_REG_REG(as, reg_src, reg_base) asm_x64_mov_r64_to_mem64((as), (reg_src), (reg_base), 0)