cpu_feature_scan: flag AVX-512VL regs, fix int/prefix parsing, and guard CLI --base/read errors (CPU-FEATURE-SCAN-CLASSIFY-AND-CLI) #1560
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1560
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/cpu-feature-scan-classify-and-cli"
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?
Pull request successfully merged and closed
Item ID:
CPU-FEATURE-SCAN-CLASSIFY-AND-CLI(new item; coordination issue #14 is at GitHub's 2,500-comment cap with no open successor at PR time — confirmed 0 open PRs touchtools/cpu_feature_scan.py)Summary
xmm16–xmm31,ymm16–ymm31):ZMMpreviously matched onlyzmm*and{k*}, misclassifying EVEX instructions usingxmm16..31/ymm16..31(which#UDon Zen 2) as baselineAVX/AVX2orVAES.intimmediate matching:IMMEDIATEpreviously accepted only uppercase hex with optionalh, causing lowercase (int 2ch,int 2dh) and0x-prefixed (int 0x29,int 0x2c,int 0x2d,int 0x3) Windows-served interrupt vectors to be falsely flagged as kernel-callINT.classify(): splitting prefixes withops.partition(" ")dropped the following mnemonic when separated by multiple spaces or a tab (e.g.lock+cmpxchg16b,rep+\tinsb), and uppercase mnemonics/registers bypassed classification.--baseand source reads inmain(): reject negative--basevalues with a clean parser error (replacing<lambda>), and catchOSErrorfrominline_scan.read_lines(args.source)cleanly with exit code 2 instead of a traceback.Testing
python3 -W error -I tests/test_cpu_feature_scan.py -v: 26/26 passedpython3 -W error -I tests/test_text_write_line_endings.py -v: 3/3 passedpython3 -I scripts/check_no_game_data.py tools/cpu_feature_scan.py tests/test_cpu_feature_scan.py: passedpython3 -m compileall -q make_game.py tools tests: passedmain:tools/cpu_feature_scan.py: all 5 new/updated tests fail (FAILED (failures=5, errors=1)).Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 19 PRs (their tests, the tests importing the changed modules, the docs tests) on main 3ca0707: no new failure, Linux / Python 3.13.
AI-assisted (Claude Code, Claude Opus 5.5)