]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
Account for the extra value that is added to the stack by the
authorRhys Weatherley <rweather@southern-storm.com.au>
Thu, 12 Aug 2004 00:53:50 +0000 (00:53 +0000)
committerRhys Weatherley <rweather@southern-storm.com.au>
Thu, 12 Aug 2004 00:53:50 +0000 (00:53 +0000)
"push_return_area_ptr" instruction.

ChangeLog
jit/jit-rules-interp.c

index 514252f7f557db2b004199a267b939788b426ca9..50fa4d2e48c5e6915eac45314c9cfdeea0bfe7c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
 
+2004-08-12  Rhys Weatherley  <rweather@southern-storm.com.au>
+
+       * jit/jit-rules-interp.c: account for the extra value that is
+       added to the stack by the "push_return_area_ptr" instruction.
+
 2004-08-08  Rhys Weatherley  <rweather@southern-storm.com.au>
 
        * configure.in, NEWS: update version for the "0.0.4" release.
index 62422478af154b47d304fa47ed4fc04e3712215b..a5212e38bcb81c811ec0add8cdaf8c6cf610bdf6 100644 (file)
@@ -1142,6 +1142,7 @@ void _jit_gen_insn(jit_gencode_t gen, jit_function_t func,
                                        (jit_type_get_return((jit_type_t)(insn->value2))))
                        {
                                jit_cache_opcode(&(gen->posn), JIT_OP_PUSH_RETURN_AREA_PTR);
+                               ++(gen->max_working_area);      /* Account for extra value */
                        }
                        reg = _jit_regs_load_to_top(gen, insn->value1, 0, 0);
                        jit_cache_opcode(&(gen->posn), insn->opcode);
@@ -1170,6 +1171,7 @@ void _jit_gen_insn(jit_gencode_t gen, jit_function_t func,
                                        (jit_type_get_return((jit_type_t)(insn->value2))))
                        {
                                jit_cache_opcode(&(gen->posn), JIT_OP_PUSH_RETURN_AREA_PTR);
+                               ++(gen->max_working_area);      /* Account for extra value */
                        }
                        jit_cache_opcode(&(gen->posn), insn->opcode);
                        jit_cache_native(&(gen->posn), (jit_nint)(insn->value2));