backport: pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
Backport from mainline
2018-08-11 John David Anglin <danglin@gcc.gnu.org>
gcc
* config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
Update comment for atomic instructions.
(atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
Remove.
(atomic_loaddi): Revise fence expansion to only emit fence prior to
load for __ATOMIC_SEQ_CST model.
(atomic_loaddi_1): Remove float register target.
(atomic_storedi): Handle CONST_INT values.
(atomic_storedi_1): Remove float register source. Add special case
for zero value.
(memory_barrier): New expander and insn.
libgcc
* config/pa/linux-atomic.c: Update comment.
(FETCH_AND_OP_2, OP_AND_FETCH_2, FETCH_AND_OP_WORD, OP_AND_FETCH_WORD,
COMPARE_AND_SWAP_2, __sync_val_compare_and_swap_4,
SYNC_LOCK_TEST_AND_SET_2, __sync_lock_test_and_set_4): Use
__ATOMIC_RELAXED for atomic loads.
(SYNC_LOCK_RELEASE_1): New define. Use __sync_synchronize() and
unordered store to release lock.
(__sync_lock_release_8): Likewise.
(SYNC_LOCK_RELEASE_2): Remove define.
backport: re PR target/86197 (POWERPC: float128 parameter passing)
Backport from mainline
2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
PR target/86197
* config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
ieee128 argument takes up only one (vector) register, not two (floating
point) registers.
Jonathan Wakely [Wed, 8 Aug 2018 16:31:55 +0000 (17:31 +0100)]
PR libstdc++/83982 fix exception-safety guarantee of std::vector::resize
Construct new elements before moving existing ones, so that if a default
constructor throws, the existing elements are not left in a moved-from
state.
Backport from mainline
2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/83982
* include/bits/vector.tcc (vector::_M_default_append(size_type)):
Default-construct new elements before moving existing ones.
* testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
New.
Jonathan Wakely [Wed, 8 Aug 2018 15:40:26 +0000 (16:40 +0100)]
PR libstdc++/60555 std::system_category() should recognise POSIX errno values
Backport from mainline
2018-08-03 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/system_error.cc
(system_error_category::default_error_condition): Add workaround for
ENOTEMPTY and EEXIST having the same value on AIX.
* testsuite/19_diagnostics/error_category/system_category.cc: Add
extra testcases for EDOM, EILSEQ, ERANGE, EEXIST and ENOTEMPTY.
Backport from mainline
2018-08-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/60555
* src/c++11/system_error.cc
(system_error_category::default_error_condition): New override to
check for POSIX errno values.
* testsuite/19_diagnostics/error_category/generic_category.cc: New
* testsuite/19_diagnostics/error_category/system_category.cc: New
test.
Jonathan Wakely [Wed, 8 Aug 2018 15:40:17 +0000 (16:40 +0100)]
Fix std::codecvt_utf8<wchar_t> for Mingw
Backport from mainline
2018-05-19 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
[__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
little_endian element in bitmask.
* testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
* testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
Jonathan Wakely [Wed, 8 Aug 2018 15:40:11 +0000 (16:40 +0100)]
PR libstdc++/66145 allow catching iostream errors as cxx11 ios::failure
Define a new exception type derived from the gcc4-compatible ios::failure
which also aggregates an object of the ios::failure[abi:cxx11] type.
Make __throw_ios_failure throw this new type for iostream errors
that raise exceptions. Provide custom type info for the new type so that
it can be caught by handlers for ios::failure[abi:cxx11] type
as well as handlers for the gcc4-compatible ios::failure and its bases.
Backport from mainline
2018-04-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/85222
* src/c++11/cxx11-ios_failure.cc (__construct_ios_failure)
(__destroy_ios_failure, is_ios_failure_handler): New functions.
* src/c++11/ios.cc (__throw_ios_failure): Remove definition.
(_GLIBCXX_USE_CXX11_ABI): Don't define here.
* src/c++98/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
ios_failure.cc to rewrite type info for __ios_failure.
* src/c++98/Makefile.in: Regenerate.
* src/c++98/ios_failure.cc [_GLIBCXX_USE_DUAL_ABI]
(__iosfailure, __iosfailure_type_info): New types.
(__throw_ios_failure): Define here.
* testsuite/27_io/ios_base/failure/dual_abi.cc: New.
* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
add -D_GLIBCXX_USE_CXX11_ABI=0 to dg-options.
* testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/ios_base/storage/2.cc: Likewise.
Backport from mainline
PR target/84168
2017-09-28 Joseph Myers <joseph@codesourcery.com>
* config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
(aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
when creating .init_array and .fini_array sections with priority
specified.
Kelvin Nilsen [Tue, 26 Jun 2018 17:24:54 +0000 (17:24 +0000)]
backport: rs6000-c.c (altivec_overloaded_builtins): Change behavior of vec_packsu (vector unsigned long long...
gcc/ChangeLog:
2018-06-26 Kelvin Nilsen <kelvin@gcc.gnu.org>
Backported from mainline
2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
behavior of vec_packsu (vector unsigned long long, vector unsigned
long long) to match behavior of vec_packs with same signature.
gcc/testsuite/ChangeLog:
2018-06-26 Kelvin Nilsen <kelvin@gcc.gnu.org>
Backported from mainline
2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
* gcc.target/powerpc/builtins-1.c: Add dg directive to scan
for vpkudus.