[patch][0/5] powerpc: Add support to fully comply with IEEE-754 standard

Zhu Ebony-r57400 ebony.zhu at freescale.com
Thu Feb 1 20:35:05 EST 2007


 

> -----Original Message-----
> From: Kumar Gala [mailto:galak at kernel.crashing.org] 
> Sent: Wednesday, January 31, 2007 10:49 PM
> To: Zhu Ebony-r57400
> Cc: paulus at samba.org; linuxppc-dev at ozlabs.org
> Subject: Re: [patch][0/5] powerpc: Add support to fully 
> comply with IEEE-754 standard
> 
> >> On Jan 29, 2007, at 4:00 AM, Zhu Ebony-r57400 wrote:
> >>
> >>> Hi Kumar,
> >>>
> >>> I think enabling SPEFSCR[FINXE] or SPEFSCR[FRMC]=0b10/0b11
> >> to enable
> >>> FP round interrupt will cause the exception occurring very often, 
> >>> which will dramatically decrease the performance of SPE
> >> instructions.
> >>> Do you think putting an option in menuconfig to let user choose 
> >>> whether to enable FP round simulation is a reasonable idea?
> >>
> >> I don't see any issue with it, but I have to believe if 
> you want full 
> >> IEEE results, you want full IEEE results for everything.
> >>
> >> - k
> >>
> >
> > Agreed, we need to fully comply with IEEE754. So let's talk 
> something 
> > about the handler.
> >
> > The round exceptions can be put into 2 categories:
> >
> > 1. SPEFSCR[FRMC] = 0b10 or 0b11 (rounding toward +Inf and -Inf) We 
> > need to handle this exception to comply with IEEE
> >
> > 2. SPEFSCR[FINXE] = 1
> > If we enable this, round exception will occurs when 
> inaccurate results 
> > are generated. However, I think we don't need to do so. 
> With FINXE=0, 
> > if SPE data exception occurs, we can handle the exception 
> by existing 
> > handler, which is fully IEEE complied, including rounding. 
> If no data 
> > exception occurs, HW can implement "round to nearest" and "round 
> > toward zero" with IEEE complied, and "round toward 
> +Inf/-Inf" can be 
> > handled by the handler of point 1.
> > So all
> > the situations are covered, we do have to enable FINXE.
> >
> > Could you make some comments on this? Thanks!
> 
> While I agree with most of what you're saying there is one 
> issue.  If the user want's an exception reported on inexact 
> results when the  
> rounding mode is set to "round to nearest" or "round towards zero".   
> Of course we know when the user requests this and can 
> enable/disable this exception at that point if we want to.
> 
> On a side node, wondering if you've come across this test suite:
> http://www.jhauser.us/arithmetic/TestFloat.html
> 
> - k

Thank  you for your comments and useful link. It seems quite good for
testing the handler.

B.R.
Ebony






> 



More information about the Linuxppc-dev mailing list