e2e: exercise SSE4a bitfields through the console title #434

Open
github-bot wants to merge 1 commit from github-bot/gh-434 into main AGit
Owner

@⁠Prime1997 on GitHub · 2026-11-24 00:13 UTC · original
Prime1997:contrib/sse4a-guest-controls → main · +165 −0 · 2 files · 1 commits · open

Part of #216. The reported Intel crash occurred on an SSE4a INSERTQ. These two guest checks execute immediate and register-controlled INSERTQ and EXTRQ through the existing XCL exception handler.

What is in it

  • tests/testtitle/src/main.rs runs 18 cases covering the reported encoding, high XMM registers, six-bit immediate masks, register controls and boundary bit positions. Checks compare the defined low destination bits, source and neighboring registers, and flags.
  • crates/xcl/tests/e2e.rs requires both guest PASS markers. This complements the decoder and saved-context work discussed in #209 and #216.

Tested

  • Windows 11 Pro build 26200, Intel Core i5-10400, GeForce RTX 3060 Ti (driver 32.0.16.1714), Rust 1.100.0.
  • Tested commit d4998b1bf396dbbaf9c678d417c61ee0c9636dff with cargo build --workspace --jobs 3 and cargo test --workspace --no-fail-fast --jobs 3 -- --test-threads=4 (debug). 676 passed, 0 failed, 41 ignored. 2 GPU tests reported a skip.
    • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
  • An earlier parallel suite run failed at the shared-page cubemap assertion and poisoned its test lock. We also reproduced that assertion on unmodified a6f5f7a in isolation on this GPU.
  • cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --nocapture passed. Both guest checks printed PASS on the Intel host.

Regression run

The test launches XCL's synthetic console title through its normal launcher. The changes are confined to the test title and end-to-end test.

Not tested

Native AMD SSE4a execution, other host CPUs, and retail gameplay. Optional sample-data tests ran without external sample files.

AI use

OpenAI Codex (GPT-6) helped write and adapt the tests, compare prior PRs, and run validation.

I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. Test coordination on Discord

**@⁠Prime1997** on GitHub · 2026-11-24 00:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/434) `Prime1997:contrib/sse4a-guest-controls` → `main` · +165 −0 · 2 files · 1 commits · open Part of #216. The reported Intel crash occurred on an SSE4a INSERTQ. These two guest checks execute immediate and register-controlled INSERTQ and EXTRQ through the existing XCL exception handler. **What is in it** - `tests/testtitle/src/main.rs` runs 18 cases covering the reported encoding, high XMM registers, six-bit immediate masks, register controls and boundary bit positions. Checks compare the defined low destination bits, source and neighboring registers, and flags. - `crates/xcl/tests/e2e.rs` requires both guest PASS markers. This complements the decoder and saved-context work discussed in #209 and #216. **Tested** - Windows 11 Pro build 26200, Intel Core i5-10400, GeForce RTX 3060 Ti (driver 32.0.16.1714), Rust 1.100.0. - Tested commit `d4998b1bf396dbbaf9c678d417c61ee0c9636dff` with `cargo build --workspace --jobs 3` and `cargo test --workspace --no-fail-fast --jobs 3 -- --test-threads=4` (debug). 676 passed, 0 failed, 41 ignored. 2 GPU tests reported a skip. - `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64` - `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` - An earlier parallel suite run failed at the shared-page cubemap assertion and poisoned its test lock. We also reproduced that assertion on unmodified `a6f5f7a` in isolation on this GPU. - `cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --nocapture` passed. Both guest checks printed PASS on the Intel host. **Regression run** The test launches XCL's synthetic console title through its normal launcher. The changes are confined to the test title and end-to-end test. **Not tested** Native AMD SSE4a execution, other host CPUs, and retail gameplay. Optional sample-data tests ran without external sample files. **AI use** OpenAI Codex (GPT-6) helped write and adapt the tests, compare prior PRs, and run validation. I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. [Test coordination on Discord](https://discord.gg/gK3y7WRRY)
Run immediate and register forms through the title's exception path on Intel. Check the defined result, untouched registers and flags. Cover the fault reported in #216 and complement the decoder-level tests.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:21:40 +00:00
Author
Owner

