Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/mips/gen Convert to C89 definitions.
details: https://anonhg.NetBSD.org/src/rev/cb24fa34fb66
branches: trunk
changeset: 778216:cb24fa34fb66
user: matt <matt%NetBSD.org@localhost>
date: Mon Mar 19 22:23:10 2012 +0000
description:
Convert to C89 definitions.
Cleanup up type usage.
diffstat:
lib/libc/arch/mips/gen/fpgetmask.c | 8 ++++----
lib/libc/arch/mips/gen/fpgetround.c | 8 ++++----
lib/libc/arch/mips/gen/fpgetsticky.c | 8 ++++----
lib/libc/arch/mips/gen/fpsetmask.c | 10 ++++------
lib/libc/arch/mips/gen/fpsetround.c | 12 +++++-------
lib/libc/arch/mips/gen/fpsetsticky.c | 12 +++++-------
6 files changed, 26 insertions(+), 32 deletions(-)
diffs (205 lines):
diff -r 398608ce026b -r cb24fa34fb66 lib/libc/arch/mips/gen/fpgetmask.c
--- a/lib/libc/arch/mips/gen/fpgetmask.c Mon Mar 19 16:20:58 2012 +0000
+++ b/lib/libc/arch/mips/gen/fpgetmask.c Mon Mar 19 22:23:10 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */
+/* $NetBSD: fpgetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */
/*
* Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpgetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,9 +19,9 @@
#endif
fp_except
-fpgetmask()
+fpgetmask(void)
{
- int x;
+ fp_except x;
__asm("cfc1 %0,$31" : "=r" (x));
return (x >> 7) & 0x1f;
diff -r 398608ce026b -r cb24fa34fb66 lib/libc/arch/mips/gen/fpgetround.c
--- a/lib/libc/arch/mips/gen/fpgetround.c Mon Mar 19 16:20:58 2012 +0000
+++ b/lib/libc/arch/mips/gen/fpgetround.c Mon Mar 19 22:23:10 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */
+/* $NetBSD: fpgetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */
/*
* Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpgetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,9 +19,9 @@
#endif
fp_rnd
-fpgetround()
+fpgetround(void)
{
- int x;
+ fp_rnd x;
__asm("cfc1 %0,$31" : "=r" (x));
return x & 0x03;
diff -r 398608ce026b -r cb24fa34fb66 lib/libc/arch/mips/gen/fpgetsticky.c
--- a/lib/libc/arch/mips/gen/fpgetsticky.c Mon Mar 19 16:20:58 2012 +0000
+++ b/lib/libc/arch/mips/gen/fpgetsticky.c Mon Mar 19 22:23:10 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */
+/* $NetBSD: fpgetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */
/*
* Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpgetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,9 +19,9 @@
#endif
fp_except
-fpgetsticky()
+fpgetsticky(void)
{
- int x;
+ fp_except x;
__asm("cfc1 %0,$31" : "=r" (x));
return (x >> 2) & 0x1f;
diff -r 398608ce026b -r cb24fa34fb66 lib/libc/arch/mips/gen/fpsetmask.c
--- a/lib/libc/arch/mips/gen/fpsetmask.c Mon Mar 19 16:20:58 2012 +0000
+++ b/lib/libc/arch/mips/gen/fpsetmask.c Mon Mar 19 22:23:10 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */
+/* $NetBSD: fpsetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */
/*
* Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpsetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,16 +19,14 @@
#endif
fp_except
-fpsetmask(mask)
- fp_except mask;
+fpsetmask(fp_except mask)
{
fp_except old;
fp_except new;
__asm("cfc1 %0,$31" : "=r" (old));
- new = old;
- new &= ~(0x1f << 7);
+ new = old & ~(0x1f << 7);
new |= ((mask & 0x1f) << 7);
__asm("ctc1 %0,$31" : : "r" (new));
diff -r 398608ce026b -r cb24fa34fb66 lib/libc/arch/mips/gen/fpsetround.c
--- a/lib/libc/arch/mips/gen/fpsetround.c Mon Mar 19 16:20:58 2012 +0000
+++ b/lib/libc/arch/mips/gen/fpsetround.c Mon Mar 19 22:23:10 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpsetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */
+/* $NetBSD: fpsetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */
/*
* Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpsetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpsetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,17 +19,15 @@
#endif
fp_rnd
-fpsetround(rnd_dir)
- fp_rnd rnd_dir;
+fpsetround(fp_rnd rnd_dir)
{
fp_rnd old;
fp_rnd new;
__asm("cfc1 %0,$31" : "=r" (old));
- new = old;
- new &= ~0x03;
- new |= (rnd_dir & 0x03);
+ new = old & ~0x03;
+ new |= rnd_dir & 0x03;
__asm("ctc1 %0,$31" : : "r" (new));
diff -r 398608ce026b -r cb24fa34fb66 lib/libc/arch/mips/gen/fpsetsticky.c
--- a/lib/libc/arch/mips/gen/fpsetsticky.c Mon Mar 19 16:20:58 2012 +0000
+++ b/lib/libc/arch/mips/gen/fpsetsticky.c Mon Mar 19 22:23:10 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpsetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */
+/* $NetBSD: fpsetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */
/*
* Written by J.T. Conklin, Apr 11, 1995
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fpsetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: fpsetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,17 +19,15 @@
#endif
fp_except
-fpsetsticky(sticky)
- fp_except sticky;
+fpsetsticky(fp_except sticky)
{
fp_except old;
fp_except new;
__asm("cfc1 %0,$31" : "=r" (old));
- new = old;
- new &= ~(0x1f << 2);
- new |= ((sticky & 0x1f) << 2);
+ new = old & ~(0x1f << 2);
+ new |= (sticky & 0x1f) << 2;
__asm("ctc1 %0,$31" : : "r" (new));
Home |
Main Index |
Thread Index |
Old Index