Compare commits

...

6 Commits

Author SHA1 Message Date
devin
99d349a055 docs: aoss wave-5b — direct-global/fill-byte/decl-init/cross-block probes; wall stands
Co-authored-by: coah80 <usernamecole7@gmail.com>
Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-09 13:04:06 +00:00
devin
d756857880 docs: aoss wave-5 — **-load reproduces marshal order but rehomes addr web; wall confirmed
Co-authored-by: coah80 <usernamecole7@gmail.com>
Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-09 12:54:32 +00:00
devin
9739df6fc6 aoss wave-4 docs: opt_propagation lever assessed N/A
Co-authored-by: coah80 <usernamecole7@gmail.com>
Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-09 11:53:42 +00:00
devin
283e0f6a1f aoss wave-3 docs: volatile-param lever assessed N/A
Co-authored-by: coah80 <usernamecole7@gmail.com>
Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-09 10:54:08 +00:00
devin
b0197d5ce0 aoss wave-2 docs: opt-level sweep + twin-branch decode attempts
Co-authored-by: coah80 <usernamecole7@gmail.com>
Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-09 10:28:35 +00:00
devin
b0794c9e2a AOSS_Init_old: redundant ||-disjunct decode — 1582/1584 (534d, was 1578/722)
Orig's triple same-compare bne pairs are if(x!=0||*ptr==1) where the first
disjunct is provably dead: MWCC emits the shared-flags bne because ||
conditions skip the dead-branch fold a standalone if gets. Applied at the
SetNCDIPAddr else-site (s_accessPointConfig[0]==1, reloc-verified).
WLANConnect's 2d sched-copy wall confirmed unreachable.

Co-authored-by: coah80 <usernamecole7@gmail.com>
Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-09 09:29:18 +00:00
2 changed files with 72 additions and 1 deletions

View File

