All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: Daniel Jacobowitz <drow@false.org>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: MIPS FP rounding
Date: Thu, 20 Sep 2007 18:28:25 +0100	[thread overview]
Message-ID: <20070920172825.GU9972@networkno.de> (raw)
In-Reply-To: <20070919204154.GA13366@caradoc.them.org>

Daniel Jacobowitz wrote:
> Thiemo, in May you added this:
> 
> -    update_fcr31();       \
> +    update_fcr31();                                           \
> +    if (GET_FP_CAUSE(env->fcr31) & FP_INVALID)                \
> +        FST2 = 0x7fbfffff;                                    \
> +    else if (GET_FP_CAUSE(env->fcr31) & FP_UNDERFLOW) {       \
> +        if ((env->fcr31 & 0x3) == 0)                          \
> +            FST2 &= 0x80000000ULL;                            \
> +    }                     \
> 
> That last bit says that if underflow is detected and the rounding mode
> is round-to-nearest, return an signed appropriate signed zero.  Why?
> The MIPS ISA docs say a rounded result is returned in this case, and
> that's what's in FST2 if that code is removed.

It fixed an internal testcase, I'll have to check what was going
on there, probably tomorrow.


Thiemo

  reply	other threads:[~2007-09-20 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-19 20:41 [Qemu-devel] MIPS FP rounding Daniel Jacobowitz
2007-09-20 17:28 ` Thiemo Seufer [this message]
2007-09-24 13:37   ` [Qemu-devel] " Daniel Jacobowitz

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=20070920172825.GU9972@networkno.de \
    --to=ths@networkno.de \
    --cc=drow@false.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.