From: Kumar Gala <galak@kernel.crashing.org>
To: "Zhu Ebony-r57400" <ebony.zhu@freescale.com>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [patch][0/5] powerpc: Add support to fully comply with IEEE-754standard
Date: Fri, 12 Jan 2007 00:49:16 -0600 [thread overview]
Message-ID: <9F0F019E-930B-49B5-920A-EB4977BED803@kernel.crashing.org> (raw)
In-Reply-To: <32F3CC26D4DAC44E8ECD07155727A46E816A18@zch01exm20.fsl.freescale.net>
On Jan 12, 2007, at 12:38 AM, Zhu Ebony-r57400 wrote:
> Hi Paul,
>
> On SPE implemented E500/E500v2 core, the embedded floating-point
> APU implements a floating-point system as defined in ANSI/IEEE
> standard754-1985 but rely on software support in order to conform =20
> fully
> with the standard. Thus, whenever an input operand of a floating-point
> instruction has data values that are +infinity, =A8Cinfinity, denorm, =20=
> or NaN,
> or when the result of an operation produces an overflow or an =20
> underflow,
> an interrupt may be taken and the interrupt handler is responsible =20
> for delivering
> IEEE 754-compliant behavior if desired.
In addition to some other corner cases the HW punts on.
[snip]
> The approach I've taken to solve this issue is:
> 1. Enable SPEFSCR[FINVE|FDBZE|FUNFE|FOVFE] to make sure exceptions
> can take place
> 2. Use exceptions handlers to handle the exceptions.
> 3. Restore registers and exit from exception.
>
> In arch/powerpc/math, there are some files to emulate floating =20
> point instructions
> on non-FPU systems, which may come from glibc. Some macros are =20
> provided to
> emulate plus, minus, multiply, divide, etc. Therefore, I re-used =20
> some of the codes there
> and add some new routines to emulated SPE instruction that may =20
> cause exception,
> including SPFP instructions, DPFP instructions and Vector SPFP =20
> instructions.
>
> Writing some independent codes to handle the exceptions my be an =20
> alternative way,
> but I think re-use the existing interfaces in kernel is the best =20
> approach.
I don't believe there is any other way to solve this problem. On =20
these particular exceptions, the HW doesn't provide any real assist =20
and we have to recompute the result from scratch.
Once, we agree the approach is reasonable I'll make comments on the =20
actual handlers.
- k
> Ebony
>
>
>
>> -----Original Message-----
>> From: Paul Mackerras [mailto:paulus@samba.org]
>> Sent: 2007=C4=EA1=D4=C212=C8=D5 13:30
>> To: Zhu Ebony-r57400
>> Cc: linuxppc-dev@ozlabs.org
>> Subject: Re: [patch][0/5] powerpc: Add support to fully
>> comply with IEEE-754standard
>>
>> Zhu Ebony-r57400 writes:
>>
>>> This series of patch add support to fully comply with IEEE-754
>>> standard for E500/E500v2 core when hardware floating point
>> compiling is used.
>>
>> Your patch descriptions need to explain in detail in what way
>> the current code doesn't comply with the IEEE-754 standard,
>> and what approach you have taken to make it comply. If there
>> are alternative approaches, explain why the approach you have
>> taken is the best.
>>
>> Thanks,
>> Paul.
>>
next prev parent reply other threads:[~2007-01-12 6:50 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-12 5:19 [patch][0/5] powerpc: Add support to fully comply with IEEE-754 standard Zhu Ebony-r57400
2007-01-12 5:29 ` Paul Mackerras
2007-01-12 5:46 ` Kumar Gala
2007-01-12 8:27 ` Zhu Ebony-r57400
2007-01-12 12:06 ` Segher Boessenkool
2007-01-15 8:41 ` Zhu Ebony-r57400
2007-01-12 6:38 ` [patch][0/5] powerpc: Add support to fully comply with IEEE-754standard Zhu Ebony-r57400
2007-01-12 6:49 ` Kumar Gala [this message]
2007-01-12 12:03 ` Segher Boessenkool
2007-01-15 8:16 ` Zhu Ebony-r57400
2007-01-15 16:08 ` Segher Boessenkool
2007-01-12 6:41 ` [patch][0/5] powerpc: Add support to fully comply with IEEE-754 standard Kumar Gala
2007-01-12 8:09 ` Zhu Ebony-r57400
2007-01-12 12:04 ` Segher Boessenkool
2007-01-15 6:45 ` Zhu Ebony-r57400
2007-01-15 15:54 ` Segher Boessenkool
2007-01-12 18:36 ` Kumar Gala
2007-01-15 6:37 ` Zhu Ebony-r57400
2007-01-15 14:37 ` Kumar Gala
2007-01-16 9:54 ` Zhu Ebony-r57400
2007-01-25 8:25 ` Zhu Ebony-r57400
2007-01-25 8:28 ` Kumar Gala
2007-01-25 8:53 ` Zhu Ebony-r57400
2007-01-25 15:10 ` Kumar Gala
2007-01-26 6:16 ` Zhu Ebony-r57400
2007-01-29 10:00 ` Zhu Ebony-r57400
2007-01-29 14:30 ` Kumar Gala
2007-01-31 9:45 ` Zhu Ebony-r57400
2007-01-31 14:48 ` Kumar Gala
2007-02-01 9:35 ` Zhu Ebony-r57400
2007-02-07 5:52 ` Zhu Ebony-r57400
2007-02-07 7:11 ` Kumar Gala
2007-02-07 7:21 ` Zhu Ebony-r57400
2007-02-07 7:57 ` Kumar Gala
2007-02-07 8:04 ` Zhu Ebony-r57400
2007-02-08 3:50 ` [patch][0/5] powerpc V2 : " Zhu Ebony-r57400
2007-02-08 5:18 ` Kumar Gala
2007-02-08 5:40 ` Zhu Ebony-r57400
2007-02-08 7:06 ` Zhu Ebony-r57400
2007-02-08 7:15 ` Kumar Gala
2007-02-08 8:08 ` Zhu Ebony-r57400
2007-02-08 17:18 ` Kumar Gala
2007-02-09 5:15 ` Zhu Ebony-r57400
2007-07-30 14:56 ` Sergei Shtylyov
2007-07-31 3:36 ` Zhu Ebony-r57400
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=9F0F019E-930B-49B5-920A-EB4977BED803@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=ebony.zhu@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).