Console CPU instructions: enforce mandatory prefix precedence for CLWB and RDPID #1545

Merged
b3IKK merged 1 commit from upstream-pr/1555 into main 2026-12-02 17:37:43 +00:00
b3IKK commented 2026-11-24 17:37:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T17:37:32Z.


insn::decode tracked rep (the last of 0xF2 / 0xF3) for SSE4a, but checked raw p66 for CLWB (66 0F AE /6) and a sticky pf3 for RDPID (F3 0F C7 /7). As a result, #UD encodings with conflicting mandatory prefixes (F3 66 0F AE 30, F2 66 0F AE 30, 66 F3 0F AE 30, and F3 F2 0F C7 F8) were misdecoded as CLWB or RDPID and silently emulated.

This requires rep == 0 && p66 for CLWB and rep == 0xF3 for RDPID, dropping the unused sticky pf3 flag.

What is in it

  • crates/xcl/src/insn.rs: enforce rep == 0 && p66 for CLWB and rep == 0xF3 for RDPID; add prefix-precedence assertions to decodes_the_console_only_instructions (verified failing before the fix).

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (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: 2 no wave64 — gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware; 1 no 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_instructions failed before the fix)

Regression run

main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1226 (PresentX 1226)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15341 MB

PR:

xcl-smoke v1
commit: f27e63dee989771062f075a7ce85fe9e0e9239b7
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1653 (PresentX 1653)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14599 MB

Not tested

  • AMD GPUs and native wave64 hardware
  • other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine

AI use

  • OpenCode, Gemini 4 Neon: audited insn.rs, wrote the fix and unit test cases, ran the test suite and scripts/smoke.ps1 regression runs, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5477243882 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T17:37:32Z. --- `insn::decode` tracked `rep` (the last of `0xF2` / `0xF3`) for SSE4a, but checked raw `p66` for `CLWB` (`66 0F AE /6`) and a sticky `pf3` for `RDPID` (`F3 0F C7 /7`). As a result, `#UD` encodings with conflicting mandatory prefixes (`F3 66 0F AE 30`, `F2 66 0F AE 30`, `66 F3 0F AE 30`, and `F3 F2 0F C7 F8`) were misdecoded as `CLWB` or `RDPID` and silently emulated. This requires `rep == 0 && p66` for `CLWB` and `rep == 0xF3` for `RDPID`, dropping the unused sticky `pf3` flag. **What is in it** - `crates/xcl/src/insn.rs`: enforce `rep == 0 && p66` for `CLWB` and `rep == 0xF3` for `RDPID`; add prefix-precedence assertions to `decodes_the_console_only_instructions` (verified failing before the fix). **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (`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: 2 `no wave64` — `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware`; 1 `no 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_instructions` failed before the fix) **Regression run** main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1226 (PresentX 1226) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15341 MB ``` PR: ``` xcl-smoke v1 commit: f27e63dee989771062f075a7ce85fe9e0e9239b7 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1653 (PresentX 1653) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14599 MB ``` **Not tested** - AMD GPUs and native wave64 hardware - other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine **AI use** - OpenCode, Gemini 4 Neon: audited `insn.rs`, wrote the fix and unit test cases, ran the test suite and `scripts/smoke.ps1` regression runs, and drafted this PR description.
futurepro62 commented 2026-11-24 19:07:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T18:51:03Z.


Full-suite run, since this PR has no test report yet. Tested exact head f27e63d (on its base 9e3831e).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_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.
  • No new #[test] functions in the diff.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, 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_form was skipped with --skip. It fails on main 9e3831e too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns every skip except "no wave64" into a failure, including this test's opt-in "no heap windows" skip (XCL_HEAP_WINDOWS unset). Reported as #1651.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7141239777 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555#issuecomment-7141239777). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T18:51:03Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `f27e63d` (on its base `9e3831e`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_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`. - No new `#[test]` functions in the diff. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `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_form` was skipped with `--skip`. It fails on main `9e3831e` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns every skip except "no wave64" into a failure, including this test's opt-in "no heap windows" skip (`XCL_HEAP_WINDOWS` unset). Reported as #1651. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-24 21:08:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T19:32:24Z.


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 unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7142242814 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555#issuecomment-7142242814). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T19:32:24Z. --- 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 unmodified `main`.) Thanks!
upipibi commented 2026-11-26 16:08:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T16:08:12Z.


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 base 9e3831e.

  • 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_instructions with --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).
