]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix return value of SH fesetround.
authorKaz Kojima <kkojima@rr.iij4u.or.jp>
Thu, 5 Apr 2012 02:58:30 +0000 (11:58 +0900)
committerKaz Kojima <kkojima@rr.iij4u.or.jp>
Thu, 5 Apr 2012 02:58:30 +0000 (11:58 +0900)
ChangeLog
sysdeps/sh/sh4/fpu/fesetround.c

index 9c9947984f103548a3e672eaff717258dac717dd..b7c05b686aadcd2578d5fe45e555fa87a3f65380 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-05  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>
+
+       * sysdeps/sh/sh4/fpu/fesetround.c (fesetround): Fix return value
+       which ROUND is no valid rounding mode.
+
 2012-04-05  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>
 
        * sysdeps/sh/sh4/fpu/fegetenv.c (fegetenv): Set fpscr register which
index 5df96d2d0e6f596e8d307c27da410c9078bc713f..3269199ea9381a819367ba306b9ed33190728ac9 100644 (file)
@@ -1,5 +1,5 @@
 /* Set current rounding direction.
-   Copyright (C) 1998, 2000, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2000, 2005, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
 
@@ -27,7 +27,7 @@ fesetround (int round)
 
   if ((round & ~0x3) != 0)
     /* ROUND is no valid rounding mode.  */
-    return 0;
+    return 1;
 
   /* Get current state.  */
   _FPU_GETCW (cw);
@@ -38,6 +38,6 @@ fesetround (int round)
   /* Set new state.  */
   _FPU_SETCW (cw);
 
-  return 1;
+  return 0;
 }
 libm_hidden_def (fesetround)