Carry #1488, #1485, #1246: x64_recomp decoder fixes (in/out imm8, missing 0F SIMD ModRM opcodes, SSE4a 0F 78 imm8s) #3118

Manually merged
github merged 12 commits from github-bot/gh-3118 into gh-pr/3118/base 2026-12-03 16:37:22 +00:00 AGit
Owner

@⁠MoonEyes on GitHub · 2026-12-02 11:45 UTC · original
MoonEyes:carry/x64 → main · +131 −5 · 4 files · 12 commits · merged 2026-12-03 16:22 UTC

Claimed in the coordination issue as: X64-RECOMP-IN-IMM8, X64-RECOMP-SIMD-TABLE and X64-RECOMP-INSERTQ-IMM8 (the claims of the original author, #14, #14 and #14)

Depends on: #1120 (merged)
Depends on: #1121 (merged)

What and why

Carry of #1488, #1485 and #1246 (kett1m), all in conflict with main since tests/test_x64_recomp.py changed on both sides (the three PRs also conflict with each other there). #1485 says it depends on #1488, so one grouped pull request. This branch is main merged with the head of each PR, in the order #1488, #1485, #1246, so the authors' commits are kept (git merge-base --is-ancestor holds for all three heads). My only change is the three merges: in each one the conflict was the same block of tests/test_x64_recomp.py, and I kept main's tests and the PR's new tests side by side. No change to tools/x64_recomp.py or docs/mobile.md beyond the authors'.

The changes themselves are the authors':

  • #1488: E4-E7 (immediate-port in/out) took no operand byte and decoded one byte short; they now read their imm8 (EC-EF stay one byte). The docs/mobile.md note no longer quotes retail-image addresses (the maintainer's request on #1488, fixed in the author's last commit).
  • #1485: the generated 0F SIMD opcode ranges skipped eight ModRM opcodes (7C/7D, D0, D7, E6, E7, F0, F7), which decoded as unknown and left the walk one byte early; they are now in the table.
  • #1246: SSE4a 0F 78 (insertq/extrq) reads two imm8 bytes, not one; tests/test_recomp_census.py gains the census checks.

Tested

Windows 11, no GPU, no game files, on current main (40ac04183) plus this branch:

  • python -I tests/test_x64_recomp.py: 54 tests, OK (34 skipped: no qemu-system-aarch64).
  • python -I tests/test_recomp_census.py: 15 tests, OK.
  • Every tests/test_x64_recomp*.py file and tests/test_recomp_census.py, one by one with python -I: 22 files, 22 OK.
  • Red: the same two commands with main's tools/x64_recomp.py: test_x64_recomp.py 3 failures (test_in_out_immediate_port_consumes_imm8, test_simd_opcodes_outside_the_ranges_carry_modrm, test_sse4a_0f78_two_imm8), test_recomp_census.py 2 failures (test_insertq_census_has_no_resync_garbage, test_insertq_fn1_decodes_to_end). The tool was restored afterwards and the tree is clean.
  • python -I scripts/check_no_game_data.py docs/mobile.md tests/test_recomp_census.py tests/test_x64_recomp.py tools/x64_recomp.py: clean.
  • Not run: the full suite, CI.

GPUs tested: n/a (decoder unit tests only)

AI-assisted: yes. Author: Claude Opus (Claude Code). Reviewer: a separate read-only Claude Opus reviewer agent.

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md).
  • A new translator rule is in the contract table of docs/design.md. (n/a: x64 decoder fixes, no translator rule)

Supersedes #1488, #1485 and #1246 once merged; the originals stay open until a maintainer decides.


Generated by Claude Code

