From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7053 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] x86_64/memset: use "small block" code for blocks up to 30 bytes long Date: Mon, 16 Feb 2015 10:12:49 -0500 Message-ID: <20150216151249.GX23507@brightrain.aerifal.cx> References: <1423845589-5920-1-git-send-email-vda.linux@googlemail.com> <20150214193533.GK23507@brightrain.aerifal.cx> <20150215040655.GM23507@brightrain.aerifal.cx> <20150215150313.GO23507@brightrain.aerifal.cx> <20150215225559.GV23507@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1424099605 5608 80.91.229.3 (16 Feb 2015 15:13:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Feb 2015 15:13:25 +0000 (UTC) Cc: musl To: Denys Vlasenko Original-X-From: musl-return-7066-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 16 16:13:12 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YNNMG-0001Ow-AA for gllmg-musl@m.gmane.org; Mon, 16 Feb 2015 16:13:12 +0100 Original-Received: (qmail 29768 invoked by uid 550); 16 Feb 2015 15:13:10 -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 29702 invoked from network); 16 Feb 2015 15:13:03 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7053 Archived-At: On Mon, Feb 16, 2015 at 11:09:25AM +0100, Denys Vlasenko wrote: > On Sun, Feb 15, 2015 at 11:55 PM, Rich Felker wrote: > >> "sub $8,%rcx" can be folded into lea. > > > > No, it can't, for the above reason. > > Why can't? > > lea -9(%rdx), %rcx > > will also underflow for %rdx == 0, just like "lea -1". Then n==1..8 would also fall into the rep stosq path and either fail horribly or need to use slow fixup code there. Rich