- implement string part of OP_CASTB

This commit is contained in:
Magnus Norddahl 2018-09-16 22:39:48 +02:00
commit 102c00ce13
2 changed files with 7 additions and 6 deletions

View file

@ -147,7 +147,13 @@ void JitCompiler::EmitCASTB()
}
else
{
//reg.d[A] = reg.s[B].Len() > 0;
using namespace asmjit;
typedef int(*FuncPtr)(FString*);
auto call = cc.call(ToMemAddress(reinterpret_cast<const void*>(static_cast<FuncPtr>([](FString *s) -> int {
return s->Len() > 0;
}))), FuncSignature1<int, void*>());
call->setRet(0, regD[A]);
call->setArg(0, regS[B]);
}
}