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

Zhu Ebony-r57400 ebony.zhu at freescale.com
Wed Jan 31 20:45:52 EST 2007


 

> -----Original Message-----
> From: Kumar Gala [mailto:galak at kernel.crashing.org] 
> Sent: Monday, January 29, 2007 10:31 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!

B.R.
Ebony



More information about the Linuxppc-dev mailing list