Page MenuHomeFreeBSD

lib/libc/aarch64/string: strcat enable use of SIMD
Needs ReviewPublic

Authored by getz on Aug 23 2024, 11:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 26, 9:00 AM
Unknown Object (File)
Mon, Sep 23, 7:06 AM
Unknown Object (File)
Thu, Sep 19, 6:15 AM
Unknown Object (File)
Wed, Sep 18, 7:37 PM
Unknown Object (File)
Tue, Sep 17, 6:13 PM
Unknown Object (File)
Mon, Sep 16, 6:47 PM
Unknown Object (File)
Mon, Sep 16, 10:21 AM
Unknown Object (File)
Fri, Sep 13, 11:45 AM
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.