NetBSD/lib/libc/arch/ns32k/gen/fpgetround.c
thorpej 5d3e829423 Add internal names for fp{get,set}{mask,round,sticky}(), and
externally-visible weak aliases for the internal names.
2002-01-13 21:45:39 +00:00

30 lines
518 B
C

/* $NetBSD: fpgetround.c,v 1.4 2002/01/13 21:45:46 thorpej Exp $ */
/*
* Written by J.T. Conklin, Apr 28, 1995
* Public domain.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: fpgetround.c,v 1.4 2002/01/13 21:45:46 thorpej Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
#include <ieeefp.h>
#include <machine/cpufunc.h>
#ifdef __weak_alias
__weak_alias(fpgetround,_fpgetround)
#endif
fp_rnd
fpgetround()
{
int x;
sfsr(x);
return (x >> 7) & 0x03;
}