Commit 84e7aaf
The last hard-fail named by the v0.11.40 acceptance review: a high-pressure
i64 module now compiles with no hard-fail.
ROOT CAUSE (differs from the review's reading): the pair allocator
(alloc_consecutive_pair) has ALWAYS spilled register-resident stack values —
pair-aware, both halves into one 8-byte slot (#171). The remaining
"no consecutive pair of free registers for i64" Err fires only when the
operand stack holds nothing register-resident and the blockers are the
PINNED PARAM HOME REGISTERS (#193 `reserved`, up to r0-r3) plus the popped
operand pairs (`extra_avoid`, up to 4 regs) — 8 of the 9-register pool, no
pair left, and no amount of stack spilling can free a param home register.
FIX (same structural-bit-identity pattern as #320): a third retry mode,
`set_param_backing_on_exhaustion`, forces the proven #204 `param_slots`
frame-backing for call-free functions — params spill to frame slots at entry
and reload on read, so `reserved` empties and a free consecutive pair always
exists after stack spilling (extra_avoid is at most two adjacent pairs among
nine registers; pigeonhole over the free segments). The backend's
select_direct ladder: pass 1 default → pass 2 spill-only (#320, on the
single-reg Err) → pass 3 spill+param-backing (on the pair Err). Functions
that compile on an earlier pass are selected by exactly yesterday's code.
Loop bound unchanged: each spill_deepest_reg iteration converts one
StackVal::Reg to Spilled. Honest remaining bound: the i64 spill-slot pool
("spill-slot pool exhausted"), deliberately NOT retried.
EVIDENCE
- scripts/repro/high_pressure_i64.wat: 4 simultaneously-live i64 consts +
4 pinned i32 params. On main: skipped with the exact pair Err. On this
branch: compiles; high_pressure_i64_differential.py (unicorn vs wasmtime,
i64 result in r0:r1, large/negative vectors) 6/6 ORACLE PASS.
- Bit-identity vs origin/main (cortex-m4, per differential headers):
control_step 8248…32f6, div_const cada…45ede, flight_seam_flat 03ce…8579,
high_pressure_i32 355c…e6c2 — all pairwise sha256-identical; all three
frozen differentials ORACLE PASS on the branch.
- Tests: 5 new (pair victim spill, single victims, pinned-blockers Err
preserved verbatim, spilled-pair reload on pop, end-to-end 3-pass ladder);
synth-synthesis 382 lib tests green; workspace 1468 passed / 0 failed.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 84e1a5d commit 84e7aaf
4 files changed
Lines changed: 473 additions & 55 deletions
File tree
- crates
- synth-backend/src
- synth-synthesis/src
- scripts/repro
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
197 | 199 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
213 | 227 | | |
| 228 | + | |
214 | 229 | | |
215 | 230 | | |
216 | 231 | | |
| |||
0 commit comments