@⁠ghost on GitHub · 2026-11-24 00:28 UTC · original

Native AMD SSE4a run, since Not tested lists it: head d4998b1 (already on main a6f5f7a) passes on a Zen 3 CPU, where INSERTQ / EXTRQ execute in hardware instead of through XCL's emulation. So the expected values in the 18 cases match what the silicon does.

Tested

  • AMD Ryzen 7 5800X3D (Zen 3, SSE4a native); AMD Radeon RX 9060 XT; Windows 11 Pro 26200; Rust 1.100.0 x86_64-pc-windows-msvc; debug build.
  • cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --nocapture: passes, with [PASS] CPU: SSE4a INSERTQ and EXTRQ preserve defined bits, sources and flags and [PASS] CPU: SSE4a register controls preserve bitfields, sources and flags.
  • .\scripts\test.ps1: passes, 0 failed; no SKIPPED GPU tests. cargo test -p xcl --lib sse4a: insn::tests::sse4a_bit_fields passes.

Not tested

  • Whether the native path was the one taken (I didn't instrument XCL's handler). On a CPU with SSE4a nothing should fault, so the emulation shouldn't run. Retail gameplay.

AI use

  • Claude Code (Claude Opus 5.5) ran the commands and wrote this report from the logs; I checked it before posting.
**@⁠ghost** on GitHub · 2026-11-24 00:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/434#issuecomment-7118112702) Native AMD SSE4a run, since **Not tested** lists it: head `d4998b1` (already on `main` `a6f5f7a`) **passes** on a Zen 3 CPU, where INSERTQ / EXTRQ execute in hardware instead of through XCL's emulation. So the expected values in the 18 cases match what the silicon does. **Tested** - AMD Ryzen 7 5800X3D (Zen 3, SSE4a native); AMD Radeon RX 9060 XT; Windows 11 Pro 26200; Rust 1.100.0 `x86_64-pc-windows-msvc`; debug build. - `cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --nocapture`: passes, with `[PASS] CPU: SSE4a INSERTQ and EXTRQ preserve defined bits, sources and flags` and `[PASS] CPU: SSE4a register controls preserve bitfields, sources and flags`. - `.\scripts\test.ps1`: passes, 0 failed; no `SKIPPED` GPU tests. `cargo test -p xcl --lib sse4a`: `insn::tests::sse4a_bit_fields` passes. **Not tested** - Whether the native path was the one taken (I didn't instrument XCL's handler). On a CPU with SSE4a nothing should fault, so the emulation shouldn't run. Retail gameplay. **AI use** - Claude Code (Claude Opus 5.5) ran the commands and wrote this report from the logs; I checked it before posting.
Author
Owner

@⁠AC-Storm-YT on GitHub · 2026-11-24 00:35 UTC · original

