Author: aandrejevic
Date: Sun May 3 13:14:53 2015
New Revision: 67533
URL:
http://svn.reactos.org/svn/reactos?rev=67533&view=rev
Log:
[FAST486]
Don't overwrite the masked flags in IRET.
Modified:
trunk/reactos/lib/fast486/opcodes.c
Modified: trunk/reactos/lib/fast486/opcodes.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/opcodes.c?rev=…
==============================================================================
--- trunk/reactos/lib/fast486/opcodes.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fast486/opcodes.c [iso-8859-1] Sun May 3 13:14:53 2015
@@ -4739,8 +4739,16 @@
State->Cpl = GET_SEGMENT_RPL(CodeSel);
/* Set the new flags */
- if (Size) State->Flags.Long = NewFlags.Long & PROT_MODE_FLAGS_MASK;
- else State->Flags.LowWord = NewFlags.LowWord & PROT_MODE_FLAGS_MASK;
+ if (Size)
+ {
+ State->Flags.Long = (State->Flags.Long & ~PROT_MODE_FLAGS_MASK)
+ | (NewFlags.Long & PROT_MODE_FLAGS_MASK);
+ }
+ else
+ {
+ State->Flags.LowWord = (State->Flags.LowWord &
~PROT_MODE_FLAGS_MASK)
+ | (NewFlags.LowWord & PROT_MODE_FLAGS_MASK);
+ }
State->Flags.AlwaysSet = TRUE;
/* Set additional flags */