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
Bionic/libm: Add precision-correct de-serialize sin/cos

Modify sin/cos to improve performance while retaining bit-for-bit
accuracy with existing algorithm.

Change-Id: Icbd6d66fb1c0ceb53f43fed6541e0c89cc6e7a63
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>
[MIPS] fix bionic libm on MIPS support

the s_sin.c and s_cos.c are needed to be added to compile MIPS libm

Change-Id: I48e2f70cb8fb5a63c6022129c3ca1c2699d058e6
Signed-off-by: Rocky Zhang <zhangyan.hit@gmail.com>
bionic: Add memmove_words.c for MIPS build

memove_words.c is missed for MIPS bionic here

Change-Id: If8d9edc9be5e4544e5541036c416467db4fb3ede
Signed-off-by: Rocky Zhang <zhangyan.hit@gmail.com>
Merge remote-tracking branch 'cm/cm-10.1' into jellybean
Revert "libm: Add a proper sincos() implementation"

This reverts commit 1eb9e991124100dd12d3f650bbccf967ee8ec3db.
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>
libm:  fix KRAIT_BIONIC_OPTIMIZATION

Fix krait mem opts again