summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/math/aarch64/llrint.c
blob: a9e07a93f18f74c8f752b0503e8558f6ba7a0e2f (plain)
1
2
3
4
5
6
7
8
9
10
#include <math.h>

long long llrint(double x)
{
	long long n;
	__asm__ (
		"frintx %d1, %d1\n"
		"fcvtzs %x0, %d1\n" : "=r"(n), "+w"(x));
	return n;
}