Bionic/libm: fast neon pow() for small x,y.

Add a fast neon version of pow() suitable for relatively small
positive x and y (between 0 and 4).  Run the standard
implementation in all other cases.  Gives approximately 60%
performance improvement to AnTuTu FPU scores

Change-Id: I97e0712daeb2740764b26a44be0caaa39c481453
(cherry picked from commit df58b162751ccad4f6a9dee1d4d8cdb5aeef39f9)
(cherry picked from commit 844736c1cd73f0118cdeb2f322c84efba0793f54)
(cherry picked from commit 8b74afbad26480891890586e811b5167f43ec28c)
Bionic/libm: Prefer branches and VFP ABI.

For internal functions set gcc attribute "aapcs-vfp" for ARM
and use -fno-if-conversion to prefer branches over predicated
instructions (improves performance on architectures with good
branch prediction).

Change-Id: I8424e0e82a19d35e7e3b6e3e122dcdecdd5426fd
(cherry picked from commit a8ed843c678e2a4019c0b88a7a11ff8e3bdb4f70)
(cherry picked from commit 7cbe6a43c3152147f581cb1423bd14582619a2af)
(cherry picked from commit 885827b36a52939f2434b19d458fc9c18680e54f)
Bionic/libm: Add precision-correct de-serialize sin/cos.

Modify sin/cos to improve performance while retaining bit-for-bit
accuracy with existing algorithm.

Change-Id: Iaba2dd731cd015732744705dad8bddb713b43067
(cherry picked from commit df55e67573e176042c5d2ae084c758bc2e9e0025)
(cherry picked from commit 6a688d7aa4512731c430673ccd4f0d6e3999d439)
(cherry picked from commit 47bb7bc2962bff835000dca016f6319c20734398)
Bionic/libm: Pow optimizations and bug fixes.

Use VFP calling convention for pow_neon handoff function by default.
Fix register usage collision between two different polynomial
coefficients in pow_neon.  Remove conditional execution in pow_neon
and replace with branching.

Change-Id: I76095f4a006e2fb01a53943b66fd69bfa1fd3033
(cherry picked from commit 5f0ee8c38363ecb99f7ceb487583b5e7152e63ce)
(cherry picked from commit f4a020fad7881195bff087b5803e4a7b528b81f1)
(cherry picked from commit 22157646da56cba346893ea17a1de5e4fd689b53)
Bionic/libm: add assembly versions of sin/cos.

Add assembly versions of sin/cos with integrated remainder pi/2
calculation.  Directly extracted from binary libm.so compiled with
__ieee754_rem_pio2 calls inlined.

Change-Id: Ia093f420e58e794635e3a5f09e8236ae7601f1f6
(cherry picked from commit 19a356a1ed6384a9161739d5833cf5cfd88a8d3b)
(cherry picked from commit 1c9bdcfa6a68cd1a13a1e3b1a51616bddffeefad)
(cherry picked from commit cdaad8ab61325e958926b57a6a726d0cfa6f7511)
libm: sqrt and sqrtf via ARM vsqrt instruction

Optimized sqrt and sqrtf for arm by using hardware
opcode for sqrt rather than generic slow portable
code.

Change-Id: I84694159577aef6418710548085d8149c45e0e3f
(cherry picked from commit 434d98cd36cdd2514a7118e69624e5d205ca849a)
(cherry picked from commit 5fe41e6f146bcadd4904da26351c646cdc90d196)
(cherry picked from commit e314f75340c8e818b17373314ceb54039fcd76ad)
libm: optimistic pow calling.

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

Change-Id: I6f3aa734adbf99484b7ff70736ef83a41e5815b8
(cherry picked from commit e7fd29685a75f1d26061ac511e7a29479fd871b5)
(cherry picked from commit 7916899916973ca5695526ae45283e54709df32a)
(cherry picked from commit d39a7f744c78409949482e3cb3c9710e8f281a33)
Bionic/libm: enable optimized math functions on more QCOM targets.

allow more QCOM targets to use optimized math functions.

Change-Id: I76ee1bf951ae1c8397fef3af6e9937ed8cad9b62
(cherry picked from commit a7b5a06b144c96324db2370bd63b83c81d41ddc3)
(cherry picked from commit 8ccd613ff555349e0751659ebe03c182dae9a2eb)
(cherry picked from commit ccd4b1db5b225b0b4913b80b014f1c2f99c6fdff)
Bionic/libm: Remove extra vmov from sin/cos.

Move integer representations of x bits on the integer side rather
than moving them to and from the FP registers.

