--- /dev/null
+#include <math.h>
+
+double rint(double x)
+{
+ __asm__ ("frndint" : "+t"(x));
+ return x;
+}
+++ /dev/null
-.global rint
-.type rint,@function
-rint:
- fldl 4(%esp)
- frndint
- ret
--- /dev/null
+#include <math.h>
+
+float rintf(float x)
+{
+ __asm__ ("frndint" : "+t"(x));
+ return x;
+}
+++ /dev/null
-.global rintf
-.type rintf,@function
-rintf:
- flds 4(%esp)
- frndint
- ret
--- /dev/null
+#include <math.h>
+
+long double rintl(long double x)
+{
+ __asm__ ("frndint" : "+t"(x));
+ return x;
+}
+++ /dev/null
-.global rintl
-.type rintl,@function
-rintl:
- fldt 4(%esp)
- frndint
- ret
--- /dev/null
+#include <math.h>
+
+long double rintl(long double x)
+{
+ __asm__ ("frndint" : "+t"(x));
+ return x;
+}
+++ /dev/null
-.global rintl
-.type rintl,@function
-rintl:
- fldt 8(%rsp)
- frndint
- ret