From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7095 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Draft of improved memset.s for i386 Date: Mon, 23 Feb 2015 22:18:11 -0500 Message-ID: <20150224031811.GH23507@brightrain.aerifal.cx> References: <20150224010952.GA10683@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 1424747917 9687 80.91.229.3 (24 Feb 2015 03:18:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Feb 2015 03:18:37 +0000 (UTC) Cc: musl To: Denys Vlasenko Original-X-From: musl-return-7108-gllmg-musl=m.gmane.org@lists.openwall.com Tue Feb 24 04:18:36 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 1YQ615-00046P-Ne for gllmg-musl@m.gmane.org; Tue, 24 Feb 2015 04:18:35 +0100 Original-Received: (qmail 21565 invoked by uid 550); 24 Feb 2015 03:18:34 -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 21520 invoked from network); 24 Feb 2015 03:18:29 -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:7095 Archived-At: On Tue, Feb 24, 2015 at 04:06:06AM +0100, Denys Vlasenko wrote: > On Tue, Feb 24, 2015 at 4:02 AM, Denys Vlasenko > wrote: > > On Tue, Feb 24, 2015 at 2:09 AM, Rich Felker wrote: > >> mov %edi,12(%esp) > > > > Shouldn't this be "mov 12(%esp),%edi"? > > It's a load of dst pointer from stack, right? > > Erm... no it is not, 12(%esp) is size param. > > Looks like this insn serves no purpose? > This will simply trash size param on stack, > since %edi is not initialized. The purpose is saving %edi, since %edi is not call-clobbered on the i386 ABI. I'm just storing it over top of an argument we already loaded (argument space belongs to the callee per the ABI) instead of adjusting the stack pointer. Rich