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

Details

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