Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/arch/sparc64/gen While we are using softfloat for 1...



details:   https://anonhg.NetBSD.org/src/rev/f38943f81475
branches:  trunk
changeset: 784955:f38943f81475
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Feb 15 09:25:03 2013 +0000

description:
While we are using softfloat for 128 bit long double values, make fpsetround
update the softfloat rounding mode as well.

diffstat:

 lib/libc/arch/sparc64/gen/fpsetround.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 0b78901b075e -r f38943f81475 lib/libc/arch/sparc64/gen/fpsetround.c
--- a/lib/libc/arch/sparc64/gen/fpsetround.c    Fri Feb 15 09:24:05 2013 +0000
+++ b/lib/libc/arch/sparc64/gen/fpsetround.c    Fri Feb 15 09:25:03 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpsetround.c,v 1.5 2012/03/17 21:35:06 martin Exp $    */
+/*     $NetBSD: fpsetround.c,v 1.6 2013/02/15 09:25:03 martin 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 2012/03/17 21:35:06 martin Exp $");
+__RCSID("$NetBSD: fpsetround.c,v 1.6 2013/02/15 09:25:03 martin Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -25,9 +25,16 @@
 {
        fp_rnd old;
        fp_rnd new;
+#ifdef SOFTFLOATSPARC64_FOR_GCC
+       extern fp_rnd _softfloat_float_rounding_mode;
+#endif
 
        __asm("st %%fsr,%0" : "=m" (*&old));
 
+#ifdef SOFTFLOATSPARC64_FOR_GCC
+       _softfloat_float_rounding_mode = rnd_dir;
+#endif
+
        new = old;
        new &= ~(0x03 << 30); 
        new |= ((rnd_dir & 0x03) << 30);



Home | Main Index | Thread Index | Old Index