This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Also check __corei7__ in i386/x86_64 bits/byteswap.h
- From: Richard Henderson <rth at twiddle dot net>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "H.J. Lu" <hongjiu dot lu at intel dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 17 Mar 2012 10:21:20 -0700
- Subject: Re: PATCH: Also check __corei7__ in i386/x86_64 bits/byteswap.h
- References: <20120317171147.GA2015@intel.com>
On 03/17/2012 10:11 AM, H.J. Lu wrote:
> GCC 4.7.0 defines __corei7__ for -march=corei7. This patch adds
> __corei7__ check in i386/x86_64 bits/byteswap.h. OK to install?
Isn't this (and the last couple added) recent enough that we can just
defer to the gcc builtin? I.e.
#if __GCC_PREREQ(4,2)
# define __bswap_16(x) __builtin_bswap32((unsigned)(x) << 16)
# define __bswap_32(x) __builtin_bswap32(x)
#else
... rest
#endif
r~