public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Weeks <greg.weeks@timesys.com>
To: Tom Rini <trini@kernel.crashing.org>
Cc: Dan Malek <dan@embeddededge.com>,
	Kumar Gala <kumar.gala@freescale.com>,
	LKML <linux-kernel@vger.kernel.org>,
	LinuxPPC-dev Development <linuxppc-dev@lists.linuxppc.org>
Subject: Re: [BUG] PPC math-emu multiply problem
Date: Mon, 16 Aug 2004 09:02:13 -0400	[thread overview]
Message-ID: <4120B055.8090503@timesys.com> (raw)
In-Reply-To: <20040809222328.GB22109@smtp.west.cox.net>

Tom Rini wrote:

>On Mon, Aug 09, 2004 at 01:42:08PM -0400, Dan Malek wrote:
>
>  
>
>>On Aug 9, 2004, at 12:56 PM, Tom Rini wrote:
>>
>>    
>>
>>>Has anyone had a problem with this?  If not, I'll go and pass it
>>>along...
>>>      
>>>
>>The default rounding mode should be whatever is defined
>>by IEEE.  I thought the emulator used the proper default value
>>and if want something different it should be selected by
>>the control register.  Maybe the emulator isn't implementing
>>the control register properly.
>>    
>>
>
>Or we had the wrong default?  Greg, any chance you've looked into this
>more?  Thanks.
>
>  
>
I'm back.

The round mode for the emulator is compiled in. Changing the round mode 
caused failures in some of the other LSB float tests.  I had intended to 
say something about this before taking off on vacation. Sorry.

The way I got the LSB tests to pass was to remove the round in the 
denormalised underflow case. This appears to match the hardware 
behavior. I've not looked at the PPC floating point model close enough 
to know if this is proper behavior. It is what the LSB tests are 
expecting and doesn't cause a failure in any of the other LSB tests.

Greg Weeks

Signed-off-by: Greg Weeks <greg.weeks@timesys.com> under TS0087


--- ppc-mpc8560ads-cgl/arch/ppc/math-emu/op-common.h.orig       
2004-08-16 08:56:07.000000000 -0400
+++ ppc-mpc8560ads-cgl/arch/ppc/math-emu/op-common.h    2004-08-04 
10:04:45.000000000 -0400
@@ -82,7 +82,6 @@ do {
        \
        if (X##_e <= _FP_WFRACBITS_##fs)                        \
          {                                                     \
            _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs);    \
-           __ret |= _FP_ROUND(wc, X);                          \
            _FP_FRAC_SLL_##wc(X, 1);                            \
            if (_FP_FRAC_OVERP_##wc(fs, X))                     \
              {                                                 \


  reply	other threads:[~2004-08-16 13:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-29 13:14 [BUG] PPC math-emu multiply problem Greg Weeks
2004-07-29 14:06 ` Kumar Gala
2004-07-29 14:26   ` Greg Weeks
2004-07-29 19:22   ` Dan Malek
2004-07-29 19:47     ` La Monte H.P. Yarroll
2004-07-30 14:45     ` Greg Weeks
2004-07-30 15:23       ` Greg Weeks
2004-08-09 16:56         ` Tom Rini
2004-08-09 17:42           ` Dan Malek
2004-08-09 22:18             ` La Monte H.P. Yarroll
2004-08-09 22:23             ` Tom Rini
2004-08-16 13:02               ` Greg Weeks [this message]
2004-08-16 14:48                 ` Tom Rini
2004-08-16 18:28                   ` Greg Weeks
2004-08-16 18:35                     ` Tom Rini

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=4120B055.8090503@timesys.com \
    --to=greg.weeks@timesys.com \
    --cc=dan@embeddededge.com \
    --cc=kumar.gala@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=trini@kernel.crashing.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