@@ -612,7 +612,7 @@ int AOSS_Init_old(AOSSInitInput* input)
resultCode = 0xffffffff;
} else {
/* The original initialization path repeats this status check. */
if (state != 0) {
if (state != 0 || s_accessPointConfig[0] == 1) {
input->status = 0xf;
if (s_accessPointConfig) {
AOSSi_Free(s_accessPointConfig);

View File

@@ -112,3 +112,74 @@ GATE PASS
```
Independent focused checks: AOSS pool 1/1 strings identical, AOSSLink 0/0 identical; WLANConnect odiff/ctxdiff 2/155, equal 0x26c sizes. Init odiff/ctxdiff 1263 differences, 1578/1584 instructions, sizes 0x18a8/0x18c0. No new exact functions. The data regression is fully repaired; both units remain unlinked. All experimental AOSSLink and compiler changes were discarded. Retained paths are AOSS.c and this attempts log.
## w1011/aoss continuation (worker devin-w1011)
### NEW LEVER: redundant `||` disjunct emits dead same-flags branch
`AOSS_Init_old` triple-`bne` decode: orig's `cmpwi r3,0; bne A; bne B; lwz cfg; lwz *cfg; cmplwi 1; beq B` = `if (state != 0) ->A` then `if (state != 0 || *ptr == 1) ->B` — MWCC emits the provably-dead first disjunct's `bne` because `||` conditions do NOT get the dead-branch fold a standalone `if (state != 0)` does (verified: same-var inner if folds entirely; different-var holding same value also folds — VN unifies). Fix applied at the SetNCDIPAddr else-site: inner `if (state != 0 || s_accessPointConfig[0] == 1)` (reloc-verified: insn 373/374 = s_accessPointConfig then *cfg). 1582/1584 insns, 534 positional diffs (was 1578/722). `else if` form breaks braces — kept `else { if (cond||x) {...} work }`.
- Residual per-site mapping unclear: my pair landed at MY insn ~304 while orig's three pairs sit at 371/713/1273 — the other two `if (state != 0)` sites (BSSList/CheckAP ~539, wait_for_packet ~1132) likely need the same idiom.
- Also remaining: `ble; b` dual-branch at 272 (`manufacturerLength <= 0xd` — orig enters body via taken-ble + unconditional-b; ours single bgt), protocol-constant materialization region ~566-590 (mulhw + lis/addi 0xc0a80b01 store+reload — IP 192.168.11.1 materialized via named constant?), spill-order block ~969-985.
- AOSSi_WLANConnect: all sched-copy shapes dead-end (u8* typed view cross-block, shared fillByte, result-as-fill, view-first chain, cfg-block) — swarm's two required internal shapes (chain-copy / r4+r5 both reg-copies) unreachable from source. Confirmed wall.
## w1011/aoss wave-2 (opt-level + twin-branch decode)
- `#pragma optimization_level 2` scoped to AOSS_Init_old: 1603 insns/1040 diffs (regression). `optimization_level 3`: inert (identical 1582/534 — O4,p TU flag dominates). `#pragma ppc_iro_level 0/1`: inert. Opt-level hypothesis (idct-style) disproved for this fn.
- insn-272 `ble;b` decoded from raw bytes (capstone printed reloc-addend targets — real targets are sign-extended imm): `0x40810008` = ble+8 -> memcpy body; `0x48000014` = b+0x14 -> SetNCDIPAddr args. Orig emits TWIN-BRANCH (ble->body + b->join) vs ours bgt-skip. Failed producers: goto-label form, explicit empty else{}, do{...}while(0), `|| *cfg` at lines 539/1194 (773d regression — orig does NOT deref *cfg at those sites). Likely an MWCC block-layout artifact — unresolved.
- Residual bne sites at orig 371/713/1273: NOT `||`-sites (adding *cfg loads regresses); undecoded.
## w1011/aoss wave-3 (volatile-param lever — assessed N/A)
- pdm's `volatile pf_u8* buf` idiom (ordered loads from hardware-filled mem) does NOT apply: WLANConnect's 2d is arg-marshal `li r5/mr r3` scheduling — no loads involved. `NCDIpConfig* volatile ipConfig` spills the pointer (166 insns/109d regression); `memset((volatile T*)p,...)` is an illegal qualifier-discard error on MWCC.
- Init_old residual regions (twin-branch @272, dead-bne @371/713/1273, materialization ~566-590, spills ~969-985) are control-flow/constant-materialization classes — no reordered buffer loads to pin. `*cfg`/`AOSSi_cancel_flag` reads already emit plain loads matching orig.
## w1011/aoss wave-4 (opt_propagation off — assessed N/A)
- Scoped `#pragma push/opt_propagation off/pop` around AOSS_Init_old: INERT (1582/534 identical). File-top unscoped: inert. WLANConnect: inert (2d). Pragma accepted (no warning) — but Init_old's `-O4,p` + `-inline off` + global `-ipa file` leaves nothing for it to change.
- Verified no prop-signature in residual: orig's `cmpw/cmplw reg,reg` sites (172/434/635/776/997/1098/1336, e.g. `extsh r0; cmpw r0,r16` loop-limit compares) all sit inside rename regions — mine emits the same reg-reg compares with different coloring, not `cmpwi` constant-folds. The 534d wall is reg allocation + the twin-branch + dead-bne sites, not propagation.
## w1011/aoss wave-5 (worker devin-w1011, marshal-order link hunt)
AOSSi_WLANConnect `li r4; li r5; mr r3` marshal order — new mechanism data:
- **`NCDIpConfig** pp = &ipConfig; memset(*pp, ...)` REPRODUCES base's marshal
order exactly: the surviving `*pp` load is the extra sched link that delays
the marshal into IU2 (confirmed — this is the "3rd link" the model wants).
Cost: `&ipConfig` demotes ipConfig to a memory slot, so the field-store web
becomes the codegen load temp which numbers AFTER named local `result`
(named locals vreg-number before codegen temps) -> addr web lands r28,
result takes r27 — the mirror image of base (~25 diffs, pure r27/r28 swap).
- Decl-order permutations (4), late `result = 0`, `pp` decl/init variants: all
emit identically — the temp's numbering is structural, not decl-sensitive.
`memset` return-value-as-result: 159 insns (garbage).
- Null-check block boundary (`if (!ipConfig) return -1;`): the check is NOT
deleted — emits real cmplw+b (+3-4 insns); no surviving copy.
- Dead store on the same web before memset flips the order but emits `stwu`
(155v156). Confirms again: only links that die post-RA without changing web
homes can win; every sched-visible link either emits (stw/lwz/branch),
folds pre-sched (copies, casts, member views, single-use slots via SRA),
or rehomes the web (`**` load).
- Per-fn `#pragma scheduling off` / `schedule_twice on`: identical 2-diff —
wall is upstream of the -O4,s list scheduler.
- `AOSSConnection`/`AOSSConnectionStatus` have no config-pointer member, so no
member-load operand exists for the marshal chain.
- AOSSi_WLANConnect stands at 2 diffs (marshal order only, 155v155 insns).
Remaining theoretical shape: an extra copy of the address whose source is
PHYSICAL (call result / param) — no NCD API returns a config pointer, and
no legitimately-dead expression produces one.
- orig .bss/.sbss fully owned (AOSSi_NcdIfConfig 0x0/0x15e, AOSSi_NcdIpConfig
0x160/0x7c4, sbss ip* globals + alloc/release/statusCallback + cancel_flag)
— no hidden pointer object; orig had no static config pointer.
- Direct-global shape (no ipConfig local, `AOSSi_NcdIpConfig.field` stores):
worse — memset arg folds to `addi r3` in-place (no marshal insn at all) and
the address web splits (r27/r28 across the two config structs).
- `memset(&AOSSi_NcdIpConfig, ...)` arg while keeping ipConfig local: same
2-diff (marshal still reads ipConfig's web? no — identical output).
- Fill-byte variants (`retries`, `result`, named u8 const): identical 2-diff.
`AOSSi_cancel_flag` shifts the block but is semantically wrong (fills with
flag value, not 0) — rejected.
- ipConfig init-at-decl (`= &AOSSi_NcdIpConfig` at declaration): web born
early -> pinned r29 across calls (home change, worse). Cross-block `dst`
copies (early def / use-past-branch): all fold.
- Exhausted: ~60 source forms + pragmas + decl permutations. The target needs
the marshal in IU2 behind a forwarded operand; no non-emitting, non-folding,
non-rehoming chain link exists from this source language level.