mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
fix(codegen): decode int imm8 instruction length correctly
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
namespace Codegen::X64OpcodeConstants {
|
||||
|
||||
inline constexpr std::uint8_t OneByteIntImm8 = 0xCD;
|
||||
|
||||
inline constexpr std::uint8_t PrefixLock = 0xF0;
|
||||
inline constexpr std::uint8_t PrefixRepne = 0xF2;
|
||||
inline constexpr std::uint8_t PrefixRep = 0xF3;
|
||||
|
||||
@@ -200,7 +200,7 @@ std::size_t X64InstructionDecoder::Decode(const std::uint8_t* data, std::size_t
|
||||
immediateSize = ImmSize32;
|
||||
}
|
||||
|
||||
if (opcode == OneByteJmpRel8 || opcode == OneByteJrcxz ||
|
||||
if (opcode == OneByteJmpRel8 || opcode == OneByteJrcxz || opcode == OneByteIntImm8 ||
|
||||
(opcode >= OneByteLoop && opcode <= OneByteLoopMax) ||
|
||||
(opcode >= OneByteInOutImm8Min && opcode <= OneByteInOutImm8Max)) {
|
||||
immediateSize = ImmSize8;
|
||||
|
||||
Reference in New Issue
Block a user