diff options
| author | kett1m <benho0@proton.me> | 2026-11-25 02:26:46 +0100 |
|---|---|---|
| committer | kett1m <benho0@proton.me> | 2026-11-25 02:26:59 +0100 |
| commit | d6e8cbda66b55b9c998a8b278eb43a15258fdbfa (patch) | |
| tree | 69dd5e7cf40bd5dd1539cf20963067969c89b4f2 /runtime/src/vulkan_aftermath.cpp | |
| parent | b4b7756e8c64e7ae8b310288d543db0e428c0796 (diff) | |
x64_recomp: the 0F SIMD ranges skip eight ModRM opcodes (X64-RECOMP-SIMD-TABLE)
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.
Diffstat (limited to 'runtime/src/vulkan_aftermath.cpp')
0 files changed, 0 insertions, 0 deletions