Test run on an AMD CPU with native SSE4a – commit d4998b1 (this PR's head, as is), clean tree

Tested

  • AMD Ryzen 7 9800X3D (Zen 5, SSE4a in hardware); AMD Radeon RX 9070 XT, driver 32.0.32029.2010; Windows 11 Pro build 26200; Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace: ok
  • cargo test --workspace -- --test-threads=4: 676 passed, 0 failed, 41 ignored. No SKIPPED tests.
  • test_title_runs_and_game_folder_is_untouched passes, so the test title printed both new markers ([PASS] CPU: SSE4a INSERTQ and EXTRQ preserve defined bits, sources and flags, [PASS] CPU: SSE4a register controls preserve bitfields, sources and flags)

On this CPU INSERTQ and EXTRQ run in hardware, so the run checks the 18 cases' expected results against real SSE4a rather than XCL's handler.

Not tested

  • XCL's emulation path on an Intel CPU (the case in #216): the instructions do not fault here
  • Release build; this commit merged with current main

Run and report: Claude Code (Claude Opus 5.5).

**@⁠AC-Storm-YT** on GitHub · 2026-11-24 00:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/434#issuecomment-7118235439) Test run on an AMD CPU with native SSE4a – commit `d4998b1` (this PR's head, as is), clean tree **Tested** - AMD Ryzen 7 9800X3D (Zen 5, SSE4a in hardware); AMD Radeon RX 9070 XT, driver 32.0.32029.2010; Windows 11 Pro build 26200; Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace`: ok - `cargo test --workspace -- --test-threads=4`: 676 passed, 0 failed, 41 ignored. No SKIPPED tests. - `test_title_runs_and_game_folder_is_untouched` passes, so the test title printed both new markers (`[PASS] CPU: SSE4a INSERTQ and EXTRQ preserve defined bits, sources and flags`, `[PASS] CPU: SSE4a register controls preserve bitfields, sources and flags`) On this CPU INSERTQ and EXTRQ run in hardware, so the run checks the 18 cases' expected results against real SSE4a rather than XCL's handler. **Not tested** - XCL's emulation path on an Intel CPU (the case in #216): the instructions do not fault here - Release build; this commit merged with current `main` Run and report: Claude Code (Claude Opus 5.5).
Author
Owner

@⁠alpz1000 on GitHub · 2026-11-24 00:59 UTC · original

Independent end-to-end check on an Intel Core i5-8400 at PR head d4998b1bf396dbbaf9c678d417c61ee0c9636dff.

Tested with Windows 11 Home 26200.9974, RTX 3060 12 GB (driver 610.88), Rust 1.100.0 x86_64-pc-windows-msvc, debug. cargo build --locked --workspace succeeded. cargo test --locked -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --nocapture passed (1 passed, 0 failed, 0 ignored, 2 filtered out).

Both guest PASS markers appeared: immediate INSERTQ/EXTRQ and register-controlled SSE4a. XCL logged that it emulated INSERTQ and EXTRQ on this CPU.

Not tested: the full workspace suite, native AMD SSE4a, or retail gameplay for this PR.

AI use: OpenAI Codex (GPT-6) ran the local build and test and summarized the output.

**@⁠alpz1000** on GitHub · 2026-11-24 00:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/434#issuecomment-7118649414) Independent end-to-end check on an Intel Core i5-8400 at PR head `d4998b1bf396dbbaf9c678d417c61ee0c9636dff`. **Tested** with Windows 11 Home 26200.9974, RTX 3060 12 GB (driver 610.88), Rust 1.100.0 x86_64-pc-windows-msvc, debug. `cargo build --locked --workspace` succeeded. `cargo test --locked -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --nocapture` passed (1 passed, 0 failed, 0 ignored, 2 filtered out). Both guest PASS markers appeared: immediate INSERTQ/EXTRQ and register-controlled SSE4a. XCL logged that it emulated INSERTQ and EXTRQ on this CPU. **Not tested**: the full workspace suite, native AMD SSE4a, or retail gameplay for this PR. **AI use**: OpenAI Codex (GPT-6) ran the local build and test and summarized the output.
Author
Owner

@⁠13hourstilliland on GitHub · 2026-11-24 01:52 UTC · original

Independent Intel CPU (i5-12600K, SSE4a emulated) e2e and full workspace run on exact PR head d4998b1.

Tested

  • Commit: d4998b1bf396dbbaf9c678d417c61ee0c9636dff (PR #434 head), clean worktree
  • Hardware: Intel Core i5-12600K (no native SSE4a); NVIDIA GeForce RTX 3070 8 GB, driver 610.88; 31.8 GB RAM; Windows 11 Home build 26200.9974
  • Toolchain: Rust 1.100.0 (stable-x86_64-pc-windows-gnu, not MSVC); DXC 1.9.2609.5 (01b62ad4) via XCL_DXC_DIR; debug build; no XCL_SAMPLE_* set
  • Targeted command: cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --nocapture (interactive desktop session)
    • Result: 1 passed, 0 failed, 0 ignored (11.39 s). Both new guest checks printed ([PASS] CPU: SSE4a INSERTQ and EXTRQ preserve defined bits, sources and flags and [PASS] CPU: SSE4a register controls preserve bitfields, sources and flags), and XCL logged that it emulated both Insertq and Extrq on this CPU.
  • Full workspace command: cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output (interactive desktop session)
    • Result: 676 passed, 0 failed, 41 ignored across 16 test binaries (xcl lib: 636 passed, 0 failed, 21 ignored; e2e: 3/0)
  • SKIPPED (4, not coverage):
    • no wave64 (2): gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware
    • no D3D12 debug layer (2): test_title_draws_with_a_root_signature_under_the_debug_layer, uploads_start_from_each_subresources_state

Not tested

  • Native AMD SSE4a hardware, MSVC toolchain, release build, retail gameplay / scripts/smoke.ps1, D3D12 debug-layer tests

AI use

  • Hermes Agent, gemini-4-neon: ran the commands and wrote this report from the logs; the human reviewed it.
**@⁠13hourstilliland** on GitHub · 2026-11-24 01:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/434#issuecomment-7119528303) Independent Intel CPU (i5-12600K, SSE4a emulated) e2e and full workspace run on exact PR head `d4998b1`. **Tested** - Commit: `d4998b1bf396dbbaf9c678d417c61ee0c9636dff` (PR #434 head), clean worktree - Hardware: Intel Core i5-12600K (no native SSE4a); NVIDIA GeForce RTX 3070 8 GB, driver 610.88; 31.8 GB RAM; Windows 11 Home build 26200.9974 - Toolchain: Rust 1.100.0 (`stable-x86_64-pc-windows-gnu`, not MSVC); DXC 1.9.2609.5 (`01b62ad4`) via `XCL_DXC_DIR`; debug build; no `XCL_SAMPLE_*` set - Targeted command: `cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --nocapture` (interactive desktop session) - Result: **1 passed, 0 failed, 0 ignored** (11.39 s). Both new guest checks printed (`[PASS] CPU: SSE4a INSERTQ and EXTRQ preserve defined bits, sources and flags` and `[PASS] CPU: SSE4a register controls preserve bitfields, sources and flags`), and XCL logged that it emulated both `Insertq` and `Extrq` on this CPU. - Full workspace command: `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output` (interactive desktop session) - Result: **676 passed, 0 failed, 41 ignored** across 16 test binaries (`xcl` lib: 636 passed, 0 failed, 21 ignored; `e2e`: 3/0) - `SKIPPED` (4, not coverage): - `no wave64` (2): `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` - `no D3D12 debug layer` (2): `test_title_draws_with_a_root_signature_under_the_debug_layer`, `uploads_start_from_each_subresources_state` **Not tested** - Native AMD SSE4a hardware, MSVC toolchain, release build, retail gameplay / `scripts/smoke.ps1`, D3D12 debug-layer tests **AI use** - Hermes Agent, `gemini-4-neon`: ran the commands and wrote this report from the logs; the human reviewed it.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 14:29 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 14:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/434#issuecomment-7165347992) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/434/head:github-bot/gh-434'
git switch 'github-bot/gh-434'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-434'
git switch 'github-bot/gh-434'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-434'
git switch 'github-bot/gh-434'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-434'
git switch 'main'
git merge --squash 'github-bot/gh-434'
git switch 'main'
git merge --ff-only 'github-bot/gh-434'
git switch 'main'
git merge 'github-bot/gh-434'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.