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