mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 04:37:15 +00:00
[FAST486]
In rotate operations, the count is always masked with 0x1F, regardless of the operand size. svn path=/branches/ntvdm/; revision=60966
This commit is contained in:
parent
ac9f8a81e3
commit
2da0e38fbc
2 changed files with 8 additions and 14 deletions
|
@ -637,8 +637,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normalize the count */
|
/* Normalize the count */
|
||||||
if (OperandSize) Count &= 0x1F;
|
Count &= 0x1F;
|
||||||
else Count &= 0x0F;
|
|
||||||
|
|
||||||
/* Do nothing if the count is zero */
|
/* Do nothing if the count is zero */
|
||||||
if (Count == 0) return TRUE;
|
if (Count == 0) return TRUE;
|
||||||
|
@ -840,8 +839,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normalize the count */
|
/* Normalize the count */
|
||||||
if (OperandSize) Count &= 0x1F;
|
Count &= 0x1F;
|
||||||
else Count &= 0x0F;
|
|
||||||
|
|
||||||
/* Do nothing if the count is zero */
|
/* Do nothing if the count is zero */
|
||||||
if (Count == 0) return TRUE;
|
if (Count == 0) return TRUE;
|
||||||
|
|
|
@ -163,16 +163,11 @@ Fast486RotateOperation(PFAST486_STATE State,
|
||||||
ULONG HighestBit = 1 << (Bits - 1);
|
ULONG HighestBit = 1 << (Bits - 1);
|
||||||
ULONG Result;
|
ULONG Result;
|
||||||
|
|
||||||
if ((Operation != 2) && (Operation != 3))
|
/* Normalize the count */
|
||||||
{
|
Count &= 0x1F;
|
||||||
/* Mask the count */
|
|
||||||
Count &= Bits - 1;
|
/* If the count is zero, do nothing */
|
||||||
}
|
if (Count == 0) goto SetFlags;
|
||||||
else
|
|
||||||
{
|
|
||||||
/* For RCL and RCR, the CF is included in the value */
|
|
||||||
Count %= Bits + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check which operation is this */
|
/* Check which operation is this */
|
||||||
switch (Operation)
|
switch (Operation)
|
||||||
|
@ -275,6 +270,7 @@ Fast486RotateOperation(PFAST486_STATE State,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetFlags:
|
||||||
if (Operation >= 4)
|
if (Operation >= 4)
|
||||||
{
|
{
|
||||||
/* Update ZF, SF and PF */
|
/* Update ZF, SF and PF */
|
||||||
|
|
Loading…
Reference in a new issue