[Decompiler] Fix up pretty printing and other small changes (#311)

* fix up pretty printing

* wip

* fix pointer cast signed vs unsigned issue
This commit is contained in:
water111
2021-03-06 20:16:48 -05:00
committed by GitHub
parent 0bf189f582
commit d8a82eeca1
16 changed files with 745 additions and 454 deletions
+7
View File
@@ -267,6 +267,13 @@ FormElement* StoreOp::get_as_form(FormPool& pool, const Env& env) const {
assert(false);
}
if (m_value.is_var()) {
auto input_var_type = env.get_types_before_op(m_my_idx).get(m_value.var().reg());
if (env.dts->ts.tc(TypeSpec("uinteger"), input_var_type.typespec())) {
cast_type.insert(cast_type.begin(), 'u');
}
}
auto source = pool.alloc_single_element_form<SimpleExpressionElement>(
nullptr, SimpleAtom::make_var(ro.var).as_expr(), m_my_idx);
auto cast_source = pool.alloc_single_element_form<CastElement>(