This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch][aarch64] Use IFUNCs to enable LSE instructions in libatomic on aarch64
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Steve Ellcey <sellcey at cavium dot com>
- Cc: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Mon, 20 Nov 2017 18:27:00 +0000
- Subject: Re: [Patch][aarch64] Use IFUNCs to enable LSE instructions in libatomic on aarch64
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com;
- Nodisclaimer: True
- References: <59A03627.4060106@arm.com> <1503944731.28672.134.camel@cavium.com> <59A54F1C.3010806@arm.com> <1504200277.3182.22.camel@cavium.com> <59CCDD8A.9020703@arm.com> <1506716977.15649.41.camel@cavium.com> <59D24F48.4060906@arm.com> <1507057058.15649.72.camel@cavium.com> <1508868696.19854.53.camel@cavium.com> <1511199565.16234.4.camel@cavium.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Mon, Nov 20, 2017 at 05:39:25PM +0000, Steve Ellcey wrote:
> Re-ping with a CC to the Aarch64 maintainers.
If I'm completely honest with myself, I don't know enough about this area
to review the patch.
Szabolcs' OK holds a lot of weight with me, but I'd like to understand more
of the top-level overview of what this patch means.
If you have the time, would you mind giving me a quick run-down of what
design decisions went in to this patch, and why they are the right thing
to do? Sorry to offload that, but it will be the most efficient route
to a review.
Otherwise, I'll try and make some time for this once I've made it
through the Stack-smashing and SVE reviews. (Or another maintainer
might beat me to it :-) )
Thanks,
James
> > > > looks good to me, but i cannot approve.
> > > >
> > > > (this will make libatomic depend on ifuncs on aarch64*-linux-gnu.)
> > > If you build GCC with default options, ifunc is enabled on aarch64
> > > and
> > > used by libatomic but if you configure with '--disable-gnu-
> > > indirect-
> > > function' then GCC will not recognize the 'resolver' attribute and
> > > libatomic will build the 'old' way and not use IFUNC's.
> > >
> > > It seems like using '--disable-version-specific-runtime-libs' should
> > > allow GCC to recognize the 'resolver' attribute for IFUNCs but to not
> > > use them when building libatomic but when I tried that I got ifuncs
> > > in
> > > libatomic anyway. I think that is a bug and I will look into it some
> > > more.
> > >
> > > The recent alias checking improvements made to GCC and which caused
> > > some glibc build problems also caused the ifunc check in libatomic to
> > > fail. That problem has been fixed but it involved a change to
> > > libatomic/ibatomic_i.h that conflicted with this patch so I am
> > > including an updated version that will apply cleanly to the top of
> > > tree. Only libatomic_i.h changed.
> > >
> > > Steve Ellcey
> > > sellcey@cavium.com
> > >
> > > 2017-10-03 Steve Ellcey <sellcey@cavium.com>
> > >
> > > * Makefile.am (ARCH_AARCH64_LINUX): Add IFUNC_OPTIONS and
> > > libatomic_la_LIBADD.
> > > * config/linux/aarch64/host-config.h: New file.
> > > * configure.ac (IFUNC_RESOLVER_ARGS): Define.
> > > (ARCH_AARCH64_LINUX): New conditional for IFUNC builds.
> > > * configure.tgt (aarch64): Set ARCH and try_ifunc.
> > > (aarch64*-*-linux*) Update config_path.
> > > (aarch64*-*-linux*) Set IFUNC_RESOLVER_ARGS.
> > > * libatomic_i.h (GEN_SELECTOR): Add IFUNC_RESOLVER_ARGS
> > > argument.
> > > * Makefile.in: Regenerate.
> > > * auto-config.h.in: Regenerate.
> > > * configure: Regenerate.