PPCAnalyst: Skip nop alignment

This commit is contained in:
Sepalani
2017-04-10 23:43:06 +01:00
parent 3f2f3679cd
commit dd039cd311

View File

@ -311,11 +311,13 @@ static void FindFunctionsAfterBLR(PPCSymbolDB* func_db)
{ {
while (true) while (true)
{ {
// Skip zeroes that sometimes pad function to 16 byte boundary (e.g. Donkey Kong Country // Skip zeroes (e.g. Donkey Kong Country Returns) and nop (e.g. libogc)
// Returns) // that sometimes pad function to 16 byte boundary.
PowerPC::TryReadInstResult read_result = PowerPC::TryReadInstruction(location); PowerPC::TryReadInstResult read_result = PowerPC::TryReadInstruction(location);
while (read_result.valid && read_result.hex == 0 && (location & 0xf) != 0) while (read_result.valid && (location & 0xf) != 0)
{ {
if (read_result.hex != 0 && read_result.hex != 0x60000000)
break;
location += 4; location += 4;
read_result = PowerPC::TryReadInstruction(location); read_result = PowerPC::TryReadInstruction(location);
} }