linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: Liu Yu <B13201@freescale.com>
Cc: linuxppc-dev@ozlabs.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] Fix rounding bug in emulation for double floatoperating
Date: Mon, 10 Dec 2007 09:00:31 -0600	[thread overview]
Message-ID: <AD0028E8-E305-443F-8872-C935D4E18F80@kernel.crashing.org> (raw)
In-Reply-To: <6EBEC19BF4A8F843BCD6B9155BBE2515C79D0D@zch01exm26.fsl.freescale.net>


On Dec 9, 2007, at 11:25 PM, Liu Yu wrote:

>
>
>
>
>
>> -----Original Message-----
>> From: David Gibson [mailto:david@gibson.dropbear.id.au]
>> Sent: Monday, December 10, 2007 12:56 PM
>> To: Liu Yu
>> Cc: linuxppc-dev@ozlabs.org
>> Subject: Re: [PATCH] Fix rounding bug in emulation for double
>> floatoperating
>>
>>
>> On Mon, Dec 10, 2007 at 01:00:52PM +0800, Liu Yu wrote:
>>>
>>> This patch fixes rounding bug in emulation for double float
>> operating on PowerPC platform.
>>>
>>> When pack double float operand, it need to truncate the
>> tail due to the limited precision.
>>> If the truncated part is not zero, the last bit of work bit
>> (totally 3 bits) need to '|' 1.
>>>
>>> This patch is completed in _FP_FRAC_SRS_2(X,N,sz)
>> (arch/powerpc/math-emu/op-2.h).
>>> Originally the code leftwards rotates the operand to just keep the
>>> truncated part, then check whether it is zero. However, the
>> number it
>>> rotates is not correct when N is not smaller than
>> _FP_W_TYPE_SIZE, and it will cause the work bit '|' 1 in the
>> improper case.
>>>
>>> This patch fixes this issue.
>>>
>>> Signed-off-by: Liu Yu <b13201@freescale.com>
>>
>> Wow someone deciphered the hideous macro hell of the math
>> emulation code enough to fix a bug.  I don't suppose you'd
>> care to fix the millions of warnings that the math-emu code
>> generates...?
>
> Oh, I don't like macro define either. But it's really a bug...


how did you find this?

- k

  reply	other threads:[~2007-12-10 15:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-10  5:00 [PATCH] Fix rounding bug in emulation for double float operating Liu Yu
2007-12-10  4:56 ` David Gibson
2007-12-10  5:25   ` [PATCH] Fix rounding bug in emulation for double floatoperating Liu Yu
2007-12-10 15:00     ` Kumar Gala [this message]
2007-12-11  1:38       ` Liu Yu
2007-12-11  3:19       ` Zang Roy-r61911
2007-12-11 15:26         ` Kumar Gala
2007-12-12  8:30           ` Zang Roy-r61911
2007-12-12 13:36             ` Kumar Gala
2007-12-14  5:46             ` Kumar Gala
2007-12-14  6:06               ` Zang Roy-r61911
2007-12-14  6:14                 ` Kumar Gala
2007-12-14  5:01 ` [PATCH] Fix rounding bug in emulation for double float operating Kumar Gala

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=AD0028E8-E305-443F-8872-C935D4E18F80@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=B13201@freescale.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.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).