aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/files
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-30 18:50:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-30 22:08:31 +0100
commit5dc43cdc08e6698afa16ba79f3506a1555bb3710 (patch)
treec90665df9308bb49b51d2636bca2555fbd0ce69a /meta/recipes-devtools/qemu/files
parentc7de71813c8f47438f44749136877442cf73d536 (diff)
downloadopenembedded-core-contrib-5dc43cdc08e6698afa16ba79f3506a1555bb3710.tar.gz
qemu: Add fix for floating point issues on x86-64
There was a bug in handling of the mxcsr register since cpu flags were not getting updated after fxrstor operations. This small tweak fixes that. [YOCTO #5248] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/files')
-rw-r--r--meta/recipes-devtools/qemu/files/fxrstorssefix.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/files/fxrstorssefix.patch b/meta/recipes-devtools/qemu/files/fxrstorssefix.patch
new file mode 100644
index 0000000000..59ab0f50fa
--- /dev/null
+++ b/meta/recipes-devtools/qemu/files/fxrstorssefix.patch
@@ -0,0 +1,31 @@
+When we restore the mxcsr resgister with FXRSTOR, we need to update the various SSE
+flag files by calling update_sse_status() else we're using the flags from some other
+process with interesting results.
+
+The code isn't ordered to make this easy hence the function declaration.
+
+Upstream-Status: Pending
+
+RP 2013/9/30
+
+Index: qemu-1.5.0/target-i386/fpu_helper.c
+===================================================================
+--- qemu-1.5.0.orig/target-i386/fpu_helper.c 2013-09-30 18:46:39.283377648 +0000
++++ qemu-1.5.0/target-i386/fpu_helper.c 2013-09-30 18:46:56.895377232 +0000
+@@ -1149,6 +1149,8 @@
+ }
+ }
+
++static void update_sse_status(CPUX86State *env);
++
+ void helper_fxrstor(CPUX86State *env, target_ulong ptr, int data64)
+ {
+ int i, fpus, fptag, nb_xmm_regs;
+@@ -1180,6 +1182,7 @@
+ if (env->cr[4] & CR4_OSFXSR_MASK) {
+ /* XXX: finish it */
+ env->mxcsr = cpu_ldl_data(env, ptr + 0x18);
++ update_sse_status(env);
+ /* cpu_ldl_data(env, ptr + 0x1c); */
+ if (env->hflags & HF_CS64_MASK) {
+ nb_xmm_regs = 16;