This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PowerPC: Define _STRING_ARCH_unaligned
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>, "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Fri, 21 Mar 2014 22:37:44 +0000
- Subject: Re: PowerPC: Define _STRING_ARCH_unaligned
- Authentication-results: sourceware.org; auth=none
- References: <532B32B2 dot 3020306 at linux dot vnet dot ibm dot com> <20140321202856 dot 83106744AC at topped-with-meat dot com>
On Fri, 21 Mar 2014, Roland McGrath wrote:
> We should not need a new header just for this. In this case, it seems
> appropriate for the generic bits/string.h to provide the common default.
> It looks like the most common value is 1, but I'm not entirely sure. We
I think the common case, in terms of number of architectures, is probably
0. As I understand it, any architecture for which the GCC port defines
STRICT_ALIGNMENT to 1, or SLOW_UNALIGNED_ACCESS to evaluate to 1 for the
modes for which glibc can use unaligned accesses, should define
_STRING_ARCH_unaligned to 0. (In cases where it depends on compiler
options, a more careful examination is needed to work out what variants
are actually relevant for glibc - it's quite possible that for some such
architectures, all processors supported by glibc support unaligned
operations for the relevant types.)
--
Joseph S. Myers
joseph@codesourcery.com