[PATCH 00/17] riscv: vectorized str* routines
Kito Cheng
kito.cheng@gmail.com
Wed Aug 5 14:22:25 GMT 2026
> > Each routine follows the same integration pattern as the mem* series: a
> > hand-written <func>-asm.S guarded by
> >
> > __riscv_vector && __riscv_xlen == 64
> > && !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED
Does any implementation not work on RV32 / __riscv_xlen == 32?
I would suggest removing that limitation if the answer is no :)
minor: some vectorized functions use xN where N > 16, that could lead
to problems on RVE, e.g. strchr uses a6, which is not available on
RVE, so I would suggest adding !__riscv_e for those functions.
> > Please note that strcasecmp/strncasecmp fold only the ASCII letters A-Z, i.e.
> > they implement the C/POSIX locale. Targets that need locale-aware folding fall
> > through the guard to the generic implementation. I'm happy to drop these two if
> > the locale divergence is unwelcome.
I would prefer drop vectorized strcasecmp and strncasecmp since they
do not handle the locale correctly.
More information about the Newlib
mailing list