You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tier 1, no trusted-base change (new Asm instructions, if any, are reviewed as usual). A batch of small x86 code-generation fixes, each measured by assembly surgery.
item
benchmark
effect
Stack arrays use ofs(%rsp,idx,scale), so leaq 24(%rsp),%rX is not recomputed before every access
sha1
57.6 → 53.5 ms (−7%)
Zero-extending byte loads into a 64-bit register: movzbl producing a Vlong, removing the remaining movl %r,%r after byte loads. Needs a new memory chunk or a Mach-level fusion; the current fused ops cover shifts and masks only
siphash24
8 → 5 per word done; all 8 → 0.0824 vs 0.0837 s
Byte-field extraction (x >> 8) & 0xff as movzbl %ah-style instead of movq/shrl/andl/movl
vmach
part of the remaining ~9%
Rotate recognition in remaining patterns (shld)
sha3
small
Each fix: selection/Asmgen change + proof, measured alone and combined.
Acceptance criteria
Complete proofs: no Admitted, admit or new Axiom. check_axioms.sh adds at most flag or validated-oracle parameters.
make proof succeeds on x86_64, x86_32, aarch64, arm, powerpc and rv64. Stubs on non-x86 targets are fine.
make -C test all test passes.
Benchmarks:
full test/c suite, plus the larger programs once that evaluation issue lands;
no regression beyond noise;
the change is also measured combined with all the passes already on master, using the -fno-* flags for ablation (see REPORT.md §2.4).
Compile-time and code-size impact reported.
New behaviour can be turned off with a -fno-* flag.
Stack-array addressing (ofs(%rsp,idx,scale), sha1 −7%) is instruction selection only, so it stays Tier 1 and can proceed.
Zero-extending byte loads into a 64-bit register and movzbl %ah-style byte-field extraction need new Asm instructions/semantics in x86/Asm.v, so they are Tier 2. They will get a proposal of their own (like the one on x86: load-op memory operands (addsd mem,%x) [needs trusted-base approval] #5) once the Tier 1 part is done.
Additional Tier 1 item found during #7: 64-bit rotate by 1 is not recognised. In sha3's keccakf, ROTL64(x,1) compiles to lea/mov/shr/or (4 instructions) instead of rolq, 5 times per round. As with the 32-bit case fixed earlier, x<<1 has already become a lea (Oleal) before orl can match the shl/shr pair. The fix belongs in x86/SelectLong.vp (orl should use an is_shllimm-style recognizer that also accepts the scaled lea form), with its proof in SelectLongproof.v. This is selection only, so Tier 1.
Activity
AananthV commentedon Oct 22, 2026
Split by the protocol (#1):
ofs(%rsp,idx,scale), sha1 −7%) is instruction selection only, so it stays Tier 1 and can proceed.movzbl %ah-style byte-field extraction need new Asm instructions/semantics inx86/Asm.v, so they are Tier 2. They will get a proposal of their own (like the one on x86: load-op memory operands (addsd mem,%x) [needs trusted-base approval] #5) once the Tier 1 part is done.AananthV commentedon Oct 22, 2026
Additional Tier 1 item found during #7: 64-bit rotate by 1 is not recognised. In sha3's keccakf,
ROTL64(x,1)compiles tolea/mov/shr/or(4 instructions) instead ofrolq, 5 times per round. As with the 32-bit case fixed earlier,x<<1has already become alea(Oleal) beforeorlcan match the shl/shr pair. The fix belongs inx86/SelectLong.vp(orlshould use anis_shllimm-style recognizer that also accepts the scaledleaform), with its proof in SelectLongproof.v. This is selection only, so Tier 1.AananthV commentedon Oct 22, 2026
Tier 1 part (stack-array addressing, 64-bit rotate by 1) in progress on branch
issue-6-x86-codegen.