- backend update from GZDoom.

This commit is contained in:
Christoph Oelckers 2021-02-12 14:44:54 +01:00
parent 5b6aa372ea
commit c96e04e6c9
28 changed files with 352 additions and 119 deletions

View file

@ -2486,6 +2486,8 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool
{
newfunc->ArgFlags.Push(sym->Variants[0].ArgFlags[i]);
}
newfunc->Proto = sym->Variants[0].Proto;
}
}
}

View file

@ -333,8 +333,29 @@ void JitCompiler::SetupSimpleFrame()
}
}
if (sfunc->NumArgs != argsPos || regd > sfunc->NumRegD || regf > sfunc->NumRegF || rega > sfunc->NumRegA)
I_FatalError("JIT: sfunc->NumArgs != argsPos || regd > sfunc->NumRegD || regf > sfunc->NumRegF || rega > sfunc->NumRegA");
const char *errorDetails = nullptr;
if (sfunc->NumArgs != argsPos)
{
errorDetails = "arguments";
}
else if (regd > sfunc->NumRegD)
{
errorDetails = "integer registers";
}
else if (regf > sfunc->NumRegF)
{
errorDetails = "floating point registers";
}
else if (rega > sfunc->NumRegA)
{
errorDetails = "address registers";
}
if (errorDetails)
{
I_FatalError("JIT: inconsistent number of %s for function %s", errorDetails, sfunc->PrintableName.GetChars());
}
for (int i = regd; i < sfunc->NumRegD; i++)
cc.xor_(regD[i], regD[i]);