Fixes x86 instruction decoding.

In the case of modrm + immediate then the immediate would end up
overwriting Src1 due to the the order of the decoding.
Changes Src1 and Src2 to an array and use a variable to index the array.
Causes a bit of code churn but fixes instruction decoding and allows
easier expansion in the future for instructions that have more sources
like AVX
This commit is contained in:
Ryan Houdek authored and Stefanos Kornilios Mitsis Poiitidis committed 2020-03-06 07:56:15 +02:00
1 parent 9135661861
commit ed12a8a242
4 files changed
+419 -341

No files matched your search

+1 -2
View File
@@ -110,8 +110,7 @@ struct DecodedInst {
bool DecodedSIB;
DecodedOperand Dest;
DecodedOperand Src1;
DecodedOperand Src2;
DecodedOperand Src[2];
// Constains the dispatcher handler pointer
X86InstInfo const* TableInfo;