diff options
author | Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com> | 2012-08-13 13:21:41 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-08-13 15:21:41 +0200 |
commit | 9006f7f325461dff15a5adaa577b36b789eab2a0 (patch) | |
tree | e2b80c28b51aa8266a3d2f545b8a111500fe955c /gcc | |
parent | 755a1ca535ebd8f999ef9197254343dde3668e2f (diff) | |
download | gcc-9006f7f325461dff15a5adaa577b36b789eab2a0.zip gcc-9006f7f325461dff15a5adaa577b36b789eab2a0.tar.gz gcc-9006f7f325461dff15a5adaa577b36b789eab2a0.tar.bz2 |
re PR driver/54210 (gcc unable to detect -mprfchw flag in bulldozer machines)
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.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r190345
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/i386/cpuid.h | 5 | ||||
-rw-r--r-- | gcc/config/i386/driver-i386.c | 5 |
3 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 57c754b..54590f2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/i386/cpuid.h b/gcc/config/i386/cpuid.h index 1ac3174..a26dc9b 100644 --- a/gcc/config/i386/cpuid.h +++ b/gcc/config/i386/cpuid.h @@ -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) diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c index 0b56f3f..b5ae18f 100644 --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -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; |