summaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-06-04 11:20:49 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-06-04 11:20:49 +0000
commit710c15a2e9078931f496424d8e10241f4930f940 (patch)
tree1981751690ff78c935cbc02f3bb1c74bc900805c /target-i386
parent443f1376bc5f35159d09b043c0fdca3a1c4e0af1 (diff)
downloadqemu-710c15a2e9078931f496424d8e10241f4930f940.tar.gz
lmsw fix (aka dos4gw bug)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@885 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/op.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target-i386/op.c b/target-i386/op.c
index 3f9afb17d3..8b28007078 100644
--- a/target-i386/op.c
+++ b/target-i386/op.c
@@ -980,8 +980,9 @@ void OPPROTO op_movl_drN_T0(void)
void OPPROTO op_lmsw_T0(void)
{
- /* only 4 lower bits of CR0 are modified */
- T0 = (env->cr[0] & ~0xf) | (T0 & 0xf);
+ /* only 4 lower bits of CR0 are modified. PE cannot be set to zero
+ if already set to one. */
+ T0 = (env->cr[0] & ~0xe) | (T0 & 0xf);
helper_movl_crN_T0(0);
}