===================================================================
@@ -46,6 +46,9 @@
R##_c = FP_CLS_NAN; \
} while (0)
+/* Not checked. */
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -80,6 +80,8 @@
(FP_EX_INVALID | FP_EX_DIVZERO | FP_EX_OVERFLOW | FP_EX_UNDERFLOW \
| FP_EX_INEXACT)
+#define _FP_TININESS_AFTER_ROUNDING 0
+
void __sfp_handle_exceptions (int);
#define FP_HANDLE_EXCEPTIONS \
===================================================================
@@ -63,6 +63,9 @@
R##_c = FP_CLS_NAN; \
} while (0)
+/* Not checked. */
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -163,6 +163,8 @@
#define FP_EX_INEXACT (1 << 0)
#endif
+#define _FP_TININESS_AFTER_ROUNDING 1
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -41,6 +41,9 @@
R##_c = FP_CLS_NAN; \
} while (0)
+/* Not checked. */
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -45,6 +45,8 @@
R##_c = FP_CLS_NAN; \
} while (0)
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -48,6 +48,8 @@
R##_c = FP_CLS_NAN; \
} while (0)
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -46,6 +46,8 @@
R##_c = FP_CLS_NAN; \
} while (0)
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -50,6 +50,8 @@
R##_c = FP_CLS_NAN; \
} while (0)
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -50,6 +50,8 @@
R##_c = FP_CLS_NAN; \
} while (0)
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -67,6 +67,9 @@
R##_c = FP_CLS_NAN; \
} while (0)
+/* Not checked. */
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -57,6 +57,8 @@
#define FP_EX_UNDERFLOW 0x10
#define FP_EX_INEXACT 0x20
+#define _FP_TININESS_AFTER_ROUNDING 1
+
void __sfp_handle_exceptions (int);
#define FP_HANDLE_EXCEPTIONS \
===================================================================
@@ -46,6 +46,9 @@
R##_c = FP_CLS_NAN; \
} while (0)
+/* Not checked. */
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -76,6 +76,9 @@
R##_c = FP_CLS_NAN; \
} while (0)
+/* Not checked. */
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -65,6 +65,8 @@
#define FP_ROUNDMODE (_fcw & FP_RND_MASK)
#endif
+#define _FP_TININESS_AFTER_ROUNDING 1
+
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
===================================================================
@@ -78,7 +78,10 @@
# define __BYTE_ORDER __LITTLE_ENDIAN
#endif
+/* Not checked. */
+#define _FP_TININESS_AFTER_ROUNDING 0
+
/* Define ALIASNAME as a strong alias for NAME. */
# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
# define _strong_alias(name, aliasname) \
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit unsigned integer to IEEE quad
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 otherwise
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE single to 128bit unsigned integer
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit unsigned integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a - b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a - b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a * b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,5 +1,5 @@
/* Software floating-point emulation. Common operations.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
@@ -32,7 +32,7 @@
#define _FP_DECL(wc, X) \
_FP_I_TYPE X##_c __attribute__ ((unused)); \
_FP_I_TYPE X##_s __attribute__ ((unused)); \
- _FP_I_TYPE X##_e; \
+ _FP_I_TYPE X##_e __attribute__ ((unused)); \
_FP_FRAC_DECL_##wc (X)
/* Test whether the qNaN bit denotes a signaling NaN. */
@@ -191,8 +191,22 @@
#define _FP_PACK_SEMIRAW(fs, wc, X) \
do \
{ \
+ int _FP_PACK_SEMIRAW_is_tiny \
+ = X##_e == 0 && !_FP_FRAC_ZEROP_##wc (X); \
+ if (_FP_TININESS_AFTER_ROUNDING \
+ && _FP_PACK_SEMIRAW_is_tiny) \
+ { \
+ FP_DECL_##fs (_FP_PACK_SEMIRAW_T); \
+ _FP_FRAC_COPY_##wc (_FP_PACK_SEMIRAW_T, X); \
+ _FP_PACK_SEMIRAW_T##_s = X##_s; \
+ _FP_PACK_SEMIRAW_T##_e = X##_e; \
+ _FP_FRAC_SLL_##wc (_FP_PACK_SEMIRAW_T, 1); \
+ _FP_ROUND (wc, _FP_PACK_SEMIRAW_T); \
+ if (_FP_FRAC_OVERP_##wc (fs, _FP_PACK_SEMIRAW_T)) \
+ _FP_PACK_SEMIRAW_is_tiny = 0; \
+ } \
_FP_ROUND (wc, X); \
- if (X##_e == 0 && !_FP_FRAC_ZEROP_##wc (X)) \
+ if (_FP_PACK_SEMIRAW_is_tiny) \
{ \
if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) \
|| (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \
@@ -279,6 +293,17 @@
else \
{ \
/* we've got a denormalized number */ \
+ int _FP_PACK_CANONICAL_is_tiny = 1; \
+ if (_FP_TININESS_AFTER_ROUNDING && X##_e == 0) \
+ { \
+ FP_DECL_##fs (_FP_PACK_CANONICAL_T); \
+ _FP_FRAC_COPY_##wc (_FP_PACK_CANONICAL_T, X); \
+ _FP_PACK_CANONICAL_T##_s = X##_s; \
+ _FP_PACK_CANONICAL_T##_e = X##_e; \
+ _FP_ROUND (wc, _FP_PACK_CANONICAL_T); \
+ if (_FP_FRAC_OVERP_##wc (fs, _FP_PACK_CANONICAL_T)) \
+ _FP_PACK_CANONICAL_is_tiny = 0; \
+ } \
X##_e = -X##_e + 1; \
if (X##_e <= _FP_WFRACBITS_##fs) \
{ \
@@ -296,8 +321,10 @@
X##_e = 0; \
_FP_FRAC_SRL_##wc (X, _FP_WORKBITS); \
} \
- if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) \
- || (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \
+ if (_FP_PACK_CANONICAL_is_tiny \
+ && ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) \
+ || (FP_TRAPPING_EXCEPTIONS \
+ & FP_EX_UNDERFLOW))) \
FP_SET_EXCEPTION (FP_EX_UNDERFLOW); \
} \
else \
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a * b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit signed integer to IEEE double
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE single to 128bit signed integer
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a converted to IEEE quad
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit signed integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit unsigned integer to IEEE single
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 otherwise
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 otherwise
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Basic two-word fraction declaration and manipulation.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE double to 128bit unsigned integer
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit unsigned integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Basic four-word fraction declaration and manipulation.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a + b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Basic eight-word fraction declaration and manipulation.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz) and
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit signed integer to IEEE quad
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit signed integer to IEEE double
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit signed integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE double to 128bit signed integer
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit unsigned integer to IEEE single
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a converted to IEEE quad
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit unsigned integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE quad to 128bit unsigned integer
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a + b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a + b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit signed integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit signed integer to IEEE double
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit signed integer to IEEE quad
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE quad to 128bit signed integer
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Double Precision
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit unsigned integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,5 +1,5 @@
/* Software floating-point emulation.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
@@ -161,6 +161,9 @@
# undef FP_ROUNDMODE
# define FP_ROUNDMODE FP_RND_ZERO
+# undef _FP_TININESS_AFTER_ROUNDING
+# define _FP_TININESS_AFTER_ROUNDING 0
+
#endif
#define _FP_ROUND_NEAREST(wc, X) \
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 iff a or b is a NaN, 0 otherwise.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joseph Myers (joseph@codesourcery.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit signed integer to IEEE single
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit signed integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit signed integer to IEEE quad
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Quad Precision.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 iff a or b is a NaN, 0 otherwise.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joseph Myers (joseph@codesourcery.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit unsigned integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 iff a or b is a NaN, 0 otherwise.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joseph Myers (joseph@codesourcery.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit signed integer to IEEE single
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a converted to IEEE double
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit signed integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit unsigned integer to IEEE double
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a / b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Truncate IEEE double into IEEE single
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Basic one-word fraction declaration and manipulation.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Truncate IEEE quad into IEEE double
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit signed integer to IEEE single
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a converted to IEEE quad
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a / b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit unsigned integer to IEEE quad
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a / b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit unsigned integer to IEEE double
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Truncate IEEE quad into IEEE single
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Extended Precision.
- Copyright (C) 1999-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Truncate IEEE quad into IEEE extended
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return -a
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit unsigned integer to IEEE double
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit unsigned integer to IEEE quad
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit unsigned integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return -a
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return -a
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a - b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Single Precision.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a * b
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit signed integer
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit unsigned integer to IEEE single
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
===================================================================
@@ -0,0 +1,27 @@
+/* Test truncation from __float128 to double uses after-rounding
+ tininess detection. */
+
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-options "" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ volatile __float128 a = 0x0.fffffffffffffffp-1022q, b = 0x0.fffffffffffff8p-1022q;
+ volatile double r;
+ r = (double) a;
+ if (fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (r != 0x1p-1022)
+ abort ();
+ r = (double) b;
+ if (!fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (r != 0x1p-1022)
+ abort ();
+ exit (0);
+}
===================================================================
@@ -0,0 +1,27 @@
+/* Test truncation from __float128 to float uses after-rounding
+ tininess detection. */
+
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-options "" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ volatile __float128 a = 0x0.ffffffffffp-126q, b = 0x0.ffffffp-126q;
+ volatile float r;
+ r = (float) a;
+ if (fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (r != 0x1p-126f)
+ abort ();
+ r = (float) b;
+ if (!fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (r != 0x1p-126f)
+ abort ();
+ exit (0);
+}
===================================================================
@@ -0,0 +1,21 @@
+/* Test __float128 multiplication uses after-rounding tininess
+ detection. */
+
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-options "" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ volatile __float128 a = 0x1.fffffffffffffffp-16382q, b = 0x1.0000000000000008p-1q, c;
+ c = a * b;
+ if (fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (c != 0x1p-16382q)
+ abort ();
+ exit (0);
+}