blob: 6d88954d72f153e9592dcc06f8ff54f3dfeb2ff5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* $OpenBSD: fpgetround.c,v 1.2 2005/08/07 16:40:15 espie 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;
}
|