This is the mail archive of the libc-alpha@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]

Re: Fix lrint, llrint missing exceptions close to overflow threshold (bug 19094) [committed]


On Fri, 9 Oct 2015, H.J. Lu wrote:

> testing double (without inline functions)
> Failure: lrint (0x1p31): Exception "Invalid operation" not set
[...]
> 
> on x32.    Do you know why?

The x86_64 versions of lrint / lrintf / lrintl are aliases for the long 
long versions.  This isn't correct for x32, where exceptions must respect 
overflow for 32-bit long.  I think you need to write separate versions of 
the long functions for x32 that convert to 32-bit long and raise the right 
exceptions for that conversion, while keeping the aliases in the non-x32 
case.

-- 
Joseph S. Myers
joseph@codesourcery.com


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