derp

Move bzero to the right ifdef fixes plauge and photoshop touch

Change-Id: Ib1d12f54f41b662821880963758bbe7003b48570
Fix perf regression on Cortex A15 by optimized memcpy for Cortex A9

The new Cortex A9 optimized memcpy included an arm-only version that is
slower than the current neon Cortex A15. This arm-only version was used
when the dst was aligned to an 8 byte boundary, otherwise, the original
neon only version was used. This change modifies the code so it always
uses the neon only version for the Cortex A15. It also fixes the use of
a define removed with the previous optimization.

Change-Id: I971527568a177218cd8b76a8bd160aaaf6ea1e42
Fix Build Blame BMC and Nocoast!

Signed-off-by: Stevespear426 <stephen.k.spear@gmail.com>

Conflicts:
	libm/src/e_pow.c

Change-Id: Idd66a0db13168d8704e85e2c15a71b16e0716e6e
Merge remote-tracking branch 'aosp/jb-mr1.1-release' into jellybean
libm: Enable fast NEON pow() for supported targets

Change-Id: Iabda43e3c8462074a9a46c8f496eac903ea17084
libc: Add ARCH_ARM flags to enable new optimizations

Change-Id: I2a436f0730201509c6e53da7447835653d75f7f5
libm: Check for NEON support when choosing fast pow()

Change-Id: If981f6d00325fd599e8fa975782adcd9016b5e55
libc: Enable the fast memmove for NEON targets

 * The CodeAurora version of memmove provides roughly 20x the throughput
   of the default version for all tested platforms. Enable it.

Change-Id: Ia9740f6b38a72c0bd6a6818c96d73e2c23bb5979
libc: Add optimized memcpy for Cortex-A15

 * This version is from Newlib and is written/recommended by ARM as the best
   routine for Cortex-A15.

Change-Id: Ie9c2817dabda929ae4efaada5f6d467d53551ba4

Conflicts:
	libc/Android.mk
libc: Remove Scorpion memmove() routine

 * This code is slower than the new implementation under every
   circumstance on Scorpion devices. Remove it and standardize on one
   implementation.
 * Also remove "optimized" memmove_words, which was just a pointer to
   memmove. The performance was identical to the C version on Krait, and
   has regressions on other platforms. This function is only used for
   System.arraycopy in Dalvik.

Change-Id: I42d06fbd7c56d9874b80a0e768dbadf0fa5025a4

Conflicts:
	libc/Android.mk
msm: vidc: Add the support for MPEG-2 extension and user data

Update msm vidc header to match the new qcom/media branch

Change-Id: I444982ba7fb77f1ff3b71f4f09a4c436ff966859
libc: Add optimized strcmp

This version is from Newlib.

Original comment of the author:

The attached patch provides a new implementation of strcmp for ARM, using
LDRD instead of LDR whenever possible.

For older architectures that do not support LDRD, this implementation uses
the same algorithm as before.

This patch replaces strcmp.c with strcmp.S. The huge inline assembly from
strcmp.c was converted into plain assembly and included in strcmp.S under
the appropriate predefines.

Testing and benchmarking:
* Validation: successfully passes a test that compares different strings of
length 1-128 and offsets 0-8 from a word boundary. Checked on qemu/A15/A9,
ARM/Thumb mode, Big/Little Endian. This test is also added to newlib
testsuite as part of this patch.
* Integration with gcc: no regression on qemu for arm-none-eabi --with-cpu
a15/a9 --with-mode arm/thumb.
* Performance (relative to the current strcmp in newlib, only in ARM mode):
On Dhrystone, the new implementation (ldrd) is 22% faster on Cortex-A15
FPGA, and 16% on Cortex-A9 VE2.
On synthetic benchmarks, which measure the average number of cycles for
strcmp on strings of length 4-128K and offsets 0,1,2,3,4,8 from a word
boundary, where the strings are equal, the new implementation is three times
faster for long strings, when the input strings have the same offset from a
word boundary, and up to 30% faster in other cases, on both A15 FPGA and A9
VE2.

Change-Id: I7a39770cad48c2ecc6b6d375165652cd4f0c0619
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>

Conflicts:
	tests/string_benchmark.cpp
libc: Fix invalid macro

Change-Id: Ia0c1d81cecb2f05834842bf3e6a3cc9cb06e00c9
build fix

Change-Id: I3d56083a729702d811f4fef0945d704134d336b1
Derp

Change-Id: If38946fff36d00c94d73d734004e2a73d7ed685c
Adding strcmp tuned for Cortex-A15.

The attached patch provides a new implementation of strcmp for ARM,
using LDRD instead of LDR whenever possible.

For older architectures that do not support LDRD, this implementation
uses the same algorithm as before.

Testing and benchmarking:
* Validation: successfully passes a test that compares different strings
of length 1-128 and offsets 0-8 from a word boundary. Checked on
qemu/A15/A9, ARM/Thumb mode, Big/Little Endian.
* Integration with gcc: no regression on qemu for arm-none-eabi --with-cpu
a15/a9 --with-mode arm/thumb.

Change-Id: I9e230e1b99dbdc9119b69ee858a89038c516a4ea
Signed-off-by: Vassilis Laganakos <vasileios.laganakos@arm.com>
Adding memcpy tuned for Cortex-A15.

The strategy for large block sizes is LDRD and STRD with offset addressing,
where the main loop copies 64 bytes in every iteration, (i.e., 8 calls to
LDRD and STRD pairs), interleaving load and stores (i.e., the pairs of LDRD
and STRD of the same data are consecutive instructions), and the writeback
of an updated address is a separate instruction, which allows us to write
back the accumulated update once per iteration.

This strategy is implemented in memcpy.S. In some configurations, a plain
version of memcpy (included from memcpy-stub.c) is used instead of the
optimized one.

Validation:
* Correctness: checked memcpy using a test harness for block sizes
ranging between 1 to 128, and source and destination buffers alignment
ranging in { 0,1,2,3,4,8,12 } bytes each.
* Performance: benchmarking on Cortex-A15 FPGA indicates that this strategy
is better for A15 than the strategy used by glibc and even slightly better
than using NEON. Benchmarking on Cortex-A9 bare metal and Linux shows
that the proposed strategy is reasonable: not as fast as the version of
memcpy from glibc (which is the best open source strategy for A9), but
comparable with csl and bionic.
* Integration with GCC: no regression for arm-none-eabi --with-cpu
cortex-a15 and cortex-a9.

Change-Id: Ied56354d8992c62ae3e02d582a2bd55585d814b9
Signed-off-by: Vassilis Laganakos <vasileios.laganakos@arm.com>
Add stack unwinding directives to memcpy.

Also include some Android specific header files.

Change-Id: Idbcbd43458ba945ca8c61bfbc04ea15fc0ae4e00
do not build or enable pthread debug

Conflicts:
	libc/Android.mk

Change-Id: Ia5c15163b35d7395e1335471e90728077c39e2a1
libm: optimistic pow calling

Call optimized pow optimistically and revert to full range
implementation if we detect an out-of-range input.

Change-Id: I02657c2a254e9796e795a8fcc6ae43e24c9d37b9