Page MenuHomeFreeBSD

Switch to Arm Optimized Routines for mem* & str*
ClosedPublic

Authored by andrew on Nov 1 2021, 1:39 PM.

Details

Summary

These are the updated version of the older Cortex Strings Library we
previously used. The Arm Optimized Routines also support CPU features
that are currently in development on FreeBSD, e.g. Branch Target
Identification (BTI). Rather than add BTI support to the old code it's
easier to just use the maintained version.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

andrew requested review of this revision.Nov 1 2021, 1:39 PM

I might change the comment slightly, since we very likely want to move to an ifunc and support the other optimized routines later on. We're not really "fixing" the internal names right now so much as we're mapping the generic aarch64 implementation to the standard name while we do not yet support the other optimized ones.

Otherwise LGTM

This revision is now accepted and ready to land.Nov 1 2021, 2:54 PM

I have an updated version in testing as we need to define index and rindex as weak references to strchr and strrchr respectively. I'm also adding an empty memmove.S to so we don't need to remove it from MISRCS, and so rtld can copy the object file for its build.

I'm also adding an empty memmove.S to so we don't need to remove it from MISRCS

Ah, I was wondering about that as an option, sounds good.

Switch to mostly generated asm including the needed file.

  • Re-adds the index symbol
  • Add an empty memmove.S to simplify the libc and rtld builds
This revision now requires review to proceed.Nov 2 2021, 9:47 AM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 19 2021, 11:56 AM
This revision was automatically updated to reflect the committed changes.