trunk/src/emu/cpu/i386/i386op16.inc
r241532 | r241533 | |
3133 | 3133 | memset(&seg, 0, sizeof(seg)); |
3134 | 3134 | seg.selector = m_task.segment; |
3135 | 3135 | i386_load_protected_mode_segment(&seg,NULL); |
| 3136 | |
| 3137 | UINT32 addr = ((seg.selector & 4) ? m_ldtr.base : m_gdtr.base) + (seg.selector & ~7) + 5; |
| 3138 | i386_translate_address(TRANSLATE_READ, &addr, NULL); |
| 3139 | m_program->write_byte(addr, (seg.flags & 0xff) | 2); |
| 3140 | |
3136 | 3141 | m_task.limit = seg.limit; |
3137 | 3142 | m_task.base = seg.base; |
3138 | | m_task.flags = seg.flags; |
| 3143 | m_task.flags = seg.flags | 2; |
3139 | 3144 | } |
3140 | 3145 | else |
3141 | 3146 | { |
trunk/src/emu/cpu/i386/i386op32.inc
r241532 | r241533 | |
2939 | 2939 | memset(&seg, 0, sizeof(seg)); |
2940 | 2940 | seg.selector = m_task.segment; |
2941 | 2941 | i386_load_protected_mode_segment(&seg,NULL); |
| 2942 | |
| 2943 | UINT32 addr = ((seg.selector & 4) ? m_ldtr.base : m_gdtr.base) + (seg.selector & ~7) + 5; |
| 2944 | i386_translate_address(TRANSLATE_READ, &addr, NULL); |
| 2945 | m_program->write_byte(addr, (seg.flags & 0xff) | 2); |
| 2946 | |
2942 | 2947 | m_task.limit = seg.limit; |
2943 | 2948 | m_task.base = seg.base; |
2944 | | m_task.flags = seg.flags; |
| 2949 | m_task.flags = seg.flags | 2; |
2945 | 2950 | } |
2946 | 2951 | else |
2947 | 2952 | { |