diff --git a/FEXCore/Source/Interface/Core/Frontend.cpp b/FEXCore/Source/Interface/Core/Frontend.cpp index eafab66c44..dc488a18ba 100644 --- a/FEXCore/Source/Interface/Core/Frontend.cpp +++ b/FEXCore/Source/Interface/Core/Frontend.cpp @@ -49,9 +49,10 @@ static uint32_t MapModRMToReg(uint8_t REX, uint8_t bits, bool HighBits, bool Has return FEXCore::X86State::REG_XMM_0 + Offset; } else if (HasMM) { return FEXCore::X86State::REG_MM_0 + Offset; - } else if (!(HighBits && !HasREX)) { - return FEXCore::X86State::REG_RAX + Offset; } + else if (!(HighBits && !HasREX)) + return FEXCore::X86State::REG_RAX + Offset; + return GPR8BitHighIndexes[Offset]; } @@ -78,7 +79,7 @@ uint8_t Decoder::ReadByte() { LOGMAN_THROW_AA_FMT(InstructionSize < MAX_INST_SIZE, "Max instruction size exceeded!"); Instruction[InstructionSize] = Byte; InstructionSize++; - return Byte; + return Byte; } uint8_t Decoder::PeekByte(uint8_t Offset) const {