mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
Can't narrow down the JIT bug yet, so block JIT for functions that call Function Pointers temporarily
This commit is contained in:
parent
071b5c5180
commit
682dd1b22d
3 changed files with 6 additions and 0 deletions
|
@ -9542,6 +9542,8 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx)
|
|||
auto &argflags = Function->Variants[0].ArgFlags;
|
||||
auto *defaults = FnPtrCall ? nullptr : &Function->Variants[0].Implementation->DefaultArgs;
|
||||
|
||||
if(FnPtrCall) static_cast<VMScriptFunction*>(ctx.Function->Variants[0].Implementation)->blockJit = true;
|
||||
|
||||
int implicit = Function->GetImplicitArgs();
|
||||
|
||||
if (!CheckAccessibility(ctx.Version))
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -474,6 +474,8 @@ public:
|
|||
VM_UBYTE NumArgs; // Number of arguments this function takes
|
||||
TArray<FTypeAndOffset> SpecialInits; // list of all contents on the extra stack which require construction and destruction
|
||||
|
||||
bool blockJit = false; // function triggers Jit bugs, block compilation until bugs are fixed
|
||||
|
||||
void InitExtra(void *addr);
|
||||
void DestroyExtra(void *addr);
|
||||
int AllocExtraStack(PType *type);
|
||||
|
|
Loading…
Reference in a new issue