This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.18-295-gb7ea74f


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  b7ea74f0747456c99421f14f963082b1dcb6c30d (commit)
       via  8a50944770a5c638b6718bd942798b871153757f (commit)
       via  98998e9f518e3b76c2bf63f825f930bd7f6486f1 (commit)
       via  8edc4a11cfbfd65a86696264f20e2d6d22edff54 (commit)
       via  8399acaf7c5cb2252117ad1d65e468f688b84fc0 (commit)
       via  99fd9f47effcd18489528e895c08b58ed24d6505 (commit)
      from  10e1cf6b73f1598e57d24933a0949dbeffa2c8a0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7ea74f0747456c99421f14f963082b1dcb6c30d

commit b7ea74f0747456c99421f14f963082b1dcb6c30d
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Oct 12 12:23:28 2013 +0000

    soft-fp: make __unord* raise "invalid" for signaling NaNs (bug 16036).

diff --git a/ChangeLog b/ChangeLog
index 87a1238..db2c7eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2013-10-12  Joseph Myers  <joseph@codesourcery.com>
 
+	[BZ #16036]
+	* soft-fp/unorddf2.c (__unorddf2): Raise "invalid" exception for
+	signaling NaN arguments.
+	* soft-fp/unordsf2.c (__unordsf2): Likewise.
+	* soft-fp/unordtf2.c (__unordtf2): Likewise.
+
 	[BZ #14910]
 	* soft-fp/gedf2.c (__gedf2): Raise "invalid" exception for all
 	unordered operands.
diff --git a/NEWS b/NEWS
index f72f059..d617ae7 100644
--- a/NEWS
+++ b/NEWS
@@ -14,7 +14,7 @@ Version 2.19
   15681, 15723, 15734, 15735, 15736, 15748, 15749, 15754, 15760, 15797,
   15844, 15849, 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890,
   15892, 15893, 15895, 15897, 15905, 15909, 15919, 15921, 15923, 15939,
-  15963, 15966, 15988, 16032, 16034.
+  15963, 15966, 15988, 16032, 16034, 16036.
 
 * CVE-2012-4412 The strcoll implementation caches indices and rules for
   large collation sequences to optimize multiple passes.  This cache
diff --git a/soft-fp/unorddf2.c b/soft-fp/unorddf2.c
index 2e77f2d..bc4efa3 100644
--- a/soft-fp/unorddf2.c
+++ b/soft-fp/unorddf2.c
@@ -32,12 +32,17 @@
 
 CMPtype __unorddf2(DFtype a, DFtype b)
 {
+  FP_DECL_EX;
   FP_DECL_D(A); FP_DECL_D(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_UNPACK_RAW_D(B, b);
   FP_CMP_UNORD_D(r, A, B);
+  if (r && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B)))
+    FP_SET_EXCEPTION(FP_EX_INVALID);
+  FP_HANDLE_EXCEPTIONS;
 
   return r;
 }
diff --git a/soft-fp/unordsf2.c b/soft-fp/unordsf2.c
index b5b5322..217975f 100644
--- a/soft-fp/unordsf2.c
+++ b/soft-fp/unordsf2.c
@@ -32,13 +32,18 @@
 
 CMPtype __unordsf2(SFtype a, SFtype b)
 {
+  FP_DECL_EX;
   FP_DECL_S(A);
   FP_DECL_S(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_UNPACK_RAW_S(B, b);
   FP_CMP_UNORD_S(r, A, B);
+  if (r && (FP_ISSIGNAN_S(A) || FP_ISSIGNAN_S(B)))
+    FP_SET_EXCEPTION(FP_EX_INVALID);
+  FP_HANDLE_EXCEPTIONS;
 
   return r;
 }
diff --git a/soft-fp/unordtf2.c b/soft-fp/unordtf2.c
index 1a85c25..3650cf4 100644
--- a/soft-fp/unordtf2.c
+++ b/soft-fp/unordtf2.c
@@ -32,13 +32,18 @@
 
 CMPtype __unordtf2(TFtype a, TFtype b)
 {
+  FP_DECL_EX;
   FP_DECL_Q(A);
   FP_DECL_Q(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
   FP_CMP_UNORD_Q(r, A, B);
+  if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B)))
+    FP_SET_EXCEPTION(FP_EX_INVALID);
+  FP_HANDLE_EXCEPTIONS;
 
   return r;
 }

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8a50944770a5c638b6718bd942798b871153757f

commit 8a50944770a5c638b6718bd942798b871153757f
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Oct 12 12:22:14 2013 +0000

    soft-fp: make ordered comparisons raise "invalid" for quiet NaNs (bug 14910).

diff --git a/ChangeLog b/ChangeLog
index 2b2e470..87a1238 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2013-10-12  Joseph Myers  <joseph@codesourcery.com>
 
