libc: import ARM strcmp from newlib
* Current version is also based on newlib, but an older revision
* The Krait and A9 specific changes no longer seem relevant, so
let's use A15 directly.
Tested on OnePlus 3 (MSM8996):
Before (Krait strcmp):
iterations ns/op
BM_string_strcmp/8 1000k 24 0.322 GiB/s
BM_string_strcmp/64 20M 123 0.519 GiB/s
BM_string_strcmp/512 2M 920 0.556 GiB/s
BM_string_strcmp/1024 1000k 1818 0.563 GiB/s
BM_string_strcmp/8Ki 200k 14405 0.569 GiB/s
BM_string_strcmp/16Ki 100k 28762 0.570 GiB/s
BM_string_strcmp/32Ki 50k 57526 0.570 GiB/s
BM_string_strcmp/64Ki 10k 114959 0.570 GiB/s
After:
iterations ns/op
BM_string_strcmp/8 1000k 28 0.284 GiB/s
BM_string_strcmp/64 20M 107 0.596 GiB/s
BM_string_strcmp/512 2M 800 0.639 GiB/s
BM_string_strcmp/1024 1000k 1579 0.649 GiB/s
BM_string_strcmp/8Ki 200k 12469 0.657 GiB/s
BM_string_strcmp/16Ki 100k 24931 0.657 GiB/s
BM_string_strcmp/32Ki 50k 49843 0.657 GiB/s
BM_string_strcmp/64Ki 20k 99635 0.658 GiB/s
Test: bionic-benchmarks BM_string_memcmp
Change-Id: Icb3bfb0a381bcc1e10885ca5e9547842c3f620d7
diff --git a/libc/NOTICE b/libc/NOTICE
index 298901f..ef31733 100644
--- a/libc/NOTICE
+++ b/libc/NOTICE
@@ -5330,6 +5330,34 @@
-------------------------------------------------------------------
+Copyright (c) 2012-2014 ARM Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
Copyright (c) 2013
MIPS Technologies, Inc., California.