This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Support Cell SPU floating point


On 8/29/07, trevor_smigiel@playstation.sony.com
<trevor_smigiel@playstation.sony.com> wrote:
> This patch does three things:
>
> 1) Add Cell SPU extended single precision format to real.c
> 2) Define macros for constant folding of denormalized numbers
> 3) Define macros to prevent certain optimizations on denorms
>
> The latter 2 parts are necessary to get proper constant folding and
> optimization on SPU which does not fully support IEEE floats.  A comment
> in real.c describes the differences:
>
> /*  SPU Single Precision (Extended-Range Mode) format is the same as IEEE
>     single precision with the following differences:
...
>       - the only supported rounding mode is trunction (towards zero)

Uh.  You know you need to enable -frounding-math always then?  Or do SPU users
not care if the compiler optimizes as if the rounding mode would be round to
nearest/even?

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]