1 2 3 4 5 6 7
#include <math.h> double nearbyint(double x) { __asm__ ("frinti %d0, %d1" : "=w"(x) : "w"(x)); return x; }