svn commit: r322418 - head/lib/msun/src

Ngie Cooper (yaneurabeya) yaneurabeya at gmail.com
Sat Aug 12 21:45:57 UTC 2017


> On Aug 12, 2017, at 10:55, Ryan Libby <rlibby at FreeBSD.org> wrote:

…

> A few possible quick fixes:
> 
> - Change the {arm64,riscv,sparc64}/include/float.h LDBL_MAX_EXP
>   definitions from (+16384) to 16384.
> 
> - Change HALF_LDBL_MAX from
> #define HALF_LDBL_MAX __CONCAT(__CONCAT(0x0.8p, LDBL_MAX_EXP), L)
>   to
> #if LDBL_MAX_EXP != 0x4000
> #error "Unsupported long double format"
> #endif
> #define HALF_LDBL_MAX 0x0.8p16384L
> 
> - Change the HALF_LDBL_MAX constant to a variable constructed with
>   LD80C(), I think with
> LD80C(0x8000000000000000, 16383, 5.9486574767861588254e+4931L)
>   but this also requires #error for LDBL_MAX_EXP != 0x4000, so not
>   really any better than the above.
> 
> I think I will back the patch out for now and go back to review.

The issue is an inconsistency with how LDBL_MAX_EXP is defined in the MD headers:

$ grep -r LDBL_MAX_EXP sys/sparc64/
sys/sparc64/include/float.h:#define LDBL_MAX_EXP        (+16384)
$ grep -r LDBL_MAX_EXP sys/x86/
sys/x86/include/float.h:#define LDBL_MAX_EXP    16384

Cheers,
-Ngie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20170812/20d7a11e/attachment-0001.sig>


More information about the svn-src-all mailing list