mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-07 17:31:49 -04:00
feat(phase-30 T6): SC07 EXTEND lane 0/36 -> 15 banked; the 4 "DIFF"s are a volatile decl
Banked 15 h_exact members into the 4 SC07 overlays via dedup_extend, and
diagnosed the class that dedup_extend's own header records as UNDIAGNOSED.
THE 4 DIFFs ARE NOT A CODEGEN WALL. dedup_extend's correctness argument says an
h_exact match guarantees byte-identity including relocs, so a DIFF should be
impossible. Both halves of that tension resolved against the bytes:
1. The contract HOLDS. func_80162FF4's original bytes are sha1-identical in
ov_SC07_006 and ov_SC01_000 (af1aceb2...), so the registry is not lying.
2. The cause is TU CONTEXT. The SC07 host TU (_jr_8015C32C.c:1177) declares
`extern volatile s32 D_80127090/94/98` at FILE scope; none of the 134
working overlays' copy of that TU does. Volatile makes the macro's three
stores a scheduling barrier, so `addu $a0,$s2,$zero` cannot sink into the
`jal func_80146D30` delay slot -- the built body emits it early plus a nop,
one instruction longer. Measured word-for-word against the payload:
built +0x090 addu / lui,sw x3 / jal / NOP
ref +0x090 lui,sw x3 / jal / addu-in-delay-slot
All 4 DIFF macros touch exactly those 3 symbols, which is why all 4 fail in
all 4 binaries and nowhere else.
Fix: the §37/§124 DATA asm-label alias inside the 4 macros
(`extern s32 aD_80127090 __asm__("D_80127090")`) -- a distinct C identifier is
immune to any TU's declaration of the symbol, and is byte-neutral by
construction in the other 134 (same symbol, same type, same non-volatile
semantics). In-tree precedent: ov_SC06_008_jr_80135D20.c:1434.
R22 clean-fleet: make clean && extract-all && check-all -> 140 passed, 0 failed
of 140, with the 15 banks AND the alias edit in.
Remaining in this lane, both named not walled: func_80144B9C x4 (the whale --
its registry `func` field is a bare name, not a DEFINE_ macro, so write_drafts
emits a CALL; it needs the §38 -O0 shared-header route, and dedup_extend should
refuse-and-name it per R32) and func_80149954 x1 (blocked behind func_80147364,
whose u16 params make the `()` no-prototype escape illegal -- the documented
gcc-2.7.2 default-promotion dead-end; needs the alias or a de-macroize).
This commit is contained in:
+24
-24
@@ -10736,9 +10736,9 @@
|
||||
}
|
||||
|
||||
#define DEFINE_func_80163194() \
|
||||
extern s32 D_80127090; \
|
||||
extern s32 D_80127094; \
|
||||
extern s32 D_80127098; \
|
||||
extern s32 aD_80127090 __asm__("D_80127090"); \
|
||||
extern s32 aD_80127094 __asm__("D_80127094"); \
|
||||
extern s32 aD_80127098 __asm__("D_80127098"); \
|
||||
extern void func_80162F60(s32 arg0, s32 arg1); \
|
||||
extern void func_80162F80(s32 arg0, s32 arg1); \
|
||||
extern void func_80162FA0(s32 arg0, s32 arg1); \
|
||||
@@ -10752,9 +10752,9 @@
|
||||
func_80162F80(a0, a2); \
|
||||
func_80162FA0(a0, a3); \
|
||||
func_800484EC(arg4, a0 + 0x24, (s32)out); \
|
||||
D_80127090 = out[0]; \
|
||||
D_80127094 = out[1]; \
|
||||
D_80127098 = out[2]; \
|
||||
aD_80127090 = out[0]; \
|
||||
aD_80127094 = out[1]; \
|
||||
aD_80127098 = out[2]; \
|
||||
func_80146D30(a0); \
|
||||
}
|
||||
|
||||
@@ -11551,9 +11551,9 @@
|
||||
extern void func_800123F0(s32 a0, s32 a1); \
|
||||
extern void func_800484EC(s32 a0, s32 a1, s32 a2); \
|
||||
extern void func_80146D30(s32 a0); \
|
||||
extern s32 D_80127090; \
|
||||
extern s32 D_80127094; \
|
||||
extern s32 D_80127098; \
|
||||
extern s32 aD_80127090 __asm__("D_80127090"); \
|
||||
extern s32 aD_80127094 __asm__("D_80127094"); \
|
||||
extern s32 aD_80127098 __asm__("D_80127098"); \
|
||||
void func_80162FF4(s32 a0, s32 a1, s32 a2, s32 a3) { \
|
||||
s32 sp[16]; \
|
||||
s32 s2 = a0; \
|
||||
@@ -11570,9 +11570,9 @@
|
||||
func_80012558((s32)q, *(s16 *)(s1 + 0x12)); \
|
||||
func_800123F0((s32)q, *(s16 *)(s1 + 0x14)); \
|
||||
func_800484EC((s32)q, s2 + 0x24, (s32)&sp[4]); \
|
||||
D_80127090 = sp[4]; \
|
||||
D_80127094 = sp[5]; \
|
||||
D_80127098 = sp[6]; \
|
||||
aD_80127090 = sp[4]; \
|
||||
aD_80127094 = sp[5]; \
|
||||
aD_80127098 = sp[6]; \
|
||||
func_80146D30(s2); \
|
||||
}
|
||||
|
||||
@@ -11586,9 +11586,9 @@
|
||||
extern void func_800123F0(s32 a0, s32 a1); \
|
||||
extern void func_800484EC(s32 a0, s32 a1, s32 a2); \
|
||||
extern void func_80146D30(s32 a0); \
|
||||
extern s32 D_80127090; \
|
||||
extern s32 D_80127094; \
|
||||
extern s32 D_80127098; \
|
||||
extern s32 aD_80127090 __asm__("D_80127090"); \
|
||||
extern s32 aD_80127094 __asm__("D_80127094"); \
|
||||
extern s32 aD_80127098 __asm__("D_80127098"); \
|
||||
void func_801630C4(s32 a0, s32 a1, s32 a2, s32 a3) { \
|
||||
s32 sp[16]; \
|
||||
s32 s2 = a0; \
|
||||
@@ -11605,9 +11605,9 @@
|
||||
func_800126C4((s32)q, *(s16 *)(s1 + 0x10)); \
|
||||
func_800123F0((s32)q, *(s16 *)(s1 + 0x14)); \
|
||||
func_800484EC((s32)q, s2 + 0x24, (s32)&sp[4]); \
|
||||
D_80127090 = sp[4]; \
|
||||
D_80127094 = sp[5]; \
|
||||
D_80127098 = sp[6]; \
|
||||
aD_80127090 = sp[4]; \
|
||||
aD_80127094 = sp[5]; \
|
||||
aD_80127098 = sp[6]; \
|
||||
func_80146D30(s2); \
|
||||
}
|
||||
|
||||
@@ -15429,16 +15429,16 @@
|
||||
extern void func_80162F80(s32 arg0, s32 arg1); \
|
||||
extern void func_80162FA0(s32 arg0, s32 arg1); \
|
||||
extern void func_80146D30(s32 a0); \
|
||||
extern s32 D_80127090; \
|
||||
extern s32 D_80127094; \
|
||||
extern s32 D_80127098; \
|
||||
extern s32 aD_80127090 __asm__("D_80127090"); \
|
||||
extern s32 aD_80127094 __asm__("D_80127094"); \
|
||||
extern s32 aD_80127098 __asm__("D_80127098"); \
|
||||
void func_8016325C(s32 a0, s32 a1, s32 a2, s32 a3) { \
|
||||
func_80162F60(a0, a1); \
|
||||
func_80162F80(a0, a2); \
|
||||
func_80162FA0(a0, a3); \
|
||||
D_80127090 = *(s32 *)(a0 + 0x24); \
|
||||
D_80127094 = *(s32 *)(a0 + 0x28); \
|
||||
D_80127098 = *(s32 *)(a0 + 0x2C); \
|
||||
aD_80127090 = *(s32 *)(a0 + 0x24); \
|
||||
aD_80127094 = *(s32 *)(a0 + 0x28); \
|
||||
aD_80127098 = *(s32 *)(a0 + 0x2C); \
|
||||
func_80146D30(a0); \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user