Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/powerpc/gen Suppress a lint warning.



details:   https://anonhg.NetBSD.org/src/rev/ee762d641911
branches:  trunk
changeset: 565344:ee762d641911
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Apr 04 19:26:21 2004 +0000

description:
Suppress a lint warning.

diffstat:

 lib/libc/arch/powerpc/gen/flt_rounds.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r fad7c4f0551d -r ee762d641911 lib/libc/arch/powerpc/gen/flt_rounds.c
--- a/lib/libc/arch/powerpc/gen/flt_rounds.c    Sun Apr 04 19:21:36 2004 +0000
+++ b/lib/libc/arch/powerpc/gen/flt_rounds.c    Sun Apr 04 19:26:21 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: flt_rounds.c,v 1.6 2002/02/22 18:21:22 kleink Exp $    */
+/*     $NetBSD: flt_rounds.c,v 1.7 2004/04/04 19:26:21 matt Exp $      */
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -34,6 +34,7 @@
 #include <ieeefp.h>
 #include <float.h>
 #include <stdint.h>
+#include <powerpc/fpu.h>
 
 static const int map[] = {
        1,      /* round to nearest */
@@ -43,7 +44,7 @@
 };
 
 int
-__flt_rounds()
+__flt_rounds(void)
 {
 #ifdef _SOFT_FLOAT
        return map[fpgetround()];
@@ -51,6 +52,6 @@
        uint64_t fpscr;
 
        __asm__ __volatile("mffs %0" : "=f"(fpscr));
-       return map[(fpscr & 0x03)];
+       return map[((uint32_t)fpscr & FPSCR_RN)];
 #endif
 }



Home | Main Index | Thread Index | Old Index