1 /* 2 * Written by J.T. Conklin, Apr 11, 1995 3 * Public domain. 4 */ 5 6 #include <ieeefp.h> 7 8 fp_rnd 9 fpgetround() 10 { 11 int x; 12 13 __asm__("cfc1 %0,$31" : "=r" (x)); 14 return x & 0x03; 15 } 16