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>