Commit graph

3671 commits

Author SHA1 Message Date
Christopher Ferris
04954a43b3 Break bionic implementations into arch versions.
Move arch specific code for arm, mips, x86 into separate
makefiles.
In addition, add different arm cpu versions of memcpy/memset.

Bug: 8005082

Merge from internal master (acdde8c1cf).

Change-Id: I04f3d0715104fab618e1abf7cf8f7eec9bec79df
2013-03-12 14:06:08 -07:00
Elliott Hughes
6b4c77f854 Merge "Use Elf32_Addr instead of unsigned in linker" 2013-03-12 17:24:04 +00:00
Kito Cheng
fa8c05dc00 Use Elf32_Addr instead of unsigned in linker
Change-Id: I52dcbb4b0ff0a4052e0ad7a9bbeb2df65c9d2f66
2013-03-12 10:19:14 -07:00
Elliott Hughes
53630c0e5b Merge "Cache the most-recently used timezone for mktime_tz and localtime_tz." 2013-03-12 01:28:36 +00:00
Elliott Hughes
4a05bef4c0 Cache the most-recently used timezone for mktime_tz and localtime_tz.
Normally, the C library implicitly caches your timezone by virtue
of the fact that the prehistoric API assumes a single timezone for
the entire process.

The unfortunate mktime_tz and localtime_tz extensions work around
this, but represent timezones as strings to their callers, so code
that makes heavy use of these needs a cache to be able to perform
acceptably until it can hopefully one day be rewritten to use
java.util.Calendar or icu4c.

Bug: 8270865
Change-Id: I92e3964e86dc33ceac925f819cc5e26ff4203f50
2013-03-11 17:17:02 -07:00
Elliott Hughes
4b032ee9b9 Merge "Let bionic use the correct definition of ssize_t." 2013-03-11 17:55:27 +00:00
Elliott Hughes
62c5cd0781 Merge "Upgrade to tzdata2013b." 2013-03-11 16:42:57 +00:00
Elliott Hughes
cdb27f239b Upgrade to tzdata2013b.
From the release notes:

  Changes affecting current and future time stamps:

    Haiti uses US daylight-saving rules this year, and presumably future years.
    This changes time stamps starting today.  (Thanks to Steffen Thorsen.)

    Paraguay will end DST on March 24 this year.
    (Thanks to Steffen Thorsen.)  For now, assume it's just this year.

    Morocco does not observe DST during Ramadan;
    try to predict Ramadan in Morocco as best we can.
    (Thanks to Erik Homoet for the heads-up.)

Change-Id: I98d5290ea5a1d9fb1eeddab1c9e72135dc9e4bd1
2013-03-11 09:41:45 -07:00
Elliott Hughes
b6e22482d4 Let bionic use the correct definition of ssize_t.
Bug: 8253769
Change-Id: I50c7cc20828fc089b83580e039ce9153a6c5a8cc
2013-03-08 15:28:52 -08:00
Elliott Hughes
809eed1ded Merge "Regenerate NOTICE files." 2013-03-07 19:57:17 +00:00
Elliott Hughes
0493a6f7be Regenerate NOTICE files.
Also clean up some obsolete cruft.

Change-Id: Iec3b36f6607f7a08b72de99294ed5b6cd910dd5f
2013-03-07 11:51:10 -08:00
Elliott Hughes
c9f8081425 Merge "Upgrade to current NetBSD popen/pclose." 2013-03-07 00:54:22 +00:00
Elliott Hughes
6b3f49a537 Upgrade to current NetBSD popen/pclose.
This gets us back to using vfork now our ARM vfork assembler stub is
fixed, and adds the missing thread safety for the 'pidlist'.

Bug: 5335385
Change-Id: Ib08bfa65b2cb9fa695717aae629ea14816bf988d
2013-03-06 16:20:55 -08:00
Brian Carlstrom
33031fed84 Merge "Fix typo of DT_NEEDED for DT_NULL" 2013-03-06 23:55:56 +00:00
Brian Carlstrom
2d4b9b7cff Fix typo of DT_NEEDED for DT_NULL
(cherry-pick of 138b205ea9efc117fe522c2d7191378023a6e2cd)

Change-Id: Ia895cb3018df55554627f1f61dcdfdada4a961ce
2013-03-06 15:50:30 -08:00
Elliott Hughes
db794197cc Merge "Fix debug malloc." 2013-03-06 23:13:01 +00:00
Elliott Hughes
642331b5dd Fix debug malloc.
This was broken by the change to use AT_RANDOM for the stack guards.

