src/emu/cpu/i386/i386op16.c
| r6722 | r6723 | |
| 3105 | 3105 | } |
| 3106 | 3106 | } |
| 3107 | 3107 | |
| 3108 | static void I386OP(lsl_r16_rm16)(i386_state *cpustate) // Opcode 0x0f 0x03 |
| 3109 | { |
| 3110 | UINT8 modrm = FETCH(cpustate); |
| 3111 | UINT32 limit; |
| 3112 | I386_SREG seg; |
| 3113 | |
| 3114 | if(PROTECTED_MODE) |
| 3115 | { |
| 3116 | memset(&seg, 0, sizeof(seg)); |
| 3117 | seg.selector = LOAD_RM16(modrm); |
| 3118 | if(seg.selector == 0) |
| 3119 | { |
| 3120 | SetZF(0); // not a valid segment |
| 3121 | } |
| 3122 | else |
| 3123 | { |
| 3124 | // TODO: check segment type |
| 3125 | i386_load_protected_mode_segment(cpustate,&seg); |
| 3126 | limit = seg.limit; |
| 3127 | STORE_REG16(modrm,limit & 0x0000ffff); |
| 3128 | SetZF(1); |
| 3129 | } |
| 3130 | } |
| 3131 | else |
| 3132 | i386_trap(cpustate,6, 0); |
| 3133 | } |
| 3134 | |
| 3108 | 3135 | static void I386OP(bound_r16_m16_m16)(i386_state *cpustate) // Opcode 0x62 |
| 3109 | 3136 | { |
| 3110 | 3137 | UINT8 modrm; |
src/emu/cpu/i386/i386ops.h
| r6722 | r6723 | |
| 288 | 288 | { 0x01, OP_2BYTE|OP_I386, I386OP(group0F01_16), I386OP(group0F01_32), }, |
| 289 | 289 | { 0x01, OP_2BYTE|OP_I486, I486OP(group0F01_16), I486OP(group0F01_32), }, |
| 290 | 290 | { 0x02, OP_2BYTE|OP_I386, I386OP(unimplemented), I386OP(unimplemented), }, |
| 291 | | { 0x03, OP_2BYTE|OP_I386, I386OP(unimplemented), I386OP(unimplemented), }, |
| 291 | { 0x03, OP_2BYTE|OP_I386, I386OP(lsl_r16_rm16), I386OP(lsl_r32_rm32), }, |
| 292 | 292 | { 0x06, OP_2BYTE|OP_I386, I386OP(clts), I386OP(clts), }, |
| 293 | 293 | { 0x08, OP_2BYTE|OP_I486, I486OP(invd), I486OP(invd), }, |
| 294 | 294 | { 0x09, OP_2BYTE|OP_I486, I486OP(wbinvd), I486OP(wbinvd), }, |
src/emu/cpu/i386/i386ops.c
| r6722 | r6723 | |
| 1030 | 1030 | opcode = FETCH(cpustate); |
| 1031 | 1031 | switch(opcode) { |
| 1032 | 1032 | case 0x26: |
| 1033 | | cpustate->segment_override=1; |
| 1034 | | cpustate->segment_prefix=ES; |
| 1033 | cpustate->segment_override=ES; |
| 1034 | cpustate->segment_prefix=1; |
| 1035 | 1035 | break; |
| 1036 | 1036 | case 0x2e: |
| 1037 | | cpustate->segment_override=1; |
| 1038 | | cpustate->segment_prefix=CS; |
| 1037 | cpustate->segment_override=CS; |
| 1038 | cpustate->segment_prefix=1; |
| 1039 | 1039 | break; |
| 1040 | 1040 | case 0x36: |
| 1041 | | cpustate->segment_override=1; |
| 1042 | | cpustate->segment_prefix=SS; |
| 1041 | cpustate->segment_override=SS; |
| 1042 | cpustate->segment_prefix=1; |
| 1043 | 1043 | break; |
| 1044 | 1044 | case 0x3e: |
| 1045 | | cpustate->segment_override=1; |
| 1046 | | cpustate->segment_prefix=DS; |
| 1045 | cpustate->segment_override=DS; |
| 1046 | cpustate->segment_prefix=1; |
| 1047 | 1047 | break; |
| 1048 | 1048 | case 0x64: |
| 1049 | | cpustate->segment_override=1; |
| 1050 | | cpustate->segment_prefix=FS; |
| 1049 | cpustate->segment_override=FS; |
| 1050 | cpustate->segment_prefix=1; |
| 1051 | 1051 | break; |
| 1052 | 1052 | case 0x65: |
| 1053 | | cpustate->segment_override=1; |
| 1054 | | cpustate->segment_prefix=GS; |
| 1053 | cpustate->segment_override=GS; |
| 1054 | cpustate->segment_prefix=1; |
| 1055 | 1055 | break; |
| 1056 | 1056 | case 0x66: |
| 1057 | 1057 | cpustate->operand_size ^= 1; |
src/emu/cpu/i386/i386op32.c
| r6722 | r6723 | |
| 2923 | 2923 | } |
| 2924 | 2924 | } |
| 2925 | 2925 | |
| 2926 | static void I386OP(lsl_r32_rm32)(i386_state *cpustate) // Opcode 0x0f 0x03 |
| 2927 | { |
| 2928 | UINT8 modrm = FETCH(cpustate); |
| 2929 | UINT32 limit; |
| 2930 | I386_SREG seg; |
| 2931 | |
| 2932 | if(PROTECTED_MODE) |
| 2933 | { |
| 2934 | memset(&seg, 0, sizeof(seg)); |
| 2935 | seg.selector = LOAD_RM32(modrm); |
| 2936 | if(seg.selector == 0) |
| 2937 | { |
| 2938 | SetZF(0); // not a valid segment |
| 2939 | } |
| 2940 | else |
| 2941 | { |
| 2942 | // TODO: check segment type |
| 2943 | i386_load_protected_mode_segment(cpustate,&seg); |
| 2944 | limit = seg.limit; |
| 2945 | STORE_REG32(modrm,limit); |
| 2946 | SetZF(1); |
| 2947 | } |
| 2948 | } |
| 2949 | else |
| 2950 | i386_trap(cpustate,6, 0); |
| 2951 | } |
| 2952 | |
| 2926 | 2953 | static void I386OP(bound_r32_m32_m32)(i386_state *cpustate) // Opcode 0x62 |
| 2927 | 2954 | { |
| 2928 | 2955 | UINT8 modrm; |