[Decompiler] WIP: Stack Spills (#382)

* set up types

* cleaned up type analysis and got things working through atomic ops

* expression working, need types

* improved types and names

* getting close

* finish up dma-disasm

* fix
This commit is contained in:
water111
2021-04-25 14:48:54 -04:00
committed by GitHub
parent 54ccc9db97
commit 2002db359a
43 changed files with 3187 additions and 99 deletions
+6
View File
@@ -6,6 +6,7 @@
#include "decompiler/analysis/cfg_builder.h"
#include "decompiler/analysis/expression_build.h"
#include "decompiler/analysis/final_output.h"
#include "decompiler/analysis/stack_spill.h"
#include "decompiler/analysis/insert_lets.h"
#include "decompiler/util/config_parsers.h"
#include "common/goos/PrettyPrinter.h"
@@ -153,6 +154,11 @@ std::unique_ptr<FormRegressionTest::TestData> FormRegressionTest::make_function(
fmt::print("CFG:\n{}\n", test->func.cfg->to_dot());
}
// find stack spill slots
auto spill_map = build_spill_map(test->func.instructions,
{test->func.prologue_end, test->func.epilogue_start});
test->func.ir2.env.set_stack_spills(spill_map);
// convert instruction to atomic ops
DecompWarnings warnings;
auto ops = convert_function_to_atomic_ops(test->func, program.labels, warnings);