[PATCH] Inline IBM long double __gcc_qsub

Andreas Schwab schwab@linux-m68k.org
Thu Aug 26 07:40:41 GMT 2021


On Aug 25 2021, David Edelsohn via Gcc-patches wrote:

>     rs6000: inline ldouble __gcc_qsub
>
>     While performing some tests of IEEE 128 float for PPC64LE, Michael
>     Meissner noticed that __gcc_qsub is substantially slower than
>     __gcc_qadd.  __gcc_qsub valls __gcc_add with the second operand
>     negated.  Because the functions normally are invoked through
>     libgcc shared object, the extra PLT overhead has a large impact
>     on the overall time of the function.  Instead of trying to be
>     fancy with function decorations to prevent interposition, this
>     patch inlines the definition of __gcc_qadd into __gcc_qsub with
>     the negation propagated through the function.
>
>     libgcc/ChangeLog:
>
>             * config/rs6000/ibm-ldouble.c (__gcc_qsub): Inline negated
> __gcc_qadd.

How about defining a static function that is used by both?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Gcc-patches mailing list