mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Get libc/tinymath/ compiling on aarch64
This commit is contained in:
parent
2b73e72d59
commit
135080fd3e
243 changed files with 7773 additions and 4027 deletions
|
@ -18,6 +18,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/math.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
#include "libc/testlib/ezbench.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/x/x.h"
|
||||
|
||||
|
@ -48,3 +49,12 @@ TEST(sqrtf, test) {
|
|||
EXPECT_STREQ("INFINITY", gc(xdtoaf(sqrtf(INFINITY))));
|
||||
EXPECT_STREQ("-NAN", gc(xdtoaf(sqrtf(-1))));
|
||||
}
|
||||
|
||||
BENCH(sqrt, bench) {
|
||||
double _sqrt(double) asm("sqrt");
|
||||
float _sqrtf(float) asm("sqrtf");
|
||||
long double _sqrtl(long double) asm("sqrtl");
|
||||
EZBENCH2("sqrt", donothing, _sqrt(.7)); /* ~5ns */
|
||||
EZBENCH2("sqrtf", donothing, _sqrtf(.7)); /* ~5ns */
|
||||
EZBENCH2("sqrtl", donothing, _sqrtl(.7)); /* ~28ns */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue