Fixed task switch to V86 mode.
This commit is contained in:
parent
7e8ea2b6d5
commit
9946bf2b73
1 changed files with 57 additions and 56 deletions
11
src/x86seg.c
11
src/x86seg.c
|
|
@ -2558,13 +2558,13 @@ void taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
|
|||
// if (output) pclog("Limit %04X Base %08X\n",ldt.limit,ldt.base);
|
||||
|
||||
|
||||
if (eflags&VM_FLAG)
|
||||
if (eflags & VM_FLAG)
|
||||
{
|
||||
pclog("Task switch V86!\n");
|
||||
x86gpf(NULL,0);
|
||||
return;
|
||||
loadcs(new_cs);
|
||||
set_use32(0);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (!(new_cs&~3))
|
||||
{
|
||||
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);
|
||||
if (CPL==3 && oldcpl!=3) flushmmucache_cr3();
|
||||
set_use32(segdat2[3] & 0x40);
|
||||
}
|
||||
|
||||
EAX=new_eax;
|
||||
ECX=new_ecx;
|
||||
|
|
|
|||
Loading…
Reference in a new issue