Provide a stub aeabi.read_tp on other archs

Using "#if defined(...)" inside the test body seems to be the convention.

Bug: none
Test: bionic-unit-tests
Change-Id: Icb348a1184e630c5e199129bbe2090fd1e490fa5
This commit is contained in:
Ryan Prichard 2019-01-09 15:55:41 -08:00
parent 2e724175ac
commit 073fffde09
1 changed files with 8 additions and 3 deletions

View File

@ -32,7 +32,12 @@
#if defined(__arm__)
extern "C" void* __aeabi_read_tp();
TEST(aeabi, read_tp) {
ASSERT_EQ(__aeabi_read_tp(), static_cast<void*>(__get_tls()));
}
#endif
TEST(aeabi, read_tp) {
#if defined(__arm__)
ASSERT_EQ(__aeabi_read_tp(), static_cast<void*>(__get_tls()));
#else
GTEST_LOG_(INFO) << "__aeabi_read_tp is only available on arm32.\n";
#endif
}