[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-i386: Fix regression with maxsd SSE2 ins
From: |
Jason Wessel |
Subject: |
Re: [Qemu-devel] [PATCH] target-i386: Fix regression with maxsd SSE2 instruction |
Date: |
Tue, 8 Nov 2011 08:45:20 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
On 11/08/2011 08:40 AM, Peter Maydell wrote:
> On 8 November 2011 14:22, Jason Wessel <address@hidden> wrote:
>> +#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)
> This will give the wrong answers for special cases involving +0, -0
> and NaNs. Check the intel architecture manual which says how these
> should work.
>
> (You can't use float*_min() and float*_max() either, as those have
> sane semantics and you need to implement the Intel ones here.)
Anyone out there know how to fix this the right way?
I do not have a point of reference as to how to properly implement this, I just
stumbled on the fact it was completely broken since the switch from hardfloat
to softfloat between qemu 0.14 and 0.15. It certainly appears there is more to
this problem than meets the eye. :-)
Jason.