Commit graph

163 commits

Author SHA1 Message Date
Colin Cross
27c43c505e Update sanitize property format
Change-Id: I2fd35d6d85c7da7e96ffcefcd81350c836f0db9c
2016-04-15 16:36:13 -07:00
Elliott Hughes
afe835d540 Move math headers in with the other headers.
Keeping them separate is a pain for the NDK, and doesn't help the platform.

Change-Id: I96b8beef307d4a956e9c0a899ad9315adc502582
2016-04-02 08:36:33 -07:00
Greg Hackmann
e5c872ffb7 genversion-scripts: fix script name in autogenerated comment
Change-Id: I2a304818cfc54d08a08d2e621e4cf74e7ce465dd
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-03-23 16:25:42 -07:00
Dan Willemsen
fc1fb955b3 Android.bp: Add missing <complex.h> functions.
Android.bp port of https://android-review.googlesource.com/207658

Change-Id: I4bedd193a20f7dfb97d0a8bbb67c8472e727be87
2016-03-16 15:46:35 -07:00
Elliott Hughes
9ee6adb003 Add missing <complex.h> functions.
FreeBSD doesn't seem interested in having low-quality implementations of
these functions:

  cacoshl, cacosl, casinhl, casinl, catanhl, catanl, ccoshl, ccosl, cexpl,
  clog, clogf, clogl, cpow, cpowf, cpowl, csinhl, csinl, ctanhl, ctanl.

And they still haven't got round to writing good implementations, so for
now let's just take the NetBSD ones so we have the full set.

Bug: http://b/27555792
Change-Id: I6b72003cf749b1043f006377a01fffe5e1d659bc
2016-03-11 15:03:25 -08:00
Dan Willemsen
603acbf9ca Update Android.bp with x86 rint optimizations
Change-Id: Ie14a40301d6dd601b34b3f2341947daf6294e2cb
2016-03-11 13:01:20 -08:00
jzha136
f3ea093ebb Add x86 optimization of rint functions and tests
Change-Id: I5e7696ff9bcb1efc2625100ef8565b68dca2326c
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
2016-03-07 18:31:26 -08:00
Dimitry Ivanov
9296460bf4 libm: rename LIBC_PRIVATE to LIBC_DEPRECATED
Bug: http://b/26386014
Change-Id: Ia32411ce779f9dcf2cf7910d8658ffa753c73af9
2016-03-04 11:05:52 -08:00
Dan Willemsen
879cec2770 Update Android.bp with recent Android.mk changes
Change-Id: If9777e9ece6de1bc00c3ef86724c7bd4d437aaca
2016-02-29 10:37:56 -08:00
Stephen Hines
64955c84c0 Remove unused libm_clang variable.
Bug: http://b/21899249

As part of the cleanup here, this unset/unused variable was missed.

Change-Id: I0e0f2640e2e975f3e154f68509aa791fd22053a9
2016-02-19 01:17:18 -08:00
Chih-Hung Hsieh
63fedd76ad Enable clang for x86_64 after fp128 fix in clang-2577113.
Upstream LLVM fix was included in prebuilt clang-2577113.

BUG: 21899249
Change-Id: Ief3f3e28650c0bbf8749a5e5d26f45c39e15ed62
2016-02-08 17:07:33 -08:00
Dan Willemsen
a29ed0bbce libm: Use LOCAL_SRC_FILES_EXCLUDE_{arch}
Instead of adding the used common files to each arch that doesn't
override a file, make the architectures list the files they override.

Also updates the Android.bp file to match the Android.mk file.

Change-Id: I7d6a9c2e1c6b6cc9430aa818a89a2ccf52f62c98
2015-12-03 18:09:36 -08:00
Dimitry Ivanov
a2ead18657 libm: stop exporting __muldc3
Bug: http://b/26004493
Change-Id: I991268d5e7b59bca646da25d0ad90a1cb4a9d4b9
2015-12-03 15:25:37 -08:00
Dan Willemsen
9e6f98fe9d Update Android.bp with arch-specific version scripts
Change-Id: I59b34f21b54e8a2084bb318a08c4092064f48083
2015-11-03 14:30:57 -08:00
Dmitriy Ivanov
c176440c90 Fix mips and x86 builds
Change-Id: Idda2494876fd6bf64b3efe6de2e384da9b6a0dbc
2015-10-28 17:51:47 -07:00
Dmitriy Ivanov
e85fb580c8 Fix LDFLAGS for arm and x86
Change-Id: I5366f4499cb4da3a51b8484ab3e4ff785f0888ab
2015-10-28 17:25:34 -07:00
Dmitriy Ivanov
284b468524 Generate per-architecture version scripts.
Bug: http://b/24767418
Change-Id: I23e49d8d30c0def3215ffbd99d09f207d9483624
2015-10-28 16:40:53 -07:00
Christopher Ferris
fa7752986d Fix arm64 fenv warnings, and make warnings errors.
Even though the control registers being read/written in fenv.c only
have 32 bits that are used, the instructions take a 64 bit register.
Make sure the inline assembler in the macros use 64 bit values.

