diff mbox

Recognize recent x86 CPUs in string.h

Message ID trinity-6a0dfee1-77c0-40c8-8216-32c99658b9a4-1414010880707@msvc012
State Superseded
Headers show

Commit Message

jb999@gmx.de Oct. 22, 2014, 8:48 p.m. UTC
If gcc is compiled --with-arch, recent CPUs won't be recognized.

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

Comments

Winfried Magerl Oct. 23, 2014, 7:47 a.m. UTC | #1
Hi,

On Wed, Oct 22, 2014 at 10:48:00PM +0200, jb999@gmx.de wrote:
> If gcc is compiled --with-arch, recent CPUs won't be recognized.
> 
> 	* sysdeps/x86/bits/string.h: Add recent CPUs.
> 
> diff -Nur a/sysdeps/x86/bits/string.h b/sysdeps/x86/bits/string.h
> --- a/sysdeps/x86/bits/string.h	2014-10-22 22:31:44.000000000 +0200
> +++ b/sysdeps/x86/bits/string.h	2014-10-22 22:39:54.000000000 +0200
> @@ -29,6 +29,10 @@
>  			    || defined __pentiumpro__ || defined __pentium4__ \
>  			    || defined __nocona__ || defined __atom__ 	      \
>  			    || defined __core2__ || defined __corei7__	      \
> +			    || defined __nehalem__ || defined __westmere__    \
> +			    || defined __sandybridge__ || defined __ivybridge__ \
> +			    || defined __haswell__ || defined __broadwell__   \
> +			    || defined __bonnell__ || defined __silvermont__  \
>  			    || defined __k6__ || defined __geode__	      \
>  			    || defined __k8__ || defined __athlon__	      \
>  			    || defined __amdfam10__)

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__:

    case PROCESSOR_NEHALEM:
      def_or_undef (parse_in, "__corei7");
      def_or_undef (parse_in, "__corei7__");
      def_or_undef (parse_in, "__nehalem");
      def_or_undef (parse_in, "__nehalem__");
      break;

regards

	winfried
diff mbox

Patch

diff -Nur a/sysdeps/x86/bits/string.h b/sysdeps/x86/bits/string.h
--- a/sysdeps/x86/bits/string.h	2014-10-22 22:31:44.000000000 +0200
+++ b/sysdeps/x86/bits/string.h	2014-10-22 22:39:54.000000000 +0200
@@ -29,6 +29,10 @@ 
 			    || defined __pentiumpro__ || defined __pentium4__ \
 			    || defined __nocona__ || defined __atom__ 	      \
 			    || defined __core2__ || defined __corei7__	      \
+			    || defined __nehalem__ || defined __westmere__    \
+			    || defined __sandybridge__ || defined __ivybridge__ \
+			    || defined __haswell__ || defined __broadwell__   \
+			    || defined __bonnell__ || defined __silvermont__  \
 			    || defined __k6__ || defined __geode__	      \
 			    || defined __k8__ || defined __athlon__	      \
 			    || defined __amdfam10__)