From 51f4f8c512d682fe0c1a7a891909e75f416f20f6 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Tue, 14 Jan 2020 14:53:38 +0300 Subject: math: move x87-family rint functions to C with inline asm --- src/math/x86_64/rintl.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/math/x86_64/rintl.c (limited to 'src/math/x86_64/rintl.c') diff --git a/src/math/x86_64/rintl.c b/src/math/x86_64/rintl.c new file mode 100644 index 00000000..e1a92077 --- /dev/null +++ b/src/math/x86_64/rintl.c @@ -0,0 +1,7 @@ +#include + +long double rintl(long double x) +{ + __asm__ ("frndint" : "+t"(x)); + return x; +} -- cgit v1.2.1