Altering the first argument's register's contents was okay on x86-32, but on x86-64 we use the very same register to pass the object reference. Therefore, we allocate a different register and do not modify the original. x86-32 should optimize this behavior by doing copy propagation (not currently implemented).
Signed-off-by: Eduard - Gabriel Munteanu <eduard.munte...@linux360.ro> --- arch/x86/insn-selector.brg | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/insn-selector.brg b/arch/x86/insn-selector.brg index 7983dbb..32f029d 100644 --- a/arch/x86/insn-selector.brg +++ b/arch/x86/insn-selector.brg @@ -3078,7 +3078,9 @@ static void invokevirtual(struct _MBState *state, struct basic_block *s, struct method = expr->target_method; /* object reference */ - call_target = state->left->reg1; + call_target = get_var(s->b_parent, J_REFERENCE); + select_insn(s, tree, reg_reg_insn(INSN_MOV_REG_REG, + state->left->reg1, call_target)); /* object class */ select_insn(s, tree, membase_reg_insn(INSN_MOV_MEMBASE_REG, call_target, offsetof(struct vm_object, class), call_target)); -- 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