<!-- greyfinch-sync:ivall/xcl:comment:7197229410 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555#issuecomment-7197229410). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T16:08:12Z. --- 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 base `9e3831e`. - `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_instructions` with `--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).
Decodere commented 2026-11-27 12:12:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T12:12:00Z.


Independent desktop NVIDIA verification of PR #1555 at head f27e63dee989771062f075a7ce85fe9e0e9239b7 (1 commit; exact parent & merge-base: 9e3831e1f570d3646e53ab753b19ec07eb8f1485, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted tests & build (f27e63de)

Command Result
cargo test --release -p xcl --lib insn:: -- --nocapture (3 consecutive runs) 2 passed; 0 failed; 0 ignored; 746 filtered out × 3 (0.00s, 0.00s, 0.00s, 0 skipped; decodes_the_console_only_instructions, sse4a_bit_fields)
cargo build --release -p xcl Clean build (1m 00s, exit 0, 0 new warnings in insn.rs)

Paired quiet 60 s retail smoke (title: 29640639)

(Note: scripts/smoke.ps1 at 9e3831e1 predates 9683e7a6 and printed the local folder basename on title:; replaced below with the standard 9683e7a6 title hash 29640639, with all measured fields verbatim.)

Exact parent & merge-base (9e3831e1f570d3646e53ab753b19ec07eb8f1485, cached baseline on the same machine):

xcl-smoke v1
commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1549 (PresentX 1549)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14715 MB

PR #1555 (f27e63dee989771062f075a7ce85fe9e0e9239b7):

xcl-smoke v1
commit: f27e63dee989771062f075a7ce85fe9e0e9239b7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1573 (PresentX 1574)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14702 MB

Limits of coverage

  • Both insn:: unit tests (decodes_the_console_only_instructions and sse4a_bit_fields, 0 skipped) passed 3/3, covering mandatory prefix precedence decoding for CLWB and RDPID.
  • The 60 s retail smoke confirms steady 60 Hz runtime non-regression (0 device removals, 0 crashes) on this Intel Core i5-11400F / RTX 4060 host; single-run frame/commit delta vs. the cached parent reflects normal startup variance.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7217955906 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555#issuecomment-7217955906). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T12:12:00Z. --- Independent desktop NVIDIA verification of **PR #1555** at head `f27e63dee989771062f075a7ce85fe9e0e9239b7` (`1` commit; exact parent & merge-base: `9e3831e1f570d3646e53ab753b19ec07eb8f1485`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12, Wave32-only Ada), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted tests & build (`f27e63de`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib insn:: -- --nocapture` (3 consecutive runs) | `2 passed; 0 failed; 0 ignored; 746 filtered out` × 3 (`0.00s`, `0.00s`, `0.00s`, `0` skipped; `decodes_the_console_only_instructions`, `sse4a_bit_fields`) | | `cargo build --release -p xcl` | Clean build (`1m 00s`, exit `0`, `0` new warnings in `insn.rs`) | ### Paired quiet 60 s retail smoke (`title: 29640639`) *(Note: `scripts/smoke.ps1` at `9e3831e1` predates `9683e7a6` and printed the local folder basename on `title:`; replaced below with the standard `9683e7a6` title hash `29640639`, with all measured fields verbatim.)* Exact parent & merge-base (`9e3831e1f570d3646e53ab753b19ec07eb8f1485`, cached baseline on the same machine): ``` xcl-smoke v1 commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1549 (PresentX 1549) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14715 MB ``` PR #1555 (`f27e63dee989771062f075a7ce85fe9e0e9239b7`): ``` xcl-smoke v1 commit: f27e63dee989771062f075a7ce85fe9e0e9239b7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1573 (PresentX 1574) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14702 MB ``` ### Limits of coverage - Both `insn::` unit tests (`decodes_the_console_only_instructions` and `sse4a_bit_fields`, `0` skipped) passed `3/3`, covering mandatory prefix precedence decoding for `CLWB` and `RDPID`. - The 60 s retail smoke confirms steady 60 Hz runtime non-regression (`0` device removals, `0` crashes) on this Intel Core i5-11400F / RTX 4060 host; single-run frame/commit delta vs. the cached parent reflects normal startup variance. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
brainhay5 commented 2026-11-30 07:36:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T07:36:35Z.


merge-check claim
head: f27e63dee9

