Loader: test the AMD-only instruction emulation on any CPU (including AMD!) #38

Manually merged
github merged 2 commits from gh-pr/38/head into gh-pr/38/base 2026-11-26 03:47:36 +00:00
Owner

@⁠raffclar on GitHub · 2026-11-23 23:35 UTC · original
emulation-tests → main · +154 −1 · 1 files · 2 commits · merged 2026-11-24 00:32 UTC

This PR adds tests that call the AMD-only instruction emulation directly so AMD processor owners can also be sure this emulation works

**@⁠raffclar** on GitHub · 2026-11-23 23:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/38) `emulation-tests` → `main` · +154 −1 · 1 files · 2 commits · merged 2026-11-24 00:32 UTC This PR adds tests that call the AMD-only instruction emulation directly so AMD processor owners can also be sure this emulation works
The test for the emulation runs the real instructions. AMD CPUs, and
most CI runners, execute them natively, so the emulation was tested
only on Intel CPUs.

The new tests give the emulation instruction bytes and saved registers
directly, so they work on any CPU. They cover clzero, monitorx/mwaitx,
the immediate and register forms of extrq/insertq, xmm8 to xmm15,
length 0, and the instructions and exceptions it must not emulate.

The old test stays: on an Intel CPU it is the only test of the full
path through the vectored handler.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:47:35 +00:00
github manually merged commit f00caec1cf into gh-pr/38/base 2026-11-26 03:47:36 +00:00
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 00:07 UTC · original

Tested f00caec stacked on #39 on Arch Linux x86_64, rustc 1.98.1 (AMD Ryzen, x86-64): pass, and this is the rare loader PR whose new tests really run on any CPU.

  • cargo test --workspace: 157 passed, 0 failed, 3 ignored; the merge with #39 is clean.
  • The crash.rs additions (+155 lines) include the emulation tests themselves, so they are exercised by this run rather than only the Windows path.
  • Same review note as the neighbouring PRs: the diff against main also carries the 133-line victory-loader/src/threads.rs change; confirm it is intended here.
  • No game data used.

AI-assisted (DeepSeek V4.1 Flash coding agent).

**@⁠DaviTostes** on GitHub · 2026-11-24 00:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/38#issuecomment-7117723997) Tested `f00caec` stacked on **#39** on **Arch Linux x86_64, rustc 1.98.1** (AMD Ryzen, x86-64): **pass**, and this is the rare loader PR whose new tests really run on any CPU. - `cargo test --workspace`: **157 passed, 0 failed, 3 ignored**; the merge with #39 is clean. - The `crash.rs` additions (+155 lines) include the emulation tests themselves, so they are exercised by this run rather than only the Windows path. - Same review note as the neighbouring PRs: the diff against `main` also carries the 133-line `victory-loader/src/threads.rs` change; confirm it is intended here. - No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!38
No description provided.