Page MenuHomeFreeBSD

lib/libc/aarch64/string: add strlcat SIMD implementation
ClosedPublic

Authored by getz on Aug 12 2024, 10:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 24, 5:55 PM
Unknown Object (File)
Fri, Jan 17, 9:53 PM
Unknown Object (File)
Fri, Jan 10, 5:30 PM
Unknown Object (File)
Tue, Jan 7, 3:24 AM
Unknown Object (File)
Sat, Jan 4, 3:02 AM
Unknown Object (File)
Dec 27 2024, 2:39 AM
Unknown Object (File)
Dec 26 2024, 11:43 AM
Unknown Object (File)
Dec 24 2024, 3:03 PM
Subscribers

Details

Summary

This patch requires D46243 as it depends on strlcpy being labeled
__strlcpy.

It's a direct copy from the amd64 string functions using memchr and
strlcpy to implement strlcat.

Test Plan

Passes all tests

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

getz requested review of this revision.Aug 12 2024, 10:46 AM

remove manpage update, lets handle that in a separate commit

Could this be made machine independent?

@andrew If we don't have assembly implementations for strlcpy and memchr, it's generally faster to implement this function directly.

exp-run says it's fine.

This revision is now accepted and ready to land.Nov 6 2024, 2:24 PM
lib/libc/aarch64/string/memchr.S
3

Why are you making this weak and not calling memchr directly?

lib/libc/aarch64/string/memchr.S
3

I believe we allow users to override functions like memchr but that shouldn't break strlcat. This is also done on the amd64 side.

This revision was automatically updated to reflect the committed changes.