This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH (SPU): Add enhanced Double Precision (eDP) support on SPU
- From: trevor_smigiel at playstation dot sony dot com
- To: Sa Liu <SALIU at de dot ibm dot com>
- Cc: Steven Bosscher <stevenb dot gcc at gmail dot com>, gcc-patches at gcc dot gnu dot org, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>
- Date: Wed, 18 Apr 2007 20:09:01 -0700
- Subject: Re: PATCH (SPU): Add enhanced Double Precision (eDP) support on SPU
Sa,
First a few style issues in spu.md, not mandated by GCC, but I prefer to
keep the spu.md file consistent. (There are some inconsistencies that
snuck in with the vectorizer patches, I plan to clean that up some day.)
- Move the DF compare operations to the corresponding ceq and cgt
sections. The spu.md file groups everything by operation.
- Put the dftsv patterns after the clgt section (before the branches
section).
- Use UNSPEC_DFTSV instead of UNSPEC_SPU_DFTSV.
- Use "dftsv" instead of "spu_dftsv". Same for the _celledp one.
- Use "ceq_v2df" instead of "spu_dfceq". Same for cgt and cmgt.
- Don't put quotes around the code of a define expand, and make
sure that code follows GNU coding style.
- Does GNU coding style allow declarations mixed with code? If not,
that needs to be cleaned up. As long as there are no compiler
warnings it's fine by me.
One correctness issue. In the IBM CELL SDK, the implementation of
(define_expand "ceq_df") used gen_spu_rotlqby(), which appears to have
been changed to gen_rotlv4si3(). Those two instructions are not the
same. This is done in multiple places. Please add a test case to the
patch and fix that if necessary.
Can you rewrite the celledp handling in spu_emit_branch_or_set. Instead
of special casing in there, move all special casing into a
(define_expand "ceq_df") and (define_expand "cgt_df"). This patch
includes an implementation of ceq_v2df and cgt_v2df, can you make scalar
versions of those to use in those expands? Preferably using mode macros
to avoid duplication, but that's not a big deal. Test cases would be
nice.
Except for the last suggestion and the test cases, I've done most of
these changes in the IBM CELL SDK sources. You might want to grab that
to compare with.
Trevor
* Sa Liu <SALIU@de.ibm.com> [2007-04-13 10:05]:
>
> Steven Bosscher <stevenb.gcc@gmail.com> wrote on 13.04.2007 17:53:27:
>
> > On Friday 13 April 2007 17:09, Sa Liu wrote:
> > > This patch enables the enhanced double precision support on target
> SPU.
> >
> > (...)
> >
> > The rest of the patch is not really readable because the patch is
> > wrapping. So please resubmit it as a plain text attachment.
> >
> > Gr.
> > Steven
>
>
>
> Attached is the patch again, with changes you pointed out. Thanks!
>
> Sa