mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 23:32:02 +00:00
- implement string part of OP_CASTB
This commit is contained in:
parent
c8e4bf089c
commit
102c00ce13
2 changed files with 7 additions and 6 deletions
|
@ -172,11 +172,6 @@ bool JitCompiler::CanJit(VMScriptFunction *sfunc)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sfunc->Code[i].op == OP_CASTB)
|
|
||||||
{
|
|
||||||
if (C == CASTB_S)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (sfunc->Code[i].op == OP_PARAM)
|
else if (sfunc->Code[i].op == OP_PARAM)
|
||||||
{
|
{
|
||||||
if (!!(B & REGT_MULTIREG3) || !!(B & REGT_MULTIREG2))
|
if (!!(B & REGT_MULTIREG3) || !!(B & REGT_MULTIREG2))
|
||||||
|
|
|
@ -147,7 +147,13 @@ void JitCompiler::EmitCASTB()
|
||||||
}
|
}
|
||||||
else
|
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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue