mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
Some targets use IEEE binary64 for both double and long double, which means we could use memmove to optimize a std::copy from a range of double to a range of long double. We currently have no config macro to detect when long double is binary64, so add that to <bits/c++config.h>. This also adds config macros for the case where double and long double both use the same binary32 format as float, which is true for the avr target. No specializations of __memcpyable for that case are added by this patch, but they could be added later. libstdc++-v3/ChangeLog: * include/bits/c++config (_GLIBCXX_DOUBLE_IS_IEEE_BINARY32): Define. (_GLIBCXX_LDOUBLE_IS_IEEE_BINARY64): Define. (_GLIBCXX_LDOUBLE_IS_IEEE_BINARY32): Define. * include/bits/cpp_type_traits.h (__memcpyable): Define specializations when double and long double are compatible. Reviewed-by: Patrick Palka <ppalka@redhat.com>