From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED, URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1693404802; bh=e8EboqZptFPY7KxQhU7IuozNgzgxOwr0ilKOSAn1id4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=l+2JYOAbqKiK/KGYWNDCQ/Z8hsfwQkZnLPIY1RJPPUh+ZmtaLP6NTewZrH4xM3UNu 8JH1b0TqfcfmxRmr9f3RRmc1yjFjxyAQPXsloX8L+gFVN3oBiELEArGjtB83Qrstfn C+pk+aOydsLI6FkCXfG/WJHsdRlSKj+oU6Pv3Md46mA3Z9aXKPeCfkAObeDagTqsUD R7rAAU9R96DDCEAKWyhY5N/27nky05ZLkZYqnNIrAJaMMk1rQhbs1yLjS0sT53hBDi MrPeMNmtRsZYBLT1VtF+ZxXrB7XgcusU8nMZ62gYyknDkCniQGvgiFMoDFd+Hp3VpH 6ZWCP+dybvlTQ== Received: from biznet-home.integral.gnuweeb.org (unknown [182.253.126.208]) by gnuweeb.org (Postfix) with ESMTPSA id 7921E24B2B0; Wed, 30 Aug 2023 21:13:19 +0700 (WIB) Date: Wed, 30 Aug 2023 21:13:14 +0700 From: Ammar Faizi To: Alviro Iskandar Setiawan Cc: Willy Tarreau , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Nicholas Rosenberg , Michael William Jonathan , GNU/Weeb Mailing List , Linux Kernel Mailing List Subject: Re: [RFC PATCH v1 2/5] tools/nolibc: x86-64: Use `rep stosb` for `memset()` Message-ID: References: <20230830135726.1939997-1-ammarfaizi2@gnuweeb.org> <20230830135726.1939997-3-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bpl: hUx9VaHkTWcLO7S8CQCslj6OzqBx2hfLChRz45nPESx5VSB/xuJQVOKOB1zSXE3yc9ntP27bV1M1 List-Id: On Wed, Aug 30, 2023 at 09:08:05PM +0700, Alviro Iskandar Setiawan wrote: > The first instruction could be: > > movl %esi, %eax > > That's smaller. Also, the second argument of memset() is an int > anyway, so there is no need to have a full 64-bit copy of %rsi in > %rax. Agree, noted. -- Ammar Faizi