Step over ERET

This commit is contained in:
Kingcom 2014-02-24 10:52:21 +01:00
parent fbb0a77ce3
commit 8cd45189c3
1 changed files with 22 additions and 0 deletions

View File

@ -4,6 +4,7 @@
#include "DebugInterface.h"
#include "SymbolMap.h"
#include "DebugInterface.h"
#include "../R5900.h"
static std::vector<MIPSAnalyst::AnalyzedFunction> functions;
@ -372,6 +373,27 @@ namespace MIPSAnalyst
info.hasRelevantAddress = true;
info.releventAddress = cpu->getRegister(0,MIPS_GET_RS(op))._u32[0]+((s16)(op & 0xFFFF));
break;
case 0x10: // cop0
switch (MIPS_GET_RS(op))
{
case 0x10: // tlb
switch (MIPS_GET_FUNC(op))
{
case 0x18: // eret
info.isBranch = true;
info.isConditional = false;
// probably shouldn't be hard coded like this...
if (cpuRegs.CP0.n.Status.b.ERL) {
info.branchTarget = cpuRegs.CP0.n.ErrorEPC;
} else {
info.branchTarget = cpuRegs.CP0.n.EPC;
}
break;
}
break;
}
break;
}
// TODO: rest