This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/16449] S/390 Missing exceptions with llrint


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]