Use clang-cl for all projects & decrease recompiled CPP count.

This commit is contained in:
Skyth
2024-09-22 12:50:11 +03:00
parent 126d5c3aee
commit 918e09d380
6 changed files with 41 additions and 75 deletions

View File

@@ -1745,10 +1745,7 @@ bool Recompiler::Recompile(const Function& fn)
println("PPC_FUNC(sub_{}) {{", fn.base);
}
println("\t__assume((reinterpret_cast<size_t>(base) & 0xFFFFFFFF) == 0);");
println("\tPPCRegister temp;");
println("\tPPCVRegister vtemp;");
println("\tuint32_t ea;\n");
println("\tPPC_FUNC_PROLOGUE();");
auto switchTable = switchTables.end();
bool allRecompiled = true;
@@ -1817,13 +1814,13 @@ void Recompiler::Recompile(const char* directoryPath)
for (size_t i = 0; i < functions.size(); i++)
{
if ((i % 100) == 0)
if ((i % 256) == 0)
{
SaveCurrentOutData(directoryPath);
println("#include \"ppc_recomp_shared.h\"\n");
}
if ((i % 2000) == 0 || (i == (functions.size() - 1)))
if ((i % 2048) == 0 || (i == (functions.size() - 1)))
std::println("Recompiling functions... {}%", static_cast<float>(i + 1) / functions.size() * 100.0f);
Recompile(functions[i]);

View File

@@ -115,6 +115,7 @@ void SWARecompiler::Analyse()
else if (f.base == 0x82DE38A0) f.size = 0x16C;
else if (f.base == 0x830B7DD0) f.size = 0x74;
else if (f.base == 0x831B0BA0) f.size = 0xA0;
else if (f.base == 0x8305D168) f.size = 0x278;
};
for (const auto& section : image.sections)
@@ -145,7 +146,6 @@ void SWARecompiler::Analyse()
}
data = section.data;
const Symbol* prevSymbol = nullptr;
while (data < dataEnd)
{
@@ -168,7 +168,6 @@ void SWARecompiler::Analyse()
{
assert(fnSymbol->address == base);
prevSymbol = &*fnSymbol;
base += fnSymbol->size;
data += fnSymbol->size;
}