match(NHTTP_recvbuf): NHTTPi_RecvBufN #559

Merged
coah80 merged 2 commits from matcher/NHTTPi_RecvBufN into main 2026-10-02 00:51:26 +00:00
coah80 commented 2026-10-01 22:30:25 +00:00 (Migrated from github.com)

Summary

Exact match for NHTTPi_RecvBufN.

  • Declare available before response so MWCC keeps the response pointer in r10.
  • Reload recvBufLen through a volatile load (instead of CSE of the early compare load) and materialize buf before the clamp, matching target lwz/subf/add order.

Progress

functions code bytes
before 2/7 60/1692
after 3/7 120/1692

Unit stays NonMatching.

DOL

sha1: 26116613f624061ba99c8d1a299aaa6efa85670d (unchanged; authority over objdiff data %).

## Summary Exact match for `NHTTPi_RecvBufN`. - Declare `available` before `response` so MWCC keeps the response pointer in `r10`. - Reload `recvBufLen` through a volatile load (instead of CSE of the early compare load) and materialize `buf` before the clamp, matching target `lwz`/`subf`/`add` order. ## Progress | | functions | code bytes | |---|---|---| | before | 2/7 | 60/1692 | | after | 3/7 | 120/1692 | Unit stays NonMatching. ## DOL `sha1: 26116613f624061ba99c8d1a299aaa6efa85670d` (unchanged; authority over objdiff data %).
coah80 commented 2026-10-01 22:44:54 +00:00 (Migrated from github.com)

Blocked by one forbidden pattern: *(volatile u32*)&response->recvBufLen is a use-site volatile cast. Try ordinary source shapes (load recvBufLen into a local first, change declaration order, split available, declsearch.py). If the target really re-reads the field, put volatile on the struct field declaration with asm evidence.

Blocked by one forbidden pattern: `*(volatile u32*)&response->recvBufLen` is a use-site volatile cast. Try ordinary source shapes (load recvBufLen into a local first, change declaration order, split `available`, declsearch.py). If the target really re-reads the field, put volatile on the struct field declaration with asm evidence.
coah80 commented 2026-10-02 00:47:46 +00:00 (Migrated from github.com)

Orchestrator follow-up: replaced the use-site cast with volatile u32 recvBufLen on the field declaration. The target re-reads recvBufLen back to back, so the field is volatile. Verified: NHTTPi_RecvBufN ctxdiff 0, and no other function in the six NHTTP units that touch the field changes.

Orchestrator follow-up: replaced the use-site cast with `volatile u32 recvBufLen` on the field declaration. The target re-reads recvBufLen back to back, so the field is volatile. Verified: NHTTPi_RecvBufN ctxdiff 0, and no other function in the six NHTTP units that touch the field changes.
coah80 commented 2026-10-02 00:51:23 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.