libc: krait: Use performance version of bcopy and memmove

Ported from CM10.2.

bionic-benchmarks on mako:
before:
                     iterations      ns/op
BM_string_memmove/8    50000000         32   243.54 MiB/s
BM_string_memmove/64   20000000        143   446.41 MiB/s
BM_string_memmove/512    2000000        885   578.14 MiB/s
BM_string_memmove/1K    1000000       1733   590.55 MiB/s
BM_string_memmove/8K     200000      13618   601.54 MiB/s
BM_string_memmove/16K     100000      27276   600.66 MiB/s
BM_string_memmove/32K      50000      59115   554.30 MiB/s
BM_string_memmove/64K      10000     118162   554.63 MiB/s

after:
                     iterations      ns/op
BM_string_memmove/8    50000000         20   381.94 MiB/s
BM_string_memmove/64  100000000         17  3636.07 MiB/s
BM_string_memmove/512   50000000         50 10116.80 MiB/s
BM_string_memmove/1K   20000000         98 10429.23 MiB/s
BM_string_memmove/8K    2000000        876  9346.43 MiB/s
BM_string_memmove/16K    1000000       1836  8923.09 MiB/s
BM_string_memmove/32K     500000       4392  7459.79 MiB/s
BM_string_memmove/64K     200000       8562  7653.85 MiB/s

Change-Id: Id64913a71857d9cfdf6bd1bbe2c66cfc49d72748

Conflicts:
	libc/arch-arm/krait/bionic/memmove.S
	libc/arch-arm/krait/krait.mk
Fix build issues with clang 3.4

clang 3.4 (just like gcc) implements _Unwind_GetIP - use Bionic's
implementation only if older clang versions are used.

Don't set incorrect values for WCHAR_MIN and WCHAR_MAX when using clang
in c++11 mode (c++11 has a builtin wchar_t that happens to be unsigned
in clang). Signed WCHAR_MIN and WCHAR_MAX defines in clang++ -std=c++11
cause anything using stlport to fail.

Change-Id: I46ed08b873f34e01c5e66aa8d91c71478bfcc25d
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:
	libc/bionic/debug_stacktrace.cpp
[DO NOT SUBMIT] Use assembly wrapper for three __aeabi mem routines.

__aeabi_memcpy
__aeabi_memmove
__aeabi_memset

Otherwise Clang will generate infinite recursive calls to itself.

BUG: 2216385
Change-Id: I7a2f3afdb191d32570d17b4a0c79804ed8ec9f91
Add strcmp/memcmp testing.

Bug: 9797008
Change-Id: I11b1da060d29f7dacbb53f20a3e2082395b5bd8a

Conflicts:
	tests/buffer_tests.cpp
	tests/buffer_tests.h
	tests/string_test.cpp
bionic: move benchmarks out of tests directory

Change-Id: I4d054965198af22c9a9c821d1bc53f4e9ea01248
Remove harmful attempts to be helpful in pthread_mutex functions.

Most callers won't check for EINVAL, so it's best to fail early.
GCC takes the nonnull attribute as a guarantee that an argument
won't be NULL, so these hacks were already ineffective, which is
how we found that at least one commercial game was using NULL
as if it's a mutex, but actually getting no-op behavior.

Bug: 11971278
Change-Id: I89646e043d931778805a8b692e07a34d076ee6bf
Move bionic over to GCC's 'warning' attribute.

This is a better solution than the old __warn_references because it's
a compile-time rather than link-time warning, it doesn't rely on something
that doesn't appear to be supported by gold (which is why you only used
to see these warnings on mips builds), and the errors refer to the exact
call site(s) rather than just telling you which object file contains a
reference to the bad function.

This is primarily so we can build bionic for aarch64; building libc.so
caused these warnings to fire (because link time is the wrong time) and
warnings are errors.

Change-Id: I5df9281b2a9d98b164a9b11807ea9472c6faa9e3
-03
Properly detect timeout in pthread_mutex_lock_timeout_np_impl

Previously we were checking against a positive errno which
would not be returned from a system call.

Change-Id: I8e3a36f6fbf5ccc2191a152a1def37e2d6f93124
Small style cleanup.

Change-Id: Ib45a4a2296232968296f9bd7cc3592ba46fd412d

Conflicts:
	libc/bionic/pthread_cond.cpp
Revert "Try to fix build error"

This reverts commit 1d515a0c4f0f4bb02d5db940d7fbccba82d7a816.
We actually have modfl.

Change-Id: I22bb4d14f99a418819f2941c2dfec49094807c5f

Conflicts:
	libm/fake_long_double.c