From: David Laight <David.Laight@ACULAB.COM>
To: 'Vincent Chen' <vincentc@andestech.com>
Cc: "green.hu@gmail.com" <green.hu@gmail.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Nick Chun-Ming Hu(?????????)" <nickhu@andestech.com>,
"deanbo422@gmail.com" <deanbo422@gmail.com>
Subject: RE: [PATCH v4 2/5] nds32: Support FP emulation
Date: Mon, 26 Nov 2018 10:18:01 +0000 [thread overview]
Message-ID: <3dcd9764570e4565911b74b08513e2d3@AcuMS.aculab.com> (raw)
In-Reply-To: <20181126012310.GA26621@andestech.com>
From: Vincent Chen
> Sent: 26 November 2018 01:23
> On Fri, Nov 23, 2018 at 06:53:37PM +0800, David Laight wrote:
> > From: Vincent Chen
> > > Sent: 22 November 2018 03:15
> > >
> > > The Andes FPU coprocessor does not support denormalized number handling.
> > > According to the specification, FPU generates a denorm input exception
> > > that requires the kernel to deal with this instrution operation when it
> > > encounters denormalized operands. Hence an nds32 FPU ISA emulator in the
> > > kernel is required to meet requirement.
> >
> > What does the FPU generate for results near zero?
>
> 1. The calculation result is a denormalized number
> Depending on the state of underflow trap, the FPU will raise an underflow
> exception or flash the result to zero.
>
> 2. One of the operands is a denormalized number
> Depending on the state of the flash-to-zero mode, the FPU will raise a
> denormalized input exception, which is a specific exception of the nds FPU,
> or directly treats the operand as 0.
You didn't mention (1) in the commit message.
It ought to be possibly for the exception routine to rescale the values,
re-issue the same FP instruction, then scale the result.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2018-11-26 10:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 3:14 [PATCH v4 0/5] nds32 FPU port Vincent Chen
2018-11-22 3:14 ` [PATCH v4 1/5] nds32: " Vincent Chen
2018-11-22 3:14 ` [PATCH v4 2/5] nds32: Support FP emulation Vincent Chen
2018-11-23 10:53 ` David Laight
2018-11-26 1:23 ` Vincent Chen
2018-11-26 10:18 ` David Laight [this message]
2018-11-27 2:46 ` Vincent Chen
2018-11-22 3:14 ` [PATCH v4 3/5] nds32: support denormalized result through FP emulator Vincent Chen
2018-11-22 3:14 ` [PATCH v4 4/5] math-emu/op-2.h: Use statement expressions to prevent negative constant shift Vincent Chen
2018-11-22 3:14 ` [PATCH v4 5/5] math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning Vincent Chen
2018-11-22 10:21 ` [PATCH v4 0/5] nds32 FPU port Greentime Hu
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=3dcd9764570e4565911b74b08513e2d3@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=arnd@arndb.de \
--cc=deanbo422@gmail.com \
--cc=green.hu@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickhu@andestech.com \
--cc=vincentc@andestech.com \
/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
all inboxes | Powered by JetHome®