mirror of
https://github.com/reactos/reactos.git
synced 2024-07-28 07:08:59 +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 */
|
/* Make sure it is present */
|
||||||
if (!TableEntry.Present) return 0;
|
if (!TableEntry.Present) return 0;
|
||||||
|
|
||||||
if (MarkAsDirty) TableEntry.Dirty = TRUE;
|
/* Do we need to change any flags? */
|
||||||
|
if (!TableEntry.Accessed || (MarkAsDirty && !TableEntry.Dirty))
|
||||||
/* Was the table entry accessed before? */
|
|
||||||
if (!TableEntry.Accessed)
|
|
||||||
{
|
{
|
||||||
/* Well, it is now */
|
/* Mark it as accessed and optionally dirty too */
|
||||||
TableEntry.Accessed = TRUE;
|
TableEntry.Accessed = TRUE;
|
||||||
|
if (MarkAsDirty) TableEntry.Dirty = TRUE;
|
||||||
|
|
||||||
/* Write back the table entry */
|
/* Write back the table entry */
|
||||||
State->MemWriteCallback(State,
|
State->MemWriteCallback(State,
|
||||||
|
@ -512,6 +511,7 @@ Fast486LoadSegmentInternal(PFAST486_STATE State,
|
||||||
{
|
{
|
||||||
/* Invalid selector */
|
/* Invalid selector */
|
||||||
Fast486ExceptionWithErrorCode(State, Exception, Selector);
|
Fast486ExceptionWithErrorCode(State, Exception, Selector);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Segment == FAST486_REG_SS)
|
if (Segment == FAST486_REG_SS)
|
||||||
|
@ -569,6 +569,7 @@ Fast486LoadSegmentInternal(PFAST486_STATE State,
|
||||||
{
|
{
|
||||||
/* Must be a segment descriptor */
|
/* Must be a segment descriptor */
|
||||||
Fast486ExceptionWithErrorCode(State, Exception, Selector);
|
Fast486ExceptionWithErrorCode(State, Exception, Selector);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GdtEntry.Present)
|
if (!GdtEntry.Present)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
/* DEFINES ********************************************************************/
|
/* 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); \
|
Fast486Exception(State, FAST486_EXCEPTION_NM); \
|
||||||
return; \
|
return; \
|
||||||
|
|
Loading…
Reference in a new issue