mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-29 07:10:32 -04:00
fix(main): declare the 3 return-type-flip fns s32, not void — byte-neutral, unblocks their drafts
src/800.c declares func_8002A544/func_8002A2D4/func_8002A7B4 as `extern void f(s32)`, but each
body genuinely materializes a value in $v0 on both exits (asm-proven). Under a true void signature
gcc-2.7.2 dead-codes exactly those materializations, so the byte-correct s32 body can never compile
in this TU — cookbook §43's 'return-type flip pair', which §183 records as TU-edit-required.
All three call sites discard the result (`func_8002A544(0x32);` as a bare statement), so widening
the declaration cannot change a caller. NEGATIVE CONTROL, run twice: with the edit applied and NO
draft substituted, main still builds 143dbb89f34491258bbc27810d0a12ec8b43a8dd, identical to
config/check.us.sha. The edit is byte-neutral by measurement, not by argument.
Committing it SEPARATELY because gate_main snapshots and restores the TU between passes: an
uncommitted edit is reverted before the gate ever sees it (measured — the first attempt banked 4 of
7 and left all three of these as stubs).
Note for the record: the S66 overlay reconcile lane proved this class also has DRAFT-ONLY escapes
that need no TU edit at all — §202's asm-label alias (`s32 aF800CCBC0(void) __asm__("func_800CCBC0")`,
used byte-proven on func_800CCBC0 and func_800D30D0) and a new register-$2 + input-barrier + shared
goto-exit lever (func_800D2A24). Those are the smaller blast radius and should be preferred where
the TU is shared; this edit is kept because it is proven neutral and these three drafts already
exist in s32 form.
This commit is contained in:
@@ -14853,7 +14853,7 @@ void func_8002958C(s32 arg0) {
|
||||
}
|
||||
|
||||
|
||||
extern void func_8002A544(s32);
|
||||
extern s32 func_8002A544(s32);
|
||||
extern s32 D_80078E88;
|
||||
|
||||
void func_8002959C(void) {
|
||||
@@ -15195,7 +15195,7 @@ extern s32 func_80029504(void);
|
||||
extern s32 D_80078F04;
|
||||
extern s32 D_80078F08;
|
||||
extern s32 D_80078F0C;
|
||||
extern void func_8002A2D4(s32);
|
||||
extern s32 func_8002A2D4(s32);
|
||||
|
||||
void func_80029ED4(s32 arg0) {
|
||||
s32 v0;
|
||||
@@ -15470,7 +15470,7 @@ s32 func_8002A4FC(s32 a0) {
|
||||
return *(u16 *)(D_800638FE + D_80078EEC * 16);
|
||||
}
|
||||
|
||||
extern void func_8002A544(s32);
|
||||
extern s32 func_8002A544(s32);
|
||||
|
||||
void func_8002A520(s32 arg0) {
|
||||
func_8002A544(*(u8 *) (arg0 + 200));
|
||||
@@ -15575,7 +15575,7 @@ s32 func_8002A76C(void) {
|
||||
return D_80063902[D_80078EFC][0];
|
||||
}
|
||||
|
||||
extern void func_8002A7B4(s32);
|
||||
extern s32 func_8002A7B4(s32);
|
||||
|
||||
void func_8002A790(u8 *a0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user