| 185 | }; |
| 186 | |
| 187 | BranchTargets 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 | |
| 200 | struct ResumeTargets { |
| 201 | std::unordered_set<uint32_t> non_delay_targets; |