mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 17:21:23 +00:00
[FAST486]
Don't mix up ADSIZE and OPSIZE. svn path=/branches/ntvdm/; revision=60926
This commit is contained in:
parent
7ec93e81ff
commit
a2f3c339f4
1 changed files with 45 additions and 18 deletions
|
@ -5223,15 +5223,15 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeMovEaxOffset)
|
||||||
|
|
||||||
FAST486_OPCODE_HANDLER(Fast486OpcodeMovOffsetAl)
|
FAST486_OPCODE_HANDLER(Fast486OpcodeMovOffsetAl)
|
||||||
{
|
{
|
||||||
BOOLEAN Size = State->SegmentRegs[FAST486_REG_CS].Size;
|
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||||
ULONG Offset;
|
ULONG Offset;
|
||||||
|
|
||||||
/* Make sure this is the right instruction */
|
/* Make sure this is the right instruction */
|
||||||
ASSERT(Opcode == 0xA2);
|
ASSERT(Opcode == 0xA2);
|
||||||
|
|
||||||
TOGGLE_OPSIZE(Size);
|
TOGGLE_ADSIZE(AddressSize);
|
||||||
|
|
||||||
if (Size)
|
if (AddressSize)
|
||||||
{
|
{
|
||||||
if (!Fast486FetchDword(State, &Offset))
|
if (!Fast486FetchDword(State, &Offset))
|
||||||
{
|
{
|
||||||
|
@ -5263,14 +5263,17 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeMovOffsetAl)
|
||||||
|
|
||||||
FAST486_OPCODE_HANDLER(Fast486OpcodeMovOffsetEax)
|
FAST486_OPCODE_HANDLER(Fast486OpcodeMovOffsetEax)
|
||||||
{
|
{
|
||||||
BOOLEAN Size = State->SegmentRegs[FAST486_REG_CS].Size;
|
BOOLEAN OperandSize, AddressSize;
|
||||||
|
|
||||||
|
OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
|
||||||
|
|
||||||
/* Make sure this is the right instruction */
|
/* Make sure this is the right instruction */
|
||||||
ASSERT(Opcode == 0xA3);
|
ASSERT(Opcode == 0xA3);
|
||||||
|
|
||||||
TOGGLE_OPSIZE(Size);
|
TOGGLE_OPSIZE(OperandSize);
|
||||||
|
TOGGLE_ADSIZE(AddressSize);
|
||||||
|
|
||||||
if (Size)
|
if (AddressSize)
|
||||||
{
|
{
|
||||||
ULONG Offset;
|
ULONG Offset;
|
||||||
|
|
||||||
|
@ -5281,12 +5284,24 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeMovOffsetEax)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write to memory */
|
/* Write to memory */
|
||||||
return Fast486WriteMemory(State,
|
if (OperandSize)
|
||||||
(State->PrefixFlags & FAST486_PREFIX_SEG) ?
|
{
|
||||||
State->SegmentOverride : FAST486_REG_DS,
|
return Fast486WriteMemory(State,
|
||||||
Offset,
|
(State->PrefixFlags & FAST486_PREFIX_SEG) ?
|
||||||
&State->GeneralRegs[FAST486_REG_EAX].Long,
|
State->SegmentOverride : FAST486_REG_DS,
|
||||||
sizeof(ULONG));
|
Offset,
|
||||||
|
&State->GeneralRegs[FAST486_REG_EAX].Long,
|
||||||
|
sizeof(ULONG));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Fast486WriteMemory(State,
|
||||||
|
(State->PrefixFlags & FAST486_PREFIX_SEG) ?
|
||||||
|
State->SegmentOverride : FAST486_REG_DS,
|
||||||
|
Offset,
|
||||||
|
&State->GeneralRegs[FAST486_REG_EAX].LowWord,
|
||||||
|
sizeof(USHORT));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -5299,12 +5314,24 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeMovOffsetEax)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write to memory */
|
/* Write to memory */
|
||||||
return Fast486WriteMemory(State,
|
if (OperandSize)
|
||||||
(State->PrefixFlags & FAST486_PREFIX_SEG) ?
|
{
|
||||||
State->SegmentOverride : FAST486_REG_DS,
|
return Fast486WriteMemory(State,
|
||||||
Offset,
|
(State->PrefixFlags & FAST486_PREFIX_SEG) ?
|
||||||
&State->GeneralRegs[FAST486_REG_EAX].LowWord,
|
State->SegmentOverride : FAST486_REG_DS,
|
||||||
sizeof(USHORT));
|
Offset,
|
||||||
|
&State->GeneralRegs[FAST486_REG_EAX].Long,
|
||||||
|
sizeof(ULONG));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Fast486WriteMemory(State,
|
||||||
|
(State->PrefixFlags & FAST486_PREFIX_SEG) ?
|
||||||
|
State->SegmentOverride : FAST486_REG_DS,
|
||||||
|
Offset,
|
||||||
|
&State->GeneralRegs[FAST486_REG_EAX].LowWord,
|
||||||
|
sizeof(USHORT));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue