bionic/libm: fix x86 support regression

Support for x86 and MIPS broke due to an incorrect merge conflict
resolution in commit 5015fe9.  Commit d348cd5 repaired MIPS support
but not x86.  This commit repairs the incorrect merge conflict
resolution, bringing back support for x86 (and potential future
architectures).

Change-Id: I8994d653e5a2f79c9bfacb1c87159c8cdd4f81a7
bionic/libc: fix getsid() syscall number for mips

According to libc/kernel/arch-mips/asm/unistd.h, the syscall number
for mips is 151, not 147.

Only bionic/libc/SYSCALLS.TXT was manually edited;
bionic/libc/include/sys/linux-syscalls.h was generated from
SYSCALLS.TXT by running bionic/libc/tools/gensyscalls.py.

Change-Id: Ia14da35acbc36aafd44a059146a37271bd358ae2
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.

Conflicts:
	libc/Android.mk

Change-Id: I497075bea5b82aef8989625bdec512029676fe7f
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
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.

Conflicts:
	libc/Android.mk

Change-Id: Ie65d14992a399e9bc2709a3d710d52b5b1a62e87
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Add strchr_wrapper.c to add __strchr_chk.

Needed by FORTIFY_SOURCE: fortify strchr

Change-Id: I485d8c99ecbb638ccb0b8c44fa0acfebf9d1b22c
Signed-off-by: Evan McClain <aeroevan@gmail.com>
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>
libm: Enable fast pow(), memmove, memcmp, and memset for all NEON-capable devices

Change-Id: I2d9008f220bc634579628407a56d8c04816a9578
Fixup broken cherry-pick.

Change-Id: If4a3b702ae2aad7914da7d055d539db49ac1058e
Signed-off-by: Evan McClain <aeroevan@gmail.com>