Fixed task switch to V86 mode.

This commit is contained in:
SarahW 2017-07-24 19:36:46 +01:00
commit 9946bf2b73

View file

@ -2560,11 +2560,11 @@ void taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
if (eflags & VM_FLAG) if (eflags & VM_FLAG)
{ {
pclog("Task switch V86!\n"); loadcs(new_cs);
x86gpf(NULL,0); set_use32(0);
return;
} }
else
{
if (!(new_cs&~3)) if (!(new_cs&~3))
{ {
pclog("TS loading null CS\n"); pclog("TS loading null CS\n");
@ -2631,6 +2631,7 @@ void taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
do_seg_load(&_cs, segdat2); do_seg_load(&_cs, segdat2);
if (CPL==3 && oldcpl!=3) flushmmucache_cr3(); if (CPL==3 && oldcpl!=3) flushmmucache_cr3();
set_use32(segdat2[3] & 0x40); set_use32(segdat2[3] & 0x40);
}
EAX=new_eax; EAX=new_eax;
ECX=new_ecx; ECX=new_ecx;