Author: aandrejevic Date: Wed Nov 20 08:01:10 2013 New Revision: 61055
URL: http://svn.reactos.org/svn/reactos?rev=61055&view=rev Log: [FAST486] Make the parameters to Fast486ReadModrm*Operands optional, so that unnecessary extra reads aren't performed. This also eliminates the need for dummy variables.
Modified: branches/ntvdm/lib/fast486/common.inl branches/ntvdm/lib/fast486/extraops.c branches/ntvdm/lib/fast486/opcodes.c branches/ntvdm/lib/fast486/opgroups.c
Modified: branches/ntvdm/lib/fast486/common.inl URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.inl?rev... ============================================================================== --- branches/ntvdm/lib/fast486/common.inl [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/common.inl [iso-8859-1] Wed Nov 20 08:01:10 2013 @@ -935,51 +935,57 @@ { FAST486_SEG_REGS Segment = FAST486_REG_DS;
- /* Get the register value */ - if (ModRegRm->Register & 0x04) - { - /* AH, CH, DH, BH */ - *RegValue = State->GeneralRegs[ModRegRm->Register & 0x03].HighByte; - } - else - { - /* AL, CL, DL, BL */ - *RegValue = State->GeneralRegs[ModRegRm->Register & 0x03].LowByte; - } - - if (!ModRegRm->Memory) - { - /* Get the second register value */ - if (ModRegRm->SecondRegister & 0x04) + if (RegValue) + { + /* Get the register value */ + if (ModRegRm->Register & 0x04) { /* AH, CH, DH, BH */ - *RmValue = State->GeneralRegs[ModRegRm->SecondRegister & 0x03].HighByte; + *RegValue = State->GeneralRegs[ModRegRm->Register & 0x03].HighByte; } else { /* AL, CL, DL, BL */ - *RmValue = State->GeneralRegs[ModRegRm->SecondRegister & 0x03].LowByte; - } - } - else - { - /* Check for the segment override */ - if (State->PrefixFlags & FAST486_PREFIX_SEG) - { - /* Use the override segment instead */ - Segment = State->SegmentOverride; - } - - /* Read memory */ - if (!Fast486ReadMemory(State, - Segment, - ModRegRm->MemoryAddress, - FALSE, - RmValue, - sizeof(UCHAR))) - { - /* Exception occurred */ - return FALSE; + *RegValue = State->GeneralRegs[ModRegRm->Register & 0x03].LowByte; + } + } + + if (RmValue) + { + if (!ModRegRm->Memory) + { + /* Get the second register value */ + if (ModRegRm->SecondRegister & 0x04) + { + /* AH, CH, DH, BH */ + *RmValue = State->GeneralRegs[ModRegRm->SecondRegister & 0x03].HighByte; + } + else + { + /* AL, CL, DL, BL */ + *RmValue = State->GeneralRegs[ModRegRm->SecondRegister & 0x03].LowByte; + } + } + else + { + /* Check for the segment override */ + if (State->PrefixFlags & FAST486_PREFIX_SEG) + { + /* Use the override segment instead */ + Segment = State->SegmentOverride; + } + + /* Read memory */ + if (!Fast486ReadMemory(State, + Segment, + ModRegRm->MemoryAddress, + FALSE, + RmValue, + sizeof(UCHAR))) + { + /* Exception occurred */ + return FALSE; + } } }
@@ -995,33 +1001,39 @@ { FAST486_SEG_REGS Segment = FAST486_REG_DS;
- /* Get the register value */ - *RegValue = State->GeneralRegs[ModRegRm->Register].LowWord; - - if (!ModRegRm->Memory) - { - /* Get the second register value */ - *RmValue = State->GeneralRegs[ModRegRm->SecondRegister].LowWord; - } - else - { - /* Check for the segment override */ - if (State->PrefixFlags & FAST486_PREFIX_SEG) - { - /* Use the override segment instead */ - Segment = State->SegmentOverride; - } - - /* Read memory */ - if (!Fast486ReadMemory(State, - Segment, - ModRegRm->MemoryAddress, - FALSE, - RmValue, - sizeof(USHORT))) - { - /* Exception occurred */ - return FALSE; + if (RegValue) + { + /* Get the register value */ + *RegValue = State->GeneralRegs[ModRegRm->Register].LowWord; + } + + if (RmValue) + { + if (!ModRegRm->Memory) + { + /* Get the second register value */ + *RmValue = State->GeneralRegs[ModRegRm->SecondRegister].LowWord; + } + else + { + /* Check for the segment override */ + if (State->PrefixFlags & FAST486_PREFIX_SEG) + { + /* Use the override segment instead */ + Segment = State->SegmentOverride; + } + + /* Read memory */ + if (!Fast486ReadMemory(State, + Segment, + ModRegRm->MemoryAddress, + FALSE, + RmValue, + sizeof(USHORT))) + { + /* Exception occurred */ + return FALSE; + } } }
@@ -1037,33 +1049,39 @@ { FAST486_SEG_REGS Segment = FAST486_REG_DS;
- /* Get the register value */ - *RegValue = State->GeneralRegs[ModRegRm->Register].Long; - - if (!ModRegRm->Memory) - { - /* Get the second register value */ - *RmValue = State->GeneralRegs[ModRegRm->SecondRegister].Long; - } - else - { - /* Check for the segment override */ - if (State->PrefixFlags & FAST486_PREFIX_SEG) - { - /* Use the override segment instead */ - Segment = State->SegmentOverride; - } - - /* Read memory */ - if (!Fast486ReadMemory(State, - Segment, - ModRegRm->MemoryAddress, - FALSE, - RmValue, - sizeof(ULONG))) - { - /* Exception occurred */ - return FALSE; + if (RegValue) + { + /* Get the register value */ + *RegValue = State->GeneralRegs[ModRegRm->Register].Long; + } + + if (RmValue) + { + if (!ModRegRm->Memory) + { + /* Get the second register value */ + *RmValue = State->GeneralRegs[ModRegRm->SecondRegister].Long; + } + else + { + /* Check for the segment override */ + if (State->PrefixFlags & FAST486_PREFIX_SEG) + { + /* Use the override segment instead */ + Segment = State->SegmentOverride; + } + + /* Read memory */ + if (!Fast486ReadMemory(State, + Segment, + ModRegRm->MemoryAddress, + FALSE, + RmValue, + sizeof(ULONG))) + { + /* Exception occurred */ + return FALSE; + } } }
Modified: branches/ntvdm/lib/fast486/extraops.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.c?rev... ============================================================================== --- branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] Wed Nov 20 08:01:10 2013 @@ -570,10 +570,10 @@
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; @@ -584,10 +584,10 @@ } 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; @@ -755,10 +755,10 @@
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; @@ -779,10 +779,10 @@ } 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; @@ -1216,10 +1216,10 @@
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; @@ -1240,10 +1240,10 @@ } 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; @@ -1339,7 +1339,7 @@
FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovzxByte) { - UCHAR Dummy, Value; + UCHAR Value; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; FAST486_MOD_REG_RM ModRegRm;
@@ -1356,7 +1356,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1371,7 +1371,7 @@
FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovzxWord) { - USHORT Dummy, Value; + USHORT Value; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; FAST486_MOD_REG_RM ModRegRm;
@@ -1388,7 +1388,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1441,10 +1441,10 @@
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; @@ -1465,10 +1465,10 @@ } 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; @@ -1495,7 +1495,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsf) { INT i; - ULONG Dummy = 0, Value = 0; + ULONG Value = 0; BOOLEAN OperandSize, AddressSize; FAST486_MOD_REG_RM ModRegRm; ULONG BitNumber; @@ -1522,7 +1522,7 @@ /* Read the value */ if (OperandSize) { - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1532,7 +1532,7 @@ { if (!Fast486ReadModrmWordOperands(State, &ModRegRm, - (PUSHORT)&Dummy, + (PUSHORT)NULL, (PUSHORT)&Value)) { /* Exception occurred */ @@ -1580,7 +1580,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsr) { INT i; - ULONG Dummy = 0, Value = 0; + ULONG Value = 0; BOOLEAN OperandSize, AddressSize; FAST486_MOD_REG_RM ModRegRm; ULONG BitNumber; @@ -1607,7 +1607,7 @@ /* Read the value */ if (OperandSize) { - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1617,7 +1617,7 @@ { if (!Fast486ReadModrmWordOperands(State, &ModRegRm, - (PUSHORT)&Dummy, + (PUSHORT)NULL, (PUSHORT)&Value)) { /* Exception occurred */ @@ -1664,7 +1664,6 @@
FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovsxByte) { - UCHAR Dummy; CHAR Value; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; FAST486_MOD_REG_RM ModRegRm; @@ -1682,7 +1681,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, (PUCHAR)&Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, (PUCHAR)&Value)) { /* Exception occurred */ return FALSE; @@ -1697,7 +1696,6 @@
FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovsxWord) { - USHORT Dummy; SHORT Value; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; FAST486_MOD_REG_RM ModRegRm; @@ -1715,7 +1713,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, (PUSHORT)&Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, (PUSHORT)&Value)) { /* Exception occurred */ return FALSE;
Modified: branches/ntvdm/lib/fast486/opcodes.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opcodes.c?rev=... ============================================================================== --- branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] Wed Nov 20 08:01:10 2013 @@ -3951,9 +3951,9 @@
if (OperandSize) { - ULONG Dummy, Selector; - - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Selector)) + ULONG Selector; + + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Selector)) { /* Exception occurred */ return FALSE; @@ -3963,9 +3963,9 @@ } else { - USHORT Dummy, Selector; - - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Selector)) + USHORT Selector; + + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Selector)) { /* Exception occurred */ return FALSE;
Modified: branches/ntvdm/lib/fast486/opgroups.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opgroups.c?rev... ============================================================================== --- branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] Wed Nov 20 08:01:10 2013 @@ -293,7 +293,7 @@
FAST486_OPCODE_HANDLER(Fast486OpcodeGroup8082) { - UCHAR Immediate, Dummy, Value; + UCHAR Immediate, Value; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
@@ -313,7 +313,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -349,7 +349,7 @@
if (OperandSize) { - ULONG Immediate, Value, Dummy; + ULONG Immediate, Value;
/* Fetch the immediate operand */ if (!Fast486FetchDword(State, &Immediate)) @@ -359,7 +359,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -376,7 +376,7 @@ } else { - USHORT Immediate, Value, Dummy; + USHORT Immediate, Value;
/* Fetch the immediate operand */ if (!Fast486FetchWord(State, &Immediate)) @@ -386,7 +386,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -432,10 +432,10 @@ 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; @@ -453,10 +453,10 @@ 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; @@ -527,7 +527,7 @@
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupC0) { - UCHAR Dummy, Value, Count; + UCHAR Value, Count; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
@@ -547,7 +547,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -593,10 +593,10 @@
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; @@ -614,10 +614,10 @@ } 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; @@ -728,7 +728,7 @@
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupD0) { - UCHAR Dummy, Value; + UCHAR Value; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
@@ -741,7 +741,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -776,10 +776,10 @@
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; @@ -793,10 +793,10 @@ } 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; @@ -812,7 +812,7 @@
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupD2) { - UCHAR Dummy, Value; + UCHAR Value; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
@@ -825,7 +825,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -863,10 +863,10 @@
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; @@ -884,10 +884,10 @@ } 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; @@ -907,7 +907,7 @@
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF6) { - UCHAR Dummy, Value = 0; + UCHAR Value = 0; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
@@ -920,7 +920,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1039,7 +1039,7 @@
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF7) { - ULONG Dummy, Value = 0, SignFlag; + ULONG Value = 0, SignFlag; FAST486_MOD_REG_RM ModRegRm; BOOLEAN OperandSize, AddressSize;
@@ -1062,7 +1062,7 @@ if (OperandSize) { /* 32-bit */ - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1071,7 +1071,7 @@ else { /* 16-bit */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, (PUSHORT)&Dummy, (PUSHORT)&Value)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, (PUSHORT)&Value)) { /* Exception occurred */ return FALSE; @@ -1284,7 +1284,7 @@
FAST486_OPCODE_HANDLER(Fast486OpcodeGroupFE) { - UCHAR Dummy, Value; + UCHAR Value; FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
@@ -1304,7 +1304,7 @@ }
/* Read the operands */ - if (!Fast486ReadModrmByteOperands(State, &ModRegRm, &Dummy, &Value)) + if (!Fast486ReadModrmByteOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1363,9 +1363,9 @@ /* Read the operands */ if (OperandSize) { - ULONG Dummy, Value; - - if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Dummy, &Value)) + ULONG Value; + + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1506,9 +1506,9 @@ } else { - USHORT Dummy, Value; - - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &Value)) + USHORT Value; + + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &Value)) { /* Exception occurred */ return FALSE; @@ -1813,7 +1813,7 @@ /* LMSW */ case 6: { - USHORT MachineStatusWord, Dummy; + USHORT MachineStatusWord;
/* This is a privileged instruction */ if (Fast486GetCurrentPrivLevel(State) != 0) @@ -1823,7 +1823,7 @@ }
/* Read the new Machine Status Word */ - if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Dummy, &MachineStatusWord)) + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, NULL, &MachineStatusWord)) { /* Exception occurred */ return FALSE; @@ -1928,10 +1928,10 @@
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; @@ -1968,10 +1968,10 @@ } 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;