Commit 3acace1333d6b75628fe6e6786ad3cd2db766f0e
1 parent
0221cfcd
removed unnecessary VME support - fixed selector GPF exception
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@140 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
10 additions
and
5 deletions
op-i386.c
@@ -654,8 +654,8 @@ void OPPROTO op_sti(void) | @@ -654,8 +654,8 @@ void OPPROTO op_sti(void) | ||
654 | env->eflags |= IF_MASK; | 654 | env->eflags |= IF_MASK; |
655 | } | 655 | } |
656 | 656 | ||
657 | +#if 0 | ||
657 | /* vm86plus instructions */ | 658 | /* vm86plus instructions */ |
658 | - | ||
659 | void OPPROTO op_cli_vm(void) | 659 | void OPPROTO op_cli_vm(void) |
660 | { | 660 | { |
661 | env->eflags &= ~VIF_MASK; | 661 | env->eflags &= ~VIF_MASK; |
@@ -670,6 +670,7 @@ void OPPROTO op_sti_vm(void) | @@ -670,6 +670,7 @@ void OPPROTO op_sti_vm(void) | ||
670 | } | 670 | } |
671 | FORCE_RET(); | 671 | FORCE_RET(); |
672 | } | 672 | } |
673 | +#endif | ||
673 | 674 | ||
674 | void OPPROTO op_boundw(void) | 675 | void OPPROTO op_boundw(void) |
675 | { | 676 | { |
@@ -939,7 +940,7 @@ void helper_cpuid(void) | @@ -939,7 +940,7 @@ void helper_cpuid(void) | ||
939 | EAX = 0x52b; | 940 | EAX = 0x52b; |
940 | EBX = 0; | 941 | EBX = 0; |
941 | ECX = 0; | 942 | ECX = 0; |
942 | - EDX = CPUID_FP87 | CPUID_VME | CPUID_DE | CPUID_PSE | | 943 | + EDX = CPUID_FP87 | CPUID_DE | CPUID_PSE | |
943 | CPUID_TSC | CPUID_MSR | CPUID_MCE | | 944 | CPUID_TSC | CPUID_MSR | CPUID_MCE | |
944 | CPUID_CX8; | 945 | CPUID_CX8; |
945 | } | 946 | } |
@@ -1091,7 +1092,6 @@ void load_seg(int seg_reg, int selector) | @@ -1091,7 +1092,6 @@ void load_seg(int seg_reg, int selector) | ||
1091 | uint32_t e1, e2; | 1092 | uint32_t e1, e2; |
1092 | uint8_t *ptr; | 1093 | uint8_t *ptr; |
1093 | 1094 | ||
1094 | - env->segs[seg_reg] = selector; | ||
1095 | sc = &env->seg_cache[seg_reg]; | 1095 | sc = &env->seg_cache[seg_reg]; |
1096 | if (env->eflags & VM_MASK) { | 1096 | if (env->eflags & VM_MASK) { |
1097 | sc->base = (void *)(selector << 4); | 1097 | sc->base = (void *)(selector << 4); |
@@ -1118,6 +1118,7 @@ void load_seg(int seg_reg, int selector) | @@ -1118,6 +1118,7 @@ void load_seg(int seg_reg, int selector) | ||
1118 | selector, (unsigned long)sc->base, sc->limit, sc->seg_32bit); | 1118 | selector, (unsigned long)sc->base, sc->limit, sc->seg_32bit); |
1119 | #endif | 1119 | #endif |
1120 | } | 1120 | } |
1121 | + env->segs[seg_reg] = selector; | ||
1121 | } | 1122 | } |
1122 | 1123 | ||
1123 | void OPPROTO op_movl_seg_T0(void) | 1124 | void OPPROTO op_movl_seg_T0(void) |
@@ -1317,7 +1318,8 @@ void OPPROTO op_movw_eflags_T0(void) | @@ -1317,7 +1318,8 @@ void OPPROTO op_movw_eflags_T0(void) | ||
1317 | env->eflags = (env->eflags & ~FL_UPDATE_MASK16) | (eflags & FL_UPDATE_MASK16); | 1318 | env->eflags = (env->eflags & ~FL_UPDATE_MASK16) | (eflags & FL_UPDATE_MASK16); |
1318 | } | 1319 | } |
1319 | 1320 | ||
1320 | -/* vm86 version */ | 1321 | +#if 0 |
1322 | +/* vm86plus version */ | ||
1321 | void OPPROTO op_movw_eflags_T0_vm(void) | 1323 | void OPPROTO op_movw_eflags_T0_vm(void) |
1322 | { | 1324 | { |
1323 | int eflags; | 1325 | int eflags; |
@@ -1355,6 +1357,7 @@ void OPPROTO op_movl_eflags_T0_vm(void) | @@ -1355,6 +1357,7 @@ void OPPROTO op_movl_eflags_T0_vm(void) | ||
1355 | } | 1357 | } |
1356 | FORCE_RET(); | 1358 | FORCE_RET(); |
1357 | } | 1359 | } |
1360 | +#endif | ||
1358 | 1361 | ||
1359 | /* XXX: compute only O flag */ | 1362 | /* XXX: compute only O flag */ |
1360 | void OPPROTO op_movb_eflags_T0(void) | 1363 | void OPPROTO op_movb_eflags_T0(void) |
@@ -1373,7 +1376,8 @@ void OPPROTO op_movl_T0_eflags(void) | @@ -1373,7 +1376,8 @@ void OPPROTO op_movl_T0_eflags(void) | ||
1373 | T0 = eflags; | 1376 | T0 = eflags; |
1374 | } | 1377 | } |
1375 | 1378 | ||
1376 | -/* vm86 version */ | 1379 | +/* vm86plus version */ |
1380 | +#if 0 | ||
1377 | void OPPROTO op_movl_T0_eflags_vm(void) | 1381 | void OPPROTO op_movl_T0_eflags_vm(void) |
1378 | { | 1382 | { |
1379 | int eflags; | 1383 | int eflags; |
@@ -1384,6 +1388,7 @@ void OPPROTO op_movl_T0_eflags_vm(void) | @@ -1384,6 +1388,7 @@ void OPPROTO op_movl_T0_eflags_vm(void) | ||
1384 | eflags |= IF_MASK; | 1388 | eflags |= IF_MASK; |
1385 | T0 = eflags; | 1389 | T0 = eflags; |
1386 | } | 1390 | } |
1391 | +#endif | ||
1387 | 1392 | ||
1388 | void OPPROTO op_cld(void) | 1393 | void OPPROTO op_cld(void) |
1389 | { | 1394 | { |