Commit graph

18 commits

Author SHA1 Message Date
Elliott Hughes
2f5829b55d Remove <fenv.h> inlines for obsolete API levels.
The next NDK to take these headers only supports API 21 and later, so
clean up some of the trivial cruft.

Test: treehugger
Change-Id: Ib735a776d244cc82858f2ed629dd63a54dbaf650
2023-02-24 00:16:41 +00:00
Elliott Hughes
47aa5b93fe libm: remove hand-written assembler for arm32 too.
The clang builtins for arm32 give us identical code to what we had for
sqrt()/sqrtf(), and significantly better (neon) code for
floor()/floorf() than the integer-only implementations we had.

Test: llvm-objdump
Change-Id: I224bcfcf4739a80e1a7cdd07b0b1fa232fdf2dab
2023-02-03 01:21:12 +00:00
Elliott Hughes
222ce95c8a Remove ARM/MIPS fenv duplication.
Bug: http://b/32709207
Test: ran tests
Change-Id: I58d354e9f8b1e6023427ba271bf39e4e24b7f8ab
2018-08-30 09:26:43 -07:00
Elliott Hughes
b6c7f6e595 Fix arm/arm64 <fenv.h> to match current reality.
ARM stopped supporting enabling of FP exceptions years ago.

Bug: http://b/68832485
Test: ran tests
Change-Id: I8450baa78e04d994c352180975b0a1ecd5a9f662
2017-11-03 16:46:32 -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
Christopher Ferris
995b813e91 For libm, use a macro for aliasing symbols.
Change-Id: Ibd42ebc387c2bf3eba9aa96091770915b4b34184
2015-03-13 23:57:15 -07: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
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
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
Calin Juravle
1abc9ff6a5 Clean-up _fpmath and fake_long_doubles
- 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
2014-04-23 19:03:06 +01:00
Calin Juravle
2d367905a2 Moved to a more openbsd-like fenv.h
Factored out common declarations to include/fenv.h and pushed
the implementation to .c files.

Bug: 11050744
Change-Id: I446b13cc4bc599d328343a8d392b07de280f6304
2014-02-26 12:30:44 +00:00
Elliott Hughes
a0ee07829a Upgrade libm.
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
2013-02-01 14:51:19 -08:00
Elliott Hughes
90e10d41c4 Rewrite <fenv.h> for ARM.
The old code was one big no-op.

Bug: http://code.google.com/p/android/issues/detail?id=38196
Change-Id: I201a6ffa477385b2629f45e8c948bdfbd47b5bf1
2012-11-05 08:50:19 -08:00
Elliott Hughes
0f7809d5c3 Start cleaning up libm.
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
2012-10-31 13:32:34 -07:00
Andrew Hsieh
2f7d7c6538 Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS
Those are C funcitons

Related CL: https://android-review.googlesource.com/#/c/41833/

Change-Id: I4386bcf948ad31c3690c9b7a145103088133d041
2012-08-21 15:41:34 +08:00
The Android Open Source Project
1dc9e472e1 auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
The Android Open Source Project
1767f908af auto import from //depot/cupcake/@135843 2009-03-03 18:28:13 -08:00
The Android Open Source Project
a27d2baa0c Initial Contribution 2008-10-21 07:00:00 -07:00