diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-02-19 13:36:41 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-02-24 16:34:06 +0000 |
commit | f90027d18a94d02ba8f3b7503c5f0835f432a89e (patch) | |
tree | 628d2d69a7c5662f21086db0fc356cacc164ab4b /libstdc++-v3/config/abi/pre/gnu.ver | |
parent | d0453cf5c68b6aa0e8c57a7a99d4285f047387b7 (diff) | |
download | gcc-f90027d18a94d02ba8f3b7503c5f0835f432a89e.zip gcc-f90027d18a94d02ba8f3b7503c5f0835f432a89e.tar.gz gcc-f90027d18a94d02ba8f3b7503c5f0835f432a89e.tar.bz2 |
libstdc++: Define std::to_chars overloads for __ieee128 [PR 98389]
This adds overloads of std::to_chars for powerpc64's __ieee128, so that
std::to_chars can be used for long double when -mabi=ieeelongdouble is
in used.
Eventually we'll want to extend these new overloads to work for
__float128 on all targets that support that type. For now, we're only
doing it for powerpc64 when the new long double type is supported in
parallel to the old long double type.
Additionally the existing std::to_chars overloads for long double
are given the right symbol version, resolving PR libstdc++/98389.
libstdc++-v3/ChangeLog:
PR libstdc++/98389
* config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Do not match to_chars
symbols for long double arguments mangled as 'g'.
* config/os/gnu-linux/ldbl-extra.ver: Likewise.
* config/os/gnu-linux/ldbl-ieee128-extra.ver: Likewise.
* src/c++17/Makefile.am [GLIBCXX_LDBL_ALT128_COMPAT_TRUE]:
Use -mabi=ibmlongdouble for floating_to_chars.cc.
* src/c++17/Makefile.in: Regenerate.
* src/c++17/floating_to_chars.cc (floating_type_traits_binary128):
New type defining type traits of IEEE binary128 format.
(floating_type_traits<__float128>): Define specialization.
(floating_type_traits<long double>): Define in terms of
floating_type_traits_binary128 when appropriate.
(floating_to_shortest_scientific): Handle __float128.
(sprintf_ld): New function template for printing a long double
or __ieee128 value using sprintf.
(__floating_to_chars_shortest, __floating_to_chars_precision):
Use sprintf_ld.
(to_chars): Define overloads for __float128.
Diffstat (limited to 'libstdc++-v3/config/abi/pre/gnu.ver')
-rw-r--r-- | libstdc++-v3/config/abi/pre/gnu.ver | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index d0c8066..a2c151d 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -2394,11 +2394,11 @@ GLIBCXX_3.4.29 { _ZNSt9once_flag9_M_finishEb; # std::to_chars(char*, char*, [float|double|long double]) - _ZSt8to_charsPcS_[defg]; + _ZSt8to_charsPcS_[def]; # std::to_chars(char*, char*, [float|double|long double], chars_format) - _ZSt8to_charsPcS_[defg]St12chars_format; + _ZSt8to_charsPcS_[def]St12chars_format; # std::to_chars(char*, char*, [float|double|long double], chars_format, int) - _ZSt8to_charsPcS_[defg]St12chars_formati; + _ZSt8to_charsPcS_[def]St12chars_formati; } GLIBCXX_3.4.28; |