MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / GetJumpTarget

Function GetJumpTarget

pcsx2/DebugTools/MIPSAnalyst.cpp:27–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace MIPSAnalyst
26{
27 u32 GetJumpTarget(u32 addr, MemoryInterface& reader)
28 {
29 u32 op = reader.Read32(addr);
30 const R5900::OPCODE& opcode = R5900::GetInstruction(op);
31
32 if ((opcode.flags & IS_BRANCH) && (opcode.flags & BRANCHTYPE_MASK) == BRANCHTYPE_JUMP)
33 {
34 u32 target = (addr & 0xF0000000) | ((op&0x03FFFFFF) << 2);
35 return target;
36 }
37 else
38 return INVALIDTARGET;
39 }
40
41 u32 GetBranchTarget(u32 addr, MemoryInterface& reader)
42 {

Callers 2

ScanAheadForJumpbackFunction · 0.85
ScanForFunctionsFunction · 0.85

Calls 1

Read32Method · 0.45

Tested by

no test coverage detected