[SOFT386]

Fix the carry flag in the SAR instruction.


svn path=/branches/ntvdm/; revision=60589
This commit is contained in:
Aleksandar Andrejevic 2013-10-09 19:49:41 +00:00
parent 10523b910e
commit e9829f1830

View file

@ -273,7 +273,7 @@ Soft386RotateOperation(PSOFT386_STATE State,
if (Value & HighestBit) Result |= ((1 << Count) - 1) << (Bits - Count);
/* Update CF and OF */
State->Flags.Cf = Value & 1;
State->Flags.Cf = (Value & (1 << (Count - 1))) ? TRUE : FALSE;
if (Count == 1) State->Flags.Of = FALSE;
break;