mirror of
https://github.com/reactos/reactos.git
synced 2024-10-07 18:04:41 +00:00
[FAST486]
- Fix the FPU_CHECK() macro. - Make sure pages are marked dirty even if they have been accessed before. - Always return after calling Fast486Exception. svn path=/trunk/; revision=65312
This commit is contained in:
parent
ca31e1569d
commit
3117e70e36
|
@ -112,13 +112,12 @@ Fast486GetPageTableEntry(PFAST486_STATE State,
|
|||
/* Make sure it is present */
|
||||
if (!TableEntry.Present) return 0;
|
||||
|
||||
if (MarkAsDirty) TableEntry.Dirty = TRUE;
|
||||
|
||||
/* Was the table entry accessed before? */
|
||||
if (!TableEntry.Accessed)
|
||||
/* Do we need to change any flags? */
|
||||
if (!TableEntry.Accessed || (MarkAsDirty && !TableEntry.Dirty))
|
||||
{
|
||||
/* Well, it is now */
|
||||
/* 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 @@ Fast486LoadSegmentInternal(PFAST486_STATE State,
|
|||
{
|
||||
/* Invalid selector */
|
||||
Fast486ExceptionWithErrorCode(State, Exception, Selector);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (Segment == FAST486_REG_SS)
|
||||
|
@ -569,6 +569,7 @@ Fast486LoadSegmentInternal(PFAST486_STATE State,
|
|||
{
|
||||
/* Must be a segment descriptor */
|
||||
Fast486ExceptionWithErrorCode(State, Exception, Selector);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!GdtEntry.Present)
|
||||
|
|
|
@ -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; \
|
||||
|
|
Loading…
Reference in a new issue