Signed-off-by: Tomek Grabiec <[email protected]>
---
arch/x86/emit-code.c | 9 +++++++++
arch/x86/include/arch/instruction.h | 1 +
arch/x86/lir-printer.c | 7 +++++++
arch/x86/use-def.c | 1 +
4 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c
index 5ce2672..4b2825f 100644
--- a/arch/x86/emit-code.c
+++ b/arch/x86/emit-code.c
@@ -1377,6 +1377,14 @@ static void emit_mov_membase_xmm(struct buffer *buf,
struct operand *src,
emit_membase_reg(buf, 0x10, src, dest);
}
+static void emit_mov_memdisp_xmm(struct buffer *buf, struct operand *src,
+ struct operand *dest)
+{
+ emit(buf, 0xf3);
+ emit(buf, 0x0f);
+ __emit_memdisp_reg(buf, 0x10, src->imm, mach_reg(&dest->reg));
+}
+
static void emit_mov_xmm_membase(struct buffer *buf, struct operand *src,
struct operand *dest)
{
@@ -1437,6 +1445,7 @@ struct emitter emitters[] = {
DECL_EMITTER(INSN_MOV_MEMLOCAL_FREG, emit_mov_memlocal_freg,
TWO_OPERANDS),
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_MEMDISP_XMM, emit_mov_memdisp_xmm, TWO_OPERANDS),
DECL_EMITTER(INSN_MOV_REG_MEMDISP, emit_mov_reg_memdisp, TWO_OPERANDS),
DECL_EMITTER(INSN_MOV_THREAD_LOCAL_MEMDISP_REG,
emit_mov_thread_local_memdisp_reg, TWO_OPERANDS),
DECL_EMITTER(INSN_MOV_MEMINDEX_REG, emit_mov_memindex_reg,
TWO_OPERANDS),
diff --git a/arch/x86/include/arch/instruction.h
b/arch/x86/include/arch/instruction.h
index 30d420f..fb13019 100644
--- a/arch/x86/include/arch/instruction.h
+++ b/arch/x86/include/arch/instruction.h
@@ -98,6 +98,7 @@ enum insn_type {
INSN_MOV_MEMLOCAL_FREG,
INSN_MOV_MEMBASE_REG,
INSN_MOV_MEMDISP_REG,
+ INSN_MOV_MEMDISP_XMM,
INSN_MOV_REG_MEMDISP,
INSN_MOV_REG_THREAD_LOCAL_MEMBASE,
INSN_MOV_REG_THREAD_LOCAL_MEMDISP,
diff --git a/arch/x86/lir-printer.c b/arch/x86/lir-printer.c
index 5833d28..2083913 100644
--- a/arch/x86/lir-printer.c
+++ b/arch/x86/lir-printer.c
@@ -456,6 +456,12 @@ static int print_mov_memdisp_reg(struct string *str,
struct insn *insn)
return print_memdisp_reg(str, insn);
}
+static int print_mov_memdisp_xmm(struct string *str, struct insn *insn)
+{
+ print_func_name(str);
+ return print_memdisp_reg(str, insn);
+}
+
static int print_mov_reg_memdisp(struct string *str, struct insn *insn)
{
print_func_name(str);
@@ -767,6 +773,7 @@ static print_insn_fn insn_printers[] = {
[INSN_MOV_MEMLOCAL_FREG] = print_mov_memlocal_freg,
[INSN_MOV_MEMBASE_REG] = print_mov_membase_reg,
[INSN_MOV_MEMDISP_REG] = print_mov_memdisp_reg,
+ [INSN_MOV_MEMDISP_XMM] = print_mov_memdisp_xmm,
[INSN_MOV_REG_MEMDISP] = print_mov_reg_memdisp,
[INSN_MOV_THREAD_LOCAL_MEMDISP_REG] = print_mov_tlmemdisp_reg,
[INSN_MOV_MEMINDEX_REG] = print_mov_memindex_reg,
diff --git a/arch/x86/use-def.c b/arch/x86/use-def.c
index e0abf6a..63fb709 100644
--- a/arch/x86/use-def.c
+++ b/arch/x86/use-def.c
@@ -83,6 +83,7 @@ static struct insn_info insn_infos[] = {
DECLARE_INFO(INSN_MOV_MEMLOCAL_FREG, USE_FP | DEF_DST),
DECLARE_INFO(INSN_MOV_MEMBASE_REG, USE_SRC | DEF_DST),
DECLARE_INFO(INSN_MOV_MEMDISP_REG, USE_NONE | DEF_DST),
+ DECLARE_INFO(INSN_MOV_MEMDISP_XMM, USE_NONE | DEF_DST),
DECLARE_INFO(INSN_MOV_REG_MEMBASE, USE_SRC | USE_DST),
DECLARE_INFO(INSN_MOV_REG_MEMDISP, USE_SRC | DEF_NONE),
DECLARE_INFO(INSN_MOV_THREAD_LOCAL_MEMDISP_REG, USE_NONE | DEF_DST),
--
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