From: Thorsten Glaser <tg@mirbsd.de>
To: musl@lists.openwall.com
Cc: pincheng.plct@isrc.iscas.ac.cn
Subject: Re: [musl] [PATCH 1/1] riscv64: add optimized memset, memcpy and memmove
Date: Fri, 14 Nov 2025 00:15:21 +0100 (CET) [thread overview]
Message-ID: <d7d72c5a-a929-7550-7cae-f648d95dfafa@mirbsd.de> (raw)
In-Reply-To: <20251113161518.57357-2-pincheng.plct@isrc.iscas.ac.cn>
On Fri, 14 Nov 2025, Pincheng Wang wrote:
>+/* string function pointer, runtime-dispatched based on RVV support */
>+__attribute__((visibility("hidden")))
>+#ifndef __riscv_vector
>+void *(*__memset_ptr)(void *, int, size_t) = __memset_scalar;
>+void *(*__memcpy_ptr)(void *, const void *, size_t) = __memcpy_scalar;
>+void *(*__memmove_ptr)(void *, const void *, size_t) = __memmove_scalar;
>+#else
>+void *(*__memset_ptr)(void *, int, size_t) = __memset_vect;
>+void *(*__memcpy_ptr)(void *, const void *, size_t) = __memcpy_vect;
>+void *(*__memmove_ptr)(void *, const void *, size_t) = __memmove_vect;
>+#endif
You’d need to put the visibility attribute to each of these.
Why not just make them static (file-local), though?
Not speaking for musl,
//mirabilos
--
<igli> exceptions: a truly awful implementation of quite a nice idea.
<igli> just about the worst way you could do something like that, afaic.
<igli> it's like anti-design. <mirabilos> that too… may I quote you on that?
<igli> sure, tho i doubt anyone will listen ;)
next prev parent reply other threads:[~2025-11-13 23:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 16:15 [musl] [PATCH 0/1] riscv64: add optimized string functions Pincheng Wang
2025-11-13 16:15 ` [musl] [PATCH 1/1] riscv64: add optimized memset, memcpy and memmove Pincheng Wang
2025-11-13 23:15 ` Thorsten Glaser [this message]
2025-11-14 0:54 ` Pincheng Wang
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=d7d72c5a-a929-7550-7cae-f648d95dfafa@mirbsd.de \
--to=tg@mirbsd.de \
--cc=musl@lists.openwall.com \
--cc=pincheng.plct@isrc.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).