mirror of
https://github.com/open-goal/jak-project
synced 2026-08-13 04:10:18 -04:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user