+	[BZ #14910]
+	* soft-fp/gedf2.c (__gedf2): Raise "invalid" exception for all
+	unordered operands.
+	* soft-fp/gesf2.c (__gesf2): Likewise.
+	* soft-fp/getf2.c (__getf2): Likewise.
+	* soft-fp/ledf2.c (__ledf2): Likewise.
+	* soft-fp/lesf2.c (__lesf2): Likewise.
+	* soft-fp/letf2.c (__letf2): Likewise.
+
 	* soft-fp/eqdf2.c (__eqdf2): Use FP_INIT_EXCEPTIONS.
 	* soft-fp/eqsf2.c (__eqsf2): Likewise.
 	* soft-fp/eqtf2.c (__eqtf2): Likewise.
diff --git a/NEWS b/NEWS
index 74231dc..f72f059 100644
--- a/NEWS
+++ b/NEWS
@@ -9,12 +9,12 @@ Version 2.19
 
 * The following bugs are resolved with this release:
 
-  156, 431, 13982, 13985, 14155, 14547, 14699, 15048, 15362, 15400, 15427,
-  15522, 15531, 15532, 15608, 15609, 15610, 15632, 15640, 15680, 15681,
-  15723, 15734, 15735, 15736, 15748, 15749, 15754, 15760, 15797, 15844,
-  15849, 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890, 15892,
-  15893, 15895, 15897, 15905, 15909, 15919, 15921, 15923, 15939, 15963,
-  15966, 15988, 16032, 16034.
+  156, 431, 13982, 13985, 14155, 14547, 14699, 14910, 15048, 15362, 15400,
+  15427, 15522, 15531, 15532, 15608, 15609, 15610, 15632, 15640, 15680,
+  15681, 15723, 15734, 15735, 15736, 15748, 15749, 15754, 15760, 15797,
+  15844, 15849, 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890,
+  15892, 15893, 15895, 15897, 15905, 15909, 15919, 15921, 15923, 15939,
+  15963, 15966, 15988, 16032, 16034.
 
 * CVE-2012-4412 The strcoll implementation caches indices and rules for
   large collation sequences to optimize multiple passes.  This cache
diff --git a/soft-fp/gedf2.c b/soft-fp/gedf2.c
index a36f572..fa2b525 100644
--- a/soft-fp/gedf2.c
+++ b/soft-fp/gedf2.c
@@ -41,7 +41,7 @@ CMPtype __gedf2(DFtype a, DFtype b)
   FP_UNPACK_RAW_D(A, a);
   FP_UNPACK_RAW_D(B, b);
   FP_CMP_D(r, A, B, -2);
-  if (r == -2 && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B)))
+  if (r == -2)
     FP_SET_EXCEPTION(FP_EX_INVALID);
   FP_HANDLE_EXCEPTIONS;
 
diff --git a/soft-fp/gesf2.c b/soft-fp/gesf2.c
index 899fcc5..4778937 100644
--- a/soft-fp/gesf2.c
+++ b/soft-fp/gesf2.c
@@ -41,7 +41,7 @@ CMPtype __gesf2(SFtype a, SFtype b)
   FP_UNPACK_RAW_S(A, a);
   FP_UNPACK_RAW_S(B, b);
   FP_CMP_S(r, A, B, -2);
-  if (r == -2 && (FP_ISSIGNAN_S(A) || FP_ISSIGNAN_S(B)))
+  if (r == -2)
     FP_SET_EXCEPTION(FP_EX_INVALID);
   FP_HANDLE_EXCEPTIONS;
 
diff --git a/soft-fp/getf2.c b/soft-fp/getf2.c
index d9cb26d..4c544d4 100644
--- a/soft-fp/getf2.c
+++ b/soft-fp/getf2.c
@@ -41,7 +41,7 @@ CMPtype __getf2(TFtype a, TFtype b)
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
   FP_CMP_Q(r, A, B, -2);
-  if (r == -2 && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B)))
+  if (r == -2)
     FP_SET_EXCEPTION(FP_EX_INVALID);
   FP_HANDLE_EXCEPTIONS;
 
diff --git a/soft-fp/ledf2.c b/soft-fp/ledf2.c
index 6922d2f..7d54e98 100644
--- a/soft-fp/ledf2.c
+++ b/soft-fp/ledf2.c
@@ -41,7 +41,7 @@ CMPtype __ledf2(DFtype a, DFtype b)
   FP_UNPACK_RAW_D(A, a);
   FP_UNPACK_RAW_D(B, b);
   FP_CMP_D(r, A, B, 2);
-  if (r == 2 && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B)))
+  if (r == 2)
     FP_SET_EXCEPTION(FP_EX_INVALID);
   FP_HANDLE_EXCEPTIONS;
 
diff --git a/soft-fp/lesf2.c b/soft-fp/lesf2.c
index cee5614..954a418 100644
--- a/soft-fp/lesf2.c
+++ b/soft-fp/lesf2.c
@@ -41,7 +41,7 @@ CMPtype __lesf2(SFtype a, SFtype b)
   FP_UNPACK_RAW_S(A, a);
   FP_UNPACK_RAW_S(B, b);
   FP_CMP_S(r, A, B, 2);
-  if (r == 2 && (FP_ISSIGNAN_S(A) || FP_ISSIGNAN_S(B)))
+  if (r == 2)
     FP_SET_EXCEPTION(FP_EX_INVALID);
   FP_HANDLE_EXCEPTIONS;
 
diff --git a/soft-fp/letf2.c b/soft-fp/letf2.c
index 7644b26..76d6119 100644
--- a/soft-fp/letf2.c
+++ b/soft-fp/letf2.c
@@ -41,7 +41,7 @@ CMPtype __letf2(TFtype a, TFtype b)
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
   FP_CMP_Q(r, A, B, 2);
-  if (r == 2 && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B)))
+  if (r == 2)
     FP_SET_EXCEPTION(FP_EX_INVALID);
   FP_HANDLE_EXCEPTIONS;
 

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=98998e9f518e3b76c2bf63f825f930bd7f6486f1

commit 98998e9f518e3b76c2bf63f825f930bd7f6486f1
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Oct 12 12:21:04 2013 +0000

    soft-fp: add missing FP_INIT_EXCEPTIONS and FP_INIT_ROUNDMODE calls.

diff --git a/ChangeLog b/ChangeLog
index eb1a2c7..2b2e470 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,45 @@
 2013-10-12  Joseph Myers  <joseph@codesourcery.com>
 
