From 5bd0838ff59a038135c0149516fae77be123eb31 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 8 Jan 2010 23:50:39 +0000 Subject: Merge r195025 from projects/mips to head by hand: r195025 | gonzo | 2009-06-25 19:01:50 -0600 (Thu, 25 Jun 2009) | 4 lines - Move fpgetXXX.c/fpsetXXX.c sources to hardfloat subdir/ to prevenmt them from being mixed up with lib/libc/softfloat files with the same names --- lib/libc/mips/gen/fpgetmask.c | 29 ----------------------- lib/libc/mips/gen/fpgetround.c | 29 ----------------------- lib/libc/mips/gen/fpgetsticky.c | 29 ----------------------- lib/libc/mips/gen/fpsetmask.c | 38 ------------------------------- lib/libc/mips/gen/fpsetround.c | 37 ------------------------------ lib/libc/mips/gen/fpsetsticky.c | 38 ------------------------------- lib/libc/mips/gen/hardfloat/fpgetmask.c | 29 +++++++++++++++++++++++ lib/libc/mips/gen/hardfloat/fpgetround.c | 29 +++++++++++++++++++++++ lib/libc/mips/gen/hardfloat/fpgetsticky.c | 29 +++++++++++++++++++++++ lib/libc/mips/gen/hardfloat/fpsetmask.c | 38 +++++++++++++++++++++++++++++++ lib/libc/mips/gen/hardfloat/fpsetround.c | 37 ++++++++++++++++++++++++++++++ lib/libc/mips/gen/hardfloat/fpsetsticky.c | 38 +++++++++++++++++++++++++++++++ 12 files changed, 200 insertions(+), 200 deletions(-) delete mode 100644 lib/libc/mips/gen/fpgetmask.c delete mode 100644 lib/libc/mips/gen/fpgetround.c delete mode 100644 lib/libc/mips/gen/fpgetsticky.c delete mode 100644 lib/libc/mips/gen/fpsetmask.c delete mode 100644 lib/libc/mips/gen/fpsetround.c delete mode 100644 lib/libc/mips/gen/fpsetsticky.c create mode 100644 lib/libc/mips/gen/hardfloat/fpgetmask.c create mode 100644 lib/libc/mips/gen/hardfloat/fpgetround.c create mode 100644 lib/libc/mips/gen/hardfloat/fpgetsticky.c create mode 100644 lib/libc/mips/gen/hardfloat/fpsetmask.c create mode 100644 lib/libc/mips/gen/hardfloat/fpsetround.c create mode 100644 lib/libc/mips/gen/hardfloat/fpsetsticky.c (limited to 'lib/libc/mips/gen') diff --git a/lib/libc/mips/gen/fpgetmask.c b/lib/libc/mips/gen/fpgetmask.c deleted file mode 100644 index 505a74c..0000000 --- a/lib/libc/mips/gen/fpgetmask.c +++ /dev/null @@ -1,29 +0,0 @@ -/* $NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ - -/* - * Written by J.T. Conklin, Apr 11, 1995 - * Public domain. - */ - -#include -__FBSDID("$FreeBSD$"); -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include "namespace.h" - -#include - -#ifdef __weak_alias -__weak_alias(fpgetmask,_fpgetmask) -#endif - -fp_except_t -fpgetmask() -{ - int x; - - __asm("cfc1 %0,$31" : "=r" (x)); - return (x >> 7) & 0x1f; -} diff --git a/lib/libc/mips/gen/fpgetround.c b/lib/libc/mips/gen/fpgetround.c deleted file mode 100644 index 6d0f11a..0000000 --- a/lib/libc/mips/gen/fpgetround.c +++ /dev/null @@ -1,29 +0,0 @@ -/* $NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ - -/* - * Written by J.T. Conklin, Apr 11, 1995 - * Public domain. - */ - -#include -__FBSDID("$FreeBSD$"); -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include "namespace.h" - -#include - -#ifdef __weak_alias -__weak_alias(fpgetround,_fpgetround) -#endif - -fp_rnd_t -fpgetround() -{ - int x; - - __asm("cfc1 %0,$31" : "=r" (x)); - return x & 0x03; -} diff --git a/lib/libc/mips/gen/fpgetsticky.c b/lib/libc/mips/gen/fpgetsticky.c deleted file mode 100644 index 8028261..0000000 --- a/lib/libc/mips/gen/fpgetsticky.c +++ /dev/null @@ -1,29 +0,0 @@ -/* $NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ - -/* - * Written by J.T. Conklin, Apr 11, 1995 - * Public domain. - */ - -#include -__FBSDID("$FreeBSD$"); -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include "namespace.h" - -#include - -#ifdef __weak_alias -__weak_alias(fpgetsticky,_fpgetsticky) -#endif - -fp_except_t -fpgetsticky() -{ - int x; - - __asm("cfc1 %0,$31" : "=r" (x)); - return (x >> 2) & 0x1f; -} diff --git a/lib/libc/mips/gen/fpsetmask.c b/lib/libc/mips/gen/fpsetmask.c deleted file mode 100644 index 7abb3fd..0000000 --- a/lib/libc/mips/gen/fpsetmask.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ - -/* - * Written by J.T. Conklin, Apr 11, 1995 - * Public domain. - */ - -#include -__FBSDID("$FreeBSD$"); -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include "namespace.h" - -#include - -#ifdef __weak_alias -__weak_alias(fpsetmask,_fpsetmask) -#endif - -fp_except_t -fpsetmask(mask) - fp_except_t mask; -{ - fp_except_t old; - fp_except_t new; - - __asm("cfc1 %0,$31" : "=r" (old)); - - new = old; - new &= ~(0x1f << 7); - new |= ((mask & 0x1f) << 7); - - __asm("ctc1 %0,$31" : : "r" (new)); - - return (old >> 7) & 0x1f; -} diff --git a/lib/libc/mips/gen/fpsetround.c b/lib/libc/mips/gen/fpsetround.c deleted file mode 100644 index 0205161..0000000 --- a/lib/libc/mips/gen/fpsetround.c +++ /dev/null @@ -1,37 +0,0 @@ -/* $NetBSD: fpsetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ - -/* - * Written by J.T. Conklin, Apr 11, 1995 - * Public domain. - */ - -#include -__FBSDID("$FreeBSD$"); -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include "namespace.h" - -#include - -#ifdef __weak_alias -__weak_alias(fpsetround,_fpsetround) -#endif - -fp_rnd_t -fpsetround(fp_rnd_t rnd_dir) -{ - fp_rnd_t old; - fp_rnd_t new; - - __asm("cfc1 %0,$31" : "=r" (old)); - - new = old; - new &= ~0x03; - new |= (rnd_dir & 0x03); - - __asm("ctc1 %0,$31" : : "r" (new)); - - return old & 0x03; -} diff --git a/lib/libc/mips/gen/fpsetsticky.c b/lib/libc/mips/gen/fpsetsticky.c deleted file mode 100644 index e433671..0000000 --- a/lib/libc/mips/gen/fpsetsticky.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $NetBSD: fpsetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ - -/* - * Written by J.T. Conklin, Apr 11, 1995 - * Public domain. - */ - -#include -__FBSDID("$FreeBSD$"); -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include "namespace.h" - -#include - -#ifdef __weak_alias -__weak_alias(fpsetsticky,_fpsetsticky) -#endif - -fp_except -fpsetsticky(sticky) - fp_except sticky; -{ - fp_except old; - fp_except new; - - __asm("cfc1 %0,$31" : "=r" (old)); - - new = old; - new &= ~(0x1f << 2); - new |= ((sticky & 0x1f) << 2); - - __asm("ctc1 %0,$31" : : "r" (new)); - - return (old >> 2) & 0x1f; -} diff --git a/lib/libc/mips/gen/hardfloat/fpgetmask.c b/lib/libc/mips/gen/hardfloat/fpgetmask.c new file mode 100644 index 0000000..505a74c --- /dev/null +++ b/lib/libc/mips/gen/hardfloat/fpgetmask.c @@ -0,0 +1,29 @@ +/* $NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpgetmask,_fpgetmask) +#endif + +fp_except_t +fpgetmask() +{ + int x; + + __asm("cfc1 %0,$31" : "=r" (x)); + return (x >> 7) & 0x1f; +} diff --git a/lib/libc/mips/gen/hardfloat/fpgetround.c b/lib/libc/mips/gen/hardfloat/fpgetround.c new file mode 100644 index 0000000..6d0f11a --- /dev/null +++ b/lib/libc/mips/gen/hardfloat/fpgetround.c @@ -0,0 +1,29 @@ +/* $NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpgetround,_fpgetround) +#endif + +fp_rnd_t +fpgetround() +{ + int x; + + __asm("cfc1 %0,$31" : "=r" (x)); + return x & 0x03; +} diff --git a/lib/libc/mips/gen/hardfloat/fpgetsticky.c b/lib/libc/mips/gen/hardfloat/fpgetsticky.c new file mode 100644 index 0000000..8028261 --- /dev/null +++ b/lib/libc/mips/gen/hardfloat/fpgetsticky.c @@ -0,0 +1,29 @@ +/* $NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpgetsticky,_fpgetsticky) +#endif + +fp_except_t +fpgetsticky() +{ + int x; + + __asm("cfc1 %0,$31" : "=r" (x)); + return (x >> 2) & 0x1f; +} diff --git a/lib/libc/mips/gen/hardfloat/fpsetmask.c b/lib/libc/mips/gen/hardfloat/fpsetmask.c new file mode 100644 index 0000000..7abb3fd --- /dev/null +++ b/lib/libc/mips/gen/hardfloat/fpsetmask.c @@ -0,0 +1,38 @@ +/* $NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpsetmask,_fpsetmask) +#endif + +fp_except_t +fpsetmask(mask) + fp_except_t mask; +{ + fp_except_t old; + fp_except_t new; + + __asm("cfc1 %0,$31" : "=r" (old)); + + new = old; + new &= ~(0x1f << 7); + new |= ((mask & 0x1f) << 7); + + __asm("ctc1 %0,$31" : : "r" (new)); + + return (old >> 7) & 0x1f; +} diff --git a/lib/libc/mips/gen/hardfloat/fpsetround.c b/lib/libc/mips/gen/hardfloat/fpsetround.c new file mode 100644 index 0000000..0205161 --- /dev/null +++ b/lib/libc/mips/gen/hardfloat/fpsetround.c @@ -0,0 +1,37 @@ +/* $NetBSD: fpsetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpsetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpsetround,_fpsetround) +#endif + +fp_rnd_t +fpsetround(fp_rnd_t rnd_dir) +{ + fp_rnd_t old; + fp_rnd_t new; + + __asm("cfc1 %0,$31" : "=r" (old)); + + new = old; + new &= ~0x03; + new |= (rnd_dir & 0x03); + + __asm("ctc1 %0,$31" : : "r" (new)); + + return old & 0x03; +} diff --git a/lib/libc/mips/gen/hardfloat/fpsetsticky.c b/lib/libc/mips/gen/hardfloat/fpsetsticky.c new file mode 100644 index 0000000..e433671 --- /dev/null +++ b/lib/libc/mips/gen/hardfloat/fpsetsticky.c @@ -0,0 +1,38 @@ +/* $NetBSD: fpsetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpsetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpsetsticky,_fpsetsticky) +#endif + +fp_except +fpsetsticky(sticky) + fp_except sticky; +{ + fp_except old; + fp_except new; + + __asm("cfc1 %0,$31" : "=r" (old)); + + new = old; + new &= ~(0x1f << 2); + new |= ((sticky & 0x1f) << 2); + + __asm("ctc1 %0,$31" : : "r" (new)); + + return (old >> 2) & 0x1f; +} -- cgit v1.1