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 f689617..a7d4da9 100644
--- a/arch/x86/emit-code.c
+++ b/arch/x86/emit-code.c
@@ -729,6 +729,20 @@ static void emit_movsx_8_reg_reg(struct buffer *buf, 
struct operand *src,
        __emit_reg_reg(buf, 0xbe, mach_reg(&dest->reg), src_reg);
 }
 
+static void emit_movsx_8_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, 0xbe, base_reg, disp, __encode_reg(dest_reg));
+}
+
 static void emit_movsx_16_reg_reg(struct buffer *buf, struct operand *src,
                             struct operand *dest)
 {
@@ -1739,6 +1753,7 @@ struct emitter emitters[] = {
        DECL_EMITTER(INSN_MOV_XMM_XMM, emit_mov_xmm_xmm, TWO_OPERANDS),
        DECL_EMITTER(INSN_MOV_64_XMM_XMM, emit_mov_64_xmm_xmm, TWO_OPERANDS),
        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_MOVZX_16_REG_REG, emit_movzx_16_reg_reg, 
TWO_OPERANDS),
        DECL_EMITTER(INSN_MUL_MEMBASE_EAX, emit_mul_membase_eax, TWO_OPERANDS),
diff --git a/arch/x86/include/arch/instruction.h 
b/arch/x86/include/arch/instruction.h
index 015f50f..05073a7 100644
--- a/arch/x86/include/arch/instruction.h
+++ b/arch/x86/include/arch/instruction.h
@@ -136,6 +136,7 @@ enum insn_type {
        INSN_MOV_XMM_XMM,
        INSN_MOV_64_XMM_XMM,
        INSN_MOVSX_8_REG_REG,
+       INSN_MOVSX_8_MEMBASE_REG,
        INSN_MOVSX_16_REG_REG,
        INSN_MOVZX_16_REG_REG,
        INSN_MUL_MEMBASE_EAX,
diff --git a/arch/x86/use-def.c b/arch/x86/use-def.c
index 643b073..074d5c4 100644
--- a/arch/x86/use-def.c
+++ b/arch/x86/use-def.c
@@ -119,6 +119,7 @@ static struct insn_info insn_infos[] = {
        DECLARE_INFO(INSN_MOV_XMM_XMM, USE_SRC | DEF_DST),
        DECLARE_INFO(INSN_MOV_64_XMM_XMM, USE_SRC | DEF_DST),
        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_MOVZX_16_REG_REG, USE_SRC | DEF_DST),
        DECLARE_INFO(INSN_MUL_MEMBASE_EAX, USE_SRC | 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

Reply via email to