diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-0.15.1/a4d1f142542935b90d2eb30f3aead4edcf455fe6.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu-0.15.1/a4d1f142542935b90d2eb30f3aead4edcf455fe6.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.15.1/a4d1f142542935b90d2eb30f3aead4edcf455fe6.patch b/meta/recipes-devtools/qemu/qemu-0.15.1/a4d1f142542935b90d2eb30f3aead4edcf455fe6.patch new file mode 100644 index 0000000000..405d557bdc --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-0.15.1/a4d1f142542935b90d2eb30f3aead4edcf455fe6.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From a4d1f142542935b90d2eb30f3aead4edcf455fe6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Aurelien Jarno <aurelien@aurel32.net> | ||
3 | Date: Sat, 7 Jan 2012 15:20:11 +0100 | ||
4 | Subject: [PATCH 1/1] target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions | ||
5 | |||
6 | minpd, minps, minsd, minss and maxpd, maxps, maxsd, maxss SSE2 | ||
7 | instructions have been broken when switching target-i386 to softfloat. | ||
8 | It's not possible to use comparison instructions on float types anymore | ||
9 | to softfloat, so use the floatXX_lt function instead, as the | ||
10 | float_XX_min and float_XX_max functions can't be used due to the Intel | ||
11 | specific behaviour. | ||
12 | |||
13 | As it implements the correct NaNs behaviour, let's remove the | ||
14 | corresponding entry from the TODO. | ||
15 | |||
16 | It fixes GDM screen display on Debian Lenny. | ||
17 | |||
18 | Thanks to Peter Maydell and Jason Wessel for their analysis of the | ||
19 | problem. | ||
20 | |||
21 | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> | ||
22 | --- | ||
23 | target-i386/TODO | 1 - | ||
24 | target-i386/ops_sse.h | 9 +++++++-- | ||
25 | 2 files changed, 7 insertions(+), 3 deletions(-) | ||
26 | |||
27 | This fixes scrollbar issues in matchbox-terminal/vte on qemux86-64 and | ||
28 | files not appearing in pcmanfm, as well as glib/gobject errors to do with gdoubles | ||
29 | on the console [YOCTO #1906] | ||
30 | |||
31 | Upstream-Status: Backport | ||
32 | |||
33 | Index: qemu-0.15.1/target-i386/TODO | ||
34 | =================================================================== | ||
35 | --- qemu-0.15.1.orig/target-i386/TODO 2011-10-12 16:41:43.000000000 +0000 | ||
36 | +++ qemu-0.15.1/target-i386/TODO 2012-04-19 07:30:38.704073075 +0000 | ||
37 | @@ -15,7 +15,6 @@ | ||
38 | - DRx register support | ||
39 | - CR0.AC emulation | ||
40 | - SSE alignment checks | ||
41 | -- fix SSE min/max with nans | ||
42 | |||
43 | Optimizations/Features: | ||
44 | |||
45 | Index: qemu-0.15.1/target-i386/ops_sse.h | ||
46 | =================================================================== | ||
47 | --- qemu-0.15.1.orig/target-i386/ops_sse.h 2011-10-12 16:41:43.000000000 +0000 | ||
48 | +++ qemu-0.15.1/target-i386/ops_sse.h 2012-04-19 07:30:38.712073076 +0000 | ||
49 | @@ -584,10 +584,15 @@ | ||
50 | #define FPU_SUB(size, a, b) float ## size ## _sub(a, b, &env->sse_status) | ||
51 | #define FPU_MUL(size, a, b) float ## size ## _mul(a, b, &env->sse_status) | ||
52 | #define FPU_DIV(size, a, b) float ## size ## _div(a, b, &env->sse_status) | ||
53 | -#define FPU_MIN(size, a, b) (a) < (b) ? (a) : (b) | ||
54 | -#define FPU_MAX(size, a, b) (a) > (b) ? (a) : (b) | ||
55 | #define FPU_SQRT(size, a, b) float ## size ## _sqrt(b, &env->sse_status) | ||
56 | |||
57 | +/* Note that the choice of comparison op here is important to get the | ||
58 | + * special cases right: for min and max Intel specifies that (-0,0), | ||
59 | + * (NaN, anything) and (anything, NaN) return the second argument. | ||
60 | + */ | ||
61 | +#define FPU_MIN(size, a, b) float ## size ## _lt(a, b, &env->sse_status) ? (a) : (b) | ||
62 | +#define FPU_MAX(size, a, b) float ## size ## _lt(b, a, &env->sse_status) ? (a) : (b) | ||
63 | + | ||
64 | SSE_HELPER_S(add, FPU_ADD) | ||
65 | SSE_HELPER_S(sub, FPU_SUB) | ||
66 | SSE_HELPER_S(mul, FPU_MUL) | ||