public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* LTO Optimization with asm renames of intrinsic functions
@ 2020-08-12 22:26 Paul E Murphy
  2020-08-13  3:17 ` Jeff Law
  2020-08-13 23:07 ` Segher Boessenkool
  0 siblings, 2 replies; 4+ messages in thread
From: Paul E Murphy @ 2020-08-12 22:26 UTC (permalink / raw)
  To: gcc-help

I ran into a slight divergence of behavior when enabling LTO using GCC
10.2 or newer when building libdfp on x86 and ppc64.

Libdfp builds a copy of libdecnumber which exports its own copy of ABI
as specified for _Decimal types in the GCC documentation.  Some of this
ABI is implicitly used in libdfp to implement various facilities.

These intrinsic calls generate PLT calls which should resolve to
symbols provided by libdfp.  However, libdfp tries to avoid these
by inserting asm renames of the form:

   asm ("__bid_floatsidd  = __GI___bid_floatsidd");

Where the libdfp copy of such symbols are prefixed with __GI_ using
the trick inherited from glibc.

This creative workaround has worked with lto disabled, but
when enabled, it is effectively ignored.  Is there a more robust way
to bypass plt calls for intrinsic functions when using LTO?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-14  4:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 22:26 LTO Optimization with asm renames of intrinsic functions Paul E Murphy
2020-08-13  3:17 ` Jeff Law
2020-08-13 23:07 ` Segher Boessenkool
2020-08-14  4:24   ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).