mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 17:13:13 -05:00
fix(relinker): decode XOP instructions
The x86 decoder had no XOP (AMD 8F escape) support and read 8F E8.. as POP r/m, losing instruction boundaries. Since #2238 roots code addresses taken by RIP-relative LEA, code analysis reaches CPU-dispatched XOP paths, such as the vpperm routines in Stremio Plus (PPSA74126), OpenNOW (PPSA99082) and PPSA99420, and their Windows conversion failed with "Code analysis: overlapping instruction boundaries". Decode 8F followed by a map of 8 or more as a three-byte XOP prefix (8F can only be POP r/m with ModRM.reg 0) with a ModRM operand, an 8-bit immediate in map 8 and a 32-bit immediate in map 0Ah, in both the length and operand decoders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
23ed501f4a
commit
ce8dbc977f
3 files changed
+30
-7
No files matched your search
@@ -220,6 +220,10 @@ inline constexpr std::size_t Vex2PrefixLength = 2;
|
||||
inline constexpr std::size_t Vex3PrefixLength = 3;
|
||||
inline constexpr std::uint8_t Vex3MapMask = 0x1F;
|
||||
inline constexpr std::uint8_t Vex3Map0F3A = 0x03;
|
||||
inline constexpr std::uint8_t XopPrefix = 0x8F;
|
||||
inline constexpr std::uint8_t XopMapMin = 0x08;
|
||||
inline constexpr std::uint8_t XopMap8 = 0x08;
|
||||
inline constexpr std::uint8_t XopMapA = 0x0A;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user