Bug: 7959813
Bug: 8330764
Change-Id: I791900092b72a9a900f16585237fa7ad82aaed9f
2013-03-06 15:03:53 -08:00
Elliott Hughes
0b4a85bf1e Merge "Fix TIMING/STATS/COUNT_PAGES dynamic linker build" 2013-03-06 17:25:51 +00:00
Kito Cheng
5e2492eb89 Fix TIMING/STATS/COUNT_PAGES dynamic linker build
Change-Id: I6432ac378816da253b83d1c7fb1d3fb64647b89e
2013-03-06 23:58:48 +08:00
Brian Carlstrom
20958207d5 Merge "Fix MIPS linker build" 2013-03-06 09:06:16 +00:00
Brian Carlstrom
43cc7f795b Fix MIPS linker build
(cherry-picked from 8c7d8c2057e303985f78eab96da747ddaa013c78)

Change-Id: Idcf62ab95f8fccbc2d7c3e771a4cfbe768a1555e
2013-03-06 01:05:08 -08:00
Elliott Hughes
c41dcad040 Merge "More linker cleanup." 2013-03-06 06:26:56 +00:00
Elliott Hughes
650be4e584 More linker cleanup.
Change-Id: I9fb3c7c0d4b4ffef0eeaf092d4e30ffe63a08671
2013-03-05 22:24:34 -08:00
Brian Carlstrom
036f909720 Merge "Minor linker cleanup, primarily to use Elf32_Dyn" 2013-03-06 01:01:23 +00:00
Brian Carlstrom
d4ee82dfa3 Minor linker cleanup, primarily to use Elf32_Dyn
Change-Id: Ifa9408e9859c6f79444715bed4808b7c13fdced5
2013-03-05 15:27:21 -08:00
Elliott Hughes
be21fe7a59 Merge "Upgrade to tzdata2013a." 2013-03-05 22:19:14 +00:00
Elliott Hughes
69af6e61e1 Upgrade to tzdata2013a.
From the release notes:

    Chile's 2013 rules, and we guess rules for 2014 and later, will be
    the same as 2012, namely Apr Sun>=23 03:00 UTC to Sep Sun>=2 04:00 UTC.
    (Thanks to Steffen Thorsen and Robert Elz.)

    New Zones Asia/Khandyga, Asia/Ust-Nera, Europe/Busingen.
    (Thanks to Tobias Conradi and Arthur David Olson.)

Change-Id: I351e04b3348420ad7df7c648963c235b534033d2
2013-03-05 14:00:38 -08:00
Ben Cheng
133d97e4b0 Merge "Add stack unwinding directives to memcpy." 2013-03-05 21:04:38 +00:00
Elliott Hughes
cf9a9604ad Merge "Switch to upstream-freebsd for the unmolested wchar code." 2013-03-05 20:13:33 +00:00
Elliott Hughes
eb93ebffba Switch to upstream-freebsd for the unmolested wchar code.
Change-Id: I87b4d76ff8da04109ae53638eec4f11629798960
2013-03-01 18:35:56 -08:00
Elliott Hughes
d392e044c7 Merge "Move realpath.c to upstream-freebsd." 2013-03-02 01:22:04 +00:00
Elliott Hughes
f0777843c0 Move realpath.c to upstream-freebsd.
This is actually a slightly newer upstream version than the one I
originally pulled. Hopefully now it's in upstream-freebsd it will
be easier to track upstream, though I still need to sit down and
write the necessary scripts at some point.

Bug: 5110679
Change-Id: I87e563f0f95aa8e68b45578e2a8f448bbf827a33
2013-03-01 17:11:39 -08:00
Ben Cheng
14283004f5 Add stack unwinding directives to memcpy.
Also include some Android specific header files.

Change-Id: Idbcbd43458ba945ca8c61bfbc04ea15fc0ae4e00
2013-03-01 14:56:04 -08:00
Ben Cheng
c5c6cb3f13 am 66273ac2: Merge "Adding strcmp tuned for Cortex-A15."
* commit '66273ac2b6b8c2042350204575bd290d96dea681':
  Adding strcmp tuned for Cortex-A15.
2013-03-01 10:24:58 -08:00
Ben Cheng
8f149da08d am b3b1ab62: Merge "Adding memcpy tuned for Cortex-A15."
* commit 'b3b1ab6213df15f99c9af3088cfe733428816fd3':
  Adding memcpy tuned for Cortex-A15.
2013-03-01 10:24:58 -08:00
Nick Kralevich
305a999589 am 8fa924e5: Merge "unistd.h: don\'t include sys/capability.h"
* commit '8fa924e5dff4588cca8586e0e727b9a544db7083':
  unistd.h: don't include sys/capability.h
