From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12967 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] optimize explicit_bzero for size Date: Thu, 28 Jun 2018 16:21:28 -0400 Message-ID: <20180628202128.GJ1392@brightrain.aerifal.cx> References: <20180628175729.4391-1-amonakov@ispras.ru> <20180628193547.GI1392@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1530217176 28474 195.159.176.226 (28 Jun 2018 20:19:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 28 Jun 2018 20:19:36 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12983-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jun 28 22:19:32 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fYdO7-0007L5-Pt for gllmg-musl@m.gmane.org; Thu, 28 Jun 2018 22:19:31 +0200 Original-Received: (qmail 12240 invoked by uid 550); 28 Jun 2018 20:21:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 12219 invoked from network); 28 Jun 2018 20:21:40 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12967 Archived-At: On Thu, Jun 28, 2018 at 08:42:13PM +0100, David CARLIER wrote: > On Thu, 28 Jun 2018 at 20:36, Rich Felker wrote: > > > > On Thu, Jun 28, 2018 at 08:57:29PM +0300, Alexander Monakov wrote: > > > Avoid saving/restoring the incoming argument by reusing memset return value. > > > --- > > Why not even though I m wondering if this saving/restoring really > occurs/instruction really generated with last compilers. > Prefer Alexander's version otherwise :-) It necessarily has to because of ABI. Any register you could use to save the value before making an external call is a register whose old value you would have to save before using it, so no matter what you do, something has to get spilled to the stack and thus a stack frame has to be created. Rich