mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-11 13:01:19 +00:00
- fixed OP_VTBL bug
This commit is contained in:
parent
266f838de7
commit
7e7bce4965
2 changed files with 2 additions and 4 deletions
|
@ -155,7 +155,6 @@ bool JitCompiler::CanJit(VMScriptFunction *sfunc)
|
|||
case OP_LCS_R:
|
||||
case OP_SS_R:
|
||||
case OP_IJMP:
|
||||
case OP_CALL: // this one is implemented but crashes currently
|
||||
case OP_TAIL:
|
||||
case OP_TAIL_K:
|
||||
return false;
|
||||
|
|
|
@ -36,15 +36,14 @@ void JitCompiler::EmitVTBL()
|
|||
EmitThrowException(X_READ_NIL);
|
||||
cc.bind(notnull);
|
||||
|
||||
auto result = cc.newInt32();
|
||||
typedef VMFunction*(*FuncPtr)(DObject*, int);
|
||||
auto call = cc.call(ToMemAddress(reinterpret_cast<const void*>(static_cast<FuncPtr>([](DObject *o, int c) -> VMFunction* {
|
||||
auto p = o->GetClass();
|
||||
assert(c < (int)p->Virtuals.Size());
|
||||
return p->Virtuals[c];
|
||||
}))), asmjit::FuncSignature2<void*, void*, int>());
|
||||
call->setRet(0, result);
|
||||
call->setArg(0, regA[A]);
|
||||
call->setRet(0, regA[A]);
|
||||
call->setArg(0, regA[B]);
|
||||
call->setArg(1, asmjit::Imm(C));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue