mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- improved JIT simple frame error message
https://forum.zdoom.org/viewtopic.php?t=71340
This commit is contained in:
parent
21d9a42d32
commit
9bd07e5c83
1 changed files with 23 additions and 2 deletions
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue