提交 3acace13 编写于 作者: B bellard

removed unnecessary VME support - fixed selector GPF exception


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@140 c046a42c-6fe2-441c-8c8c-71466251a162
上级 0221cfcd
...@@ -654,8 +654,8 @@ void OPPROTO op_sti(void) ...@@ -654,8 +654,8 @@ void OPPROTO op_sti(void)
env->eflags |= IF_MASK; env->eflags |= IF_MASK;
} }
#if 0
/* vm86plus instructions */ /* vm86plus instructions */
void OPPROTO op_cli_vm(void) void OPPROTO op_cli_vm(void)
{ {
env->eflags &= ~VIF_MASK; env->eflags &= ~VIF_MASK;
...@@ -670,6 +670,7 @@ void OPPROTO op_sti_vm(void) ...@@ -670,6 +670,7 @@ void OPPROTO op_sti_vm(void)
} }
FORCE_RET(); FORCE_RET();
} }
#endif
void OPPROTO op_boundw(void) void OPPROTO op_boundw(void)
{ {
...@@ -939,7 +940,7 @@ void helper_cpuid(void) ...@@ -939,7 +940,7 @@ void helper_cpuid(void)
EAX = 0x52b; EAX = 0x52b;
EBX = 0; EBX = 0;
ECX = 0; ECX = 0;
EDX = CPUID_FP87 | CPUID_VME | CPUID_DE | CPUID_PSE | EDX = CPUID_FP87 | CPUID_DE | CPUID_PSE |
CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_TSC | CPUID_MSR | CPUID_MCE |
CPUID_CX8; CPUID_CX8;
} }
...@@ -1091,7 +1092,6 @@ void load_seg(int seg_reg, int selector) ...@@ -1091,7 +1092,6 @@ void load_seg(int seg_reg, int selector)
uint32_t e1, e2; uint32_t e1, e2;
uint8_t *ptr; uint8_t *ptr;
env->segs[seg_reg] = selector;
sc = &env->seg_cache[seg_reg]; sc = &env->seg_cache[seg_reg];
if (env->eflags & VM_MASK) { if (env->eflags & VM_MASK) {
sc->base = (void *)(selector << 4); 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)
selector, (unsigned long)sc->base, sc->limit, sc->seg_32bit); selector, (unsigned long)sc->base, sc->limit, sc->seg_32bit);
#endif #endif
} }
env->segs[seg_reg] = selector;
} }
void OPPROTO op_movl_seg_T0(void) 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)
env->eflags = (env->eflags & ~FL_UPDATE_MASK16) | (eflags & FL_UPDATE_MASK16); env->eflags = (env->eflags & ~FL_UPDATE_MASK16) | (eflags & FL_UPDATE_MASK16);
} }
/* vm86 version */ #if 0
/* vm86plus version */
void OPPROTO op_movw_eflags_T0_vm(void) void OPPROTO op_movw_eflags_T0_vm(void)
{ {
int eflags; 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)
} }
FORCE_RET(); FORCE_RET();
} }
#endif
/* XXX: compute only O flag */ /* XXX: compute only O flag */
void OPPROTO op_movb_eflags_T0(void) 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)
T0 = eflags; T0 = eflags;
} }
/* vm86 version */ /* vm86plus version */
#if 0
void OPPROTO op_movl_T0_eflags_vm(void) void OPPROTO op_movl_T0_eflags_vm(void)
{ {
int eflags; 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)
eflags |= IF_MASK; eflags |= IF_MASK;
T0 = eflags; T0 = eflags;
} }
#endif
void OPPROTO op_cld(void) void OPPROTO op_cld(void)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册