Restore correct ESP value on fault during IRET - fixes issues in at least Windows NT 3.51, NT 4.0, OS/2 2.0, OS/2 Warp. Thanks to SA1988.

Hack to mirror IDE register writes to both drives, fixes IDE issues on NT.
Fixed occasional PCem crash when accessing a faulting page, fixes crash in OS/2 2.0.
This commit is contained in:
TomW 2014-04-09 19:55:14 +01:00
commit 1493306d5e
3 changed files with 50 additions and 21 deletions

View file

@ -86,6 +86,8 @@ static inline uint8_t fastreadb(uint32_t a)
if ((a >> 12) == pccache)
return *((uint8_t *)&pccache2[a]);
pccache2 = getpccache(a);
if (abrt)
return;
pccache = a >> 12;
return *((uint8_t *)&pccache2[a]);
}
@ -101,6 +103,8 @@ static inline uint16_t fastreadw(uint32_t a)
}
if ((a>>12)==pccache) return *((uint16_t *)&pccache2[a]);
pccache2=getpccache(a);
if (abrt)
return;
pccache=a>>12;
return *((uint16_t *)&pccache2[a]);
}