|
|
|
@ -788,12 +788,6 @@ ShemuComputeLinearAddress(
|
|
|
|
|
{
|
|
|
|
|
uint64_t gla = 0;
|
|
|
|
|
|
|
|
|
|
// Memory operands usually have a segment.
|
|
|
|
|
if (Operand->Info.Memory.HasSeg)
|
|
|
|
|
{
|
|
|
|
|
gla += ShemuGetSegBase(Context, Operand->Info.Memory.Seg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Operand->Info.Memory.HasBase)
|
|
|
|
|
{
|
|
|
|
|
gla += ShemuGetGprValue(Context, Operand->Info.Memory.Base, Operand->Info.Memory.BaseSize, false);
|
|
|
|
@ -857,11 +851,24 @@ ShemuComputeLinearAddress(
|
|
|
|
|
gla &= 0xFFFFFFFF;
|
|
|
|
|
break;
|
|
|
|
|
case ND_ADDR_16:
|
|
|
|
|
gla &= 0xFFFFF;
|
|
|
|
|
gla &= 0xFFFF;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Memory operands usually have a segment. Note that we don't care about any segment checks, since we're most
|
|
|
|
|
// likely be provided with flat segments. If checks should be needed, dedicated callbacks should be added.
|
|
|
|
|
if (Operand->Info.Memory.HasSeg)
|
|
|
|
|
{
|
|
|
|
|
gla += ShemuGetSegBase(Context, Operand->Info.Memory.Seg);
|
|
|
|
|
|
|
|
|
|
if (Context->Mode != ND_CODE_64)
|
|
|
|
|
{
|
|
|
|
|
// Truncate to 32 bit outside 64 bit.
|
|
|
|
|
gla &= 0xFFFFFFFF;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return gla;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|