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, ia64] Patch for PR target/44583 to fix signed zeros


On 07/30/2010 01:32 PM, Steve Ellcey wrote:
> foo:
>         fadd.s f8 = f8, f0
>         fmerge.s f8 = f8, f1
>         br.ret.sptk.many b0
>         .endp foo#
> 
> The new code (using my patch) is:
> 
> foo:
>         mov f6 = f0
>         fadd.s f8 = f8, f6
>         fmerge.s f8 = f8, f1
>         br.ret.sptk.many b0
>         .endp foo#
> 
> The old code causes an abort, the new code works.  My understanding of
> the problem is that if the hardware sees that the second argument to
> fadd (or fsub) is f0 it doesn't do the add operation and passes the
> first argument straight through.

Oh wow, that's a bizarre and unexpected outcome.  I suppose it has to
do with only *really* having fma in the instruction set and doing 
special things with fp[01] as inputs to get fmpy and fadd.

I must withdraw the objection, except to say that your last sentence
above belongs in a comment somewhere.


r~


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