MCPcopy Create free account
hub / github.com/N64Recomp/N64Recomp / get_branch_targets

Function get_branch_targets

RSPRecomp/src/rsp_recomp.cpp:187–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185};
186
187BranchTargets get_branch_targets(const std::vector<rabbitizer::InstructionRsp>& instrs) {
188 BranchTargets ret;
189 for (const auto& instr : instrs) {
190 if (instr.isJumpWithAddress() || instr.isBranch()) {
191 ret.direct_targets.insert(instr.getBranchVramGeneric() & rsp_mem_mask);
192 }
193 if (instr.doesLink()) {
194 ret.indirect_targets.insert(instr.getVram() + 2 * instr_size);
195 }
196 }
197 return ret;
198}
199
200struct ResumeTargets {
201 std::unordered_set<uint32_t> non_delay_targets;

Callers 1

create_functionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected