Merge remote-tracking branch 'cm/cm-11.0' into HEAD
bionic: libm: replace Qualcomm's routines with Nvidia's (except pow)

Thank you to Johnny Qiu and Shu Zhang from Nvidia for both creating these
and making them public.

This commit is a squash of the following (but modified for KitKat):

Optimization for sin/cos:
    1. Add assembly version of sin/cos for arm
    2. Enable a fast implementation of sin() and cos() for small
    input (|x| < 640). It is only enabled for Cortex-A15.
Bug 1154547
Bug 1340861
Reviewed-on: http://git-master/r/277610
(cherry picked from commit 325d52623445ee089a0199fc993b28264b1cc9a6)

libm: correct a confusing macro name in __kernel_log2

Reviewed-on: http://git-master/r/278950
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Johnny Qiu <joqiu@nvidia.com>
Tested-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/336758
Reviewed-by: Shu Zhang <chazhang@nvidia.com>
Tested-by: Shu Zhang <chazhang@nvidia.com>

libm: Optimize exp()

Perform fast exp(x) when |x| < 16.0.
Bug 1362653
Reviewed-on: http://git-master/r/278360
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Johnny Qiu <joqiu@nvidia.com>
Tested-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/336759
Reviewed-by: Shu Zhang <chazhang@nvidia.com>
Tested-by: Shu Zhang <chazhang@nvidia.com>

use vfma.f64/vfms.f64 instead of vmla.f64/vmls.f64

vmfa/vmfs has better precision than vmla/vmls. Use vmfa/vfms if
vfpv4 FPU is available.
Bug 1426401
Reviewed-on: http://git-master/r/343595
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shu Zhang <chazhang@nvidia.com>
Tested-by: Shu Zhang <chazhang@nvidia.com>

libm: fast and precise sin()/cos()

Rewrite upstream sin/cos with assembly. Jump paths are optimized.
Introduce a PRECISE_TRIGONOMETRIC macro to select precision and
performance. With PRECISE_TRIGONOMETRIC set, the error is within 1 ULP.
The error is 2ULP if not set.
Bug 1426401
Reviewed-on: http://git-master/r/345073
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shu Zhang <chazhang@nvidia.com>
Tested-by: Shu Zhang <chazhang@nvidia.com>

libm: turn on high-precision sin/cos

Turn on PRECISE_TRIGONOMETRIC macro to get high precision sin/cos.
Bug 1437755
Reviewed-on: http://git-master/r/355653
Tested-by: Shu Zhang <chazhang@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shu Zhang <chazhang@nvidia.com>

Add arm specific floor() optimization

Add arch specific optimization scheme for libm.
Add arm specific floor() implementation which avoids VMSR and VMRS
instructions.

libm: Fix incorrect exponent when hitting a boundary condition

Bug 1466747
Reviewed-on: http://git-master/r/375210
Reviewed-by: Johnny Qiu <joqiu@nvidia.com>
Tested-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ryane Luo <ryanel@nvidia.com>
Tested-by: Ryane Luo <ryanel@nvidia.com>
Reviewed-by: Peter Zu <pzu@nvidia.com>

add arm specific sqrt and sqrtf

Add arm specific optimized sqrt and sqrtf.

Change-Id: Ibd4cd7147aa2f98c9b5bbaf74948843ea619dba4
libc: remove unused strings for Scorpion and use Denver memmove

Change-Id: I2fa1458b8256f1e97cb9fc27e810040d8db95f58
libc: scorpion: switch back to krait memmove temporarily

Change-Id: Ia34fc341f06bc92cf719b5f563a6edb7fa90b3cc
Revert "libc: remove unused strings for Scorpion and use Denver memmove"

This Vanir's bionic.
Vanir's anzu, coconut, and codina didn't build with this commit. 
I'll take a shot in the dark, and blame it.
Test commits on Vanir, or don't merge them to Vanir... ESPECIALLY SHIT LIKE BIONIC.

This reverts commit c4c6723315246b28bfce38eee93ccb59fd59354c.

Change-Id: I828531c55b38568fc7042aa28483bb663eba9c0f
Revert "libc: scorpion: switch back to krait memmove temporarily"

This reverts commit e9649b095ec337f5ce39fdbf612da4ea6621004e.

Change-Id: I314de324cfd86ef4483a360ba749d5e099ea63b5
Merge "Revert "libc: remove unused strings for Scorpion and use Denver memmove"" into kk44
Fix build for x86. Remove duplicate mcmchr from Android.mk. Other implemented in arch-x86/x86.mk

Change-Id: I90a562960b214dd02b015d3e2715f711907ae9e8
Remove the dependency on the non-uapi __kernel_nlink_t.

The kernel doesn't have an nlink_t; it just uses the equivalent of
uint32_t. We already had a usable __nlink_t in the C library, so
let's just define our nlink_t in terms of __nlink_t, which is what
__nlink_t was meant for anyway.

Note that our struct stat just follows the kernel, and doesn't refer
to nlink_t anyway.

Change-Id: I6f51188d188fab975e286d6f8945fe746200b8d4
Merge remote-tracking branch 'vanir/kk44' into kk-mr2