Fixed task switch to V86 mode.
This commit is contained in:
parent
7e8ea2b6d5
commit
9946bf2b73
1 changed files with 57 additions and 56 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue