aboutsummaryrefslogtreecommitdiffstats
path: root/libm
Commit message (Collapse)AuthorAgeFilesLines
...
* | Clean up the ARM fenv.h, moving implementation details into fenv.c.Elliott Hughes2014-06-092-18/+14
| | | | | | | | Change-Id: I919d35db27ec16a6f54a7a5c3c070f33f03d9bb9
* | AArch64: libm: Fix ARM64 fenv_t and refactor ARM64 libm implementation.Serban Constantinescu2014-06-092-135/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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-193-1/+9
| | | | | | | | | | Bug: 11156955 Change-Id: I77b7772a44313a1eb3970f5d2c8e2af63690efa4
* | Declare sincos/sincosf/sincosl in <math.h>.Elliott Hughes2014-05-081-0/+7
| | | | | | | | Change-Id: If7b98f98c7ab4d3d77d310be082bff64512d51a8
* | Fix <math.h> to quieten most of our warnings.Elliott Hughes2014-05-052-35/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Update the NOTICE files and improve the script slightly.Elliott Hughes2014-05-051-26/+52
| | | | | | | | Change-Id: Ia131634cd97ca9523e1b63dce41f66247cbaa311
* | Clean-up _fpmath and fake_long_doublesCalin Juravle2014-04-2312-521/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | Regenerate the NOTICE files.Elliott Hughes2014-04-161-27/+89
| | | | | | | | Change-Id: Iac666f69b930e31bbeac3438812d544c6af55b0f
* | Fix arm64 floating point definitions.Elliott Hughes2014-04-142-23/+13
| | | | | | | | Change-Id: I6836da8fc9f66465435a21c51cb18851e20e9645
* | Reimplement isinf/isnan/fpclassify.Elliott Hughes2014-04-145-239/+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-023-79/+27
| | | | | | | | Change-Id: I3da7b8396a64d7899fcb89452c879806a8a511ff
* | Fix LP64 libm for 128-bit long doublesCalin Juravle2014-03-2421-73/+2747
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Update libm to the upstream head (2014.03.13)Calin Juravle2014-03-134-100/+72
| | | | | | | | | | | | | | The most relevant changes are the ones in s_erff.c which should improve the overall speed of exececution and the maximum error in ULP. Change-Id: I7bd867f902db418db67f02cd58578624357b1ee8
* | Update the NOTICE files.Elliott Hughes2014-03-061-0/+26
| | | | | | | | Change-Id: Ie72a01cddd5b813393656f603689e497b0f88ddd
* | Fix x86_64 buildPavel Chupin2014-02-282-2/+2
| | | | | | | | | | | | | | | | Fix types after recent update: https://android-review.googlesource.com/#/c/83435/ Change-Id: I17ed28af84b7adeb8572e18834e66f3264ec061d Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
* | Fix mips buildCalin Juravle2014-02-261-1/+1
| | | | | | | | Change-Id: Ica843d387e115d0b27afd961af73237ec9109ed9
* | Moved to a more openbsd-like fenv.hCalin Juravle2014-02-2613-1058/+1039
| | | | | | | | | | | | | | | | Factored out common declarations to include/fenv.h and pushed the implementation to .c files. Bug: 11050744 Change-Id: I446b13cc4bc599d328343a8d392b07de280f6304
* | Clean up various warnings in bionic.Elliott Hughes2014-02-181-0/+3
| | | | | | | | Change-Id: Ic57541d0a567fd4ae79f0ad59b2ffde1130eb7d2
* | Merge "Remove <sys/_types.h>."Elliott Hughes2014-02-081-3/+4
|\ \
| * | Remove <sys/_types.h>.Elliott Hughes2014-02-071-3/+4
| | | | | | | | | | | | | | | Bug: 12213562 Change-Id: I0d10664f9da60739bdbad0408be0dd61eea3c1fe
* | | [MIPS64] libc/libm supportChris Dearman2014-02-062-4/+35
|/ / | | | | | | | | | | | | | | 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-234-3/+3
| | | | | | | | | | | | | | Rename aarch64 build targets to arm64. The gcc toolchain is still aarch64. Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
* | Regenerate the NOTICE files.Elliott Hughes2014-01-072-27/+53
| | | | | | | | | | | | | | Also standardize the orthography in a few places to reduce near-duplicates in the NOTICE files. Change-Id: I347c75e817be61ec1b9c5b4b96226feedc8d09ab
* | Fix __isnanl on aarch64.Elliott Hughes2013-12-191-1/+1
| | | | | | | | | | | | This fixes the math.__isnanl, math.powl, and math.fdiml tests. Change-Id: I0086e4a1a82d0e2708fa07cf580a6d9778c548f2
* | We actually have modfl.Elliott Hughes2013-12-192-3/+3
| | | | | | | | Change-Id: I22bb4d14f99a418819f2941c2dfec49094807c5f
* | Don't use weak aliases in libm.Elliott Hughes2013-12-182-2/+20
| | | | | | | | | | | | | | The aarch64 toolchain doesn't support them, and we were already implementing most of the fake long-double functions differently anyway. Change-Id: I4a2f2df81972ee9c34ddfe96cec81b126506d881
* | AArch64: Initial AArch64 port of libmSerban Constantinescu2013-12-164-0/+326
| | | | | | | | | | | | | | 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-202-1/+32
| | | | | | | | | | | | | | | | | | | | | | 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 the x86_64 fenv.h.Elliott Hughes2013-10-021-5/+35
| | | | | | | | | | | | | | We should clean all the fenv.h files up, but not now. I've raised bug 11050744 as a reminder. Change-Id: I640c15b0f0477ec1a7891c031860404875bbe4b5
* | Fix libm build for x86_64.Elliott Hughes2013-10-013-77/+438
| | | | | | | | Change-Id: If89da2d5c3d9a88f78ffd8b260ad0f2fd391c608
* | x86_64: libm fixesPavel Chupin2013-10-013-0/+222
| | | | | | | | | | | | | | | | * Makefile update for x86_64 target * amd64 arch files Change-Id: I8f17e3338bffd89a3086fbddd1e91bb4619eac1b Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
* | Take upstream libm changes.Elliott Hughes2013-06-1221-22/+383
| | | | | | | | | | | | Mostly workarounds for GCC and Clang bugs. Change-Id: I4ef428a42d4ac6d622659053711a8cc416925727
* | Regenerate NOTICE files.Elliott Hughes2013-03-071-90/+0
| | | | | | | | | | | | Also clean up some obsolete cruft. Change-Id: Iec3b36f6607f7a08b72de99294ed5b6cd910dd5f
* | 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
* | Add a few more missing libm long double stubs.Elliott Hughes2013-02-071-0/+3
| | | | | | | | Change-Id: I6c44b9f3eee730253a958d6cefdac99e6f79da3e
* | Add a missing logbl stub.Elliott Hughes2013-02-061-0/+1
| | | | | | | | | | | | | | This doesn't usually matter because there's a weak reference; you'd miss this if you stopped using s_logb.c though. Change-Id: I912fceae327a378031cd24a64aefa9dfd84f7f90
* | Remove the currently-unused i387 assembler to make way for the new.Elliott Hughes2013-02-0643-1578/+0
| | | | | | | | Change-Id: I37e4e8fce881246b9b028f9e1619247b1ac25261
* | Make sincosl call sinl and cosl.Elliott Hughes2013-02-011-12/+9
| | | | | | | | | | Bug: 2748728 Change-Id: Id18070963b91b144758c567ad7ac80758e3a638b
* | Update the libm/NOTICE file after the upgrade.Elliott Hughes2013-02-011-0/+340
| | | | | | | | Change-Id: Icf9c44402d6f86117d61307219bb1cccd288854d
* | Upgrade libm.Elliott Hughes2013-02-01282-7946/+7083
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings us up to date with FreeBSD HEAD, fixes various bugs, unifies the set of functions we support on ARM, MIPS, and x86, fixes "long double", adds ISO C99 support, and adds basic unit tests. It turns out that our "long double" functions have always been broken for non-normal numbers. This patch fixes that by not using the upstream implementations and just forwarding to the regular "double" implementation instead (since "long double" on Android is just "double" anyway, which is what BSD doesn't support). All the tests pass on ARM, MIPS, and x86, plus glibc on x86-64. Bug: 3169850 Bug: 8012787 Bug: https://code.google.com/p/android/issues/detail?id=6697 Change-Id: If0c343030959c24bfc50d4d21c9530052c581837
* | Bring the NOTICE files back up to date.Elliott Hughes2013-01-291-72/+0
|/ | | | Change-Id: I978275cf6604b90595ee79d897c0460eeadc7dc8
* [MIPS] Rewrite fenv.h for AndroidRaghu Gandham2013-01-041-145/+152
| | | | Change-Id: I4d1e2f0b37b587426ccc9f26c525ec0d36637c7d
* Rewrite <fenv.h> for ARM.Elliott Hughes2012-11-053-589/+109
| | | | | | | The old code was one big no-op. Bug: http://code.google.com/p/android/issues/detail?id=38196 Change-Id: I201a6ffa477385b2629f45e8c948bdfbd47b5bf1
* Start cleaning up libm.Elliott Hughes2012-10-3150-3824/+7
| | | | | | | | | | | We have two copies of fenv.h for every architecture, one of which isn't used. We also have unused makefiles and files for architectures we don't support. This patch removes all the obviously useless files. Bug: http://code.google.com/p/android/issues/detail?id=38196 Change-Id: I1919b6621ba513aa24aa947a34815bc51191487c
* Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLSAndrew Hsieh2012-08-213-6/+9
| | | | | | | | Those are C funcitons Related CL: https://android-review.googlesource.com/#/c/41833/ Change-Id: I4386bcf948ad31c3690c9b7a145103088133d041
* Regenerate all NOTICE files with the latest version of the script.Elliott Hughes2012-08-151-233/+249
| | | | | | | This sorts every entry, so we should have more stability and fewer merge conflicts in future. Change-Id: Ifc5347dc53352da22c82d41ca59b483966fcfc6b
* Add dependencies on all the makefiles.Elliott Hughes2012-08-131-0/+2
| | | | | | | This should help prevent broken builds next time I'm messing with assembler/compiler/linker flags... Change-Id: I30f15a3ce3c3f3c60cad7bc59aaba9f42d792224