- workaround bug in asmjit's register allocator for calls where the return register is already allocated in a physical register needed by one of the call arguments
This commit is contained in:
parent
5bf76523d6
commit
d47988202a
5 changed files with 78 additions and 27 deletions
|
|
@ -56,14 +56,16 @@ void JitCompiler::EmitVTBL()
|
|||
EmitThrowException(X_READ_NIL);
|
||||
cc.bind(notnull);
|
||||
|
||||
auto result = cc.newIntPtr();
|
||||
auto call = CreateCall<VMFunction*, DObject*, int>([](DObject *o, int c) -> VMFunction* {
|
||||
auto p = o->GetClass();
|
||||
assert(c < (int)p->Virtuals.Size());
|
||||
return p->Virtuals[c];
|
||||
});
|
||||
call->setRet(0, regA[A]);
|
||||
call->setRet(0, result);
|
||||
call->setArg(0, regA[B]);
|
||||
call->setArg(1, asmjit::Imm(C));
|
||||
cc.mov(regA[A], result);
|
||||
}
|
||||
|
||||
void JitCompiler::EmitSCOPE()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue