[SOFT386]

Fix the ARPL instruction.
Use "inline" instead of FORCEINLINE for static functions.


svn path=/branches/ntvdm/; revision=60195
This commit is contained in:
Aleksandar Andrejevic 2013-09-17 23:12:25 +00:00
parent 9e913c05f5
commit f9dd2776ab
2 changed files with 19 additions and 3 deletions

View file

@ -20,7 +20,8 @@
/* PRIVATE FUNCTIONS **********************************************************/
static /* FORCEINLINE */
static
inline
ULONG
Soft386GetPageTableEntry(PSOFT386_STATE State,
ULONG VirtualAddress)

View file

@ -3686,16 +3686,31 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeArpl)
{
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)
|| State->Flags.Vm
|| (State->PrefixFlags & SOFT386_PREFIX_LOCK))
{
/* No prefixes allowed, protected mode only */
/* 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,