From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11875 invoked by alias); 26 Jan 2013 02:09:39 -0000 Received: (qmail 11810 invoked by uid 22791); 26 Jan 2013 02:09:36 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,TW_CP X-Spam-Check-By: sourceware.org Received: from gateway14.websitewelcome.com (HELO gateway14.websitewelcome.com) (69.56.148.27) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Jan 2013 02:09:04 +0000 Received: by gateway14.websitewelcome.com (Postfix, from userid 5007) id DAABA17E74450; Fri, 25 Jan 2013 20:09:01 -0600 (CST) Received: from gator1174.hostgator.com (gator1174.hostgator.com [174.121.16.2]) by gateway14.websitewelcome.com (Postfix) with ESMTP id CCF1717E74430 for ; Fri, 25 Jan 2013 20:09:01 -0600 (CST) Received: from [101.98.150.122] (port=55206 helo=[192.168.0.102]) by gator1174.hostgator.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1TyvCZ-0002KH-28; Fri, 25 Jan 2013 20:09:03 -0600 Subject: Re: [patch, mips, memmove] Remove memmove's use of memcpy on MIPS Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Maxim Kuvyrkov In-Reply-To: <1359149324.11963.183.camel@ubuntu-sellcey> Date: Sat, 26 Jan 2013 02:09:00 -0000 Cc: "Joseph S. Myers" , Content-Transfer-Encoding: quoted-printable Message-Id: <19B90A0A-12E1-496F-809B-88DF446BEEE3@kugelworks.com> References: <8eea9547-6de4-482b-833c-f552df9283d4@EXCHHUB01.MIPS.com> <1359149324.11963.183.camel@ubuntu-sellcey> To: Steve Ellcey X-BWhitelist: yes X-Source-Sender: ([192.168.0.102]) [101.98.150.122]:55206 X-Source-Auth: maxim@kugelworks.com X-Email-Count: 1 X-Source-Cap: bWt1dnk7bWt1dnk7Z2F0b3IxMTc0Lmhvc3RnYXRvci5jb20= 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: 2013-01/txt/msg00063.txt.bz2 On 26/01/2013, at 10:28 AM, Steve Ellcey wrote: > On Fri, 2013-01-25 at 20:16 +0000, Joseph S. Myers wrote: >> On Fri, 25 Jan 2013, Steve Ellcey wrote: >>=20 >>> Rather then use a slower safer prefetch for memcpy, which would also fix >>> this problem, I would like to remove the setting of MEMCPY_OK_FOR_FWD_= MEMMOVE >>> in memmove.c. >>=20 >> Removing the MIPS memmove.c is OK. There's no point in having the file= =20 >> when it doesn't define MEMCPY_OK_FOR_FWD_MEMMOVE >=20 > I am hoping to improve memcpy at some point so that it will be safe to > use memcpy in memmove again. Given that, do you think I should still > just remove the MIPS memmove.c and recreate it later when needed or > would it make sense to keep it so I can just set the macro when it is > safe to do so. If you want to keep memmove at top speed you could add a memmove-safe insta= nce of memcpy.S and then use that one in memmove. I.e. (roughly), sysdeps/mips/memmove.c: #define MEMCPY memcpy_for_memmove #define MEMCPY_OK_FOR_FWD_MEMMOVE 1 #include // Adjust string/memmove.c to use "MEMCPY" inst= ead of "memcpy". sysdeps/mips/memcpy_for_memmove.S: #define MEMCPY memcpy_for_memmove #define HIDDEN .hidden // Don't export this copy of memcpy. #define PREFETCH ... // Define safe prefetch. #include "memcpy.S" -- Maxim Kuvyrkov KugelWorks