1
0
mirror of https://github.com/bitdefender/bddisasm.git synced 2024-11-22 07:28:07 +00:00

Only set bcstSize when it's required

This commit is contained in:
Turo Lamminen 2024-08-06 19:13:06 +03:00
parent 4b320e0817
commit b261dd447d

View File

@ -1441,14 +1441,14 @@ NdParseOperand(
ND_UINT8 opt, ops, opf, opa, opd, opb; ND_UINT8 opt, ops, opf, opa, opd, opb;
ND_REG_SIZE vsibRegSize; ND_REG_SIZE vsibRegSize;
ND_UINT8 vsibIndexSize, vsibIndexCount; ND_UINT8 vsibIndexSize, vsibIndexCount;
ND_OPERAND_SIZE size, bcstSize; ND_OPERAND_SIZE size;
ND_BOOL width; ND_BOOL width;
// pre-init // pre-init
status = ND_STATUS_SUCCESS; status = ND_STATUS_SUCCESS;
vsibRegSize = 0; vsibRegSize = 0;
vsibIndexSize = vsibIndexCount = 0; vsibIndexSize = vsibIndexCount = 0;
size = bcstSize = 0; size = 0;
// Get actual width. // Get actual width.
width = Instrux->Exs.w && !(Instrux->Attributes & ND_FLAG_WIG); width = Instrux->Exs.w && !(Instrux->Attributes & ND_FLAG_WIG);
@ -1877,7 +1877,7 @@ NdParseOperand(
} }
// Store operand info. // Store operand info.
operand->Size = bcstSize = size; operand->Size = size;
// //
// Fill in the operand type. // Fill in the operand type.
@ -2778,6 +2778,7 @@ memory:
// bcstSize / rawSize. // bcstSize / rawSize.
if (Instrux->HasBroadcast) if (Instrux->HasBroadcast)
{ {
ND_OPERAND_SIZE bcstSize = size;
operand->Info.Memory.HasBroadcast = ND_TRUE; operand->Info.Memory.HasBroadcast = ND_TRUE;
if (opd & ND_OPD_B32) if (opd & ND_OPD_B32)