fix(relinker): decode ModRM for more two-byte opcodes #18
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by franpeza on 2026-09-26T20:28:04Z.
The linear-sweep decoder did not know that these two-byte opcodes carry a ModRM byte:
0F 0Dprefetchw0F B8popcnt0F BBbtc r/m, r0F C0xadd r/m8, r80F C3movnti0F C4pinsrw(ModRM + imm8)When one of them appeared, the sweep desynchronised, and a later ModRM byte of
0x64was reported as an unsupportedfs:TLS access, which aborted relinking a commercial eboot.Both
DecodeandDecodeInstructionnow treat them as ModRM instructions, andpinsrwalso as imm8.Testing: found and verified while relinking on macOS in my fork. With this change the eboot relinks and runs past the point that used to fail. I have not built this branch on Linux or Windows; the change is limited to the decoder tables.
Pull request closed