Skip to content

Commit

Permalink
Merge pull request #4239 from bylaws/3dn
Browse files Browse the repository at this point in the history
Frontend: Fix ModRM handling with 3DNow!
  • Loading branch information
Sonicadvance1 authored Dec 31, 2024
2 parents cd6722f + 0a58ce6 commit 15a1a0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion FEXCore/Source/Interface/Core/Frontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ void Decoder::DecodeModRM_64(X86Tables::DecodedOperand* Operand, X86Tables::ModR
// The invalid encoding types are described at Table 1-12. "promoted nsigned is always non-zero"
{
// If we have a VSIB byte (as opposed to SIB), then the index register is a vector.
const bool IsIndexVector = (DecodeInst->TableInfo->Flags & InstFlags::FLAGS_VEX_VSIB) != 0;
// DecodeInst->TableInfo may be null in the case of 3DNow! ModRM decoding.
const bool IsIndexVector = DecodeInst->TableInfo && (DecodeInst->TableInfo->Flags & InstFlags::FLAGS_VEX_VSIB) != 0;
uint8_t InvalidSIBIndex = 0b100; ///< SIB Index where there is no register encoding.
if (IsIndexVector) {
DecodeInst->Flags |= X86Tables::DecodeFlags::FLAG_VSIB_BYTE;
Expand Down

0 comments on commit 15a1a0f

Please sign in to comment.