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/i386/rint.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/math/i386/rint.c (limited to 'src/math/i386/rint.c') diff --git a/src/math/i386/rint.c b/src/math/i386/rint.c new file mode 100644 index 00000000..a5276a60 --- /dev/null +++ b/src/math/i386/rint.c @@ -0,0 +1,7 @@ +#include + +double rint(double x) +{ + __asm__ ("frndint" : "+t"(x)); + return x; +} -- cgit v1.2.3