This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Also check __corei7__ in i386/x86_64 bits/byteswap.h
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 17 Mar 2012 10:11:47 -0700
- Subject: PATCH: Also check __corei7__ in i386/x86_64 bits/byteswap.h
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
GCC 4.7.0 defines __corei7__ for -march=corei7. This patch adds
__corei7__ check in i386/x86_64 bits/byteswap.h. OK to install?
Thanks.
H.J.
---
2012-03-17 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/i386/bits/byteswap.h: Also check __corei7__.
* sysdeps/x86_64/bits/byteswap.h: Likewise.
diff --git a/sysdeps/i386/bits/byteswap.h b/sysdeps/i386/bits/byteswap.h
index 4a159d1..38c5592 100644
--- a/sysdeps/i386/bits/byteswap.h
+++ b/sysdeps/i386/bits/byteswap.h
@@ -68,7 +68,7 @@ __bswap_16 (unsigned short int __bsx)
# if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ \
&& !defined __pentium4__ && !defined __k8__ && !defined __athlon__ \
&& !defined __k6__ && !defined __nocona__ && !defined __core2__ \
- && !defined __geode__ && !defined __amdfam10__
+ && !defined __geode__ && !defined __amdfam10__ && !defined __corei7__
# define __bswap_32(x) \
(__extension__ \
({ register unsigned int __v, __x = (x); \
diff --git a/sysdeps/x86_64/bits/byteswap.h b/sysdeps/x86_64/bits/byteswap.h
index 5094a05..0496f3f 100644
--- a/sysdeps/x86_64/bits/byteswap.h
+++ b/sysdeps/x86_64/bits/byteswap.h
@@ -62,7 +62,7 @@
|| defined __k8__ || defined __athlon__ \
|| defined __k6__ || defined __nocona__ \
|| defined __core2__ || defined __geode__ \
- || defined __amdfam10__)
+ || defined __corei7__ || defined __amdfam10__)
/* To swap the bytes in a word the i486 processors and up provide the
`bswap' opcode. On i386 we have to use three instructions. */
# define __bswap_32(x) \