This implements the STMT_MONITOR_* statements according to the x86-64 ABI. Signed-off-by: Eduard - Gabriel Munteanu <eduard.munte...@linux360.ro> --- arch/x86/insn-selector.brg | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/arch/x86/insn-selector.brg b/arch/x86/insn-selector.brg index 759194e..20d7a5c 100644 --- a/arch/x86/insn-selector.brg +++ b/arch/x86/insn-selector.brg @@ -2589,6 +2589,7 @@ reg: EXPR_LOOKUPSWITCH_BSEARCH(reg) } %endif +%ifdef CONFIG_X86_32 stmt: STMT_MONITOR_ENTER(reg) { struct var_info *ref; @@ -2614,6 +2615,35 @@ stmt: STMT_MONITOR_EXIT(reg) method_args_cleanup(s, tree, 1); select_exception_test(s, tree); } +%else +stmt: STMT_MONITOR_ENTER(reg) +{ + struct var_info *ref, *rdi; + + ref = state->left->reg1; + rdi = get_fixed_var(s->b_parent, MACH_REG_RDI); + + select_insn(s, tree, reg_reg_insn(INSN_MOV_REG_REG, ref, rdi)); + select_insn(s, tree, rel_insn(INSN_CALL_REL, + (unsigned long) vm_object_lock)); + + select_exception_test(s, tree); +} + +stmt: STMT_MONITOR_EXIT(reg) +{ + struct var_info *ref, *rdi; + + ref = state->left->reg1; + rdi = get_fixed_var(s->b_parent, MACH_REG_RDI); + + select_insn(s, tree, reg_reg_insn(INSN_MOV_REG_REG, ref, rdi)); + select_insn(s, tree, rel_insn(INSN_CALL_REL, + (unsigned long) vm_object_unlock)); + + select_exception_test(s, tree); +} +%endif stmt: STMT_CHECKCAST(reg) { -- 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