aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-12 22:34:47 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-12 22:34:47 +0000
commit1bde465e0699bcef41775ace67e0931cabac6bbd (patch)
tree43c605583ad6f68f38a4c81dfa61fc4069f6d9a4 /linux-user/main.c
parenta4682cc20a68c59939552492590559e94b00a984 (diff)
sse fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1217 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index f2b83b0c27..6b5ed2af67 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1052,8 +1052,12 @@ int main(int argc, char **argv)
cpu_x86_set_cpl(env, 3);
env->cr[0] = CR0_PG_MASK | CR0_WP_MASK | CR0_PE_MASK;
- env->hflags |= HF_PE_MASK | HF_OSFXSR_MASK;
-
+ env->hflags |= HF_PE_MASK;
+ if (env->cpuid_features & CPUID_SSE) {
+ env->cr[4] |= CR4_OSFXSR_MASK;
+ env->hflags |= HF_OSFXSR_MASK;
+ }
+
/* flags setup : we activate the IRQs by default as in user mode */
env->eflags |= IF_MASK;