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