diff options
| author | NotRexed <therealnothingfn@gmail.com> | 2026-11-26 02:20:59 -0500 |
|---|---|---|
| committer | NotRexed <therealnothingfn@gmail.com> | 2026-11-26 02:20:59 -0500 |
| commit | 9d554b6b131ae75bccc91c44d345c0bb3a53c7d1 (patch) | |
| tree | 2c5cce46a98e2621d61acc6c866a98bf158b9e03 /runtime/test/process_cmdline_test.cpp | |
| parent | b0fb528c2788fd52f348115e15f1b0914fbeea29 (diff) | |
loader: emulate the console CPU's instructions a PC's may lack
Leonida had no #UD handling: on an Intel host the title dies at its first
CLZERO loop. Port the behaviour of VIctory's victory-loader
console_insn.rs (GPL-3.0-or-later): a vectored handler, installed after
the startup trace's so an emulated instruction is no exception event,
emulates in mapped images only CLZERO (and a whole clzero/add/cmp/jb loop
at once), CLWB (patched to NOPs), MONITORX/MWAITX, RDPRU, RDPID and
SSE4a EXTRQ/INSERTQ, and leaves UD2 and anything else to the title.
The decoder is written from AMD's APM encodings, not translated from
VIctory's (which is XCL's, GPL-2.0-only); the prefix rules VIctory
measured are followed. The decoder is portable; console_insn_test checks
it and the emulation on a hand-made CONTEXT, executing nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/process_cmdline_test.cpp')
0 files changed, 0 insertions, 0 deletions