|
|
|
@@ -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;
|
|
|
|
|
}
|