**@⁠MoonEyes** on GitHub · 2026-12-02 11:45 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3118) `MoonEyes:carry/x64` → `main` · +131 −5 · 4 files · 12 commits · merged 2026-12-03 16:22 UTC Claimed in the coordination issue as: X64-RECOMP-IN-IMM8, X64-RECOMP-SIMD-TABLE and X64-RECOMP-INSERTQ-IMM8 (the claims of the original author, https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14, https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 and https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) Depends on: #1120 (merged) Depends on: #1121 (merged) ### What and why Carry of #1488, #1485 and #1246 (kett1m), all in conflict with `main` since `tests/test_x64_recomp.py` changed on both sides (the three PRs also conflict with each other there). #1485 says it depends on #1488, so one grouped pull request. This branch is `main` merged with the head of each PR, in the order #1488, #1485, #1246, so the authors' commits are kept (`git merge-base --is-ancestor` holds for all three heads). My only change is the three merges: in each one the conflict was the same block of `tests/test_x64_recomp.py`, and I kept main's tests and the PR's new tests side by side. No change to `tools/x64_recomp.py` or `docs/mobile.md` beyond the authors'. The changes themselves are the authors': - #1488: `E4`-`E7` (immediate-port `in`/`out`) took no operand byte and decoded one byte short; they now read their imm8 (`EC`-`EF` stay one byte). The `docs/mobile.md` note no longer quotes retail-image addresses (the maintainer's request on #1488, fixed in the author's last commit). - #1485: the generated `0F` SIMD opcode ranges skipped eight ModRM opcodes (`7C`/`7D`, `D0`, `D7`, `E6`, `E7`, `F0`, `F7`), which decoded as unknown and left the walk one byte early; they are now in the table. - #1246: SSE4a `0F 78` (`insertq`/`extrq`) reads two imm8 bytes, not one; `tests/test_recomp_census.py` gains the census checks. ### Tested Windows 11, no GPU, no game files, on current `main` (`40ac04183`) plus this branch: - `python -I tests/test_x64_recomp.py`: 54 tests, OK (34 skipped: no `qemu-system-aarch64`). - `python -I tests/test_recomp_census.py`: 15 tests, OK. - Every `tests/test_x64_recomp*.py` file and `tests/test_recomp_census.py`, one by one with `python -I`: 22 files, 22 OK. - Red: the same two commands with main's `tools/x64_recomp.py`: `test_x64_recomp.py` 3 failures (`test_in_out_immediate_port_consumes_imm8`, `test_simd_opcodes_outside_the_ranges_carry_modrm`, `test_sse4a_0f78_two_imm8`), `test_recomp_census.py` 2 failures (`test_insertq_census_has_no_resync_garbage`, `test_insertq_fn1_decodes_to_end`). The tool was restored afterwards and the tree is clean. - `python -I scripts/check_no_game_data.py docs/mobile.md tests/test_recomp_census.py tests/test_x64_recomp.py tools/x64_recomp.py`: clean. - Not run: the full suite, CI. GPUs tested: n/a (decoder unit tests only) AI-assisted: yes. Author: Claude Opus (Claude Code). Reviewer: a separate read-only Claude Opus reviewer agent. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md). - [ ] A new translator rule is in the contract table of `docs/design.md`. (n/a: x64 decoder fixes, no translator rule) Supersedes #1488, #1485 and #1246 once merged; the originals stay open until a maintainer decides. --- _Generated by [Claude Code](https://claude.ai/code)_
`tools/x64_recomp.py` gives opcode 0x78 in the 0F table the operand shape `Ev Ib`,
one immediate byte. With a mandatory prefix it is SSE4a: `F2 0F 78 /r ib ib` is
insertq and `66 0F 78 /0 ib ib` is extrq, each taking two imm8 bytes. The walk
consumed one, stopped in the middle of the second immediate and read the rest of
the function from the wrong offset. Bare `0F 78` is Intel vmread, three bytes, and
this decoder does not model it, so it keeps the old entry.

Measured on the retail Xbox Series image (`game_scarlett_master.exe`, SHA-256
e95020b2fa4a721db3df59fdecf75621730ac559d8835252f6c3b658d5a08993) with REA GDB
sessions; the Ghidra provider times out at startup on this 120 MB image and rizin
is not installed. Evidence
`ev_8bc6ffaa1c4b73bdcefa7be02fa652de35385963f235b96a13bec78fa8cf5d57`
(`x/8i 0x1402e7ff1`) prints `insertq $0x10,$0x10,%xmm1,%xmm0` at 0x1402e7ff1 with
the next instruction at 0x1402e7ff7, six bytes, and
`ev_3055099862a04d185ea3484d3036dabacbc197843c9d19ba1863b9576a225632`
(`x/16xb 0x1402e7ff1`) gives the bytes `f2 0f 78 c1 10 10`.
`ev_e5978135e64450c1ef2f96600d221ef006ba645aee40278184a73da2d92cf703`
(`x/8i 0x14027c8f2`) prints `insertq $0x0,$0x8,%xmm7,%xmm9` with the next
instruction at 0x14027c8f9, seven bytes for `f2 44 0f 78 cf 08 00`
(`ev_4879605f8fdb2297d121db05459a0b9e1d8ce092e9f236b00c4f5acb8e417cf0`).
`ev_3229467ff3f1546d37a8146a72e98866409ff7149305993e56a28b0f2d444e75`
(`x/8i 0x1407f1ac9`) prints `insertq $0x10,$0x10,%xmm12,%xmm11` with the next
instruction at 0x1407f1ad0 for `f2 45 0f 78 dc 10 10`
(`ev_bc994b1c4b14e5e960b933f6f7b8c5f9407d8338f1ea3300078bbe174d7a4f01`).

