mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-05 12:13:50 +01:00
When scanning or relocating, check replacements.
Just to make sure we don't wrongly detect the length or unresolve a var wrong etc.
This commit is contained in:
1 parent
e2664c7ec2
commit
ec94498342
5 files changed
+17
-17
No files matched your search
@@ -67,7 +67,7 @@ namespace MIPSStackWalk {
|
||||
// It ought to be pretty close.
|
||||
u32 stop = pc - 32 * 4;
|
||||
for (; Memory::IsValidAddress(pc) && pc >= stop; pc -= 4) {
|
||||
MIPSOpcode op = Memory::Read_Instruction(pc);
|
||||
MIPSOpcode op = Memory::Read_Instruction(pc, true);
|
||||
|
||||
// We're looking for a "mov fp, sp" close by a "addiu sp, sp, -N".
|
||||
if (IsMovRegsInstr(op) && _RD == MIPS_REG_FP && (_RS == MIPS_REG_SP || _RT == MIPS_REG_SP)) {
|
||||
@@ -83,7 +83,7 @@ namespace MIPSStackWalk {
|
||||
int ra_offset = -1;
|
||||
u32 stop = entry == INVALIDTARGET ? 0 : entry;
|
||||
for (u32 pc = frame.pc; Memory::IsValidAddress(pc) && pc >= stop; pc -= 4) {
|
||||
MIPSOpcode op = Memory::Read_Instruction(pc);
|
||||
MIPSOpcode op = Memory::Read_Instruction(pc, true);
|
||||
|
||||
// Here's where they store the ra address.
|
||||
if (IsSWInstr(op) && _RT == MIPS_REG_RA && _RS == MIPS_REG_SP) {
|
||||
|
||||
Reference in new issue
Block a user