fix compile

Change-Id: I0b4ab1d110eab373e4bc8df1c0f0fa79c625a19c

libc: Add Scorpion-optimized memcpy and memset

 * Optimized routines from Qualcomm for msm8660 class SoCs
 * Enable with TARGET_CPU_VARIANT := scorpion

Change-Id: I01d0f22efba5a418ddd20fca0d0c570d855e0f6f

Conflicts:
	libc/arch-arm/scorpion/scorpion.mk

libc: Use the fast strlen on Scorpion too

Change-Id: I9ba50a469de27269adc008c2a96767830ad6b70b

libc: krait: Use performance version of bcopy and memmove

Change-Id: I587085aeb0c30ceccaa3f420594a194b129632b5

Conflicts:
	libc/Android.mk
	libc/arch-arm/generic/generic.mk
	libc/arch-arm/krait/krait.mk

libc: Add NEON optimized memmove

ported from cm10.1

bionic-benchmarks on cortex-a9
generic:
BM_string_memmove/8    50000000         67   119.35 MiB/s
BM_string_memmove/64   10000000        175   364.59 MiB/s
BM_string_memmove/512   1000000       1078   474.86 MiB/s
BM_string_memmove/1K    1000000       2072   494.20 MiB/s
BM_string_memmove/8K     100000      16400   499.50 MiB/s
BM_string_memmove/16K     50000      32293   507.35 MiB/s
BM_string_memmove/32K     50000      66585   492.12 MiB/s
BM_string_memmove/64K     10000     160435   408.49 MiB/s

NEON-optimized:
BM_string_memmove/8   100000000         25   319.06 MiB/s
BM_string_memmove/64   50000000         43  1472.60 MiB/s
BM_string_memmove/512  10000000        247  2069.74 MiB/s
BM_string_memmove/1K    5000000        463  2210.08 MiB/s
BM_string_memmove/8K     500000       3465  2363.69 MiB/s
BM_string_memmove/16K    500000       6894  2376.30 MiB/s
BM_string_memmove/32K    100000      15490  2115.38 MiB/s
BM_string_memmove/64K     50000      42097  1556.75 MiB/s

Change-Id: I89253a01fb811438089e16320ac265177a2ca152

Conflicts:
	libc/Android.mk

Conflicts:
	libc/Android.mk
	libc/arch-arm/arm.mk
	libc/arch-arm/cortex-a9/cortex-a9.mk
	libc/arch-arm/generic/generic.mk
	libc/arch-arm/krait/krait.mk
	linker/Android.mk
libc: add tegra2 TARGET_CPU_VARIANT

Tegra2 is a Dual Cortex A9 without FP neon SIMD

based on 'generic' arm (memcpy, memset)
on cortex-a15 and a8 (strcmp)
and armv7-a (memchr and strlen)

These applets are no more common since recent optimisations

strcpy from cortex-a9
strcat : keep standard one

Change-Id: I1e7207e2d1ba02012fb5306f46b688903d31386c
Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>

Conflicts:
	libc/Android.mk
	libc/arch-arm/arm.mk
bionic: linker: fix prelink support

load_bias_ needs to be calculated from the min_vaddr, not the
prelink address

Fixes

couldn't map "libraryname.so" segment 1: Invalid argument

Change-Id: Ibf1fd1d5a0f2c81ce515f5d47412a043ba768247
libc: krait: Re-factor high-performance memcpy for thumb2

The majority of libc under bionic is built for thumb2.  Refactor the
high performance memcpy used in previous builds for thumb2, including
information that can be used for stack-unwinding.

Change-Id: Ib5f7ab354f39313758402ec02b0aea27b15d45fa

Conflicts:
	libc/arch-arm/krait/bionic/memcpy_base.S
(cherry picked from commit cdeb493351044c3116fc0d42a64f33f8215a5886)
(cherry picked from commit 0c524faa937b40178915c9478599b754b6f8f78d)

Conflicts:
	libc/arch-arm/krait/bionic/memcpy_base.S
bionic: Merge bionic optimizations
linker: Avoid logcat spam with some blobs

Many of pre-kitkat blobs would emit a "text relocations" warning which makes logcat completely unreadable.
This commit will hide this warning to prevent it.

