diff options
author | liuhongt <hongtao.liu@intel.com> | 2024-03-27 08:20:13 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2024-05-05 16:03:46 +0800 |
commit | affd77d3fe7bfb525b3fb23316d164e847ed02d1 (patch) | |
tree | 0204015582884b0024c5d651303e8c468df248e9 /libgcc/config/libbid/bid_inline_add.h | |
parent | ffb521f157fec823907913602ed5cb73dd1c63e8 (diff) | |
download | gcc-affd77d3fe7bfb525b3fb23316d164e847ed02d1.zip gcc-affd77d3fe7bfb525b3fb23316d164e847ed02d1.tar.gz gcc-affd77d3fe7bfb525b3fb23316d164e847ed02d1.tar.bz2 |
Update libbid according to the latest Intel Decimal Floating-Point Math Library.
The Intel Decimal Floating-Point Math Library is available as open-source on Netlib[1].
[1] https://www.netlib.org/misc/intel/.
libgcc/config/libbid/ChangeLog:
* bid128_fma.c (add_and_round): Fix bug: the result
of (+5E+368)*(+10E-34)+(-10E+369) was returning
-9999999999999999999999999999999999E+336 instead of expected
result -1000000000000000000000000000000000E+337.
(bid128_ext_fma): Ditto.
(bid64qqq_fma): Ditto.
* bid128_noncomp.c: Change return type of bid128_class from
int to class_t.
* bid128_round_integral.c: Add default case to avoid compiler
warning.
* bid128_string.c (bid128_to_string): Replace 0x30 with '0'
for zero digit.
(bid128_from_string): Ditto.
* bid32_to_bid128.c (bid128_to_bid32): Fix Bug. In addition
to the INEXACT flag, the UNDERFLOW flag needs to be set (and
was not) when converting an input such as
+6931674235302037148946035460357709E+1857 to +1000000E-101
* bid32_to_bid64.c (bid64_to_bid32): fix Bug, In addition to
the INEXACT flag, the UNDERFLOW flag needs to be set (and was
not) when converting an input such as +9999999000000001E-111
to +1000000E-101. Furthermore, significant bits of NaNs are
set correctly now. For example, 0x7c00003b9aca0000 was
returning 0x7c000002 instead of 0x 7c000100.
* bid64_noncomp.c: Change return type of bid64_class from int
to class_t.
* bid64_round_integral.c (bid64_round_integral_exact): Add
default case to avoid compiler warning.
* bid64_string.c (bid64_from_string): Fix bug for rounding
up. The input string "10000000000000000" was returning
+1000000000000001E+1 instead of +1000000000000000E+1.
* bid64_to_bid128.c (bid128_to_bid64): Fix bug, in addition to
the INEXACT flag, the UNDERFLOW flag needs to be set (and was
not) when converting an input such as
+9999999999999999999999999999999999E-417 to
+1000000000000000E-398.
* bid_binarydecimal.c (bid32_to_binary64): Fix bug for
conversion between binary and bid types. For example,
0x7c0F4240 was returning 0x7FFFA12000000000 instead of
expected double precision 0x7FF8000000000000.
(binary64_to_bid32): Ditto.
(binary80_to_bid32): Ditto.
(binary128_to_bid32): Ditto.
(binary80_to_bid64): Ditto.
(binary128_to_bid64): Ditto.
* bid_conf.h (BID_HIGH_128W): New macro.
(BID_LOW_128W): Ditto.
* bid_functions.h (__ENABLE_BINARY80__): Ditto.
(ALIGN): Ditto.
* bid_inline_add.h (get_add128): Add default case to avoid compiler
warning.
* bid_internal.h (get_BID64): Ditto.
(fast_get_BID64_check_OF): Ditto.
(ALIGN): New macro.
Co-authored-by: Anderson, Cristina S <cristina.s.anderson@intel.com>
Co-authored-by: Akkas, Ahmet <ahmet.akkas@intel.com>
Co-authored-by: Cornea, Marius <marius.cornea@intel.com>
Diffstat (limited to 'libgcc/config/libbid/bid_inline_add.h')
-rw-r--r-- | libgcc/config/libbid/bid_inline_add.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgcc/config/libbid/bid_inline_add.h b/libgcc/config/libbid/bid_inline_add.h index eb16ea8..9ca41a2 100644 --- a/libgcc/config/libbid/bid_inline_add.h +++ b/libgcc/config/libbid/bid_inline_add.h @@ -918,6 +918,7 @@ get_add128 (UINT64 sign_x, int exponent_x, UINT64 coefficient_x, coefficient_x += D; } break; + default: break; // default added to avoid compiler warning } if (coefficient_x < 1000000000000000ull) { coefficient_x -= D; @@ -1107,6 +1108,7 @@ get_add128 (UINT64 sign_x, int exponent_x, UINT64 coefficient_x, } else if (FS.w[1] | FS.w[0]) CYh++; break; + default: break; // default added to avoid compiler warning } #endif #endif |