e2e: exercise SSE4a bitfields through the console title #429
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/434"
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?
Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-24T00:13:49Z.
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.rsruns 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.rsrequires both guest PASS markers. This complements the decoder and saved-context work discussed in #209 and #216.Tested
d4998b1bf396dbbaf9c678d417c61ee0c9636dffwithcargo build --workspace --jobs 3andcargo 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 wave64gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64a6f5f7ain isolation on this GPU.cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --nocapturepassed. 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
Imported from ivall/xcl. Originally posted by nullmarsh on 2026-11-24T00:28:53Z.
Native AMD SSE4a run, since Not tested lists it: head
d4998b1(already onmaina6f5f7a) 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
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 flagsand[PASS] CPU: SSE4a register controls preserve bitfields, sources and flags..\scripts\test.ps1: passes, 0 failed; noSKIPPEDGPU tests.cargo test -p xcl --lib sse4a:insn::tests::sse4a_bit_fieldspasses.Not tested
AI use
Imported from ivall/xcl. Originally posted by AC-Storm-YT on 2026-11-24T00:35:56Z.
Test run on an AMD CPU with native SSE4a – commit
d4998b1(this PR's head, as is), clean treeTested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace: okcargo test --workspace -- --test-threads=4: 676 passed, 0 failed, 41 ignored. No SKIPPED tests.test_title_runs_and_game_folder_is_untouchedpasses, 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
mainRun and report: Claude Code (Claude Opus 5.5).
Imported from ivall/xcl. Originally posted by alpz1000 on 2026-11-24T00:59:56Z.
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 --workspacesucceeded.cargo test --locked -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --nocapturepassed (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.
Imported from ivall/xcl. Originally posted by 13hourstilliland on 2026-11-24T01:52:20Z.
Independent Intel CPU (i5-12600K, SSE4a emulated) e2e and full workspace run on exact PR head
d4998b1.Tested
d4998b1bf396dbbaf9c678d417c61ee0c9636dff(PR #434 head), clean worktreestable-x86_64-pc-windows-gnu, not MSVC); DXC 1.9.2609.5 (01b62ad4) viaXCL_DXC_DIR; debug build; noXCL_SAMPLE_*setcargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --nocapture(interactive desktop session)[PASS] CPU: SSE4a INSERTQ and EXTRQ preserve defined bits, sources and flagsand[PASS] CPU: SSE4a register controls preserve bitfields, sources and flags), and XCL logged that it emulated bothInsertqandExtrqon this CPU.cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output(interactive desktop session)xcllib: 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_hardwareno D3D12 debug layer(2):test_title_draws_with_a_root_signature_under_the_debug_layer,uploads_start_from_each_subresources_stateNot tested
scripts/smoke.ps1, D3D12 debug-layer testsAI use
gemini-4-neon: ran the commands and wrote this report from the logs; the human reviewed it.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T14:29:02Z.
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!
Imported from ivall/xcl. Originally posted by throny on 2026-11-28T02:13:47Z.
merge-check claim
head:
d4998b1bf3Imported from ivall/xcl. Originally posted by throny on 2026-11-28T02:30:26Z.
merge-check
base:
753e8b1ahead:
d4998b1bf3merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1512 passed, 0 failed, 47 ignored; the e2e test with the new instructions ran and passed on this Intel CPU, which has no SSE4a, so here it exercised XCL's emulation of them (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored
review: none; test-only. The byte encodings of the four instruction forms and all 18 expected values match AMD's definitions and main's own implementation. On a CPU with SSE4a the instructions run in hardware and the test still passes (reported in the thread), but then it does not exercise the emulation. The patch context in e2e.rs is stale, yet the merge is clean.
performance: none.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K (no SSE4a), Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T10:05:29Z.
merge-check claim
head:
d4998b1bf3Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T11:37:46Z.
merge-check
base:
e429936c10head:
d4998b1bf3merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2126 passed, 9 failed, 48 ignored, 25 SKIPPED: 21 no wave64, 3 per-lane f16/f32 forms refused (#1426 semantics), 1 no heap windows; failing: gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole, gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops, gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange, gpu::recomp::heap_window_tests::gpu_heap_flat_reads_match_guarded_and_root_output, gpu::recomp::tests::gpu_compute_mode_dispatch_abi, gpu::recomp::tests::gpu_float_cas_uses_ieee_equality, test_title_draws_with_a_root_signature_under_the_debug_layer, test_title_runs_and_game_folder_is_untouched, test_title_runs_under_the_debug_layer_with_dred: these 9 fail on the base too (the base e429936c's suite, run alone on this PC with the same command: 2126 passed, 9 failed, 48 ignored, 25 SKIPPED, these same 9 failing), and each also failed when rerun alone on this merge (the two debug-layer e2e tests stop on the D3D12 debug layer rejecting a pixel shader as corrupt or unsigned, and test_title_runs_and_game_folder_is_untouched on the test title's console command list memory-methods check, "post-Wait32/64 write failed"); not caused by this PR. The suite ran on this PC at the same time as 3 other PRs' suites, in one queued job.
review: none. Whole diff read (testtitle main.rs: two checks running INSERTQ / EXTRQ, immediate and register forms, xmm0-1 and xmm8-9, checking the low quadword, the source, a neighbouring XMM, a GPR and RFLAGS; e2e.rs asserts both checks ran). Encodings (F2/66 0F 78 /r ib ib, 0F 79 /r, REX.R/B) and every expected value check out against the instruction definitions; no field crosses bit 63. On this PC's Ryzen (SSE4a present) the instructions run natively, so XCL's console-only emulation of them (eh.rs / insn.rs) is not exercised here; on an Intel CPU it is.
performance: no runtime change (test-only diff).
verdict: safe to merge
hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile; trial merge dc0bb4cc8e525ebb2826f0297a2c67047c4da823 (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).
correction (2026-11-28): the base counts above were first given as 2128 passed: that base run reused this PC's merge test binary (one cargo target dir for both sides). The base was rerun with its own target dir; the same 9 tests fail on it, so the classification and the verdict stand.
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T22:46:13Z.
Review: COMMENTED
Critical review of current head
d4998b1b. I found no code blocker in the e2e-only INSERTQ/EXTRQ coverage: it checks immediate and register-controlled forms and requires both guest PASS markers. Reports in this thread cover both Intel emulation and native AMD SSE4a, which is the right cross-check for expected bits. Please preserve those two CPU lanes when the test title changes, since an Intel-only pass could bless a wrong software expectation. The branch is mergeable; no local Windows run.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:43:31Z.
merge-check
base:
7d86c5d2b7head:
d4998b1bf3merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2896 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (test title and e2e only). Main has the SSE4a emulation (
0cd0a53b,af20b4b3) and unit tests (insn.rs ~175) but no check through the test title or e2e, and no open PR adds one (#829 is decode-only). The encodings (imm and register forms, REX.R / REX.B for xmm8 / 9) and expected values match main'sinsertq/extrq; only the low quadword is checked, soaf20b4b3zeroing the high quadword doesn't affect it; flags and nearby registers are checked, and the e2e asserts both PASS lines so a skipped check is caught. Finding: on AMD CPUs these instructions run natively, so the check only exercises XCL's handler (eh.rs ~661-681) on Intel hosts; this run is on a Ryzen 7 7800X3D, where they ran natively, so it shows the check passes but not that the emulation is right. A run on an Intel CPU is the one that counts. No smoke run: test-only.performance: no smoke run (the default path doesn't reach this change); not measured. The e2e test passed (test_title_runs_and_game_folder_is_untouched), but on a Ryzen it checks native SSE4a, not the emulation.
verdict: safe to merge (test-only; on this AMD CPU the SSE4a instructions run natively, so a run on an Intel host is what exercises XCL's handler)
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
AI-written and posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by hackluminence on 2026-12-02T18:22:19Z.
merge-check
base:
817eb1fc9fhead:
d4998b1bf3merge: clean
build: cargo build --workspace -> ok
tests: cargo test -p xcl --test e2e -- --test-threads=4 --nocapture -> 5 passed, 0 failed, 0 ignored. SKIPPED: 2 of the 5 returned early because d3d12SDKLayers.dll was unavailable (D3D12 debug layer, with and without DRED). Failing: none.
review: Reviewed the full test-only diff. All 14 immediate and 4 register-controlled SSE4a cases passed. The Intel run logged emulation of both INSERTQ and EXTRQ, printed both required guest PASS lines and finished with zero guest failures. Native AMD execution was untested locally.
performance: Only the synthetic title and its test harness changed. No runtime frame-time or memory impact is expected. Tier 0 did not require a retail game run.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5060 Ti (32.0.16.2101), Intel Core i5-14400, Windows 11 Enterprise build 26300 / Codex, GPT-6.2 Astra
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.