xref: /freebsd-src/contrib/cortex-strings/README (revision 8c4282b370bd66908b45b6a223226a9fc2b69d57)
1*09a53ad8SAndrew Turner= Cortex-A String Routines =
2*09a53ad8SAndrew Turner
3*09a53ad8SAndrew TurnerThis package contains optimised string routines including memcpy(), memset(),
4*09a53ad8SAndrew Turnerstrcpy(), strlen() for the ARM Cortex-A series of cores.
5*09a53ad8SAndrew Turner
6*09a53ad8SAndrew TurnerVarious implementations of these routines are provided, including generic
7*09a53ad8SAndrew Turnerimplementations for ARMv7-A cores with/without Neon, Thumb2 implementations
8*09a53ad8SAndrew Turnerand generic implementations for cores supporting AArch64.
9*09a53ad8SAndrew Turner
10*09a53ad8SAndrew Turner== Getting started ==
11*09a53ad8SAndrew TurnerFirst configure and then install libcortex-strings.so.  To make other
12*09a53ad8SAndrew Turnerapplications use this library, either add -lcortex-strings to the link
13*09a53ad8SAndrew Turnercommand or use LD_PRELOAD to load the library into existing applications.
14*09a53ad8SAndrew Turner
15*09a53ad8SAndrew TurnerOur intent is to get these routines into the common C libraries such
16*09a53ad8SAndrew Turneras GLIBC, Bionic, and Newlib.  Your system may already include them!
17*09a53ad8SAndrew Turner
18*09a53ad8SAndrew Turner== Contents ==
19*09a53ad8SAndrew Turner * src/  contains the routines themselves
20*09a53ad8SAndrew Turner * tests/  contains the unit tests
21*09a53ad8SAndrew Turner * reference/  contains reference copies of other ARM-focused
22*09a53ad8SAndrew Turner   implementations gathered from around the Internet
23*09a53ad8SAndrew Turner * benchmarks/  contains various benchmarks, tools, and scripts used to
24*09a53ad8SAndrew Turner   check and report on the different implementations.
25*09a53ad8SAndrew Turner
26*09a53ad8SAndrew TurnerThe src directory contains different variants organised by the
27*09a53ad8SAndrew Turnerimplementation they run on and optional features used.  For example:
28*09a53ad8SAndrew Turner  * src/thumb-2  contains generic non-NEON routines for AArch32 (with Thumb-2).
29*09a53ad8SAndrew Turner  * src/arm  contains tuned routines for Cortex-A class processors.
30*09a53ad8SAndrew Turner  * src/aarch64  contains generic routines for AArch64.
31*09a53ad8SAndrew Turner  * src/thumb  contains generic routines for armv6-M (with Thumb).
32*09a53ad8SAndrew Turner
33*09a53ad8SAndrew Turner== Reference versions ==
34*09a53ad8SAndrew Turnerreference/ contains versions collected from various popular Open
35*09a53ad8SAndrew TurnerSource libraries.  These have been modified for use in benchmarking.
36*09a53ad8SAndrew TurnerPlease refer to the individual files for any licensing terms.
37*09a53ad8SAndrew Turner
38*09a53ad8SAndrew TurnerThe routines were collected from the following releases:
39*09a53ad8SAndrew Turner * EGLIBC 2.13
40*09a53ad8SAndrew Turner * Newlib 1.19.0
41*09a53ad8SAndrew Turner * Bionic android-2.3.5_r1
42*09a53ad8SAndrew Turner
43*09a53ad8SAndrew Turner== Licensing ==
44*09a53ad8SAndrew TurnerAll Linaro-authored routines are under the modified BSD license:
45*09a53ad8SAndrew Turner
46*09a53ad8SAndrew TurnerCopyright (c) 2011, Linaro Limited
47*09a53ad8SAndrew TurnerAll rights reserved.
48*09a53ad8SAndrew Turner
49*09a53ad8SAndrew TurnerRedistribution and use in source and binary forms, with or without
50*09a53ad8SAndrew Turnermodification, are permitted provided that the following conditions are met:
51*09a53ad8SAndrew Turner    * Redistributions of source code must retain the above copyright
52*09a53ad8SAndrew Turner      notice, this list of conditions and the following disclaimer.
53*09a53ad8SAndrew Turner    * Redistributions in binary form must reproduce the above copyright
54*09a53ad8SAndrew Turner      notice, this list of conditions and the following disclaimer in the
55*09a53ad8SAndrew Turner      documentation and/or other materials provided with the distribution.
56*09a53ad8SAndrew Turner    * Neither the name of the Linaro nor the
57*09a53ad8SAndrew Turner      names of its contributors may be used to endorse or promote products
58*09a53ad8SAndrew Turner      derived from this software without specific prior written permission.
59*09a53ad8SAndrew Turner
60*09a53ad8SAndrew TurnerTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
61*09a53ad8SAndrew TurnerANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
62*09a53ad8SAndrew TurnerWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
63*09a53ad8SAndrew TurnerDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
64*09a53ad8SAndrew TurnerDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
65*09a53ad8SAndrew Turner(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
66*09a53ad8SAndrew TurnerLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
67*09a53ad8SAndrew TurnerON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
68*09a53ad8SAndrew Turner(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
69*09a53ad8SAndrew TurnerSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
70*09a53ad8SAndrew Turner
71*09a53ad8SAndrew TurnerAll ARM-authored routines are under the modified BSD license:
72*09a53ad8SAndrew Turner
73*09a53ad8SAndrew TurnerCopyright (c) 2014 ARM Ltd
74*09a53ad8SAndrew TurnerAll rights reserved.
75*09a53ad8SAndrew Turner
76*09a53ad8SAndrew TurnerRedistribution and use in source and binary forms, with or without
77*09a53ad8SAndrew Turnermodification, are permitted provided that the following conditions are met:
78*09a53ad8SAndrew Turner    * Redistributions of source code must retain the above copyright
79*09a53ad8SAndrew Turner      notice, this list of conditions and the following disclaimer.
80*09a53ad8SAndrew Turner    * Redistributions in binary form must reproduce the above copyright
81*09a53ad8SAndrew Turner      notice, this list of conditions and the following disclaimer in the
82*09a53ad8SAndrew Turner      documentation and/or other materials provided with the distribution.
83*09a53ad8SAndrew Turner    * Neither the name of the Linaro nor the
84*09a53ad8SAndrew Turner      names of its contributors may be used to endorse or promote products
85*09a53ad8SAndrew Turner      derived from this software without specific prior written permission.
86*09a53ad8SAndrew Turner
87*09a53ad8SAndrew TurnerTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
88*09a53ad8SAndrew TurnerANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
89*09a53ad8SAndrew TurnerWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
90*09a53ad8SAndrew TurnerDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
91*09a53ad8SAndrew TurnerDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
92*09a53ad8SAndrew Turner(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
93*09a53ad8SAndrew TurnerLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
94*09a53ad8SAndrew TurnerON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
95*09a53ad8SAndrew Turner(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
96*09a53ad8SAndrew TurnerSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
97*09a53ad8SAndrew Turner
98*09a53ad8SAndrew TurnerAll third party routines are under a GPL compatible license.
99*09a53ad8SAndrew Turner
100*09a53ad8SAndrew Turner== Notes and Limitations ==
101*09a53ad8SAndrew TurnerSome of the implementations have been collected from other
102*09a53ad8SAndrew Turnerprojects and have a variety of licenses and copyright holders.
103*09a53ad8SAndrew Turner
104*09a53ad8SAndrew Turner== Style ==
105*09a53ad8SAndrew TurnerAssembly code attempts to follow the GLIBC coding convetions.  They
106*09a53ad8SAndrew Turnerare:
107*09a53ad8SAndrew Turner * Copyright headers in C style comment blocks
108*09a53ad8SAndrew Turner * Instructions indented with one tab
109*09a53ad8SAndrew Turner * Operands indented with one tab
110*09a53ad8SAndrew Turner * Text is wrapped at 70 characters
111*09a53ad8SAndrew Turner * End of line comments are fine
112