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

18 lines
250 B
C
Raw Normal View History

1998-09-11 08:56:19 +04:00
/* $NetBSD: fpgetround.c,v 1.1 1998/09/11 04:56:24 eeh Exp $ */
/*
* Written by J.T. Conklin, Apr 10, 1995
* Public domain.
*/
#include <ieeefp.h>
fp_rnd
fpgetround()
{
int x;
__asm__("st %%fsr,%0" : "=m" (*&x));
return (x >> 30) & 0x03;
}