- added string PARAM and RET

This commit is contained in:
Jonathan Russell 2018-09-14 18:20:31 +01:00
commit 11fbd9a0a4
7 changed files with 64 additions and 40 deletions

View file

@ -23,10 +23,7 @@ void JitCompiler::EmitLKF()
void JitCompiler::EmitLKS()
{
auto loadLambda = [] (FString* to, FString* from) -> void {
*to = *from;
};
auto call = cc.call(ToMemAddress(reinterpret_cast<void*>(static_cast<void(*)(FString*, FString*)>(loadLambda))),
auto call = cc.call(ToMemAddress(reinterpret_cast<void*>(static_cast<void(*)(FString*, FString*)>(CallAssignString))),
asmjit::FuncSignature2<void, FString*, FString*>(asmjit::CallConv::kIdHostCDecl));
call->setArg(0, regS[A]);
call->setArg(1, asmjit::imm(ToMemAddress(konsts + BC)));
@ -193,10 +190,7 @@ void JitCompiler::EmitLS()
auto ptr = cc.newIntPtr();
cc.mov(ptr, regA[B]);
cc.add(ptr, konstd[C]);
auto loadLambda = [](FString* to, FString* from) -> void {
*to = *from;
};
auto call = cc.call(ToMemAddress(reinterpret_cast<void*>(static_cast<void(*)(FString*, FString*)>(loadLambda))),
auto call = cc.call(ToMemAddress(reinterpret_cast<void*>(static_cast<void(*)(FString*, FString*)>(CallAssignString))),
asmjit::FuncSignature2<void, FString*, FString*>(asmjit::CallConv::kIdHostCDecl));
call->setArg(0, regS[A]);
call->setArg(1, ptr);
@ -210,10 +204,7 @@ void JitCompiler::EmitLS_R()
auto tmp = cc.newIntPtr();
cc.mov(tmp, regD[C]);
cc.add(ptr, tmp);
auto loadLambda = [](FString* to, FString* from) -> void {
*to = *from;
};
auto call = cc.call(ToMemAddress(reinterpret_cast<void*>(static_cast<void(*)(FString*, FString*)>(loadLambda))),
auto call = cc.call(ToMemAddress(reinterpret_cast<void*>(static_cast<void(*)(FString*, FString*)>(CallAssignString))),
asmjit::FuncSignature2<void, FString*, FString*>(asmjit::CallConv::kIdHostCDecl));
call->setArg(0, regS[A]);
call->setArg(1, ptr);