aboutsummaryrefslogtreecommitdiffstats
path: root/libm/Android.mk
Commit message (Collapse)AuthorAgeFilesLines
* Fix arm64 fenv warnings, and make warnings errors.Christopher Ferris2015-11-071-0/+1
| | | | | | | | | | | | | 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
* Revert "Revert "Use compiler builtins for fabs.""Elliott Hughes2015-11-071-3/+5
| | | | | | | | | 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 c5deb0f883cbdca7e5ab75f92f82c31d21367f49. Change-Id: If7abdb351f5a5549d6a331b33af408e8fcfa9868
* libm: ARM: reorganize a bit to match ARM64Jake Weinstein2015-10-291-3/+2
| | | | | | | * Cleaner naming, especially if there are more ARM-specific routines in the future. Change-Id: Id29db728800ccd612a906e86ccb95c1e7620514d
* Add versions to libm.so symbolsDmitriy Ivanov2015-06-171-0/+4
| | | | | | Bug: http://b/20139821 Change-Id: Ifdfcac62d59eb8f0985990aa8512046ecb87449e (cherry picked from commit 636f5ddddcd9e0bcfc7139b0905ebc92d4adc40a)
* Apply work around b/19059885 to x86Dmitriy Ivanov2015-05-151-0/+1
| | | | | | Bug: http://b/19059885 Bug: http://b/21203348 Change-Id: Ic375e9f877d68de8f866d17362879a7dde638465
* Switch libc/libcstdc++/libm to hash-style=bothDmitriy Ivanov2015-05-081-1/+1
| | | | | | Bug: http://b/19059885 Change-Id: Ie42703d91f291fd689a1cf9c35bcab5c487b9a84 (cherry picked from commit 88e777d6f46709abebab88421e8c4ea7a9e3d9c4)
* Merge "Switch libc and libm to sysv-only hash style"Dmitriy Ivanov2015-03-131-1/+1
|\
| * Switch libc and libm to sysv-only hash styleDmitriy Ivanov2015-03-131-1/+1
| | | | | | | | | | Bug: 19059885 Change-Id: I60a23dc5f9c756994d566818332ca42b305b4a05
* | Merge "Add the optimized implementation of 18 math functions for x86 and ↵Christopher Ferris2015-03-131-18/+93
|\ \ | |/ |/| | | x86_64 respectively"
| * Add the optimized implementation of 18 math functions for x86 and x86_64 ↵Jingwei Zhang2015-03-091-18/+93
| | | | | | | | | | | | | | | | respectively Change-Id: I31bf601448a9427f825517f3a0ff24de47f49bfa Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com> Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
* | Generate gnu hash for arm onlyGoran Jakovljevic2015-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* | Generate sysv hash for libc, libstdc++ and libmDmitriy Ivanov2015-03-091-0/+3
|/ | | | | Bug: 19059885 Change-Id: I35e2a9cd0bb3914d9d0c82d163bfaf0fff844667
* libm: Add hardware sqrt, ceil, floor and trunc for x86 & x86_64James Rose2015-03-061-12/+40
| | | | | | | | | | | | | | | 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>
* libm: arm: add arm specific sqrt and sqrtfShu Zhang2015-03-041-4/+10
| | | | | | Add arm specific optimized sqrt and sqrtf. Change-Id: I8ea417fc98a800c8cf4f47a0c6668c51d927b1dc
* Add aarch64 instructions wherever possibleAmaury Le Leyzour2015-03-041-22/+87
| | | | | | fma, sqrt and various rounding functions have aarch64 instruction equivalent Change-Id: I1284f31b9f78f914281e5563b8d44db8362b627d
* libm: arm: Add arm specific floor() optimizationShu Zhang2015-02-121-1/+22
| | | | | | | Add arm specific floor() implementation which avoids VMSR and VMRS instructions. Change-Id: Ibd4cd7147aa2f98c9b5bbaf74948843ea619dba4
* [MIPS] Fix Mips64 build of libmDuane Sand2015-02-111-0/+3
| | | | Change-Id: Ib742b408d4f21d5ec8d455a3fea7c08165c7f321
* Cleanup the libm makefile.Christopher Ferris2015-02-091-68/+66
| | | | Change-Id: I3d95f75da24ee3b064a9cce67586b0e6f32272d8
* Disable ASAN for more of our libraries.Dan Albert2014-12-181-0/+2
| | | | | | | Since ASAN depends on these libraries, we need to exclude them from being instrumented. Change-Id: I62005b6d04ee7b2283c4bd54ace5304386c67358
* Fix our <complex.h> support.Elliott Hughes2014-11-061-5/+14
| | | | | | | | | | | | | | | 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
* Don't use an STL for libm.Dan Albert2014-10-161-0/+3
| | | | | | | The default is none right now, but this will be needed when the default becomes libc++. Change-Id: Ib022adac2b9dc08fbfae830908128043cfffb91e
* Add coverage flag for libm.Dan Albert2014-09-301-0/+6
| | | | Change-Id: I195d38c5e1f50d1cc6d4353dc8857f11b803b7a3
* Fix lgamma_r/lgammaf_r/lgammal_r for -0.Elliott Hughes2014-09-181-0/+2
| | | | | | | | 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
* Get new coshl, sinhl, and tanhl implementations from upstream.Elliott Hughes2014-09-121-0/+3
| | | | Change-Id: I92f9cd53d12efb2e0f4f8a9590b9fe42398233f6
* Sync libm with upstream.Elliott Hughes2014-09-121-0/+1
| | | | Change-Id: I8ac8ee52122ee19a2e423c3211092023cb4896eb
* Disable Clang, due to x86 LDBL_MANT_DIG errors.Chih-Hung Hsieh2014-09-041-0/+8
| | | | | | | | Clang -m32 has incorrect sizeof(long double) = 12. With -m64, LDBL_MANT_DIG is incorrect 64. BUG: 17163651 Change-Id: I4b157aa1a8572c3a10aece6070e119a292ab8e83
* Revert "Switch libm to building with clang."Elliott Hughes2014-07-111-14/+5
| | | | | | | | This reverts commit aadc4b2ff03b12142f2c6163266ebdb1df2a6e76. The patch broke x86. Change-Id: I0cda903732a685838bbd1877f94e1593a2a32acc
* Switch libm to building with clang.Elliott Hughes2014-07-101-5/+14
| | | | | Bug: 16211965 Change-Id: I81ec9706a4f2b5e8a840508a0f711cd25a5826ca
* Revert "Revert "Prevent symbols from libgcc from being reexported.""Dan Albert2014-06-241-0/+7
| | | | | | This reverts commit 4e4e1a5d78ff6dd9394b9b116c012046da409e99. Change-Id: I8e78c3a59598e052e02965dd37b3fba8f567eed9
* Revert "Prevent symbols from libgcc from being reexported."Dan Albert2014-06-231-7/+0
| | | | | | This reverts commit 65e80cf62200085f72c1c081aea2d6e9b800cde2. Change-Id: I5f94b123f73db8d0b03cd71a5cffa0662776a017
* Prevent symbols from libgcc from being reexported.Dan Albert2014-06-211-0/+7
| | | | | | | | 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
* Merge "Add a flag control that PRIVATE libm can be chosen"Elliott Hughes2014-06-171-0/+2
|\
| * Add a flag control that PRIVATE libm can be chosenXiaokang, Qin2013-01-141-0/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I080456a2c45ac870965c25552c5821875568fe9b Author: Xiaokang, Qin <xiaokang.qin@intel.com> Signed-off-by: Xiaokang, Qin <xiaokang.qin@intel.com> Signed-off-by: Shuo Gao <shuo.gao@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 63396
* | Workaround the GCC "(long)fn -> lfn" optimization bug.Ben Cheng2014-05-291-2/+5
| | | | | | | | | | | | | | | | Pass "-fno-builtin-rint -fno-builtin-rintl -fno-builtin-rintf" to avoid generating self recursions in lrint, lrintl, and lrintf. BUG: 14225968 Change-Id: Iffc4d8f0692580d636a529f4c8aa9a7a10d7acd8
* | Use -fvisibility=hidden to build libm.Elliott Hughes2014-05-191-0/+1
| | | | | | | | | | Bug: 11156955 Change-Id: I77b7772a44313a1eb3970f5d2c8e2af63690efa4
* | Fix <math.h> to quieten most of our warnings.Elliott Hughes2014-05-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've reported the wcsftime bug upstream, but we really just want to use -D to ensure the buggy code isn't built. (I've also brought our strftime a bit closer to upstream now we have the right define.) I don't think upstream is likely to fix all their sign-compare and uninitialized warnings, so let's just silence them. As for libm, again upstream isn't likely to fix all their warnings, and silencing those made the ones that were our fault stand out. I've fixed our <math.h> to fix the warnings caused by our lack of definitions for the non-imprecise long-double functions. I checked the C99 standard, and all these functions are there. Change-Id: Iee8e1182c1db375058fb2c451eceb212bab47a37
* | Clean-up _fpmath and fake_long_doublesCalin Juravle2014-04-231-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - promoted IEEEld2bits to fpmath since most of the where the same for diffrent archs - removed _fpmath - reinstated weak_references - moved isfinite and isnormal to libc - clean up fake_long_doubles - clean up some useless ifdefs - added missing nexttoward* tests Bug: 14134235 Change-Id: I95639c4885653fe47fd7dc0570ee5bb3389bbc6b
* | Reimplement isinf/isnan/fpclassify.Elliott Hughes2014-04-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also move isinf and isnan into libc like everyone else. Also move fpclassify to libc like the BSDs (but unlike glibc). We need this to be able to upgrade our float/double/long double parsing to gdtoa. Also add some missing aliases. We now have all of: isnan, __isnan, isnanf, __isnanf, isnanl, __isnanl, isinf, __isinf, isinff, __isinff, isinfl, __isinfl, __fpclassify, __fpclassifyd, __fpclassifyf, __fpclassifyl. Bug: 13469877 Change-Id: I407ffbac06c765a6c5fffda8106c37d7db04f27d
* | Emit warnings when linking against imprecise math functionsCalin Juravle2014-04-021-1/+0
| | | | | | | | Change-Id: I3da7b8396a64d7899fcb89452c879806a8a511ff
* | Fix LP64 libm for 128-bit long doublesCalin Juravle2014-03-241-40/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | * reworked amd64/_fpmath.h and arm64/_fpmath.h to support 128-bit long doubles. * improved tests to cover long double cases * made modfl an alias for LP32 Tests pass on x86, x86_64, arm, arm64 and mips. Bug: 12921273 Change-Id: Ibe39acde57972447a8950fa45b1e702acc68ebeb
* | [MIPS64] libc/libm supportChris Dearman2014-02-061-0/+4
| | | | | | | | | | | | | | | | libc/libm support for MIPS64 targets Change-Id: I8271941d418612a286be55495f0e95822f90004f Signed-off-by: Chris Dearman <chris.dearman@imgtec.com> Signed-off-by: Raghu Gandham <raghu.gandham@imgtec.com>
* | Use arch-specific LOCAL_ variables to build libm.Ying Wang2014-02-031-19/+21
| | | | | | | | | | | | | | | | Use arch-specific LOCAL_ variables to build libm for both TARGET_ARCH and TARGET_2ND_ARCH. Bug: 11654773 Change-Id: I6da794ba722bb68e7484d8869c6eb0425b7d17cb
* | bionic: rename aarch64 target to arm64Colin Cross2014-01-231-3/+3
| | | | | | | | | | | | | | Rename aarch64 build targets to arm64. The gcc toolchain is still aarch64. Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
* | We actually have modfl.Elliott Hughes2013-12-191-2/+3
| | | | | | | | Change-Id: I22bb4d14f99a418819f2941c2dfec49094807c5f
* | AArch64: Initial AArch64 port of libmSerban Constantinescu2013-12-161-0/+3
| | | | | | | | | | | | | | This patch adds intial support for AArch64 to bionic's libm. Change-Id: I9ae0f895bbdd7fe67815e6ca1ead627581163a27 Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* | Switch to upstream sleep(3) and usleep(3).Elliott Hughes2013-11-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | Also fix the signature of usleep, and the definition of useconds_t which should be unsigned, as the 'u' in its name implies. This patch also cleans up the existing FreeBSD hacks by moving the libm stuff from <sys/cdefs.h> to a libm-private header, and adding comments about the hacks we use to build FreeBSD source. Change-Id: Ibe5067a380502df94a0a3a7901969b35411085b6
* | Fix libm build for x86_64.Elliott Hughes2013-10-011-2/+2
| | | | | | | | Change-Id: If89da2d5c3d9a88f78ffd8b260ad0f2fd391c608
* | x86_64: libm fixesPavel Chupin2013-10-011-0/+3
| | | | | | | | | | | | | | | | * Makefile update for x86_64 target * amd64 arch files Change-Id: I8f17e3338bffd89a3086fbddd1e91bb4619eac1b Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
* | Revert "Pull the pthread_key_t functions out of pthread.c."Elliott Hughes2013-02-111-36/+46
| | | | | | | | | | | | | | | | This reverts commit ad59322ae432d11ff36dcf046016af8cfe45fbe4 somehow my unfinished libm/Android.mk change got into here. Change-Id: I46be626c5269d60fb1ced9862f2ebaa380b4e0af
* | Pull the pthread_key_t functions out of pthread.c.Elliott Hughes2013-02-111-46/+36
| | | | | | | | | | | | | | | | | | | | | | | | This was originally motivated by noticing that we were setting the wrong bits for the well-known tls entries. That was a harmless bug because none of the well-known tls entries has a destructor, but it's best not to leave land mines lying around. Also add some missing POSIX constants, a new test, and fix pthread_key_create's return value when we hit the limit. Change-Id: Ife26ea2f4b40865308e8410ec803b20bcc3e0ed1