This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/22902] float128 test failures with GCC 8
- From: "joseph at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 27 Feb 2018 23:24:22 +0000
- Subject: [Bug math/22902] float128 test failures with GCC 8
- Auto-submitted: auto-generated
- References: <bug-22902-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22902
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Tue, 27 Feb 2018, hjl.tools at gmail dot com wrote:
> https://sourceware.org/bugzilla/show_bug.cgi?id=22902
>
> --- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
> (In reply to joseph@codesourcery.com from comment #1)
> > I suspect a GCC bug.
> >
> > These functions rely on knowing that libgcc's soft-fp for float128 uses
> > the x87 rounding mode for 32-bit but the SSE rounding mode for 64-bit -
>
> My GCC is configured with -with-fpmath=sse.
I don't think that should make any difference as regards rounding modes.
fenv_private.h redefines libc_feholdexcept_setroundf128 and
libc_feupdateenv_testf128 to use the _sse functions in the __x86_64__
case. When defined, float128_private.h redefines
libc_feholdexcept_setroundl and libc_feupdateenv_testl to use the *f128
versions. If not defined, the *l names won't be redefined - but those
names for i386 also use x87 unconditionally. And libgcc's
32/sfp-machine.h always uses fnstcw to get the rounding mode, i.e. always
uses the x87 rounding mode for float128, which is what glibc expects for
32-bit for float128.
Maybe there's an issue with exceptions rather than rounding modes? If so,
the 32-bit, __SSE_MATH__ case in glibc would need to have a version of
those two functions that clears SSE exceptions as well as 387 exceptions
in the first function, and tests/restores both in the second function.
--
You are receiving this mail because:
You are on the CC list for the bug.