Page MenuHomeFreeBSD

lib/libc/aarch64/string: strcat enable use of SIMD
AcceptedPublic

Authored by getz on Aug 23 2024, 11:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 3:18 AM
Unknown Object (File)
Sun, Nov 3, 6:12 PM
Unknown Object (File)
Wed, Oct 23, 8:37 PM
Unknown Object (File)
Sun, Oct 20, 6:38 PM
Unknown Object (File)
Sun, Oct 20, 10:57 AM
Unknown Object (File)
Oct 16 2024, 10:01 AM
Unknown Object (File)
Oct 11 2024, 1:23 AM
Unknown Object (File)
Oct 8 2024, 2:20 PM
Subscribers

Details

Reviewers
fuz
emaste
andrew
Summary

Call into SIMD strlen and stpcpy for an optimized strcat.
Port of D42600 for amd64.

Test Plan

Passes the strcat tests in the test suite

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 59163
Build 56050: arc lint + arc unit

Event Timeline

getz requested review of this revision.Aug 23 2024, 11:02 AM
  • revert accidental edit of the makefile
getz retitled this revision from lib/libc/aarch64/string: enable use of SIMD to lib/libc/aarch64/string: strcat enable use of SIMD.Aug 23 2024, 11:05 AM

This is probably better done in C code. We don't do any fancy SIMD shenanigans here. The only reason I did it in assembly in D42600 is that the implementation shared a file with an optimised assembly implementation, so it couldn't be done in C.

Code looks ok.

alright, that makes sense. I'll replace it.

strcat in C instead of assembly

Could this be made machine independent?

@andrew If we don't have assembly implementations for strlen and stpcpy, 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:23 PM