| 51 | } |
| 52 | |
| 53 | u32 GetBranchTargetNoRA(u32 addr, MemoryInterface& reader) |
| 54 | { |
| 55 | u32 op = reader.Read32(addr); |
| 56 | const R5900::OPCODE& opcode = R5900::GetInstruction(op); |
| 57 | |
| 58 | int branchType = (opcode.flags & BRANCHTYPE_MASK); |
| 59 | if ((opcode.flags & IS_BRANCH) && (branchType == BRANCHTYPE_BRANCH || branchType == BRANCHTYPE_BC1 || branchType == BRANCHTYPE_BC0)) |
| 60 | { |
| 61 | if (!(opcode.flags & IS_LINKED)) |
| 62 | return addr + 4 + ((signed short)(op&0xFFFF)<<2); |
| 63 | else |
| 64 | return INVALIDTARGET; |
| 65 | } |
| 66 | else |
| 67 | return INVALIDTARGET; |
| 68 | } |
| 69 | |
| 70 | u32 GetSureBranchTarget(u32 addr, MemoryInterface& reader) |
| 71 | { |
no test coverage detected