Author: aandrejevic Date: Tue Sep 17 23:12:25 2013 New Revision: 60195
URL: http://svn.reactos.org/svn/reactos?rev=60195&view=rev Log: [SOFT386] Fix the ARPL instruction. Use "inline" instead of FORCEINLINE for static functions.
Modified: branches/ntvdm/lib/soft386/common.c branches/ntvdm/lib/soft386/opcodes.c
Modified: branches/ntvdm/lib/soft386/common.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/common.c?rev=6... ============================================================================== --- branches/ntvdm/lib/soft386/common.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/common.c [iso-8859-1] Tue Sep 17 23:12:25 2013 @@ -20,7 +20,8 @@
/* PRIVATE FUNCTIONS **********************************************************/
-static /* FORCEINLINE */ +static +inline ULONG Soft386GetPageTableEntry(PSOFT386_STATE State, ULONG VirtualAddress)
Modified: branches/ntvdm/lib/soft386/opcodes.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.c?rev=... ============================================================================== --- branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] Tue Sep 17 23:12:25 2013 @@ -3686,16 +3686,31 @@ { USHORT FirstValue, SecondValue; SOFT386_MOD_REG_RM ModRegRm; + BOOLEAN AddressSize = State->SegmentRegs[SOFT386_REG_CS].Size;
if (!(State->ControlRegisters[SOFT386_REG_CR0] & SOFT386_CR0_PE) - || State->PrefixFlags) - { - /* No prefixes allowed, protected mode only */ - Soft386Exception(State, SOFT386_EXCEPTION_UD); - return FALSE; + || State->Flags.Vm + || (State->PrefixFlags & SOFT386_PREFIX_LOCK)) + { + /* Cannot be used in real mode or with a LOCK prefix */ + Soft386Exception(State, SOFT386_EXCEPTION_UD); + return FALSE; + } + + if (State->PrefixFlags & SOFT386_PREFIX_ADSIZE) + { + /* The ADSIZE prefix toggles the size */ + AddressSize = !AddressSize; }
/* Get the operands */ + if (!Soft386ParseModRegRm(State, AddressSize, &ModRegRm)) + { + /* Exception occurred */ + return FALSE; + } + + /* Read the operands */ if (!Soft386ReadModrmWordOperands(State, &ModRegRm, &FirstValue,