[PATCH v4 1/1] riscv: Add RVV memset via multiarch/IFUNC
Yao Zihong
zihong.plct@isrc.iscas.ac.cn
Thu Dec 11 15:38:10 GMT 2025
At Wed, 10 Dec 2025 18:38:28 -0600, Peter Bergner wrote:
> Then in the .../riscv/multiarch/memset.c file, we can check for whether
> __riscv_v is defined (we're guaranteed that __riscv_v implies RVV1.0,
> since the preconfigure fragment I added disallows RVV0.7) and forces
> always using the RVV variant. If __riscv_v is false, then setup the
> ifunc as in your patch.
We have an RFC series that introduces hwcaps-subdir which can provide a
general mechanism to force the V implementation whenever the toolchain targets
RVA23 (or otherwise guarantees V support). That RFC could allow the IFUNC to
always resolve to the V variant in such cases, similar to what you suggested for
`__riscv_v`[1].
Would you prefer we add the `__riscv_v` shortcut in this series now, and later
migrate it to the hwcaps mechanism; or we keep the current runtime IFUNC selection
for memset in v5, and add the `always use V` behaviour directly when the hwcaps series
lands?
[1] https://inbox.sourceware.org/libc-alpha/20250930005715.95436-4-zihong.plct@isrc.iscas.ac.cn/
Thanks,
Zihong
More information about the Libc-alpha
mailing list