The rule matches LLVM 23.1.5 (`llvm-mc -disassemble -triple=x86_64` prints
`insertq $16, $16, %xmm1, %xmm0` for `f2 0f 78 c1 10 10`, `extrq $4, $2, %xmm1`
for `66 0f 78 c1 02 04`, the four-byte register form `insertq %xmm2, %xmm1` for
`f2 0f 79 ca`, and `vmreadq %rcx, %rdx` for `0f 78 ca`) and GNU objdump.

A scan of `.text` (RVA 0x1000, 0x5f3f966 bytes) finds 19 `F2`-prefixed 0F 78
sites: 12 `f2 0f 78`, five `f2 45 0f 78`, two `f2 44 0f 78`, and no `66 0f 78`
extrq site. Seventeen are inside a `.pdata` function and are instruction starts
once the second immediate is consumed; two (RVA 0x546d4a2, 0x55b1811) fall
outside any `.pdata` function.

Decoding every `.pdata` function before and after, on the tree with #1120 and
#1121 (the census over this image needs #1121's VEX-bounds fix to reach the end):
299,257 functions, 22,435,858 instructions and 43,042 decode gaps before,
22,435,815 instructions and 43,040 gaps after. Eleven functions decode to a
different stream, each holding at least one insertq site: RVAs 0x27c690,
0x27e5f0, 0x2e7620, 0x7f1560, 0xf740a0, 0x269dbb0, 0x32bbfc0, 0x43d4290,
0x43d47a0, 0x455ba40, 0x5083e10. The register form `F2`/`66 0F 79` and the bare
`0F 78` entry are unchanged.

Tests: `tests/test_x64_recomp.py::DecodeTests.test_sse4a_0f78_two_imm8` pins the
four forms and their lengths, `tests/test_recomp_census.py::InsertqCensusTests`
rewrites the byte-built PE fixture's first function to `f2 0f 78 c1 10 10 c3` and
shows it decodes as insertq then ret with no resync `adc` and no decode error.
Both fail against the unfixed decoder.

Hardware: AMD Ryzen 5 7600X, Linux 7.3.4-1-default, Python 3.13.18; decoder and
census are CPU-only, no GPU. AI-assisted (DeepSeek V4.1 Flash).
The `0F` SIMD opcode list is built from opcode ranges, and the ranges left out
`7C`/`7D` (haddp*/hsubp* and their F2 forms), `D0` (addsubp*), `D7` (pmovmskb),
`E6` (cvtdq2pd/cvttpd2dq/cvtpd2dq), `E7` (movntdq), `F0` (lddqu) and `F7`
(maskmovdqu). Each of them takes a ModRM byte, but with no table entry it decoded
as the unknown `op0f_XX` of its two opcode bytes, so the byte after them was read
as the next instruction and the rest of the function was decoded from the wrong
offset.

Two measurements on `game_scarlett_master.exe` (SHA-256
`e95020b2fa4a721db3df59fdecf75621730ac559d8835252f6c3b658d5a08993`). Walking
every `.pdata` function (299,257) with the unfixed decoder, 6 stop on one of these
opcodes; with the fix they decode 852 instructions further and 3 reach the end of
the function with no unknown left. A per-instruction differential against objdump
over `.text` (objdump's walk and the decoder's walk, lengths compared, 26,674,180
instructions) goes from 52,638 to 52,632 mismatches: the 6 removed are 4 `F3 0F E6`
and 2 `66 REX.W 0F D7`, and no signature is added. `docs/mobile.md` records both
counts and the REA `gnu.objdump` section-header evidence.

