From 4f276aae82111aa610aa547e798ee4c05170ae70 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Mon, 5 Apr 2021 21:22:44 -0700 Subject: [PATCH] Adds comment for LEA and segment registers LEA doesn't give you the result with segment register applied to it. Adds a comment to OpDispatcher to make it more clear --- External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp index faa7967d3..613e7020a 100644 --- a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp +++ b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp @@ -130,6 +130,7 @@ void OpDispatchBuilder::ThunkOp(OpcodeArgs) { } void OpDispatchBuilder::LEAOp(OpcodeArgs) { + // LEA specifically ignores segment prefixes if (CTX->Config.Is64BitMode) { uint32_t DstSize = X86Tables::DecodeFlags::GetOpAddr(Op->Flags, 0) == X86Tables::DecodeFlags::FLAG_OPERAND_SIZE_LAST ? 2 : X86Tables::DecodeFlags::GetOpAddr(Op->Flags, 0) == X86Tables::DecodeFlags::FLAG_WIDENING_SIZE_LAST ? 8 : 4;