From: Rhys Weatherley Date: Mon, 6 Sep 2004 07:29:20 +0000 (+0000) Subject: The pointer value for indirect and vtable calls was being pushed onto the stack twice. X-Git-Tag: r.0.0.6~41 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=c00b98ab8f54123bd97709aab6e3f5468dc01cb7;p=francis%2Flibjit.git The pointer value for indirect and vtable calls was being pushed onto the stack twice. --- diff --git a/ChangeLog b/ChangeLog index 7962c33..edc2bfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ +2004-09-06 Rhys Weatherley + + * jit/jit-rules-interp.c: the pointer value for indirect and vtable + calls was being pushed onto the stack twice. + 2004-09-05 Norbert Bollow * samples/hellovm.c: add a sample program that demonstrates a diff --git a/jit/jit-rules-interp.c b/jit/jit-rules-interp.c index cd4efea..032054e 100644 --- a/jit/jit-rules-interp.c +++ b/jit/jit-rules-interp.c @@ -1147,12 +1147,10 @@ void _jit_gen_insn(jit_gencode_t gen, jit_function_t func, case JIT_OP_CALL_INDIRECT: { /* Call a function, whose pointer is supplied on the stack */ - reg = _jit_regs_load_to_top(gen, insn->value1, 0, 0); jit_cache_opcode(&(gen->posn), insn->opcode); jit_cache_native(&(gen->posn), (jit_nint)(insn->value2)); jit_cache_native(&(gen->posn), (jit_nint) (jit_type_num_params((jit_type_t)(insn->value2)))); - _jit_regs_free_reg(gen, reg, 1); adjust_working(gen, -1); } break; @@ -1160,9 +1158,7 @@ void _jit_gen_insn(jit_gencode_t gen, jit_function_t func, case JIT_OP_CALL_VTABLE_PTR: { /* Call a function, whose vtable pointer is supplied on the stack */ - reg = _jit_regs_load_to_top(gen, insn->value1, 0, 0); jit_cache_opcode(&(gen->posn), insn->opcode); - _jit_regs_free_reg(gen, reg, 1); adjust_working(gen, -1); } break;