Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge "Add libc optimizations to bionic for MIPS"
Browse files Browse the repository at this point in the history
  • Loading branch information
Treehugger Robot authored and Gerrit Code Review committed Mar 17, 2017
2 parents e0561cb + fcb877a commit 9cb82a2
Show file tree
Hide file tree
Showing 15 changed files with 2,626 additions and 1,544 deletions.
52 changes: 39 additions & 13 deletions libc/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,22 @@ cc_library_static {
"upstream-openbsd/lib/libc/string/strncmp.c",
],
},

mips: {
exclude_srcs: [
"upstream-openbsd/lib/libc/string/memchr.c",
"upstream-openbsd/lib/libc/string/memmove.c",
"upstream-openbsd/lib/libc/string/strcpy.c",
"upstream-openbsd/lib/libc/string/strncmp.c",
],
},
mips64: {
exclude_srcs: [
"upstream-openbsd/lib/libc/string/memchr.c",
"upstream-openbsd/lib/libc/string/memmove.c",
"upstream-openbsd/lib/libc/string/strcpy.c",
"upstream-openbsd/lib/libc/string/strncmp.c",
],
},
x86: {
exclude_srcs: [
"upstream-openbsd/lib/libc/string/memchr.c",
Expand Down Expand Up @@ -1041,9 +1056,16 @@ cc_library_static {
mips: {
srcs: [
"arch-mips/string/memcmp.c",
"arch-mips/string/memcpy.S",
"arch-mips/string/memcpy.c",
"arch-mips/string/memset.S",
"arch-mips/string/strcmp.S",
"arch-mips/string/strncmp.S",
"arch-mips/string/strlen.c",
"arch-mips/string/strnlen.c",
"arch-mips/string/strchr.c",
"arch-mips/string/strcpy.c",
"arch-mips/string/memchr.c",
"arch-mips/string/memmove.c",

"arch-mips/bionic/__bionic_clone.S",
"arch-mips/bionic/cacheflush.cpp",
Expand All @@ -1052,25 +1074,25 @@ cc_library_static {
"arch-mips/bionic/setjmp.S",
"arch-mips/bionic/syscall.S",
"arch-mips/bionic/vfork.S",

"arch-mips/string/mips_strlen.c",
],
rev6: {
srcs: [
"arch-mips/string/strlen.c",
],
exclude_srcs: [
"arch-mips/string/mips_strlen.c",
],
},
exclude_srcs: [
"bionic/strchr.cpp",
"bionic/strnlen.c",
],
},
mips64: {
srcs: [
"arch-mips/string/memcmp.c",
"arch-mips/string/memcpy.S",
"arch-mips/string/memcpy.c",
"arch-mips/string/memset.S",
"arch-mips/string/strcmp.S",
"arch-mips/string/strncmp.S",
"arch-mips/string/strlen.c",
"arch-mips/string/strnlen.c",
"arch-mips/string/strchr.c",
"arch-mips/string/strcpy.c",
"arch-mips/string/memchr.c",
"arch-mips/string/memmove.c",

"arch-mips64/bionic/__bionic_clone.S",
"arch-mips64/bionic/_exit_with_stack_teardown.S",
Expand All @@ -1079,6 +1101,10 @@ cc_library_static {
"arch-mips64/bionic/vfork.S",
"arch-mips64/bionic/stat.cpp",
],
exclude_srcs: [
"bionic/strchr.cpp",
"bionic/strnlen.c",
],
},

x86: {
Expand Down
122 changes: 32 additions & 90 deletions libc/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -4816,38 +4816,6 @@ Optimized by Bruce D. Evans.

-------------------------------------------------------------------

Copyright (c) 2010 MIPS Technologies, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
* Neither the name of MIPS Technologies Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"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 THE COPYRIGHT
OWNER OR CONTRIBUTORS 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) 2010 The NetBSD Foundation, Inc.
All rights reserved.

Expand Down Expand Up @@ -5344,35 +5312,6 @@ Copyright (c) 2012-2013, Linaro Limited

-------------------------------------------------------------------

Copyright (c) 2012-2015
MIPS Technologies, Inc., California.

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. Neither the name of the MIPS Technologies, Inc., nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``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 THE MIPS TECHNOLOGIES, INC. 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.

Expand Down Expand Up @@ -5586,35 +5525,6 @@ Copyright (c) 2013-2015, Linaro Limited

-------------------------------------------------------------------

Copyright (c) 2014
Imagination Technologies Limited.

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. Neither the name of the MIPS Technologies, Inc., nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY IMAGINATION TECHNOLOGIES LIMITED ``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 IMAGINATION TECHNOLOGIES LIMITED 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) 2014 Theo de Raadt <[email protected]>
Copyright (c) 2014 Bob Beck <[email protected]>

Expand Down Expand Up @@ -5750,6 +5660,38 @@ SUCH DAMAGE.

-------------------------------------------------------------------

Copyright (c) 2017 Imagination Technologies.

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
* Neither the name of Imagination Technologies nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"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 THE COPYRIGHT
OWNER OR CONTRIBUTORS 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)1999 Citrus Project,
All rights reserved.

Expand Down
Loading

0 comments on commit 9cb82a2

Please sign in to comment.