src/emu/cpu/i386/i386.c
| r11978 | r11979 | |
| 734 | 734 | /* For tasks that aren't nested, clear the busy bit in the task's descriptor */ |
| 735 | 735 | if(nested == 0) |
| 736 | 736 | { |
| 737 | | if(cpustate->sreg[CS].selector & 0x0004) |
| 737 | if(cpustate->task.segment & 0x0004) |
| 738 | 738 | { |
| 739 | | ar_byte = READ8(cpustate,cpustate->ldtr.base + (cpustate->sreg[CS].selector & ~0x0007) + 5); |
| 740 | | WRITE8(cpustate,cpustate->ldtr.base + (cpustate->sreg[CS].selector & ~0x0007) + 5,ar_byte & ~0x02); |
| 739 | ar_byte = READ8(cpustate,cpustate->ldtr.base + (cpustate->task.segment & ~0x0007) + 5); |
| 740 | WRITE8(cpustate,cpustate->ldtr.base + (cpustate->task.segment & ~0x0007) + 5,ar_byte & ~0x02); |
| 741 | 741 | } |
| 742 | 742 | else |
| 743 | 743 | { |
| 744 | | ar_byte = READ8(cpustate,cpustate->gdtr.base + (cpustate->sreg[CS].selector & ~0x0007) + 5); |
| 745 | | WRITE8(cpustate,cpustate->gdtr.base + (cpustate->sreg[CS].selector & ~0x0007) + 5,ar_byte & ~0x02); |
| 744 | ar_byte = READ8(cpustate,cpustate->gdtr.base + (cpustate->task.segment & ~0x0007) + 5); |
| 745 | WRITE8(cpustate,cpustate->gdtr.base + (cpustate->task.segment & ~0x0007) + 5,ar_byte & ~0x02); |
| 746 | 746 | } |
| 747 | 747 | } |
| 748 | 748 | |
| r11978 | r11979 | |
| 841 | 841 | /* For tasks that aren't nested, clear the busy bit in the task's descriptor */ |
| 842 | 842 | if(nested == 0) |
| 843 | 843 | { |
| 844 | | if(cpustate->sreg[CS].selector & 0x0004) |
| 844 | if(cpustate->task.segment & 0x0004) |
| 845 | 845 | { |
| 846 | | ar_byte = READ8(cpustate,cpustate->ldtr.base + (cpustate->sreg[CS].selector & ~0x0007) + 5); |
| 847 | | WRITE8(cpustate,cpustate->ldtr.base + (cpustate->sreg[CS].selector & ~0x0007) + 5,ar_byte & ~0x02); |
| 846 | ar_byte = READ8(cpustate,cpustate->ldtr.base + (cpustate->task.segment & ~0x0007) + 5); |
| 847 | WRITE8(cpustate,cpustate->ldtr.base + (cpustate->task.segment & ~0x0007) + 5,ar_byte & ~0x02); |
| 848 | 848 | } |
| 849 | 849 | else |
| 850 | 850 | { |
| 851 | | ar_byte = READ8(cpustate,cpustate->gdtr.base + (cpustate->sreg[CS].selector & ~0x0007) + 5); |
| 852 | | WRITE8(cpustate,cpustate->gdtr.base + (cpustate->sreg[CS].selector & ~0x0007) + 5,ar_byte & ~0x02); |
| 851 | ar_byte = READ8(cpustate,cpustate->gdtr.base + (cpustate->task.segment & ~0x0007) + 5); |
| 852 | WRITE8(cpustate,cpustate->gdtr.base + (cpustate->task.segment & ~0x0007) + 5,ar_byte & ~0x02); |
| 853 | 853 | } |
| 854 | 854 | } |
| 855 | 855 | |
| r11978 | r11979 | |
| 1211 | 1211 | return; |
| 1212 | 1212 | break; |
| 1213 | 1213 | default: // invalid segment type |
| 1214 | | logerror("JMP: Invalid segment type (%i) to jump to.",desc.flags & 0x000f); |
| 1214 | logerror("JMP: Invalid segment type (%i) to jump to.\n",desc.flags & 0x000f); |
| 1215 | 1215 | FAULT(FAULT_GP,segment & 0xfffc) |
| 1216 | 1216 | } |
| 1217 | 1217 | } |