On 11/08/2011 08:40 AM, Peter Maydell wrote:
> On 8 November 2011 14:22, Jason Wessel <jason.wes...@windriver.com> 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.

Reply via email to