Page MenuHomeFreeBSD

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

Authored by getz on Aug 23 2024, 11:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 23, 6:38 PM
Unknown Object (File)
Fri, Jan 10, 3:05 PM
Unknown Object (File)
Dec 27 2024, 8:43 AM
Unknown Object (File)
Dec 26 2024, 10:52 PM
Unknown Object (File)
Dec 25 2024, 11:59 PM
Unknown Object (File)
Dec 24 2024, 8:28 AM
Unknown Object (File)
Dec 22 2024, 7:17 PM
Unknown Object (File)
Dec 15 2024, 3:52 AM
Subscribers

Details

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 Not Applicable
Unit
Tests Not Applicable

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.Nov 6 2024, 2:23 PM
This revision was automatically updated to reflect the committed changes.