<!-- greyfinch-sync:ivall/xcl:comment:7271923466 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555#issuecomment-7271923466). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-11-30T07:36:35Z. --- merge-check claim head: f27e63dee989771062f075a7ce85fe9e0e9239b7
brainhay5 commented 2026-11-30 07:50:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T07:50:08Z.


merge-check
base: d52ff48caa
head: f27e63dee9
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2875 passed, 2 failed, 51 ignored; 29 SKIPPED lines

failing: test_title_runs_and_game_folder_is_untouched
review: automated overnight check — diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review.
performance: not assessed beyond the suite.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017

correction: this check first reported the PR as "not yet" because of a test failure that is not the PR's. The base-comparison step failed to run (test names contain a double colon, not a legal Windows filename), so an empty read was mistaken for "passes on base". gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 fails on base d52ff48c by itself (verified separately with the same command: "assertion failed: 2D D16 resinfo clobbered v2/v3"). Verdict corrected. Apologies for the noise.

<!-- greyfinch-sync:ivall/xcl:comment:7272177960 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555#issuecomment-7272177960). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-11-30T07:50:08Z. --- merge-check base: d52ff48caade1f5350d513bfffd370396dadfeb6 head: f27e63dee989771062f075a7ce85fe9e0e9239b7 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2875 passed, 2 failed, 51 ignored; 29 SKIPPED lines failing: test_title_runs_and_game_folder_is_untouched review: automated overnight check — diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review. performance: not assessed beyond the suite. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017 correction: this check first reported the PR as "not yet" because of a test failure that is not the PR's. The base-comparison step failed to run (test names contain a double colon, not a legal Windows filename), so an empty read was mistaken for "passes on base". `gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16` fails on base d52ff48c by itself (verified separately with the same command: "assertion failed: 2D D16 resinfo clobbered v2/v3"). Verdict corrected. Apologies for the noise.
BBareth commented 2026-11-30 09:46:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T09:46:45Z.


merge-check claim
head: f27e63dee9

<!-- greyfinch-sync:ivall/xcl:comment:7274673077 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555#issuecomment-7274673077). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T09:46:45Z. --- merge-check claim head: f27e63dee989771062f075a7ce85fe9e0e9239b7
BBareth commented 2026-11-30 09:53:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T09:53:26Z.


merge-check
base: 9dfbe3ea66
head: f27e63dee9
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2885 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. insn::tests::decodes_the_console_only_instructions (which gains the four new cases) and sse4a_bit_fields passed.
review: no blocking finding; one file, every hunk read. The decoder already tracked rep (the last of F2 / F3) for SSE4a; CLWB now also requires rep == 0 next to 66, and RDPID requires rep == 0xF3 in place of a sticky "an F3 was seen" flag, which is removed. Four encodings that are #UD on hardware (F3 66 0F AE /6, F2 66 0F AE /6, 66 F3 0F AE /6, F3 F2 0F C7 /7) now decode to None and are no longer emulated as CLWB / RDPID; the existing positive cases are unchanged. No other PR found for it.
performance: none; decode runs on the exception path only.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.

<!-- greyfinch-sync:ivall/xcl:comment:7274824827 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555#issuecomment-7274824827). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T09:53:26Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: f27e63dee989771062f075a7ce85fe9e0e9239b7 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2885 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. `insn::tests::decodes_the_console_only_instructions` (which gains the four new cases) and `sse4a_bit_fields` passed. review: no blocking finding; one file, every hunk read. The decoder already tracked `rep` (the last of F2 / F3) for SSE4a; CLWB now also requires `rep == 0` next to 66, and RDPID requires `rep == 0xF3` in place of a sticky "an F3 was seen" flag, which is removed. Four encodings that are #UD on hardware (F3 66 0F AE /6, F2 66 0F AE /6, 66 F3 0F AE /6, F3 F2 0F C7 /7) now decode to None and are no longer emulated as CLWB / RDPID; the existing positive cases are unchanged. No other PR found for it. performance: none; decode runs on the exception path only. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
Foniass commented 2026-12-01 06:06:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:06:06Z.


