public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: James Greenhalgh <james.greenhalgh@arm.com>
To: Steve Ellcey <sellcey@cavium.com>
Cc: Szabolcs Nagy <Szabolcs.Nagy@arm.com>,
	gcc-patches	<gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [Patch][aarch64]  Use IFUNCs to enable LSE instructions in libatomic on aarch64
Date: Thu, 07 Dec 2017 09:56:00 -0000	[thread overview]
Message-ID: <20171207095645.GB35729@arm.com> (raw)
In-Reply-To: <1506716977.15649.41.camel@cavium.com>

On Fri, Sep 29, 2017 at 09:29:37PM +0100, Steve Ellcey wrote:
> On Thu, 2017-09-28 at 12:31 +0100, Szabolcs Nagy wrote:
> > 
> > i think this should be improved, see below.
> 
> diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
> index d731406..92d19c6 100644
> --- a/libatomic/Makefile.am
> +++ b/libatomic/Makefile.am
> @@ -122,6 +122,10 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS)))
>  
>  ## On a target-specific basis, include alternates to be selected by IFUNC.
>  if HAVE_IFUNC
> +if ARCH_AARCH64_LINUX
> +IFUNC_OPTIONS	     = -march=armv8.1-a
> +libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS)))
> +endif
>  if ARCH_ARM_LINUX
>  IFUNC_OPTIONS	     = -march=armv7-a -DHAVE_KERNEL64
>  libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS)))

One obvious thing I missed in the review is that this change will break
bootstrap on systems with older assemblers. Practically, that's those of
us who are holding out on Ubuntu 14.04. -march=armv8-a+lse would go back
a little further, so would be preferable, but even this won't get bootstrap
back on older systems.

Is there anything you can do to check for assembler support before turning
on IFUNCS for libatomic, or am I best to just start configuring with
--disable-gnu-indirect-function ?

Thanks,
James

  parent reply	other threads:[~2017-12-07  9:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 20:44 Steve Ellcey
2017-08-07 20:46 ` Steve Ellcey
2017-08-25  4:56   ` Steve Ellcey
2017-08-25 16:43 ` Szabolcs Nagy
2017-08-28 18:40   ` Steve Ellcey
2017-08-29 11:42     ` Szabolcs Nagy
2017-08-30 18:39       ` Steve Ellcey
2017-08-31 18:55       ` Steve Ellcey
2017-09-27 20:35         ` Steve Ellcey
2017-09-28 11:31         ` Szabolcs Nagy
2017-09-29 20:29           ` Steve Ellcey
2017-10-02 14:38             ` Szabolcs Nagy
2017-10-03 18:57               ` Steve Ellcey
2017-10-24 18:17                 ` Steve Ellcey
2017-11-20 18:27                   ` Steve Ellcey
2017-11-20 18:29                     ` James Greenhalgh
2017-11-20 19:50                       ` Steve Ellcey
2017-11-21 17:36                         ` James Greenhalgh
2017-11-29  8:09                           ` Steve Ellcey
2017-12-05  0:51                             ` Steve Ellcey
2017-12-07  9:56             ` James Greenhalgh [this message]
2017-12-07 15:58               ` Steve Ellcey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171207095645.GB35729@arm.com \
    --to=james.greenhalgh@arm.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nd@arm.com \
    --cc=sellcey@cavium.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).