phase6: add the symbol registry and per-region flag overrides, and register 0x8002D2A0

This commit is contained in:
Christopher Williams
2026-09-23 20:54:10 -04:00
parent 73e8cd9a2e
commit 673edb2ded
8 changed files with 342 additions and 26 deletions
+27
View File
@@ -0,0 +1,27 @@
/*
* func_8002D2A0 — 28 bytes at 0x8002D2A0..0x8002D2BC
*
* Byte-identical reconstruction of a leaf predicate. The original loads a
* global word, subtracts the first argument, and returns whether the unsigned
* difference is at least the second argument.
*
* The observed instructions are:
* lui v0,0x8012 \ v0 = g_80122354
* lw v0,9044(v0) /
* nop
* subu v0,v0,a0 v0 = g - a
* sltu v0,v0,a1 v0 = (g - a) < b
* jr ra
* xori v0,v0,0x1 return !((g - a) < b) (delay slot)
*
* LIMITS: the function name, the global's name and its type are hypotheses
* reconstructed from the disassembly. Only the compiled bytes are evidence.
* `g_80122354` is defined by the tracked `config/symbols.tsv`; it is an
* address placeholder, not a proven name.
*/
extern int g_80122354;
int func_8002D2A0(int a, int b) {
return (unsigned)(g_80122354 - a) >= (unsigned)b;
}