diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-30 18:50:59 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-30 22:11:58 +0100 |
| commit | 0fe5d9d657446df695e8c810203da469e49ab553 (patch) | |
| tree | fe8426c4023091f7d593567dd0105189c3510785 /meta/recipes-devtools/qemu/files | |
| parent | 331159d90db7b115fc1422e761a7e73f956a4421 (diff) | |
| download | poky-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/recipes-devtools/qemu/files')
| -rw-r--r-- | meta/recipes-devtools/qemu/files/fxrstorssefix.patch | 31 |
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 @@ | |||
| 1 | When we restore the mxcsr resgister with FXRSTOR, we need to update the various SSE | ||
| 2 | flag files by calling update_sse_status() else we're using the flags from some other | ||
| 3 | process with interesting results. | ||
| 4 | |||
| 5 | The code isn't ordered to make this easy hence the function declaration. | ||
| 6 | |||
| 7 | Upstream-Status: Pending | ||
| 8 | |||
| 9 | RP 2013/9/30 | ||
| 10 | |||
| 11 | Index: 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; | ||
