+2019-01-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR libgcc/88931
+ * gcc.dg/torture/fp-int-convert-timode-1.c: New test.
+ * gcc.dg/torture/fp-int-convert-timode-2.c: Likewise.
+ * gcc.dg/torture/fp-int-convert-timode-3.c: Likewise.
+ * gcc.dg/torture/fp-int-convert-timode-4.c: Likewise.
+
2019-01-23 Uroš Bizjak <ubizjak@gmail.com>
PR target/88998
--- /dev/null
+/* Test for correct rounding of conversions from __int128 to
+ float. */
+/* { dg-do run } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-frounding-math" } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ volatile unsigned long long h = 0x8000000000000000LL;
+ volatile unsigned long long l = 0xdLL;
+ volatile unsigned __int128 u128 = (((unsigned __int128) h) << 64) | l;
+ volatile __int128 s128 = u128;
+ fesetround (FE_TONEAREST);
+ float fs = s128;
+ if (fs != -0x1p+127)
+ abort ();
+ double ds = s128;
+ if (ds != -0x1p+127)
+ abort ();
+ exit (0);
+}
--- /dev/null
+/* Test for correct rounding of conversions from __int128 to
+ float. */
+/* { dg-do run } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-frounding-math" } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+#ifdef FE_DOWNWARD
+ volatile unsigned long long h = 0x8000000000000000LL;
+ volatile unsigned long long l = 0xdLL;
+ volatile unsigned __int128 u128 = (((unsigned __int128) h) << 64) | l;
+ volatile __int128 s128 = u128;
+ fesetround (FE_DOWNWARD);
+ float fs = s128;
+ if (fs != -0x1p+127)
+ abort ();
+ double ds = s128;
+ if (ds != -0x1p+127)
+ abort ();
+#endif
+ exit (0);
+}
--- /dev/null
+/* Test for correct rounding of conversions from __int128 to
+ float. */
+/* { dg-do run } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-frounding-math" } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+#ifdef FE_UPWARD
+ volatile unsigned long long h = 0x8000000000000000LL;
+ volatile unsigned long long l = 0xdLL;
+ volatile unsigned __int128 u128 = (((unsigned __int128) h) << 64) | l;
+ volatile __int128 s128 = u128;
+ fesetround (FE_UPWARD);
+ float fs = s128;
+ if (fs != -0x1.fffffep+126)
+ abort ();
+ double ds = s128;
+ if (ds != -0x1.fffffffffffffp+126)
+ abort ();
+#endif
+ exit (0);
+}
--- /dev/null
+/* Test for correct rounding of conversions from __int128 to
+ float. */
+/* { dg-do run } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-frounding-math" } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+#ifdef FE_TOWARDZERO
+ volatile unsigned long long h = 0x8000000000000000LL;
+ volatile unsigned long long l = 0xdLL;
+ volatile unsigned __int128 u128 = (((unsigned __int128) h) << 64) | l;
+ volatile __int128 s128 = u128;
+ fesetround (FE_TOWARDZERO);
+ float fs = s128;
+ if (fs != -0x1.fffffep+126)
+ abort ();
+ double ds = s128;
+ if (ds != -0x1.fffffffffffffp+126)
+ abort ();
+#endif
+ exit (0);
+}
+2019-01-23 Joseph Myers <joseph@codesourcery.com>
+
+ PR libgcc/88931
+ * libgcc2.c (FSTYPE FUNC (DWtype u)): Correct no leading bits
+ case.
+
2019-01-18 Martin Liska <mliska@suse.cz>
* libgcov-profiler.c (__gcov_indirect_call_profiler_v2): Rename
/* No leading bits means u == minimum. */
if (count == 0)
- return -(Wtype_MAXp1_F * (Wtype_MAXp1_F / 2));
+ return Wtype_MAXp1_F * (FSTYPE) (hi | ((UWtype) u != 0));
shift = 1 + W_TYPE_SIZE - count;