Port a lot more code to AARCH64

- Introduce epoll_pwait()
- Rewrite -ftrapv and ffs() libraries in C code
- Use more FreeBSD code in math function library
- Get significantly more tests passing on qemu-aarch64
- Fix many Musl long double functions that were broken on AARCH64
This commit is contained in:
Justine Tunney 2023-05-14 09:32:15 -07:00
parent 91791e9f38
commit 550b52abf6
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
158 changed files with 6018 additions and 3499 deletions

View file

@ -29,8 +29,8 @@ TEST(log2l, test) {
EXPECT_STREQ("INFINITY", gc(xdtoal(log2l(INFINITY))));
EXPECT_STREQ("-INFINITY", gc(xdtoal(log2l(0))));
EXPECT_STREQ("-INFINITY", gc(xdtoal(log2l(-0.))));
EXPECT_STREQ("-NAN", gc(xdtoal(log2l(-1))));
EXPECT_STREQ("-NAN", gc(xdtoal(log2l(-2))));
EXPECT_TRUE(isnan(log2l(-1)));
EXPECT_TRUE(isnan(log2l(-2)));
}
TEST(log2, test) {
@ -41,8 +41,8 @@ TEST(log2, test) {
EXPECT_STREQ("INFINITY", gc(xdtoa(log2(INFINITY))));
EXPECT_STREQ("-INFINITY", gc(xdtoa(log2(0))));
EXPECT_STREQ("-INFINITY", gc(xdtoa(log2(-0.))));
EXPECT_STREQ("-NAN", gc(xdtoa(log2(-1))));
EXPECT_STREQ("-NAN", gc(xdtoa(log2(-2))));
EXPECT_TRUE(isnan(log2(-1)));
EXPECT_TRUE(isnan(log2(-2)));
}
TEST(log2f, test) {
@ -52,15 +52,15 @@ TEST(log2f, test) {
EXPECT_STREQ("INFINITY", gc(xdtoaf(log2f(INFINITY))));
EXPECT_STREQ("-INFINITY", gc(xdtoaf(log2f(0))));
EXPECT_STREQ("-INFINITY", gc(xdtoaf(log2f(-0.))));
EXPECT_STREQ("-NAN", gc(xdtoaf(log2f(-1))));
EXPECT_STREQ("-NAN", gc(xdtoaf(log2f(-2))));
EXPECT_TRUE(isnan(log2f(-1)));
EXPECT_TRUE(isnan(log2f(-2)));
}
BENCH(log2, bench) {
double _log2(double) asm("log2");
float _log2f(float) asm("log2f");
long double _log2l(long double) asm("log2l");
EZBENCH2("log2", donothing, _log2(.7)); /* ~9ns */
EZBENCH2("log2f", donothing, _log2f(.7)); /* ~6ns */
EZBENCH2("log2l", donothing, _log2l(.7)); /* ~21ns */
EZBENCH2("log2", donothing, _log2(.7)); // ~8ns
EZBENCH2("log2f", donothing, _log2f(.7)); // ~6ns
EZBENCH2("log2l", donothing, _log2l(.7)); // ~21ns
}