Console CPU instructions: enforce mandatory prefix precedence for CLWB and RDPID #1555
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1555
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1555"
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?
@b3IKK on GitHub · 2026-11-24 17:37 UTC · original
b3IKK:eh/insn-prefix-precedence→main· +12 −10 · 1 files · 1 commits · openinsn::decodetrackedrep(the last of0xF2/0xF3) for SSE4a, but checked rawp66forCLWB(66 0F AE /6) and a stickypf3forRDPID(F3 0F C7 /7). As a result,#UDencodings with conflicting mandatory prefixes (F3 66 0F AE 30,F2 66 0F AE 30,66 F3 0F AE 30, andF3 F2 0F C7 F8) were misdecoded asCLWBorRDPIDand silently emulated.This requires
rep == 0 && p66forCLWBandrep == 0xF3forRDPID, dropping the unused stickypf3flag.What is in it
crates/xcl/src/insn.rs: enforcerep == 0 && p66forCLWBandrep == 0xF3forRDPID; add prefix-precedence assertions todecodes_the_console_only_instructions(verified failing before the fix).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 776 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2no wave64—gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware; 1no heap windows—heap_window_out_of_memory_falls_back_to_the_switch_form)cargo test -p xcl --lib insn::tests: 2 passed, 0 failed (decodes_the_console_only_instructionsfailed before the fix)Regression run
main:
PR:
Not tested
AI use
insn.rs, wrote the fix and unit test cases, ran the test suite andscripts/smoke.ps1regression runs, and drafted this PR description.@futurepro62 on GitHub · 2026-11-24 18:51 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
f27e63d(on its base9e3831e).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form: 775 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.#[test]functions in the diff.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 776 passed, 0 failed, 41 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).heap_window_out_of_memory_falls_back_to_the_switch_formwas skipped with--skip. It fails on main9e3831etoo, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns every skip except "no wave64" into a failure, including this test's opt-in "no heap windows" skip (XCL_HEAP_WINDOWSunset). Reported as #1651.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-24 19:32 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@upipibi on GitHub · 2026-11-26 16:08 UTC · original
NVIDIA test report for
f27e63d: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug. Head tested as-is on its base9e3831e.cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4: 718 passed, 0 failed, 21 ignored; 2 SKIPPED (no wave64: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware), neither in a file this PR changes.insn::tests::decodes_the_console_only_instructionswith--exact --test-threads=1 --nocapture, 3 runs: 3/3 passed, 0 SKIPPED.Lib tests only; no title run.
AI-assisted (Claude Code, Claude Opus 5.5).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.