summaryrefslogtreecommitdiffstats
path: root/meta
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:11:58 +0100
commit0fe5d9d657446df695e8c810203da469e49ab553 (patch)
treefe8426c4023091f7d593567dd0105189c3510785 /meta
parent331159d90db7b115fc1422e761a7e73f956a4421 (diff)
downloadpoky-0fe5d9d657446df695e8c810203da469e49ab553.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] (From OE-Core rev: 5dc43cdc08e6698afa16ba79f3506a1555bb3710) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/files/fxrstorssefix.patch31
-rw-r--r--meta/recipes-devtools/qemu/qemu_1.5.0.bb1
2 files changed, 32 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 @@
1When we restore the mxcsr resgister with FXRSTOR, we need to update the various SSE
2flag files by calling update_sse_status() else we're using the flags from some other
3process with interesting results.
4
5The code isn't ordered to make this easy hence the function declaration.
6
7Upstream-Status: Pending
8
9RP 2013/9/30
10
11Index: qemu-1.5.0/target-i386/fpu_helper.c
12===================================================================
13--- qemu-1.5.0.orig/target-i386/fpu_helper.c 2013-09-30 18:46:39.283377648 +0000
14+++ qemu-1.5.0/target-i386/fpu_helper.c 2013-09-30 18:46:56.895377232 +0000
15@@ -1149,6 +1149,8 @@
16 }
17 }
18
19+static void update_sse_status(CPUX86State *env);
20+
21 void helper_fxrstor(CPUX86State *env, target_ulong ptr, int data64)
22 {
23 int i, fpus, fptag, nb_xmm_regs;
24@@ -1180,6 +1182,7 @@
25 if (env->cr[4] & CR4_OSFXSR_MASK) {
26 /* XXX: finish it */
27 env->mxcsr = cpu_ldl_data(env, ptr + 0x18);
28+ update_sse_status(env);
29 /* cpu_ldl_data(env, ptr + 0x1c); */
30 if (env->hflags & HF_CS64_MASK) {
31 nb_xmm_regs = 16;
diff --git a/meta/recipes-devtools/qemu/qemu_1.5.0.bb b/meta/recipes-devtools/qemu/qemu_1.5.0.bb
index d6dd743bb0..06c2cdba63 100644
--- a/meta/recipes-devtools/qemu/qemu_1.5.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_1.5.0.bb
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
6SRC_URI += "file://fdt_header.patch \ 6SRC_URI += "file://fdt_header.patch \
7 file://target-i386-Fix-aflag-logic-for-CODE64-and-the-0x67-.patch \ 7 file://target-i386-Fix-aflag-logic-for-CODE64-and-the-0x67-.patch \
8 file://target-ppc_fix_bit_extraction.patch \ 8 file://target-ppc_fix_bit_extraction.patch \
9 file://fxrstorssefix.patch \
9 " 10 "
10 11
11SRC_URI_prepend = "http://wiki.qemu.org/download/qemu-${PV}.tar.bz2" 12SRC_URI_prepend = "http://wiki.qemu.org/download/qemu-${PV}.tar.bz2"