Commit graph

15 commits

Author SHA1 Message Date
Zijun
eae85ad155 Fix anonymous class error
Fail to compile bionic/tests/complex_test.cpp when updating compiler due
to the conflict.

Bug: b/346349678
Test: change the clang version and then run mm to build
Change-Id: Ic22b7325b6e52006e620e13944f3f1d76030d782
2024-06-10 19:49:06 +00:00
Elliott Hughes
8fc6fcdfab <complex.h>: stop using __INTRODUCED_IN_(32|64).
Although the existing annotations were strictly true (see
https://github.com/android/ndk/issues/1888#issuecomment-1581773348 for
the gory details), given the Play Store requirement that 32-bit code
must have a 64-bit version, it's not obviously useful to offer a
function for 32-bit before 64-bit.

Test: treehugger
Change-Id: I8ca11b874c26dfaa632690f510cb5409d95012e9
2023-06-12 10:22:12 -07:00
Elliott Hughes
ab2d3e1049 Remove __RENAME_LDBL.
Discussion of this during my recent minor cleanup convinced me that we
should just remove __RENAME_LDBL. There's no obvious benefit to being
able to build something for 32-bit if you can't build the same code for
64-bit, given that most new hardware (and entire verticals such as Auto)
are 64-bit-only, and the Play Store requires any app with 32-bit code to
also ship 64-bit code.

Test: treehugger
Change-Id: I1c5503b968ca66925d7bd125bd3630c41ec1bfd0
2023-06-07 17:20:53 +00:00
Elliott Hughes
5270017ab3 Remove __INTRODUCED_IN_FUTURE.
This hasn't been particularly useful, we haven't used it consistently,
and it has caused trouble.

Test: builds
Change-Id: Ic5b5b5124af98aa8301e602fd75b0eb72a5fc7f6
2019-03-14 13:34:21 -07:00
Elliott Hughes
505ecd6909 libm: add tests that would have caught the recent regression.
Bug: http://b/111710419
Test: ran tests
Change-Id: I00ec8ef24fb4c2cfef7c9cef311bbd6c755993e1
2018-07-23 14:25:36 -07:00
Yi Kong
43ccab85ff Fix complex number printing rules
Prettifies the complex number debug printing and workaround Clang's
implicit complex to real casting bug.

Bug: 71638783
Test: mma
Change-Id: I0482044ade136fa4cc44aaa0bb515061b40e1f76
2018-01-05 16:26:38 -08:00
Elliott Hughes
50cda38f1d Use __RENAME for long double functions.
We can cut a lot of stuff out of the NDK's libandroid_support with this,
and reduce unnecessary relocations for all LP32 code. LP64 code should
be unaffected.

Bug: https://issuetracker.google.com/64450768
Bug: https://github.com/android-ndk/ndk/issues/507
Test: ran tests, plus manual readelf on the _test.o files
Change-Id: I3de6015921195304ea9c829ef31665cd34664066
2017-09-14 16:10:43 -07:00
Dan Albert
b2ca03140d Fix include to be file-relative.
Discovered while trying to build this with the NDK.

Test: make checkbuild
Bug: None
Change-Id: Id5289065d7a1b36f20b0963b38b6ef4dc1d461b9
2017-08-07 16:28:13 -07:00
Elliott Hughes
e9719f3fb5 Fix complex.csqrtf test and add a trivial sincosl test.
sincos and sincosf are being tested more thoroughly with a table of data,
but there's nothing equivalent for sincosl.

Test: ran the tests, obviously.
Change-Id: I5b4b22b73cad9b0030549de2e2ed2a0e38648806
2016-09-26 09:35:04 -07:00
Josh Gao
34c599a8b0 Add __INTRODUCED_IN_FUTURE for unreleased APIs.
Future API levels aren't known (e.g. 25 could be a maintenance release
of N that doesn't contain any bionic updates), so use a placeholder
macro that we can find and replace with the actual API level before each
release.

Bug: http://b/28178111
Change-Id: I667fe53ea1ac49b64135170fc30d5dbe9df94e29
2016-04-29 16:39:50 -07:00
Josh Gao
5a3d5cac64 Add __INTRODUCED_IN_{32,64}.
Some symbols appeared at different times between 32 and 64 bit. Add a
macro to represent this.

Bug: http://b/28178111
Change-Id: I0aa46d9da3c7301b60df0416bce252f0f37b7b36
2016-04-29 16:39:50 -07:00
Josh Gao
ff504e63ee Add __INTRODUCED_IN hack to complex test.
complex_test.cpp is compiled with both bionic and glibc, so when
__INTRODUCED_IN starts being used in <complex.h>, we'll need this to
keep it building.

Bug: http://b/28178111
Change-Id: I6431111be35288cad72e9c23ca8599f548b6d906
2016-04-29 16:39:50 -07:00
Elliott Hughes
afe835d540 Move math headers in with the other headers.
Keeping them separate is a pain for the NDK, and doesn't help the platform.

Change-Id: I96b8beef307d4a956e9c0a899ad9315adc502582
2016-04-02 08:36:33 -07:00
Elliott Hughes
9ee6adb003 Add missing <complex.h> functions.
FreeBSD doesn't seem interested in having low-quality implementations of
these functions:

  cacoshl, cacosl, casinhl, casinl, catanhl, catanl, ccoshl, ccosl, cexpl,
  clog, clogf, clogl, cpow, cpowf, cpowl, csinhl, csinl, ctanhl, ctanl.

And they still haven't got round to writing good implementations, so for
now let's just take the NetBSD ones so we have the full set.

Bug: http://b/27555792
Change-Id: I6b72003cf749b1043f006377a01fffe5e1d659bc
2016-03-11 15:03:25 -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