[FAST486]
authorAleksandar Andrejevic <aandrejevic@reactos.org>
Fri, 5 Jun 2015 20:03:55 +0000 (20:03 +0000)
committerAleksandar Andrejevic <aandrejevic@reactos.org>
Fri, 5 Jun 2015 20:03:55 +0000 (20:03 +0000)
opgroups.c: We shouldn't restore SP in the opcode handler as that might
interfere with triple faults. Also, in this case it's also wrong because
the exception procedure already restores the stack pointer.
common.c: Fix a comment, no code changes.

svn path=/trunk/; revision=68027

reactos/lib/fast486/common.c
reactos/lib/fast486/opgroups.c

index a5deaf8..5827339 100644 (file)
@@ -579,7 +579,7 @@ Fast486ExceptionWithErrorCode(PFAST486_STATE State,
     /* Restore the IP to the saved IP */
     State->InstPtr = State->SavedInstPtr;
 
     /* Restore the IP to the saved IP */
     State->InstPtr = State->SavedInstPtr;
 
-    /* Restore  the SP to the saved SP */
+    /* Restore the SP to the saved SP */
     State->GeneralRegs[FAST486_REG_ESP] = State->SavedStackPtr;
 
     /* Get the interrupt vector */
     State->GeneralRegs[FAST486_REG_ESP] = State->SavedStackPtr;
 
     /* Get the interrupt vector */
index e3e6ba7..65dd686 100644 (file)
@@ -494,10 +494,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroup8F)
 
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
 
     if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
     {
-        /* Exception occurred - restore SP */
-        if (OperandSize) State->GeneralRegs[FAST486_REG_ESP].Long -= sizeof(ULONG);
-        else State->GeneralRegs[FAST486_REG_ESP].LowWord -= sizeof(USHORT);
-
+        /* Exception occurred */
         return;
     }
 
         return;
     }