Recompiler: Use implementation aliases

This commit is contained in:
Sajid
2024-09-30 18:45:07 +06:00
parent c4de70262f
commit 8d8346c2a2
2 changed files with 10 additions and 3 deletions

View File

@@ -1972,15 +1972,18 @@ bool Recompiler::Recompile(const Function& fn)
}
auto symbol = image.symbols.find(fn.base);
std::string name;
if (symbol != image.symbols.end())
{
println("PPC_WEAK_FUNC({}) {{", symbol->name);
name = symbol->name;
}
else
{
println("PPC_WEAK_FUNC(sub_{}) {{", fn.base);
name = std::format("sub_{}", fn.base);
}
println("__attribute__((alias(\"__imp__{}\"))) PPC_WEAK_FUNC({});", name, name);
println("PPC_FUNC_IMPL(__imp__{}) {{", name);
println("\tPPC_FUNC_PROLOGUE();");
auto switchTable = switchTables.end();