Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/sparc/gen c89 prototypes, unsigned int
details: https://anonhg.NetBSD.org/src/rev/3f61ac114340
branches: trunk
changeset: 778267:3f61ac114340
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 21 00:38:34 2012 +0000
description:
c89 prototypes, unsigned int
diffstat:
lib/libc/arch/sparc/gen/flt_rounds.c | 8 ++++----
lib/libc/arch/sparc/gen/fpgetmask.c | 8 ++++----
lib/libc/arch/sparc/gen/fpgetround.c | 8 ++++----
lib/libc/arch/sparc/gen/fpgetsticky.c | 8 ++++----
lib/libc/arch/sparc/gen/fpsetmask.c | 7 +++----
lib/libc/arch/sparc/gen/fpsetround.c | 9 ++++-----
6 files changed, 23 insertions(+), 25 deletions(-)
diffs (183 lines):
diff -r 5b4d51e3fcdd -r 3f61ac114340 lib/libc/arch/sparc/gen/flt_rounds.c
--- a/lib/libc/arch/sparc/gen/flt_rounds.c Wed Mar 21 00:38:06 2012 +0000
+++ b/lib/libc/arch/sparc/gen/flt_rounds.c Wed Mar 21 00:38:34 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: flt_rounds.c,v 1.6 2005/12/24 23:10:08 perry Exp $ */
+/* $NetBSD: flt_rounds.c,v 1.7 2012/03/21 00:38:34 christos Exp $ */
/*
* Written by J.T. Conklin, Apr 10, 1995
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: flt_rounds.c,v 1.6 2005/12/24 23:10:08 perry Exp $");
+__RCSID("$NetBSD: flt_rounds.c,v 1.7 2012/03/21 00:38:34 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -21,9 +21,9 @@
};
int
-__flt_rounds()
+__flt_rounds(void)
{
- int x;
+ unsigned int x;
__asm("st %%fsr,%0" : "=m" (*&x));
return map[(x >> 30) & 0x03];
diff -r 5b4d51e3fcdd -r 3f61ac114340 lib/libc/arch/sparc/gen/fpgetmask.c
--- a/lib/libc/arch/sparc/gen/fpgetmask.c Wed Mar 21 00:38:06 2012 +0000
+++ b/lib/libc/arch/sparc/gen/fpgetmask.c Wed Mar 21 00:38:34 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/21 00:38:34 christos Exp $ */
/*
* Written by J.T. Conklin, Apr 10, 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/21 00:38:34 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,9 +19,9 @@
#endif
fp_except
-fpgetmask()
+fpgetmask(void)
{
- int x;
+ unsigned int x;
__asm("st %%fsr,%0" : "=m" (*&x));
return (x >> 23) & 0x1f;
diff -r 5b4d51e3fcdd -r 3f61ac114340 lib/libc/arch/sparc/gen/fpgetround.c
--- a/lib/libc/arch/sparc/gen/fpgetround.c Wed Mar 21 00:38:06 2012 +0000
+++ b/lib/libc/arch/sparc/gen/fpgetround.c Wed Mar 21 00:38:34 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/21 00:38:34 christos Exp $ */
/*
* Written by J.T. Conklin, Apr 10, 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/21 00:38:34 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,9 +19,9 @@
#endif
fp_rnd
-fpgetround()
+fpgetround(void)
{
- int x;
+ unsigned int x;
__asm("st %%fsr,%0" : "=m" (*&x));
return (x >> 30) & 0x03;
diff -r 5b4d51e3fcdd -r 3f61ac114340 lib/libc/arch/sparc/gen/fpgetsticky.c
--- a/lib/libc/arch/sparc/gen/fpgetsticky.c Wed Mar 21 00:38:06 2012 +0000
+++ b/lib/libc/arch/sparc/gen/fpgetsticky.c Wed Mar 21 00:38:34 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/21 00:38:34 christos Exp $ */
/*
* Written by J.T. Conklin, Apr 10, 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/21 00:38:34 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,9 +19,9 @@
#endif
fp_except
-fpgetsticky()
+fpgetsticky(void)
{
- int x;
+ unsigned int x;
__asm("st %%fsr,%0" : "=m" (*&x));
return (x >> 5) & 0x1f;
diff -r 5b4d51e3fcdd -r 3f61ac114340 lib/libc/arch/sparc/gen/fpsetmask.c
--- a/lib/libc/arch/sparc/gen/fpsetmask.c Wed Mar 21 00:38:06 2012 +0000
+++ b/lib/libc/arch/sparc/gen/fpsetmask.c Wed Mar 21 00:38:34 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/21 00:38:34 christos Exp $ */
/*
* Written by J.T. Conklin, Apr 10, 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/21 00:38:34 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,8 +19,7 @@
#endif
fp_except
-fpsetmask(mask)
- fp_except mask;
+fpsetmask(fp_except mask)
{
fp_except old;
fp_except new;
diff -r 5b4d51e3fcdd -r 3f61ac114340 lib/libc/arch/sparc/gen/fpsetround.c
--- a/lib/libc/arch/sparc/gen/fpsetround.c Wed Mar 21 00:38:06 2012 +0000
+++ b/lib/libc/arch/sparc/gen/fpsetround.c Wed Mar 21 00:38:34 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/21 00:38:35 christos Exp $ */
/*
* Written by J.T. Conklin, Apr 10, 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/21 00:38:35 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -19,8 +19,7 @@
#endif
fp_rnd
-fpsetround(rnd_dir)
- fp_rnd rnd_dir;
+fpsetround(fp_rnd rnd_dir)
{
fp_rnd old;
fp_rnd new;
@@ -33,5 +32,5 @@
__asm("ld %0,%%fsr" : : "m" (*&new));
- return (old >> 30) & 0x03;
+ return ((unsigned int)old >> 30) & 0x03;
}
Home |
Main Index |
Thread Index |
Old Index