|| ((Result < FirstValue) && (Result < (SecondValue + Carry)));
State->Flags.Of = ((FirstValue & SignFlag) == (SecondValue & SignFlag))
&& ((FirstValue & SignFlag) != (Result & SignFlag));
- State->Flags.Af = ((((FirstValue & 0x0F) + ((SecondValue + Carry) & 0x0F)) & 0x10) != 0);
+ State->Flags.Af = ((FirstValue ^ SecondValue ^ Result) & 0x10) != 0;
break;
}
Result = (FirstValue - SecondValue - Carry) & MaxValue;
/* Update CF, OF and AF */
- State->Flags.Cf = FirstValue < (SecondValue + Carry);
+ State->Flags.Cf = Carry
+ ? (FirstValue <= SecondValue)
+ : (FirstValue < SecondValue);
State->Flags.Of = ((FirstValue & SignFlag) != (SecondValue & SignFlag))
&& ((FirstValue & SignFlag) != (Result & SignFlag));
- State->Flags.Af = (FirstValue & 0x0F) < ((SecondValue + Carry) & 0x0F);
+ State->Flags.Af = ((FirstValue ^ SecondValue ^ Result) & 0x10) != 0;
break;
}
FAST486_OPCODE_HANDLER(Fast486OpcodeGroup8082)
{
- UCHAR Immediate, Dummy, Value;
+ UCHAR Immediate, Value;
FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
}
/* Read the operands */
- if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
if (OperandSize)
{
- ULONG Immediate, Value, Dummy;
+ ULONG Immediate, Value;
/* Fetch the immediate operand */
if (!Fast486FetchDword(State, &Immediate))
}
/* Read the operands */
- if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
}
else
{
- USHORT Immediate, Value, Dummy;
+ USHORT Immediate, Value;
/* Fetch the immediate operand */
if (!Fast486FetchWord(State, &Immediate))
}
/* Read the operands */
- if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
if (OperandSize)
{
ULONG Immediate = (ULONG)((LONG)ImmByte); // Sign extend
- ULONG Value, Dummy;
+ ULONG Value;
/* Read the operands */
- if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
else
{
USHORT Immediate = (USHORT)((SHORT)ImmByte); // Sign extend
- USHORT Value, Dummy;
+ USHORT Value;
/* Read the operands */
- if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupC0)
{
- UCHAR Dummy, Value, Count;
+ UCHAR Value, Count;
FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
}
/* Read the operands */
- if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
if (OperandSize)
{
- ULONG Dummy, Value;
+ ULONG Value;
/* Read the operands */
- if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
}
else
{
- USHORT Dummy, Value;
+ USHORT Value;
/* Read the operands */
- if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupD0)
{
- UCHAR Dummy, Value;
+ UCHAR Value;
FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
}
/* Read the operands */
- if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
if (OperandSize)
{
- ULONG Dummy, Value;
+ ULONG Value;
/* Read the operands */
- if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
}
else
{
- USHORT Dummy, Value;
+ USHORT Value;
/* Read the operands */
- if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupD2)
{
- UCHAR Dummy, Value;
+ UCHAR Value;
FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
}
/* Read the operands */
- if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
if (OperandSize)
{
- ULONG Dummy, Value;
+ ULONG Value;
/* Read the operands */
- if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
}
else
{
- USHORT Dummy, Value;
+ USHORT Value;
/* Read the operands */
- if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF6)
{
- UCHAR Dummy, Value = 0;
+ UCHAR Value = 0;
FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
}
/* Read the operands */
- if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
/* DIV */
case 6:
{
- UCHAR Quotient = State->GeneralRegs[FAST486_REG_EAX].LowWord / Value;
- UCHAR Remainder = State->GeneralRegs[FAST486_REG_EAX].LowWord % Value;
+ UCHAR Quotient, Remainder;
+
+ if (Value == 0)
+ {
+ /* Divide error */
+ Fast486Exception(State, FAST486_EXCEPTION_DE);
+ return FALSE;
+ }
+
+ Quotient = State->GeneralRegs[FAST486_REG_EAX].LowWord / Value;
+ Remainder = State->GeneralRegs[FAST486_REG_EAX].LowWord % Value;
/* Write back the results */
State->GeneralRegs[FAST486_REG_EAX].LowByte = Quotient;
/* IDIV */
case 7:
{
- CHAR Quotient = (SHORT)State->GeneralRegs[FAST486_REG_EAX].LowWord / (CHAR)Value;
- CHAR Remainder = (SHORT)State->GeneralRegs[FAST486_REG_EAX].LowWord % (CHAR)Value;
+ CHAR Quotient, Remainder;
+
+ if (Value == 0)
+ {
+ /* Divide error */
+ Fast486Exception(State, FAST486_EXCEPTION_DE);
+ return FALSE;
+ }
+
+ Quotient = (SHORT)State->GeneralRegs[FAST486_REG_EAX].LowWord / (CHAR)Value;
+ Remainder = (SHORT)State->GeneralRegs[FAST486_REG_EAX].LowWord % (CHAR)Value;
/* Write back the results */
State->GeneralRegs[FAST486_REG_EAX].LowByte = (UCHAR)Quotient;
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF7)
{
- ULONG Dummy, Value = 0, SignFlag;
+ ULONG Value = 0, SignFlag;
FAST486_MOD_REG_RM ModRegRm;
BOOLEAN OperandSize, AddressSize;
if (OperandSize)
{
/* 32-bit */
- if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
else
{
/* 16-bit */
- if (!Fast486ReadModrmWordOperands(State, &ModRegRm, (PUSHORT)&Dummy, (PUSHORT)&Value))
+ if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, (PUSHORT)&Value))
{
/* Exception occurred */
return FALSE;
/* DIV */
case 6:
{
+ if (Value == 0)
+ {
+ /* Divide error */
+ Fast486Exception(State, FAST486_EXCEPTION_DE);
+ return FALSE;
+ }
+
if (OperandSize)
{
ULONGLONG Dividend = (ULONGLONG)State->GeneralRegs[FAST486_REG_EAX].Long
/* IDIV */
case 7:
{
+ if (Value == 0)
+ {
+ /* Divide error */
+ Fast486Exception(State, FAST486_EXCEPTION_DE);
+ return FALSE;
+ }
+
if (OperandSize)
{
LONGLONG Dividend = (LONGLONG)State->GeneralRegs[FAST486_REG_EAX].Long
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupFE)
{
- UCHAR Dummy, Value;
+ UCHAR Value;
FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
}
/* Read the operands */
- if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
/* Read the operands */
if (OperandSize)
{
- ULONG Dummy, Value;
+ ULONG Value;
- if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
else if (ModRegRm.Register == 3)
{
USHORT Selector;
- INT Segment = FAST486_REG_DS;
+ FAST486_SEG_REGS Segment = FAST486_REG_DS;
/* Check for the segment override */
if (State->PrefixFlags & FAST486_PREFIX_SEG)
else if (ModRegRm.Register == 5)
{
USHORT Selector;
- INT Segment = FAST486_REG_DS;
+ FAST486_SEG_REGS Segment = FAST486_REG_DS;
/* Check for the segment override */
if (State->PrefixFlags & FAST486_PREFIX_SEG)
}
else
{
- USHORT Dummy, Value;
+ USHORT Value;
- if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
/* Set the IP to the address */
State->InstPtr.LowWord = Value;
+
+ /* Clear the top half of EIP */
+ State->InstPtr.Long &= 0xFFFF;
}
else if (ModRegRm.Register == 3)
{
USHORT Selector;
- INT Segment = FAST486_REG_DS;
+ FAST486_SEG_REGS Segment = FAST486_REG_DS;
/* Check for the segment override */
if (State->PrefixFlags & FAST486_PREFIX_SEG)
/* Set the IP to the address */
State->InstPtr.LowWord = Value;
+ /* Clear the top half of EIP */
+ State->InstPtr.Long &= 0xFFFF;
}
else if (ModRegRm.Register == 4)
{
else if (ModRegRm.Register == 5)
{
USHORT Selector;
- INT Segment = FAST486_REG_DS;
+ FAST486_SEG_REGS Segment = FAST486_REG_DS;
/* Check for the segment override */
if (State->PrefixFlags & FAST486_PREFIX_SEG)
/* Set the IP to the address */
State->InstPtr.LowWord = Value;
+
+ /* Clear the top half of EIP */
+ State->InstPtr.Long &= 0xFFFF;
}
else if (ModRegRm.Register == 6)
{
return TRUE;
}
+FAST486_OPCODE_HANDLER(Fast486OpcodeGroup0F00)
+{
+ FAST486_MOD_REG_RM ModRegRm;
+ BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
+
+ NO_LOCK_PREFIX();
+ TOGGLE_ADSIZE(AddressSize);
+
+ if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ /* Check which operation this is */
+ switch (ModRegRm.Register)
+ {
+ /* SLDT */
+ case 0:
+ {
+ /* Not recognized in real mode or virtual 8086 mode */
+ if (!(State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE)
+ || State->Flags.Vm)
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_UD);
+ }
+
+ return Fast486WriteModrmWordOperands(State,
+ &ModRegRm,
+ FALSE,
+ State->Ldtr.Selector);
+ }
+
+ /* STR */
+ case 1:
+ {
+ /* Not recognized in real mode or virtual 8086 mode */
+ if (!(State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE)
+ || State->Flags.Vm)
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_UD);
+ }
+
+ return Fast486WriteModrmWordOperands(State,
+ &ModRegRm,
+ FALSE,
+ State->TaskReg.Selector);
+ }
+
+ /* LLDT */
+ case 2:
+ {
+ USHORT Selector;
+ FAST486_SYSTEM_DESCRIPTOR GdtEntry;
+
+ /* Not recognized in real mode or virtual 8086 mode */
+ if (!(State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE)
+ || State->Flags.Vm)
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_UD);
+ }
+
+ /* This is a privileged instruction */
+ if (Fast486GetCurrentPrivLevel(State) != 0)
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_GP);
+ return FALSE;
+ }
+
+ if (!Fast486ReadModrmWordOperands(State,
+ &ModRegRm,
+ NULL,
+ &Selector))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ /* Make sure the GDT contains the entry */
+ if (GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1))
+ {
+ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector);
+ return FALSE;
+ }
+
+ /* Read the GDT */
+ if (!Fast486ReadLinearMemory(State,
+ State->Gdtr.Address
+ + GET_SEGMENT_INDEX(Selector),
+ &GdtEntry,
+ sizeof(GdtEntry)))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ if (GET_SEGMENT_INDEX(Selector) == 0)
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_GP);
+ return FALSE;
+ }
+
+ if (!GdtEntry.Present)
+ {
+ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_NP, Selector);
+ return FALSE;
+ }
+
+ if (GdtEntry.Signature != FAST486_LDT_SIGNATURE)
+ {
+ /* This is not a LDT descriptor */
+ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector);
+ return FALSE;
+ }
+
+ /* Update the LDTR */
+ State->Ldtr.Selector = Selector;
+ State->Ldtr.Base = GdtEntry.Base | (GdtEntry.BaseMid << 16) | (GdtEntry.BaseHigh << 24);
+ State->Ldtr.Limit = GdtEntry.Limit | (GdtEntry.LimitHigh << 16);
+ if (GdtEntry.Granularity) State->Ldtr.Limit <<= 12;
+
+ return TRUE;
+ }
+
+ /* LTR */
+ case 3:
+ {
+ USHORT Selector;
+ FAST486_SYSTEM_DESCRIPTOR GdtEntry;
+
+ /* Not recognized in real mode or virtual 8086 mode */
+ if (!(State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE)
+ || State->Flags.Vm)
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_UD);
+ }
+
+ /* This is a privileged instruction */
+ if (Fast486GetCurrentPrivLevel(State) != 0)
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_GP);
+ return FALSE;
+ }
+
+ if (!Fast486ReadModrmWordOperands(State,
+ &ModRegRm,
+ NULL,
+ &Selector))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ /* Make sure the GDT contains the entry */
+ if (GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1))
+ {
+ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector);
+ return FALSE;
+ }
+
+ /* Read the GDT */
+ if (!Fast486ReadLinearMemory(State,
+ State->Gdtr.Address
+ + GET_SEGMENT_INDEX(Selector),
+ &GdtEntry,
+ sizeof(GdtEntry)))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ if (GET_SEGMENT_INDEX(Selector) == 0)
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_GP);
+ return FALSE;
+ }
+
+ if (!GdtEntry.Present)
+ {
+ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_NP, Selector);
+ return FALSE;
+ }
+
+ if (GdtEntry.Signature != FAST486_TSS_SIGNATURE)
+ {
+ /* This is not a TSS descriptor */
+ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, Selector);
+ return FALSE;
+ }
+
+ /* Update the TR */
+ State->TaskReg.Selector = Selector;
+ State->TaskReg.Base = GdtEntry.Base | (GdtEntry.BaseMid << 16) | (GdtEntry.BaseHigh << 24);
+ State->TaskReg.Limit = GdtEntry.Limit | (GdtEntry.LimitHigh << 16);
+ if (GdtEntry.Granularity) State->TaskReg.Limit <<= 12;
+ State->TaskReg.Busy = TRUE;
+
+ return TRUE;
+ }
+
+ /* VERR/VERW */
+ case 4:
+ case 5:
+ {
+ USHORT Selector;
+ FAST486_GDT_ENTRY GdtEntry;
+
+ /* Not recognized in real mode or virtual 8086 mode */
+ if (!(State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE)
+ || State->Flags.Vm)
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_UD);
+ }
+
+ /* This is a privileged instruction */
+ if (Fast486GetCurrentPrivLevel(State) != 0)
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_GP);
+ return FALSE;
+ }
+
+ if (!Fast486ReadModrmWordOperands(State,
+ &ModRegRm,
+ NULL,
+ &Selector))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ if (!(Selector & SEGMENT_TABLE_INDICATOR))
+ {
+ /* Make sure the GDT contains the entry */
+ if (GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1))
+ {
+ /* Clear ZF */
+ State->Flags.Zf = FALSE;
+ return TRUE;
+ }
+
+ /* Read the GDT */
+ if (!Fast486ReadLinearMemory(State,
+ State->Gdtr.Address
+ + GET_SEGMENT_INDEX(Selector),
+ &GdtEntry,
+ sizeof(GdtEntry)))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+ }
+ else
+ {
+ /* Make sure the LDT contains the entry */
+ if (GET_SEGMENT_INDEX(Selector) >= (State->Ldtr.Limit + 1))
+ {
+ /* Clear ZF */
+ State->Flags.Zf = FALSE;
+ return TRUE;
+ }
+
+ /* Read the LDT */
+ if (!Fast486ReadLinearMemory(State,
+ State->Ldtr.Base
+ + GET_SEGMENT_INDEX(Selector),
+ &GdtEntry,
+ sizeof(GdtEntry)))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+ }
+
+ /* Set ZF if it is valid and accessible */
+ State->Flags.Zf = GdtEntry.Present // must be present
+ && GdtEntry.SystemType // must be a segment
+ && (((ModRegRm.Register == 4)
+ /* code segments are only readable if the RW bit is set */
+ && (!GdtEntry.Executable || GdtEntry.ReadWrite))
+ || ((ModRegRm.Register == 5)
+ /* code segments are never writable, data segments are writable when RW is set */
+ && (!GdtEntry.Executable && GdtEntry.ReadWrite)))
+ /*
+ * for segments other than conforming code segments,
+ * both RPL and CPL must be less than or equal to DPL
+ */
+ && ((!GdtEntry.Executable || !GdtEntry.DirConf)
+ && ((GET_SEGMENT_RPL(Selector) <= GdtEntry.Dpl)
+ && (Fast486GetCurrentPrivLevel(State) <= GdtEntry.Dpl)))
+ /* for conforming code segments, DPL must be less than or equal to CPL */
+ && ((GdtEntry.Executable && GdtEntry.DirConf)
+ && (GdtEntry.Dpl <= Fast486GetCurrentPrivLevel(State)));
+
+
+ return TRUE;
+ }
+
+ /* Invalid */
+ default:
+ {
+ Fast486Exception(State, FAST486_EXCEPTION_UD);
+ return FALSE;
+ }
+ }
+}
+
FAST486_OPCODE_HANDLER(Fast486OpcodeGroup0F01)
{
UCHAR TableReg[6];
/* LMSW */
case 6:
{
- USHORT MachineStatusWord, Dummy;
+ USHORT MachineStatusWord;
/* This is a privileged instruction */
if (Fast486GetCurrentPrivLevel(State) != 0)
}
/* Read the new Machine Status Word */
- if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &MachineStatusWord))
+ if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &MachineStatusWord))
{
/* Exception occurred */
return FALSE;
if (OperandSize)
{
- ULONG Dummy, Value;
+ ULONG Value;
/* Read the value */
- if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;
}
else
{
- USHORT Dummy, Value;
+ USHORT Value;
/* Read the value */
- if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value))
+ if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value))
{
/* Exception occurred */
return FALSE;