summary refs log tree commit diff stats
path: root/results/scraper/launchpad/889053
blob: 2af56d4c8f5d198eecd764e0144b8206cd1a1bc9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
x86: FPU_MAX, FPU_MIN incorrect

Dear All,

Bug was found in qemu.git.
Now (0.15, 1.0) all fpu is softfpu.
See target-i386/ops_sse.h:
#define FPU_MIN(size, a, b) (a) < (b) ? (a) : (b)
#define FPU_MAX(size, a, b) (a) > (b) ? (a) : (b)
It is incorrect now, becouse float64 (or 32) is (typedef) uint64_t (or 32).
And if we have signed operands we get error...

There is a test with this error (spec shinx3 test data, results diffs on machine and qemu (linux)) and fixed patch. See attach.

Daniil.





misprint:
spec sphinx3 test data

482.sphinx3: http://www.spec.org/cpu2006/CFP2006/

The attached patch is incorrect (using the softfloat _min/_max functions will give wrong answers for some special cases). The correct macros are
#define FPU_MIN(size, a, b) float ## size ## _lt(a, b, &env->sse_status) ? (a) : (b)
#define FPU_MAX(size, a, b) float ## size ## _lt(b, a, &env->sse_status) ? (a) : (b)

(see recent discussion on the qemu-devel list).


Hello!
Can I commit this patch (in development branch), and close this bug...
Or you must do it?

Your patch is broken, as I said before.


Yes, but you patch is correct...

May be commit you patch

I say about
#define FPU_MIN(size, a, b) float ## size ## _lt(a, b, &env->sse_status) ? (a) : (b)
#define FPU_MAX(size, a, b) float ## size ## _lt(b, a, &env->sse_status) ? (b) : (a)

The patch mentioned in comment #5 has been included here:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=a4d1f142542935b90d2e