qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Laurent Desnogues <laurent.desnogues@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-i386: Fix regression with maxsd SSE2 instruction
Date: Tue, 8 Nov 2011 08:45:20 -0600	[thread overview]
Message-ID: <4EB94080.7080806@windriver.com> (raw)
In-Reply-To: <CAFEAcA_cCHv32qLJRJLH6A_0JwCk6Poceo-MvSmJZFvy9Ar8=Q@mail.gmail.com>

On 11/08/2011 08:40 AM, Peter Maydell wrote:
> On 8 November 2011 14:22, Jason Wessel <jason.wessel@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	other threads:[~2011-11-08 14:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 13:00 [Qemu-devel] [PATCH] target-i386: Fix regression with maxsd SSE2 instruction Jason Wessel
2011-11-08 13:48 ` Laurent Desnogues
2011-11-08 14:22   ` Jason Wessel
2011-11-08 14:40     ` Peter Maydell
2011-11-08 14:45       ` Jason Wessel [this message]
2011-11-08 15:19         ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EB94080.7080806@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=laurent.desnogues@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).