diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2014-09-01 12:53:14 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2014-09-01 12:53:14 +0000 |
| commit | 342f6e3797db83a5ca48c179f4c7de436cacdb7d (patch) | |
| tree | a56345385c38619148ed859498ff0950f7677d83 /src/runtime/c/pgf | |
| parent | 4e8cd9119efb1abb5797f86fd932dd5fb488a58e (diff) | |
bug fixes in the JIT compiler
Diffstat (limited to 'src/runtime/c/pgf')
| -rw-r--r-- | src/runtime/c/pgf/jit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runtime/c/pgf/jit.c b/src/runtime/c/pgf/jit.c index 20ddd9f68..646115c4e 100644 --- a/src/runtime/c/pgf/jit.c +++ b/src/runtime/c/pgf/jit.c @@ -358,8 +358,9 @@ pgf_jit_function(PgfReader* rdr, PgfAbstr* abstr, } #ifdef PGF_JIT_DEBUG - gu_printf(out, err, "%04d ", curr_label++); + gu_printf(out, err, "%04d ", curr_label); #endif + curr_label++; uint8_t opcode = pgf_read_tag(rdr); switch (opcode) { @@ -374,7 +375,7 @@ pgf_jit_function(PgfReader* rdr, PgfAbstr* abstr, jit_prepare(1); jit_pusharg_p(JIT_V0); jit_finish(gu_buf_last); - jit_ldxr_p(JIT_V0, JIT_RET, -index*sizeof(PgfClosure*)); + jit_ldxi_p(JIT_V0, JIT_RET, -index*sizeof(PgfClosure*)); jit_prepare(2); jit_pusharg_p(JIT_V0); jit_getarg_p(JIT_V2, es_arg); @@ -523,6 +524,7 @@ pgf_jit_function(PgfReader* rdr, PgfAbstr* abstr, jit_finish(gu_buf_last); jit_ldxi_p(JIT_V0, JIT_RET, -index*sizeof(PgfClosure*)); jit_stxi_p(curr_offset*sizeof(void*), JIT_V1, JIT_V0); + curr_offset++; break; } case PGF_INSTR_TAIL_CALL: { |