Test: tests/test_x64_recomp.py::DecodeTests::test_simd_opcodes_outside_the_ranges_carry_modrm
fails before the fix (the first case is `unknown`) and passes after, covering the
eight opcodes in both the register and memory forms.
The primary table gives `E4`, `E5`, `E6` and `E7` the operand shape `sys`, so the decoder
consumed only the opcode and reported one byte. These are the immediate-port forms of `in`
and `out` (`E4 ib` = in al,imm8, `E5 ib` = in eax,imm8, `E6 ib` = out imm8,al, `E7 ib` =
out imm8,eax): each takes one immediate byte, so the instruction is two bytes and the walk
was one byte short, reading the port number as the next opcode. The `EC`-`EF` DX-port forms
do take no immediate and are left alone.

A per-instruction differential against objdump over the retail image's `.text`
(`game_scarlett_master.exe`, SHA-256
`e95020b2fa4a721db3df59fdecf75621730ac559d8835252f6c3b658d5a08993`, 26,674,180
instructions) finds the form used twice, at RVAs `0x55f2ed4` and `0x564652c`; both were one
byte short of objdump's two. The fix takes the mismatch count from 52,638 to 52,636 and adds
no signature. `docs/mobile.md` records the measurement, the two offsets and the REA
`gnu.objdump` section-header evidence.

Test: tests/test_x64_recomp.py::DecodeTests::test_in_out_immediate_port_consumes_imm8 fails
before the fix (the first case decodes to size 1) and passes after, covering `E4`-`E7` and
the one-byte `EC`-`EF` forms.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	tests/test_x64_recomp.py
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	tests/test_x64_recomp.py
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	tests/test_x64_recomp.py
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	tests/test_x64_recomp.py
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 11:49:20 +00:00
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-02 12:56 UTC · original

Ran natively on Windows 11, Python 3.13, head 1ca3e4a98 merged into current main (23a51c494), no conflicts.

  • py -3.13 -I tests/test_x64_recomp.py: OK (skipped=34, no qemu-system-aarch64 here).
  • py -3.13 -I tests/test_recomp_census.py: OK.

The body already shows red on main, so I checked the decoder lengths against an independent disassembler instead. Throwaway buffer: every 0F xx opcode (except the 38/3A escapes) with no prefix, 66, F2 and F3, each with five ModRM forms (register, [rax], SIB + disp8, RIP + disp32, disp32), plus E4..E7 and EC..EF with and without 66. 5,076 encodings, each in its own 32-byte slot padded with nop. Lengths compared with GNU objdump 2.46 (-b binary -mi386:x86-64), only on encodings objdump does not print as (bad) (3,570 of them):

this PR main
same length as objdump 3,096 3,025
decoder says unknown 389 450
decoder gives a different length 85 95

All the opcodes this PR adds now match objdump on their valid forms: 66/F2 7C, 7D, D0; D7, F7 (MMX register form and 66 register form); E6 with 66, F2, F3; E7 memory form; F2 F0 memory form; 66 0F 78 /0 ib ib and F2 0F 78 /r ib ib (6 bytes); E4..E7 (2 bytes). The 10 encodings that drop out of the "different length" row are exactly in/out imm8 and the two SSE4a register forms.

The 85 left are not from this PR:

  • 80 are 66 0F 80..8F (Jcc with an operand-size prefix): the decoder gives rel32 (7 bytes, Intel ignores 66 here in 64-bit mode), objdump gives rel16 (5 bytes, AMD behaviour). Compilers don't emit this.
  • 5 are no-prefix 0F 78 (VMREAD): the decoder still reads an imm8 there, so it comes out 1 byte too long (4 vs 3 for a register operand). The new comment says VMREAD keeps the entry; that entry is Ev Ib. VMREAD is VMX-root only so it won't show up in game code, but the comment could say the length is wrong for it.

Two small notes, neither blocking:

  • 66 0F 78 and F2 0F 78 with a memory ModRM (mod != 3) are invalid (objdump prints (bad)), but the decoder accepts them as 8-byte instructions with two imm8. Only matters if the walk lands in data.
  • Among the 389 still unknown are 0F A4/A5/AC/AD, i.e. shld/shrd (48 0F A4 C2 05 decodes as op0f_a4, unknown). Those do show up in compiled x64 code (128-bit shifts), so they look like a good next table entry. Out of scope here.

