summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2015-01-21 15:17:31 -0600
committerRyan Houdek <Sonicadvance1@gmail.com>2015-01-21 15:17:31 -0600
commite7f2a04699c0e7e622028b4feba07fb6f46142bf (patch)
treee88d442ddd0823639bb1d1d7670f2a0f0b988421 /Source/Core
parent621322bbae35483e13b112ad114352e06c67e1c9 (diff)
parent0ab15171344889d1d1160d3dcee137c3375c1149 (diff)
Merge pull request #1938 from CarlKenner/paddedfunctions
Skip zeroes that sometimes pad function to 16 byte boundary (eg. Donkey Kong Country Returns).
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/PPCAnalyst.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp
index 5233df6c05..97b81f4118 100644
--- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp
+++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp
@@ -313,6 +313,9 @@ static void FindFunctionsAfterBLR(PPCSymbolDB *func_db)
{
while (true)
{
+ // skip zeroes that sometimes pad function to 16 byte boundary (eg. Donkey Kong Country Returns)
+ while (Memory::Read_Instruction(location) == 0 && ((location & 0xf) != 0))
+ location += 4;
if (PPCTables::IsValidInstruction(Memory::Read_Instruction(location)))
{
//check if this function is already mapped