xref: /freebsd/contrib/arm-optimized-routines/README (revision f3087bef11543b42e0d69b708f367097a4118d24)
131914882SAlex RichardsonArm Optimized Routines
231914882SAlex Richardson----------------------
331914882SAlex Richardson
431914882SAlex RichardsonThis repository contains implementations of library functions
5072a4ba8SAndrew Turnerprovided by Arm. The outbound license is available under a dual
6072a4ba8SAndrew Turnerlicense, at the user’s election, as reflected in the LICENSE file.
7072a4ba8SAndrew TurnerContributions to this project are accepted, but Contributors have
8072a4ba8SAndrew Turnerto sign an Assignment Agreement, please follow the instructions in
931914882SAlex Richardsoncontributor-agreement.pdf. This is needed so upstreaming code
10072a4ba8SAndrew Turnerto projects that require copyright assignment is possible. Further
11072a4ba8SAndrew Turnercontribution requirements are documented in README.contributors of
12072a4ba8SAndrew Turnerthe appropriate subdirectory.
1331914882SAlex Richardson
1431914882SAlex RichardsonRegular quarterly releases are tagged as vYY.MM, the latest
15*f3087befSAndrew Turnerrelease is v25.01.
1631914882SAlex Richardson
1731914882SAlex RichardsonSource code layout:
1831914882SAlex Richardson
1931914882SAlex Richardsonbuild/          - build directory (created by make).
20*f3087befSAndrew Turnermath/           - math subproject sources for generic scalar
21*f3087befSAndrew Turner                  subroutines and sources shared with
22*f3087befSAndrew Turner                  subdirectories of math/.
23*f3087befSAndrew Turner                  All math routines should meet the quality
24*f3087befSAndrew Turner                  requirements stated in math/README.contributors,
25*f3087befSAndrew Turner                  routines that fail to do so are located in an
26*f3087befSAndrew Turner                  experimental/ directory.
27*f3087befSAndrew Turnermath/aarch64/   - math subproject AArch64-specific sources
28*f3087befSAndrew Turner                  and sources shared with subdirectories.
29*f3087befSAndrew Turnermath/aarch64/advsimd      - AdvSIMD-specific math sources.
30*f3087befSAndrew Turnermath/aarch64/experimental - Experimental math sources do not
31*f3087befSAndrew Turner                            meet quality requirements stated in
32*f3087befSAndrew Turner                            math/README.contributors.
33*f3087befSAndrew Turnermath/aarch64/sve          - SVE-specific math sources.
3431914882SAlex Richardsonmath/include/   - math library public headers.
3531914882SAlex Richardsonmath/test/      - math test and benchmark related sources.
3631914882SAlex Richardsonmath/tools/     - tools used for designing the algorithms.
3731914882SAlex Richardsonnetworking/     - networking subproject sources.
3831914882SAlex Richardsonnetworking/include/ - networking library public headers.
3931914882SAlex Richardsonnetworking/test/ - networking test and benchmark related sources.
4031914882SAlex Richardsonstring/         - string routines subproject sources.
41*f3087befSAndrew Turner                  All string routines should meet the quality
42*f3087befSAndrew Turner                  requirements stated in string/README.contributors,
43*f3087befSAndrew Turner                  routines that fail to do so are located in an
44*f3087befSAndrew Turner                  experimental/ directory.
45*f3087befSAndrew Turnerstring/<arch>   - <arch>-specific string routines sources for
46*f3087befSAndrew Turner                  <arch>=aarch64, and arm.
47*f3087befSAndrew Turnerstring/aarch64/experimental - Experimental string routines which
48*f3087befSAndrew Turner                              may not be fully optimized yet.
4931914882SAlex Richardsonstring/include/ - string library public headers.
5031914882SAlex Richardsonstring/test/    - string test and benchmark related sources.
5131914882SAlex Richardson
5231914882SAlex RichardsonThe steps to build the target libraries and run the tests:
5331914882SAlex Richardson
5431914882SAlex Richardsoncp config.mk.dist config.mk
5531914882SAlex Richardson# edit config.mk if necessary ...
5631914882SAlex Richardsonmake
5731914882SAlex Richardsonmake check
5831914882SAlex Richardson
5931914882SAlex RichardsonOr building outside of the source directory:
6031914882SAlex Richardson
6131914882SAlex Richardsonln -s path/to/src/Makefile Makefile
6231914882SAlex Richardsoncp path/to/src/config.mk.dist config.mk
6331914882SAlex Richardsonecho 'srcdir = path/to/src' >> config.mk
6431914882SAlex Richardson# further edits to config.mk
6531914882SAlex Richardsonmake
6631914882SAlex Richardsonmake check
6731914882SAlex Richardson
6831914882SAlex RichardsonOr building and testing the math subproject only:
6931914882SAlex Richardson
7031914882SAlex Richardsonmake all-math
7131914882SAlex Richardsonmake check-math
7231914882SAlex Richardson
73*f3087befSAndrew TurnerNote on compiler compability/requirement:
74*f3087befSAndrew Turner
75*f3087befSAndrew TurnerSVE routines are always built by default - this means that on AArch64
76*f3087befSAndrew TurnerGCC >= 10 or LLVM >= 5 are always required for SVE ACLE compatibility.
77*f3087befSAndrew TurnerThere is no explicit check for compatible compiler, therefore the SVE
78*f3087befSAndrew Turnerroutines will fail to build if CC is too old.
79*f3087befSAndrew Turner
8031914882SAlex RichardsonThe test system requires libmpfr and libmpc.
8131914882SAlex RichardsonFor example on debian linux they can be installed as:
8231914882SAlex Richardson
8331914882SAlex Richardsonsudo apt-get install libmpfr-dev libmpc-dev
8431914882SAlex Richardson
8531914882SAlex RichardsonFor cross build, CROSS_COMPILE should be set in config.mk and EMULATOR
8631914882SAlex Richardsonshould be set for cross testing (e.g. using qemu-user or remote access
8731914882SAlex Richardsonto a target machine), see the examples in config.mk.dist.
88