Not checked: the qemu-backed tests (no qemu here), VEX/EVEX and 0F 38/0F 3A maps, real executables (no game files used).

GPUs tested: n/a (CPU-only tests).

AI-assisted: yes (Claude Code).

**@⁠Kal0s-design** on GitHub · 2026-12-02 12:56 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3118#issuecomment-7346103037) Ran natively on Windows 11, Python 3.13, head `1ca3e4a98` merged into current `main` (`23a51c494`), no conflicts. - `py -3.13 -I tests/test_x64_recomp.py`: OK (skipped=34, no `qemu-system-aarch64` here). - `py -3.13 -I tests/test_recomp_census.py`: OK. The body already shows red on main, so I checked the decoder lengths against an independent disassembler instead. Throwaway buffer: every `0F xx` opcode (except the 38/3A escapes) with no prefix, `66`, `F2` and `F3`, each with five ModRM forms (register, `[rax]`, SIB + disp8, RIP + disp32, disp32), plus `E4`..`E7` and `EC`..`EF` with and without `66`. 5,076 encodings, each in its own 32-byte slot padded with `nop`. Lengths compared with GNU objdump 2.46 (`-b binary -mi386:x86-64`), only on encodings objdump does not print as `(bad)` (3,570 of them): | | this PR | main | |---|---|---| | same length as objdump | 3,096 | 3,025 | | decoder says unknown | 389 | 450 | | decoder gives a different length | 85 | 95 | All the opcodes this PR adds now match objdump on their valid forms: `66`/`F2` `7C`, `7D`, `D0`; `D7`, `F7` (MMX register form and `66` register form); `E6` with `66`, `F2`, `F3`; `E7` memory form; `F2 F0` memory form; `66 0F 78 /0 ib ib` and `F2 0F 78 /r ib ib` (6 bytes); `E4`..`E7` (2 bytes). The 10 encodings that drop out of the "different length" row are exactly `in`/`out` imm8 and the two SSE4a register forms. The 85 left are not from this PR: - 80 are `66 0F 80..8F` (Jcc with an operand-size prefix): the decoder gives rel32 (7 bytes, Intel ignores `66` here in 64-bit mode), objdump gives rel16 (5 bytes, AMD behaviour). Compilers don't emit this. - 5 are no-prefix `0F 78` (VMREAD): the decoder still reads an imm8 there, so it comes out 1 byte too long (4 vs 3 for a register operand). The new comment says VMREAD keeps the entry; that entry is `Ev Ib`. VMREAD is VMX-root only so it won't show up in game code, but the comment could say the length is wrong for it. Two small notes, neither blocking: - `66 0F 78` and `F2 0F 78` with a memory ModRM (mod != 3) are invalid (objdump prints `(bad)`), but the decoder accepts them as 8-byte instructions with two imm8. Only matters if the walk lands in data. - Among the 389 still unknown are `0F A4`/`A5`/`AC`/`AD`, i.e. `shld`/`shrd` (`48 0F A4 C2 05` decodes as `op0f_a4`, unknown). Those do show up in compiled x64 code (128-bit shifts), so they look like a good next table entry. Out of scope here. Not checked: the qemu-backed tests (no qemu here), VEX/EVEX and `0F 38`/`0F 3A` maps, real executables (no game files used). GPUs tested: n/a (CPU-only tests). AI-assisted: yes (Claude Code).
Author
Owner

@⁠fiestorra on GitHub · 2026-12-02 23:29 UTC · original

VERIFY-3118 — Windows nativo: red then green en las tres piezas del decodificador

Own commit 1ca3e4a98 — a merge of #1246 into carry/x64: tools/x64_recomp.py (+6), tests/test_recomp_census.py (+39), tests/test_x64_recomp.py (+22/−1)

Ran at the head

python -I tests/test_recomp_census.py      Ran 15 tests — OK
python -I tests/test_x64_recomp.py         Ran 54 tests — OK (skipped=34)

Negative control: git apply -R of the commit does not apply (the branch also carries a merged main on the same file), so I put main's version of tools/x64_recomp.py back and re-ran:

