lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181127024638.GA6633@andestech.com>
Date:   Tue, 27 Nov 2018 10:46:38 +0800
From:   Vincent Chen <vincentc@...estech.com>
To:     David Laight <David.Laight@...LAB.COM>
CC:     "green.hu@...il.com" <green.hu@...il.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Nick Chun-Ming Hu(?????????)" <nickhu@...estech.com>,
        "deanbo422@...il.com" <deanbo422@...il.com>
Subject: Re: [PATCH v4 2/5] nds32: Support FP emulation

On Mon, Nov 26, 2018 at 06:18:01PM +0800, David Laight wrote:
> 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.
>
  I use two commits to complete the implementation of the FPU emulator in
  this patch set. The handling for (1) case is in another patch, "nds32:
  support denormalized result through FP emulator". Sorry, the above
  description may be misleading.
 
> It ought to be possibly for the exception routine to rescale the values,
> re-issue the same FP instruction, then scale the result.
> 
> 	David
> 
  
  I Agree. The scheme is common when dealing with denormalized numbers,
  including the softfp module of the kernel used in this patchset.

> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