From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9201 invoked from network); 7 Jun 2023 12:57:21 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 7 Jun 2023 12:57:21 -0000 Received: (qmail 13385 invoked by uid 550); 7 Jun 2023 12:57:15 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 13338 invoked from network); 7 Jun 2023 12:57:14 -0000 Date: Wed, 7 Jun 2023 08:57:02 -0400 From: Rich Felker To: zhangfei Cc: musl@lists.openwall.com, zhangfei Message-ID: <20230607125701.GY4163@brightrain.aerifal.cx> References: <20230607100710.4286-1-zhang_fei_0403@163.com> <20230607100710.4286-2-zhang_fei_0403@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230607100710.4286-2-zhang_fei_0403@163.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH 1/3] RISC-V: Optimize memset On Wed, Jun 07, 2023 at 06:07:08PM +0800, zhangfei wrote: > From: zhangfei > > This code is based on linux/arch/riscv/lib/memset.S. Removed macro definition and modified ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > to support RISCV64. > When the amount of data in the source code is less than 16 bytes or after loop tail > processing, byte storage is used. Here we refer to musl/src/string/memset.c, and modify it > to fill head and tail with minimal branching. > > Signed-off-by: Zhang Fei > --- > src/string/riscv64/memset.S | 136 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 136 insertions(+) > create mode 100644 src/string/riscv64/memset.S > > diff --git a/src/string/riscv64/memset.S b/src/string/riscv64/memset.S > new file mode 100644 > index 0000000..f8663d7 > --- /dev/null > +++ b/src/string/riscv64/memset.S > @@ -0,0 +1,136 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ ^^^^^^^^^^^^ This completely precludes any consideration for inclusion. Please do not send license-incompatible code to the mailing list. Not only can we not use it, but putting it in front of people actually working on code suitable for musl makes us work extra hard to avoid taint. You're free to link it into your own products (assuming you're honoring your obligations under the GPL...), and doing so will get you pretty much the entire benefit of having had this in libc. Rich