Change-Id: I8f32b5bbfea33d732320b3ac29da6b0027fbd521

Conflicts:
	linker/linker.cpp
libc: Unbreak build for scorpion

Use cortex-a15 memcpy and krait memset routines

Change-Id: I02cb178b33b01fc91e903f1f7b620640fd0f3310

Conflicts:
	libc/arch-arm/scorpion/scorpion.mk
Make use of new memcpy, tweak settings

Summary:
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>

Test Plan: verified in micro bench

Reviewers: randall.rushing, jriordan001, anders3408, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D235

Conflicts:
	libc/Android.mk

Change-Id: I89fd0f71c271e047595199e5a6c2f83dd39305a3
Signed-off-by: DHOMD <DHO@dho.im>

Conflicts:
	libc/Android.mk
libc: support __errno_location

Summary:
Android's errno behavior is the same as glibc's __errno_location.
Support __errno_location for compatibility.

Test Plan: verified fully

Reviewers: randall.rushing, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D236

Change-Id: I2f48168d31a870836271319460e3a941c6498022
Signed-off-by: DHOMD <DHO@dho.im>
libc stdlib: implement C99 _Exit and C11 quick_exit API

Summary: needed for some newer changes shortly :)

Test Plan: verified

Reviewers: randall.rushing, jriordan001, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D237

Change-Id: I2b34a9cfc2a71721e4bda47b9b06553a096a813c
Signed-off-by: DHOMD <DHO@dho.im>

Conflicts:
	libc/Android.mk
	libc/include/stdlib.h
[ARM] libc: optimized strnlen, strncat, strncmp, and strlcat

PS2: Fix dependencies

Summary:
Date:   Mon Sep 23 14:45:06 2013 -0700

    [ARM] libc: use basic ASM strnlen implementation

    Summary:
    This is based on the current naive strlen routine from
    netbsd

    Test Plan: significant implemented bench gains

    Reviewers: randall.rushing, synergy

    Reviewed By: synergy

    Differential Revision: http://review.codefirex.com/D499

    Conflicts:
        libc/Android.mk

Author: synergydev <synergye@codefi.re>
Date:   Mon Sep 23 14:43:27 2013 -0700

    [ARM] libc: use optimized ASM strncmp implementation

    Summary:
    This strncmp implementation is based on the current
    arm netbsd implementation

    Test Plan: https://sourceware.org/git/?p=glibc.git;a=blob;f=benchtests/bench-strncmp.c;h=25df3dbc2eb25346d9a897f8d7a2ada9725584e3;hb=master and integrated bionic-benchmark

    Reviewers: randall.rushing

Author: synergydev <synergye@codefi.re>
Date:   Sat Sep 21 23:45:58 2013 -0700

    [ARM] libc: use basic ASM strncat implementation

    Summary:
    This implementation is the naive strncat implementation
    for ARM from netbsd upstream.

    Test Plan: Someone else test please, bench gain is significant with http://repo.or.cz/w/glibc.git/blob_plain/ec901dcf2886cfb81d88f9a63cfcd62b9efe6381:/benchtests/bench-strncat.c (no currently integrated bench, only test which is good with this change).

    Reviewers: randall.rushing, ConnorBaker, synergy

    Reviewed By: synergy

Author: synergydev <synergye@codefi.re>
Date:   Mon Sep 23 14:42:47 2013 -0700

    [ARM] libc: use basic ASM strlcat implementation

    Summary: This is based on the netbsd naive strlcat implementation

    Test Plan: +1 here

    Reviewers: randall.rushing, synergy

    Reviewed By: synergy

Test Plan: significant implemented bench gains

Reviewers: randall.rushing, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D238

Conflicts:
	libc/Android.mk

Change-Id: Ie9409391cab54527e8949fc879788cf0288db161
Signed-off-by: DHOMD <DHO@dho.im>

Conflicts:
	libc/Android.mk
[ARM] libc: define return and conditional return macros

Summary: Required by the new strncat, strlcat, strncmp, and strnlen

Test Plan: verified

Reviewers: randall.rushing, jriordan001, anders3408, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D239

Change-Id: Id0f59bdf3efafdb06f8ea588bcc08b8fdc5483c5
Signed-off-by: DHOMD <DHO@dho.im>