642182341018b282148280a7bdb771493e15bd7d |
|
26-Aug-2014 |
Elliott Hughes <enh@google.com> |
Fix pthread_getattr_np for the main thread. On most architectures the kernel subtracts a random offset to the stack pointer in create_elf_tables by calling arch_align_stack before writing the auxval table and so on. On all but x86 this doesn't cause a problem because the random offset is less than a page, but on x86 it's up to two pages. This means that our old technique of rounding the stack pointer doesn't work. (Our old implementation of that technique was wrong too.) It's also incorrect to assume that the main thread's stack base and size are constant. Likewise to assume that the main thread has a guard page. The main thread is not like other threads. This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK) whenever we're asked. Bug: 17111575 Signed-off-by: Fengwei Yin <fengwei.yin@intel.com> (cherry picked from commit 57b7a6110e7e8b446fc23cce4765ff625ee0a105) Change-Id: I87e679ee1c0db8092f2d1221c8e7c1461545c5a4
|
5386a741e77bfff4e72ca6861fdd3fe2208452ce |
|
05-Aug-2014 |
Dan Albert <danalbert@google.com> |
Revert "Replaces vfork() implementation with fork()" We're getting cold feet on this one... let's put it back. This reverts commit 210331d9762037afb9b5ed8413079c6f65872df9. Change-Id: I6b0d3c2b1dbf7f1dc9566979a91b7504c2189269 (cherry picked from commit 6a918870bab1a55a5f57dd7954abd9a8a27c1bc2)
|
8c20c13100d159ff505af9e6e19cab30f368a074 |
|
11-Jul-2014 |
Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> |
Add optimized memchr implementation from newlib Add NEON optimized memchr adapted from newlib Change-Id: I91b2fafa243e4ab35fa56bb6171d48433c947cfd Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
|
753eb7f07e7736ba3bd73b2653cbfb8863da2278 |
|
28-Jun-2014 |
Christopher Ferris <cferris@google.com> |
Add optimized stpcpy. Change-Id: Ifed38f92a54fef4488fd0ed26a1569059a054574
|
77561bfe0b83b32d5c5bfc0c97bacae9f4204b34 |
|
27-Jun-2014 |
Christopher Ferris <cferris@google.com> |
Add optimized 64 bit strcpy. Change-Id: I4ac12735a53c3ae9336b148ce694fe6c63613139
|
12c0274d9cdab4469bcdac865ad40b6e76525df7 |
|
27-Jun-2014 |
Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> |
Add optimized neon strchr implementation based on newlib Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Change-Id: I276ff0f879e733a1115456247e1342b9c5a09015
|
0ef7a8fd31a7ee9571c54c17e1f42cba4cfb44ec |
|
17-Mar-2014 |
Shu Zhang <chazhang@nvidia.com> |
add 64-bit bionic implementation for denver arch Add 64-bit bionic implementation for denver. memcpy/memset are denver-specific optimized. Use generic version of other routines. Change-Id: I44a830e07b82b2986001d73d1540b4080aaa839b
|
24614b4729a4c8665193f5793b93019b37f779b1 |
|
13-Jun-2014 |
Elliott Hughes <enh@google.com> |
Remove __memcmp16 from bionic. Change-Id: I2486d667d96c8900dd368d855f37c1327161efb7
|
210331d9762037afb9b5ed8413079c6f65872df9 |
|
06-Jun-2014 |
Dan Albert <danalbert@google.com> |
Replaces vfork() implementation with fork() vfork() was removed from POSIX 2008, so this replaces its implementation with a call to fork(). Bug: 13935372 Change-Id: I6d99ac9e52a2efc5ee9bda1cab908774b830cedc
|
40fca0f08b1eb87e283d6f634d9759ed3161f517 |
|
04-Jun-2014 |
Dan Albert <danalbert@google.com> |
Removes index() from bionic. This function has been removed from POSIX. Unfortunately, we can't leave #define index(a, b) strchr((a), (b)) in its place because defining a preprocessor macro for index() breaks a whole lot of code. Bug: 13935372 Change-Id: Ifda348acde06da61c12e7ee2f8fe6950a3174dd1
|
62d92e1610080cad16342f87a7fb46d8388ee4bb |
|
19-May-2014 |
Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> |
Add Aarch64 optimized bzero based on memset Change-Id: I62cf25bfe23b9d811e00af7307bbd19d89937792 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
|
b30aff405a220495941f1673b0a5e66c4fa8b84c |
|
28-May-2014 |
Elliott Hughes <enh@google.com> |
Revert "Revert "Lose the hand-written futex assembler."" The problem with the original patch was that using syscall(3) means that errno can be set, but pthread_create(3) was abusing the TLS errno slot as a pthread_mutex_t for the thread startup handshake. There was also a mistake in the check for syscall failures --- it should have checked against -1 instead of 0 (not just because that's the default idiom, but also here because futex(2) can legitimately return values > 0). This patch stops abusing the TLS errno slot and adds a pthread_mutex_t to pthread_internal_t instead. (Note that for LP64 sizeof(pthread_mutex_t) > sizeof(uintptr_t), so we could potentially clobber other TLS slots too.) I've also rewritten the LP32 compatibility stubs to directly reuse the code from the .h file. This reverts commit 75c55ff84ebfa686c7ae2cc8ee431c6a33bd46b4. Bug: 15195455 Change-Id: I6ffb13e5cf6a35d8f59f692d94192aae9ab4593d
|
75c55ff84ebfa686c7ae2cc8ee431c6a33bd46b4 |
|
28-May-2014 |
Narayan Kamath <narayan@google.com> |
Revert "Lose the hand-written futex assembler." This reverts commit ced906c849704f379d7191822f6d74993d4fa296. Causes issues on art / dalvik due to a broken return value check and other undiagnosed issues. bug: 15195455 Change-Id: I5d6bbb389ecefb0e33a5237421a9d56d32a9317c
|
6f2bde344123d8503cd60f3ecd3420f39aa24eb9 |
|
23-May-2014 |
Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> |
Add optimized AArch64 versions of bcopy and wmemmove based on memmove Add optimized versions of bcopy and wmemmove for AArch64 based on the memmove implementation Change-Id: I82fbe8a7221ce224c567ffcfed7a94a53640fca8 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
|
fd0ce866ce46ed62aa17dc2959a085cb3bf5755d |
|
24-May-2014 |
Christopher Ferris <cferris@google.com> |
Revert "Add optimized AArch64 versions of bcopy and wmemmove based on memmove" This reverts commit 8167dd7cb98e87ffe9b40e4993c330b244ca2234. For some reason I thought the bcopy change was bzero. The bcopy code doesn't pass our tests, so reverting until I can figure out what's wrong. Change-Id: Id89fe959ea5105cd58dff6bba8d91a30cc4bcb07
|
8167dd7cb98e87ffe9b40e4993c330b244ca2234 |
|
23-May-2014 |
Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> |
Add optimized AArch64 versions of bcopy and wmemmove based on memmove Add optimized versions of bcopy and wmemmove for AArch64 based on the memmove implementation Change-Id: Ie43d0ff4f8ec4edba5b4fb5ccacd941f81ac6557 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
|
ced906c849704f379d7191822f6d74993d4fa296 |
|
23-May-2014 |
Elliott Hughes <enh@google.com> |
Lose the hand-written futex assembler. Also stop exporting 'futex'. Bug: 12250341 Change-Id: Icc4fa4296cd04dfe0d1061822c69e2eb40c3433a
|
5a92284167ffba6d45210ef6889fa7d255c15d4f |
|
24-Apr-2014 |
Varvara Rainchik <varvara.rainchik@intel.com> |
Add 32-bit Silvermont-optimized string/memory functions. Add following functions: bcopy, memcpy, memmove, memset, bzero, memcmp, wmemcmp, strlen, strcpy, strncpy, stpcpy, stpncpy. Create new directories inside arch-x86 to specify architecture: atom, silvermont and generic (non atom or silvermont architectures are treated like generic). Due to introducing optimized versions of stpcpy and stpncpy, c-implementations of these functions are moved from common for architectures makefile to arm and mips specific makefiles. Change-Id: I990f8061c3e9bca1f154119303da9e781c5d086e Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
|
2146d142b23b830ad94f8479ce5abeaa15820e7d |
|
02-May-2014 |
Christopher Ferris <cferris@google.com> |
Use larger neon instructions for moving data. Included is a new target generic-neon that will use neon instructions on 64 bit platforms where appropriate. Change-Id: Iaf71b768780aa9240a24539cd87666ca9298e4c6
|
5363a45f2b6d4eeb054710d0886bbadea8a15273 |
|
08-Apr-2014 |
Elliott Hughes <enh@google.com> |
Clean up localeconv(3). The OpenBSD doesn't support C99, and the extent to which we support locales is trivial, so just do it ourselves. Change-Id: If0a06e627ecc593f7b8ea3e9389365782e49b00e
|
50282f72bb9be6b49212a3978faec70786e9f97f |
|
25-Mar-2014 |
Pavel Chupin <pavel.v.chupin@intel.com> |
Add lconv declaration and localeconv(3) lconv is taken from ndk/sources/android/support/include/locale.h and matches bsd/glibc upstream. Keep old declaration for 32-bits for compatibility. localeconv.c and deps are taken from openbsd upstream. Changed strtod.c accordingly. Change-Id: I9fcc4d15f5674d192950d80edf26f36006cd31b4 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
|
7e4fa560999d07064d219a16ebb50d3691dd1b63 |
|
05-Mar-2014 |
Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> |
Add ARMv8 optimized string handling functions based on cortex-strings This adds ARMv8 optimized string handling functions to Bionic. The implementations live in a generic/ directory because there will likely be more CPU specific versions (e.g. Cortex-A53 vs. Cortex-A57) later. These implementations are 50%+ faster on current v8 models. Change-Id: If3adc54a284d9519459b0d4d4390f0cd6ded8786 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
|
b6208836cb9d3254a5e2046a71ac4ec30a0efdf5 |
|
26-Feb-2014 |
Elliott Hughes <enh@google.com> |
Fix LP64 builds after OpenBSD string changes. Change-Id: I07202f6484e716d153d0387fcfc023e119438251
|
53e43292aac91bf62995788cd5ca2ceb7caea283 |
|
25-Feb-2014 |
Elliott Hughes <enh@google.com> |
More OpenBSD cleanup (primarily string). This patch removes the string/ and wchar/ directories. Change-Id: Ia489904bc67047e4bc79acb1f3eec21aa3fe5f0d
|
6e39ba73bfd9504762e8798fd6b293f11d5fdf7e |
|
20-Feb-2014 |
Elliott Hughes <enh@google.com> |
Stop advertising an arm32-specific hack like it's a build system feature. Change-Id: I3a830b4a3516b6eb8e4f8e6e6b122a22a2e341df
|
f25d677147ae55a1f3b6ef7fa3ee27921792813f |
|
24-Jan-2014 |
Ying Wang <wangying@google.com> |
Reconfig libc's Android.mk to build for multilib 1. Moved arch-specific setup to their own files: - <arch>/<arch>.mk, arch-specific configs. Variables in those config end with the arch name. - removed the extra complexity introduced by function libc-add-cpu-variant-src, which seems to be not very useful these days. 2. Separated out the crt object files generation rules and set up the rules for both TARGET_ARCH and TARGET_2ND_ARCH. 3. Build all the libraries for both TARGET_ARCH and TARGET_2ND_ARCH, with the arch-specific LOCAL_ variables. Bug: 11654773 Change-Id: I9c2d85db0affa49199d182236d2210060a321421
|
a6ecba4d233d7b769a05ee81ae908c9105352624 |
|
11-Feb-2014 |
Elliott Hughes <enh@google.com> |
Clean up cacheflush. No cacheflush for LP64; use the GCC builtin instead. Clean up the 32-bit MIPS implementation now we no longer need to worry about old versions of GCC. Bug: 12924756 Change-Id: Ie23955b3ec194e226c4b2bce35b11d5e061f4753
|
0266ae5f884d72da58f33a072e865ba131234a5e |
|
11-Feb-2014 |
Elliott Hughes <enh@google.com> |
Switch <elf.h> over to linux uapi under the covers. Remove the linker's reliance on BSD cruft and use the glibc-style ElfW macro. (Other code too, but the linker contains the majority of the code that needs to work for Elf32 and Elf64.) All platforms need dl_iterate_phdr_static, so it doesn't make sense to have that part of the per-architecture configuration. Bug: 12476126 Change-Id: I1d7f918f1303a392794a6cd8b3512ff56bd6e487
|
d1973ca51325393f304e82a4d79874f33e54ac16 |
|
22-Jan-2014 |
Colin Cross <ccross@android.com> |
bionic: rename aarch64 target to arm64 Rename aarch64 build targets to arm64. The gcc toolchain is still aarch64. Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
|