Fix mdoc(7)/man(7) mix up.
[netbsd-mini2440.git] / lib / libc / arch / ia64 / gen / flt_rounds.c
bloba48a4237603c34ab02f3effcc2344de1f4ce10c6
1 /*
2 * Written by J.T. Conklin, Apr 10, 1995
3 * Public domain.
4 */
6 #include <sys/cdefs.h>
7 /* __FBSDID("$FreeBSD: src/lib/libc/ia64/gen/flt_rounds.c,v 1.1 2004/07/19 08:17:24 das Exp $"); */
9 #include <float.h>
11 static const int map[] = {
12 1, /* round to nearest */
13 3, /* round to zero */
14 2, /* round to negative infinity */
15 0 /* round to positive infinity */
18 int
19 __flt_rounds(void)
21 int x;
23 __asm("mov %0=ar.fpsr" : "=r" (x));
24 return (map[(x >> 10) & 0x03]);