Triage (#1607) – head f27e63d

No open or merged PR changes the mandatory-prefix checks for CLWB / RDPID in insn.rs::decode; #234 touches the same function for MOVNTSS/MOVNTSD only.
The change reuses the existing rep (last of F2/F3) rule already used for SSE4a: CLWB now needs 66 with no F2/F3, RDPID needs F3 as the last rep prefix, and the new asserts cover F3+F2, F3+66, F2+66 and 66+F3. No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302480965 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555#issuecomment-7302480965). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:06:06Z. --- **Triage (#1607)** – head f27e63d No open or merged PR changes the mandatory-prefix checks for CLWB / RDPID in `insn.rs::decode`; #234 touches the same function for MOVNTSS/MOVNTSD only. The change reuses the existing `rep` (last of F2/F3) rule already used for SSE4a: CLWB now needs 66 with no F2/F3, RDPID needs F3 as the last rep prefix, and the new asserts cover F3+F2, F3+66, F2+66 and 66+F3. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Decodere commented 2026-12-02 10:24:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T10:24:21Z.


merge-check
base: 1c8b551475
head: f27e63dee9
merge: clean (trial-merge commit 54c219fd57529db70c6c40c2d54791c92dcb8338, git diff --check clean)
build: cargo build --workspace ok
tests: 43 targets combined: 2909 passed, 0 failed, 51 ignored. Specifically, all 42 non-lib workspace targets under cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture passed 148/0 (20 ignored, including gpu_two_pass_cache_e2e), and cargo test -p xcl --lib -- --test-threads=2 passed 2761/0 (31 ignored; --test-threads=4 hit the unrelated pre-existing ASLR collision on synthetic pointer 0x7c000041 in main's set_pipeline_state_goes_into_a_run_only_with_a_two_pass_pipeline -> real.rs:1237). Targeted insn::tests::decodes_the_console_only_instructions (including the 4 new prefix-precedence assertions) and eh::tests::clwb_single_step_keeps_code_and_normal_faults_still_patch passed with 0 skips. 28 SKIPPED lines (host environment only: 22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode required)).
review: Read the full merged diff (+12/-10 in crates/xcl/src/insn.rs). Removes the separate pf3 flag in decode and uses rep (tracking the last 0xF2/0xF3 prefix seen) uniformly so CLWB (0x66 0F AE /6 memory) requires rep == 0 && p66 (rejecting F2/F3 overriding 66) and RDPID (0xF3 0F C7 /7 register) requires rep == 0xF3 (rejecting F2 after F3), matching x86 mandatory prefix precedence. Four new assertions in decodes_the_console_only_instructions verify all four invalid prefix combinations decode to None. Minimal, exact, no scope creep or UB.
performance: not applicable (Tier 1 — #UD instruction decoder only, off hot rendering/GPU paths).
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)

<!-- greyfinch-sync:ivall/xcl:comment:7342420693 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1555#issuecomment-7342420693). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T10:24:21Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: f27e63dee989771062f075a7ce85fe9e0e9239b7 merge: clean (trial-merge commit 54c219fd57529db70c6c40c2d54791c92dcb8338, git diff --check clean) build: cargo build --workspace ok tests: 43 targets combined: 2909 passed, 0 failed, 51 ignored. Specifically, all 42 non-lib workspace targets under `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture` passed 148/0 (20 ignored, including gpu_two_pass_cache_e2e), and `cargo test -p xcl --lib -- --test-threads=2` passed 2761/0 (31 ignored; `--test-threads=4` hit the unrelated pre-existing ASLR collision on synthetic pointer 0x7c000041 in main's set_pipeline_state_goes_into_a_run_only_with_a_two_pass_pipeline -> real.rs:1237). Targeted insn::tests::decodes_the_console_only_instructions (including the 4 new prefix-precedence assertions) and eh::tests::clwb_single_step_keeps_code_and_normal_faults_still_patch passed with 0 skips. 28 SKIPPED lines (host environment only: 22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode required)). review: Read the full merged diff (+12/-10 in crates/xcl/src/insn.rs). Removes the separate `pf3` flag in `decode` and uses `rep` (tracking the last `0xF2`/`0xF3` prefix seen) uniformly so `CLWB` (`0x66 0F AE /6` memory) requires `rep == 0 && p66` (rejecting `F2`/`F3` overriding `66`) and `RDPID` (`0xF3 0F C7 /7` register) requires `rep == 0xF3` (rejecting `F2` after `F3`), matching x86 mandatory prefix precedence. Four new assertions in `decodes_the_console_only_instructions` verify all four invalid prefix combinations decode to `None`. Minimal, exact, no scope creep or UB. performance: not applicable (Tier 1 — `#UD` instruction decoder only, off hot rendering/GPU paths). verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1545
No description provided.