Skip to content

cpu: count reservednop in x64 form coverage - #3551

Merged
tedin7 merged 4 commits into
R0Y00:mainfrom
lambirou:cpu/reservednop-record
Nov 30, 2026
Merged

tedin7 merged 4 commits into
R0Y00:mainfrom
lambirou:cpu/reservednop-record

Conversation

@lambirou

@lambirou lambirou commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

reservednop is already lowered (#1547), but the x64 coverage table misses it: cpu_hint_nop exercises the exact encodings without writing a record, and there is no .asm fixture for tools/form_coverage.py to associate with the test.

This adds a record-only manifest tests/cpu/hint_nop.asm (; coverage: record cpu_hint_nop), sets FORM_COVERAGE_RECORD on cpu_hint_nop, and writes the iced-decoded mnemonics after the test passes. CET endbr32/endbr64 are outside the Zen 2 reference groups, so the record keeps only the forms the reference can match: nop and reservednop.

Coverage

With a synthetic JUnit containing only cpu_hint_nop pass:

State x64 covered Gaps reservednop
Empty records 0 / 948 948 Integer reservednop unobserved
Record from the test 2 / 948 (nop, reservednop) 946 absent

The full-table delta is +1 (nop was already brought by flag_conditions.asm), so the expected table becomes 919/948 with 29 gaps instead of 30. The full CPU suite was not rerun in this worktree.

Tests

  • ctest --preset dev -R '^cpu_hint_nop$' -V -> pass; the record contains nop and reservednop.
  • tests/cpu/hint_nop_check.py passes with and without FORM_COVERAGE_RECORD: 13 accepted forms, 9 neighbours refused.
  • tests/form_coverage_check.py passes; docs_links_check.py covers 181 Markdown files and 726 links.
  • cpu_aot_amd_monitor_rdpru skips 77 on the Intel i5-12600KF; its static controls pass (6 sequences, 41 refusals, 579 Debug and /O2 controls, 6 mutants).

Not measured: the full CPU suite and native MONITORX/MWAITX/RDPRU on an AMD host.

The branch is based on red main 44a3ad5. #3542 fixes the pre-existing startup_triage_run reason; until it lands, the Linux check here can fail on that unrelated test.

AI-assisted.

case6 of startup_resource_retire_title releases the newer wrapper and calls settle() without waiting for the queues. Every release signals a release-time fence on each registered queue, and settle() only resubmits the drain list, so a fence that has not completed leaves both wrappers retained and the stage fails with retained=131072/2 against 65536/1. Sync the direct and gated queues before settle(), as R0Y00#3457 did for startup_resource_retire. The expectation is unchanged.

Refs R0Y00#3507
@tedin7
tedin7 merged commit c0ee2c3 into R0Y00:main Nov 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants