-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Description
#include <fenv.h>
#include <math.h>
__attribute__((const))
long double myrintl(long double x);
long double nearbyintl(long double x) {
fenv_t e;
fegetenv(&e);
long double result = rintl(x);
fesetenv(&e);
return result;
}clang++ -O3
nearbyintl:
sub sp, sp, #48
stp x29, x30, [sp, #32]
add x29, sp, #32
sub x0, x29, #8
str q0, [sp]
bl fegetenv
sub x0, x29, #8
bl fesetenv
ldr q0, [sp]
ldp x29, x30, [sp, #32]
add sp, sp, #48
b rintl // moved here.