2013-03-01 10:24:57 -08:00
Ben Cheng
66273ac2b6 Merge "Adding strcmp tuned for Cortex-A15." 2013-03-01 18:18:34 +00:00
Ben Cheng
b3b1ab6213 Merge "Adding memcpy tuned for Cortex-A15." 2013-03-01 18:18:05 +00:00
Nick Kralevich
8fa924e5df Merge "unistd.h: don't include sys/capability.h" 2013-03-01 18:14:47 +00:00
Nick Kralevich
6524d3cad7 unistd.h: don't include sys/capability.h
Don't pull in unnecessary header files. AFAIK, I've fixed all
the code which didn't include the correct header files.

Change-Id: If0b7bba74e77cb24a0cf9ce8968aa07400855e58
2013-03-01 10:10:55 -08:00
Greta Yorsh
eb149e954e Adding strcmp tuned for Cortex-A15.
The attached patch provides a new implementation of strcmp for ARM,
using LDRD instead of LDR whenever possible.

For older architectures that do not support LDRD, this implementation
uses the same algorithm as before.

Testing and benchmarking:
* Validation: successfully passes a test that compares different strings
of length 1-128 and offsets 0-8 from a word boundary. Checked on
qemu/A15/A9, ARM/Thumb mode, Big/Little Endian.
* Integration with gcc: no regression on qemu for arm-none-eabi --with-cpu
a15/a9 --with-mode arm/thumb.

Change-Id: I9e230e1b99dbdc9119b69ee858a89038c516a4ea
Signed-off-by: Vassilis Laganakos <vasileios.laganakos@arm.com>
2013-03-01 10:41:01 +00:00
Greta Yorsh
5b349fc22e Adding memcpy tuned for Cortex-A15.
The strategy for large block sizes is LDRD and STRD with offset addressing,
where the main loop copies 64 bytes in every iteration, (i.e., 8 calls to
LDRD and STRD pairs), interleaving load and stores (i.e., the pairs of LDRD
and STRD of the same data are consecutive instructions), and the writeback
of an updated address is a separate instruction, which allows us to write
back the accumulated update once per iteration.

This strategy is implemented in memcpy.S. In some configurations, a plain
version of memcpy (included from memcpy-stub.c) is used instead of the
optimized one.

Validation:
* Correctness: checked memcpy using a test harness for block sizes
ranging between 1 to 128, and source and destination buffers alignment
ranging in { 0,1,2,3,4,8,12 } bytes each.
* Performance: benchmarking on Cortex-A15 FPGA indicates that this strategy
is better for A15 than the strategy used by glibc and even slightly better
than using NEON. Benchmarking on Cortex-A9 bare metal and Linux shows
that the proposed strategy is reasonable: not as fast as the version of
memcpy from glibc (which is the best open source strategy for A9), but
comparable with csl and bionic.
* Integration with GCC: no regression for arm-none-eabi --with-cpu
cortex-a15 and cortex-a9.

Change-Id: Ied56354d8992c62ae3e02d582a2bd55585d814b9
Signed-off-by: Vassilis Laganakos <vasileios.laganakos@arm.com>
2013-03-01 10:40:50 +00:00
Elliott Hughes
7fe8229b49 am 9c1912c4: Merge "Avoid changing the C++ ABI with ssize_t."
* commit '9c1912c4bf5eb0edc07bfd333226c4e0b7a629eb':
  Avoid changing the C++ ABI with ssize_t.
2013-02-28 11:43:11 -08:00
Elliott Hughes
9c1912c4bf Merge "Avoid changing the C++ ABI with ssize_t." 2013-02-28 19:28:53 +00:00
Elliott Hughes
e255642dc1 Avoid changing the C++ ABI with ssize_t.
Bug: 8253769
Change-Id: Ia325003ed6e59da553e2bdde7c43515bc191b8ba
2013-02-28 10:51:31 -08:00
Nick Kralevich
58b997c812 am f5f906c1: Merge "libc: create sys/capability.h"
* commit 'f5f906c184677b8295523231cfeead9ed94661ad':
  libc: create sys/capability.h
2013-02-26 13:50:03 -08:00
Nick Kralevich
f5f906c184 Merge "libc: create sys/capability.h" 2013-02-26 21:38:11 +00:00
Nick Kralevich
7c0dd555c0 libc: create sys/capability.h
Per "man capset", sys/capability.h is the appropriate header file
for the capget / capset definition, not unistd.h. Fixed.

As a short term hack, continue to include sys/capability.h in
unistd.h, until we can fix all the code which uses capget / capset.

Change-Id: I6e7cf55955d761ca785a14c5e4b7a44125d8fc15
2013-02-26 13:27:15 -08:00
Elliott Hughes
406968b244 am c0e9ddd0: Merge "Reimplement scandir(3)."
* commit 'c0e9ddd002f6084c29c26236d741d64d01713c15':
  Reimplement scandir(3).
2013-02-25 14:54:54 -08:00
Elliott Hughes
c0e9ddd002 Merge "Reimplement scandir(3)." 2013-02-25 22:43:28 +00:00