bionic: Fix aliasing violations

This makes bionic compile with compilers enforcing
strict adherence to aliasing rules (e.g. gcc 4.6+
with -Wstrict-aliasing=2 -Werror=strict-aliasing).

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
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: Amit Pundir <amit.pundir@linaro.org>
bionic:Add new header files for graphics

The header files "hwmem.h" and "b2r2_blt.h" are needed
by the ST-Ericsson graphics implementation.

Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
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.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
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.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Make use of new memcpy, tweak settings

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
bionic: Add Cortex-A15 optimized version of memcpy

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add the memcpy implementation from cortex-strings -- faster than
the current implementation on both A9 and A15.

To be investigated: Breaks saving pictures from the camera in
Galaxy Nexus builds

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
remove typos and multiple declarations

Change-Id: Iff32874c2f801519b57f19a3cc1c2c76b7c7f6fa
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Revert: 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.

Change-Id: I51aa2c1c05ba792c19810d01b2de4ee1d1188dcb
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
revert cortex string optimization routines for now

Change-Id: I410bdef93efd51277b494bde0300a01c49e926f7
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Merge branch 'linaro43' into HEAD

Conflicts:
	libc/Android.mk
	libc/include/netinet/in6.h
	libc/netbsd/net/getaddrinfo.c

Change-Id: I66e84c051c14335f76cc9b84c168bf00cd4243e5