Signed-off-by: Vegard Nossum <vegard.nos...@gmail.com> --- arch/x86/emit-code.c | 15 +++++++++++++++ arch/x86/include/arch/instruction.h | 1 + arch/x86/use-def.c | 1 + 3 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c index a7d4da9..4888d2f 100644 --- a/arch/x86/emit-code.c +++ b/arch/x86/emit-code.c @@ -750,6 +750,20 @@ static void emit_movsx_16_reg_reg(struct buffer *buf, struct operand *src, __emit_reg_reg(buf, 0xbf, mach_reg(&dest->reg), mach_reg(&src->reg)); } +static void emit_movsx_16_membase_reg(struct buffer *buf, + struct operand *src, struct operand *dest) +{ + enum machine_reg base_reg, dest_reg; + unsigned long disp; + + base_reg = mach_reg(&src->reg); + disp = src->disp; + dest_reg = mach_reg(&dest->reg); + + emit(buf, 0x0f); + __emit_membase_reg(buf, 0xbf, base_reg, disp, dest_reg); +} + static void emit_movzx_16_reg_reg(struct buffer *buf, struct operand *src, struct operand *dest) { @@ -1755,6 +1769,7 @@ struct emitter emitters[] = { DECL_EMITTER(INSN_MOVSX_8_REG_REG, emit_movsx_8_reg_reg, TWO_OPERANDS), DECL_EMITTER(INSN_MOVSX_8_MEMBASE_REG, emit_movsx_8_membase_reg, TWO_OPERANDS), DECL_EMITTER(INSN_MOVSX_16_REG_REG, emit_movsx_16_reg_reg, TWO_OPERANDS), + DECL_EMITTER(INSN_MOVSX_16_MEMBASE_REG, emit_movsx_16_membase_reg, TWO_OPERANDS), DECL_EMITTER(INSN_MOVZX_16_REG_REG, emit_movzx_16_reg_reg, TWO_OPERANDS), DECL_EMITTER(INSN_MUL_MEMBASE_EAX, emit_mul_membase_eax, TWO_OPERANDS), DECL_EMITTER(INSN_MUL_REG_EAX, emit_mul_reg_eax, TWO_OPERANDS), diff --git a/arch/x86/include/arch/instruction.h b/arch/x86/include/arch/instruction.h index 05073a7..1932e47 100644 --- a/arch/x86/include/arch/instruction.h +++ b/arch/x86/include/arch/instruction.h @@ -138,6 +138,7 @@ enum insn_type { INSN_MOVSX_8_REG_REG, INSN_MOVSX_8_MEMBASE_REG, INSN_MOVSX_16_REG_REG, + INSN_MOVSX_16_MEMBASE_REG, INSN_MOVZX_16_REG_REG, INSN_MUL_MEMBASE_EAX, INSN_MUL_REG_EAX, diff --git a/arch/x86/use-def.c b/arch/x86/use-def.c index 074d5c4..f5f0a35 100644 --- a/arch/x86/use-def.c +++ b/arch/x86/use-def.c @@ -121,6 +121,7 @@ static struct insn_info insn_infos[] = { DECLARE_INFO(INSN_MOVSX_8_REG_REG, USE_SRC | DEF_DST), DECLARE_INFO(INSN_MOVSX_8_MEMBASE_REG, USE_SRC | DEF_DST), DECLARE_INFO(INSN_MOVSX_16_REG_REG, USE_SRC | DEF_DST), + DECLARE_INFO(INSN_MOVSX_16_MEMBASE_REG, USE_SRC | DEF_DST), DECLARE_INFO(INSN_MOVZX_16_REG_REG, USE_SRC | DEF_DST), DECLARE_INFO(INSN_MUL_MEMBASE_EAX, USE_SRC | DEF_DST | DEF_xDX | DEF_xAX), DECLARE_INFO(INSN_MUL_REG_EAX, USE_SRC | USE_DST | DEF_DST | DEF_xDX | DEF_xAX), -- 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 Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel