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

H.J. Lu hjl.tools@gmail.com
Fri Oct 9 18:44:00 GMT 2015


On Fri, Oct 9, 2015 at 10:27 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> 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.
>

This is what I checked in.

Thanks.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Update-lrint-lrintf-lrintl-for-x32.patch
Type: text/x-patch
Size: 7108 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20151009/dc66c721/attachment.bin>


More information about the Libc-alpha mailing list