Restore correct CS on abort while processing a CALL to a non-conforming code segment. Fixes OS/2 Warp.
This commit is contained in:
parent
277b4c3988
commit
7be2eb53e2
1 changed files with 5 additions and 0 deletions
|
|
@ -1124,6 +1124,7 @@ void loadcscall(uint16_t seg, uint32_t old_pc)
|
||||||
case 0x1800: case 0x1900: case 0x1A00: case 0x1B00: /*Non-conforming code*/
|
case 0x1800: case 0x1900: case 0x1A00: case 0x1B00: /*Non-conforming code*/
|
||||||
if (DPL < CPL)
|
if (DPL < CPL)
|
||||||
{
|
{
|
||||||
|
uint16_t oldcs = CS;
|
||||||
oaddr = addr;
|
oaddr = addr;
|
||||||
/*Load new stack*/
|
/*Load new stack*/
|
||||||
oldss=SS;
|
oldss=SS;
|
||||||
|
|
@ -1239,6 +1240,7 @@ void loadcscall(uint16_t seg, uint32_t old_pc)
|
||||||
pclog("ABRT PUSHL\n");
|
pclog("ABRT PUSHL\n");
|
||||||
SS = oldss;
|
SS = oldss;
|
||||||
ESP = oldsp2;
|
ESP = oldsp2;
|
||||||
|
CS = oldcs;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if (output) pclog("Stack now %04X:%08X\n",SS,ESP);
|
// if (output) pclog("Stack now %04X:%08X\n",SS,ESP);
|
||||||
|
|
@ -1253,6 +1255,7 @@ void loadcscall(uint16_t seg, uint32_t old_pc)
|
||||||
pclog("ABRT COPYL\n");
|
pclog("ABRT COPYL\n");
|
||||||
SS = oldss;
|
SS = oldss;
|
||||||
ESP = oldsp2;
|
ESP = oldsp2;
|
||||||
|
CS = oldcs;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1270,6 +1273,7 @@ void loadcscall(uint16_t seg, uint32_t old_pc)
|
||||||
pclog("ABRT PUSHW\n");
|
pclog("ABRT PUSHW\n");
|
||||||
SS = oldss;
|
SS = oldss;
|
||||||
ESP = oldsp2;
|
ESP = oldsp2;
|
||||||
|
CS = oldcs;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (output) pclog("Write SP to %04X:%04X\n",SS,SP);
|
if (output) pclog("Write SP to %04X:%04X\n",SS,SP);
|
||||||
|
|
@ -1288,6 +1292,7 @@ void loadcscall(uint16_t seg, uint32_t old_pc)
|
||||||
pclog("ABRT COPYW\n");
|
pclog("ABRT COPYW\n");
|
||||||
SS = oldss;
|
SS = oldss;
|
||||||
ESP = oldsp2;
|
ESP = oldsp2;
|
||||||
|
CS = oldcs;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue