- inline VBTL opcode

- remove old META and CLSS implementations
This commit is contained in:
Magnus Norddahl 2018-11-23 05:37:26 +01:00
commit 6f397854d0
2 changed files with 3 additions and 55 deletions

View file

@ -77,8 +77,6 @@ void JitCompiler::EmitLFP()
cc.lea(regA[A], asmjit::x86::ptr(vmframe, offsetExtra));
}
#if 1 // Inline implementation
void JitCompiler::EmitMETA()
{
auto label = EmitThrowExceptionLabel(X_READ_NIL);
@ -97,46 +95,6 @@ void JitCompiler::EmitCLSS()
cc.mov(regA[A], asmjit::x86::qword_ptr(regA[B], myoffsetof(DObject, Class)));
}
#else
static uint8_t *GetClassMeta(DObject *o)
{
return o->GetClass()->Meta;
}
void JitCompiler::EmitMETA()
{
auto label = EmitThrowExceptionLabel(X_READ_NIL);
cc.test(regA[B], regA[B]);
cc.je(label);
auto result = newResultIntPtr();
auto call = CreateCall<uint8_t*, DObject*>(GetClassMeta);
call->setRet(0, result);
call->setArg(0, regA[B]);
cc.mov(regA[A], result);
}
static PClass *GetClass(DObject *o)
{
return o->GetClass();
}
void JitCompiler::EmitCLSS()
{
auto label = EmitThrowExceptionLabel(X_READ_NIL);
cc.test(regA[B], regA[B]);
cc.je(label);
auto result = newResultIntPtr();
auto call = CreateCall<PClass*, DObject*>(GetClass);
call->setRet(0, result);
call->setArg(0, regA[B]);
cc.mov(regA[A], result);
}
#endif
/////////////////////////////////////////////////////////////////////////////
// Load from memory. rA = *(rB + rkC)