This implements the INSN_MOV_REG_MEMINDEX instruction. Signed-off-by: Eduard - Gabriel Munteanu <eduard.munte...@linux360.ro> --- 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 aa6253e..5e3872b 100644 --- a/arch/x86/emit-code.c +++ b/arch/x86/emit-code.c @@ -2845,6 +2845,15 @@ static void emit_mov_memindex_reg(struct buffer *buf, emit(buf, encode_sib(src->shift, encode_reg(&src->index_reg), encode_reg(&src->base_reg))); } +static void emit_mov_reg_memindex(struct buffer *buf, struct operand *src, + struct operand *dest) +{ + emit(buf, REX_W); + emit(buf, 0x89); + emit(buf, encode_modrm(0x00, encode_reg(&src->reg), 0x04)); + emit(buf, encode_sib(dest->shift, encode_reg(&dest->index_reg), encode_reg(&dest->base_reg))); +} + struct emitter emitters[] = { GENERIC_X86_EMITTERS, DECL_EMITTER(INSN_ADD_IMM_REG, emit_add_imm_reg, TWO_OPERANDS), @@ -2861,6 +2870,7 @@ struct emitter emitters[] = { 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), + DECL_EMITTER(INSN_MOV_REG_MEMINDEX, emit_mov_reg_memindex, TWO_OPERANDS), DECL_EMITTER(INSN_MOV_REG_MEMLOCAL, emit_mov_reg_memlocal, TWO_OPERANDS), DECL_EMITTER(INSN_MOV_REG_REG, emit_mov_reg_reg, TWO_OPERANDS), DECL_EMITTER(INSN_MOV_REG_THREAD_LOCAL_MEMBASE, emit_mov_reg_thread_local_membase, TWO_OPERANDS), -- 1.6.0.6 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel