src/emu/cpu/i386/i386op16.c
| r10354 | r10355 | |
| 2858 | 2858 | { |
| 2859 | 2859 | if( modrm >= 0xc0 ) { |
| 2860 | 2860 | address = LOAD_RM16(modrm); |
| 2861 | | ea = i386_translate(cpustate, CS, address ); |
| 2861 | cpustate->ldtr.segment = address; |
| 2862 | 2862 | CYCLES(cpustate,CYCLES_LLDT_REG); |
| 2863 | 2863 | } else { |
| 2864 | 2864 | ea = GetEA(cpustate,modrm); |
| 2865 | cpustate->ldtr.segment = READ16(cpustate,ea); |
| 2865 | 2866 | CYCLES(cpustate,CYCLES_LLDT_MEM); |
| 2866 | 2867 | } |
| 2867 | | cpustate->ldtr.segment = READ16(cpustate,ea); |
| 2868 | 2868 | memset(&seg, 0, sizeof(seg)); |
| 2869 | 2869 | seg.selector = cpustate->ldtr.segment; |
| 2870 | 2870 | i386_load_protected_mode_segment(cpustate,&seg); |
| 2871 | 2871 | cpustate->ldtr.limit = seg.limit; |
| 2872 | 2872 | cpustate->ldtr.base = seg.base; |
| 2873 | cpustate->ldtr.flags = seg.flags; |
| 2873 | 2874 | } |
| 2874 | 2875 | else |
| 2875 | 2876 | { |
| r10354 | r10355 | |
| 2882 | 2883 | { |
| 2883 | 2884 | if( modrm >= 0xc0 ) { |
| 2884 | 2885 | address = LOAD_RM16(modrm); |
| 2885 | | ea = i386_translate(cpustate, CS, address ); |
| 2886 | cpustate->task.segment = address; |
| 2886 | 2887 | CYCLES(cpustate,CYCLES_LTR_REG); |
| 2887 | 2888 | } else { |
| 2888 | 2889 | ea = GetEA(cpustate,modrm); |
| 2890 | cpustate->task.segment = READ16(cpustate,ea); |
| 2889 | 2891 | CYCLES(cpustate,CYCLES_LTR_MEM); |
| 2890 | 2892 | } |
| 2891 | | cpustate->task.segment = READ16(cpustate,ea); |
| 2893 | memset(&seg, 0, sizeof(seg)); |
| 2894 | seg.selector = cpustate->task.segment; |
| 2895 | i386_load_protected_mode_segment(cpustate,&seg); |
| 2896 | cpustate->task.limit = seg.limit; |
| 2897 | cpustate->task.base = seg.base; |
| 2898 | cpustate->task.flags = seg.flags; |
| 2892 | 2899 | } |
| 2893 | 2900 | else |
| 2894 | 2901 | { |
src/emu/cpu/i386/i386op32.c
| r10354 | r10355 | |
| 2697 | 2697 | { |
| 2698 | 2698 | if( modrm >= 0xc0 ) { |
| 2699 | 2699 | address = LOAD_RM32(modrm); |
| 2700 | | ea = i386_translate(cpustate, CS, address ); |
| 2700 | cpustate->ldtr.segment = address; |
| 2701 | 2701 | CYCLES(cpustate,CYCLES_LLDT_REG); |
| 2702 | 2702 | } else { |
| 2703 | 2703 | ea = GetEA(cpustate,modrm); |
| 2704 | cpustate->ldtr.segment = READ32(cpustate,ea); |
| 2704 | 2705 | CYCLES(cpustate,CYCLES_LLDT_MEM); |
| 2705 | 2706 | } |
| 2706 | | cpustate->ldtr.segment = READ32(cpustate,ea); |
| 2707 | 2707 | memset(&seg, 0, sizeof(seg)); |
| 2708 | 2708 | seg.selector = cpustate->ldtr.segment; |
| 2709 | 2709 | i386_load_protected_mode_segment(cpustate,&seg); |
| 2710 | 2710 | cpustate->ldtr.limit = seg.limit; |
| 2711 | 2711 | cpustate->ldtr.base = seg.base; |
| 2712 | cpustate->ldtr.flags = seg.flags; |
| 2712 | 2713 | } |
| 2713 | 2714 | else |
| 2714 | 2715 | { |
| r10354 | r10355 | |
| 2721 | 2722 | { |
| 2722 | 2723 | if( modrm >= 0xc0 ) { |
| 2723 | 2724 | address = LOAD_RM32(modrm); |
| 2724 | | ea = i386_translate(cpustate, CS, address ); |
| 2725 | cpustate->task.segment = address; |
| 2725 | 2726 | CYCLES(cpustate,CYCLES_LTR_REG); |
| 2726 | 2727 | } else { |
| 2727 | 2728 | ea = GetEA(cpustate,modrm); |
| 2729 | cpustate->task.segment = READ32(cpustate,ea); |
| 2728 | 2730 | CYCLES(cpustate,CYCLES_LTR_MEM); |
| 2729 | 2731 | } |
| 2730 | | cpustate->task.segment = READ32(cpustate,ea); |
| 2732 | memset(&seg, 0, sizeof(seg)); |
| 2733 | seg.selector = cpustate->task.segment; |
| 2734 | i386_load_protected_mode_segment(cpustate,&seg); |
| 2735 | cpustate->task.limit = seg.limit; |
| 2736 | cpustate->task.base = seg.base; |
| 2737 | cpustate->task.flags = seg.flags; |
| 2731 | 2738 | } |
| 2732 | 2739 | else |
| 2733 | 2740 | { |