mirror of
https://github.com/open-goal/jak-project
synced 2026-06-09 04:40:19 -04:00
[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user