Author: aandrejevic
Date: Sat Nov 8 02:56:54 2014
New Revision: 65312
URL:
http://svn.reactos.org/svn/reactos?rev=65312&view=rev
Log:
[FAST486]
- Fix the FPU_CHECK() macro.
- Make sure pages are marked dirty even if they have been accessed before.
- Always return after calling Fast486Exception.
Modified:
trunk/reactos/lib/fast486/common.inl
trunk/reactos/lib/fast486/fpu.h
Modified: trunk/reactos/lib/fast486/common.inl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/common.inl?rev…
==============================================================================
--- trunk/reactos/lib/fast486/common.inl [iso-8859-1] (original)
+++ trunk/reactos/lib/fast486/common.inl [iso-8859-1] Sat Nov 8 02:56:54 2014
@@ -112,13 +112,12 @@
/* Make sure it is present */
if (!TableEntry.Present) return 0;
- if (MarkAsDirty) TableEntry.Dirty = TRUE;
-
- /* Was the table entry accessed before? */
- if (!TableEntry.Accessed)
- {
- /* Well, it is now */
+ /* Do we need to change any flags? */
+ if (!TableEntry.Accessed || (MarkAsDirty && !TableEntry.Dirty))
+ {
+ /* Mark it as accessed and optionally dirty too */
TableEntry.Accessed = TRUE;
+ if (MarkAsDirty) TableEntry.Dirty = TRUE;
/* Write back the table entry */
State->MemWriteCallback(State,
@@ -512,6 +511,7 @@
{
/* Invalid selector */
Fast486ExceptionWithErrorCode(State, Exception, Selector);
+ return FALSE;
}
if (Segment == FAST486_REG_SS)
@@ -569,6 +569,7 @@
{
/* Must be a segment descriptor */
Fast486ExceptionWithErrorCode(State, Exception, Selector);
+ return FALSE;
}
if (!GdtEntry.Present)
Modified: trunk/reactos/lib/fast486/fpu.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/fpu.h?rev=6531…
==============================================================================
--- trunk/reactos/lib/fast486/fpu.h [iso-8859-1] (original)
+++ trunk/reactos/lib/fast486/fpu.h [iso-8859-1] Sat Nov 8 02:56:54 2014
@@ -28,7 +28,7 @@
/* DEFINES ********************************************************************/
-#define FPU_CHECK() if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_EM)
\
+#define FPU_CHECK() if (State->ControlRegisters[FAST486_REG_CR0] & (FAST486_CR0_EM
| FAST486_CR0_TS)) \
{ \
Fast486Exception(State, FAST486_EXCEPTION_NM); \
return; \