Files
BFM-decomp/src/shared/clearTbl40.h
T
Drew T a8ae190fa3 feat(phase-11): T3 — intra-binary collapse PROOF (one body, two addresses, byte-identical)
- src/shared/clearTbl40.h: CLEAR_TBL40 macro = the matched byte-clear loop body, authored ONCE;
  instantiated at both func_80037004 and func_80037334 in src/800.c (one source -> two vrams)
- matched first try; clean rebuild main -> 143dbb89 BYTE-IDENTICAL WITH the shared C AND WITHOUT
  it (INCLUDE_ASM stub fallback) -> dual invariant proven (R22 clean rebuilds, both states)
- config/dedup.us.yaml: I0_clearTbl40 group registered (h_exact a0744d60…); dedup_integrate
  --check validates it; negative tests (corrupt hash / wrong vram) fail-closed (exit 1)
- tools/progress.py: count dedup-shared members as REAL via the registry (the macro form isn't a
  parseable function def); REAL 52 -> 54, byte-identical 50.24% -> 50.33%; honest measurement (P9)
- tools/dedup_integrate.py: display vram in hex in diagnostics
- the machinery half of the Phase-11 milestone is proven on the byte-verified EXE
2026-06-16 00:56:35 -06:00

22 lines
978 B
C

/* src/shared/clearTbl40.h — shared body for the byte-identical pair func_80037004 / func_80037334
* (Phase 11 dedup proof, group I0). The body is authored ONCE here as a macro and instantiated at
* each member site in src/800.c, so the same bytes land at both vrams (0x80037004 + 0x80037334).
* Registered in config/dedup.us.yaml; byte-honesty validated by tools/dedup_integrate.py.
*
* Clears 5 bytes of a table: D_80076251[i] = 0 for i = 0x40,0x30,0x20,0x10,0x00 (down-counting). */
#ifndef SHARED_CLEARTBL40_H
#define SHARED_CLEARTBL40_H
#include "common.h"
extern u8 D_80076251;
#define CLEAR_TBL40(name) \
void name(void) { \
s32 i; \
for (i = 0x40; i >= 0; i -= 0x10) { \
(&D_80076251)[i] = 0; \
} \
}
#endif /* SHARED_CLEARTBL40_H */