+	* soft-fp/eqdf2.c (__eqdf2): Use FP_INIT_EXCEPTIONS.
+	* soft-fp/eqsf2.c (__eqsf2): Likewise.
+	* soft-fp/eqtf2.c (__eqtf2): Likewise.
+	* soft-fp/fixdfdi.c (__fixdfdi): Likewise.
+	* soft-fp/fixdfsi.c (__fixdfsi): Likewise.
+	* soft-fp/fixdfti.c (__fixdfti): Likewise.
+	* soft-fp/fixsfdi.c (__fixsfdi): Likewise.
+	* soft-fp/fixsfsi.c (__fixsfsi): Likewise.
+	* soft-fp/fixsfti.c (__fixsfti): Likewise.
+	* soft-fp/fixtfdi.c (__fixtfdi): Likewise.
+	* soft-fp/fixtfsi.c (__fixtfsi): Likewise.
+	* soft-fp/fixtfti.c (__fixtfti): Likewise.
+	* soft-fp/fixunsdfdi.c (__fixunsdfdi): Likewise.
+	* soft-fp/fixunsdfsi.c (__fixunsdfsi): Likewise.
+	* soft-fp/fixunsdfti.c (__fixunsdfti): Likewise.
+	* soft-fp/fixunssfdi.c (__fixunssfdi): Likewise.
+	* soft-fp/fixunssfsi.c (__fixunssfsi): Likewise.
+	* soft-fp/fixunssfti.c (__fixunssfti): Likewise.
+	* soft-fp/fixunstfdi.c (__fixunstfdi): Likewise.
+	* soft-fp/fixunstfsi.c (__fixunstfsi): Likewise.
+	* soft-fp/fixunstfti.c (__fixunstfti): Likewise.
+	* soft-fp/floatdidf.c (__floatdidf): Use FP_INIT_ROUNDMODE.
+	* soft-fp/floatdisf.c (__floatdisf): Likewise.
+	* soft-fp/floatsisf.c (__floatsisf): Likewise.
+	* soft-fp/floattidf.c (__floattidf): Likewise.
+	* soft-fp/floattisf.c (__floattisf): Likewise.
+	* soft-fp/floattitf.c (__floattitf): Likewise.
+	* soft-fp/floatundidf.c (__floatundidf): Likewise.
+	* soft-fp/floatundisf.c (__floatundisf): Likewise.
+	* soft-fp/floatunsisf.c (__floatunsisf): Likewise.
+	* soft-fp/floatuntidf.c (__floatuntidf): Likewise.
+	* soft-fp/floatuntisf.c (__floatuntisf): Likewise.
+	* soft-fp/floatuntitf.c (__floatuntitf): Likewise.
+	* soft-fp/gedf2.c (__gedf2): Use FP_INIT_EXCEPTIONS.
+	* soft-fp/gesf2.c (__gesf2): Likewise.
+	* soft-fp/getf2.c (__getf2): Likewise.
+	* soft-fp/ledf2.c (__ledf2): Likewise.
+	* soft-fp/lesf2.c (__lesf2): Likewise.
+	* soft-fp/letf2.c (__letf2): Likewise.
+
 	* soft-fp/soft-fp.h [FP_NO_EXCEPTIONS] (FP_SET_EXCEPTION):
 	Undefine and redefine.
 	[FP_NO_EXCEPTIONS] (FP_CUR_EXCEPTIONS): Likewise.
diff --git a/soft-fp/eqdf2.c b/soft-fp/eqdf2.c
index c93c118..8e9408a 100644
--- a/soft-fp/eqdf2.c
+++ b/soft-fp/eqdf2.c
@@ -37,6 +37,7 @@ CMPtype __eqdf2(DFtype a, DFtype b)
   FP_DECL_D(A); FP_DECL_D(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_UNPACK_RAW_D(B, b);
   FP_CMP_EQ_D(r, A, B);
diff --git a/soft-fp/eqsf2.c b/soft-fp/eqsf2.c
index e5b2a5f..3884b00 100644
--- a/soft-fp/eqsf2.c
+++ b/soft-fp/eqsf2.c
@@ -37,6 +37,7 @@ CMPtype __eqsf2(SFtype a, SFtype b)
   FP_DECL_S(A); FP_DECL_S(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_UNPACK_RAW_S(B, b);
   FP_CMP_EQ_S(r, A, B);
diff --git a/soft-fp/eqtf2.c b/soft-fp/eqtf2.c
index 47b5d5c..4a80375 100644
--- a/soft-fp/eqtf2.c
+++ b/soft-fp/eqtf2.c
@@ -37,6 +37,7 @@ CMPtype __eqtf2(TFtype a, TFtype b)
   FP_DECL_Q(A); FP_DECL_Q(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
   FP_CMP_EQ_Q(r, A, B);
diff --git a/soft-fp/fixdfdi.c b/soft-fp/fixdfdi.c
index 71ce1d4..c426018 100644
--- a/soft-fp/fixdfdi.c
+++ b/soft-fp/fixdfdi.c
@@ -37,6 +37,7 @@ DItype __fixdfdi(DFtype a)
   FP_DECL_D(A);
   UDItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_TO_INT_D(r, A, DI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixdfsi.c b/soft-fp/fixdfsi.c
index f0c9960..97f9afe 100644
--- a/soft-fp/fixdfsi.c
+++ b/soft-fp/fixdfsi.c
@@ -37,6 +37,7 @@ SItype __fixdfsi(DFtype a)
   FP_DECL_D(A);
   USItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_TO_INT_D(r, A, SI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixdfti.c b/soft-fp/fixdfti.c
index a108c67..0b82377 100644
--- a/soft-fp/fixdfti.c
+++ b/soft-fp/fixdfti.c
@@ -36,6 +36,7 @@ TItype __fixdfti(DFtype a)
   FP_DECL_D(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_TO_INT_D(r, A, TI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixsfdi.c b/soft-fp/fixsfdi.c
index 5f69d6a..564b96c 100644
--- a/soft-fp/fixsfdi.c
+++ b/soft-fp/fixsfdi.c
@@ -37,6 +37,7 @@ DItype __fixsfdi(SFtype a)
   FP_DECL_S(A);
   UDItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_TO_INT_S(r, A, DI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixsfsi.c b/soft-fp/fixsfsi.c
index 6fffdd7..a82bdf3 100644
--- a/soft-fp/fixsfsi.c
+++ b/soft-fp/fixsfsi.c
@@ -37,6 +37,7 @@ SItype __fixsfsi(SFtype a)
   FP_DECL_S(A);
   USItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_TO_INT_S(r, A, SI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixsfti.c b/soft-fp/fixsfti.c
index c65561d..84f898b 100644
--- a/soft-fp/fixsfti.c
+++ b/soft-fp/fixsfti.c
@@ -36,6 +36,7 @@ TItype __fixsfti(SFtype a)
   FP_DECL_S(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_TO_INT_S(r, A, TI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixtfdi.c b/soft-fp/fixtfdi.c
index ac67bfb..0b3711a 100644
--- a/soft-fp/fixtfdi.c
+++ b/soft-fp/fixtfdi.c
@@ -37,6 +37,7 @@ DItype __fixtfdi(TFtype a)
   FP_DECL_Q(A);
   UDItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_TO_INT_Q(r, A, DI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixtfsi.c b/soft-fp/fixtfsi.c
index 8f27ff6..320c066 100644
--- a/soft-fp/fixtfsi.c
+++ b/soft-fp/fixtfsi.c
@@ -37,6 +37,7 @@ SItype __fixtfsi(TFtype a)
   FP_DECL_Q(A);
   USItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_TO_INT_Q(r, A, SI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixtfti.c b/soft-fp/fixtfti.c
index 44fe147..f65d739 100644
--- a/soft-fp/fixtfti.c
+++ b/soft-fp/fixtfti.c
@@ -36,6 +36,7 @@ TItype __fixtfti(TFtype a)
   FP_DECL_Q(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_TO_INT_Q(r, A, TI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunsdfdi.c b/soft-fp/fixunsdfdi.c
index 82fe1c7..22f9739 100644
--- a/soft-fp/fixunsdfdi.c
+++ b/soft-fp/fixunsdfdi.c
@@ -37,6 +37,7 @@ UDItype __fixunsdfdi(DFtype a)
   FP_DECL_D(A);
   UDItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_TO_INT_D(r, A, DI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunsdfsi.c b/soft-fp/fixunsdfsi.c
index 43287b0..fad5e35 100644
--- a/soft-fp/fixunsdfsi.c
+++ b/soft-fp/fixunsdfsi.c
@@ -37,6 +37,7 @@ USItype __fixunsdfsi(DFtype a)
   FP_DECL_D(A);
   USItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_TO_INT_D(r, A, SI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunsdfti.c b/soft-fp/fixunsdfti.c
index a64e0bd..653f3ee 100644
--- a/soft-fp/fixunsdfti.c
+++ b/soft-fp/fixunsdfti.c
@@ -36,6 +36,7 @@ UTItype __fixunsdfti(DFtype a)
   FP_DECL_D(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_TO_INT_D(r, A, TI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunssfdi.c b/soft-fp/fixunssfdi.c
index c0691c6..4d6b91c 100644
--- a/soft-fp/fixunssfdi.c
+++ b/soft-fp/fixunssfdi.c
@@ -37,6 +37,7 @@ UDItype __fixunssfdi(SFtype a)
   FP_DECL_S(A);
   UDItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_TO_INT_S(r, A, DI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunssfsi.c b/soft-fp/fixunssfsi.c
index 3d00ce8..8d4ed89 100644
--- a/soft-fp/fixunssfsi.c
+++ b/soft-fp/fixunssfsi.c
@@ -37,6 +37,7 @@ USItype __fixunssfsi(SFtype a)
   FP_DECL_S(A);
   USItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_TO_INT_S(r, A, SI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunssfti.c b/soft-fp/fixunssfti.c
index ae96b30..20b07e9 100644
--- a/soft-fp/fixunssfti.c
+++ b/soft-fp/fixunssfti.c
@@ -36,6 +36,7 @@ UTItype __fixunssfti(SFtype a)
   FP_DECL_S(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_TO_INT_S(r, A, TI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunstfdi.c b/soft-fp/fixunstfdi.c
index d6038fa..4f6c2f8 100644
--- a/soft-fp/fixunstfdi.c
+++ b/soft-fp/fixunstfdi.c
@@ -37,6 +37,7 @@ UDItype __fixunstfdi(TFtype a)
   FP_DECL_Q(A);
   UDItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_TO_INT_Q(r, A, DI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunstfsi.c b/soft-fp/fixunstfsi.c
index c8481f1..801009c 100644
--- a/soft-fp/fixunstfsi.c
+++ b/soft-fp/fixunstfsi.c
@@ -37,6 +37,7 @@ USItype __fixunstfsi(TFtype a)
   FP_DECL_Q(A);
   USItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_TO_INT_Q(r, A, SI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunstfti.c b/soft-fp/fixunstfti.c
index b89e1cc..1a959aa 100644
--- a/soft-fp/fixunstfti.c
+++ b/soft-fp/fixunstfti.c
@@ -36,6 +36,7 @@ UTItype __fixunstfti(TFtype a)
   FP_DECL_Q(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_TO_INT_Q(r, A, TI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatdidf.c b/soft-fp/floatdidf.c
index f6f594a..70082e1 100644
--- a/soft-fp/floatdidf.c
+++ b/soft-fp/floatdidf.c
@@ -37,6 +37,7 @@ DFtype __floatdidf(DItype i)
   FP_DECL_D(A);
   DFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_D(A, i, DI_BITS, UDItype);
   FP_PACK_RAW_D(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatdisf.c b/soft-fp/floatdisf.c
index 72252e4..4a93793 100644
--- a/soft-fp/floatdisf.c
+++ b/soft-fp/floatdisf.c
@@ -37,6 +37,7 @@ SFtype __floatdisf(DItype i)
   FP_DECL_S(A);
   SFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_S(A, i, DI_BITS, UDItype);
   FP_PACK_RAW_S(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatsisf.c b/soft-fp/floatsisf.c
index c9ff205..b4afb9f 100644
--- a/soft-fp/floatsisf.c
+++ b/soft-fp/floatsisf.c
@@ -37,6 +37,7 @@ SFtype __floatsisf(SItype i)
   FP_DECL_S(A);
   SFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_S(A, i, SI_BITS, USItype);
   FP_PACK_RAW_S(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floattidf.c b/soft-fp/floattidf.c
index 778904e..aad11cb 100644
--- a/soft-fp/floattidf.c
+++ b/soft-fp/floattidf.c
@@ -36,6 +36,7 @@ DFtype __floattidf(TItype i)
   FP_DECL_D(A);
   DFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_D(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_D(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floattisf.c b/soft-fp/floattisf.c
index 03ed1e2..dd932af 100644
--- a/soft-fp/floattisf.c
+++ b/soft-fp/floattisf.c
@@ -36,6 +36,7 @@ SFtype __floattisf(TItype i)
   FP_DECL_S(A);
   SFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_S(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_S(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floattitf.c b/soft-fp/floattitf.c
index fdfad61..40e66b3 100644
--- a/soft-fp/floattitf.c
+++ b/soft-fp/floattitf.c
@@ -36,6 +36,7 @@ TFtype __floattitf(TItype i)
   FP_DECL_Q(A);
   TFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_Q(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_Q(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatundidf.c b/soft-fp/floatundidf.c
index 1babcec..53877c2 100644
--- a/soft-fp/floatundidf.c
+++ b/soft-fp/floatundidf.c
@@ -37,6 +37,7 @@ DFtype __floatundidf(UDItype i)
   FP_DECL_D(A);
   DFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_D(A, i, DI_BITS, UDItype);
   FP_PACK_RAW_D(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatundisf.c b/soft-fp/floatundisf.c
index 1c645c0..cec4b0d 100644
--- a/soft-fp/floatundisf.c
+++ b/soft-fp/floatundisf.c
@@ -37,6 +37,7 @@ SFtype __floatundisf(UDItype i)
   FP_DECL_S(A);
   SFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_S(A, i, DI_BITS, UDItype);
   FP_PACK_RAW_S(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatunsisf.c b/soft-fp/floatunsisf.c
index 2c0cc89..0a694f6 100644
--- a/soft-fp/floatunsisf.c
+++ b/soft-fp/floatunsisf.c
@@ -37,6 +37,7 @@ SFtype __floatunsisf(USItype i)
   FP_DECL_S(A);
   SFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_S(A, i, SI_BITS, USItype);
   FP_PACK_RAW_S(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatuntidf.c b/soft-fp/floatuntidf.c
index d533563..ec9a41c 100644
--- a/soft-fp/floatuntidf.c
+++ b/soft-fp/floatuntidf.c
@@ -36,6 +36,7 @@ DFtype __floatuntidf(UTItype i)
   FP_DECL_D(A);
   DFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_D(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_D(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatuntisf.c b/soft-fp/floatuntisf.c
index f0ae352..d70b025 100644
--- a/soft-fp/floatuntisf.c
+++ b/soft-fp/floatuntisf.c
@@ -36,6 +36,7 @@ SFtype __floatuntisf(UTItype i)
   FP_DECL_S(A);
   SFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_S(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_S(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatuntitf.c b/soft-fp/floatuntitf.c
index b7beb03..ee278eb 100644
--- a/soft-fp/floatuntitf.c
+++ b/soft-fp/floatuntitf.c
@@ -36,6 +36,7 @@ TFtype __floatuntitf(UTItype i)
   FP_DECL_Q(A);
   TFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_Q(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_Q(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/gedf2.c b/soft-fp/gedf2.c
index 0ef9f5d..a36f572 100644
--- a/soft-fp/gedf2.c
+++ b/soft-fp/gedf2.c
@@ -37,6 +37,7 @@ CMPtype __gedf2(DFtype a, DFtype b)
   FP_DECL_D(A); FP_DECL_D(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_UNPACK_RAW_D(B, b);
   FP_CMP_D(r, A, B, -2);
diff --git a/soft-fp/gesf2.c b/soft-fp/gesf2.c
index f0a8377..899fcc5 100644
--- a/soft-fp/gesf2.c
+++ b/soft-fp/gesf2.c
@@ -37,6 +37,7 @@ CMPtype __gesf2(SFtype a, SFtype b)
   FP_DECL_S(A); FP_DECL_S(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_UNPACK_RAW_S(B, b);
   FP_CMP_S(r, A, B, -2);
diff --git a/soft-fp/getf2.c b/soft-fp/getf2.c
index 705d48b..d9cb26d 100644
--- a/soft-fp/getf2.c
+++ b/soft-fp/getf2.c
@@ -37,6 +37,7 @@ CMPtype __getf2(TFtype a, TFtype b)
   FP_DECL_Q(A); FP_DECL_Q(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
   FP_CMP_Q(r, A, B, -2);
diff --git a/soft-fp/ledf2.c b/soft-fp/ledf2.c
index 7b8f403..6922d2f 100644
--- a/soft-fp/ledf2.c
+++ b/soft-fp/ledf2.c
@@ -37,6 +37,7 @@ CMPtype __ledf2(DFtype a, DFtype b)
   FP_DECL_D(A); FP_DECL_D(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_UNPACK_RAW_D(B, b);
   FP_CMP_D(r, A, B, 2);
diff --git a/soft-fp/lesf2.c b/soft-fp/lesf2.c
index 41f823b..cee5614 100644
--- a/soft-fp/lesf2.c
+++ b/soft-fp/lesf2.c
@@ -37,6 +37,7 @@ CMPtype __lesf2(SFtype a, SFtype b)
   FP_DECL_S(A); FP_DECL_S(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_UNPACK_RAW_S(B, b);
   FP_CMP_S(r, A, B, 2);
diff --git a/soft-fp/letf2.c b/soft-fp/letf2.c
index 59342ca..7644b26 100644
--- a/soft-fp/letf2.c
+++ b/soft-fp/letf2.c
@@ -37,6 +37,7 @@ CMPtype __letf2(TFtype a, TFtype b)
   FP_DECL_Q(A); FP_DECL_Q(B);
   CMPtype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_UNPACK_RAW_Q(B, b);
   FP_CMP_Q(r, A, B, 2);

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8edc4a11cfbfd65a86696264f20e2d6d22edff54

commit 8edc4a11cfbfd65a86696264f20e2d6d22edff54
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Oct 12 12:20:12 2013 +0000

    soft-fp: add macro FP_NO_EXCEPTIONS.

diff --git a/ChangeLog b/ChangeLog
index d8b9b7e..eb1a2c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2013-10-12  Joseph Myers  <joseph@codesourcery.com>
 
+	* soft-fp/soft-fp.h [FP_NO_EXCEPTIONS] (FP_SET_EXCEPTION):
+	Undefine and redefine.
+	[FP_NO_EXCEPTIONS] (FP_CUR_EXCEPTIONS): Likewise.
+	[FP_NO_EXCEPTIONS] (FP_TRAPPING_EXCEPTIONS): Likewise.
+	[FP_NO_EXCEPTIONS] (FP_ROUNDMODE): Likewise.
+	* soft-fp/floatditf.c (FP_NO_EXCEPTIONS): Define macro.
+	(__floatditf): Don't use FP_DECL_EX or FP_HANDLE_EXCEPTIONS.
+	* soft-fp/floatsidf.c (FP_NO_EXCEPTIONS): Define macro.
+	(__floatsidf): Don't use FP_DECL_EX or FP_HANDLE_EXCEPTIONS.
+	* soft-fp/floatsitf.c (FP_NO_EXCEPTIONS): Define macro.
+	(__floatsitf): Don't use FP_DECL_EX or FP_HANDLE_EXCEPTIONS.
+	* soft-fp/floatunditf.c (FP_NO_EXCEPTIONS): Define macro.
+	(__floatunditf): Don't use FP_DECL_EX or FP_HANDLE_EXCEPTIONS.
+	* soft-fp/floatunsidf.c (FP_NO_EXCEPTIONS): Define macro.
+	(__floatunsidf): Don't use FP_DECL_EX or FP_HANDLE_EXCEPTIONS.
+	* soft-fp/floatunsitf.c (FP_NO_EXCEPTIONS): Define macro.
+	(__floatunsitf): Don't use FP_DECL_EX or FP_HANDLE_EXCEPTIONS.
+
 	[BZ #16032]
 	* soft-fp/op-2.h (_FP_DIV_MEAT_2_udiv): Shift numerator right
 	without decrementing exponent if mantissa >= that for the
diff --git a/soft-fp/floatditf.c b/soft-fp/floatditf.c
index 68da6c6..7f5e3b0 100644
--- a/soft-fp/floatditf.c
+++ b/soft-fp/floatditf.c
@@ -28,18 +28,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define FP_NO_EXCEPTIONS
 #include "soft-fp.h"
 #include "quad.h"
 
 TFtype __floatditf(DItype i)
 {
-  FP_DECL_EX;
   FP_DECL_Q(A);
   TFtype a;
 
   FP_FROM_INT_Q(A, i, DI_BITS, UDItype);
   FP_PACK_RAW_Q(a, A);
-  FP_HANDLE_EXCEPTIONS;
 
   return a;
 }
diff --git a/soft-fp/floatsidf.c b/soft-fp/floatsidf.c
index ec578fb..967a83f 100644
--- a/soft-fp/floatsidf.c
+++ b/soft-fp/floatsidf.c
@@ -28,18 +28,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define FP_NO_EXCEPTIONS
 #include "soft-fp.h"
 #include "double.h"
 
 DFtype __floatsidf(SItype i)
 {
-  FP_DECL_EX;
   FP_DECL_D(A);
   DFtype a;
 
   FP_FROM_INT_D(A, i, SI_BITS, USItype);
   FP_PACK_RAW_D(a, A);
-  FP_HANDLE_EXCEPTIONS;
 
   return a;
 }
diff --git a/soft-fp/floatsitf.c b/soft-fp/floatsitf.c
index 6e24b9e..a2c3451 100644
--- a/soft-fp/floatsitf.c
+++ b/soft-fp/floatsitf.c
@@ -28,18 +28,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define FP_NO_EXCEPTIONS
 #include "soft-fp.h"
 #include "quad.h"
 
 TFtype __floatsitf(SItype i)
 {
-  FP_DECL_EX;
   FP_DECL_Q(A);
   TFtype a;
 
   FP_FROM_INT_Q(A, i, SI_BITS, USItype);
   FP_PACK_RAW_Q(a, A);
-  FP_HANDLE_EXCEPTIONS;
 
   return a;
 }
diff --git a/soft-fp/floatunditf.c b/soft-fp/floatunditf.c
index fff73fd..e178dea 100644
--- a/soft-fp/floatunditf.c
+++ b/soft-fp/floatunditf.c
@@ -28,19 +28,18 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define FP_NO_EXCEPTIONS
 #include "soft-fp.h"
 #include "quad.h"
 
 TFtype
 __floatunditf(UDItype i)
 {
-  FP_DECL_EX;
   FP_DECL_Q(A);
   TFtype a;
 
   FP_FROM_INT_Q(A, i, DI_BITS, UDItype);
   FP_PACK_RAW_Q(a, A);
-  FP_HANDLE_EXCEPTIONS;
 
   return a;
 }
diff --git a/soft-fp/floatunsidf.c b/soft-fp/floatunsidf.c
index 548dc7c..3d9656f 100644
--- a/soft-fp/floatunsidf.c
+++ b/soft-fp/floatunsidf.c
@@ -28,18 +28,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define FP_NO_EXCEPTIONS
 #include "soft-fp.h"
 #include "double.h"
 
 DFtype __floatunsidf(USItype i)
 {
-  FP_DECL_EX;
   FP_DECL_D(A);
   DFtype a;
 
   FP_FROM_INT_D(A, i, SI_BITS, USItype);
   FP_PACK_RAW_D(a, A);
-  FP_HANDLE_EXCEPTIONS;
 
   return a;
 }
diff --git a/soft-fp/floatunsitf.c b/soft-fp/floatunsitf.c
index 1099c2e..e94ae92 100644
--- a/soft-fp/floatunsitf.c
+++ b/soft-fp/floatunsitf.c
@@ -28,19 +28,18 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define FP_NO_EXCEPTIONS
 #include "soft-fp.h"
 #include "quad.h"
 
 TFtype
 __floatunsitf(USItype i)
 {
-  FP_DECL_EX;
   FP_DECL_Q(A);
   TFtype a;
 
   FP_FROM_INT_Q(A, i, SI_BITS, USItype);
   FP_PACK_RAW_Q(a, A);
-  FP_HANDLE_EXCEPTIONS;
 
   return a;
 }
diff --git a/soft-fp/soft-fp.h b/soft-fp/soft-fp.h
index 8a22a11..d6c4b68 100644
--- a/soft-fp/soft-fp.h
+++ b/soft-fp/soft-fp.h
@@ -142,6 +142,30 @@
 #define FP_TRAPPING_EXCEPTIONS 0
 #endif
 
+/* A file using soft-fp may define FP_NO_EXCEPTIONS before including
+   soft-fp.h to indicate that, although a macro used there could raise
+   exceptions, or do rounding and potentially thereby raise
+   exceptions, for some arguments, for the particular arguments used
+   in that file no exceptions or rounding can occur.  Such a file
+   should not itself use macros relating to handling exceptions and
+   rounding modes; this is only for indirect uses (in particular, in
+   _FP_FROM_INT and the macros it calls).  */
+#ifdef FP_NO_EXCEPTIONS
+
+#undef FP_SET_EXCEPTION
+#define FP_SET_EXCEPTION(ex) do {} while (0)
+
+#undef FP_CUR_EXCEPTIONS
+#define FP_CUR_EXCEPTIONS 0
+
+#undef FP_TRAPPING_EXCEPTIONS
+#define FP_TRAPPING_EXCEPTIONS 0
+
+#undef FP_ROUNDMODE
+#define FP_ROUNDMODE FP_RND_ZERO
+
+#endif
+
 #define _FP_ROUND_NEAREST(wc, X)			\
 do {							\
     if ((_FP_FRAC_LOW_##wc(X) & 15) != _FP_WORK_ROUND)	\

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8399acaf7c5cb2252117ad1d65e468f688b84fc0

commit 8399acaf7c5cb2252117ad1d65e468f688b84fc0
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Oct 12 12:18:55 2013 +0000

    soft-fp: fix _FP_DIV_MEAT_* returning results with wrong exponent (bug 16032).

diff --git a/ChangeLog b/ChangeLog
index 7df0ae9..d8b9b7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2013-10-12  Joseph Myers  <joseph@codesourcery.com>
 
+	[BZ #16032]
+	* soft-fp/op-2.h (_FP_DIV_MEAT_2_udiv): Shift numerator right
+	without decrementing exponent if mantissa >= that for the
+	denominator, not >.
+	(_FP_DIV_MEAT_2_gmp): Test numerator mantissa >= that for the
+	denominator, not >.  Decrement exponent in < case instead of
+	incrementing in >= case.
+	* soft-fp/op-4.h (_FP_DIV_MEAT_4_udiv): Shift numerator right
+	without decrementing exponent if mantissa >= that for the
+	denominator, not >.
+
 	* soft-fp/op-common.h (_FP_TO_INT): Reverse test of sign for
 	computing saturated result for unsigned overflow.
 
diff --git a/NEWS b/NEWS
index 48a92e8..74231dc 100644
--- a/NEWS
+++ b/NEWS
@@ -14,7 +14,7 @@ Version 2.19
   15723, 15734, 15735, 15736, 15748, 15749, 15754, 15760, 15797, 15844,
   15849, 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890, 15892,
   15893, 15895, 15897, 15905, 15909, 15919, 15921, 15923, 15939, 15963,
-  15966, 15988, 16034.
+  15966, 15988, 16032, 16034.
 
 * CVE-2012-4412 The strcoll implementation caches indices and rules for
   large collation sequences to optimize multiple passes.  This cache
diff --git a/soft-fp/op-2.h b/soft-fp/op-2.h
index 2008822..2892d3b 100644
--- a/soft-fp/op-2.h
+++ b/soft-fp/op-2.h
@@ -469,7 +469,7 @@
 #define _FP_DIV_MEAT_2_udiv(fs, R, X, Y)				\
   do {									\
     _FP_W_TYPE _n_f2, _n_f1, _n_f0, _r_f1, _r_f0, _m_f1, _m_f0;		\
-    if (_FP_FRAC_GT_2(X, Y))						\
+    if (_FP_FRAC_GE_2(X, Y))						\
       {									\
 	_n_f2 = X##_f1 >> 1;						\
 	_n_f1 = X##_f1 << (_FP_W_TYPE_SIZE - 1) | X##_f0 >> 1;		\
@@ -539,9 +539,8 @@
     _FP_W_TYPE _x[4], _y[2], _z[4];					\
     _y[0] = Y##_f0; _y[1] = Y##_f1;					\
     _x[0] = _x[3] = 0;							\
-    if (_FP_FRAC_GT_2(X, Y))						\
+    if (_FP_FRAC_GE_2(X, Y))						\
       {									\
-	R##_e++;							\
 	_x[1] = (X##_f0 << (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE) |	\
 		 X##_f1 >> (_FP_W_TYPE_SIZE -				\
 			    (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE)));	\
@@ -549,6 +548,7 @@
       }									\
     else								\
       {									\
+	R##_e--;							\
 	_x[1] = (X##_f0 << (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE) |	\
 		 X##_f1 >> (_FP_W_TYPE_SIZE -				\
 			    (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE)));	\
diff --git a/soft-fp/op-4.h b/soft-fp/op-4.h
index 7fccbd5..9086ba7 100644
--- a/soft-fp/op-4.h
+++ b/soft-fp/op-4.h
@@ -381,7 +381,7 @@
     int _i;								    \
     _FP_FRAC_DECL_4(_n); _FP_FRAC_DECL_4(_m);				    \
     _FP_FRAC_SET_4(_n, _FP_ZEROFRAC_4);					    \
-    if (_FP_FRAC_GT_4(X, Y))						    \
+    if (_FP_FRAC_GE_4(X, Y))						    \
       {									    \
 	_n_f[3] = X##_f[0] << (_FP_W_TYPE_SIZE - 1);			    \
 	_FP_FRAC_SRL_4(X, 1);						    \

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=99fd9f47effcd18489528e895c08b58ed24d6505

commit 99fd9f47effcd18489528e895c08b58ed24d6505
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Oct 12 12:17:16 2013 +0000

    soft-fp: fix floating-point to integer unsigned saturation.

diff --git a/ChangeLog b/ChangeLog
index 5090784..7df0ae9 100644
--- 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>
 
diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h
index 5dfb73c..dbc1077 100644
--- a/soft-fp/op-common.h
+++ b/soft-fp/op-common.h
@@ -1284,7 +1284,7 @@ do {									\
 	  r -= 1 - X##_s;						\
 	} else {							\
 	  r = 0;							\
-	  if (X##_s)							\
+	  if (!X##_s)							\
 	    r = ~r;							\
 	}								\
 									\

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog             |   89 +++++++++++++++++++++++++++++++++++++++++++++++++
 NEWS                  |   12 +++---
 soft-fp/eqdf2.c       |    1 +
 soft-fp/eqsf2.c       |    1 +
 soft-fp/eqtf2.c       |    1 +
 soft-fp/fixdfdi.c     |    1 +
 soft-fp/fixdfsi.c     |    1 +
 soft-fp/fixdfti.c     |    1 +
 soft-fp/fixsfdi.c     |    1 +
 soft-fp/fixsfsi.c     |    1 +
 soft-fp/fixsfti.c     |    1 +
 soft-fp/fixtfdi.c     |    1 +
 soft-fp/fixtfsi.c     |    1 +
 soft-fp/fixtfti.c     |    1 +
 soft-fp/fixunsdfdi.c  |    1 +
 soft-fp/fixunsdfsi.c  |    1 +
 soft-fp/fixunsdfti.c  |    1 +
 soft-fp/fixunssfdi.c  |    1 +
 soft-fp/fixunssfsi.c  |    1 +
 soft-fp/fixunssfti.c  |    1 +
 soft-fp/fixunstfdi.c  |    1 +
 soft-fp/fixunstfsi.c  |    1 +
 soft-fp/fixunstfti.c  |    1 +
 soft-fp/floatdidf.c   |    1 +
 soft-fp/floatdisf.c   |    1 +
 soft-fp/floatditf.c   |    3 +-
 soft-fp/floatsidf.c   |    3 +-
 soft-fp/floatsisf.c   |    1 +
 soft-fp/floatsitf.c   |    3 +-
 soft-fp/floattidf.c   |    1 +
 soft-fp/floattisf.c   |    1 +
 soft-fp/floattitf.c   |    1 +
 soft-fp/floatundidf.c |    1 +
 soft-fp/floatundisf.c |    1 +
 soft-fp/floatunditf.c |    3 +-
 soft-fp/floatunsidf.c |    3 +-
 soft-fp/floatunsisf.c |    1 +
 soft-fp/floatunsitf.c |    3 +-
 soft-fp/floatuntidf.c |    1 +
 soft-fp/floatuntisf.c |    1 +
 soft-fp/floatuntitf.c |    1 +
 soft-fp/gedf2.c       |    3 +-
 soft-fp/gesf2.c       |    3 +-
 soft-fp/getf2.c       |    3 +-
 soft-fp/ledf2.c       |    3 +-
 soft-fp/lesf2.c       |    3 +-
 soft-fp/letf2.c       |    3 +-
 soft-fp/op-2.h        |    6 ++--
 soft-fp/op-4.h        |    2 +-
 soft-fp/op-common.h   |    2 +-
 soft-fp/soft-fp.h     |   24 +++++++++++++
 soft-fp/unorddf2.c    |    5 +++
 soft-fp/unordsf2.c    |    5 +++
 soft-fp/unordtf2.c    |    5 +++
 54 files changed, 190 insertions(+), 29 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]