diff options
author | Damien George <damien.p.george@gmail.com> | 2015-06-04 14:00:29 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-06-04 14:00:29 +0000 |
commit | 567b349c2b271c0f04add0f1beb36495835f66f8 (patch) | |
tree | eec69f15a26a3eef7a057c8075f23bb514362d5d /py/asmx86.c | |
parent | 4d9cad180dbaf25cdbb9dd0c54a637483db933a7 (diff) |
py: Implement native multiply operation in viper emitter.
Diffstat (limited to 'py/asmx86.c')
-rw-r--r-- | py/asmx86.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/asmx86.c b/py/asmx86.c index 8a4383c82..25f0db885 100644 --- a/py/asmx86.c +++ b/py/asmx86.c @@ -369,6 +369,11 @@ STATIC void asm_x86_sub_r32_i32(asm_x86_t *as, int dest_r32, int src_i32) { } } +void asm_x86_mul_r32_r32(asm_x86_t *as, int dest_r32, int src_r32) { + // imul reg32, reg/mem32 -- 0x0f 0xaf /r + asm_x86_write_byte_3(as, 0x0f, 0xaf, MODRM_R32(dest_r32) | MODRM_RM_REG | MODRM_RM_R32(src_r32)); +} + #if 0 /* shifts not tested */ void asm_x86_shl_r32_by_imm(asm_x86_t *as, int r32, int imm) { |