diff mbox

Recognize recent x86 CPUs in string.h

Message ID trinity-4ad356c8-14c4-49ab-a9ca-e2be7415cafb-1414070886786@msvc009
State Committed
Headers show

Commit Message

jb999@gmx.de Oct. 23, 2014, 1:28 p.m. UTC
"Winfried Magerl" <winfried.magerl@t-online.de>:
> I miss the recent AMD-CPUs. Extracted from gcc/config/i386/i386-c.c (gcc-4.9.x):
>
>        __bdver1__
>         __bdver2__
>         __bdver3__
>         __bdver4__
>         __btver1__
>         __btver2__
>
> And according to i386-c.c __nehalem__ is already recognized
> as __corei7__:

Here is v2 of the patch:

	* sysdeps/x86/bits/string.h: Add recent CPUs.

Comments

Ondrej Bilka Nov. 27, 2014, 4:28 p.m. UTC | #1
On Thu, Oct 23, 2014 at 03:28:06PM +0200, jb999@gmx.de wrote:
> "Winfried Magerl" <winfried.magerl@t-online.de>:
> > I miss the recent AMD-CPUs. Extracted from gcc/config/i386/i386-c.c (gcc-4.9.x):
> >
> >        __bdver1__
> >         __bdver2__
> >         __bdver3__
> >         __bdver4__
> >         __btver1__
> >         __btver2__
> >
> > And according to i386-c.c __nehalem__ is already recognized
> > as __corei7__:
> 
> Here is v2 of the patch:
> 
> 	* sysdeps/x86/bits/string.h: Add recent CPUs.
> 
>
Looks ok, so I commited this. I cannot find your first name so I used J.
Brown.
diff mbox

Patch

diff -Nur a/sysdeps/x86/bits/string.h b/sysdeps/x86/bits/string.h
--- a/sysdeps/x86/bits/string.h	2014-09-07 10:09:09.000000000 +0200
+++ b/sysdeps/x86/bits/string.h	2014-10-23 15:15:46.836298799 +0200
@@ -29,9 +29,14 @@ 
 			    || defined __pentiumpro__ || defined __pentium4__ \
 			    || defined __nocona__ || defined __atom__ 	      \
 			    || defined __core2__ || defined __corei7__	      \
+			    || defined __sandybridge__ || defined __haswell__ \
+			    || defined __bonnell__ || defined __silvermont__  \
 			    || defined __k6__ || defined __geode__	      \
 			    || defined __k8__ || defined __athlon__	      \
-			    || defined __amdfam10__)
+			    || defined __amdfam10__ || defined __bdver1__     \
+			    || defined __bdver2__ || defined __bdver3__	      \
+			    || defined __bdver4__ || defined __btver1__	      \
+			    || defined __btver2__)
 
 /* We only provide optimizations if the user selects them and if
    GNU CC is used.  */