Verified that before the change and after the change, the disassembly
is exactly the same.

In addition, add -Werror to the cflags.

Change-Id: I6603779327488c23e3aab13300edf2e02b101916
2015-10-23 16:41:17 -07:00
Dmitriy Ivanov
280d54680d Fix bug number for linker related workarounds
Bug: 24425865
Change-Id: I2021674a9df0e768f312ca024d906302db1c494f
2015-09-28 10:31:12 -07:00
Dan Willemsen
208ae17e5f Add Android.bp for libc/libm/libdl
Change-Id: I3537363849ba1244348996ff17c5ace1b95dbeee
2015-09-16 16:50:01 -07:00
Elliott Hughes
a992004c9e Merge "Regenerate NOTICE files." 2015-08-29 04:00:21 +00:00
Elliott Hughes
44ead71726 Regenerate NOTICE files.
Change-Id: Ia5c340220bb75e4e3166cc483ea77d19cfb08a71
2015-08-28 20:23:52 -07:00
Elliott Hughes
8cff2f95d8 Sync with upstream FreeBSD libm.
Change-Id: I97e9b23903f1d993d84825806065e85626007d31
2015-08-28 20:21:43 -07:00
Elliott Hughes
f9f4a432ee Revert "Revert "Use compiler builtins for fabs.""
Don't enable the inlines when building libm itself. Otherwise clang gets
upset by seeing both an inline and a non-inline definition.

This reverts commit c5deb0f883.

Change-Id: If7abdb351f5a5549d6a331b33af408e8fcfa9868
2015-08-24 16:05:48 -07:00
Elliott Hughes
c5deb0f883 Revert "Use compiler builtins for fabs."
Use of "extern inline" breaks clang build.

This reverts commit d76f16973a.

Change-Id: I995d0d38c3776f5c50b060f16770741c92a2acac
2015-08-24 21:08:13 +00:00
Elliott Hughes
d76f16973a Use compiler builtins for fabs.
Change-Id: Id3bf761d6dfc187f218b5215c53d76bddc83d50b
2015-08-24 13:32:40 -07:00
Elliott Hughes
6816d8cc69 Merge "Use __builtin_* in <math.h>." 2015-08-14 22:57:10 +00:00
Elliott Hughes
b662280aaf Use __builtin_* in <math.h>.
Also remove cruft meant to support long-obsolete compilers. More
benchmarks.

Bug: http://b/23195789
Change-Id: Ief538e41e77a77e8013b2f4f359584e8df2c47d8
2015-08-14 15:20:57 -07:00
Jake Weinstein
8d959505bc libm: ARM: reorganize a bit to match ARM64
* Cleaner naming, especially if there are more ARM-specific routines in
  the future.

Change-Id: Id29db728800ccd612a906e86ccb95c1e7620514d
2015-08-13 23:02:10 +00:00
Chih-Hung Hsieh
e79d06b0e8 Use gcc to build and test x86_64 long double code.
Clang/llvm x86_64 configuration of long double is still
incompatible with gcc.
https://llvm.org/bugs/show_bug.cgi?id=23897

