mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-07-22 21:17:14 +00:00
Use clang-cl for all projects & decrease recompiled CPP count.
This commit is contained in:
@@ -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]);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user