[decompiler] ASM Branching Support (#677)

* basic example working in geometry

* before updating offline'

* clean up

* temp

* progress
This commit is contained in:
water111
2021-07-05 16:07:07 -04:00
committed by GitHub
parent 54c63ff42c
commit 551a9c4955
42 changed files with 4161 additions and 272 deletions
+9 -1
View File
@@ -219,7 +219,15 @@ void ObjectFileDB::ir2_basic_block_pass(const Config& config) {
if (lookup != config.hacks.cond_with_else_len_by_func_name.end()) {
hack = lookup->second;
}
func.cfg = build_cfg(data.linked_data, segment_id, func, hack);
std::unordered_set<int> asm_br_blocks;
auto asm_lookup =
config.hacks.blocks_ending_in_asm_branch_by_func_name.find(func.guessed_name.to_string());
if (asm_lookup != config.hacks.blocks_ending_in_asm_branch_by_func_name.end()) {
asm_br_blocks = asm_lookup->second;
}
func.cfg = build_cfg(data.linked_data, segment_id, func, hack, asm_br_blocks);
if (!func.cfg->is_fully_resolved()) {
lg::warn("Function {} from {} failed to build control flow graph!",
func.guessed_name.to_string(), data.to_unique_name());