mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: zhangfei <zhang_fei_0403@163.com>
Cc: musl@lists.openwall.com, zhangfei <zhangfei@nj.iscas.ac.cn>
Subject: Re: [musl] [PATCH 1/3] RISC-V: Optimize memset
Date: Wed, 7 Jun 2023 08:57:02 -0400	[thread overview]
Message-ID: <20230607125701.GY4163@brightrain.aerifal.cx> (raw)
In-Reply-To: <20230607100710.4286-2-zhang_fei_0403@163.com>

On Wed, Jun 07, 2023 at 06:07:08PM +0800, zhangfei wrote:
> From: zhangfei <zhangfei@nj.iscas.ac.cn>
> 
> 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<zhangfei@nj.iscas.ac.cn>
> ---
>  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

  reply	other threads:[~2023-06-07 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 10:07 [musl] [PATCH 0/3] RISC-V: Optimize memset, memcpy and memmove zhangfei
2023-06-07 10:07 ` [musl] [PATCH 1/3] RISC-V: Optimize memset zhangfei
2023-06-07 12:57   ` Rich Felker [this message]
2023-06-07 10:07 ` [musl] [PATCH 2/3] RISC-V: Optimize memcpy zhangfei
2023-06-07 10:07 ` [musl] [PATCH 3/3] RISC-V: Optimize memmove zhangfei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230607125701.GY4163@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    --cc=zhang_fei_0403@163.com \
    --cc=zhangfei@nj.iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).