FAIL: test_insertq_census_has_no_resync_garbage
FAIL: test_insertq_fn1_decodes_to_end
FAIL: test_in_out_immediate_port_consumes_imm8
FAIL: test_simd_opcodes_outside_the_ranges_carry_modrm
FAIL: test_sse4a_0f78_two_imm8

Five bite, one per piece of the change.

What the change is, in three pieces:

  1. Opcode ranges that are ModRM forms and were being skipped — 7C/7D (haddp*/hsubp*), D0 (addsubp*), D7 (pmovmskb), E6 (cvt*dq2pd/pd2dq), E7 (movntdq), F0 (lddqu), F7 (maskmovdqu) — listed explicitly, with the reason in a comment.
  2. in/out with an immediate port (E4–E7) now consume their imm8 — a one-byte omission that desynchronises everything after it.
  3. SSE4a F2 0F 78 /r ib ib (insertq) and 66 0F 78 /0 ib ib (extrq) read two imm8, not one — and the comment handles the collision: without a mandatory prefix 0F 78 is Intel VMREAD, which the decoder does not model, so it keeps the entry. That sentence is why the test test_sse4a_0f78_two_imm8 can exist at all.

Why the census test is the interesting one: test_insertq_census_has_no_resync_garbage does not check one instruction — it checks that the decoder did not desynchronise, which is what a wrong operand length does. That is the failure mode of a decoder, and it is tested as a property rather than an example.

What I could not test

  • The 34 skipped tests: they need generated code and hardware, not available here.
  • Recompiled code running: no title.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-12-02 23:29 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3118#issuecomment-7362074801) ## VERIFY-3118 — Windows nativo: `red then green` en las tres piezas del decodificador | | | |---|---| | Own commit | `1ca3e4a98` — a merge of #1246 into `carry/x64`: `tools/x64_recomp.py` (+6), `tests/test_recomp_census.py` (+39), `tests/test_x64_recomp.py` (+22/−1) | **Ran at the head** ``` python -I tests/test_recomp_census.py Ran 15 tests — OK python -I tests/test_x64_recomp.py Ran 54 tests — OK (skipped=34) ``` **Negative control**: `git apply -R` of the commit does not apply (the branch also carries a merged `main` on the same file), so I put **`main`'s version of `tools/x64_recomp.py`** back and re-ran: ``` FAIL: test_insertq_census_has_no_resync_garbage FAIL: test_insertq_fn1_decodes_to_end FAIL: test_in_out_immediate_port_consumes_imm8 FAIL: test_simd_opcodes_outside_the_ranges_carry_modrm FAIL: test_sse4a_0f78_two_imm8 ``` **Five bite, one per piece of the change.** **What the change is, in three pieces**: 1. **Opcode ranges that are ModRM forms and were being skipped** — `7C/7D` (`haddp*`/`hsubp*`), `D0` (`addsubp*`), `D7` (`pmovmskb`), `E6` (`cvt*dq2pd`/`pd2dq`), `E7` (`movntdq`), `F0` (`lddqu`), `F7` (`maskmovdqu`) — **listed explicitly, with the reason in a comment**. 2. **`in`/`out` with an immediate port** (`E4`–`E7`) **now consume their `imm8`** — a **one-byte** omission that desynchronises everything after it. 3. **SSE4a `F2 0F 78 /r ib ib` (`insertq`) and `66 0F 78 /0 ib ib` (`extrq`) read two imm8, not one** — and the comment handles the collision: **without a mandatory prefix `0F 78` is Intel `VMREAD`, which the decoder does not model, so it keeps the entry.** **That sentence is why the test `test_sse4a_0f78_two_imm8` can exist at all.** **Why the census test is the interesting one**: `test_insertq_census_has_no_resync_garbage` does not check one instruction — **it checks that the decoder did not desynchronise**, which is what a wrong operand length does. **That is the failure mode of a decoder, and it is tested as a property rather than an example.** ## What I could not test - **The 34 skipped tests**: they need generated code and hardware, not available here. - **Recompiled code running**: no title. Written with an AI assistant.
github-bot changed target branch from main to gh-pr/3118/base 2026-12-03 16:35:23 +00:00
github manually merged commit 1ca3e4a986 into gh-pr/3118/base 2026-12-03 16:35:51 +00:00
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/ubiquitarianism--leonida!3118
No description provided.