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

Ganesh.Gopalasubramanian at amd dot com gcc-bugzilla@gcc.gnu.org
Thu Aug 9 16:55:00 GMT 2012


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

             Bug #: 54210
           Summary: gcc unable to detect -mprfchw flag in bulldozer
                    machines
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: driver
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Ganesh.Gopalasubramanian@amd.com


In a bulldozer machine, GCC is unable to detect the prfchw flag (Bulldozer has
prefetchw support).

"gcc -### -v -march=native /usr/include/stdlib.h" returns

./cc1 -quiet -v /usr/include/stdlib.h "-march=bdver1" -mcx16 -msahf -mno-movbe
-maes -mpclmul -mpopcnt -mabm -mlwp -mno-fma -mfma4 -mxop -mno-bmi -mno-bmi2
-mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd
-mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw --param "l1-cache-size=16"
--param "l1-cache-line-size=64" --param "l2-cache-size=2048" "-mtune=bdver1"
-quiet -dumpbase stdlib.h -auxbase stdlib -version -o /tmp/ccdFQZD3.s
"--output-pch=/usr/include/stdlib.h.gch"

Further analysis shows that in gcc/config/i386/driver-i386.c, cpuid function
number 7 is called instead of calling cpuid function 0x80000001 for getting the
prefetchw flag.



More information about the Gcc-bugs mailing list