libm: Add a proper sincos() implementation

Add a proper sincos() implementation that unifies the common
calculations for sin and cos instead of running them twice.

This should cause a speedup even in code not using that
(fairly uncommon) function because gcc can optimize separate
sin() and cos() calls into sincos() calls.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
bionic: Add ARMv7 optimized string handling routines

Add ARMv7 - and especially Cortex-A9 - optimized string handling
routines based on the versions found in the cortex-strings library.

Change-Id: I497075bea5b82aef8989625bdec512029676fe7f
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
bionic: Add workarounds for current compilers

With current compilers, we're getting "this function cannot be inlined"
errors on vsnprintf and strlcpy because the always_inline attribute is
set.

Before marking this a "fix" instead of a "workaround", we should figure
out why the functions can't be inlined.

Change-Id: Id6c5464defafb3f9044c102d32a57e70d760b05d
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Revert "FORTIFY_SOURCE: fortify strrchr"

This reverts commit f9c4e0a57ce9b5a96a7bccdb690bf8ae4084af65.

Revert "FORTIFY_SOURCE: fortify strchr"

This reverts commit 837ff616a8b7458f2d66bffcfec5b43c5f9226d4.
libc: extend ARCH_ARM_USE_NON_NEON_MEMCPY to linaro

Change-Id: I8f8e000cc56928ba77d21c6066a11cb16ca5b7af
Add optimized version of memcpy for Cortex A9

Adds new code to memcpy function, optimized for Cortex A9.
Adds new ARM-only loop, for operations where source and
destination are aligned.

Copyright (C) ST-Ericsson SA 2010

Modified neon implementation to fit Cortex A9 cache line size,
for those running 32 bytes L2 cache line size.
Also split the implementation in aligned and unaligned access,
for those that allows unaligned memory access with Neon.
For totally aligned operations, arm-only code is used.

Change-Id: I95ebf6164cd6486b12a7e3e98e369db21e7e18d2
Author: Henrik Smiding henrik.smiding@stericsson.com for ST-Ericsson.
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>

bionic: Make use of new memcpy, tweak settings

The new memcpy() is slightly faster than the cortex-strings version,
and fixes the Galaxy Nexus camera issue.

Change-Id: Ie65d14992a399e9bc2709a3d710d52b5b1a62e87
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Merge remote-tracking branch 'cm/cm-10.1' into jellybean
Merge remote-tracking branch 'cm/cm-10.1' into jellybean
Initial commit
Merge remote-tracking branch 'pb/jellybean' into HEAD
Linaro string handling routines: Give a option to use the older method

of memcpy for device compatibility testing.  The newer method of memcpy
provides a nice boost in performance.
Use export USE_OLD_MEMCPY=true
to use the older method of memcpy if you run into any issues.
For ARM deivces that are not ARMV7A the newer method of memcpy will
be used either way.

Signed-off-by:  Paul Beeler <sparksco@gmail.com>

Include bzero.S in all variants for ARMV7A/NON_NEON_MEMCPY devices.
This fixes the game plague on the newer method of memcpy which was
previously broken.  Tested on grouper.  Might still be broken on
devices that use neon memcpy.

TODO *//More Testing

Reported-by: @xda user matthewdavis
Signed-off-by:  Paul Beeler <sparksco@gmail.com>
Bionic/libm: fast neon pow() for small x,y

Signed-off-by:  Paul Beeler <sparksco@gmail.com>

Add a fast neon version of pow() suitable for relatively small
positive x and y (between 0 and 4).  Run the standard
implementation in all other cases.  Gives approximately 60%
performance improvement to AnTuTu FPU score.

Change-Id: I9234d37eaa6a815d1e619375f5b049c4ec88f557

Fixup e_pow
Add optimized version of memset for Cortex A9

Adds new code to function memset, optimized for Cortex A9.

Copyright (C) ST-Ericsson SA 2010

Added neon implementation

Author: Henrik Smiding henrik.smiding@stericsson.com for ST-Ericsson.

Change-Id: Id3c87767953439269040e15bd30a27aba709aef6
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
Use the new memset
Fixup string handling routines for QCOM devices.
Revert "Linaro string handling routines: Give a option to use the older method"

This reverts commit 6598b463366e136e7b1b802f71c2fb69ddc24e31.
Merge tag 'android-4.2.2_r1' of https://android.googlesource.com/platform/bionic into sm-jb-mr1

Android 4.2.2 release 1
reintroduce use of e_pow.S
libc: Add ARMV7 optimized memchr()

 * From Cortex-Strings via Linaro
 * Performance is 10x over the default version on microbenchmarks

Change-Id: I14c1b5ccbd0078219a1dbf9f02fb1591b3a2403c

Conflicts:
	libc/Android.mk
Bionic/libm: Fix the mismatch ENTRY/END in e_pow.S

Change-Id: Ibe53e7863f462a63029d1154f317256c00814c6d