Can't narrow down the JIT bug yet, so block JIT for functions that call Function Pointers temporarily

This commit is contained in:
Ricardo Luís Vaz Silva 2024-03-22 10:35:46 -03:00
commit 682dd1b22d
3 changed files with 6 additions and 0 deletions

View file

@ -279,6 +279,8 @@ static bool CanJit(VMScriptFunction *func)
// Asmjit has a 256 register limit. Stay safely away from it as the jit compiler uses a few for temporaries as well.
// Any function exceeding the limit will use the VM - a fair punishment to someone for writing a function so bloated ;)
if(func->blockJit) return false;
int maxregs = 200;
if (func->NumRegA + func->NumRegD + func->NumRegF + func->NumRegS < maxregs)
return true;