HomeFreeBSD

lib/libc/amd64/string: implement strsep() through strcspn()

Description

lib/libc/amd64/string: implement strsep() through strcspn()

The strsep() function is basically strcspn() with extra steps.
On amd64, we now have an optimised implementation of strcspn(),
so instead of implementing the inner loop manually, just call
into the optimised routine.

Sponsored by: The FreeBSD Foundation
Tested by: developers@, exp-run
Approved by: mjg
MFC after: 1 month
MFC to: stable/14
PR: 275785
Differential Revision: https://reviews.freebsd.org/D42346

(cherry picked from commit fd2ecd91aeeeab579c769c9a39f90b4bd4a493a9)

Details

Provenance
fuzAuthored on Oct 24 2023, 3:52 AM
Differential Revision
D42346: lib/libc/amd64/string: implement strsep() through strcspn()
Parents
rGc105cd8426bb: share/man/man7/simd.7: document strrchr scalar, baseline implementation
Branches
Unknown
Tags
Unknown