tooling: record the forms of the CLZERO fixture for form coverage #1396
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1396
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1396/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Maxim-Root on GitHub · 2026-11-24 10:29 UTC · original
Maxim-Root:tooling/clzero-form-coverage→main· +20 −0 · 3 files · 1 commits · merged 2026-11-24 10:45 UTCChange
clzerois counted asunobservedin the x64 form-coverage report, althoughcpu_counted_clzero(#1230) translates and compares CLZERO loops and passes.tests/cpu/counted_clzero.asmhas no; coverage:first line, sotools/form_coverage.pylists it asunclassified. Adding asourceline would not help either: ML64 has no CLZERO mnemonic, so the fixture spells it asdb 0fh,01h,0fchand a source scan never sees it.This PR registers the fixture the way
CONTRIBUTING.mddescribes for such cases:counted_clzero.asmgets; coverage: record cpu_counted_clzeroas its first line.counted_clzero.pywritesFORM_COVERAGE_RECORDafter all its checks pass. It decodes the five functions it actually translates (counted,loop_dx,loop_r8,loop_r9,loop_r10) withcpu_switch_aot.translate, asswitch_strings_check.pydoes, and asserts thatclzerois among them. It removes a stale record first, so a failed run leaves none.CMakeLists.txtsets the record path forcpu_counted_clzero.The test's comparisons, its two rejection controls and its output are unchanged.
Verification
At
7261ab67+ (main), Windows 11 Pro 26300.9818, MSVC 14.44.35207, Python 3.12.10:cpu_counted_clzeropassed. Its record isadd clzero cmp jb mov ret seta setb sete.Integer clzero unobservedis gone. No other row changed.tests/form_coverage_check.pypasses.-j 16: 622/625. The three failures are not related to this change:cpu_aot_jump_tablesfails onmainsince #1374 (fix in #1388);cpu_native_load_config_callbackfails on this host because system CFG is off (#1366, fix in #1367);xmem_shim_page_runsfailed only under-j 16load and passed 3/3 when run alone.clzeroasunobserved. That is the measured state onmain.Checklist
clzero.)mainrun.)AI-assisted (Claude Code).
🤖 Generated with Claude Code