NetBSD/lib/libc/arch/mips/gen/fpgetround.c

18 lines
245 B
C

/* $NetBSD: fpgetround.c,v 1.2 1996/09/16 18:10:45 jonathan Exp $ */
/*
* Written by J.T. Conklin, Apr 11, 1995
* Public domain.
*/
#include <ieeefp.h>
fp_rnd
fpgetround()
{
int x;
__asm__("cfc1 %0,$31" : "=r" (x));
return x & 0x03;
}