From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2875 Path: news.gmane.org!not-for-mail From: Andre Renaud Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: [PATCH] Added ARM optimised memcpy implementation Date: Sun, 3 Mar 2013 09:28:23 +1300 Message-ID: References: <1362101090-8525-1-git-send-email-andre@bluewatersys.com> <20130301072617.GP6181@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1362256115 858 80.91.229.3 (2 Mar 2013 20:28:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Mar 2013 20:28:35 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2876-gllmg-musl=m.gmane.org@lists.openwall.com Sat Mar 02 21:28:59 2013 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 1UBt3C-0007UN-BE for gllmg-musl@plane.gmane.org; Sat, 02 Mar 2013 21:28:58 +0100 Original-Received: (qmail 11861 invoked by uid 550); 2 Mar 2013 20:28:36 -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 11853 invoked from network); 2 Mar 2013 20:28:36 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:x-gm-message-state; bh=OYN7ZuQz4L0habh9Tk1AWdGIAvcjtGZKDPn4w/W55Kw=; b=G/UILwXfALlw4Lz4NYVJUpuuOuZvfklwJPyaTDQTBEIQ38eCNyQGm10JEFYJdiS8H2 brYLfb4W2jOgbGHTI0jq+cuQcQO+0TnmnPkcw17dtpuTzP/R+v+/Pm3pEEOgLwRFxLdd 7WoPI5x9cW/qYhnl5txfS1a2Kd3E3HrF7eakuOwFr2LCHrsWmfEDOKjGOXCHntGotFVb riFx4XZdEPE8H2ZW1u6/KphoX9hp3zB4SSSU6bxfDtNNSNHOQPzw3AGhDnStTjBN/Uu5 EG4dsI3PQ9BTGRvX1VU5W3ygztvZrH7jaLD114Dml/clZCXC6meT65I6UKM5eLkQy58b YNuw== X-Received: by 10.60.5.165 with SMTP id t5mr12316150oet.117.1362256103998; Sat, 02 Mar 2013 12:28:23 -0800 (PST) In-Reply-To: <20130301072617.GP6181@port70.net> X-Gm-Message-State: ALoCoQkVVaOVMJna4/6TwE5rg3Dh+Qqmt7uFBXyacMvbnOg+uVyCv2Y04duCkNFv4OwSLgJtc89+ Xref: news.gmane.org gmane.linux.lib.musl.general:2875 Archived-At: On 1 March 2013 20:26, Szabolcs Nagy wrote: > * nwmcsween@gmail.com [2013-02-28 19:14:28 -0800]: >> Hmm what does this do that builtins cannot? What I'm asking is why is this more preformant than preload + word-at-a-time. >> > > musl uses naive memcpy if src and dst are not congruent (src%4 != dst%4) > > the android asm takes care of that by fetching a 32bytes > from src into registers and dumping it into dst with > apropriate shifts > > and in the congruent case 32byte alignment is used (cacheline aligned) It also takes advantage of the arm load/store multiple instructions, allowing it to manipulate up to 8 32-bit words with a single instruction. Regards, Andre