From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1394 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: musl libc, memcpy Date: Wed, 1 Aug 2012 01:40:11 -0400 Message-ID: <20120801054011.GC544@brightrain.aerifal.cx> References: <20120730204100.GY544@brightrain.aerifal.cx> <20120801042722.GB544@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5/uDoXvLw7AC5HRs" X-Trace: dough.gmane.org 1343799603 14199 80.91.229.3 (1 Aug 2012 05:40:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Aug 2012 05:40:03 +0000 (UTC) Cc: Kim Walisch To: musl@lists.openwall.com Original-X-From: musl-return-1395-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 01 07:40:04 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SwRf9-0002iZ-6i for gllmg-musl@plane.gmane.org; Wed, 01 Aug 2012 07:40:03 +0200 Original-Received: (qmail 23853 invoked by uid 550); 1 Aug 2012 05:40:02 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 23845 invoked from network); 1 Aug 2012 05:40:02 -0000 Content-Disposition: inline In-Reply-To: <20120801042722.GB544@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1394 Archived-At: --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 01, 2012 at 12:27:22AM -0400, Rich Felker wrote: > I'm attaching a (possibly buggy; not heavily tested) rep-movsd-based > version. I'd be interested in hearing how it performs. And here is the attachment... Rich --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="memcpy.s" .global xmemcpy .type xmemcpy,@function xmemcpy: push %esi push %edi mov 12(%esp),%edi mov 16(%esp),%esi mov 20(%esp),%ecx mov %edi,%eax mov %ecx,%edx shr $2,%ecx rep movsl and $3,%edx jz 1f 2: mov (%esi),%cl mov %cl,(%edi) inc %esi inc %edi dec %edx jnz 2b 1: pop %edi pop %esi ret --5/uDoXvLw7AC5HRs--