From patchwork Mon Aug 13 09:29:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [i386] cpuid function for prefetchw Date: Sun, 12 Aug 2012 23:29:45 -0000 From: "Gopalasubramanian, Ganesh" X-Patchwork-Id: 176889 Message-Id: To: "gcc-patches@gcc.gnu.org" Hello, To get the prefetchw cpuid flag, cpuid function 0x80000001 needs to be called. Previous to patch, function 0x7 is called. Bootstrapping and "make -k check" passes without failures. Ok for trunk? Regards Ganesh 2012-08-13 Ganesh Gopalasubramanian PR driver/54210 * config/i386/driver-i386.c (host_detect_local_cpu): Call cpuid function 0x80000001 to get the prfchw cpuid flag. has_longmode = edx & bit_LM; has_3dnowp = edx & bit_3DNOWP; has_3dnow = edx & bit_3DNOW; + has_prfchw = ecx & bit_PRFCHW; } if (!arch 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 @@