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: RFA: Add Epiphany port


On 11/03/2011 12:04 PM, Joern Rennecke wrote:
> I could conceivably implement __builtin_epiphany_fmadd in a header file
> using fma, reordering the operands, but that would only make the port
> messier.  The semantics of fma are not documented in extend.texi.

Well, we managed to get the docs into rtl.texi and md.texi.
The builtin has the exact same semantics as the C99 function.

> What's more, __builtin_epiphany_fmsub is a different operation than fmssf4 -
> it subtracts the product from the scalar, while fmssf4 subtracts the scalar
> from the product.

See fnma for the named pattern.

> Besides, there is no builtin for fmssf4 anyway.

We look for all of the variants with extra negations.  Try 

  __builtin_fma (-a, b, c)
or
  __builtin_fma (a, -b, c)

either should generate fnma.

There are different examples of these sorts of combinations in the i386
and powerpc backends, since Intel and IBM picked a different set of 
variations.


r~


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