- fix crash in OP_RET handling

This commit is contained in:
Magnus Norddahl 2018-09-15 00:12:12 +02:00
parent 663e61a4fb
commit 266f838de7
1 changed files with 4 additions and 4 deletions

View File

@ -104,8 +104,8 @@ void JitCompiler::EmitRET()
Label L_endif = cc.newLabel();
cc.mov(reg_retnum, retnum);
cc.test(reg_retnum, numret);
cc.jg(L_endif);
cc.cmp(reg_retnum, numret);
cc.jge(L_endif);
cc.mov(location, x86::ptr(ret, retnum * sizeof(VMReturn)));
@ -221,8 +221,8 @@ void JitCompiler::EmitRETI()
Label L_endif = cc.newLabel();
cc.mov(reg_retnum, retnum);
cc.test(reg_retnum, numret);
cc.jg(L_endif);
cc.cmp(reg_retnum, numret);
cc.jge(L_endif);
cc.mov(location, x86::ptr(ret, retnum * sizeof(VMReturn)));
cc.mov(x86::dword_ptr(location), BCs);