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
Duane Sand
3d535d2312
[MIPS] Fix Mips64 build of libm
...
Change-Id: Ib742b408d4f21d5ec8d455a3fea7c08165c7f321
2015-02-11 12:51:42 -08:00
Christopher Ferris
d40d1a08cd
Cleanup the libm makefile.
...
Change-Id: I3d95f75da24ee3b064a9cce67586b0e6f32272d8
2015-02-09 14:09:49 -08:00
Elliott Hughes
998f2d5a50
Remove more BSD cruft from the public headers.
...
Change-Id: I1e3097f745b526db448bf72fbc05fb2ba23929a0
2014-12-19 19:30:11 -08:00
Elliott Hughes
6b2b5856d9
Update bionic NOTICE files.
...
Change-Id: Ic280872ef3137febd9d4a87d5c7662e264692071
2014-12-18 16:27:30 -08:00
Dan Albert
da194780b1
Disable ASAN for more of our libraries.
...
Since ASAN depends on these libraries, we need to exclude them from
being instrumented.
Change-Id: I62005b6d04ee7b2283c4bd54ace5304386c67358
2014-12-18 08:03:49 -08:00
Elliott Hughes
1b66f6e9d7
Move a private x86-64 header file out of the limelight.
...
Currently this is on everyone's include path and is getting exported
via the NDK.
Change-Id: Ia417839fb65c7e0afddcd9fae3438665dae8e752
2014-11-26 19:31:19 -08:00
Elliott Hughes
b8ee16f1dc
Fix our <complex.h> support.
...
We build libm with -fvisibility=hidden, so we weren't exporting any
of the <complex.h> functions.
We also weren't building many of the functions anyway.
We were also missing the complex inverse trigonometric functions.
And because we didn't even have perfunctory "call each function once"
tests, we didn't notice that we weren't exporting any symbols, so this
patch adds at least that level of testing.
Change-Id: Ibcf2843f507126c51d134cc5fc8d67747e033a0d
2014-11-06 11:16:55 -08:00
Dan Albert
e91d9cd4ad
Don't use an STL for libm.
...
The default is none right now, but this will be needed when the
default becomes libc++.
Change-Id: Ib022adac2b9dc08fbfae830908128043cfffb91e
2014-10-16 07:44:47 -07:00
Elliott Hughes
14538ca75e
Catch up on upstream's round/roundf/roundl.
...
Not sure how we missed these, but better late than never...
Change-Id: Ib08d1bb6e340a1907cbeb1cbe220e33f70642bdc
2014-10-10 10:21:43 -07:00
Elliott Hughes
488268b134
Sync libm with upstream.
...
Change-Id: I3b4e2c9c6ce6c5934f270a51ce5eb9154c5805d5
2014-10-09 16:20:37 -07:00
Dan Albert
12e3f22c7c
Add coverage flag for libm.
...
Change-Id: I195d38c5e1f50d1cc6d4353dc8857f11b803b7a3
2014-09-30 16:56:43 -07:00
Elliott Hughes
755318548d
Fix lgamma_r/lgammaf_r/lgammal_r for -0.
...
Upstream has implemented lgammal/lgammal_r for ld128, and fixed the
sign problem we reported with all the lgamma*_r functions and -0.
Bug: 17471883
Change-Id: Ibb175d9cab67efae75f1010796fd44c9ba6ce4fc
2014-09-18 11:23:58 -07:00
Elliott Hughes
c729d4f237
Get new coshl, sinhl, and tanhl implementations from upstream.
...
Change-Id: I92f9cd53d12efb2e0f4f8a9590b9fe42398233f6
2014-09-12 16:09:40 -07:00
Elliott Hughes
460ad7454a
Sync libm with upstream.
...
Change-Id: I8ac8ee52122ee19a2e423c3211092023cb4896eb
2014-09-12 14:00:02 -07:00
Chih-Hung Hsieh
356a6249d8
Disable Clang, due to x86 LDBL_MANT_DIG errors.
...
Clang -m32 has incorrect sizeof(long double) = 12.
With -m64, LDBL_MANT_DIG is incorrect 64.
BUG: 17163651
Change-Id: I4b157aa1a8572c3a10aece6070e119a292ab8e83
2014-09-04 12:35:19 -07:00
Elliott Hughes
e0c56efddf
Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.
...
Bug: 16874785
Change-Id: I8512f8be3fd149d8720c5c3b4657bedd5ce2b1d1
2014-08-29 15:54:11 -07:00
Elliott Hughes
f4c948a9e9
Move the meat of <features.h> into <sys/cdefs.h>.
...
This way it's a lot harder for us to screw up (since we should always
be including <sys/cdefs.h> anyway).
Bug: 14659579
Change-Id: I23070fff3296b0d1c683bb5e3a6e214146327d53
2014-08-19 11:18:20 -07:00
Elliott Hughes
5f5cc45cf0
Fix <features.h> (_BSD_SOURCE and _GNU_SOURCE).
...
<features.h> is supposed to take user-settable stuff like _GNU_SOURCE
and _BSD_SOURCE and turn them into __USE_GNU and __USE_BSD for use in
the C library headers. Instead, bionic used to unconditionally define
_BSD_SOURCE and _GNU_SOURCE, and then test _GNU_SOURCE in the header
files (which makes no sense whatsoever).
Bug: 14659579
Change-Id: Ice4cf21a364ea2e559071dc8329e995277d5b987
2014-08-18 16:04:03 -07:00
Elliott Hughes
1e83245bae
Revert "Switch libm to building with clang."
...
This reverts commit aadc4b2ff0
.
The patch broke x86.
Change-Id: I0cda903732a685838bbd1877f94e1593a2a32acc
2014-07-11 01:24:15 +00:00
Elliott Hughes
aadc4b2ff0
Switch libm to building with clang.
...
Bug: 16211965
Change-Id: I81ec9706a4f2b5e8a840508a0f711cd25a5826ca
2014-07-10 16:58:07 -07:00
Dan Albert
71f9b34fbe
Revert "Revert "Prevent symbols from libgcc from being reexported.""
...
This reverts commit 4e4e1a5d78
.
Change-Id: I8e78c3a59598e052e02965dd37b3fba8f567eed9
2014-06-24 04:31:08 +00:00
Dan Albert
4e4e1a5d78
Revert "Prevent symbols from libgcc from being reexported."
...
This reverts commit 65e80cf622
.
Change-Id: I5f94b123f73db8d0b03cd71a5cffa0662776a017
2014-06-23 20:12:05 +00:00
Dan Albert
65e80cf622
Prevent symbols from libgcc from being reexported.
...
Since this was not done earlier, there are binary compatibility concerns
that prevent us from being able to apply this to LP32.
Bug: 11156955
Change-Id: Ie717c3ae4b81c749548a45a993c834e109700b27
2014-06-21 00:09:31 -07:00
Elliott Hughes
b6ca747402
Merge "Add a flag control that PRIVATE libm can be chosen"
2014-06-17 20:56:23 +00:00
Elliott Hughes
4779a11a3d
Merge "Move mips fenv implementation details into fenv.c."
2014-06-09 22:27:30 +00:00
Elliott Hughes
89d61243f2
Move mips fenv implementation details into fenv.c.
...
Change-Id: I2415e4808e40c2981d016c01969ba14ea22bf82e
2014-06-09 15:25:15 -07:00
Elliott Hughes
43bf81e544
Move x86 fenv implementation details into fenv.c.
...
Change-Id: I6cb8c730483c325dc3cb75c2b2fbdd2d8455a54c
2014-06-09 15:20:59 -07:00
Elliott Hughes
9812a0233c
Clean up the ARM fenv.h, moving implementation details into fenv.c.
...
Change-Id: I919d35db27ec16a6f54a7a5c3c070f33f03d9bb9
2014-06-09 13:57:57 -07:00
Serban Constantinescu
a147a1da5c
AArch64: libm: Fix ARM64 fenv_t and refactor ARM64 libm implementation.
...
This patch fixes the ARM64 ABI for libm. fenv_t is now split in 32bit status
and 32bit control. This mirrors the AArch64 FPU control and status
registers (FPCR, FPSR).
The patch also refactors the libm implementation for ARM64 into a finer
grained control over the FPU registers.
Bionic-benchmarks has been expanded with 3 more benchmarks for floating
point operations. The new libm implementation for ARM64 performs better
over all the math benchmarks available.
Change-Id: I2a7f81d6b4e55c91f8a63a4c69614fc8b1bcf2db
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-06-09 13:52:28 -07:00