rs6000: inline ldouble __gcc_qsub
commit5889e842ae4df48ac471c47d6ed72e05041a1db8
authorDavid Edelsohn <dje.gcc@gmail.com>
Wed, 25 Aug 2021 21:41:50 +0000 (25 17:41 -0400)
committerDavid Edelsohn <dje.gcc@gmail.com>
Thu, 26 Aug 2021 23:13:39 +0000 (26 19:13 -0400)
tree4d8c5d9550326852a893567dd05af10ecb1850b9
parent5a6c626710ad2ac4baa2dba02fac0750177e3305
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 calls __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.  This patch converts
__gcc_qadd to a static inline function invoked by __gcc_qadd
and __gcc_qsub.

libgcc/ChangeLog:

* config/rs6000/ibm-ldouble.c (ldouble_qadd_internal): Rename from
__gcc_qadd.
(__gcc_qadd): Call ldouble_qadd_internal.
(__gcc_qsub): Call ldouble_qadd_internal with second long double
argument negated.
libgcc/config/rs6000/ibm-ldouble.c