summaryrefslogtreecommitdiffstats
path: root/libm
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Auto-generate a complete NOTICE file.Elliott Hughes2012-08-091-356/+680
| | | | | | | Remove the hand-collated ones, and switch to a script that pulls the copyright headers out of every file and collects the unique ones. Change-Id: Ied3b98b3f56241df97166c410ff81de4e0157c9d
* Had include/arm/fenv.h, but missed include/mips/fenv.h.Shih-wei Liao2012-07-301-0/+217
| | | | | | | Needed for the device-build for LLVM's constant folding pass. Change-Id: I412a98d52458231650801a8b59fe3159a789b8b9 Author: fu@mips.com
* Enable sqrtf() x86 assembly codexqian62012-06-251-4/+6
| | | | | | This patch can improve the sqrtf() performance. Change-Id: Ic9d11d6a9ecd9b263f54d4878e13595e136b95ce
* Remove the last references to SuperH.Elliott Hughes2012-05-153-328/+0
| | | | Change-Id: Icb44c1f94cb178d90b4c2b1e8f6d175586aec4e1
* MIPS support to libm, libdl and libthread_dbChris Dearman2012-05-045-7/+330
| | | | | Change-Id: I9106721af7fe0cd45df82976250db0d300a20117 Signed-off-by: Raghu Gandham <raghu@mips.com>
* Update s_fabsl.c to upstream head.Elliott Hughes2012-04-301-2/+2
| | | | | Bug: http://code.google.com/p/android/issues/detail?id=29539 Change-Id: I843dcfcbfe49e8e9f43c49aae6ade1edb57a3053
* libm: fix invalid result of function remquo/remquofJack Ren2012-04-102-6/+8
| | | | | | | | | | | | | | | | | | | Currently we will get the wrong result as follows: remquof(0x7bb33336, 0x63000000) = -671088640, 0x00000000 remquo(0xbff0000000000003, 0x3ff0000000000003) = 1, 0x8000000000000000 remquo(0x9120000000000001, 0x0000000000000005) = -1288490188, 0x0000000000000004 while the correct one should be: remquof(0x7bb33336, 0x63000000) = 1476395008, 0x00000000 remquo(0xbff0000000000003, 0x3ff0000000000003) = -1, 0x8000000000000000 remquo(0x9120000000000001, 0x0000000000000005) = -1288490189, 0x0000000000000001 Fixed in this patch. Change-Id: I540b348cd10a539f3b39b1753945c893c4c7ec46 Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com> Signed-off-by: Jin Wei <wei.a.jin@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* libm: cherry-pick one patch from freebsd to fix logb() denormals issueJack Ren2012-02-281-2/+2
| | | | | | | | | | | | | | | | from http://svnweb.freebsd.org/base?view=revision&revision=176101 " Oops, fix the fix in rev.1.10. logb() and logbf() were broken on denormals, and logb() remained broken after 1.10 because the fix for logbf() was incompletely translated. Convert to __FBSDID(). " Change-Id: I54f33648db7c421b06eee1ea8e63c57a179fae0d Signed-off-by: Jack Ren <jack.ren@intel.com> Signed-off-by: Jin Wei <wei.a.jin@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* remove obsolete SuperH supportDavid 'Digit' Turner2012-01-311-11/+1
| | | | | | | | | | | | | | | | | | | We don't have a toolchain anymore, we don't have working original kernel headers, and nobody is maintaining this so there is really no point in keeping this here. Details of the patch: - removed code paths from Android.mk files related to the SuperH architecture ("sh") - removed libc/arch-sh, linker/arch-sh, libc/kernel/arch-sh - simplified libc/SYSCALLS.TXT - simplified the scripts in libc/tools/ and libc/kernel/tools Change-Id: I26b0e1422bdc347489e4573e2fbec0e402f75560 Signed-off-by: David 'Digit' Turner <digit@android.com>
* am 32ca348e: am ce0d646c: resolved conflicts for merge of 6cda7b62 to ↵David 'Digit' Turner2011-09-292-207/+246
|\ | | | | | | | | | | | | gingerbread-plus-aosp * commit '32ca348eecb114b9b2a9393f178c82310f590ddb': Bionic: x86: Fix libm macro definitions
| * resolved conflicts for merge of 6cda7b62 to gingerbread-plus-aospDavid 'Digit' Turner2011-09-302-207/+246
| |\ | | | | | | | | | Change-Id: I85bd5291c2a9cd29bff538b6d5a4dcd73f85a1fd
| | * Bionic: x86: Fix libm macro definitionsBruce Beare2011-09-292-206/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://code.google.com/p/android/issues/detail?id=19276 GCC would remove inline asm due to lack of knowledge of FPU register changes. Change-Id: I9f9e8623fa6580843b7cd8178439ace8c2db2d51 Signed-off-by: Mark D Horn <mark.d.horn@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Author: Jingwei Zhang <jingwei.zhang@intel.com>
| | * Remove extra/unneeded copy of fenv.hBruce Beare2011-07-071-240/+0
| | | | | | | | | | | | | | | Orig-Change-Id: I80da2521c50df7e8967af48164cc834abf499c50 Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
| | * Use proper variable typingBruce Beare2011-07-072-3/+5
| | | | | | | | | | | | | | | Orig-Change-Id: If5c33d90b33f538448ac12e7bee94b4b9173d39c Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* | | Disable sincos optimization for sincos calls.Jing Yu2011-08-171-0/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sincos() functions would be turned into infinite calls to itself if sincos optimization is applied to itself. See gcc bugzilla http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46926 arm-linux-androideabi-4.4.3 toolchain does not have this problem because sincos optimization is entirely disabled. Starting from arm-linux-androideabi-4.6 toolchain, we enable sincos optimization in gcc. This patch simply enforce -O0 on this function to minimize the change. Change-Id: I0fc00b5f1dd71c0a024943bdedfed29b0d195e82
* | libm: Add nanf() and tgammaf() implementations.David 'Digit' Turner2011-01-254-0/+179
| | | | | | | | | | | | Requested by b/3370708 to export these through RenderScript. Change-Id: I1ae69f87a1ad4765b2dee8e4a6f2f3a6eb7c5ad4
* | android-x86: use proper variable typingChih-Wei Huang2010-12-231-1/+2
| | | | | | | | Change-Id: Iff99932acd2f6cb482fc5da9ff586d7ab2a8b209
* | am 9691ecc9: Merge "Remove extra/unneeded copy of fenv.h"David Turner2010-12-141-240/+0
|\ \ | | | | | | | | | | | | * commit '9691ecc9a768e7e08cb6af0b454029195ffc285f': Remove extra/unneeded copy of fenv.h