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

@ -36,10 +36,6 @@ long _lrint(double) asm("lrint");
long _lrintf(float) asm("lrintf");
long _lrintl(long double) asm("lrintl");
FIXTURE(intrin, disableHardwareExtensions) {
memset((/*unconst*/ void *)kCpuids, 0, sizeof(kCpuids));
}
TEST(round, testCornerCases) {
EXPECT_STREQ("-0", gc(xdtoa(_round(-0.0))));
EXPECT_STREQ("NAN", gc(xdtoa(_round(NAN))));
@ -218,10 +214,12 @@ TEST(lroundl, test) {
}
BENCH(round, bench) {
#ifdef __x86_64__
EZBENCH2("double+.5", donothing, EXPROPRIATE(VEIL("x", (double)(-3.5)) + .5));
EZBENCH2("float+.5f", donothing, EXPROPRIATE(VEIL("x", (float)(-3.5)) + .5));
EZBENCH2("ldbl+.5l", donothing,
EXPROPRIATE(VEIL("t", (long double)(-3.5)) + .5));
#endif
EZBENCH2("round", donothing, _round(.7)); /* ~4ns */
EZBENCH2("roundf", donothing, _roundf(.7)); /* ~3ns */
EZBENCH2("roundl", donothing, _roundl(.7)); /* ~8ns */