@@ -1298,7 +1298,7 @@ NdParseMemoryOperand16(
1298
1298
// Store the displacement.
1299
1299
Operand -> Info .Memory .HasDisp = !!Instrux -> HasDisp ;
1300
1300
Operand -> Info .Memory .DispSize = Instrux -> DispLength ;
1301
- Operand -> Info .Memory .Disp = ND_SIGN_EX (Instrux -> DispLength , Instrux -> Displacement );
1301
+ Operand -> Info .Memory .Disp = Instrux -> HasDisp ? ND_SIGN_EX (Instrux -> DispLength , Instrux -> Displacement ) : 0 ;
1302
1302
1303
1303
return ND_STATUS_SUCCESS ;
1304
1304
}
@@ -1416,7 +1416,7 @@ NdParseMemoryOperand3264(
1416
1416
1417
1417
Operand -> Info .Memory .HasDisp = Instrux -> HasDisp ;
1418
1418
Operand -> Info .Memory .DispSize = Instrux -> DispLength ;
1419
- Operand -> Info .Memory .Disp = ND_SIGN_EX (Instrux -> DispLength , Instrux -> Displacement );
1419
+ Operand -> Info .Memory .Disp = Instrux -> HasDisp ? ND_SIGN_EX (Instrux -> DispLength , Instrux -> Displacement ) : 0 ;
1420
1420
1421
1421
return ND_STATUS_SUCCESS ;
1422
1422
}
@@ -1441,14 +1441,14 @@ NdParseOperand(
1441
1441
ND_UINT8 opt , ops , opf , opa , opd , opb ;
1442
1442
ND_REG_SIZE vsibRegSize ;
1443
1443
ND_UINT8 vsibIndexSize , vsibIndexCount ;
1444
- ND_OPERAND_SIZE size , bcstSize ;
1444
+ ND_OPERAND_SIZE size ;
1445
1445
ND_BOOL width ;
1446
1446
1447
1447
// pre-init
1448
1448
status = ND_STATUS_SUCCESS ;
1449
1449
vsibRegSize = 0 ;
1450
1450
vsibIndexSize = vsibIndexCount = 0 ;
1451
- size = bcstSize = 0 ;
1451
+ size = 0 ;
1452
1452
1453
1453
// Get actual width.
1454
1454
width = Instrux -> Exs .w && !(Instrux -> Attributes & ND_FLAG_WIG );
@@ -1877,7 +1877,7 @@ NdParseOperand(
1877
1877
}
1878
1878
1879
1879
// Store operand info.
1880
- operand -> Size = bcstSize = size ;
1880
+ operand -> Size = size ;
1881
1881
1882
1882
//
1883
1883
// Fill in the operand type.
@@ -2242,7 +2242,7 @@ NdParseOperand(
2242
2242
break ;
2243
2243
2244
2244
case ND_OPT_LSTAR :
2245
- // The operand is implicit and is the IA32_STAR .
2245
+ // The operand is implicit and is the IA32_LSTAR .
2246
2246
operand -> Type = ND_OP_REG ;
2247
2247
operand -> Info .Register .Type = ND_REG_MSR ;
2248
2248
operand -> Info .Register .Size = ND_SIZE_64BIT ;
@@ -2778,6 +2778,7 @@ NdParseOperand(
2778
2778
// bcstSize / rawSize.
2779
2779
if (Instrux -> HasBroadcast )
2780
2780
{
2781
+ ND_OPERAND_SIZE bcstSize = size ;
2781
2782
operand -> Info .Memory .HasBroadcast = ND_TRUE ;
2782
2783
2783
2784
if (opd & ND_OPD_B32 )
0 commit comments