Change-Id: I1895db385c9616cdae9ab6403f392dfbae292adc
(cherry picked from commit 1d0c5a9fe67141515fa54403d985828590f9c206)
(cherry picked from commit ca46b68c30cf470464ffac530b8bdba242cc5c17)
(cherry picked from commit d7acb8827620ab7331995e843fd79015aed84996)
libm: krait: Fix build warning for e_pow.o

e_pow.o given more than once in the same rule. Remove extra arm/e_pow.S
reference in libm/Android.mk.

(cherry picked from commit a730ffa1195ad85a0e77afc9bf2cb78754b5985c)

Change-Id: I5a4c38e838978e0538697c8a5df1e97f1175e39e
(cherry picked from commit 1002139bee177b90dc011b8ac9f24c4696cf82b6)
(cherry picked from commit 99146f7c6c1ee984608ad705b67f562fb9006cd0)
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
Fix dns searchdomain use in gethostbyname.

Need to load search domain data before we attempt to use it.
This is a cherry pick of an AOSP change c11f6f0f393e472984b5ac2934e2485855a319c9.

bug:6799630

Change-Id: I4ea1131f06ffdf4037fe67f82af5a0349469b609
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
Merge changes Ib5f7ab35,I5a4c38e8,I1895db38,I76ee1bf9,I6f3aa734,I84694159,Ia093f420,I76095f4a,Iaba2dd73,I8424e0e8,I97e0712d into android-4.4

* changes:
  libc: krait: Re-factor high-performance memcpy for thumb2
  libm: krait: Fix build warning for e_pow.o
  Bionic/libm: Remove extra vmov from sin/cos.
  Bionic/libm: enable optimized math functions on more QCOM targets.
  libm: optimistic pow calling.
  libm: sqrt and sqrtf via ARM vsqrt instruction
  Bionic/libm: add assembly versions of sin/cos.
  Bionic/libm: Pow optimizations and bug fixes.
  Bionic/libm: Add precision-correct de-serialize sin/cos.
  Bionic/libm: Prefer branches and VFP ABI.
  Bionic/libm: fast neon pow() for small x,y.
bionic: call stdio cleanup on exit

As of 61e699a133a4807fe878a6cb0d7190d7c96e21f8, stdio clean up
functions are no longer registered in atexit and must be called
manually via __cleanup.

The issue this fixes is some static binaries linked against bionic
cannot output properly when piped or redirected because the buffer
is not flushed before closing.

This is done by pulling in exit.c (and other dependencies) from
netbsd.

Change-Id: I193e54a6d08900f291550029fe75ce76394d9e22
Upgrade to tzdata2013i.

From the release notes:

  Changes affecting near-future time stamps:

    Jordan switches back to standard time at 00:00 on December 20, 2013.
    The 2006-2011 transition schedule is planned to resume in 2014.
    (Thanks to Steffen Thorsen.)

  Changes affecting past time stamps:

    In 2004, Cuba began DST on March 28, not April 4.
    (Thanks to Steffen Thorsen.)

Bug: 13193205
Change-Id: I8f26cc50f6b571804a18ff2113b4a47a22bc56dd
Merge "Fix dns searchdomain use in gethostbyname." into klp-dev
Upgrade to tzdata2014a.

From the release notes:

  Changes affecting near-future time stamps

    Turkey begins DST on 2014-03-31, not 03-30.  (Thanks to Faruk Pasin
    for the heads-up, and to Tim Parenti for simplifying the update.)

  Changes affecting past time stamps

    Fiji ended DST on 2014-01-19 at 02:00, not the previously-scheduled
    03:00.  (Thanks to Steffen Thorsen.)

    Ukraine switched from Moscow to Eastern European time on 1990-07-01
    (not 1992-01-01), and observed DST during the entire next winter.
    (Thanks to Vladimir in Moscow via Alois Treindl.)

    In 1988 Israel observed DST from 04-10 to 09-04, not 04-09 to
    09-03.  (Thanks to Avigdor Finkelstein.)

(cherry picked from commit 159b28eb46f03cb1dae6484059e2559f1e42e208)

Bug: 13193205
Change-Id: I3d302039f7e057a97c9d307ce8d32efa056481ed
Allow overlap in resolv uid => DNS iface mapping

When multiple rules exist covering a given uid the one added most
recently will be used.

This allows us to handle the simultaneous tuns case where a new tun is
coming online for an already running VPN.

_resolv_clear_iface_for_uid_range now also takes the iface and removes
only that matching (iface, uid range) entry.

Bug: 12134439
Change-Id: I9b9cfcfae2f38c409022a8c76ccadad7e2babd78
libm: Fix multiple inclusion warning

Change-Id: Ifa732ec52fb582c34512cd1d09d918199ae7395e