[decompiler] handle pointer to symbol value, clean up prints on offline test (#1978)

- fix issue described in
https://github.com/open-goal/jak-project/issues/1939
- fix `text`, which was manually patched with the wrong offset (was
reading the symbol value off by one byte)
- clean up some random useless prints
- make the offline tests keep trying if there's a comparison error,
clean up the output a bit so the diffs are all at the end.
This commit is contained in:
water111
2022-10-16 18:19:59 -04:00
committed by GitHub
parent e7bb0fb68d
commit ddd60fca48
21 changed files with 291 additions and 509 deletions
+11
View File
@@ -1193,6 +1193,17 @@ Instruction decode_instruction(LinkedWord& word, LinkedObjectFile& file, int seg
ASSERT(fixed);
}
if (word.kind() == LinkedWord::SYM_VAL_OFFSET) {
bool fixed = false;
for (int j = 0; j < i.n_src; j++) {
if (i.src[j].kind == InstructionAtom::IMM) {
fixed = true;
i.src[j].set_sym_val_ptr(word.symbol_name());
}
}
ASSERT(fixed);
}
if (word.kind() == LinkedWord::HI_PTR) {
ASSERT(i.kind == InstructionKind::LUI);
bool fixed = false;