[PATCH 0/6] riscv: add vectorized mem* routines
Kito Cheng
kito.cheng@gmail.com
Fri May 22 12:36:50 GMT 2026
Pushed 1/6~6/6 with minor tweaks about dropping .option and indent adjust :)
Kito Cheng <kito.cheng@gmail.com> 於 2026年5月14日週四 上午10:09寫道:
>
> quick ack:
>
> Thanks for the patchset! it put on my task list and will review soon :)
>
> Pincheng Wang <pincheng.plct@isrc.iscas.ac.cn> 於 2026年5月13日週三 下午11:40寫道:
> >
> > Hi all,
> >
> > This is a follow-up series to the previous patches that added RVV
> > support for memset, memcpy, and memmove. This patch series implements
> > RVV (RISC-V Vector Extension) support for several remaining mem*
> > interfaces.
> >
> > Please note that some implementations, such as memrchr, do not use the
> > e8 element size and m8 LMUL combination, since they did not show good
> > acceleration results during testing on our Muse Pi (Spacemit X60 core).
> >
> > I have also noticed that other architectures rarely implement all mem*
> > interfaces with architecture-specific optimizations, and I fully
> > understand the maintenance burden introduced by too many hand-written
> > assembly implementations. Therefore, although I submitted RVV
> > implementations for all mem* interfaces, it may make sense to discuss
> > whether only a subset of these patches should be merged.
> >
> > Comments and suggestions are greatly appreciated. Thank you for your
> > time and review!
> >
> > Best regards,
> > Pincheng Wang
> >
> > Pincheng Wang (6):
> > riscv: add vectorized memccpy
> > riscv: add vectorized memchr
> > riscv: add vectorized memcmp
> > riscv: add vectorized mempcpy
> > riscv: add vectorized memrchr
> > riscv: add vectorized rawmemchr
> >
> > newlib/libc/machine/riscv/Makefile.inc | 26 ++++++++++-
> > newlib/libc/machine/riscv/memccpy-asm.S | 39 ++++++++++++++++
> > newlib/libc/machine/riscv/memccpy.c | 5 ++
> > newlib/libc/machine/riscv/memchr-asm.S | 37 +++++++++++++++
> > newlib/libc/machine/riscv/memchr.c | 4 ++
> > newlib/libc/machine/riscv/memcmp-asm.S | 43 +++++++++++++++++
> > newlib/libc/machine/riscv/memcmp.c | 5 ++
> > newlib/libc/machine/riscv/mempcpy-asm.S | 57 +++++++++++++++++++++++
> > newlib/libc/machine/riscv/mempcpy.c | 5 ++
> > newlib/libc/machine/riscv/memrchr-asm.S | 40 ++++++++++++++++
> > newlib/libc/machine/riscv/memrchr.c | 4 ++
> > newlib/libc/machine/riscv/rawmemchr-asm.S | 30 ++++++++++++
> > newlib/libc/machine/riscv/rawmemchr.c | 5 ++
> > 13 files changed, 298 insertions(+), 2 deletions(-)
> > create mode 100644 newlib/libc/machine/riscv/memccpy-asm.S
> > create mode 100644 newlib/libc/machine/riscv/memccpy.c
> > create mode 100644 newlib/libc/machine/riscv/memchr-asm.S
> > create mode 100644 newlib/libc/machine/riscv/memcmp-asm.S
> > create mode 100644 newlib/libc/machine/riscv/memcmp.c
> > create mode 100644 newlib/libc/machine/riscv/mempcpy-asm.S
> > create mode 100644 newlib/libc/machine/riscv/mempcpy.c
> > create mode 100644 newlib/libc/machine/riscv/memrchr-asm.S
> > create mode 100644 newlib/libc/machine/riscv/rawmemchr-asm.S
> > create mode 100644 newlib/libc/machine/riscv/rawmemchr.c
> >
> > --
> > 2.39.5
> >
More information about the Newlib
mailing list