From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16776 invoked by alias); 15 Oct 2012 22:05:50 -0000 Received: (qmail 16762 invoked by uid 22791); 15 Oct 2012 22:05:48 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_CP X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Oct 2012 22:05:44 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TNsn8-00011R-RP from Maxim_Kuvyrkov@mentor.com ; Mon, 15 Oct 2012 15:05:42 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 15 Oct 2012 15:05:42 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Mon, 15 Oct 2012 23:05:40 +0100 Subject: Re: [PATCH] Optimize MIPS memcpy MIME-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset="us-ascii" From: Maxim Kuvyrkov In-Reply-To: <1350323373.2044.7.camel@ubuntu-sellcey> Date: Mon, 15 Oct 2012 22:05:00 -0000 CC: Andrew T Pinski , "Joseph S. Myers" , Content-Transfer-Encoding: quoted-printable Message-ID: <940A7A96-5F74-4A45-8F1D-76AE0CE11C0D@codesourcery.com> References: <5044746c.23eb440a.75e2.618f@mx.google.com> <1346771341.14333.20.camel@ubuntu-sellcey> <596797ED-6575-456D-98FD-C13A209DBC49@mentor.com> <1346948701.14333.152.camel@ubuntu-sellcey> <1347376645.14333.319.camel@ubuntu-sellcey> <1348166309.6170.55.camel@ubuntu-sellcey> <25105334-8813-4532-AC0E-B3A44BE69A19@codesourcery.com> <5B30D440-A918-4352-8DED-A7D681DF0338@codesourcery.com> <1349715796.30194.131.camel@ubuntu-sellcey> <954E9625-0D5C-4295-9229-C16A3F5C200D@codesourcery.com> <1350323373.2044.7.camel@ubuntu-sellcey> To: Steve Ellcey Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00032.txt.bz2 On 16/10/2012, at 6:49 AM, Steve Ellcey wrote: > On Tue, 2012-10-09 at 11:30 +1300, Maxim Kuvyrkov wrote: >=20 >> I too want to keep prepare-for-store prefetches is possible. For debugg= ing purposes you could amend >> prepare-for-store prefetch macros to trigger a loop that would unconditi= onally clobber memory locations >> that prepare-for-store is expected to zero-out. Or add some other asser= tions to help out with debugging. >>=20 >> Thanks, >>=20 >> -- >> Maxim Kuvyrkov >> CodeSourcery / Mentor Graphics >=20 > Maxim, >=20 > Could you try running this test program on your system. I want to see > if it verifies that your machine is doing 32 byte prefetches. The > output I get looks like: >=20 >=20 > 0x004754a0, (0x004754a0 to 0x004754c0, 32 byte prefetch) > 0x004754a1, (0x004754a0 to 0x004754c0, 32 byte prefetch) > 0x004754a2, (0x004754a0 to 0x004754c0, 32 byte prefetch) > 0x004754a3, (0x004754a0 to 0x004754c0, 32 byte prefetch) > 0x004754a4, (0x004754a0 to 0x004754c0, 32 byte prefetch) > 0x004754a5, (0x004754a0 to 0x004754c0, 32 byte prefetch) > . > . > . > 0x0047589b, (0x00475880 to 0x004758a0, 32 byte prefetch) > 0x0047589c, (0x00475880 to 0x004758a0, 32 byte prefetch) > 0x0047589d, (0x00475880 to 0x004758a0, 32 byte prefetch) > 0x0047589e, (0x00475880 to 0x004758a0, 32 byte prefetch) > 0x0047589f, (0x00475880 to 0x004758a0, 32 byte prefetch) This is a big-endian target and I get 64-byte prefetches (for n32, o32 and = n64 ABIs). Now that I have checked XLP documentation once again, it says that L1 cache= line is 32-bytes, but L2 and L3 are 64-bytes. Still, documentation for pr= efetch instruction insists that expected result for prefetch instruction is= to prefetch 32-bytes. 0x200756d0, (no zeros) 0x200756d1, (0x200756c0 to 0x20075700, 64 byte prefetch) 0x200756d2, (0x200756c0 to 0x20075700, 64 byte prefetch) 0x200756d3, (0x200756c0 to 0x20075700, 64 byte prefetch) 0x200756d4, (0x200756c0 to 0x20075700, 64 byte prefetch) 0x200756d5, (0x200756c0 to 0x20075700, 64 byte prefetch) 0x200756d6, (0x200756c0 to 0x20075700, 64 byte prefetch) -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics