phase11: merge 53 — worker E's 0x800B0E64 -> 589 bodies / 598 regions

This commit is contained in:
Christopher Williams
2026-09-24 11:13:40 -04:00
parent ecbe17ad1d
commit f4e14569bd
3 changed files with 77 additions and 0 deletions
+1
View File
@@ -447,6 +447,7 @@
0x800AFDBC 0x800AFEB4 src/func_800AFDBC.c
0x800AFFB8 0x800AFFE4 src/func_800AFFB8.c
0x800B0E30 0x800B0E64 src/func_800B0E30.c
0x800B0E64 0x800B0ECC src/func_800B0E64.c
0x800B107C 0x800B1114 src/func_800B107C.c
0x800B1D5C 0x800B1DD0 src/func_800B1D5C.c
0x800B24EC 0x800B2534 src/func_800B24EC.c
1 # Code-region registry: one C region per matched function.
447 0x800AFDBC
448 0x800AFFB8
449 0x800B0E30
450 0x800B0E64
451 0x800B107C
452 0x800B1D5C
453 0x800B24EC
+23
View File
@@ -0,0 +1,23 @@
extern int D_80121B18;
extern void func_800F6F00();
int func_80026274(int a0) {
int neg = 1;
int x = a0;
int d;
if (x < 0) {
neg = 0;
x = -x;
}
d = D_80121B18 - x;
if (x == 0) {
return 0;
}
d = d - (d & 3);
D_80121B18 = d;
if (neg & 0xff) {
func_800F6F00(d, 0);
}
return d;
}
+53
View File
@@ -0,0 +1,53 @@
/*
* func_800B0E64 — 104 bytes at 0x800B0E64..0x800B0ECC
*
* Four zero-fills of fixed-size regions, then one gp-resident word cleared. First spelling.
*
* addiu sp,sp,-0x18 / sw ra,16(sp) frame 24: ra at 0x10, no other saved register, so
* nothing is live across the four calls.
* lui a0,0x8014 / addiu a0,a0,-14884 0x8013C5DC, materialised as a SYMBOL (addiu, not
* ori -- cookbook 89). The first a0 is built BEFORE
* the ra save; the later ones after each call returns.
* move a1,zero the fill value is 0 ...
* jal 0x800266A8 / li a2,6864 ... and the size is the call's delay slot.
* ... x3 with 176 and 8624 bytes at 0x8013E0AC and 0x8013E15C
* addiu a0,gp,3568 the FOURTH target is `gp`+-relative -- one
* instruction, not a lui/addiu pair. gp is 0x80121938,
* so this is 0x80122728, an already-registered gp symbol.
* jal 0x800266A8 / li a2,4
* sw zero,1768(gp) the tail clears the gp-resident word at 0x80122020.
*
* The four calls differ only in destination and size, and the sizes (6864 / 176 / 8624 / 4) are
* taken straight from the `li` immediates. All four go to the same callee, so the argument shape
* is paid once: (destination, 0, size) with the size in the jump delay slot every time.
*
* The address forms are the one byte-bearing choice here, and they are NOT uniform:
* * the first three are ABSOLUTE (`lui 0x8014` + `addiu`), so their symbols carry no gp marker;
* * the fourth is `gp`+-relative (`addiu a0,gp,3568`), which needs the symbol to be gp-marked
* in the registry -- an `&symbol` whose marker is absent silently resolves absolutely and
* costs the extra `lui` (cookbook 30's name-keyed-gp trap, cookbook 46).
*
* LIMITS: func_800266A8 is a cross-reference by address only; the (dest, value, size) reading is
* from the emitted argument registers and the delay-slot `li`, not from a recovered prototype.
* `D_8013C5DC` / `D_8013E0AC` / `D_8013E15C` are address symbols (name == address, so they need
* no registry row) declared as `char[]` to make them pass as addresses; the true object types and
* sizes are not recovered -- only the three sizes the source passes. `D_80122728` and
* `D_80122020` are the already-registered gp-marked globals at gp+3568 and gp+1768.
*/
extern void func_800266A8(char *a0, int a1, int a2);
extern char D_8013C5DC[];
extern char D_8013E0AC[];
extern char D_8013E15C[];
extern int D_80122728;
extern int D_80122020;
void func_800B0E64(void)
{
func_800266A8(D_8013C5DC, 0, 6864);
func_800266A8(D_8013E0AC, 0, 176);
func_800266A8(D_8013E15C, 0, 8624);
func_800266A8((char *)&D_80122728, 0, 4);
D_80122020 = 0;
}