Signed-off-by: Tomek Grabiec <[email protected]>
---
 arch/x86/emit-code_32.c             |    1 +
 arch/x86/include/arch/instruction.h |    1 +
 arch/x86/lir-printer.c              |    6 ++++++
 arch/x86/use-def.c                  |    1 +
 4 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/x86/emit-code_32.c b/arch/x86/emit-code_32.c
index 5160cce..db998cd 100644
--- a/arch/x86/emit-code_32.c
+++ b/arch/x86/emit-code_32.c
@@ -832,6 +832,7 @@ static struct emitter emitters[] = {
        DECL_EMITTER(INSN_PUSH_IMM, emit_push_imm, SINGLE_OPERAND),
        DECL_EMITTER(INSN_PUSH_REG, emit_push_reg, SINGLE_OPERAND),
        DECL_EMITTER(INSN_POP_REG, emit_pop_reg, SINGLE_OPERAND),
+       DECL_EMITTER(INSN_RET, emit_ret, NO_OPERANDS),
        DECL_EMITTER(INSN_SAR_IMM_REG, emit_sar_imm_reg, TWO_OPERANDS),
        DECL_EMITTER(INSN_SAR_REG_REG, emit_sar_reg_reg, TWO_OPERANDS),
        DECL_EMITTER(INSN_SBB_IMM_REG, emit_sbb_imm_reg, TWO_OPERANDS),
diff --git a/arch/x86/include/arch/instruction.h 
b/arch/x86/include/arch/instruction.h
index ac75e40..6264946 100644
--- a/arch/x86/include/arch/instruction.h
+++ b/arch/x86/include/arch/instruction.h
@@ -93,6 +93,7 @@ enum insn_type {
        INSN_PUSH_IMM,
        INSN_PUSH_REG,
        INSN_POP_REG,
+       INSN_RET,
        INSN_SAR_IMM_REG,
        INSN_SAR_REG_REG,
        INSN_SBB_IMM_REG,
diff --git a/arch/x86/lir-printer.c b/arch/x86/lir-printer.c
index dfbd5d9..3c9b6d1 100644
--- a/arch/x86/lir-printer.c
+++ b/arch/x86/lir-printer.c
@@ -375,6 +375,11 @@ static int print_pop_reg(struct string *str, struct insn 
*insn)
        return print_reg(str, &insn->operand);
 }
 
+static int print_ret(struct string *str, struct insn *insn)
+{
+       return print_func_name(str);
+}
+
 static int print_sar_imm_reg(struct string *str, struct insn *insn)
 {
        print_func_name(str);
@@ -490,6 +495,7 @@ static print_insn_fn insn_printers[] = {
        [INSN_PUSH_IMM] = print_push_imm,
        [INSN_PUSH_REG] = print_push_reg,
        [INSN_POP_REG] = print_pop_reg,
+       [INSN_RET] = print_ret,
        [INSN_SAR_IMM_REG] = print_sar_imm_reg,
        [INSN_SAR_REG_REG] = print_sar_reg_reg,
        [INSN_SBB_IMM_REG] = print_sbb_imm_reg,
diff --git a/arch/x86/use-def.c b/arch/x86/use-def.c
index 37d5bfc..37524e3 100644
--- a/arch/x86/use-def.c
+++ b/arch/x86/use-def.c
@@ -66,6 +66,7 @@ static struct insn_info insn_infos[] = {
        DECLARE_INFO(INSN_PUSH_IMM, USE_NONE | DEF_NONE),
        DECLARE_INFO(INSN_PUSH_REG, USE_SRC | DEF_NONE),
        DECLARE_INFO(INSN_POP_REG, USE_NONE | DEF_SRC),
+       DECLARE_INFO(INSN_RET, USE_NONE | DEF_NONE),
        DECLARE_INFO(INSN_SAR_IMM_REG, DEF_DST),
        DECLARE_INFO(INSN_SAR_REG_REG, USE_SRC | DEF_DST),
        DECLARE_INFO(INSN_SBB_IMM_REG, USE_NONE | DEF_DST),
-- 
1.6.0.6


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to