> On Aug 12, 2017, at 10:55, Ryan Libby <rli...@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

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to