This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/19486] S390: Math tests fail with "Exception Inexact set".
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 18 Jan 2016 11:51:49 +0000
- Subject: [Bug math/19486] S390: Math tests fail with "Exception Inexact set".
- Auto-submitted: auto-generated
- References: <bug-19486-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19486
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
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 c4d17461e062e730fca4076dd47a2733b3914c51 (commit)
from 4e58b6485989a9462e88d5f683e2100902afd574 (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 -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c4d17461e062e730fca4076dd47a2733b3914c51
commit c4d17461e062e730fca4076dd47a2733b3914c51
Author: Stefan Liebler <stli@de.ibm.com>
Date: Mon Jan 18 12:48:06 2016 +0100
S/390: Do not raise inexact exception in lrint/lround. [BZ #19486]
I get some math test-failures on s390 for float/double/ldouble for
various lrint/lround functions like:
lrint (0x1p64): Exception "Inexact" set
lrint (-0x1p64): Exception "Inexact" set
lround (0x1p64): Exception "Inexact" set
lround (-0x1p64): Exception "Inexact" set
...
GCC emits "convert to fixed" instructions for casting floating point
values to integer values. These instructions raise invalid and inexact
exceptions if the floating point value exceeds the integer type ranges.
This patch enables the various FIX_DBL_LONG_CONVERT_OVERFLOW macros in
order to avoid a cast from floating point to integer type and raise the
invalid exception with feraiseexcept.
The ldbl-128 rint/round functions are now using the same logic.
ChangeLog:
[BZ #19486]
* sysdeps/s390/fix-fp-int-convert-overflow.h: New File.
* sysdeps/generic/fix-fp-int-convert-overflow.h
(FIX_LDBL_LONG_CONVERT_OVERFLOW,
FIX_LDBL_LLONG_CONVERT_OVERFLOW): New define.
* sysdeps/arm/fix-fp-int-convert-overflow.h: Likewise.
* sysdeps/mips/mips32/fpu/fix-fp-int-convert-overflow.h:
Likewise.
* sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl):
Avoid conversions to long int where inexact exceptions
could be raised.
* sysdeps/ieee754/ldbl-128/s_lroundl.c (__lroundl):
Likewise.
* sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl):
Avoid conversions to long long int where inexact exceptions
could be raised.
* sysdeps/ieee754/ldbl-128/s_llroundl.c (__llroundl):
Likewise.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 21 ++++++++++++++++++++
sysdeps/arm/fix-fp-int-convert-overflow.h | 2 +
sysdeps/generic/fix-fp-int-convert-overflow.h | 2 +
sysdeps/ieee754/ldbl-128/s_llrintl.c | 7 ++++++
sysdeps/ieee754/ldbl-128/s_llroundl.c | 11 ++++++++-
sysdeps/ieee754/ldbl-128/s_lrintl.c | 7 ++++++
sysdeps/ieee754/ldbl-128/s_lroundl.c | 11 ++++++++-
.../mips/mips32/fpu/fix-fp-int-convert-overflow.h | 2 +
.../{arm => s390}/fix-fp-int-convert-overflow.h | 17 ++++++++-------
9 files changed, 68 insertions(+), 12 deletions(-)
copy sysdeps/{arm => s390}/fix-fp-int-convert-overflow.h (64%)
--
You are receiving this mail because:
You are on the CC list for the bug.