1/*	$OpenBSD: fpgetround.c,v 1.3 2016/07/26 19:07:09 guenther Exp $ */
2/*
3 * Written by J.T. Conklin, Apr 11, 1995
4 * Public domain.
5 */
6
7#include <ieeefp.h>
8
9fp_rnd
10fpgetround(void)
11{
12	int x;
13
14	__asm__("cfc1 %0,$31" : "=r" (x));
15	return x & 0x03;
16}
17DEF_WEAK(fpgetround);
18