Don't print save/restore calls when non volatile registers as local variables option is enabled.

This commit is contained in:
Skyth
2024-09-27 19:26:13 +03:00
parent acd49010e6
commit d5f44c11c5
2 changed files with 20 additions and 2 deletions

View File

@@ -157,7 +157,14 @@ bool Recompiler::Recompile(
if (targetSymbol != image.symbols.end() && targetSymbol->address == address && targetSymbol->type == Symbol_Function)
{
println("\t{}(ctx, base);", targetSymbol->name);
if (config.nonVolatileRegistersAsLocalVariables && (targetSymbol->name.starts_with("__rest") || targetSymbol->name.starts_with("__save")))
{
// print nothing
}
else
{
println("\t{}(ctx, base);", targetSymbol->name);
}
}
else
{