Make further progress on non-x86 support

This commit is contained in:
Justine Tunney 2023-05-08 21:38:30 -07:00
parent aef9a69a60
commit 036b9a0002
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
155 changed files with 2307 additions and 653 deletions

View file

@ -35,6 +35,9 @@ Copyright 2005-2014 Rich Felker, et. al.\"");
asm(".include \"libc/disclaimer.inc\"");
// clang-format off
/**
* Returns largest integral value not greater than 𝑥.
*/
long double floorl(long double x) {
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
return floor(x);
@ -60,5 +63,7 @@ long double floorl(long double x) {
if (y > 0)
return x + y - 1;
return x + y;
#else
#error "architecture unsupported"
#endif
}