- fixed IJMP code generation for the JIT compiler.

With a proper count value available this can be done properly. The only relevant targets are the jumps immediately succeeding the IJMP instructions, nothing else.
This commit is contained in:
Christoph Oelckers 2018-11-17 13:39:14 +01:00
commit 89cec539fa
2 changed files with 6 additions and 9 deletions

View file

@ -554,7 +554,7 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
NEXTOP;
OP(IJMP):
ASSERTD(a);
pc += (BCs + reg.d[a]);
pc += (reg.d[a]);
assert(pc[1].op == OP_JMP);
pc += 1 + JMPOFS(pc+1);
NEXTOP;