]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
soft-fp: fix floating-point to integer unsigned saturation.
authorJoseph Myers <joseph@codesourcery.com>
Sat, 12 Oct 2013 12:17:16 +0000 (12:17 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Sat, 12 Oct 2013 12:17:16 +0000 (12:17 +0000)
ChangeLog
soft-fp/op-common.h

index 5090784cf05b50b844d5121237ba74daa662bf4f..7df0ae9cfed665afca8fbe26fa348cc13da1c9ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-12  Joseph Myers  <joseph@codesourcery.com>
+
+       * soft-fp/op-common.h (_FP_TO_INT): Reverse test of sign for
+       computing saturated result for unsigned overflow.
+
 2013-10-11  Siddhesh Poyarekar  <siddhesh@redhat.com>
            Jeff Law  <law@redhat.com>
 
index 5dfb73c18538925b3185c69db4c7fd43418fe61e..dbc107773e5ca66db6b746a41fe66d68ed4bac05 100644 (file)
@@ -1284,7 +1284,7 @@ do {                                                                      \
          r -= 1 - X##_s;                                               \
        } else {                                                        \
          r = 0;                                                        \
-         if (X##_s)                                                    \
+         if (!X##_s)                                                   \
            r = ~r;                                                     \
        }                                                               \
                                                                        \