Re: __float128 and _Float128 compatibility from ABI point of view

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----Original Message----- From: Vincent Lefevre
Sent: Friday, February 23, 2018 1:08 AM
To: gcc-help@xxxxxxxxxxx
Subject: __float128 and _Float128 compatibility from ABI point of view

For the next MPFR major release (4.1.0), we plan to change __float128 to _Float128 (with a fallback to __float128 when necessary):

With current svn (rev 12452), how do I determine which of the two types was used ?

Also, tfma.exe is failing on x64 builds of rev 12452 on Windows (gcc-7.2.0):

#########################
tfma.c:592: MPFR assertion failed: inex < 0

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
#########################

This can be addressed by replacing:

mpfr_set_ui (x, (1UL << (GMP_NUMB_BITS / 2)) + 1, MPFR_RNDN);
mpfr_set_ui (y, (1UL << (GMP_NUMB_BITS / 2)) - 1, MPFR_RNDN);

with, for example:

mpfr_set_ui (x, 1, MPFR_RNDN);
mpfr_set_ui (y, 1, MPFR_RNDN);
mpfr_mul_2exp(x, x, GMP_NUMB_BITS / 2, MPFR_RNDN);
mpfr_mul_2exp(y, y, GMP_NUMB_BITS / 2, MPFR_RNDN);
mpfr_add_ui(x, x, 1, MPFR_RNDN);
mpfr_add_si(y, y, -1, MPFR_RNDN);

The problem is that, with Windows x64 builds, unsigned long is only 32 bits and GMP_NUMB_BITS is 64.

Cheers,
Rob



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux