This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: [PATCH] Inline mempcpy
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Wilco Dijkstra <wdijkstr at arm dot com>
- Cc: 'Ondřej Bílka' <neleai at seznam dot cz>, <libc-alpha at sourceware dot org>
- Date: Mon, 18 May 2015 12:00:08 +0000
- Subject: RE: [PATCH] Inline mempcpy
- Authentication-results: sourceware.org; auth=none
- References: <A610E03AD50BFC4D95529A36D37FA55E769A83F7F7 at GEORGE dot Emea dot Arm dot com> <000201d0915f$87bb15d0$97314170$ at com>
On Mon, 18 May 2015, Wilco Dijkstra wrote:
> #if defined __USE_GNU && !defined TARGET_HAS_OPTIMIZED_MEMPCPY
TARGET_HAS_OPTIMIZED_MEMPCPY is in the user's namespace. Use the existing
_HAVE_STRING_ARCH_mempcpy (or something like that in the implementation
namespace, anyway, defined based on consensus for each architecture).
> #undef mempcpy
> #undef __mempcpy
> #define mempcpy(dest, src, n) __mempcpy_inline(dest, src, n)
> #define __mempcpy(dest, src, n) __mempcpy_inline(dest, src, n)
Bad formatting of function calls.
> __attribute__((__always_inline__)) inline void *
__extern_always_inline (and you need to condition things on defined
__extern_always_inline, and I'm not sure it this will reliably work with
GCC versions predating the always_inline attribute, or if you need
__GNUC_PREREQ (3,2) as well ... maybe the __extern_always_inline
definition should be conditional on that). I'm also doubtful of using
such inlines when not optimizing.
--
Joseph S. Myers
joseph@codesourcery.com