From 4d23a3a1e4929fb9ae50da0a0cc6224e36682889 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 3 Mar 1999 07:06:17 +0000 Subject: Bring in initial libc support for mips. These files were taken from the OpenBSD tree and should be considered preliminary. They are here to facilitate building of the tree. --- lib/libc/mips/gen/fpgetround.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/libc/mips/gen/fpgetround.c (limited to 'lib/libc/mips/gen/fpgetround.c') diff --git a/lib/libc/mips/gen/fpgetround.c b/lib/libc/mips/gen/fpgetround.c new file mode 100644 index 0000000..565f7c8 --- /dev/null +++ b/lib/libc/mips/gen/fpgetround.c @@ -0,0 +1,19 @@ +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char rcsid[] = "$OpenBSD$"; +#endif /* LIBC_SCCS and not lint */ + +#include + +fp_rnd +fpgetround() +{ + int x; + + __asm__("cfc1 %0,$31" : "=r" (x)); + return x & 0x03; +} -- cgit v1.1