- removed CanJit as all opcodes are now implemented
- fix some store bugs
This commit is contained in:
parent
47bcf318a5
commit
d643fbd077
4 changed files with 42 additions and 40 deletions
|
|
@ -49,9 +49,6 @@ JitFuncPtr JitCompile(VMScriptFunction *sfunc)
|
|||
#if defined(DEBUG_JIT)
|
||||
if (strcmp(sfunc->PrintableName.GetChars(), "StatusScreen.drawNum") != 0)
|
||||
return nullptr;
|
||||
#else
|
||||
if (!JitCompiler::CanJit(sfunc))
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
//Printf("Jitting function: %s\n", sfunc->PrintableName.GetChars());
|
||||
|
|
@ -141,28 +138,6 @@ void JitCompiler::EmitOpcode()
|
|||
}
|
||||
}
|
||||
|
||||
bool JitCompiler::CanJit(VMScriptFunction *sfunc)
|
||||
{
|
||||
int size = sfunc->CodeSize;
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
// Partially implemented functions:
|
||||
|
||||
auto pc = sfunc->Code + i;
|
||||
if (sfunc->Code[i].op == OP_PARAM)
|
||||
{
|
||||
if (!!(B & REGT_MULTIREG3) || !!(B & REGT_MULTIREG2))
|
||||
return false;
|
||||
}
|
||||
else if (sfunc->Code[i].op == OP_RESULT)
|
||||
{
|
||||
if (!!(B & REGT_MULTIREG3) || !!(B & REGT_MULTIREG2))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void JitCompiler::Setup()
|
||||
{
|
||||
using namespace asmjit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue