This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/54239] Not able to generate "prefetch" (prefetch read) instruction using -m3dnow or -mprfchw
- From: "venkataramanan.kumar at amd dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Aug 2012 13:51:08 +0000
- Subject: [Bug target/54239] Not able to generate "prefetch" (prefetch read) instruction using -m3dnow or -mprfchw
- Auto-submitted: auto-generated
- References: <bug-54239-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54239
--- Comment #2 from Venkataramanan <venkataramanan.kumar at amd dot com> 2012-08-13 13:51:08 UTC ---
(In reply to comment #1)
> Both in 4.7 (which is before the prfchw changes) and 4.8 with -m32 -m3dnow and
> -m32 -m3dnow -mno-sse I get prefetch + prefetchw insn, which looks ok to me.
> -mno-mmx I think disables 3dnow too, so you get no prefetch insns in that case
> (which is also fine). -mprfchw implies the SSE prefetches and PRFCHW CPUID
> 0x80000001 ecx bit 8 doesn't imply the prefetch insn, just prefetchw, so it is
> correct that with -m32 -mprfchw prefetchnta + prefetchw is generated.
> So, where exactly do you see a bug?
Hi Jakub,
> -mprfchw implies the SSE prefetches and PRFCHW CPUID
> 0x80000001 ecx bit 8 doesn't imply the prefetch insn, just prefetchw, so it is
> correct that with -m32 -mprfchw prefetchnta + prefetchw is generated.
> So, where exactly do you see a bug
As per AMD cpuid manual, 0x80000001 ecx bit 8 impiles both prefetch and
prefetchw.
http://blogs.amd.com/developer/2010/08/18/3dnow-deprecated/