mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
[FAST486]
Fix a bug in the ROL and ROR instructions. svn path=/branches/ntvdm/; revision=60972
This commit is contained in:
parent
c7de214d81
commit
acccaf3a90
1 changed files with 3 additions and 2 deletions
|
@ -167,8 +167,7 @@ Fast486RotateOperation(PFAST486_STATE State,
|
||||||
/* Normalize the count */
|
/* Normalize the count */
|
||||||
Count &= 0x1F;
|
Count &= 0x1F;
|
||||||
|
|
||||||
if (Operation <= 1) Count %= Bits;
|
if ((Operation == 2) || (Operation == 3)) Count %= Bits + 1;
|
||||||
else if (Operation <= 3) Count %= Bits + 1;
|
|
||||||
|
|
||||||
/* If the count is zero, do nothing */
|
/* If the count is zero, do nothing */
|
||||||
if (Count == 0) return Value;
|
if (Count == 0) return Value;
|
||||||
|
@ -179,6 +178,7 @@ Fast486RotateOperation(PFAST486_STATE State,
|
||||||
/* ROL */
|
/* ROL */
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
|
Count %= Bits;
|
||||||
Result = (Value << Count) | (Value >> (Bits - Count));
|
Result = (Value << Count) | (Value >> (Bits - Count));
|
||||||
|
|
||||||
/* Update CF and OF */
|
/* Update CF and OF */
|
||||||
|
@ -192,6 +192,7 @@ Fast486RotateOperation(PFAST486_STATE State,
|
||||||
/* ROR */
|
/* ROR */
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
|
Count %= Bits;
|
||||||
Result = (Value >> Count) | (Value << (Bits - Count));
|
Result = (Value >> Count) | (Value << (Bits - Count));
|
||||||
|
|
||||||
/* Update CF and OF */
|
/* Update CF and OF */
|
||||||
|
|
Loading…
Reference in a new issue