c89 prototypes, unsigned int

This commit is contained in:
christos 2012-03-21 00:38:34 +00:00
parent c59812a81a
commit c2ff854c81
6 changed files with 23 additions and 25 deletions

View File

@ -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 @@ static const int map[] = {
};
int
__flt_rounds()
__flt_rounds(void)
{
int x;
unsigned int x;
__asm("st %%fsr,%0" : "=m" (*&x));
return map[(x >> 30) & 0x03];

View File

@ -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 @@ __weak_alias(fpgetmask,_fpgetmask)
#endif
fp_except
fpgetmask()
fpgetmask(void)
{
int x;
unsigned int x;
__asm("st %%fsr,%0" : "=m" (*&x));
return (x >> 23) & 0x1f;

View File

@ -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 @@ __weak_alias(fpgetround,_fpgetround)
#endif
fp_rnd
fpgetround()
fpgetround(void)
{
int x;
unsigned int x;
__asm("st %%fsr,%0" : "=m" (*&x));
return (x >> 30) & 0x03;

View File

@ -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 @@ __weak_alias(fpgetsticky,_fpgetsticky)
#endif
fp_except
fpgetsticky()
fpgetsticky(void)
{
int x;
unsigned int x;
__asm("st %%fsr,%0" : "=m" (*&x));
return (x >> 5) & 0x1f;

View File

@ -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 @@ __weak_alias(fpsetmask,_fpsetmask)
#endif
fp_except
fpsetmask(mask)
fp_except mask;
fpsetmask(fp_except mask)
{
fp_except old;
fp_except new;

View File

@ -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 @@ __weak_alias(fpsetround,_fpsetround)
#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 @@ fpsetround(rnd_dir)
__asm("ld %0,%%fsr" : : "m" (*&new));
return (old >> 30) & 0x03;
return ((unsigned int)old >> 30) & 0x03;
}