mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
[SOFT386]
Implement opcode group 0x8F. svn path=/branches/ntvdm/; revision=60451
This commit is contained in:
parent
9331ef28b9
commit
87a7896249
1 changed files with 52 additions and 2 deletions
|
@ -175,8 +175,58 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup83)
|
|||
|
||||
SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup8F)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE; // TODO: NOT IMPLEMENTED
|
||||
ULONG Value;
|
||||
SOFT386_MOD_REG_RM ModRegRm;
|
||||
BOOLEAN OperandSize, AddressSize;
|
||||
|
||||
OperandSize = AddressSize = State->SegmentRegs[SOFT386_REG_CS].Size;
|
||||
|
||||
if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE)
|
||||
{
|
||||
/* The OPSIZE prefix toggles the size */
|
||||
OperandSize = !OperandSize;
|
||||
}
|
||||
|
||||
if (State->PrefixFlags & SOFT386_PREFIX_ADSIZE)
|
||||
{
|
||||
/* The ADSIZE prefix toggles the size */
|
||||
AddressSize = !AddressSize;
|
||||
}
|
||||
|
||||
if (!Soft386ParseModRegRm(State, AddressSize, &ModRegRm))
|
||||
{
|
||||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (ModRegRm.Register != 0)
|
||||
{
|
||||
/* Invalid */
|
||||
Soft386Exception(State, SOFT386_EXCEPTION_UD);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Pop a value from the stack */
|
||||
if (!Soft386StackPop(State, &Value))
|
||||
{
|
||||
/* Exception occurred */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (OperandSize)
|
||||
{
|
||||
return Soft386WriteModrmDwordOperands(State,
|
||||
&ModRegRm,
|
||||
FALSE,
|
||||
Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Soft386WriteModrmWordOperands(State,
|
||||
&ModRegRm,
|
||||
FALSE,
|
||||
LOWORD(Value));
|
||||
}
|
||||
}
|
||||
|
||||
SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupC0)
|
||||
|
|
Loading…
Reference in a new issue