Fixed ESP value in CALL far when page fault occurs between selector and PC push. Fixes MS Plus!.

This commit is contained in:
TomW 2013-06-25 21:46:25 +01:00
commit 1980a2b107

View file

@ -13,13 +13,15 @@
oldss = ss; \ oldss = ss; \
if (cgate32) \ if (cgate32) \
{ \ { \
uint32_t old_esp = ESP; \
PUSH_L(old_cs); if (abrt) { cgate16 = cgate32 = 0; return 0; } \ PUSH_L(old_cs); if (abrt) { cgate16 = cgate32 = 0; return 0; } \
PUSH_L(old_pc); \ PUSH_L(old_pc); if (abrt) ESP = old_esp; \
} \ } \
else \ else \
{ \ { \
uint32_t old_esp = ESP; \
PUSH_W(old_cs); if (abrt) { cgate16 = cgate32 = 0; return 0; } \ PUSH_W(old_cs); if (abrt) { cgate16 = cgate32 = 0; return 0; } \
PUSH_W(old_pc); \ PUSH_W(old_pc); if (abrt) ESP = old_esp; \
} }
#define CALL_FAR_l(new_seg, new_pc) \ #define CALL_FAR_l(new_seg, new_pc) \
@ -37,13 +39,15 @@
oldss = ss; \ oldss = ss; \
if (cgate16) \ if (cgate16) \
{ \ { \
uint32_t old_esp = ESP; \
PUSH_W(old_cs); if (abrt) { cgate16 = cgate32 = 0; return 0; } \ PUSH_W(old_cs); if (abrt) { cgate16 = cgate32 = 0; return 0; } \
PUSH_W(old_pc); \ PUSH_W(old_pc); if (abrt) ESP = old_esp; \
} \ } \
else \ else \
{ \ { \
uint32_t old_esp = ESP; \
PUSH_L(old_cs); if (abrt) { cgate16 = cgate32 = 0; return 0; } \ PUSH_L(old_cs); if (abrt) { cgate16 = cgate32 = 0; return 0; } \
PUSH_L(old_pc); \ PUSH_L(old_pc); if (abrt) ESP = old_esp; \
} }
@ -62,13 +66,15 @@
oldss = ss; \ oldss = ss; \
if (cgate32) \ if (cgate32) \
{ \ { \
uint32_t old_esp = ESP; \
PUSH_L(old_cs); if (abrt) { cgate16 = cgate32 = 0; break; } \ PUSH_L(old_cs); if (abrt) { cgate16 = cgate32 = 0; break; } \
PUSH_L(old_pc); \ PUSH_L(old_pc); if (abrt) ESP = old_esp; \
} \ } \
else \ else \
{ \ { \
uint32_t old_esp = ESP; \
PUSH_W(old_cs); if (abrt) { cgate16 = cgate32 = 0; break; } \ PUSH_W(old_cs); if (abrt) { cgate16 = cgate32 = 0; break; } \
PUSH_W(old_pc); \ PUSH_W(old_pc); if (abrt) ESP = old_esp; \
} \ } \
static int opCALL_far_w(uint32_t fetchdat) static int opCALL_far_w(uint32_t fetchdat)