This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/16449] S/390 Missing exceptions with llrint
- From: "stli at linux dot vnet.ibm.com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 28 Jan 2014 09:52:39 +0000
- Subject: [Bug math/16449] S/390 Missing exceptions with llrint
- Auto-submitted: auto-generated
- References: <bug-16449-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16449
stli at linux dot vnet.ibm.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stli at linux dot vnet.ibm.com
--- Comment #3 from stli at linux dot vnet.ibm.com ---
the cast from float to long long is handled by a call to libgcc __fixsfdi
function. This function in (libgcc/config/s390/32) does not raise the INVALID
exception.
According to c99 standard the cast is a conversion from float to integer and
"If the value of the integral part cannot be represented by the integer type,
the behavior is undefined."
Is it correct to rely on the simple cast in glibc?
In case of lrint, the cast to long is done via hardware instruction, which sets
the INVALID flag. The same happens on 64 bit zarch.
--
You are receiving this mail because:
You are on the CC list for the bug.