Commit 710c15a2e9078931f496424d8e10241f4930f940

Authored by bellard
1 parent 443f1376

lmsw fix (aka dos4gw bug)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@885 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 2 deletions
target-i386/op.c
... ... @@ -980,8 +980,9 @@ void OPPROTO op_movl_drN_T0(void)
980 980  
981 981 void OPPROTO op_lmsw_T0(void)
982 982 {
983   - /* only 4 lower bits of CR0 are modified */
984   - T0 = (env->cr[0] & ~0xf) | (T0 & 0xf);
  983 + /* only 4 lower bits of CR0 are modified. PE cannot be set to zero
  984 + if already set to one. */
  985 + T0 = (env->cr[0] & ~0xe) | (T0 & 0xf);
985 986 helper_movl_crN_T0(0);
986 987 }
987 988  
... ...