Skip to content

Match 2 functions byte-identical (mwccarm 1.2/sp2p3)#661

Merged
tangosdev merged 1 commit into
tangosdev:mainfrom
lunavyqo:match-batch1-020f1468-02124fd8
Jul 24, 2026
Merged

Match 2 functions byte-identical (mwccarm 1.2/sp2p3)#661
tangosdev merged 1 commit into
tangosdev:mainfrom
lunavyqo:match-batch1-020f1468-02124fd8

Conversation

@lunavyqo

Copy link
Copy Markdown
Contributor

Summary

Byte-identical matches (mwccarm 1.2/sp2p3), both match.py --strict-relocs + linkcheck VERIFIED.

Function Module Addr Size
func_ov002_020f1468 ov002 0x020f1468 0x110 (272)
func_ov006_02124fd8 ov006 0x02124fd8 0x10c (268)

How

  • func_ov002_020f1468: near-miss tip had inverted 0xff/zero branch logic. ROM sets 0xfa when val is 0 or 0xff, else multiplies by 10 via u64-mask c+0x32a. Matching mid-block coloring required not keeping a live p = c+0x300 across the y-store; direct *(c+0x32a) stores so y colors r1 and base colors r0, with set_fa rematerializing add r0,r4,#0x300.
  • func_ov006_02124fd8: near-miss for-loop always set p/q and used a single predicated >=2 tail. ROM skips setup when count<=0, uses do-while that reloads count each iteration, and if (fp < 2) return for the predicated early epilogue; u64-mask materializes c+0x51b8 for the increment.

Provenance

  • author: lunavyqo
  • matchProvenance: ai / grok-4.5 / high / grok-build
  • sessionScope: batch, batchSize: 2
  • attempt trees in config/match_attempts.jsonl; HOW stamped in config/match_provenance.jsonl

Test plan

  • python tools/match.py --c src/func_ov002_020f1468.c --func func_ov002_020f1468 --addr 0x20f1468 --size 0x110 --version 1.2/sp2p3 --module ov002 --strict-relocs → MATCH
  • python tools/match.py --c src/func_ov006_02124fd8.c --func func_ov006_02124fd8 --addr 0x2124fd8 --size 0x10c --version 1.2/sp2p3 --module ov006 --strict-relocs → MATCH
  • python tools/linkcheck.py for both → VERIFIED
  • CI validate green

- func_ov002_020f1468 @ 0x020f1468 (size 0x110): direct mid-block stores
  keep p out of the y/base schedule; set_fa rematerializes c+0x300; u64-mask
  multiply path; linkcheck VERIFIED
- func_ov006_02124fd8 @ 0x02124fd8 (size 0x10c): early count<=0 skip, do-while
  reloads count, predicated if(fp<2) return, u64-mask 0x51b8++; linkcheck VERIFIED

Author: lunavyqo. Attempt tree + provenance stamped (batch size 2).
@github-actions

Copy link
Copy Markdown
Contributor

✅ PR link validation — Passed

2 changed src file(s) compile to the ROM byte-for-byte with correct relocations

Per-file link-check detail

All 2 changed file(s) compile to the ROM byte-for-byte with correct relocation targets.

File Symbol Result Slots checked
src/func_ov002_020f1468.c func_ov002_020f1468 ✅ verified 1
src/func_ov006_02124fd8.c func_ov006_02124fd8 ✅ verified 1

Each changed src/*.c|*.cpp is compiled and its relocated bytes compared to the binary data on a private build box. Passing requires every changed file to reproduce the ROM byte-for-byte with correct relocation targets — this catches WRONG-DEST relocations and non-reproducing near-misses that ledger-scoped linkcheck skips.

@tangosdev
tangosdev merged commit a8c5d19 into tangosdev:main Jul 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants