cpu: keep the jump-table unsupported-instruction control unsupported #1388
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!1388
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1388/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:16 UTC · original
Maxim-Root:cpu/jump-tables-unsupported-control→main· +2 −1 · 1 files · 1 commits · merged 2026-11-24 10:27 UTCChange
cpu_aot_jump_tablesfails onmainsince #1374 (384ee4ac, "cpu: lift BSWAP in the switch translator"):tests/cpu/switch_check.pykeeps a rejection control that patches the two-byteNOTin the jump-table fixture with0f ca(BSWAP EDX) and expectsunsupported instruction. #1374 made the switch translator lift BSWAP and moved the matching control inswitch_bit_countsto XLATB, but this second control still used BSWAP. The translator now accepts it, so the check fails before the flag-consumer controls run.This PR replaces the patch bytes with
0f a2(CPUID). It is also two bytes, so the decode stream after it is unchanged. The switch translator has no CPUID lowering, and its result depends on the host processor, so it stays out of the translator's scope. The expected reason,unsupported instruction, and the other 15 controls are unchanged. Onlytests/cpu/switch_check.pychanges (one line plus a comment).The PR check did not catch this because the
prpreset does not includecpu_aot_jump_tables. Themainruns of the full suites that would have caught it were cancelled by the next pushes (concurrencygroup), so the regression has not shown up in CI yet.Refs #1374.
Verification
Windows 11 Pro 26300.9818, MSVC 14.44.35207, Python 3.12.10, at
816fb71b(main):Without this change:
AssertionError: accepted control: unsupported instruction, 0/1. The same failure occurs at7261ab67.With this change:
ctest --preset dev --no-tests=error -R '^cpu_aot_(jump_tables|switch)' -j 16: 10/10.The same filter with
--preset release(/O2): 10/10.Checklist
AI-assisted (Claude Code).
🤖 Generated with Claude Code
@tedin7 on GitHub · 2026-11-24 10:33 UTC · original · reviewed
Reviewed
a2e2a905(cpu: keep the jump-table unsupported-instruction control unsupported).git diff --checkclean; 100% title-neutral.tests/cpu/switch_check.py: replaces0f ca(bswap edx, now lifted since#1374) with0f a2(cpuid), keeping the"unsupported instruction"negative control valid.py_compile tests/cpu/switch_check.pyandtests/bidi_controls_check.py(1172 tracked files): passed.a2e2a905207621ff606395950984b372b0d2e32b:--preset dev):cpu_aot_jump_tables1/1 passed (0.43s)./O2(--preset release):cpu_aot_jump_tables1/1 passed (0.43s).