about summary refs log tree commit diff
path: root/src/math/aarch64/lrintf.c
blob: 4d750d699d505f3319edfd765c88a65eb84cdab1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include <math.h>

long lrintf(float x)
{
	long n;
	__asm__ (
		"frintx %s1, %s1\n"
		"fcvtzs %x0, %s1\n" : "=r"(n), "+w"(x));
	return n;
}