BUG: 21899249
Change-Id: I47fd6d0ce2daa84ae0035e7885a4d90e4c3056f7
2015-06-23 23:13:39 +00:00
Dmitriy Ivanov
f448ef491c Merge "Add versions to libm.so symbols" 2015-06-17 20:49:44 +00:00
Dan Albert
11ea08c5cb Use new sanitizer option.
Change-Id: I21b04a1f3be3b10ee557bf9e0caa5db638686364
2015-06-16 13:57:54 -07:00
Dmitriy Ivanov
636f5ddddc Add versions to libm.so symbols
Bug: http://b/20139821
Change-Id: Ifdfcac62d59eb8f0985990aa8512046ecb87449e
2015-06-15 18:52:20 -07:00
Elliott Hughes
173ad0a53e Always build libm with clang.
Change-Id: I00df3b83dfa76a7e12f097fb622ceaec3e2bb5a4
2015-06-10 22:55:09 -07:00
Dmitriy Ivanov
41c99cdbb9 Remove LOCAL_CONLY_FLAGS it is no-op.
Change-Id: Ib52b85d176dc9d46d7550f01537b2635e873d6ad
2015-05-26 11:38:59 -07:00
Dmitriy Ivanov
9185e04f72 Apply work around b/19059885 to x86
Bug: http://b/19059885
Bug: http://b/21203348
Change-Id: Ic375e9f877d68de8f866d17362879a7dde638465
(cherry picked from commit 69a5fb951d)
2015-05-15 18:42:14 -07:00
Elliott Hughes
7e54c762fc Update NOTICE files.
(cherry-pick of f0bd92db8966b04062fda0986dacf80891e1a378.)
Change-Id: I4e170118abf452dd87ffe79d343ba1e2b53955de
2015-05-12 10:33:20 -07:00
Dmitriy Ivanov
88e777d6f4 Switch libc/libcstdc++/libm to hash-style=both
Bug: http://b/19059885
Change-Id: Ie42703d91f291fd689a1cf9c35bcab5c487b9a84
2015-05-08 12:06:20 -07:00
Christopher Ferris
6e86146b85 Fix typo in alias symbol.
Change-Id: I41d2c29bd4a9ba382bbe3440541c8e1506fc5809
2015-03-14 12:17:45 -07:00
Christopher Ferris
995b813e91 For libm, use a macro for aliasing symbols.
Change-Id: Ibd42ebc387c2bf3eba9aa96091770915b4b34184
2015-03-13 23:57:15 -07:00
Dmitriy Ivanov
d7e091efc4 Merge "Switch libc and libm to sysv-only hash style" 2015-03-13 21:04:08 +00:00
Dmitriy Ivanov
2e16d2cf1e Switch libc and libm to sysv-only hash style
Bug: 19059885
Change-Id: I60a23dc5f9c756994d566818332ca42b305b4a05
2015-03-13 19:48:03 +00:00
Christopher Ferris
f074b531d2 Merge "Add the optimized implementation of 18 math functions for x86 and x86_64 respectively" 2015-03-13 17:18:21 +00:00
Goran Jakovljevic
1156508265 Generate gnu hash for arm only
Fixes build failure caused by:
https://android-review.googlesource.com/#/c/139660

As previously discussed [1], MIPS does not support GNU-style ELF hashes.

[1] https://android-review.googlesource.com/#/c/49282/2/tests/Android.mk

Change-Id: I9a7966eebfd1ef0a587a20b71faefde38e84ab62
2015-03-10 10:01:50 -07:00
Dmitriy Ivanov
4a55c46d30 Generate sysv hash for libc, libstdc++ and libm
Bug: 19059885
Change-Id: I35e2a9cd0bb3914d9d0c82d163bfaf0fff844667
2015-03-09 19:38:56 -07:00
Jingwei Zhang
5d4f0e6a26 Add the optimized implementation of 18 math functions for x86 and x86_64 respectively
Change-Id: I31bf601448a9427f825517f3a0ff24de47f49bfa
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
2015-03-09 13:19:08 -07:00
James Rose
45789b63db libm: Add hardware sqrt, ceil, floor and trunc for x86 & x86_64
Add hardware implementations for sqrt, ceil, floor and trunc for
x86 and x86_64. These routines, and in particular sqrt are much
faster than the BSD C language versions of these functions.

Fixed whitespace errors.

Revised x86 versions with respect to alignment.
Rebased for Android 5.0

Change-Id: I86bdb520ce5e589b0cf63778f353fbd3263c8f0e
Author: James Rose <james.rose@intel.com>
Signed-off-by: James Rose <james.rose@intel.com>
2015-03-06 16:48:30 -08:00
Shu Zhang
c78fa26d47 libm: arm: add arm specific sqrt and sqrtf
Add arm specific optimized sqrt and sqrtf.

Change-Id: I8ea417fc98a800c8cf4f47a0c6668c51d927b1dc
2015-03-04 14:07:35 -08:00
Amaury Le Leyzour
32936c895d Add aarch64 instructions wherever possible
fma, sqrt and various rounding functions have aarch64 instruction equivalent

Change-Id: I1284f31b9f78f914281e5563b8d44db8362b627d
2015-03-04 12:18:52 -08:00
Shu Zhang
3a629af0ad libm: arm: Add arm specific floor() optimization
Add arm specific floor() implementation which avoids VMSR and VMRS
instructions.

Change-Id: Ibd4cd7147aa2f98c9b5bbaf74948843ea619dba4
2015-02-12 18:27:58 -08:00