mirror of
https://github.com/open-goal/jak-project
synced 2026-07-07 14:13:45 -04:00
[decompiler] recognize more inlined vector functions (#637)
* detect vector+ * recognize reset
This commit is contained in:
@@ -131,7 +131,12 @@ Form* FormStack::pop_reg(Register reg,
|
||||
const RegSet& barrier,
|
||||
const Env& env,
|
||||
bool allow_side_effects,
|
||||
int begin_idx) {
|
||||
int begin_idx,
|
||||
RegisterAccess* orig_out,
|
||||
bool* found_orig_out) {
|
||||
if (found_orig_out) {
|
||||
*found_orig_out = false;
|
||||
}
|
||||
assert(allow_side_effects);
|
||||
(void)env; // keep this for easy debugging.
|
||||
RegSet modified;
|
||||
@@ -158,9 +163,18 @@ Form* FormStack::pop_reg(Register reg,
|
||||
assert(entry.sequence_point == false);
|
||||
auto result = pop_reg(entry.non_seq_source->reg(), barrier, env, allow_side_effects, i);
|
||||
if (result) {
|
||||
if (found_orig_out) {
|
||||
*found_orig_out = true;
|
||||
*orig_out = *entry.destination;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
if (found_orig_out) {
|
||||
*found_orig_out = true;
|
||||
*orig_out = *entry.destination;
|
||||
}
|
||||
return entry.source;
|
||||
} else {
|
||||
// we didn't match
|
||||
|
||||
Reference in New Issue
Block a user