This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/54210] gcc unable to detect -mprfchw flag in bulldozer machines


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54210

--- Comment #1 from GGanesh <Ganesh.Gopalasubramanian at amd dot com> 2012-08-09 18:04:39 UTC ---
Calling the cpuid function 0x80000001 does it for bulldozer architecture.
Is it OK for upstream?

Index: gcc/config/i386/driver-i386.c
===================================================================
--- gcc/config/i386/driver-i386.c       (revision 189996)
+++ gcc/config/i386/driver-i386.c       (working copy)
@@ -467,7 +467,6 @@
       has_bmi2 = ebx & bit_BMI2;
       has_fsgsbase = ebx & bit_FSGSBASE;
       has_rdseed = ebx & bit_RDSEED;
-      has_prfchw = ecx & bit_PRFCHW;
     }

   /* Check cpuid level of extended features.  */ @@ -491,6 +490,7 @@
       has_longmode = edx & bit_LM;
       has_3dnowp = edx & bit_3DNOWP;
       has_3dnow = edx & bit_3DNOW;
+      has_prfchw = ecx & bit_PRFCHW;
     }

   if (!arch)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]