This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/54210] New: 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 16:55:28 +0000
- Subject: [Bug driver/54210] New: gcc unable to detect -mprfchw flag in bulldozer machines
- Auto-submitted: auto-generated
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.