From: Steve Ellcey <sellcey@cavium.com>
To: Szabolcs Nagy <szabolcs.nagy@arm.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Cc: nd@arm.com
Subject: Re: [Patch][aarch64] Use IFUNCs to enable LSE instructions in libatomic on aarch64
Date: Wed, 30 Aug 2017 18:39:00 -0000 [thread overview]
Message-ID: <1504113936.5204.53.camel@cavium.com> (raw)
In-Reply-To: <59A54F1C.3010806@arm.com>
On Tue, 2017-08-29 at 12:25 +0100, Szabolcs Nagy wrote:
>Â
> it's a general bug that most ifunc users (e.g. in binutils
> tests) declare the ifunc resolvers incorrectly, the correct
> prototype is the way the dynamic linker invokes the resolver
> in sysdeps/aarch64/dl-irel.h:
>
> static inline ElfW(Addr)
> __attribute ((always_inline))
> elf_ifunc_invoke (ElfW(Addr) addr)
> {
> Â return ((ElfW(Addr) (*) (unsigned long int)) (addr))
> (GLRO(dl_hwcap));
> }
>
> (that argument should be uint64_t for ilp32, but that's a
> separate issue)
>
> in glibc the hwcap is not used, because it has accesses to
> cached dispatch info, but in libatomic using the hwcap
> argument is the right way.
OK, I changed my patch to use the argument and it did work but
since the type of the argument should be uint64_t instead of 'unsigned
long int' for aarch64 I think I will send a patch to libc-alpha
first to fix this before sending an updated libatomic patch. Â That way
I won't have to update GCC when glibc changes the type. Â I see that
different platforms use different types for the resolver argument so I
think I will have to update the libatomic configure.tgt script as well
to set the resolver arg type when I resbumit the gcc libatomic patch so
that we can have the correct prototype in libatomic_i.h.
Steve Ellcey
sellcey@cavium.com
next prev parent reply other threads:[~2017-08-30 17:25 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 [this message]
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
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=1504113936.5204.53.camel@cavium.com \
--to=sellcey@cavium.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nd@arm.com \
--cc=szabolcs.nagy@arm.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).