This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/54210] gcc unable to detect -mprfchw flag in bulldozer machines
- From: "Ganesh.Gopalasubramanian at amd dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Aug 2012 18:04:39 +0000
- Subject: [Bug driver/54210] gcc unable to detect -mprfchw flag in bulldozer machines
- Auto-submitted: auto-generated
- References: <bug-54210-4@http.gcc.gnu.org/bugzilla/>
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)