Re: [PATCH 00/17] riscv: vectorized str* routines

Kito Cheng <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CA+yXCZCx-VAzdpv8PVcnczDg_g7=cWtU6wHW6mwuwwm2xbGdtg@mail.gmail.com>
> > 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.