This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 05/18] Open-code the memcpy() at static TLS initialization time.
- From: Nix <nix at esperi dot org dot uk>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 10 Mar 2016 10:20:31 +0000
- Subject: Re: [PATCH 05/18] Open-code the memcpy() at static TLS initialization time.
- Authentication-results: sourceware.org; auth=none
- References: <1457445064-7107-1-git-send-email-nix at esperi dot org dot uk> <1457445064-7107-6-git-send-email-nix at esperi dot org dot uk> <20160309224330 dot GE6588 at vapier dot lan> <87y49rkuye dot fsf at esperi dot org dot uk> <20160310022853 dot GH6588 at vapier dot lan> <56E0E3A9 dot 8010702 at linaro dot org>
On 10 Mar 2016, Adhemerval Zanella stated:
> On 10-03-2016 09:28, Mike Frysinger wrote:
>> otherwise, you'd want to use "#ifdef".
>> -mike
>
> Is _HAVE_STRING_ARCH_memcpy really doing a better job than gcc? I would prefer
> to just use the open memcpy and let it optimize it.
In most cases I'd agree with you but the thing about
_HAVE_STRING_ARCH_memcpy is that GCC can decide *not* to optimize it:
though we have suppressed generation of libcalls in this function, not
even a call to __builtin_memcpy() is guaranteed to generate inline asm
with no function calls, as far as I know.
(We could start messing about with
__attribute__((__optimize__("-mmemcpy-strategy=STRATEGY"))), but this is
really starting to get a bit over the top, I think... particularly given
that the only platform that works on is *also* the only platform we have
ARCH_memcpy for, so the only platform we don't need that sort of thing
on.)
--
NULL && (void)