PR driver/54210
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Aug 2012 13:21:41 +0000 (13:21 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Aug 2012 13:21:41 +0000 (13:21 +0000)
* config/i386/driver-i386.c (host_detect_local_cpu): Test bit_PRFCHW
bit of CPUID 0x80000001 %ecx instead of CPUID 7 %ecx.
* config/i386/cpuid.h (bits_PRFCHW): Move definition to CPUID
0x80000001 %ecx flags.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190345 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/cpuid.h
gcc/config/i386/driver-i386.c

index 57c754b..54590f2 100644 (file)
@@ -1,3 +1,12 @@
+2012-08-13  Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>
+           Jakub Jelinek  <jakub@redhat.com>
+
+       PR driver/54210
+       * config/i386/driver-i386.c (host_detect_local_cpu): Test bit_PRFCHW
+       bit of CPUID 0x80000001 %ecx instead of CPUID 7 %ecx.
+       * config/i386/cpuid.h (bits_PRFCHW): Move definition to CPUID
+       0x80000001 %ecx flags.
+
 2012-08-13  Richard Guenther  <rguenther@suse.de>
 
        * tree-cfg.c (print_loop): Avoid ICEing for loops marked for
index 1ac3174..a26dc9b 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
+ * Free Software Foundation, Inc.
  *
  * This file is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -52,6 +53,7 @@
 #define bit_LAHF_LM    (1 << 0)
 #define bit_ABM                (1 << 5)
 #define bit_SSE4a      (1 << 6)
+#define bit_PRFCHW     (1 << 8)
 #define bit_XOP         (1 << 11)
 #define bit_LWP        (1 << 15)
 #define bit_FMA4        (1 << 16)
@@ -69,7 +71,6 @@
 #define bit_HLE        (1 << 4)
 #define bit_AVX2       (1 << 5)
 #define bit_BMI2       (1 << 8)
-#define bit_PRFCHW     (1 << 8)
 #define bit_RTM        (1 << 11)
 #define bit_RDSEED     (1 << 18)
 #define bit_ADX        (1 << 19)
index 0b56f3f..b5ae18f 100644 (file)
@@ -1,5 +1,6 @@
 /* Subroutines for the gcc driver.
-   Copyright (C) 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2008, 2010, 2011, 2012
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -467,7 +468,6 @@ const char *host_detect_local_cpu (int argc, const char **argv)
       has_bmi2 = ebx & bit_BMI2;
       has_fsgsbase = ebx & bit_FSGSBASE;
       has_rdseed = ebx & bit_RDSEED;
-      has_prfchw = ecx & bit_PRFCHW;
       has_adx = ebx & bit_ADX;
     }
 
@@ -488,6 +488,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
       has_xop = ecx & bit_XOP;
       has_tbm = ecx & bit_TBM;
       has_lzcnt = ecx & bit_LZCNT;
+      has_prfchw = ecx & bit_PRFCHW;
 
       has_longmode = edx & bit_LM;
       has_3dnowp = edx & bit_3DNOWP;