Browse Source

fix JIT_OP_TRUNC_INT, JIT_OP_TRUNC_UINT, JIT_OP_INCOMING_REG opcodes in interpreter

cache-refactoring
Aleksey Demakov 16 years ago
parent
commit
0eb91c3127
  1. 9
      ChangeLog
  2. 4
      jit/jit-interp.c
  3. 6
      jit/jit-rules-interp.c

9
ChangeLog

@ -1,3 +1,12 @@
2008-10-05 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-interp.c (_jit_run_function): fix implementation of the
JIT_OP_TRUNC_INT and JIT_OP_TRUNC_UINT opcodes in interpreter.
* jit/jit-rules-interp.c (_jit_gen_insn): add support of the
JIT_OP_INCOMING_REG opcode, interpreter needs it for exception
handling.
2008-08-07 Klaus Treichel <ktreichel@web.de>
* jit/jit-apply.c jit/jit-insn.c, jit/jit-interp.c,

4
jit/jit-interp.c

@ -404,7 +404,7 @@ restart_tail:
VMCASE(JIT_OP_TRUNC_INT):
{
/* Truncate an integer to a signed 32-bit value */
/* In the interpreter, this is a NOP */
VM_R0_INT = VM_R1_INT;
VM_MODIFY_PC(1);
}
VMBREAK;
@ -412,7 +412,7 @@ restart_tail:
VMCASE(JIT_OP_TRUNC_UINT):
{
/* Truncate an integer to an unsigned 32-bit value */
/* In the interpreter, this is a NOP */
VM_R0_INT = VM_R1_INT;
VM_MODIFY_PC(1);
}
VMBREAK;

6
jit/jit-rules-interp.c

@ -1336,6 +1336,12 @@ void _jit_gen_insn(jit_gencode_t gen, jit_function_t func,
jit_cache_opcode(&(gen->posn), insn->opcode);
break;
case JIT_OP_INCOMING_REG:
/* Store incoming value (in interpreter this is used to
pass an exception object to the catcher) */
store_value(gen, insn->value1);
break;
case JIT_OP_RETURN_REG:
/* Push a function return value back onto the stack */
switch(jit_type_normalize(insn->value1->type)->kind)

Loading…
Cancel
Save