Page MenuHomeFreeBSD

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

Authored by getz on Aug 12 2024, 10:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 3:18 AM
Unknown Object (File)
Oct 13 2024, 12:28 PM
Unknown Object (File)
Oct 11 2024, 1:23 AM
Unknown Object (File)
Oct 9 2024, 8:23 AM
Unknown Object (File)
Oct 1 2024, 11:50 PM
Unknown Object (File)
Oct 1 2024, 5:00 AM
Unknown Object (File)
Sep 30 2024, 4:48 PM
Unknown Object (File)
Sep 28 2024, 11:28 PM
Subscribers

Details

Reviewers
fuz
emaste
andrew
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 Passed
Unit
No Test Coverage
Build Status
Buildable 59184
Build 56071: arc lint + arc unit

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.Wed, Nov 6, 2:24 PM
lib/libc/aarch64/string/memchr.S
2

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

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

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