This implements INSN_MOV_MEMINDEX_REG on x86-64.
Signed-off-by: Eduard - Gabriel Munteanu <[email protected]>
---
arch/x86/emit-code.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c
index b363332..c2d625b 100644
--- a/arch/x86/emit-code.c
+++ b/arch/x86/emit-code.c
@@ -2818,6 +2818,15 @@ static void emit_test_imm_memdisp(struct buffer *buf,
__emit_test_imm_memdisp(buf, 0, imm->imm, disp->disp);
}
+static void emit_mov_memindex_reg(struct buffer *buf,
+ struct operand *src, struct operand *dest)
+{
+ emit(buf, REX_W);
+ emit(buf, 0x8b);
+ emit(buf, encode_modrm(0x00, encode_reg(&dest->reg), 0x04));
+ emit(buf, encode_sib(src->shift, encode_reg(&src->index_reg),
encode_reg(&src->base_reg)));
+}
+
struct emitter emitters[] = {
GENERIC_X86_EMITTERS,
DECL_EMITTER(INSN_ADD_IMM_REG, emit_add_imm_reg, TWO_OPERANDS),
@@ -2830,6 +2839,7 @@ struct emitter emitters[] = {
DECL_EMITTER(INSN_MOV_IP_REG, emit_mov_ip_reg, SINGLE_OPERAND),
DECL_EMITTER(INSN_MOV_MEMBASE_REG, emit_mov_membase_reg, TWO_OPERANDS),
DECL_EMITTER(INSN_MOV_MEMDISP_REG, emit_mov_memdisp_reg, TWO_OPERANDS),
+ DECL_EMITTER(INSN_MOV_MEMINDEX_REG, emit_mov_memindex_reg,
TWO_OPERANDS),
DECL_EMITTER(INSN_MOV_MEMLOCAL_REG, emit_mov_memlocal_reg,
TWO_OPERANDS),
DECL_EMITTER(INSN_MOV_REG_MEMBASE, emit_mov_reg_membase, TWO_OPERANDS),
DECL_EMITTER(INSN_MOV_REG_MEMDISP, emit_mov_reg_memdisp, TWO_OPERANDS),
--
1.6.0.6
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel