diff --git a/README.md b/README.md index 0cb32efb5..2f32aa698 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## What's installed ## This cut down development environment has been created specifically for Windows users. - * devkitARM r45 + * devkitARM r47 * gcc 5.3.0 * Qt 5.6 * perl 5.24.0 diff --git a/devkitARM/arm-none-eabi/bin/ar.exe b/devkitARM/arm-none-eabi/bin/ar.exe index 43c596af7..e65d21f62 100644 Binary files a/devkitARM/arm-none-eabi/bin/ar.exe and b/devkitARM/arm-none-eabi/bin/ar.exe differ diff --git a/devkitARM/arm-none-eabi/bin/as.exe b/devkitARM/arm-none-eabi/bin/as.exe index ee5a072b2..ed898ddf2 100644 Binary files a/devkitARM/arm-none-eabi/bin/as.exe and b/devkitARM/arm-none-eabi/bin/as.exe differ diff --git a/devkitARM/arm-none-eabi/bin/ld.bfd.exe b/devkitARM/arm-none-eabi/bin/ld.bfd.exe index 1ab7ef814..b47795e1b 100644 Binary files a/devkitARM/arm-none-eabi/bin/ld.bfd.exe and b/devkitARM/arm-none-eabi/bin/ld.bfd.exe differ diff --git a/devkitARM/arm-none-eabi/bin/ld.exe b/devkitARM/arm-none-eabi/bin/ld.exe index 1ab7ef814..b47795e1b 100644 Binary files a/devkitARM/arm-none-eabi/bin/ld.exe and b/devkitARM/arm-none-eabi/bin/ld.exe differ diff --git a/devkitARM/arm-none-eabi/bin/nm.exe b/devkitARM/arm-none-eabi/bin/nm.exe index 03511aa12..0cfe7125b 100644 Binary files a/devkitARM/arm-none-eabi/bin/nm.exe and b/devkitARM/arm-none-eabi/bin/nm.exe differ diff --git a/devkitARM/arm-none-eabi/bin/objcopy.exe b/devkitARM/arm-none-eabi/bin/objcopy.exe index f5c6da1b1..64f2ec37b 100644 Binary files a/devkitARM/arm-none-eabi/bin/objcopy.exe and b/devkitARM/arm-none-eabi/bin/objcopy.exe differ diff --git a/devkitARM/arm-none-eabi/bin/objdump.exe b/devkitARM/arm-none-eabi/bin/objdump.exe index 318ae2e26..8167c57e3 100644 Binary files a/devkitARM/arm-none-eabi/bin/objdump.exe and b/devkitARM/arm-none-eabi/bin/objdump.exe differ diff --git a/devkitARM/arm-none-eabi/bin/ranlib.exe b/devkitARM/arm-none-eabi/bin/ranlib.exe index a62913d83..98fb9ae62 100644 Binary files a/devkitARM/arm-none-eabi/bin/ranlib.exe and b/devkitARM/arm-none-eabi/bin/ranlib.exe differ diff --git a/devkitARM/arm-none-eabi/bin/readelf.exe b/devkitARM/arm-none-eabi/bin/readelf.exe new file mode 100644 index 000000000..17a83a53f Binary files /dev/null and b/devkitARM/arm-none-eabi/bin/readelf.exe differ diff --git a/devkitARM/arm-none-eabi/bin/strip.exe b/devkitARM/arm-none-eabi/bin/strip.exe index 3bd7534b4..cab8b72f9 100644 Binary files a/devkitARM/arm-none-eabi/bin/strip.exe and b/devkitARM/arm-none-eabi/bin/strip.exe differ diff --git a/devkitARM/arm-none-eabi/include/_newlib_version.h b/devkitARM/arm-none-eabi/include/_newlib_version.h new file mode 100644 index 000000000..73b527e6a --- /dev/null +++ b/devkitARM/arm-none-eabi/include/_newlib_version.h @@ -0,0 +1,12 @@ +/* _newlib_version.h. Generated from _newlib_version.hin by configure. */ +/* Version macros for internal and downstream use. */ +#ifndef _NEWLIB_VERSION_H__ +#define _NEWLIB_VERSION_H__ 1 + +#define _NEWLIB_VERSION "2.5.0" +#define __NEWLIB__ 2 +#define __NEWLIB_MINOR__ 5 +#define __NEWLIB_PATCHLEVEL__ 0 + +#endif /* !_NEWLIB_VERSION_H__ */ + diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/atomic_word.h b/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/atomic_word.h deleted file mode 100644 index 19038bb6e..000000000 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/atomic_word.h +++ /dev/null @@ -1,47 +0,0 @@ -// Low-level type for atomic operations -*- C++ -*- - -// Copyright (C) 2004-2015 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file atomic_word.h - * This file is a GNU extension to the Standard C++ Library. - */ - -#ifndef _GLIBCXX_ATOMIC_WORD_H -#define _GLIBCXX_ATOMIC_WORD_H 1 - -typedef int _Atomic_word; - -// Define these two macros using the appropriate memory barrier for the target. -// The commented out versions below are the defaults. -// See ia64/atomic_word.h for an alternative approach. - -// This one prevents loads from being hoisted across the barrier; -// in other words, this is a Load-Load acquire barrier. -// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h. -// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory") - -// This one prevents stores from being sunk across the barrier; in other -// words, a Store-Store release barrier. -// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory") - -#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/atomic_word.h b/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/atomic_word.h deleted file mode 100644 index 19038bb6e..000000000 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/atomic_word.h +++ /dev/null @@ -1,47 +0,0 @@ -// Low-level type for atomic operations -*- C++ -*- - -// Copyright (C) 2004-2015 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file atomic_word.h - * This file is a GNU extension to the Standard C++ Library. - */ - -#ifndef _GLIBCXX_ATOMIC_WORD_H -#define _GLIBCXX_ATOMIC_WORD_H 1 - -typedef int _Atomic_word; - -// Define these two macros using the appropriate memory barrier for the target. -// The commented out versions below are the defaults. -// See ia64/atomic_word.h for an alternative approach. - -// This one prevents loads from being hoisted across the barrier; -// in other words, this is a Load-Load acquire barrier. -// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h. -// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory") - -// This one prevents stores from being sunk across the barrier; in other -// words, a Store-Store release barrier. -// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory") - -#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/atomic_word.h b/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/atomic_word.h deleted file mode 100644 index 19038bb6e..000000000 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/atomic_word.h +++ /dev/null @@ -1,47 +0,0 @@ -// Low-level type for atomic operations -*- C++ -*- - -// Copyright (C) 2004-2015 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file atomic_word.h - * This file is a GNU extension to the Standard C++ Library. - */ - -#ifndef _GLIBCXX_ATOMIC_WORD_H -#define _GLIBCXX_ATOMIC_WORD_H 1 - -typedef int _Atomic_word; - -// Define these two macros using the appropriate memory barrier for the target. -// The commented out versions below are the defaults. -// See ia64/atomic_word.h for an alternative approach. - -// This one prevents loads from being hoisted across the barrier; -// in other words, this is a Load-Load acquire barrier. -// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h. -// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory") - -// This one prevents stores from being sunk across the barrier; in other -// words, a Store-Store release barrier. -// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory") - -#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ptr_traits.h b/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ptr_traits.h deleted file mode 100644 index 9fd6bf866..000000000 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ptr_traits.h +++ /dev/null @@ -1,177 +0,0 @@ -// Pointer Traits -*- C++ -*- - -// Copyright (C) 2011-2015 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file bits/ptr_traits.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{memory} - */ - -#ifndef _PTR_TRAITS_H -#define _PTR_TRAITS_H 1 - -#if __cplusplus >= 201103L - -#include // For _GLIBCXX_HAS_NESTED_TYPE - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - -_GLIBCXX_HAS_NESTED_TYPE(element_type) -_GLIBCXX_HAS_NESTED_TYPE(difference_type) - - template::value> - struct __ptrtr_elt_type; - - template - struct __ptrtr_elt_type<_Tp, true> - { - typedef typename _Tp::element_type __type; - }; - - template class _SomePtr, typename _Tp, - typename... _Args> - struct __ptrtr_elt_type<_SomePtr<_Tp, _Args...>, false> - { - typedef _Tp __type; - }; - - template::value> - struct __ptrtr_diff_type - { - typedef typename _Tp::difference_type __type; - }; - - template - struct __ptrtr_diff_type<_Tp, false> - { - typedef ptrdiff_t __type; - }; - - template - class __ptrtr_rebind_helper - { - template - static constexpr true_type - _S_chk(typename _Ptr2::template rebind<_Up2>*); - - template - static constexpr false_type - _S_chk(...); - - public: - using __type = decltype(_S_chk<_Ptr, _Up>(nullptr)); - }; - - template::__type::value> - struct __ptrtr_rebind; - - template - struct __ptrtr_rebind<_Tp, _Up, true> - { - typedef typename _Tp::template rebind<_Up> __type; - }; - - template class _SomePtr, typename _Up, - typename _Tp, typename... _Args> - struct __ptrtr_rebind<_SomePtr<_Tp, _Args...>, _Up, false> - { - typedef _SomePtr<_Up, _Args...> __type; - }; - - template::type> - struct __ptrtr_not_void - { - typedef _Tp __type; - }; - - template - struct __ptrtr_not_void<_Tp, void> - { - struct __type { }; - }; - - template - class __ptrtr_pointer_to - { - typedef typename __ptrtr_elt_type<_Ptr>::__type __orig_type; - typedef typename __ptrtr_not_void<__orig_type>::__type __element_type; - - public: - static _Ptr pointer_to(__element_type& __e) - { return _Ptr::pointer_to(__e); } - }; - - /** - * @brief Uniform interface to all pointer-like types - * @ingroup pointer_abstractions - */ - template - struct pointer_traits : __ptrtr_pointer_to<_Ptr> - { - /// The pointer type - typedef _Ptr pointer; - /// The type pointed to - typedef typename __ptrtr_elt_type<_Ptr>::__type element_type; - /// Type used to represent the difference between two pointers - typedef typename __ptrtr_diff_type<_Ptr>::__type difference_type; - - template - using rebind = typename __ptrtr_rebind<_Ptr, _Up>::__type; - }; - - /** - * @brief Partial specialization for built-in pointers. - * @ingroup pointer_abstractions - */ - template - struct pointer_traits<_Tp*> - { - /// The pointer type - typedef _Tp* pointer; - /// The type pointed to - typedef _Tp element_type; - /// Type used to represent the difference between two pointers - typedef ptrdiff_t difference_type; - - template - using rebind = _Up*; - - /** - * @brief Obtain a pointer to an object - * @param __r A reference to an object of type @c element_type - * @return @c addressof(__r) - */ - static pointer - pointer_to(typename __ptrtr_not_void::__type& __r) noexcept - { return std::addressof(__r); } - }; - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace std - -#endif - -#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_executor.tcc b/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_executor.tcc deleted file mode 100644 index f06549964..000000000 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_executor.tcc +++ /dev/null @@ -1,436 +0,0 @@ -// class template regex -*- C++ -*- - -// Copyright (C) 2013-2015 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** - * @file bits/regex_executor.tcc - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{regex} - */ - -namespace std _GLIBCXX_VISIBILITY(default) -{ -namespace __detail -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - template - bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: - _M_search() - { - if (_M_search_from_first()) - return true; - if (_M_flags & regex_constants::match_continuous) - return false; - _M_flags |= regex_constants::match_prev_avail; - while (_M_begin != _M_end) - { - ++_M_begin; - if (_M_search_from_first()) - return true; - } - return false; - } - - // The _M_main function operates in different modes, DFS mode or BFS mode, - // indicated by template parameter __dfs_mode, and dispatches to one of the - // _M_main_dispatch overloads. - // - // ------------------------------------------------------------ - // - // DFS mode: - // - // It applies a Depth-First-Search (aka backtracking) on given NFA and input - // string. - // At the very beginning the executor stands in the start state, then it - // tries every possible state transition in current state recursively. Some - // state transitions consume input string, say, a single-char-matcher or a - // back-reference matcher; some don't, like assertion or other anchor nodes. - // When the input is exhausted and/or the current state is an accepting - // state, the whole executor returns true. - // - // TODO: This approach is exponentially slow for certain input. - // Try to compile the NFA to a DFA. - // - // Time complexity: \Omega(match_length), O(2^(_M_nfa.size())) - // Space complexity: \theta(match_results.size() + match_length) - // - template - bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: - _M_main_dispatch(_Match_mode __match_mode, __dfs) - { - _M_has_sol = false; - *_M_states._M_get_sol_pos() = _BiIter(); - _M_cur_results = _M_results; - _M_dfs(__match_mode, _M_states._M_start); - return _M_has_sol; - } - - // ------------------------------------------------------------ - // - // BFS mode: - // - // Russ Cox's article (http://swtch.com/~rsc/regexp/regexp1.html) - // explained this algorithm clearly. - // - // It first computes epsilon closure (states that can be achieved without - // consuming characters) for every state that's still matching, - // using the same DFS algorithm, but doesn't re-enter states (using - // _M_states._M_visited to check), nor follow _S_opcode_match. - // - // Then apply DFS using every _S_opcode_match (in _M_states._M_match_queue) - // as the start state. - // - // It significantly reduces potential duplicate states, so has a better - // upper bound; but it requires more overhead. - // - // Time complexity: \Omega(match_length * match_results.size()) - // O(match_length * _M_nfa.size() * match_results.size()) - // Space complexity: \Omega(_M_nfa.size() + match_results.size()) - // O(_M_nfa.size() * match_results.size()) - template - bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: - _M_main_dispatch(_Match_mode __match_mode, __bfs) - { - _M_states._M_queue(_M_states._M_start, _M_results); - bool __ret = false; - while (1) - { - _M_has_sol = false; - if (_M_states._M_match_queue.empty()) - break; - std::fill_n(_M_states._M_visited_states.get(), _M_nfa.size(), false); - auto __old_queue = std::move(_M_states._M_match_queue); - for (auto& __task : __old_queue) - { - _M_cur_results = std::move(__task.second); - _M_dfs(__match_mode, __task.first); - } - if (__match_mode == _Match_mode::_Prefix) - __ret |= _M_has_sol; - if (_M_current == _M_end) - break; - ++_M_current; - } - if (__match_mode == _Match_mode::_Exact) - __ret = _M_has_sol; - _M_states._M_match_queue.clear(); - return __ret; - } - - // Return whether now match the given sub-NFA. - template - bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: - _M_lookahead(_State<_TraitsT> __state) - { - _ResultsVec __what(_M_cur_results.size()); - _Executor __sub(_M_current, _M_end, __what, _M_re, _M_flags); - __sub._M_states._M_start = __state._M_alt; - if (__sub._M_search_from_first()) - { - for (size_t __i = 0; __i < __what.size(); __i++) - if (__what[__i].matched) - _M_cur_results[__i] = __what[__i]; - return true; - } - return false; - } - - // __rep_count records how many times (__rep_count.second) - // this node is visited under certain input iterator - // (__rep_count.first). This prevent the executor from entering - // infinite loop by refusing to continue when it's already been - // visited more than twice. It's `twice` instead of `once` because - // we need to spare one more time for potential group capture. - template - void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: - _M_rep_once_more(_Match_mode __match_mode, _StateIdT __i) - { - const auto& __state = _M_nfa[__i]; - auto& __rep_count = _M_rep_count[__i]; - if (__rep_count.second == 0 || __rep_count.first != _M_current) - { - auto __back = __rep_count; - __rep_count.first = _M_current; - __rep_count.second = 1; - _M_dfs(__match_mode, __state._M_alt); - __rep_count = __back; - } - else - { - if (__rep_count.second < 2) - { - __rep_count.second++; - _M_dfs(__match_mode, __state._M_alt); - __rep_count.second--; - } - } - }; - - template - void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: - _M_dfs(_Match_mode __match_mode, _StateIdT __i) - { - if (_M_states._M_visited(__i)) - return; - - const auto& __state = _M_nfa[__i]; - // Every change on _M_cur_results and _M_current will be rolled back after - // finishing the recursion step. - switch (__state._M_opcode) - { - // _M_alt branch is "match once more", while _M_next is "get me out - // of this quantifier". Executing _M_next first or _M_alt first don't - // mean the same thing, and we need to choose the correct order under - // given greedy mode. - case _S_opcode_repeat: - { - // Greedy. - if (!__state._M_neg) - { - _M_rep_once_more(__match_mode, __i); - // If it's DFS executor and already accepted, we're done. - if (!__dfs_mode || !_M_has_sol) - _M_dfs(__match_mode, __state._M_next); - } - else // Non-greedy mode - { - if (__dfs_mode) - { - // vice-versa. - _M_dfs(__match_mode, __state._M_next); - if (!_M_has_sol) - _M_rep_once_more(__match_mode, __i); - } - else - { - // DON'T attempt anything, because there's already another - // state with higher priority accepted. This state cannot - // be better by attempting its next node. - if (!_M_has_sol) - { - _M_dfs(__match_mode, __state._M_next); - // DON'T attempt anything if it's already accepted. An - // accepted state *must* be better than a solution that - // matches a non-greedy quantifier one more time. - if (!_M_has_sol) - _M_rep_once_more(__match_mode, __i); - } - } - } - } - break; - case _S_opcode_subexpr_begin: - { - auto& __res = _M_cur_results[__state._M_subexpr]; - auto __back = __res.first; - __res.first = _M_current; - _M_dfs(__match_mode, __state._M_next); - __res.first = __back; - } - break; - case _S_opcode_subexpr_end: - { - auto& __res = _M_cur_results[__state._M_subexpr]; - auto __back = __res; - __res.second = _M_current; - __res.matched = true; - _M_dfs(__match_mode, __state._M_next); - __res = __back; - } - break; - case _S_opcode_line_begin_assertion: - if (_M_at_begin()) - _M_dfs(__match_mode, __state._M_next); - break; - case _S_opcode_line_end_assertion: - if (_M_at_end()) - _M_dfs(__match_mode, __state._M_next); - break; - case _S_opcode_word_boundary: - if (_M_word_boundary() == !__state._M_neg) - _M_dfs(__match_mode, __state._M_next); - break; - // Here __state._M_alt offers a single start node for a sub-NFA. - // We recursively invoke our algorithm to match the sub-NFA. - case _S_opcode_subexpr_lookahead: - if (_M_lookahead(__state) == !__state._M_neg) - _M_dfs(__match_mode, __state._M_next); - break; - case _S_opcode_match: - if (_M_current == _M_end) - break; - if (__dfs_mode) - { - if (__state._M_matches(*_M_current)) - { - ++_M_current; - _M_dfs(__match_mode, __state._M_next); - --_M_current; - } - } - else - if (__state._M_matches(*_M_current)) - _M_states._M_queue(__state._M_next, _M_cur_results); - break; - // First fetch the matched result from _M_cur_results as __submatch; - // then compare it with - // (_M_current, _M_current + (__submatch.second - __submatch.first)). - // If matched, keep going; else just return and try another state. - case _S_opcode_backref: - { - _GLIBCXX_DEBUG_ASSERT(__dfs_mode); - auto& __submatch = _M_cur_results[__state._M_backref_index]; - if (!__submatch.matched) - break; - auto __last = _M_current; - for (auto __tmp = __submatch.first; - __last != _M_end && __tmp != __submatch.second; - ++__tmp) - ++__last; - if (_M_re._M_automaton->_M_traits.transform(__submatch.first, - __submatch.second) - == _M_re._M_automaton->_M_traits.transform(_M_current, __last)) - { - if (__last != _M_current) - { - auto __backup = _M_current; - _M_current = __last; - _M_dfs(__match_mode, __state._M_next); - _M_current = __backup; - } - else - _M_dfs(__match_mode, __state._M_next); - } - } - break; - case _S_opcode_accept: - if (__dfs_mode) - { - _GLIBCXX_DEBUG_ASSERT(!_M_has_sol); - if (__match_mode == _Match_mode::_Exact) - _M_has_sol = _M_current == _M_end; - else - _M_has_sol = true; - if (_M_current == _M_begin - && (_M_flags & regex_constants::match_not_null)) - _M_has_sol = false; - if (_M_has_sol) - { - if (_M_nfa._M_flags & regex_constants::ECMAScript) - _M_results = _M_cur_results; - else // POSIX - { - _GLIBCXX_DEBUG_ASSERT(_M_states._M_get_sol_pos()); - // Here's POSIX's logic: match the longest one. However - // we never know which one (lhs or rhs of "|") is longer - // unless we try both of them and compare the results. - // The member variable _M_sol_pos records the end - // position of the last successful match. It's better - // to be larger, because POSIX regex is always greedy. - // TODO: This could be slow. - if (*_M_states._M_get_sol_pos() == _BiIter() - || std::distance(_M_begin, - *_M_states._M_get_sol_pos()) - < std::distance(_M_begin, _M_current)) - { - *_M_states._M_get_sol_pos() = _M_current; - _M_results = _M_cur_results; - } - } - } - } - else - { - if (_M_current == _M_begin - && (_M_flags & regex_constants::match_not_null)) - break; - if (__match_mode == _Match_mode::_Prefix || _M_current == _M_end) - if (!_M_has_sol) - { - _M_has_sol = true; - _M_results = _M_cur_results; - } - } - break; - case _S_opcode_alternative: - if (_M_nfa._M_flags & regex_constants::ECMAScript) - { - // TODO: Let BFS support ECMAScript's alternative operation. - _GLIBCXX_DEBUG_ASSERT(__dfs_mode); - _M_dfs(__match_mode, __state._M_alt); - // Pick lhs if it matches. Only try rhs if it doesn't. - if (!_M_has_sol) - _M_dfs(__match_mode, __state._M_next); - } - else - { - // Try both and compare the result. - // See "case _S_opcode_accept:" handling above. - _M_dfs(__match_mode, __state._M_alt); - auto __has_sol = _M_has_sol; - _M_has_sol = false; - _M_dfs(__match_mode, __state._M_next); - _M_has_sol |= __has_sol; - } - break; - default: - _GLIBCXX_DEBUG_ASSERT(false); - } - } - - // Return whether now is at some word boundary. - template - bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: - _M_word_boundary() const - { - bool __left_is_word = false; - if (_M_current != _M_begin - || (_M_flags & regex_constants::match_prev_avail)) - { - auto __prev = _M_current; - if (_M_is_word(*std::prev(__prev))) - __left_is_word = true; - } - bool __right_is_word = - _M_current != _M_end && _M_is_word(*_M_current); - - if (__left_is_word == __right_is_word) - return false; - if (__left_is_word && !(_M_flags & regex_constants::match_not_eow)) - return true; - if (__right_is_word && !(_M_flags & regex_constants::match_not_bow)) - return true; - return false; - } - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace __detail -} // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_pair.h b/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_pair.h deleted file mode 100644 index 3daeb60ab..000000000 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_pair.h +++ /dev/null @@ -1,295 +0,0 @@ -// Pair implementation -*- C++ -*- - -// Copyright (C) 2001-2015 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Hewlett-Packard Company makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - */ - -/** @file bits/stl_pair.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{utility} - */ - -#ifndef _STL_PAIR_H -#define _STL_PAIR_H 1 - -#include // for std::move / std::forward, and std::swap - -#if __cplusplus >= 201103L -#include // for std::__decay_and_strip too -#endif - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - /** - * @addtogroup utilities - * @{ - */ - -#if __cplusplus >= 201103L - /// piecewise_construct_t - struct piecewise_construct_t { }; - - /// piecewise_construct - constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); - - // Forward declarations. - template - class tuple; - - template - struct _Index_tuple; -#endif - - /** - * @brief Struct holding two objects of arbitrary type. - * - * @tparam _T1 Type of first object. - * @tparam _T2 Type of second object. - */ - template - struct pair - { - typedef _T1 first_type; /// @c first_type is the first bound type - typedef _T2 second_type; /// @c second_type is the second bound type - - _T1 first; /// @c first is a copy of the first object - _T2 second; /// @c second is a copy of the second object - - // _GLIBCXX_RESOLVE_LIB_DEFECTS - // 265. std::pair::pair() effects overly restrictive - /** The default constructor creates @c first and @c second using their - * respective default constructors. */ - _GLIBCXX_CONSTEXPR pair() - : first(), second() { } - - /** Two objects may be passed to a @c pair constructor to be copied. */ - _GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b) - : first(__a), second(__b) { } - - /** There is also a templated copy ctor for the @c pair class itself. */ -#if __cplusplus < 201103L - template - pair(const pair<_U1, _U2>& __p) - : first(__p.first), second(__p.second) { } -#else - template, - is_convertible>::value>::type> - constexpr pair(const pair<_U1, _U2>& __p) - : first(__p.first), second(__p.second) { } - - constexpr pair(const pair&) = default; - constexpr pair(pair&&) = default; - - // DR 811. - template::value>::type> - constexpr pair(_U1&& __x, const _T2& __y) - : first(std::forward<_U1>(__x)), second(__y) { } - - template::value>::type> - constexpr pair(const _T1& __x, _U2&& __y) - : first(__x), second(std::forward<_U2>(__y)) { } - - template, - is_convertible<_U2, _T2>>::value>::type> - constexpr pair(_U1&& __x, _U2&& __y) - : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } - - template, - is_convertible<_U2, _T2>>::value>::type> - constexpr pair(pair<_U1, _U2>&& __p) - : first(std::forward<_U1>(__p.first)), - second(std::forward<_U2>(__p.second)) { } - - template - pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); - - pair& - operator=(const pair& __p) - { - first = __p.first; - second = __p.second; - return *this; - } - - pair& - operator=(pair&& __p) - noexcept(__and_, - is_nothrow_move_assignable<_T2>>::value) - { - first = std::forward(__p.first); - second = std::forward(__p.second); - return *this; - } - - template - pair& - operator=(const pair<_U1, _U2>& __p) - { - first = __p.first; - second = __p.second; - return *this; - } - - template - pair& - operator=(pair<_U1, _U2>&& __p) - { - first = std::forward<_U1>(__p.first); - second = std::forward<_U2>(__p.second); - return *this; - } - - void - swap(pair& __p) - noexcept(noexcept(swap(first, __p.first)) - && noexcept(swap(second, __p.second))) - { - using std::swap; - swap(first, __p.first); - swap(second, __p.second); - } - - private: - template - pair(tuple<_Args1...>&, tuple<_Args2...>&, - _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); -#endif - }; - - /// Two pairs of the same type are equal iff their members are equal. - template - inline _GLIBCXX_CONSTEXPR bool - operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) - { return __x.first == __y.first && __x.second == __y.second; } - - /// - template - inline _GLIBCXX_CONSTEXPR bool - operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) - { return __x.first < __y.first - || (!(__y.first < __x.first) && __x.second < __y.second); } - - /// Uses @c operator== to find the result. - template - inline _GLIBCXX_CONSTEXPR bool - operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) - { return !(__x == __y); } - - /// Uses @c operator< to find the result. - template - inline _GLIBCXX_CONSTEXPR bool - operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) - { return __y < __x; } - - /// Uses @c operator< to find the result. - template - inline _GLIBCXX_CONSTEXPR bool - operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) - { return !(__y < __x); } - - /// Uses @c operator< to find the result. - template - inline _GLIBCXX_CONSTEXPR bool - operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) - { return !(__x < __y); } - -#if __cplusplus >= 201103L - /// See std::pair::swap(). - // Note: no std::swap overloads in C++03 mode, this has performance - // implications, see, eg, libstdc++/38466. - template - inline void - swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) - noexcept(noexcept(__x.swap(__y))) - { __x.swap(__y); } -#endif - - /** - * @brief A convenience wrapper for creating a pair from two objects. - * @param __x The first object. - * @param __y The second object. - * @return A newly-constructed pair<> object of the appropriate type. - * - * The standard requires that the objects be passed by reference-to-const, - * but LWG issue #181 says they should be passed by const value. We follow - * the LWG by default. - */ - // _GLIBCXX_RESOLVE_LIB_DEFECTS - // 181. make_pair() unintended behavior -#if __cplusplus >= 201103L - // NB: DR 706. - template - constexpr pair::__type, - typename __decay_and_strip<_T2>::__type> - make_pair(_T1&& __x, _T2&& __y) - { - typedef typename __decay_and_strip<_T1>::__type __ds_type1; - typedef typename __decay_and_strip<_T2>::__type __ds_type2; - typedef pair<__ds_type1, __ds_type2> __pair_type; - return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); - } -#else - template - inline pair<_T1, _T2> - make_pair(_T1 __x, _T2 __y) - { return pair<_T1, _T2>(__x, __y); } -#endif - - /// @} - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace std - -#endif /* _STL_PAIR_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/uses_allocator.h b/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/uses_allocator.h deleted file mode 100644 index f9ea7d68e..000000000 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/uses_allocator.h +++ /dev/null @@ -1,104 +0,0 @@ -// Uses-allocator Construction -*- C++ -*- - -// Copyright (C) 2010-2015 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -#ifndef _USES_ALLOCATOR_H -#define _USES_ALLOCATOR_H 1 - -#if __cplusplus < 201103L -# include -#else - -#include - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - /// [allocator.tag] - struct allocator_arg_t { }; - - constexpr allocator_arg_t allocator_arg = allocator_arg_t(); - - template> - struct __uses_allocator_helper - : false_type { }; - - template - struct __uses_allocator_helper<_Tp, _Alloc, - __void_t> - : is_convertible<_Alloc, typename _Tp::allocator_type>::type - { }; - - /// [allocator.uses.trait] - template - struct uses_allocator - : __uses_allocator_helper<_Tp, _Alloc>::type - { }; - - struct __uses_alloc_base { }; - - struct __uses_alloc0 : __uses_alloc_base - { - struct _Sink { void operator=(const void*) { } } _M_a; - }; - - template - struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; - - template - struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; - - template - struct __uses_alloc; - - template - struct __uses_alloc - : conditional< - is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value, - __uses_alloc1<_Alloc>, - __uses_alloc2<_Alloc>>::type - { }; - - template - struct __uses_alloc - : __uses_alloc0 { }; - - template - using __uses_alloc_t = - __uses_alloc::value, _Tp, _Alloc, _Args...>; - - template - inline __uses_alloc_t<_Tp, _Alloc, _Args...> - __use_alloc(const _Alloc& __a) - { - __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; - __ret._M_a = &__a; - return __ret; - } - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace std - -#endif -#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/functional b/devkitARM/arm-none-eabi/include/c++/5.3.0/functional deleted file mode 100644 index e9d48e408..000000000 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/functional +++ /dev/null @@ -1,2381 +0,0 @@ -// -*- C++ -*- - -// Copyright (C) 2001-2015 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/* - * Copyright (c) 1997 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - */ - -/** @file include/functional - * This is a Standard C++ Library header. - */ - -#ifndef _GLIBCXX_FUNCTIONAL -#define _GLIBCXX_FUNCTIONAL 1 - -#pragma GCC system_header - -#include -#include - -#if __cplusplus >= 201103L - -#include -#include -#include -#include -#include -#include - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - template - class _Mem_fn; - template - _Mem_fn<_Tp _Class::*> - mem_fn(_Tp _Class::*) noexcept; - - /// If we have found a result_type, extract it. - template> - struct _Maybe_get_result_type - { }; - - template - struct _Maybe_get_result_type<_Functor, - __void_t> - { typedef typename _Functor::result_type result_type; }; - - /** - * Base class for any function object that has a weak result type, as - * defined in 20.8.2 [func.require] of C++11. - */ - template - struct _Weak_result_type_impl - : _Maybe_get_result_type<_Functor> - { }; - - /// Retrieve the result type for a function type. - template - struct _Weak_result_type_impl<_Res(_ArgTypes...)> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res(_ArgTypes......)> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res(_ArgTypes...) const> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res(_ArgTypes......) const> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res(_ArgTypes...) volatile> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res(_ArgTypes......) volatile> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res(_ArgTypes...) const volatile> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res(_ArgTypes......) const volatile> - { typedef _Res result_type; }; - - /// Retrieve the result type for a function reference. - template - struct _Weak_result_type_impl<_Res(&)(_ArgTypes...)> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res(&)(_ArgTypes......)> - { typedef _Res result_type; }; - - /// Retrieve the result type for a function pointer. - template - struct _Weak_result_type_impl<_Res(*)(_ArgTypes...)> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res(*)(_ArgTypes......)> - { typedef _Res result_type; }; - - /// Retrieve result type for a member function pointer. - template - struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......)> - { typedef _Res result_type; }; - - /// Retrieve result type for a const member function pointer. - template - struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) const> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) const> - { typedef _Res result_type; }; - - /// Retrieve result type for a volatile member function pointer. - template - struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) volatile> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) volatile> - { typedef _Res result_type; }; - - /// Retrieve result type for a const volatile member function pointer. - template - struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) - const volatile> - { typedef _Res result_type; }; - - template - struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) - const volatile> - { typedef _Res result_type; }; - - /** - * Strip top-level cv-qualifiers from the function object and let - * _Weak_result_type_impl perform the real work. - */ - template - struct _Weak_result_type - : _Weak_result_type_impl::type> - { }; - - /** - * Invoke a function object, which may be either a member pointer or a - * function object. The first parameter will tell which. - */ - template - inline - typename enable_if< - (!is_member_pointer<_Functor>::value - && !is_function<_Functor>::value - && !is_function::type>::value), - typename result_of<_Functor&(_Args&&...)>::type - >::type - __invoke(_Functor& __f, _Args&&... __args) - { - return __f(std::forward<_Args>(__args)...); - } - - template - inline - typename enable_if< - (is_member_pointer<_Functor>::value - && !is_function<_Functor>::value - && !is_function::type>::value), - typename result_of<_Functor(_Args&&...)>::type - >::type - __invoke(_Functor& __f, _Args&&... __args) - { - return std::mem_fn(__f)(std::forward<_Args>(__args)...); - } - - // To pick up function references (that will become function pointers) - template - inline - typename enable_if< - (is_pointer<_Functor>::value - && is_function::type>::value), - typename result_of<_Functor(_Args&&...)>::type - >::type - __invoke(_Functor __f, _Args&&... __args) - { - return __f(std::forward<_Args>(__args)...); - } - - /** - * Knowing which of unary_function and binary_function _Tp derives - * from, derives from the same and ensures that reference_wrapper - * will have a weak result type. See cases below. - */ - template - struct _Reference_wrapper_base_impl; - - // None of the nested argument types. - template - struct _Reference_wrapper_base_impl - : _Weak_result_type<_Tp> - { }; - - // Nested argument_type only. - template - struct _Reference_wrapper_base_impl - : _Weak_result_type<_Tp> - { - typedef typename _Tp::argument_type argument_type; - }; - - // Nested first_argument_type and second_argument_type only. - template - struct _Reference_wrapper_base_impl - : _Weak_result_type<_Tp> - { - typedef typename _Tp::first_argument_type first_argument_type; - typedef typename _Tp::second_argument_type second_argument_type; - }; - - // All the nested argument types. - template - struct _Reference_wrapper_base_impl - : _Weak_result_type<_Tp> - { - typedef typename _Tp::argument_type argument_type; - typedef typename _Tp::first_argument_type first_argument_type; - typedef typename _Tp::second_argument_type second_argument_type; - }; - - _GLIBCXX_HAS_NESTED_TYPE(argument_type) - _GLIBCXX_HAS_NESTED_TYPE(first_argument_type) - _GLIBCXX_HAS_NESTED_TYPE(second_argument_type) - - /** - * Derives from unary_function or binary_function when it - * can. Specializations handle all of the easy cases. The primary - * template determines what to do with a class type, which may - * derive from both unary_function and binary_function. - */ - template - struct _Reference_wrapper_base - : _Reference_wrapper_base_impl< - __has_argument_type<_Tp>::value, - __has_first_argument_type<_Tp>::value - && __has_second_argument_type<_Tp>::value, - _Tp> - { }; - - // - a function type (unary) - template - struct _Reference_wrapper_base<_Res(_T1)> - : unary_function<_T1, _Res> - { }; - - template - struct _Reference_wrapper_base<_Res(_T1) const> - : unary_function<_T1, _Res> - { }; - - template - struct _Reference_wrapper_base<_Res(_T1) volatile> - : unary_function<_T1, _Res> - { }; - - template - struct _Reference_wrapper_base<_Res(_T1) const volatile> - : unary_function<_T1, _Res> - { }; - - // - a function type (binary) - template - struct _Reference_wrapper_base<_Res(_T1, _T2)> - : binary_function<_T1, _T2, _Res> - { }; - - template - struct _Reference_wrapper_base<_Res(_T1, _T2) const> - : binary_function<_T1, _T2, _Res> - { }; - - template - struct _Reference_wrapper_base<_Res(_T1, _T2) volatile> - : binary_function<_T1, _T2, _Res> - { }; - - template - struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile> - : binary_function<_T1, _T2, _Res> - { }; - - // - a function pointer type (unary) - template - struct _Reference_wrapper_base<_Res(*)(_T1)> - : unary_function<_T1, _Res> - { }; - - // - a function pointer type (binary) - template - struct _Reference_wrapper_base<_Res(*)(_T1, _T2)> - : binary_function<_T1, _T2, _Res> - { }; - - // - a pointer to member function type (unary, no qualifiers) - template - struct _Reference_wrapper_base<_Res (_T1::*)()> - : unary_function<_T1*, _Res> - { }; - - // - a pointer to member function type (binary, no qualifiers) - template - struct _Reference_wrapper_base<_Res (_T1::*)(_T2)> - : binary_function<_T1*, _T2, _Res> - { }; - - // - a pointer to member function type (unary, const) - template - struct _Reference_wrapper_base<_Res (_T1::*)() const> - : unary_function - { }; - - // - a pointer to member function type (binary, const) - template - struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const> - : binary_function - { }; - - // - a pointer to member function type (unary, volatile) - template - struct _Reference_wrapper_base<_Res (_T1::*)() volatile> - : unary_function - { }; - - // - a pointer to member function type (binary, volatile) - template - struct _Reference_wrapper_base<_Res (_T1::*)(_T2) volatile> - : binary_function - { }; - - // - a pointer to member function type (unary, const volatile) - template - struct _Reference_wrapper_base<_Res (_T1::*)() const volatile> - : unary_function - { }; - - // - a pointer to member function type (binary, const volatile) - template - struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const volatile> - : binary_function - { }; - - /** - * @brief Primary class template for reference_wrapper. - * @ingroup functors - * @{ - */ - template - class reference_wrapper - : public _Reference_wrapper_base::type> - { - _Tp* _M_data; - - public: - typedef _Tp type; - - reference_wrapper(_Tp& __indata) noexcept - : _M_data(std::__addressof(__indata)) - { } - - reference_wrapper(_Tp&&) = delete; - - reference_wrapper(const reference_wrapper&) = default; - - reference_wrapper& - operator=(const reference_wrapper&) = default; - - operator _Tp&() const noexcept - { return this->get(); } - - _Tp& - get() const noexcept - { return *_M_data; } - - template - typename result_of<_Tp&(_Args&&...)>::type - operator()(_Args&&... __args) const - { - return __invoke(get(), std::forward<_Args>(__args)...); - } - }; - - - /// Denotes a reference should be taken to a variable. - template - inline reference_wrapper<_Tp> - ref(_Tp& __t) noexcept - { return reference_wrapper<_Tp>(__t); } - - /// Denotes a const reference should be taken to a variable. - template - inline reference_wrapper - cref(const _Tp& __t) noexcept - { return reference_wrapper(__t); } - - template - void ref(const _Tp&&) = delete; - - template - void cref(const _Tp&&) = delete; - - /// Partial specialization. - template - inline reference_wrapper<_Tp> - ref(reference_wrapper<_Tp> __t) noexcept - { return ref(__t.get()); } - - /// Partial specialization. - template - inline reference_wrapper - cref(reference_wrapper<_Tp> __t) noexcept - { return cref(__t.get()); } - - // @} group functors - - template - struct _Pack : integral_constant - { }; - - template - struct _AllConvertible : false_type - { }; - - template - struct _AllConvertible<_Pack<_From...>, _Pack<_To...>, true> - : __and_...> - { }; - - template - using _NotSame = __not_::type, - typename std::decay<_Tp2>::type>>; - - /** - * Derives from @c unary_function or @c binary_function, or perhaps - * nothing, depending on the number of arguments provided. The - * primary template is the basis case, which derives nothing. - */ - template - struct _Maybe_unary_or_binary_function { }; - - /// Derives from @c unary_function, as appropriate. - template - struct _Maybe_unary_or_binary_function<_Res, _T1> - : std::unary_function<_T1, _Res> { }; - - /// Derives from @c binary_function, as appropriate. - template - struct _Maybe_unary_or_binary_function<_Res, _T1, _T2> - : std::binary_function<_T1, _T2, _Res> { }; - - template - struct _Mem_fn_traits; - - template - struct _Mem_fn_traits_base - { - using __result_type = _Res; - using __class_type = _Class; - using __arg_types = _Pack<_ArgTypes...>; - using __maybe_type - = _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>; - using __arity = integral_constant; - }; - -#define _GLIBCXX_MEM_FN_TRAITS2(_CV, _REF, _LVAL, _RVAL) \ - template \ - struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) _CV _REF> \ - : _Mem_fn_traits_base<_Res, _CV _Class, _ArgTypes...> \ - { \ - using __pmf_type = _Res (_Class::*)(_ArgTypes...) _CV _REF; \ - using __lvalue = _LVAL; \ - using __rvalue = _RVAL; \ - using __vararg = false_type; \ - }; \ - template \ - struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) _CV _REF> \ - : _Mem_fn_traits_base<_Res, _CV _Class, _ArgTypes...> \ - { \ - using __pmf_type = _Res (_Class::*)(_ArgTypes... ...) _CV _REF; \ - using __lvalue = _LVAL; \ - using __rvalue = _RVAL; \ - using __vararg = true_type; \ - }; - -#define _GLIBCXX_MEM_FN_TRAITS(_REF, _LVAL, _RVAL) \ - _GLIBCXX_MEM_FN_TRAITS2( , _REF, _LVAL, _RVAL) \ - _GLIBCXX_MEM_FN_TRAITS2(const , _REF, _LVAL, _RVAL) \ - _GLIBCXX_MEM_FN_TRAITS2(volatile , _REF, _LVAL, _RVAL) \ - _GLIBCXX_MEM_FN_TRAITS2(const volatile, _REF, _LVAL, _RVAL) - -_GLIBCXX_MEM_FN_TRAITS( , true_type, true_type) -_GLIBCXX_MEM_FN_TRAITS(&, true_type, false_type) -_GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type) - -#undef _GLIBCXX_MEM_FN_TRAITS -#undef _GLIBCXX_MEM_FN_TRAITS2 - - template::value> - class _Mem_fn_base - : public _Mem_fn_traits<_MemFunPtr>::__maybe_type - { - using _Traits = _Mem_fn_traits<_MemFunPtr>; - - using _Class = typename _Traits::__class_type; - using _ArgTypes = typename _Traits::__arg_types; - using _Pmf = typename _Traits::__pmf_type; - - using _Arity = typename _Traits::__arity; - using _Varargs = typename _Traits::__vararg; - - template - friend struct _Bind_check_arity; - - // for varargs functions we just check the number of arguments, - // otherwise we also check they are convertible. - template - using _CheckArgs = typename conditional<_Varargs::value, - __bool_constant<(_Args::value >= _ArgTypes::value)>, - _AllConvertible<_Args, _ArgTypes> - >::type; - - public: - using result_type = typename _Traits::__result_type; - - explicit _Mem_fn_base(_Pmf __pmf) : _M_pmf(__pmf) { } - - // Handle objects - template>>> - result_type - operator()(_Class& __object, _Args&&... __args) const - { return (__object.*_M_pmf)(std::forward<_Args>(__args)...); } - - template>>> - result_type - operator()(_Class&& __object, _Args&&... __args) const - { - return (std::move(__object).*_M_pmf)(std::forward<_Args>(__args)...); - } - - // Handle pointers - template>>> - result_type - operator()(_Class* __object, _Args&&... __args) const - { return (__object->*_M_pmf)(std::forward<_Args>(__args)...); } - - // Handle smart pointers, references and pointers to derived - template, _NotSame<_Class*, _Tp>, - _CheckArgs<_Pack<_Args...>>>> - result_type - operator()(_Tp&& __object, _Args&&... __args) const - { - return _M_call(std::forward<_Tp>(__object), &__object, - std::forward<_Args>(__args)...); - } - - // Handle reference wrappers - template, typename _Traits::__lvalue, - _CheckArgs<_Pack<_Args...>>>> - result_type - operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const - { return operator()(__ref.get(), std::forward<_Args>(__args)...); } - - private: - template - result_type - _M_call(_Tp&& __object, const volatile _Class *, - _Args&&... __args) const - { - return (std::forward<_Tp>(__object).*_M_pmf) - (std::forward<_Args>(__args)...); - } - - template - result_type - _M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const - { return ((*__ptr).*_M_pmf)(std::forward<_Args>(__args)...); } - - _Pmf _M_pmf; - }; - - // Partial specialization for member object pointers. - template - class _Mem_fn_base<_Res _Class::*, false> - { - using __pm_type = _Res _Class::*; - - // This bit of genius is due to Peter Dimov, improved slightly by - // Douglas Gregor. - // Made less elegant to support perfect forwarding and noexcept. - template - auto - _M_call(_Tp&& __object, const _Class *) const noexcept - -> decltype(std::forward<_Tp>(__object).*std::declval<__pm_type&>()) - { return std::forward<_Tp>(__object).*_M_pm; } - - template - auto - _M_call(_Tp&& __object, _Up * const *) const noexcept - -> decltype((*std::forward<_Tp>(__object)).*std::declval<__pm_type&>()) - { return (*std::forward<_Tp>(__object)).*_M_pm; } - - template - auto - _M_call(_Tp&& __ptr, const volatile void*) const - noexcept(noexcept((*__ptr).*std::declval<__pm_type&>())) - -> decltype((*__ptr).*std::declval<__pm_type&>()) - { return (*__ptr).*_M_pm; } - - using _Arity = integral_constant; - using _Varargs = false_type; - - template - friend struct _Bind_check_arity; - - public: - explicit - _Mem_fn_base(_Res _Class::*__pm) noexcept : _M_pm(__pm) { } - - // Handle objects - _Res& - operator()(_Class& __object) const noexcept - { return __object.*_M_pm; } - - const _Res& - operator()(const _Class& __object) const noexcept - { return __object.*_M_pm; } - - _Res&& - operator()(_Class&& __object) const noexcept - { return std::forward<_Class>(__object).*_M_pm; } - - const _Res&& - operator()(const _Class&& __object) const noexcept - { return std::forward(__object).*_M_pm; } - - // Handle pointers - _Res& - operator()(_Class* __object) const noexcept - { return __object->*_M_pm; } - - const _Res& - operator()(const _Class* __object) const noexcept - { return __object->*_M_pm; } - - // Handle smart pointers and derived - template>> - auto - operator()(_Tp&& __unknown) const - noexcept(noexcept(std::declval<_Mem_fn_base*>()->_M_call - (std::forward<_Tp>(__unknown), &__unknown))) - -> decltype(this->_M_call(std::forward<_Tp>(__unknown), &__unknown)) - { return _M_call(std::forward<_Tp>(__unknown), &__unknown); } - - template>> - auto - operator()(reference_wrapper<_Tp> __ref) const - noexcept(noexcept(std::declval<_Mem_fn_base&>()(__ref.get()))) - -> decltype((*this)(__ref.get())) - { return (*this)(__ref.get()); } - - private: - _Res _Class::*_M_pm; - }; - - template - struct _Mem_fn<_Res _Class::*> - : _Mem_fn_base<_Res _Class::*> - { - using _Mem_fn_base<_Res _Class::*>::_Mem_fn_base; - }; - - // _GLIBCXX_RESOLVE_LIB_DEFECTS - // 2048. Unnecessary mem_fn overloads - /** - * @brief Returns a function object that forwards to the member - * pointer @a pm. - * @ingroup functors - */ - template - inline _Mem_fn<_Tp _Class::*> - mem_fn(_Tp _Class::* __pm) noexcept - { - return _Mem_fn<_Tp _Class::*>(__pm); - } - - /** - * @brief Determines if the given type _Tp is a function object - * should be treated as a subexpression when evaluating calls to - * function objects returned by bind(). [TR1 3.6.1] - * @ingroup binders - */ - template - struct is_bind_expression - : public false_type { }; - - /** - * @brief Determines if the given type _Tp is a placeholder in a - * bind() expression and, if so, which placeholder it is. [TR1 3.6.2] - * @ingroup binders - */ - template - struct is_placeholder - : public integral_constant - { }; - - /** @brief The type of placeholder objects defined by libstdc++. - * @ingroup binders - */ - template struct _Placeholder { }; - - _GLIBCXX_END_NAMESPACE_VERSION - - /** @namespace std::placeholders - * @brief ISO C++11 entities sub-namespace for functional. - * @ingroup binders - */ - namespace placeholders - { - _GLIBCXX_BEGIN_NAMESPACE_VERSION - /* Define a large number of placeholders. There is no way to - * simplify this with variadic templates, because we're introducing - * unique names for each. - */ - extern const _Placeholder<1> _1; - extern const _Placeholder<2> _2; - extern const _Placeholder<3> _3; - extern const _Placeholder<4> _4; - extern const _Placeholder<5> _5; - extern const _Placeholder<6> _6; - extern const _Placeholder<7> _7; - extern const _Placeholder<8> _8; - extern const _Placeholder<9> _9; - extern const _Placeholder<10> _10; - extern const _Placeholder<11> _11; - extern const _Placeholder<12> _12; - extern const _Placeholder<13> _13; - extern const _Placeholder<14> _14; - extern const _Placeholder<15> _15; - extern const _Placeholder<16> _16; - extern const _Placeholder<17> _17; - extern const _Placeholder<18> _18; - extern const _Placeholder<19> _19; - extern const _Placeholder<20> _20; - extern const _Placeholder<21> _21; - extern const _Placeholder<22> _22; - extern const _Placeholder<23> _23; - extern const _Placeholder<24> _24; - extern const _Placeholder<25> _25; - extern const _Placeholder<26> _26; - extern const _Placeholder<27> _27; - extern const _Placeholder<28> _28; - extern const _Placeholder<29> _29; - _GLIBCXX_END_NAMESPACE_VERSION - } - - _GLIBCXX_BEGIN_NAMESPACE_VERSION - - /** - * Partial specialization of is_placeholder that provides the placeholder - * number for the placeholder objects defined by libstdc++. - * @ingroup binders - */ - template - struct is_placeholder<_Placeholder<_Num> > - : public integral_constant - { }; - - template - struct is_placeholder > - : public integral_constant - { }; - - /** - * Used by _Safe_tuple_element to indicate that there is no tuple - * element at this position. - */ - struct _No_tuple_element; - - /** - * Implementation helper for _Safe_tuple_element. This primary - * template handles the case where it is safe to use @c - * tuple_element. - */ - template - struct _Safe_tuple_element_impl - : tuple_element<__i, _Tuple> { }; - - /** - * Implementation helper for _Safe_tuple_element. This partial - * specialization handles the case where it is not safe to use @c - * tuple_element. We just return @c _No_tuple_element. - */ - template - struct _Safe_tuple_element_impl<__i, _Tuple, false> - { - typedef _No_tuple_element type; - }; - - /** - * Like tuple_element, but returns @c _No_tuple_element when - * tuple_element would return an error. - */ - template - struct _Safe_tuple_element - : _Safe_tuple_element_impl<__i, _Tuple, - (__i < tuple_size<_Tuple>::value)> - { }; - - /** - * Maps an argument to bind() into an actual argument to the bound - * function object [TR1 3.6.3/5]. Only the first parameter should - * be specified: the rest are used to determine among the various - * implementations. Note that, although this class is a function - * object, it isn't entirely normal because it takes only two - * parameters regardless of the number of parameters passed to the - * bind expression. The first parameter is the bound argument and - * the second parameter is a tuple containing references to the - * rest of the arguments. - */ - template::value, - bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> - class _Mu; - - /** - * If the argument is reference_wrapper<_Tp>, returns the - * underlying reference. [TR1 3.6.3/5 bullet 1] - */ - template - class _Mu, false, false> - { - public: - typedef _Tp& result_type; - - /* Note: This won't actually work for const volatile - * reference_wrappers, because reference_wrapper::get() is const - * but not volatile-qualified. This might be a defect in the TR. - */ - template - result_type - operator()(_CVRef& __arg, _Tuple&) const volatile - { return __arg.get(); } - }; - - /** - * If the argument is a bind expression, we invoke the underlying - * function object with the same cv-qualifiers as we are given and - * pass along all of our arguments (unwrapped). [TR1 3.6.3/5 bullet 2] - */ - template - class _Mu<_Arg, true, false> - { - public: - template - auto - operator()(_CVArg& __arg, - tuple<_Args...>& __tuple) const volatile - -> decltype(__arg(declval<_Args>()...)) - { - // Construct an index tuple and forward to __call - typedef typename _Build_index_tuple::__type - _Indexes; - return this->__call(__arg, __tuple, _Indexes()); - } - - private: - // Invokes the underlying function object __arg by unpacking all - // of the arguments in the tuple. - template - auto - __call(_CVArg& __arg, tuple<_Args...>& __tuple, - const _Index_tuple<_Indexes...>&) const volatile - -> decltype(__arg(declval<_Args>()...)) - { - return __arg(std::forward<_Args>(std::get<_Indexes>(__tuple))...); - } - }; - - /** - * If the argument is a placeholder for the Nth argument, returns - * a reference to the Nth argument to the bind function object. - * [TR1 3.6.3/5 bullet 3] - */ - template - class _Mu<_Arg, false, true> - { - public: - template class result; - - template - class result<_CVMu(_CVArg, _Tuple)> - { - // Add a reference, if it hasn't already been done for us. - // This allows us to be a little bit sloppy in constructing - // the tuple that we pass to result_of<...>. - typedef typename _Safe_tuple_element<(is_placeholder<_Arg>::value - - 1), _Tuple>::type - __base_type; - - public: - typedef typename add_rvalue_reference<__base_type>::type type; - }; - - template - typename result<_Mu(_Arg, _Tuple)>::type - operator()(const volatile _Arg&, _Tuple& __tuple) const volatile - { - return std::forward::type>( - ::std::get<(is_placeholder<_Arg>::value - 1)>(__tuple)); - } - }; - - /** - * If the argument is just a value, returns a reference to that - * value. The cv-qualifiers on the reference are the same as the - * cv-qualifiers on the _Mu object. [TR1 3.6.3/5 bullet 4] - */ - template - class _Mu<_Arg, false, false> - { - public: - template struct result; - - template - struct result<_CVMu(_CVArg, _Tuple)> - { - typedef typename add_lvalue_reference<_CVArg>::type type; - }; - - // Pick up the cv-qualifiers of the argument - template - _CVArg&& - operator()(_CVArg&& __arg, _Tuple&) const volatile - { return std::forward<_CVArg>(__arg); } - }; - - /** - * Maps member pointers into instances of _Mem_fn but leaves all - * other function objects untouched. Used by std::bind(). The - * primary template handles the non-member-pointer case. - */ - template - struct _Maybe_wrap_member_pointer - { - typedef _Tp type; - - static const _Tp& - __do_wrap(const _Tp& __x) - { return __x; } - - static _Tp&& - __do_wrap(_Tp&& __x) - { return static_cast<_Tp&&>(__x); } - }; - - /** - * Maps member pointers into instances of _Mem_fn but leaves all - * other function objects untouched. Used by std::bind(). This - * partial specialization handles the member pointer case. - */ - template - struct _Maybe_wrap_member_pointer<_Tp _Class::*> - { - typedef _Mem_fn<_Tp _Class::*> type; - - static type - __do_wrap(_Tp _Class::* __pm) - { return type(__pm); } - }; - - // Specialization needed to prevent "forming reference to void" errors when - // bind() is called, because argument deduction instantiates - // _Maybe_wrap_member_pointer outside the immediate context where - // SFINAE applies. - template<> - struct _Maybe_wrap_member_pointer - { - typedef void type; - }; - - // std::get for volatile-qualified tuples - template - inline auto - __volget(volatile tuple<_Tp...>& __tuple) - -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile& - { return std::get<_Ind>(const_cast&>(__tuple)); } - - // std::get for const-volatile-qualified tuples - template - inline auto - __volget(const volatile tuple<_Tp...>& __tuple) - -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile& - { return std::get<_Ind>(const_cast&>(__tuple)); } - - /// Type of the function object returned from bind(). - template - struct _Bind; - - template - class _Bind<_Functor(_Bound_args...)> - : public _Weak_result_type<_Functor> - { - typedef _Bind __self_type; - typedef typename _Build_index_tuple::__type - _Bound_indexes; - - _Functor _M_f; - tuple<_Bound_args...> _M_bound_args; - - // Call unqualified - template - _Result - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) - { - return _M_f(_Mu<_Bound_args>() - (std::get<_Indexes>(_M_bound_args), __args)...); - } - - // Call as const - template - _Result - __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const - { - return _M_f(_Mu<_Bound_args>() - (std::get<_Indexes>(_M_bound_args), __args)...); - } - - // Call as volatile - template - _Result - __call_v(tuple<_Args...>&& __args, - _Index_tuple<_Indexes...>) volatile - { - return _M_f(_Mu<_Bound_args>() - (__volget<_Indexes>(_M_bound_args), __args)...); - } - - // Call as const volatile - template - _Result - __call_c_v(tuple<_Args...>&& __args, - _Index_tuple<_Indexes...>) const volatile - { - return _M_f(_Mu<_Bound_args>() - (__volget<_Indexes>(_M_bound_args), __args)...); - } - - public: - template - explicit _Bind(const _Functor& __f, _Args&&... __args) - : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) - { } - - template - explicit _Bind(_Functor&& __f, _Args&&... __args) - : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) - { } - - _Bind(const _Bind&) = default; - - _Bind(_Bind&& __b) - : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) - { } - - // Call unqualified - template()( - _Mu<_Bound_args>()( std::declval<_Bound_args&>(), - std::declval&>() )... ) )> - _Result - operator()(_Args&&... __args) - { - return this->__call<_Result>( - std::forward_as_tuple(std::forward<_Args>(__args)...), - _Bound_indexes()); - } - - // Call as const - template= 0), - typename add_const<_Functor>::type>::type>()( - _Mu<_Bound_args>()( std::declval(), - std::declval&>() )... ) )> - _Result - operator()(_Args&&... __args) const - { - return this->__call_c<_Result>( - std::forward_as_tuple(std::forward<_Args>(__args)...), - _Bound_indexes()); - } - - // Call as volatile - template= 0), - typename add_volatile<_Functor>::type>::type>()( - _Mu<_Bound_args>()( std::declval(), - std::declval&>() )... ) )> - _Result - operator()(_Args&&... __args) volatile - { - return this->__call_v<_Result>( - std::forward_as_tuple(std::forward<_Args>(__args)...), - _Bound_indexes()); - } - - // Call as const volatile - template= 0), - typename add_cv<_Functor>::type>::type>()( - _Mu<_Bound_args>()( std::declval(), - std::declval&>() )... ) )> - _Result - operator()(_Args&&... __args) const volatile - { - return this->__call_c_v<_Result>( - std::forward_as_tuple(std::forward<_Args>(__args)...), - _Bound_indexes()); - } - }; - - /// Type of the function object returned from bind(). - template - struct _Bind_result; - - template - class _Bind_result<_Result, _Functor(_Bound_args...)> - { - typedef _Bind_result __self_type; - typedef typename _Build_index_tuple::__type - _Bound_indexes; - - _Functor _M_f; - tuple<_Bound_args...> _M_bound_args; - - // sfinae types - template - struct __enable_if_void : enable_if::value, int> { }; - template - struct __disable_if_void : enable_if::value, int> { }; - - // Call unqualified - template - _Result - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, - typename __disable_if_void<_Res>::type = 0) - { - return _M_f(_Mu<_Bound_args>() - (std::get<_Indexes>(_M_bound_args), __args)...); - } - - // Call unqualified, return void - template - void - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, - typename __enable_if_void<_Res>::type = 0) - { - _M_f(_Mu<_Bound_args>() - (std::get<_Indexes>(_M_bound_args), __args)...); - } - - // Call as const - template - _Result - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, - typename __disable_if_void<_Res>::type = 0) const - { - return _M_f(_Mu<_Bound_args>() - (std::get<_Indexes>(_M_bound_args), __args)...); - } - - // Call as const, return void - template - void - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, - typename __enable_if_void<_Res>::type = 0) const - { - _M_f(_Mu<_Bound_args>() - (std::get<_Indexes>(_M_bound_args), __args)...); - } - - // Call as volatile - template - _Result - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, - typename __disable_if_void<_Res>::type = 0) volatile - { - return _M_f(_Mu<_Bound_args>() - (__volget<_Indexes>(_M_bound_args), __args)...); - } - - // Call as volatile, return void - template - void - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, - typename __enable_if_void<_Res>::type = 0) volatile - { - _M_f(_Mu<_Bound_args>() - (__volget<_Indexes>(_M_bound_args), __args)...); - } - - // Call as const volatile - template - _Result - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, - typename __disable_if_void<_Res>::type = 0) const volatile - { - return _M_f(_Mu<_Bound_args>() - (__volget<_Indexes>(_M_bound_args), __args)...); - } - - // Call as const volatile, return void - template - void - __call(tuple<_Args...>&& __args, - _Index_tuple<_Indexes...>, - typename __enable_if_void<_Res>::type = 0) const volatile - { - _M_f(_Mu<_Bound_args>() - (__volget<_Indexes>(_M_bound_args), __args)...); - } - - public: - typedef _Result result_type; - - template - explicit _Bind_result(const _Functor& __f, _Args&&... __args) - : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) - { } - - template - explicit _Bind_result(_Functor&& __f, _Args&&... __args) - : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) - { } - - _Bind_result(const _Bind_result&) = default; - - _Bind_result(_Bind_result&& __b) - : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) - { } - - // Call unqualified - template - result_type - operator()(_Args&&... __args) - { - return this->__call<_Result>( - std::forward_as_tuple(std::forward<_Args>(__args)...), - _Bound_indexes()); - } - - // Call as const - template - result_type - operator()(_Args&&... __args) const - { - return this->__call<_Result>( - std::forward_as_tuple(std::forward<_Args>(__args)...), - _Bound_indexes()); - } - - // Call as volatile - template - result_type - operator()(_Args&&... __args) volatile - { - return this->__call<_Result>( - std::forward_as_tuple(std::forward<_Args>(__args)...), - _Bound_indexes()); - } - - // Call as const volatile - template - result_type - operator()(_Args&&... __args) const volatile - { - return this->__call<_Result>( - std::forward_as_tuple(std::forward<_Args>(__args)...), - _Bound_indexes()); - } - }; - - /** - * @brief Class template _Bind is always a bind expression. - * @ingroup binders - */ - template - struct is_bind_expression<_Bind<_Signature> > - : public true_type { }; - - /** - * @brief Class template _Bind is always a bind expression. - * @ingroup binders - */ - template - struct is_bind_expression > - : public true_type { }; - - /** - * @brief Class template _Bind is always a bind expression. - * @ingroup binders - */ - template - struct is_bind_expression > - : public true_type { }; - - /** - * @brief Class template _Bind is always a bind expression. - * @ingroup binders - */ - template - struct is_bind_expression> - : public true_type { }; - - /** - * @brief Class template _Bind_result is always a bind expression. - * @ingroup binders - */ - template - struct is_bind_expression<_Bind_result<_Result, _Signature>> - : public true_type { }; - - /** - * @brief Class template _Bind_result is always a bind expression. - * @ingroup binders - */ - template - struct is_bind_expression> - : public true_type { }; - - /** - * @brief Class template _Bind_result is always a bind expression. - * @ingroup binders - */ - template - struct is_bind_expression> - : public true_type { }; - - /** - * @brief Class template _Bind_result is always a bind expression. - * @ingroup binders - */ - template - struct is_bind_expression> - : public true_type { }; - - template - struct _Bind_check_arity { }; - - template - struct _Bind_check_arity<_Ret (*)(_Args...), _BoundArgs...> - { - static_assert(sizeof...(_BoundArgs) == sizeof...(_Args), - "Wrong number of arguments for function"); - }; - - template - struct _Bind_check_arity<_Ret (*)(_Args......), _BoundArgs...> - { - static_assert(sizeof...(_BoundArgs) >= sizeof...(_Args), - "Wrong number of arguments for function"); - }; - - template - struct _Bind_check_arity<_Tp _Class::*, _BoundArgs...> - { - using _Arity = typename _Mem_fn<_Tp _Class::*>::_Arity; - using _Varargs = typename _Mem_fn<_Tp _Class::*>::_Varargs; - static_assert(_Varargs::value - ? sizeof...(_BoundArgs) >= _Arity::value + 1 - : sizeof...(_BoundArgs) == _Arity::value + 1, - "Wrong number of arguments for pointer-to-member"); - }; - - // Trait type used to remove std::bind() from overload set via SFINAE - // when first argument has integer type, so that std::bind() will - // not be a better match than ::bind() from the BSD Sockets API. - template::type> - using __is_socketlike = __or_, is_enum<_Tp2>>; - - template - struct _Bind_helper - : _Bind_check_arity::type, _BoundArgs...> - { - typedef _Maybe_wrap_member_pointer::type> - __maybe_type; - typedef typename __maybe_type::type __func_type; - typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type; - }; - - // Partial specialization for is_socketlike == true, does not define - // nested type so std::bind() will not participate in overload resolution - // when the first argument might be a socket file descriptor. - template - struct _Bind_helper - { }; - - /** - * @brief Function template for std::bind. - * @ingroup binders - */ - template - inline typename - _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type - bind(_Func&& __f, _BoundArgs&&... __args) - { - typedef _Bind_helper __helper_type; - typedef typename __helper_type::__maybe_type __maybe_type; - typedef typename __helper_type::type __result_type; - return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)), - std::forward<_BoundArgs>(__args)...); - } - - template - struct _Bindres_helper - : _Bind_check_arity::type, _BoundArgs...> - { - typedef _Maybe_wrap_member_pointer::type> - __maybe_type; - typedef typename __maybe_type::type __functor_type; - typedef _Bind_result<_Result, - __functor_type(typename decay<_BoundArgs>::type...)> - type; - }; - - /** - * @brief Function template for std::bind. - * @ingroup binders - */ - template - inline - typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type - bind(_Func&& __f, _BoundArgs&&... __args) - { - typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type; - typedef typename __helper_type::__maybe_type __maybe_type; - typedef typename __helper_type::type __result_type; - return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)), - std::forward<_BoundArgs>(__args)...); - } - - template - struct _Bind_simple; - - template - struct _Bind_simple<_Callable(_Args...)> - { - typedef typename result_of<_Callable(_Args...)>::type result_type; - - template - explicit - _Bind_simple(_Tp&& __f, _Up&&... __args) - : _M_bound(std::forward<_Tp>(__f), std::forward<_Up>(__args)...) - { } - - _Bind_simple(const _Bind_simple&) = default; - _Bind_simple(_Bind_simple&&) = default; - - result_type - operator()() - { - typedef typename _Build_index_tuple::__type _Indices; - return _M_invoke(_Indices()); - } - - private: - template - typename result_of<_Callable(_Args...)>::type - _M_invoke(_Index_tuple<_Indices...>) - { - // std::bind always forwards bound arguments as lvalues, - // but this type can call functions which only accept rvalues. - return std::forward<_Callable>(std::get<0>(_M_bound))( - std::forward<_Args>(std::get<_Indices+1>(_M_bound))...); - } - - std::tuple<_Callable, _Args...> _M_bound; - }; - - template - struct _Bind_simple_helper - : _Bind_check_arity::type, _BoundArgs...> - { - typedef _Maybe_wrap_member_pointer::type> - __maybe_type; - typedef typename __maybe_type::type __func_type; - typedef _Bind_simple<__func_type(typename decay<_BoundArgs>::type...)> - __type; - }; - - // Simplified version of std::bind for internal use, without support for - // unbound arguments, placeholders or nested bind expressions. - template - typename _Bind_simple_helper<_Callable, _Args...>::__type - __bind_simple(_Callable&& __callable, _Args&&... __args) - { - typedef _Bind_simple_helper<_Callable, _Args...> __helper_type; - typedef typename __helper_type::__maybe_type __maybe_type; - typedef typename __helper_type::__type __result_type; - return __result_type( - __maybe_type::__do_wrap( std::forward<_Callable>(__callable)), - std::forward<_Args>(__args)...); - } - - /** - * @brief Exception class thrown when class template function's - * operator() is called with an empty target. - * @ingroup exceptions - */ - class bad_function_call : public std::exception - { - public: - virtual ~bad_function_call() noexcept; - - const char* what() const noexcept; - }; - - /** - * Trait identifying "location-invariant" types, meaning that the - * address of the object (or any of its members) will not escape. - * Trivially copyable types are location-invariant and users can - * specialize this trait for other types. - */ - template - struct __is_location_invariant - : is_trivially_copyable<_Tp>::type - { }; - - class _Undefined_class; - - union _Nocopy_types - { - void* _M_object; - const void* _M_const_object; - void (*_M_function_pointer)(); - void (_Undefined_class::*_M_member_pointer)(); - }; - - union _Any_data - { - void* _M_access() { return &_M_pod_data[0]; } - const void* _M_access() const { return &_M_pod_data[0]; } - - template - _Tp& - _M_access() - { return *static_cast<_Tp*>(_M_access()); } - - template - const _Tp& - _M_access() const - { return *static_cast(_M_access()); } - - _Nocopy_types _M_unused; - char _M_pod_data[sizeof(_Nocopy_types)]; - }; - - enum _Manager_operation - { - __get_type_info, - __get_functor_ptr, - __clone_functor, - __destroy_functor - }; - - // Simple type wrapper that helps avoid annoying const problems - // when casting between void pointers and pointers-to-pointers. - template - struct _Simple_type_wrapper - { - _Simple_type_wrapper(_Tp __value) : __value(__value) { } - - _Tp __value; - }; - - template - struct __is_location_invariant<_Simple_type_wrapper<_Tp> > - : __is_location_invariant<_Tp> - { }; - - // Converts a reference to a function object into a callable - // function object. - template - inline _Functor& - __callable_functor(_Functor& __f) - { return __f; } - - template - inline _Mem_fn<_Member _Class::*> - __callable_functor(_Member _Class::* &__p) - { return std::mem_fn(__p); } - - template - inline _Mem_fn<_Member _Class::*> - __callable_functor(_Member _Class::* const &__p) - { return std::mem_fn(__p); } - - template - inline _Mem_fn<_Member _Class::*> - __callable_functor(_Member _Class::* volatile &__p) - { return std::mem_fn(__p); } - - template - inline _Mem_fn<_Member _Class::*> - __callable_functor(_Member _Class::* const volatile &__p) - { return std::mem_fn(__p); } - - template - class function; - - /// Base class of all polymorphic function object wrappers. - class _Function_base - { - public: - static const std::size_t _M_max_size = sizeof(_Nocopy_types); - static const std::size_t _M_max_align = __alignof__(_Nocopy_types); - - template - class _Base_manager - { - protected: - static const bool __stored_locally = - (__is_location_invariant<_Functor>::value - && sizeof(_Functor) <= _M_max_size - && __alignof__(_Functor) <= _M_max_align - && (_M_max_align % __alignof__(_Functor) == 0)); - - typedef integral_constant _Local_storage; - - // Retrieve a pointer to the function object - static _Functor* - _M_get_pointer(const _Any_data& __source) - { - const _Functor* __ptr = - __stored_locally? std::__addressof(__source._M_access<_Functor>()) - /* have stored a pointer */ : __source._M_access<_Functor*>(); - return const_cast<_Functor*>(__ptr); - } - - // Clone a location-invariant function object that fits within - // an _Any_data structure. - static void - _M_clone(_Any_data& __dest, const _Any_data& __source, true_type) - { - new (__dest._M_access()) _Functor(__source._M_access<_Functor>()); - } - - // Clone a function object that is not location-invariant or - // that cannot fit into an _Any_data structure. - static void - _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) - { - __dest._M_access<_Functor*>() = - new _Functor(*__source._M_access<_Functor*>()); - } - - // Destroying a location-invariant object may still require - // destruction. - static void - _M_destroy(_Any_data& __victim, true_type) - { - __victim._M_access<_Functor>().~_Functor(); - } - - // Destroying an object located on the heap. - static void - _M_destroy(_Any_data& __victim, false_type) - { - delete __victim._M_access<_Functor*>(); - } - - public: - static bool - _M_manager(_Any_data& __dest, const _Any_data& __source, - _Manager_operation __op) - { - switch (__op) - { -#if __cpp_rtti - case __get_type_info: - __dest._M_access() = &typeid(_Functor); - break; -#endif - case __get_functor_ptr: - __dest._M_access<_Functor*>() = _M_get_pointer(__source); - break; - - case __clone_functor: - _M_clone(__dest, __source, _Local_storage()); - break; - - case __destroy_functor: - _M_destroy(__dest, _Local_storage()); - break; - } - return false; - } - - static void - _M_init_functor(_Any_data& __functor, _Functor&& __f) - { _M_init_functor(__functor, std::move(__f), _Local_storage()); } - - template - static bool - _M_not_empty_function(const function<_Signature>& __f) - { return static_cast(__f); } - - template - static bool - _M_not_empty_function(_Tp* const& __fp) - { return __fp; } - - template - static bool - _M_not_empty_function(_Tp _Class::* const& __mp) - { return __mp; } - - template - static bool - _M_not_empty_function(const _Tp&) - { return true; } - - private: - static void - _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type) - { new (__functor._M_access()) _Functor(std::move(__f)); } - - static void - _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) - { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); } - }; - - template - class _Ref_manager : public _Base_manager<_Functor*> - { - typedef _Function_base::_Base_manager<_Functor*> _Base; - - public: - static bool - _M_manager(_Any_data& __dest, const _Any_data& __source, - _Manager_operation __op) - { - switch (__op) - { -#if __cpp_rtti - case __get_type_info: - __dest._M_access() = &typeid(_Functor); - break; -#endif - case __get_functor_ptr: - __dest._M_access<_Functor*>() = *_Base::_M_get_pointer(__source); - return is_const<_Functor>::value; - break; - - default: - _Base::_M_manager(__dest, __source, __op); - } - return false; - } - - static void - _M_init_functor(_Any_data& __functor, reference_wrapper<_Functor> __f) - { - _Base::_M_init_functor(__functor, std::__addressof(__f.get())); - } - }; - - _Function_base() : _M_manager(nullptr) { } - - ~_Function_base() - { - if (_M_manager) - _M_manager(_M_functor, _M_functor, __destroy_functor); - } - - - bool _M_empty() const { return !_M_manager; } - - typedef bool (*_Manager_type)(_Any_data&, const _Any_data&, - _Manager_operation); - - _Any_data _M_functor; - _Manager_type _M_manager; - }; - - template - class _Function_handler; - - template - class _Function_handler<_Res(_ArgTypes...), _Functor> - : public _Function_base::_Base_manager<_Functor> - { - typedef _Function_base::_Base_manager<_Functor> _Base; - - public: - static _Res - _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) - { - return (*_Base::_M_get_pointer(__functor))( - std::forward<_ArgTypes>(__args)...); - } - }; - - template - class _Function_handler - : public _Function_base::_Base_manager<_Functor> - { - typedef _Function_base::_Base_manager<_Functor> _Base; - - public: - static void - _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) - { - (*_Base::_M_get_pointer(__functor))( - std::forward<_ArgTypes>(__args)...); - } - }; - - template - class _Function_handler<_Res(_ArgTypes...), reference_wrapper<_Functor> > - : public _Function_base::_Ref_manager<_Functor> - { - typedef _Function_base::_Ref_manager<_Functor> _Base; - - public: - static _Res - _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) - { - return __callable_functor(**_Base::_M_get_pointer(__functor))( - std::forward<_ArgTypes>(__args)...); - } - }; - - template - class _Function_handler > - : public _Function_base::_Ref_manager<_Functor> - { - typedef _Function_base::_Ref_manager<_Functor> _Base; - - public: - static void - _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) - { - __callable_functor(**_Base::_M_get_pointer(__functor))( - std::forward<_ArgTypes>(__args)...); - } - }; - - template - class _Function_handler<_Res(_ArgTypes...), _Member _Class::*> - : public _Function_handler - { - typedef _Function_handler - _Base; - - public: - static _Res - _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) - { - return std::mem_fn(_Base::_M_get_pointer(__functor)->__value)( - std::forward<_ArgTypes>(__args)...); - } - }; - - template - class _Function_handler - : public _Function_base::_Base_manager< - _Simple_type_wrapper< _Member _Class::* > > - { - typedef _Member _Class::* _Functor; - typedef _Simple_type_wrapper<_Functor> _Wrapper; - typedef _Function_base::_Base_manager<_Wrapper> _Base; - - public: - static bool - _M_manager(_Any_data& __dest, const _Any_data& __source, - _Manager_operation __op) - { - switch (__op) - { -#if __cpp_rtti - case __get_type_info: - __dest._M_access() = &typeid(_Functor); - break; -#endif - case __get_functor_ptr: - __dest._M_access<_Functor*>() = - &_Base::_M_get_pointer(__source)->__value; - break; - - default: - _Base::_M_manager(__dest, __source, __op); - } - return false; - } - - static void - _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) - { - std::mem_fn(_Base::_M_get_pointer(__functor)->__value)( - std::forward<_ArgTypes>(__args)...); - } - }; - - template - using __check_func_return_type - = __or_, is_convertible<_From, _To>>; - - /** - * @brief Primary class template for std::function. - * @ingroup functors - * - * Polymorphic function wrapper. - */ - template - class function<_Res(_ArgTypes...)> - : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, - private _Function_base - { - typedef _Res _Signature_type(_ArgTypes...); - - template - using _Invoke = decltype(__callable_functor(std::declval<_Functor&>()) - (std::declval<_ArgTypes>()...) ); - - // Used so the return type convertibility checks aren't done when - // performing overload resolution for copy construction/assignment. - template - using _NotSelf = __not_>; - - template - using _Callable - = __and_<_NotSelf<_Functor>, - __check_func_return_type<_Invoke<_Functor>, _Res>>; - - template - using _Requires = typename enable_if<_Cond::value, _Tp>::type; - - public: - typedef _Res result_type; - - // [3.7.2.1] construct/copy/destroy - - /** - * @brief Default construct creates an empty function call wrapper. - * @post @c !(bool)*this - */ - function() noexcept - : _Function_base() { } - - /** - * @brief Creates an empty function call wrapper. - * @post @c !(bool)*this - */ - function(nullptr_t) noexcept - : _Function_base() { } - - /** - * @brief %Function copy constructor. - * @param __x A %function object with identical call signature. - * @post @c bool(*this) == bool(__x) - * - * The newly-created %function contains a copy of the target of @a - * __x (if it has one). - */ - function(const function& __x); - - /** - * @brief %Function move constructor. - * @param __x A %function object rvalue with identical call signature. - * - * The newly-created %function contains the target of @a __x - * (if it has one). - */ - function(function&& __x) : _Function_base() - { - __x.swap(*this); - } - - // TODO: needs allocator_arg_t - - /** - * @brief Builds a %function that targets a copy of the incoming - * function object. - * @param __f A %function object that is callable with parameters of - * type @c T1, @c T2, ..., @c TN and returns a value convertible - * to @c Res. - * - * The newly-created %function object will target a copy of - * @a __f. If @a __f is @c reference_wrapper, then this function - * object will contain a reference to the function object @c - * __f.get(). If @a __f is a NULL function pointer or NULL - * pointer-to-member, the newly-created object will be empty. - * - * If @a __f is a non-NULL function pointer or an object of type @c - * reference_wrapper, this function will not throw. - */ - template, void>> - function(_Functor); - - /** - * @brief %Function assignment operator. - * @param __x A %function with identical call signature. - * @post @c (bool)*this == (bool)x - * @returns @c *this - * - * The target of @a __x is copied to @c *this. If @a __x has no - * target, then @c *this will be empty. - * - * If @a __x targets a function pointer or a reference to a function - * object, then this operation will not throw an %exception. - */ - function& - operator=(const function& __x) - { - function(__x).swap(*this); - return *this; - } - - /** - * @brief %Function move-assignment operator. - * @param __x A %function rvalue with identical call signature. - * @returns @c *this - * - * The target of @a __x is moved to @c *this. If @a __x has no - * target, then @c *this will be empty. - * - * If @a __x targets a function pointer or a reference to a function - * object, then this operation will not throw an %exception. - */ - function& - operator=(function&& __x) - { - function(std::move(__x)).swap(*this); - return *this; - } - - /** - * @brief %Function assignment to zero. - * @post @c !(bool)*this - * @returns @c *this - * - * The target of @c *this is deallocated, leaving it empty. - */ - function& - operator=(nullptr_t) noexcept - { - if (_M_manager) - { - _M_manager(_M_functor, _M_functor, __destroy_functor); - _M_manager = nullptr; - _M_invoker = nullptr; - } - return *this; - } - - /** - * @brief %Function assignment to a new target. - * @param __f A %function object that is callable with parameters of - * type @c T1, @c T2, ..., @c TN and returns a value convertible - * to @c Res. - * @return @c *this - * - * This %function object wrapper will target a copy of @a - * __f. If @a __f is @c reference_wrapper, then this function - * object will contain a reference to the function object @c - * __f.get(). If @a __f is a NULL function pointer or NULL - * pointer-to-member, @c this object will be empty. - * - * If @a __f is a non-NULL function pointer or an object of type @c - * reference_wrapper, this function will not throw. - */ - template - _Requires<_Callable::type>, function&> - operator=(_Functor&& __f) - { - function(std::forward<_Functor>(__f)).swap(*this); - return *this; - } - - /// @overload - template - function& - operator=(reference_wrapper<_Functor> __f) noexcept - { - function(__f).swap(*this); - return *this; - } - - // [3.7.2.2] function modifiers - - /** - * @brief Swap the targets of two %function objects. - * @param __x A %function with identical call signature. - * - * Swap the targets of @c this function object and @a __f. This - * function will not throw an %exception. - */ - void swap(function& __x) - { - std::swap(_M_functor, __x._M_functor); - std::swap(_M_manager, __x._M_manager); - std::swap(_M_invoker, __x._M_invoker); - } - - // TODO: needs allocator_arg_t - /* - template - void - assign(_Functor&& __f, const _Alloc& __a) - { - function(allocator_arg, __a, - std::forward<_Functor>(__f)).swap(*this); - } - */ - - // [3.7.2.3] function capacity - - /** - * @brief Determine if the %function wrapper has a target. - * - * @return @c true when this %function object contains a target, - * or @c false when it is empty. - * - * This function will not throw an %exception. - */ - explicit operator bool() const noexcept - { return !_M_empty(); } - - // [3.7.2.4] function invocation - - /** - * @brief Invokes the function targeted by @c *this. - * @returns the result of the target. - * @throws bad_function_call when @c !(bool)*this - * - * The function call operator invokes the target function object - * stored by @c this. - */ - _Res operator()(_ArgTypes... __args) const; - -#if __cpp_rtti - // [3.7.2.5] function target access - /** - * @brief Determine the type of the target of this function object - * wrapper. - * - * @returns the type identifier of the target function object, or - * @c typeid(void) if @c !(bool)*this. - * - * This function will not throw an %exception. - */ - const type_info& target_type() const noexcept; - - /** - * @brief Access the stored target function object. - * - * @return Returns a pointer to the stored target function object, - * if @c typeid(Functor).equals(target_type()); otherwise, a NULL - * pointer. - * - * This function will not throw an %exception. - */ - template _Functor* target() noexcept; - - /// @overload - template const _Functor* target() const noexcept; -#endif - - private: - using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...); - _Invoker_type _M_invoker; - }; - - // Out-of-line member definitions. - template - function<_Res(_ArgTypes...)>:: - function(const function& __x) - : _Function_base() - { - if (static_cast(__x)) - { - __x._M_manager(_M_functor, __x._M_functor, __clone_functor); - _M_invoker = __x._M_invoker; - _M_manager = __x._M_manager; - } - } - - template - template - function<_Res(_ArgTypes...)>:: - function(_Functor __f) - : _Function_base() - { - typedef _Function_handler<_Signature_type, _Functor> _My_handler; - - if (_My_handler::_M_not_empty_function(__f)) - { - _My_handler::_M_init_functor(_M_functor, std::move(__f)); - _M_invoker = &_My_handler::_M_invoke; - _M_manager = &_My_handler::_M_manager; - } - } - - template - _Res - function<_Res(_ArgTypes...)>:: - operator()(_ArgTypes... __args) const - { - if (_M_empty()) - __throw_bad_function_call(); - return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); - } - -#if __cpp_rtti - template - const type_info& - function<_Res(_ArgTypes...)>:: - target_type() const noexcept - { - if (_M_manager) - { - _Any_data __typeinfo_result; - _M_manager(__typeinfo_result, _M_functor, __get_type_info); - return *__typeinfo_result._M_access(); - } - else - return typeid(void); - } - - template - template - _Functor* - function<_Res(_ArgTypes...)>:: - target() noexcept - { - if (typeid(_Functor) == target_type() && _M_manager) - { - _Any_data __ptr; - if (_M_manager(__ptr, _M_functor, __get_functor_ptr) - && !is_const<_Functor>::value) - return 0; - else - return __ptr._M_access<_Functor*>(); - } - else - return 0; - } - - template - template - const _Functor* - function<_Res(_ArgTypes...)>:: - target() const noexcept - { - if (typeid(_Functor) == target_type() && _M_manager) - { - _Any_data __ptr; - _M_manager(__ptr, _M_functor, __get_functor_ptr); - return __ptr._M_access(); - } - else - return 0; - } -#endif - - // [20.7.15.2.6] null pointer comparisons - - /** - * @brief Compares a polymorphic function object wrapper against 0 - * (the NULL pointer). - * @returns @c true if the wrapper has no target, @c false otherwise - * - * This function will not throw an %exception. - */ - template - inline bool - operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept - { return !static_cast(__f); } - - /// @overload - template - inline bool - operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept - { return !static_cast(__f); } - - /** - * @brief Compares a polymorphic function object wrapper against 0 - * (the NULL pointer). - * @returns @c false if the wrapper has no target, @c true otherwise - * - * This function will not throw an %exception. - */ - template - inline bool - operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept - { return static_cast(__f); } - - /// @overload - template - inline bool - operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept - { return static_cast(__f); } - - // [20.7.15.2.7] specialized algorithms - - /** - * @brief Swap the targets of two polymorphic function object wrappers. - * - * This function will not throw an %exception. - */ - template - inline void - swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) - { __x.swap(__y); } - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace std - -#endif // C++11 - -#endif // _GLIBCXX_FUNCTIONAL diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algo.h b/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algo.h deleted file mode 100644 index 7576c2cb4..000000000 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algo.h +++ /dev/null @@ -1,2354 +0,0 @@ -// -*- C++ -*- - -// Copyright (C) 2007-2015 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the terms -// of the GNU General Public License as published by the Free Software -// Foundation; either version 3, or (at your option) any later -// version. - -// This library is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/** @file parallel/algo.h - * @brief Parallel STL function calls corresponding to the stl_algo.h header. - * - * The functions defined here mainly do case switches and - * call the actual parallelized versions in other files. - * Inlining policy: Functions that basically only contain one function call, - * are declared inline. - * This file is a GNU parallel extension to the Standard C++ Library. - */ - -// Written by Johannes Singler and Felix Putze. - -#ifndef _GLIBCXX_PARALLEL_ALGO_H -#define _GLIBCXX_PARALLEL_ALGO_H 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace std _GLIBCXX_VISIBILITY(default) -{ -namespace __parallel -{ - // Sequential fallback - template - inline _Function - for_each(_IIter __begin, _IIter __end, _Function __f, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::for_each(__begin, __end, __f); } - - - // Sequential fallback for input iterator case - template - inline _Function - __for_each_switch(_IIter __begin, _IIter __end, _Function __f, - _IteratorTag) - { return for_each(__begin, __end, __f, __gnu_parallel::sequential_tag()); } - - // Parallel algorithm for random access iterators - template - _Function - __for_each_switch(_RAIter __begin, _RAIter __end, - _Function __f, random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().for_each_minimal_n - && __gnu_parallel::__is_parallel(__parallelism_tag))) - { - bool __dummy; - __gnu_parallel::__for_each_selector<_RAIter> __functionality; - - return __gnu_parallel:: - __for_each_template_random_access( - __begin, __end, __f, __functionality, - __gnu_parallel::_DummyReduct(), true, __dummy, -1, - __parallelism_tag); - } - else - return for_each(__begin, __end, __f, __gnu_parallel::sequential_tag()); - } - - // Public interface - template - inline _Function - for_each(_Iterator __begin, _Iterator __end, _Function __f, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef std::iterator_traits<_Iterator> _IteratorTraits; - typedef typename _IteratorTraits::iterator_category _IteratorCategory; - return __for_each_switch(__begin, __end, __f, _IteratorCategory(), - __parallelism_tag); - } - - template - inline _Function - for_each(_Iterator __begin, _Iterator __end, _Function __f) - { - typedef std::iterator_traits<_Iterator> _IteratorTraits; - typedef typename _IteratorTraits::iterator_category _IteratorCategory; - return __for_each_switch(__begin, __end, __f, _IteratorCategory()); - } - - - // Sequential fallback - template - inline _IIter - find(_IIter __begin, _IIter __end, const _Tp& __val, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::find(__begin, __end, __val); } - - // Sequential fallback for input iterator case - template - inline _IIter - __find_switch(_IIter __begin, _IIter __end, const _Tp& __val, - _IteratorTag) - { return _GLIBCXX_STD_A::find(__begin, __end, __val); } - - // Parallel find for random access iterators - template - _RAIter - __find_switch(_RAIter __begin, _RAIter __end, - const _Tp& __val, random_access_iterator_tag) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - - if (_GLIBCXX_PARALLEL_CONDITION(true)) - { - __gnu_parallel::__binder2nd<__gnu_parallel::_EqualTo<_ValueType, - const _Tp&>, - _ValueType, const _Tp&, bool> - __comp(__gnu_parallel::_EqualTo<_ValueType, const _Tp&>(), __val); - return __gnu_parallel::__find_template( - __begin, __end, __begin, __comp, - __gnu_parallel::__find_if_selector()).first; - } - else - return _GLIBCXX_STD_A::find(__begin, __end, __val); - } - - // Public interface - template - inline _IIter - find(_IIter __begin, _IIter __end, const _Tp& __val) - { - typedef std::iterator_traits<_IIter> _IteratorTraits; - typedef typename _IteratorTraits::iterator_category _IteratorCategory; - return __find_switch(__begin, __end, __val, _IteratorCategory()); - } - - // Sequential fallback - template - inline _IIter - find_if(_IIter __begin, _IIter __end, _Predicate __pred, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); } - - // Sequential fallback for input iterator case - template - inline _IIter - __find_if_switch(_IIter __begin, _IIter __end, _Predicate __pred, - _IteratorTag) - { return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); } - - // Parallel find_if for random access iterators - template - _RAIter - __find_if_switch(_RAIter __begin, _RAIter __end, - _Predicate __pred, random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION(true)) - return __gnu_parallel::__find_template(__begin, __end, __begin, __pred, - __gnu_parallel:: - __find_if_selector()).first; - else - return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); - } - - // Public interface - template - inline _IIter - find_if(_IIter __begin, _IIter __end, _Predicate __pred) - { - typedef std::iterator_traits<_IIter> _IteratorTraits; - typedef typename _IteratorTraits::iterator_category _IteratorCategory; - return __find_if_switch(__begin, __end, __pred, _IteratorCategory()); - } - - // Sequential fallback - template - inline _IIter - find_first_of(_IIter __begin1, _IIter __end1, - _FIterator __begin2, _FIterator __end2, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::find_first_of(__begin1, __end1, __begin2, __end2); - } - - // Sequential fallback - template - inline _IIter - find_first_of(_IIter __begin1, _IIter __end1, - _FIterator __begin2, _FIterator __end2, - _BinaryPredicate __comp, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::find_first_of( - __begin1, __end1, __begin2, __end2, __comp); } - - // Sequential fallback for input iterator type - template - inline _IIter - __find_first_of_switch(_IIter __begin1, _IIter __end1, - _FIterator __begin2, _FIterator __end2, - _IteratorTag1, _IteratorTag2) - { return find_first_of(__begin1, __end1, __begin2, __end2, - __gnu_parallel::sequential_tag()); } - - // Parallel algorithm for random access iterators - template - inline _RAIter - __find_first_of_switch(_RAIter __begin1, - _RAIter __end1, - _FIterator __begin2, _FIterator __end2, - _BinaryPredicate __comp, random_access_iterator_tag, - _IteratorTag) - { - return __gnu_parallel:: - __find_template(__begin1, __end1, __begin1, __comp, - __gnu_parallel::__find_first_of_selector - <_FIterator>(__begin2, __end2)).first; - } - - // Sequential fallback for input iterator type - template - inline _IIter - __find_first_of_switch(_IIter __begin1, _IIter __end1, - _FIterator __begin2, _FIterator __end2, - _BinaryPredicate __comp, _IteratorTag1, _IteratorTag2) - { return find_first_of(__begin1, __end1, __begin2, __end2, __comp, - __gnu_parallel::sequential_tag()); } - - // Public interface - template - inline _IIter - find_first_of(_IIter __begin1, _IIter __end1, - _FIterator __begin2, _FIterator __end2, - _BinaryPredicate __comp) - { - typedef std::iterator_traits<_IIter> _IIterTraits; - typedef std::iterator_traits<_FIterator> _FIterTraits; - typedef typename _IIterTraits::iterator_category _IIteratorCategory; - typedef typename _FIterTraits::iterator_category _FIteratorCategory; - - return __find_first_of_switch(__begin1, __end1, __begin2, __end2, __comp, - _IIteratorCategory(), _FIteratorCategory()); - } - - // Public interface, insert default comparator - template - inline _IIter - find_first_of(_IIter __begin1, _IIter __end1, - _FIterator __begin2, _FIterator __end2) - { - typedef std::iterator_traits<_IIter> _IIterTraits; - typedef std::iterator_traits<_FIterator> _FIterTraits; - typedef typename _IIterTraits::value_type _IValueType; - typedef typename _FIterTraits::value_type _FValueType; - - return __gnu_parallel::find_first_of(__begin1, __end1, __begin2, __end2, - __gnu_parallel::_EqualTo<_IValueType, _FValueType>()); - } - - // Sequential fallback - template - inline _OutputIterator - unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::unique_copy(__begin1, __end1, __out); } - - // Sequential fallback - template - inline _OutputIterator - unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out, - _Predicate __pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::unique_copy(__begin1, __end1, __out, __pred); } - - // Sequential fallback for input iterator case - template - inline _OutputIterator - __unique_copy_switch(_IIter __begin, _IIter __last, - _OutputIterator __out, _Predicate __pred, - _IteratorTag1, _IteratorTag2) - { return _GLIBCXX_STD_A::unique_copy(__begin, __last, __out, __pred); } - - // Parallel unique_copy for random access iterators - template - RandomAccessOutputIterator - __unique_copy_switch(_RAIter __begin, _RAIter __last, - RandomAccessOutputIterator __out, _Predicate __pred, - random_access_iterator_tag, random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__last - __begin) - > __gnu_parallel::_Settings::get().unique_copy_minimal_n)) - return __gnu_parallel::__parallel_unique_copy( - __begin, __last, __out, __pred); - else - return _GLIBCXX_STD_A::unique_copy(__begin, __last, __out, __pred); - } - - // Public interface - template - inline _OutputIterator - unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out) - { - typedef std::iterator_traits<_IIter> _IIterTraits; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits::iterator_category _IIteratorCategory; - typedef typename _IIterTraits::value_type _ValueType; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __unique_copy_switch( - __begin1, __end1, __out, equal_to<_ValueType>(), - _IIteratorCategory(), _OIterCategory()); - } - - // Public interface - template - inline _OutputIterator - unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out, - _Predicate __pred) - { - typedef std::iterator_traits<_IIter> _IIterTraits; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits::iterator_category _IIteratorCategory; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __unique_copy_switch( - __begin1, __end1, __out, __pred, - _IIteratorCategory(), _OIterCategory()); - } - - // Sequential fallback - template - inline _OutputIterator - set_union(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::set_union( - __begin1, __end1, __begin2, __end2, __out); } - - // Sequential fallback - template - inline _OutputIterator - set_union(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, _Predicate __pred, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::set_union(__begin1, __end1, - __begin2, __end2, __out, __pred); } - - // Sequential fallback for input iterator case - template - inline _OutputIterator - __set_union_switch( - _IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __result, _Predicate __pred, - _IteratorTag1, _IteratorTag2, _IteratorTag3) - { return _GLIBCXX_STD_A::set_union(__begin1, __end1, - __begin2, __end2, __result, __pred); } - - // Parallel set_union for random access iterators - template - _Output_RAIter - __set_union_switch(_RAIter1 __begin1, _RAIter1 __end1, - _RAIter2 __begin2, _RAIter2 __end2, - _Output_RAIter __result, _Predicate __pred, - random_access_iterator_tag, random_access_iterator_tag, - random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) - >= __gnu_parallel::_Settings::get().set_union_minimal_n - || static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2) - >= __gnu_parallel::_Settings::get().set_union_minimal_n)) - return __gnu_parallel::__parallel_set_union( - __begin1, __end1, __begin2, __end2, __result, __pred); - else - return _GLIBCXX_STD_A::set_union(__begin1, __end1, - __begin2, __end2, __result, __pred); - } - - // Public interface - template - inline _OutputIterator - set_union(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, _OutputIterator __out) - { - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef typename _OIterTraits::iterator_category _OIterCategory; - typedef typename _IIterTraits1::value_type _ValueType1; - typedef typename _IIterTraits2::value_type _ValueType2; - - return __set_union_switch( - __begin1, __end1, __begin2, __end2, __out, - __gnu_parallel::_Less<_ValueType1, _ValueType2>(), - _IIterCategory1(), _IIterCategory2(), _OIterCategory()); - } - - // Public interface - template - inline _OutputIterator - set_union(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, _Predicate __pred) - { - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __set_union_switch( - __begin1, __end1, __begin2, __end2, __out, __pred, - _IIterCategory1(), _IIterCategory2(), _OIterCategory()); - } - - // Sequential fallback. - template - inline _OutputIterator - set_intersection(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::set_intersection(__begin1, __end1, - __begin2, __end2, __out); } - - // Sequential fallback. - template - inline _OutputIterator - set_intersection(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, _Predicate __pred, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::set_intersection( - __begin1, __end1, __begin2, __end2, __out, __pred); } - - // Sequential fallback for input iterator case - template - inline _OutputIterator - __set_intersection_switch(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __result, _Predicate __pred, - _IteratorTag1, _IteratorTag2, _IteratorTag3) - { return _GLIBCXX_STD_A::set_intersection(__begin1, __end1, __begin2, - __end2, __result, __pred); } - - // Parallel set_intersection for random access iterators - template - _Output_RAIter - __set_intersection_switch(_RAIter1 __begin1, - _RAIter1 __end1, - _RAIter2 __begin2, - _RAIter2 __end2, - _Output_RAIter __result, - _Predicate __pred, - random_access_iterator_tag, - random_access_iterator_tag, - random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) - >= __gnu_parallel::_Settings::get().set_union_minimal_n - || static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2) - >= __gnu_parallel::_Settings::get().set_union_minimal_n)) - return __gnu_parallel::__parallel_set_intersection( - __begin1, __end1, __begin2, __end2, __result, __pred); - else - return _GLIBCXX_STD_A::set_intersection( - __begin1, __end1, __begin2, __end2, __result, __pred); - } - - // Public interface - template - inline _OutputIterator - set_intersection(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out) - { - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef typename _OIterTraits::iterator_category _OIterCategory; - typedef typename _IIterTraits1::value_type _ValueType1; - typedef typename _IIterTraits2::value_type _ValueType2; - - return __set_intersection_switch( - __begin1, __end1, __begin2, __end2, __out, - __gnu_parallel::_Less<_ValueType1, _ValueType2>(), - _IIterCategory1(), _IIterCategory2(), _OIterCategory()); - } - - template - inline _OutputIterator - set_intersection(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, _Predicate __pred) - { - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __set_intersection_switch( - __begin1, __end1, __begin2, __end2, __out, __pred, - _IIterCategory1(), _IIterCategory2(), _OIterCategory()); - } - - // Sequential fallback - template - inline _OutputIterator - set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::set_symmetric_difference( - __begin1, __end1, __begin2, __end2, __out); } - - // Sequential fallback - template - inline _OutputIterator - set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, _Predicate __pred, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::set_symmetric_difference( - __begin1, __end1, __begin2, __end2, __out, __pred); } - - // Sequential fallback for input iterator case - template - inline _OutputIterator - __set_symmetric_difference_switch( - _IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __result, _Predicate __pred, - _IteratorTag1, _IteratorTag2, _IteratorTag3) - { return _GLIBCXX_STD_A::set_symmetric_difference( - __begin1, __end1, __begin2, __end2, __result, __pred); } - - // Parallel set_symmetric_difference for random access iterators - template - _Output_RAIter - __set_symmetric_difference_switch(_RAIter1 __begin1, - _RAIter1 __end1, - _RAIter2 __begin2, - _RAIter2 __end2, - _Output_RAIter __result, - _Predicate __pred, - random_access_iterator_tag, - random_access_iterator_tag, - random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) - >= __gnu_parallel::_Settings::get().set_symmetric_difference_minimal_n - || static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2) - >= __gnu_parallel::_Settings::get().set_symmetric_difference_minimal_n)) - return __gnu_parallel::__parallel_set_symmetric_difference( - __begin1, __end1, __begin2, __end2, __result, __pred); - else - return _GLIBCXX_STD_A::set_symmetric_difference( - __begin1, __end1, __begin2, __end2, __result, __pred); - } - - // Public interface. - template - inline _OutputIterator - set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out) - { - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef typename _OIterTraits::iterator_category _OIterCategory; - typedef typename _IIterTraits1::value_type _ValueType1; - typedef typename _IIterTraits2::value_type _ValueType2; - - return __set_symmetric_difference_switch( - __begin1, __end1, __begin2, __end2, __out, - __gnu_parallel::_Less<_ValueType1, _ValueType2>(), - _IIterCategory1(), _IIterCategory2(), _OIterCategory()); - } - - // Public interface. - template - inline _OutputIterator - set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, _Predicate __pred) - { - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __set_symmetric_difference_switch( - __begin1, __end1, __begin2, __end2, __out, __pred, - _IIterCategory1(), _IIterCategory2(), _OIterCategory()); - } - - // Sequential fallback. - template - inline _OutputIterator - set_difference(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::set_difference( - __begin1,__end1, __begin2, __end2, __out); } - - // Sequential fallback. - template - inline _OutputIterator - set_difference(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, _Predicate __pred, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::set_difference(__begin1, __end1, - __begin2, __end2, __out, __pred); } - - // Sequential fallback for input iterator case. - template - inline _OutputIterator - __set_difference_switch(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __result, _Predicate __pred, - _IteratorTag1, _IteratorTag2, _IteratorTag3) - { return _GLIBCXX_STD_A::set_difference( - __begin1, __end1, __begin2, __end2, __result, __pred); } - - // Parallel set_difference for random access iterators - template - _Output_RAIter - __set_difference_switch(_RAIter1 __begin1, - _RAIter1 __end1, - _RAIter2 __begin2, - _RAIter2 __end2, - _Output_RAIter __result, _Predicate __pred, - random_access_iterator_tag, - random_access_iterator_tag, - random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) - >= __gnu_parallel::_Settings::get().set_difference_minimal_n - || static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2) - >= __gnu_parallel::_Settings::get().set_difference_minimal_n)) - return __gnu_parallel::__parallel_set_difference( - __begin1, __end1, __begin2, __end2, __result, __pred); - else - return _GLIBCXX_STD_A::set_difference( - __begin1, __end1, __begin2, __end2, __result, __pred); - } - - // Public interface - template - inline _OutputIterator - set_difference(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out) - { - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef typename _OIterTraits::iterator_category _OIterCategory; - typedef typename _IIterTraits1::value_type _ValueType1; - typedef typename _IIterTraits2::value_type _ValueType2; - - return __set_difference_switch( - __begin1, __end1, __begin2, __end2, __out, - __gnu_parallel::_Less<_ValueType1, _ValueType2>(), - _IIterCategory1(), _IIterCategory2(), _OIterCategory()); - } - - // Public interface - template - inline _OutputIterator - set_difference(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __out, _Predicate __pred) - { - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __set_difference_switch( - __begin1, __end1, __begin2, __end2, __out, __pred, - _IIterCategory1(), _IIterCategory2(), _OIterCategory()); - } - - // Sequential fallback - template - inline _FIterator - adjacent_find(_FIterator __begin, _FIterator __end, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::adjacent_find(__begin, __end); } - - // Sequential fallback - template - inline _FIterator - adjacent_find(_FIterator __begin, _FIterator __end, - _BinaryPredicate __binary_pred, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::adjacent_find(__begin, __end, __binary_pred); } - - // Parallel algorithm for random access iterators - template - _RAIter - __adjacent_find_switch(_RAIter __begin, _RAIter __end, - random_access_iterator_tag) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - - if (_GLIBCXX_PARALLEL_CONDITION(true)) - { - _RAIter __spot = __gnu_parallel:: - __find_template( - __begin, __end - 1, __begin, equal_to<_ValueType>(), - __gnu_parallel::__adjacent_find_selector()) - .first; - if (__spot == (__end - 1)) - return __end; - else - return __spot; - } - else - return adjacent_find(__begin, __end, __gnu_parallel::sequential_tag()); - } - - // Sequential fallback for input iterator case - template - inline _FIterator - __adjacent_find_switch(_FIterator __begin, _FIterator __end, - _IteratorTag) - { return adjacent_find(__begin, __end, __gnu_parallel::sequential_tag()); } - - // Public interface - template - inline _FIterator - adjacent_find(_FIterator __begin, _FIterator __end) - { - typedef iterator_traits<_FIterator> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __adjacent_find_switch(__begin, __end, _IteratorCategory()); - } - - // Sequential fallback for input iterator case - template - inline _FIterator - __adjacent_find_switch(_FIterator __begin, _FIterator __end, - _BinaryPredicate __pred, _IteratorTag) - { return adjacent_find(__begin, __end, __pred, - __gnu_parallel::sequential_tag()); } - - // Parallel algorithm for random access iterators - template - _RAIter - __adjacent_find_switch(_RAIter __begin, _RAIter __end, - _BinaryPredicate __pred, random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION(true)) - return __gnu_parallel::__find_template(__begin, __end, __begin, __pred, - __gnu_parallel:: - __adjacent_find_selector()).first; - else - return adjacent_find(__begin, __end, __pred, - __gnu_parallel::sequential_tag()); - } - - // Public interface - template - inline _FIterator - adjacent_find(_FIterator __begin, _FIterator __end, - _BinaryPredicate __pred) - { - typedef iterator_traits<_FIterator> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __adjacent_find_switch(__begin, __end, __pred, - _IteratorCategory()); - } - - // Sequential fallback - template - inline typename iterator_traits<_IIter>::difference_type - count(_IIter __begin, _IIter __end, const _Tp& __value, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::count(__begin, __end, __value); } - - // Parallel code for random access iterators - template - typename iterator_traits<_RAIter>::difference_type - __count_switch(_RAIter __begin, _RAIter __end, - const _Tp& __value, random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - typedef typename _TraitsType::difference_type _DifferenceType; - typedef __gnu_parallel::_SequenceIndex _SequenceIndex; - - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().count_minimal_n - && __gnu_parallel::__is_parallel(__parallelism_tag))) - { - __gnu_parallel::__count_selector<_RAIter, _DifferenceType> - __functionality; - _DifferenceType __res = 0; - __gnu_parallel:: - __for_each_template_random_access( - __begin, __end, __value, __functionality, - std::plus<_SequenceIndex>(), __res, __res, -1, - __parallelism_tag); - return __res; - } - else - return count(__begin, __end, __value, - __gnu_parallel::sequential_tag()); - } - - // Sequential fallback for input iterator case. - template - inline typename iterator_traits<_IIter>::difference_type - __count_switch(_IIter __begin, _IIter __end, const _Tp& __value, - _IteratorTag) - { return count(__begin, __end, __value, __gnu_parallel::sequential_tag()); - } - - // Public interface. - template - inline typename iterator_traits<_IIter>::difference_type - count(_IIter __begin, _IIter __end, const _Tp& __value, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef iterator_traits<_IIter> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __count_switch(__begin, __end, __value, _IteratorCategory(), - __parallelism_tag); - } - - template - inline typename iterator_traits<_IIter>::difference_type - count(_IIter __begin, _IIter __end, const _Tp& __value) - { - typedef iterator_traits<_IIter> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __count_switch(__begin, __end, __value, _IteratorCategory()); - } - - - // Sequential fallback. - template - inline typename iterator_traits<_IIter>::difference_type - count_if(_IIter __begin, _IIter __end, _Predicate __pred, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::count_if(__begin, __end, __pred); } - - // Parallel count_if for random access iterators - template - typename iterator_traits<_RAIter>::difference_type - __count_if_switch(_RAIter __begin, _RAIter __end, - _Predicate __pred, random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - typedef typename _TraitsType::difference_type _DifferenceType; - typedef __gnu_parallel::_SequenceIndex _SequenceIndex; - - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().count_minimal_n - && __gnu_parallel::__is_parallel(__parallelism_tag))) - { - _DifferenceType __res = 0; - __gnu_parallel:: - __count_if_selector<_RAIter, _DifferenceType> - __functionality; - __gnu_parallel:: - __for_each_template_random_access( - __begin, __end, __pred, __functionality, - std::plus<_SequenceIndex>(), __res, __res, -1, - __parallelism_tag); - return __res; - } - else - return count_if(__begin, __end, __pred, - __gnu_parallel::sequential_tag()); - } - - // Sequential fallback for input iterator case. - template - inline typename iterator_traits<_IIter>::difference_type - __count_if_switch(_IIter __begin, _IIter __end, _Predicate __pred, - _IteratorTag) - { return count_if(__begin, __end, __pred, - __gnu_parallel::sequential_tag()); } - - // Public interface. - template - inline typename iterator_traits<_IIter>::difference_type - count_if(_IIter __begin, _IIter __end, _Predicate __pred, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef iterator_traits<_IIter> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __count_if_switch(__begin, __end, __pred, _IteratorCategory(), - __parallelism_tag); - } - - template - inline typename iterator_traits<_IIter>::difference_type - count_if(_IIter __begin, _IIter __end, _Predicate __pred) - { - typedef iterator_traits<_IIter> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __count_if_switch(__begin, __end, __pred, _IteratorCategory()); - } - - - // Sequential fallback. - template - inline _FIterator1 - search(_FIterator1 __begin1, _FIterator1 __end1, - _FIterator2 __begin2, _FIterator2 __end2, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::search(__begin1, __end1, __begin2, __end2); } - - // Parallel algorithm for random access iterator - template - _RAIter1 - __search_switch(_RAIter1 __begin1, _RAIter1 __end1, - _RAIter2 __begin2, _RAIter2 __end2, - random_access_iterator_tag, random_access_iterator_tag) - { - typedef std::iterator_traits<_RAIter1> _Iterator1Traits; - typedef typename _Iterator1Traits::value_type _ValueType1; - typedef std::iterator_traits<_RAIter2> _Iterator2Traits; - typedef typename _Iterator2Traits::value_type _ValueType2; - - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) - >= __gnu_parallel::_Settings::get().search_minimal_n)) - return __gnu_parallel:: - __search_template( - __begin1, __end1, __begin2, __end2, - __gnu_parallel::_EqualTo<_ValueType1, _ValueType2>()); - else - return search(__begin1, __end1, __begin2, __end2, - __gnu_parallel::sequential_tag()); - } - - // Sequential fallback for input iterator case - template - inline _FIterator1 - __search_switch(_FIterator1 __begin1, _FIterator1 __end1, - _FIterator2 __begin2, _FIterator2 __end2, - _IteratorTag1, _IteratorTag2) - { return search(__begin1, __end1, __begin2, __end2, - __gnu_parallel::sequential_tag()); } - - // Public interface. - template - inline _FIterator1 - search(_FIterator1 __begin1, _FIterator1 __end1, - _FIterator2 __begin2, _FIterator2 __end2) - { - typedef std::iterator_traits<_FIterator1> _Iterator1Traits; - typedef typename _Iterator1Traits::iterator_category _IteratorCategory1; - typedef std::iterator_traits<_FIterator2> _Iterator2Traits; - typedef typename _Iterator2Traits::iterator_category _IteratorCategory2; - - return __search_switch(__begin1, __end1, __begin2, __end2, - _IteratorCategory1(), _IteratorCategory2()); - } - - // Public interface. - template - inline _FIterator1 - search(_FIterator1 __begin1, _FIterator1 __end1, - _FIterator2 __begin2, _FIterator2 __end2, - _BinaryPredicate __pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::search( - __begin1, __end1, __begin2, __end2, __pred); } - - // Parallel algorithm for random access iterator. - template - _RAIter1 - __search_switch(_RAIter1 __begin1, _RAIter1 __end1, - _RAIter2 __begin2, _RAIter2 __end2, - _BinaryPredicate __pred, - random_access_iterator_tag, random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) - >= __gnu_parallel::_Settings::get().search_minimal_n)) - return __gnu_parallel::__search_template(__begin1, __end1, - __begin2, __end2, __pred); - else - return search(__begin1, __end1, __begin2, __end2, __pred, - __gnu_parallel::sequential_tag()); - } - - // Sequential fallback for input iterator case - template - inline _FIterator1 - __search_switch(_FIterator1 __begin1, _FIterator1 __end1, - _FIterator2 __begin2, _FIterator2 __end2, - _BinaryPredicate __pred, _IteratorTag1, _IteratorTag2) - { return search(__begin1, __end1, __begin2, __end2, __pred, - __gnu_parallel::sequential_tag()); } - - // Public interface - template - inline _FIterator1 - search(_FIterator1 __begin1, _FIterator1 __end1, - _FIterator2 __begin2, _FIterator2 __end2, - _BinaryPredicate __pred) - { - typedef std::iterator_traits<_FIterator1> _Iterator1Traits; - typedef typename _Iterator1Traits::iterator_category _IteratorCategory1; - typedef std::iterator_traits<_FIterator2> _Iterator2Traits; - typedef typename _Iterator2Traits::iterator_category _IteratorCategory2; - return __search_switch(__begin1, __end1, __begin2, __end2, __pred, - _IteratorCategory1(), _IteratorCategory2()); - } - - // Sequential fallback - template - inline _FIterator - search_n(_FIterator __begin, _FIterator __end, _Integer __count, - const _Tp& __val, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::search_n(__begin, __end, __count, __val); } - - // Sequential fallback - template - inline _FIterator - search_n(_FIterator __begin, _FIterator __end, _Integer __count, - const _Tp& __val, _BinaryPredicate __binary_pred, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::search_n( - __begin, __end, __count, __val, __binary_pred); } - - // Public interface. - template - inline _FIterator - search_n(_FIterator __begin, _FIterator __end, _Integer __count, - const _Tp& __val) - { - typedef typename iterator_traits<_FIterator>::value_type _ValueType; - return __gnu_parallel::search_n(__begin, __end, __count, __val, - __gnu_parallel::_EqualTo<_ValueType, _Tp>()); - } - - // Parallel algorithm for random access iterators. - template - _RAIter - __search_n_switch(_RAIter __begin, _RAIter __end, _Integer __count, - const _Tp& __val, _BinaryPredicate __binary_pred, - random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().search_minimal_n)) - { - __gnu_parallel::_PseudoSequence<_Tp, _Integer> __ps(__val, __count); - return __gnu_parallel::__search_template( - __begin, __end, __ps.begin(), __ps.end(), __binary_pred); - } - else - return _GLIBCXX_STD_A::search_n(__begin, __end, __count, __val, - __binary_pred); - } - - // Sequential fallback for input iterator case. - template - inline _FIterator - __search_n_switch(_FIterator __begin, _FIterator __end, _Integer __count, - const _Tp& __val, _BinaryPredicate __binary_pred, - _IteratorTag) - { return _GLIBCXX_STD_A::search_n(__begin, __end, __count, __val, - __binary_pred); } - - // Public interface. - template - inline _FIterator - search_n(_FIterator __begin, _FIterator __end, _Integer __count, - const _Tp& __val, _BinaryPredicate __binary_pred) - { - return __search_n_switch(__begin, __end, __count, __val, __binary_pred, - typename std::iterator_traits<_FIterator>:: - iterator_category()); - } - - - // Sequential fallback. - template - inline _OutputIterator - transform(_IIter __begin, _IIter __end, _OutputIterator __result, - _UnaryOperation __unary_op, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::transform(__begin, __end, __result, __unary_op); } - - // Parallel unary transform for random access iterators. - template - _RAIter2 - __transform1_switch(_RAIter1 __begin, _RAIter1 __end, - _RAIter2 __result, _UnaryOperation __unary_op, - random_access_iterator_tag, random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().transform_minimal_n - && __gnu_parallel::__is_parallel(__parallelism_tag))) - { - bool __dummy = true; - typedef __gnu_parallel::_IteratorPair<_RAIter1, - _RAIter2, random_access_iterator_tag> _ItTrip; - _ItTrip __begin_pair(__begin, __result), - __end_pair(__end, __result + (__end - __begin)); - __gnu_parallel::__transform1_selector<_ItTrip> __functionality; - __gnu_parallel:: - __for_each_template_random_access( - __begin_pair, __end_pair, __unary_op, __functionality, - __gnu_parallel::_DummyReduct(), - __dummy, __dummy, -1, __parallelism_tag); - return __functionality._M_finish_iterator; - } - else - return transform(__begin, __end, __result, __unary_op, - __gnu_parallel::sequential_tag()); - } - - // Sequential fallback for input iterator case. - template - inline _RAIter2 - __transform1_switch(_RAIter1 __begin, _RAIter1 __end, - _RAIter2 __result, _UnaryOperation __unary_op, - _IteratorTag1, _IteratorTag2) - { return transform(__begin, __end, __result, __unary_op, - __gnu_parallel::sequential_tag()); } - - // Public interface. - template - inline _OutputIterator - transform(_IIter __begin, _IIter __end, _OutputIterator __result, - _UnaryOperation __unary_op, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef std::iterator_traits<_IIter> _IIterTraits; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits::iterator_category _IIteratorCategory; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __transform1_switch(__begin, __end, __result, __unary_op, - _IIteratorCategory(), _OIterCategory(), - __parallelism_tag); - } - - template - inline _OutputIterator - transform(_IIter __begin, _IIter __end, _OutputIterator __result, - _UnaryOperation __unary_op) - { - typedef std::iterator_traits<_IIter> _IIterTraits; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits::iterator_category _IIteratorCategory; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __transform1_switch(__begin, __end, __result, __unary_op, - _IIteratorCategory(), _OIterCategory()); - } - - - // Sequential fallback - template - inline _OutputIterator - transform(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _OutputIterator __result, - _BinaryOperation __binary_op, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::transform(__begin1, __end1, - __begin2, __result, __binary_op); } - - // Parallel binary transform for random access iterators. - template - _RAIter3 - __transform2_switch(_RAIter1 __begin1, _RAIter1 __end1, - _RAIter2 __begin2, - _RAIter3 __result, _BinaryOperation __binary_op, - random_access_iterator_tag, random_access_iterator_tag, - random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - (__end1 - __begin1) >= - __gnu_parallel::_Settings::get().transform_minimal_n - && __gnu_parallel::__is_parallel(__parallelism_tag))) - { - bool __dummy = true; - typedef __gnu_parallel::_IteratorTriple<_RAIter1, - _RAIter2, _RAIter3, - random_access_iterator_tag> _ItTrip; - _ItTrip __begin_triple(__begin1, __begin2, __result), - __end_triple(__end1, __begin2 + (__end1 - __begin1), - __result + (__end1 - __begin1)); - __gnu_parallel::__transform2_selector<_ItTrip> __functionality; - __gnu_parallel:: - __for_each_template_random_access(__begin_triple, __end_triple, - __binary_op, __functionality, - __gnu_parallel::_DummyReduct(), - __dummy, __dummy, -1, - __parallelism_tag); - return __functionality._M_finish_iterator; - } - else - return transform(__begin1, __end1, __begin2, __result, __binary_op, - __gnu_parallel::sequential_tag()); - } - - // Sequential fallback for input iterator case. - template - inline _OutputIterator - __transform2_switch(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _OutputIterator __result, - _BinaryOperation __binary_op, _Tag1, _Tag2, _Tag3) - { return transform(__begin1, __end1, __begin2, __result, __binary_op, - __gnu_parallel::sequential_tag()); } - - // Public interface. - template - inline _OutputIterator - transform(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _OutputIterator __result, - _BinaryOperation __binary_op, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __transform2_switch( - __begin1, __end1, __begin2, __result, __binary_op, - _IIterCategory1(), _IIterCategory2(), _OIterCategory(), - __parallelism_tag); - } - - template - inline _OutputIterator - transform(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _OutputIterator __result, - _BinaryOperation __binary_op) - { - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __transform2_switch( - __begin1, __end1, __begin2, __result, __binary_op, - _IIterCategory1(), _IIterCategory2(), _OIterCategory()); - } - - // Sequential fallback - template - inline void - replace(_FIterator __begin, _FIterator __end, const _Tp& __old_value, - const _Tp& __new_value, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::replace(__begin, __end, __old_value, __new_value); } - - // Sequential fallback for input iterator case - template - inline void - __replace_switch(_FIterator __begin, _FIterator __end, - const _Tp& __old_value, const _Tp& __new_value, - _IteratorTag) - { replace(__begin, __end, __old_value, __new_value, - __gnu_parallel::sequential_tag()); } - - // Parallel replace for random access iterators - template - inline void - __replace_switch(_RAIter __begin, _RAIter __end, - const _Tp& __old_value, const _Tp& __new_value, - random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - // XXX parallel version is where? - replace(__begin, __end, __old_value, __new_value, - __gnu_parallel::sequential_tag()); - } - - // Public interface - template - inline void - replace(_FIterator __begin, _FIterator __end, const _Tp& __old_value, - const _Tp& __new_value, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef iterator_traits<_FIterator> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - __replace_switch(__begin, __end, __old_value, __new_value, - _IteratorCategory(), - __parallelism_tag); - } - - template - inline void - replace(_FIterator __begin, _FIterator __end, const _Tp& __old_value, - const _Tp& __new_value) - { - typedef iterator_traits<_FIterator> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - __replace_switch(__begin, __end, __old_value, __new_value, - _IteratorCategory()); - } - - - // Sequential fallback - template - inline void - replace_if(_FIterator __begin, _FIterator __end, _Predicate __pred, - const _Tp& __new_value, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::replace_if(__begin, __end, __pred, __new_value); } - - // Sequential fallback for input iterator case - template - inline void - __replace_if_switch(_FIterator __begin, _FIterator __end, - _Predicate __pred, const _Tp& __new_value, _IteratorTag) - { replace_if(__begin, __end, __pred, __new_value, - __gnu_parallel::sequential_tag()); } - - // Parallel algorithm for random access iterators. - template - void - __replace_if_switch(_RAIter __begin, _RAIter __end, - _Predicate __pred, const _Tp& __new_value, - random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().replace_minimal_n - && __gnu_parallel::__is_parallel(__parallelism_tag))) - { - bool __dummy; - __gnu_parallel:: - __replace_if_selector<_RAIter, _Predicate, _Tp> - __functionality(__new_value); - __gnu_parallel:: - __for_each_template_random_access( - __begin, __end, __pred, __functionality, - __gnu_parallel::_DummyReduct(), - true, __dummy, -1, __parallelism_tag); - } - else - replace_if(__begin, __end, __pred, __new_value, - __gnu_parallel::sequential_tag()); - } - - // Public interface. - template - inline void - replace_if(_FIterator __begin, _FIterator __end, - _Predicate __pred, const _Tp& __new_value, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef std::iterator_traits<_FIterator> _IteratorTraits; - typedef typename _IteratorTraits::iterator_category _IteratorCategory; - __replace_if_switch(__begin, __end, __pred, __new_value, - _IteratorCategory(), __parallelism_tag); - } - - template - inline void - replace_if(_FIterator __begin, _FIterator __end, - _Predicate __pred, const _Tp& __new_value) - { - typedef std::iterator_traits<_FIterator> _IteratorTraits; - typedef typename _IteratorTraits::iterator_category _IteratorCategory; - __replace_if_switch(__begin, __end, __pred, __new_value, - _IteratorCategory()); - } - - // Sequential fallback - template - inline void - generate(_FIterator __begin, _FIterator __end, _Generator __gen, - __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::generate(__begin, __end, __gen); } - - // Sequential fallback for input iterator case. - template - inline void - __generate_switch(_FIterator __begin, _FIterator __end, _Generator __gen, - _IteratorTag) - { generate(__begin, __end, __gen, __gnu_parallel::sequential_tag()); } - - // Parallel algorithm for random access iterators. - template - void - __generate_switch(_RAIter __begin, _RAIter __end, - _Generator __gen, random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().generate_minimal_n - && __gnu_parallel::__is_parallel(__parallelism_tag))) - { - bool __dummy; - __gnu_parallel::__generate_selector<_RAIter> - __functionality; - __gnu_parallel:: - __for_each_template_random_access( - __begin, __end, __gen, __functionality, - __gnu_parallel::_DummyReduct(), - true, __dummy, -1, __parallelism_tag); - } - else - generate(__begin, __end, __gen, __gnu_parallel::sequential_tag()); - } - - // Public interface. - template - inline void - generate(_FIterator __begin, _FIterator __end, - _Generator __gen, __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef std::iterator_traits<_FIterator> _IteratorTraits; - typedef typename _IteratorTraits::iterator_category _IteratorCategory; - __generate_switch(__begin, __end, __gen, _IteratorCategory(), - __parallelism_tag); - } - - template - inline void - generate(_FIterator __begin, _FIterator __end, _Generator __gen) - { - typedef std::iterator_traits<_FIterator> _IteratorTraits; - typedef typename _IteratorTraits::iterator_category _IteratorCategory; - __generate_switch(__begin, __end, __gen, _IteratorCategory()); - } - - - // Sequential fallback. - template - inline _OutputIterator - generate_n(_OutputIterator __begin, _Size __n, _Generator __gen, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::generate_n(__begin, __n, __gen); } - - // Sequential fallback for input iterator case. - template - inline _OutputIterator - __generate_n_switch(_OutputIterator __begin, _Size __n, _Generator __gen, - _IteratorTag) - { return generate_n(__begin, __n, __gen, - __gnu_parallel::sequential_tag()); } - - // Parallel algorithm for random access iterators. - template - inline _RAIter - __generate_n_switch(_RAIter __begin, _Size __n, _Generator __gen, - random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - // XXX parallel version is where? - return generate_n(__begin, __n, __gen, __gnu_parallel::sequential_tag()); - } - - // Public interface. - template - inline _OutputIterator - generate_n(_OutputIterator __begin, _Size __n, _Generator __gen, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef std::iterator_traits<_OutputIterator> _IteratorTraits; - typedef typename _IteratorTraits::iterator_category _IteratorCategory; - return __generate_n_switch(__begin, __n, __gen, _IteratorCategory(), - __parallelism_tag); - } - - template - inline _OutputIterator - generate_n(_OutputIterator __begin, _Size __n, _Generator __gen) - { - typedef std::iterator_traits<_OutputIterator> _IteratorTraits; - typedef typename _IteratorTraits::iterator_category _IteratorCategory; - return __generate_n_switch(__begin, __n, __gen, _IteratorCategory()); - } - - - // Sequential fallback. - template - inline void - random_shuffle(_RAIter __begin, _RAIter __end, - __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::random_shuffle(__begin, __end); } - - // Sequential fallback. - template - inline void - random_shuffle(_RAIter __begin, _RAIter __end, - _RandomNumberGenerator& __rand, - __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::random_shuffle(__begin, __end, __rand); } - - - /** @brief Functor wrapper for std::rand(). */ - template - struct _CRandNumber - { - int - operator()(int __limit) - { return rand() % __limit; } - }; - - // Fill in random number generator. - template - inline void - random_shuffle(_RAIter __begin, _RAIter __end) - { - _CRandNumber<> __r; - // Parallelization still possible. - __gnu_parallel::random_shuffle(__begin, __end, __r); - } - - // Parallel algorithm for random access iterators. - template - void - random_shuffle(_RAIter __begin, _RAIter __end, -#if __cplusplus >= 201103L - _RandomNumberGenerator&& __rand) -#else - _RandomNumberGenerator& __rand) -#endif - { - if (__begin == __end) - return; - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().random_shuffle_minimal_n)) - __gnu_parallel::__parallel_random_shuffle(__begin, __end, __rand); - else - __gnu_parallel::__sequential_random_shuffle(__begin, __end, __rand); - } - - // Sequential fallback. - template - inline _FIterator - partition(_FIterator __begin, _FIterator __end, - _Predicate __pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::partition(__begin, __end, __pred); } - - // Sequential fallback for input iterator case. - template - inline _FIterator - __partition_switch(_FIterator __begin, _FIterator __end, - _Predicate __pred, _IteratorTag) - { return partition(__begin, __end, __pred, - __gnu_parallel::sequential_tag()); } - - // Parallel algorithm for random access iterators. - template - _RAIter - __partition_switch(_RAIter __begin, _RAIter __end, - _Predicate __pred, random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().partition_minimal_n)) - { - typedef typename std::iterator_traits<_RAIter>:: - difference_type _DifferenceType; - _DifferenceType __middle = __gnu_parallel:: - __parallel_partition(__begin, __end, __pred, - __gnu_parallel::__get_max_threads()); - return __begin + __middle; - } - else - return partition(__begin, __end, __pred, - __gnu_parallel::sequential_tag()); - } - - // Public interface. - template - inline _FIterator - partition(_FIterator __begin, _FIterator __end, _Predicate __pred) - { - typedef iterator_traits<_FIterator> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __partition_switch(__begin, __end, __pred, _IteratorCategory()); - } - - // sort interface - - // Sequential fallback - template - inline void - sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::sort(__begin, __end); } - - // Sequential fallback - template - inline void - sort(_RAIter __begin, _RAIter __end, _Compare __comp, - __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::sort<_RAIter, _Compare>(__begin, __end, - __comp); } - - // Public interface - template - void - sort(_RAIter __begin, _RAIter __end, _Compare __comp, - _Parallelism __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - - if (__begin != __end) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) >= - __gnu_parallel::_Settings::get().sort_minimal_n)) - __gnu_parallel::__parallel_sort( - __begin, __end, __comp, __parallelism); - else - sort(__begin, __end, __comp, __gnu_parallel::sequential_tag()); - } - } - - // Public interface, insert default comparator - template - inline void - sort(_RAIter __begin, _RAIter __end) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - sort(__begin, __end, std::less<_ValueType>(), - __gnu_parallel::default_parallel_tag()); - } - - // Public interface, insert default comparator - template - inline void - sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::default_parallel_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface, insert default comparator - template - inline void - sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::parallel_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface, insert default comparator - template - inline void - sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::multiway_mergesort_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface, insert default comparator - template - inline void - sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::multiway_mergesort_sampling_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface, insert default comparator - template - inline void - sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::multiway_mergesort_exact_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface, insert default comparator - template - inline void - sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::quicksort_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface, insert default comparator - template - inline void - sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::balanced_quicksort_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface - template - void - sort(_RAIter __begin, _RAIter __end, _Compare __comp) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - sort(__begin, __end, __comp, __gnu_parallel::default_parallel_tag()); - } - - - // stable_sort interface - - - // Sequential fallback - template - inline void - stable_sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::stable_sort(__begin, __end); } - - // Sequential fallback - template - inline void - stable_sort(_RAIter __begin, _RAIter __end, - _Compare __comp, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::stable_sort<_RAIter, _Compare>( - __begin, __end, __comp); } - - // Public interface - template - void - stable_sort(_RAIter __begin, _RAIter __end, - _Compare __comp, _Parallelism __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - - if (__begin != __end) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) >= - __gnu_parallel::_Settings::get().sort_minimal_n)) - __gnu_parallel::__parallel_sort( - __begin, __end, __comp, __parallelism); - else - stable_sort(__begin, __end, __comp, - __gnu_parallel::sequential_tag()); - } - } - - // Public interface, insert default comparator - template - inline void - stable_sort(_RAIter __begin, _RAIter __end) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - stable_sort(__begin, __end, std::less<_ValueType>(), - __gnu_parallel::default_parallel_tag()); - } - - // Public interface, insert default comparator - template - inline void - stable_sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::default_parallel_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface, insert default comparator - template - inline void - stable_sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::parallel_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface, insert default comparator - template - inline void - stable_sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::multiway_mergesort_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface, insert default comparator - template - inline void - stable_sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::quicksort_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface, insert default comparator - template - inline void - stable_sort(_RAIter __begin, _RAIter __end, - __gnu_parallel::balanced_quicksort_tag __parallelism) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism); - } - - // Public interface - template - void - stable_sort(_RAIter __begin, _RAIter __end, - _Compare __comp) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - stable_sort( - __begin, __end, __comp, __gnu_parallel::default_parallel_tag()); - } - - // Sequential fallback - template - inline _OutputIterator - merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, - _IIter2 __end2, _OutputIterator __result, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::merge( - __begin1, __end1, __begin2, __end2, __result); } - - // Sequential fallback - template - inline _OutputIterator - merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, - _IIter2 __end2, _OutputIterator __result, _Compare __comp, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::merge( - __begin1, __end1, __begin2, __end2, __result, __comp); } - - // Sequential fallback for input iterator case - template - inline _OutputIterator - __merge_switch(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __result, _Compare __comp, - _IteratorTag1, _IteratorTag2, _IteratorTag3) - { return _GLIBCXX_STD_A::merge(__begin1, __end1, __begin2, __end2, - __result, __comp); } - - // Parallel algorithm for random access iterators - template - _OutputIterator - __merge_switch(_IIter1 __begin1, _IIter1 __end1, - _IIter2 __begin2, _IIter2 __end2, - _OutputIterator __result, _Compare __comp, - random_access_iterator_tag, random_access_iterator_tag, - random_access_iterator_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - (static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) - >= __gnu_parallel::_Settings::get().merge_minimal_n - || static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2) - >= __gnu_parallel::_Settings::get().merge_minimal_n))) - return __gnu_parallel::__parallel_merge_advance( - __begin1, __end1, __begin2, __end2, __result, - (__end1 - __begin1) + (__end2 - __begin2), __comp); - else - return __gnu_parallel::__merge_advance( - __begin1, __end1, __begin2, __end2, __result, - (__end1 - __begin1) + (__end2 - __begin2), __comp); - } - - // Public interface - template - inline _OutputIterator - merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, - _IIter2 __end2, _OutputIterator __result, _Compare __comp) - { - typedef typename iterator_traits<_IIter1>::value_type _ValueType; - - typedef std::iterator_traits<_IIter1> _IIterTraits1; - typedef std::iterator_traits<_IIter2> _IIterTraits2; - typedef std::iterator_traits<_OutputIterator> _OIterTraits; - typedef typename _IIterTraits1::iterator_category - _IIterCategory1; - typedef typename _IIterTraits2::iterator_category - _IIterCategory2; - typedef typename _OIterTraits::iterator_category _OIterCategory; - - return __merge_switch( - __begin1, __end1, __begin2, __end2, __result, __comp, - _IIterCategory1(), _IIterCategory2(), _OIterCategory()); - } - - - // Public interface, insert default comparator - template - inline _OutputIterator - merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, - _IIter2 __end2, _OutputIterator __result) - { - typedef std::iterator_traits<_IIter1> _Iterator1Traits; - typedef std::iterator_traits<_IIter2> _Iterator2Traits; - typedef typename _Iterator1Traits::value_type _ValueType1; - typedef typename _Iterator2Traits::value_type _ValueType2; - - return __gnu_parallel::merge(__begin1, __end1, __begin2, __end2, - __result, __gnu_parallel::_Less<_ValueType1, _ValueType2>()); - } - - // Sequential fallback - template - inline void - nth_element(_RAIter __begin, _RAIter __nth, - _RAIter __end, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::nth_element(__begin, __nth, __end); } - - // Sequential fallback - template - inline void - nth_element(_RAIter __begin, _RAIter __nth, - _RAIter __end, _Compare __comp, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::nth_element(__begin, __nth, __end, __comp); } - - // Public interface - template - inline void - nth_element(_RAIter __begin, _RAIter __nth, - _RAIter __end, _Compare __comp) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().nth_element_minimal_n)) - __gnu_parallel::__parallel_nth_element(__begin, __nth, __end, __comp); - else - nth_element(__begin, __nth, __end, __comp, - __gnu_parallel::sequential_tag()); - } - - // Public interface, insert default comparator - template - inline void - nth_element(_RAIter __begin, _RAIter __nth, - _RAIter __end) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - __gnu_parallel::nth_element(__begin, __nth, __end, - std::less<_ValueType>()); - } - - // Sequential fallback - template - inline void - partial_sort(_RAIter __begin, _RAIter __middle, - _RAIter __end, _Compare __comp, - __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::partial_sort(__begin, __middle, __end, __comp); } - - // Sequential fallback - template - inline void - partial_sort(_RAIter __begin, _RAIter __middle, - _RAIter __end, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_A::partial_sort(__begin, __middle, __end); } - - // Public interface, parallel algorithm for random access iterators - template - void - partial_sort(_RAIter __begin, _RAIter __middle, - _RAIter __end, _Compare __comp) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().partial_sort_minimal_n)) - __gnu_parallel:: - __parallel_partial_sort(__begin, __middle, __end, __comp); - else - partial_sort(__begin, __middle, __end, __comp, - __gnu_parallel::sequential_tag()); - } - - // Public interface, insert default comparator - template - inline void - partial_sort(_RAIter __begin, _RAIter __middle, - _RAIter __end) - { - typedef iterator_traits<_RAIter> _TraitsType; - typedef typename _TraitsType::value_type _ValueType; - __gnu_parallel::partial_sort(__begin, __middle, __end, - std::less<_ValueType>()); - } - - // Sequential fallback - template - inline _FIterator - max_element(_FIterator __begin, _FIterator __end, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::max_element(__begin, __end); } - - // Sequential fallback - template - inline _FIterator - max_element(_FIterator __begin, _FIterator __end, _Compare __comp, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::max_element(__begin, __end, __comp); } - - // Sequential fallback for input iterator case - template - inline _FIterator - __max_element_switch(_FIterator __begin, _FIterator __end, - _Compare __comp, _IteratorTag) - { return max_element(__begin, __end, __comp, - __gnu_parallel::sequential_tag()); } - - // Parallel algorithm for random access iterators - template - _RAIter - __max_element_switch(_RAIter __begin, _RAIter __end, - _Compare __comp, random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().max_element_minimal_n - && __gnu_parallel::__is_parallel(__parallelism_tag))) - { - _RAIter __res(__begin); - __gnu_parallel::__identity_selector<_RAIter> - __functionality; - __gnu_parallel:: - __for_each_template_random_access( - __begin, __end, __gnu_parallel::_Nothing(), __functionality, - __gnu_parallel::__max_element_reduct<_Compare, _RAIter>(__comp), - __res, __res, -1, __parallelism_tag); - return __res; - } - else - return max_element(__begin, __end, __comp, - __gnu_parallel::sequential_tag()); - } - - // Public interface, insert default comparator - template - inline _FIterator - max_element(_FIterator __begin, _FIterator __end, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef typename iterator_traits<_FIterator>::value_type _ValueType; - return max_element(__begin, __end, std::less<_ValueType>(), - __parallelism_tag); - } - - template - inline _FIterator - max_element(_FIterator __begin, _FIterator __end) - { - typedef typename iterator_traits<_FIterator>::value_type _ValueType; - return __gnu_parallel::max_element(__begin, __end, - std::less<_ValueType>()); - } - - // Public interface - template - inline _FIterator - max_element(_FIterator __begin, _FIterator __end, _Compare __comp, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef iterator_traits<_FIterator> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __max_element_switch(__begin, __end, __comp, _IteratorCategory(), - __parallelism_tag); - } - - template - inline _FIterator - max_element(_FIterator __begin, _FIterator __end, _Compare __comp) - { - typedef iterator_traits<_FIterator> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __max_element_switch(__begin, __end, __comp, _IteratorCategory()); - } - - - // Sequential fallback - template - inline _FIterator - min_element(_FIterator __begin, _FIterator __end, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::min_element(__begin, __end); } - - // Sequential fallback - template - inline _FIterator - min_element(_FIterator __begin, _FIterator __end, _Compare __comp, - __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_A::min_element(__begin, __end, __comp); } - - // Sequential fallback for input iterator case - template - inline _FIterator - __min_element_switch(_FIterator __begin, _FIterator __end, - _Compare __comp, _IteratorTag) - { return min_element(__begin, __end, __comp, - __gnu_parallel::sequential_tag()); } - - // Parallel algorithm for random access iterators - template - _RAIter - __min_element_switch(_RAIter __begin, _RAIter __end, - _Compare __comp, random_access_iterator_tag, - __gnu_parallel::_Parallelism __parallelism_tag) - { - if (_GLIBCXX_PARALLEL_CONDITION( - static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) - >= __gnu_parallel::_Settings::get().min_element_minimal_n - && __gnu_parallel::__is_parallel(__parallelism_tag))) - { - _RAIter __res(__begin); - __gnu_parallel::__identity_selector<_RAIter> - __functionality; - __gnu_parallel:: - __for_each_template_random_access( - __begin, __end, __gnu_parallel::_Nothing(), __functionality, - __gnu_parallel::__min_element_reduct<_Compare, _RAIter>(__comp), - __res, __res, -1, __parallelism_tag); - return __res; - } - else - return min_element(__begin, __end, __comp, - __gnu_parallel::sequential_tag()); - } - - // Public interface, insert default comparator - template - inline _FIterator - min_element(_FIterator __begin, _FIterator __end, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef typename iterator_traits<_FIterator>::value_type _ValueType; - return min_element(__begin, __end, std::less<_ValueType>(), - __parallelism_tag); - } - - template - inline _FIterator - min_element(_FIterator __begin, _FIterator __end) - { - typedef typename iterator_traits<_FIterator>::value_type _ValueType; - return __gnu_parallel::min_element(__begin, __end, - std::less<_ValueType>()); - } - - // Public interface - template - inline _FIterator - min_element(_FIterator __begin, _FIterator __end, _Compare __comp, - __gnu_parallel::_Parallelism __parallelism_tag) - { - typedef iterator_traits<_FIterator> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __min_element_switch(__begin, __end, __comp, _IteratorCategory(), - __parallelism_tag); - } - - template - inline _FIterator - min_element(_FIterator __begin, _FIterator __end, _Compare __comp) - { - typedef iterator_traits<_FIterator> _TraitsType; - typedef typename _TraitsType::iterator_category _IteratorCategory; - return __min_element_switch(__begin, __end, __comp, _IteratorCategory()); - } -} // end namespace -} // end namespace - -#endif /* _GLIBCXX_PARALLEL_ALGO_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/algorithm b/devkitARM/arm-none-eabi/include/c++/7.1.0/algorithm similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/algorithm rename to devkitARM/arm-none-eabi/include/c++/7.1.0/algorithm index 699666c17..00ceabf48 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/algorithm +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/algorithm @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/any b/devkitARM/arm-none-eabi/include/c++/7.1.0/any new file mode 100644 index 000000000..1e84302f0 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/any @@ -0,0 +1,633 @@ +// -*- C++ -*- + +// Copyright (C) 2014-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file include/any + * This is a Standard C++ Library header. + */ + +#ifndef _GLIBCXX_ANY +#define _GLIBCXX_ANY 1 + +#pragma GCC system_header + +#if __cplusplus <= 201402L +# include +#else + +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @addtogroup utilities + * @{ + */ + + /** + * @brief Exception class thrown by a failed @c any_cast + * @ingroup exceptions + */ + class bad_any_cast : public bad_cast + { + public: + virtual const char* what() const noexcept { return "bad any_cast"; } + }; + + [[gnu::noreturn]] inline void __throw_bad_any_cast() + { +#if __cpp_exceptions + throw bad_any_cast{}; +#else + __builtin_abort(); +#endif + } + + /** + * @brief A type-safe container of any type. + * + * An @c any object's state is either empty or it stores a contained object + * of CopyConstructible type. + */ + class any + { + // Holds either pointer to a heap object or the contained object itself. + union _Storage + { + constexpr _Storage() : _M_ptr{nullptr} {} + + // Prevent trivial copies of this type, buffer might hold a non-POD. + _Storage(const _Storage&) = delete; + _Storage& operator=(const _Storage&) = delete; + + void* _M_ptr; + aligned_storage::type _M_buffer; + }; + + template, + bool _Fits = (sizeof(_Tp) <= sizeof(_Storage)) + && (alignof(_Tp) <= alignof(_Storage))> + using _Internal = std::integral_constant; + + template + struct _Manager_internal; // uses small-object optimization + + template + struct _Manager_external; // creates contained object on the heap + + template + using _Manager = conditional_t<_Internal<_Tp>::value, + _Manager_internal<_Tp>, + _Manager_external<_Tp>>; + + template> + using _Decay = enable_if_t::value, _Decayed>; + + /// Emplace with an object created from @p __args as the contained object. + template > + void __do_emplace(_Args&&... __args) + { + reset(); + _M_manager = &_Mgr::_S_manage; + _Mgr::_S_create(_M_storage, std::forward<_Args>(__args)...); + } + + /// Emplace with an object created from @p __il and @p __args as + /// the contained object. + template > + void __do_emplace(initializer_list<_Up> __il, _Args&&... __args) + { + reset(); + _M_manager = &_Mgr::_S_manage; + _Mgr::_S_create(_M_storage, __il, std::forward<_Args>(__args)...); + } + + public: + // construct/destruct + + /// Default constructor, creates an empty object. + constexpr any() noexcept : _M_manager(nullptr) { } + + /// Copy constructor, copies the state of @p __other + any(const any& __other) + { + if (!__other.has_value()) + _M_manager = nullptr; + else + { + _Arg __arg; + __arg._M_any = this; + __other._M_manager(_Op_clone, &__other, &__arg); + } + } + + /** + * @brief Move constructor, transfer the state from @p __other + * + * @post @c !__other.has_value() (this postcondition is a GNU extension) + */ + any(any&& __other) noexcept + { + if (!__other.has_value()) + _M_manager = nullptr; + else + { + _Arg __arg; + __arg._M_any = this; + __other._M_manager(_Op_xfer, &__other, &__arg); + } + } + + template + using __any_constructible = + enable_if<__and_, + is_constructible<_Tp, _Args...>>::value, + _Res>; + + template + using __any_constructible_t = + typename __any_constructible::type; + + /// Construct with a copy of @p __value as the contained object. + template , + typename _Mgr = _Manager<_Tp>, + __any_constructible_t<_Tp, _ValueType&&> = true, + enable_if_t::value, bool> = true> + any(_ValueType&& __value) + : _M_manager(&_Mgr::_S_manage) + { + _Mgr::_S_create(_M_storage, std::forward<_ValueType>(__value)); + } + + /// Construct with a copy of @p __value as the contained object. + template , + typename _Mgr = _Manager<_Tp>, + enable_if_t<__and_, + __not_>, + __not_<__is_in_place_type<_Tp>>>::value, + bool> = false> + any(_ValueType&& __value) + : _M_manager(&_Mgr::_S_manage) + { + _Mgr::_S_create(_M_storage, __value); + } + + /// Construct with an object created from @p __args as the contained object. + template , + typename _Mgr = _Manager<_Tp>, + __any_constructible_t<_Tp, _Args&&...> = false> + explicit + any(in_place_type_t<_ValueType>, _Args&&... __args) + : _M_manager(&_Mgr::_S_manage) + { + _Mgr::_S_create(_M_storage, std::forward<_Args>(__args)...); + } + + /// Construct with an object created from @p __il and @p __args as + /// the contained object. + template , + typename _Mgr = _Manager<_Tp>, + __any_constructible_t<_Tp, initializer_list<_Up>, + _Args&&...> = false> + explicit + any(in_place_type_t<_ValueType>, + initializer_list<_Up> __il, _Args&&... __args) + : _M_manager(&_Mgr::_S_manage) + { + _Mgr::_S_create(_M_storage, __il, std::forward<_Args>(__args)...); + } + + /// Destructor, calls @c reset() + ~any() { reset(); } + + // assignments + + /// Copy the state of another object. + any& operator=(const any& __rhs) + { + *this = any(__rhs); + return *this; + } + + /** + * @brief Move assignment operator + * + * @post @c !__rhs.has_value() (not guaranteed for other implementations) + */ + any& operator=(any&& __rhs) noexcept + { + if (!__rhs.has_value()) + reset(); + else if (this != &__rhs) + { + reset(); + _Arg __arg; + __arg._M_any = this; + __rhs._M_manager(_Op_xfer, &__rhs, &__arg); + } + return *this; + } + + /// Store a copy of @p __rhs as the contained object. + template + enable_if_t>::value, any&> + operator=(_ValueType&& __rhs) + { + *this = any(std::forward<_ValueType>(__rhs)); + return *this; + } + + /// Emplace with an object created from @p __args as the contained object. + template + typename __any_constructible<_Decay<_ValueType>&, + _Decay<_ValueType>, _Args&&...>::type + emplace(_Args&&... __args) + { + __do_emplace<_Decay<_ValueType>> + (std::forward<_Args>(__args)...); + any::_Arg __arg; + this->_M_manager(any::_Op_access, this, &__arg); + return *static_cast<_Decay<_ValueType>*>(__arg._M_obj); + } + + /// Emplace with an object created from @p __il and @p __args as + /// the contained object. + template + typename __any_constructible<_Decay<_ValueType>&, + _Decay<_ValueType>, + initializer_list<_Up>, + _Args&&...>::type + emplace(initializer_list<_Up> __il, _Args&&... __args) + { + __do_emplace<_Decay<_ValueType>, _Up> + (__il, std::forward<_Args>(__args)...); + any::_Arg __arg; + this->_M_manager(any::_Op_access, this, &__arg); + return *static_cast<_Decay<_ValueType>*>(__arg._M_obj); + } + + // modifiers + + /// If not empty, destroy the contained object. + void reset() noexcept + { + if (has_value()) + { + _M_manager(_Op_destroy, this, nullptr); + _M_manager = nullptr; + } + } + + /// Exchange state with another object. + void swap(any& __rhs) noexcept + { + if (!has_value() && !__rhs.has_value()) + return; + + if (has_value() && __rhs.has_value()) + { + if (this == &__rhs) + return; + + any __tmp; + _Arg __arg; + __arg._M_any = &__tmp; + __rhs._M_manager(_Op_xfer, &__rhs, &__arg); + __arg._M_any = &__rhs; + _M_manager(_Op_xfer, this, &__arg); + __arg._M_any = this; + __tmp._M_manager(_Op_xfer, &__tmp, &__arg); + } + else + { + any* __empty = !has_value() ? this : &__rhs; + any* __full = !has_value() ? &__rhs : this; + _Arg __arg; + __arg._M_any = __empty; + __full->_M_manager(_Op_xfer, __full, &__arg); + } + } + + // observers + + /// Reports whether there is a contained object or not. + bool has_value() const noexcept { return _M_manager != nullptr; } + +#if __cpp_rtti + /// The @c typeid of the contained object, or @c typeid(void) if empty. + const type_info& type() const noexcept + { + if (!has_value()) + return typeid(void); + _Arg __arg; + _M_manager(_Op_get_type_info, this, &__arg); + return *__arg._M_typeinfo; + } +#endif + + template + static constexpr bool __is_valid_cast() + { return __or_, is_copy_constructible<_Tp>>::value; } + + private: + enum _Op { + _Op_access, _Op_get_type_info, _Op_clone, _Op_destroy, _Op_xfer + }; + + union _Arg + { + void* _M_obj; + const std::type_info* _M_typeinfo; + any* _M_any; + }; + + void (*_M_manager)(_Op, const any*, _Arg*); + _Storage _M_storage; + + template + friend void* __any_caster(const any* __any); + + // Manage in-place contained object. + template + struct _Manager_internal + { + static void + _S_manage(_Op __which, const any* __anyp, _Arg* __arg); + + template + static void + _S_create(_Storage& __storage, _Up&& __value) + { + void* __addr = &__storage._M_buffer; + ::new (__addr) _Tp(std::forward<_Up>(__value)); + } + + template + static void + _S_create(_Storage& __storage, _Args&&... __args) + { + void* __addr = &__storage._M_buffer; + ::new (__addr) _Tp(std::forward<_Args>(__args)...); + } + }; + + // Manage external contained object. + template + struct _Manager_external + { + static void + _S_manage(_Op __which, const any* __anyp, _Arg* __arg); + + template + static void + _S_create(_Storage& __storage, _Up&& __value) + { + __storage._M_ptr = new _Tp(std::forward<_Up>(__value)); + } + template + static void + _S_create(_Storage& __storage, _Args&&... __args) + { + __storage._M_ptr = new _Tp(std::forward<_Args>(__args)...); + } + }; + }; + + /// Exchange the states of two @c any objects. + inline void swap(any& __x, any& __y) noexcept { __x.swap(__y); } + + /// Create an any holding a @c _Tp constructed from @c __args. + template + any make_any(_Args&&... __args) + { + return any(in_place_type<_Tp>, std::forward<_Args>(__args)...); + } + + /// Create an any holding a @c _Tp constructed from @c __il and @c __args. + template + any make_any(initializer_list<_Up> __il, _Args&&... __args) + { + return any(in_place_type<_Tp>, __il, std::forward<_Args>(__args)...); + } + + template + using _AnyCast = remove_cv_t>; + /** + * @brief Access the contained object. + * + * @tparam _ValueType A const-reference or CopyConstructible type. + * @param __any The object to access. + * @return The contained object. + * @throw bad_any_cast If + * __any.type() != typeid(remove_reference_t<_ValueType>) + * + */ + template + inline _ValueType any_cast(const any& __any) + { + static_assert(any::__is_valid_cast<_ValueType>(), + "Template argument must be a reference or CopyConstructible type"); + auto __p = any_cast<_AnyCast<_ValueType>>(&__any); + if (__p) + return static_cast<_ValueType>(*__p); + __throw_bad_any_cast(); + } + + /** + * @brief Access the contained object. + * + * @tparam _ValueType A reference or CopyConstructible type. + * @param __any The object to access. + * @return The contained object. + * @throw bad_any_cast If + * __any.type() != typeid(remove_reference_t<_ValueType>) + * + * + * @{ + */ + template + inline _ValueType any_cast(any& __any) + { + static_assert(any::__is_valid_cast<_ValueType>(), + "Template argument must be a reference or CopyConstructible type"); + auto __p = any_cast<_AnyCast<_ValueType>>(&__any); + if (__p) + return static_cast<_ValueType>(*__p); + __throw_bad_any_cast(); + } + + template::value + || is_lvalue_reference<_ValueType>::value, + bool>::type = true> + inline _ValueType any_cast(any&& __any) + { + static_assert(any::__is_valid_cast<_ValueType>(), + "Template argument must be a reference or CopyConstructible type"); + auto __p = any_cast<_AnyCast<_ValueType>>(&__any); + if (__p) + return static_cast<_ValueType>(*__p); + __throw_bad_any_cast(); + } + + template::value + && !is_lvalue_reference<_ValueType>::value, + bool>::type = false> + inline _ValueType any_cast(any&& __any) + { + static_assert(any::__is_valid_cast<_ValueType>(), + "Template argument must be a reference or CopyConstructible type"); + auto __p = any_cast<_AnyCast<_ValueType>>(&__any); + if (__p) + return static_cast<_ValueType>(std::move(*__p)); + __throw_bad_any_cast(); + } + // @} + + template + void* __any_caster(const any* __any) + { + if constexpr (is_copy_constructible_v>) + { + if (__any->_M_manager == &any::_Manager>::_S_manage) + { + any::_Arg __arg; + __any->_M_manager(any::_Op_access, __any, &__arg); + return __arg._M_obj; + } + } + return nullptr; + } + + /** + * @brief Access the contained object. + * + * @tparam _ValueType The type of the contained object. + * @param __any A pointer to the object to access. + * @return The address of the contained object if + * __any != nullptr && __any.type() == typeid(_ValueType) + * , otherwise a null pointer. + * + * @{ + */ + template + inline const _ValueType* any_cast(const any* __any) noexcept + { + if (__any) + return static_cast<_ValueType*>(__any_caster<_ValueType>(__any)); + return nullptr; + } + + template + inline _ValueType* any_cast(any* __any) noexcept + { + if (__any) + return static_cast<_ValueType*>(__any_caster<_ValueType>(__any)); + return nullptr; + } + // @} + + template + void + any::_Manager_internal<_Tp>:: + _S_manage(_Op __which, const any* __any, _Arg* __arg) + { + // The contained object is in _M_storage._M_buffer + auto __ptr = reinterpret_cast(&__any->_M_storage._M_buffer); + switch (__which) + { + case _Op_access: + __arg->_M_obj = const_cast<_Tp*>(__ptr); + break; + case _Op_get_type_info: +#if __cpp_rtti + __arg->_M_typeinfo = &typeid(_Tp); +#endif + break; + case _Op_clone: + ::new(&__arg->_M_any->_M_storage._M_buffer) _Tp(*__ptr); + __arg->_M_any->_M_manager = __any->_M_manager; + break; + case _Op_destroy: + __ptr->~_Tp(); + break; + case _Op_xfer: + ::new(&__arg->_M_any->_M_storage._M_buffer) _Tp + (std::move(*const_cast<_Tp*>(__ptr))); + __ptr->~_Tp(); + __arg->_M_any->_M_manager = __any->_M_manager; + const_cast(__any)->_M_manager = nullptr; + break; + } + } + + template + void + any::_Manager_external<_Tp>:: + _S_manage(_Op __which, const any* __any, _Arg* __arg) + { + // The contained object is *_M_storage._M_ptr + auto __ptr = static_cast(__any->_M_storage._M_ptr); + switch (__which) + { + case _Op_access: + __arg->_M_obj = const_cast<_Tp*>(__ptr); + break; + case _Op_get_type_info: +#if __cpp_rtti + __arg->_M_typeinfo = &typeid(_Tp); +#endif + break; + case _Op_clone: + __arg->_M_any->_M_storage._M_ptr = new _Tp(*__ptr); + __arg->_M_any->_M_manager = __any->_M_manager; + break; + case _Op_destroy: + delete __ptr; + break; + case _Op_xfer: + __arg->_M_any->_M_storage._M_ptr = __any->_M_storage._M_ptr; + __arg->_M_any->_M_manager = __any->_M_manager; + const_cast(__any)->_M_manager = nullptr; + break; + } + } + + /// @} + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_ANY diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/atomic_word.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/atomic_word.h new file mode 100644 index 000000000..6d2110513 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/atomic_word.h @@ -0,0 +1,40 @@ +// Low-level type for atomic operations -*- C++ -*- + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file atomic_word.h + * This file is a GNU extension to the Standard C++ Library. + */ + +#ifndef _GLIBCXX_ATOMIC_WORD_H +#define _GLIBCXX_ATOMIC_WORD_H 1 + +typedef int _Atomic_word; + + +// This is a memory order acquire fence. +#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE) +// This is a memory order release fence. +#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE) + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/basic_file.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/basic_file.h similarity index 92% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/basic_file.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/basic_file.h index bdd15c149..f959ea534 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/basic_file.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/basic_file.h @@ -1,6 +1,6 @@ // Wrapper of C-language FILE struct -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -47,7 +47,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Generic declaration. template - class __basic_file; + class __basic_file; // Specialization. template<> @@ -81,7 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #endif - __basic_file* + __basic_file* open(const char* __name, ios_base::openmode __mode, int __prot = 0664); __basic_file* @@ -90,13 +90,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __basic_file* sys_open(int __fd, ios_base::openmode __mode) throw (); - __basic_file* - close(); + __basic_file* + close(); - _GLIBCXX_PURE bool + _GLIBCXX_PURE bool is_open() const throw (); - _GLIBCXX_PURE int + _GLIBCXX_PURE int fd() throw (); _GLIBCXX_PURE __c_file* @@ -104,20 +104,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ~__basic_file(); - streamsize + streamsize xsputn(const char* __s, streamsize __n); - streamsize + streamsize xsputn_2(const char* __s1, streamsize __n1, const char* __s2, streamsize __n2); - streamsize + streamsize xsgetn(char* __s, streamsize __n); streamoff seekoff(streamoff __off, ios_base::seekdir __way) throw (); - int + int sync(); streamsize @@ -127,4 +127,4 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#endif +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++allocator.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++allocator.h index 4dcd1d4e7..3d2bb6788 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++allocator.h @@ -1,6 +1,6 @@ // Base to std::allocator -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++config.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++config.h similarity index 84% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++config.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++config.h index e1d734a34..aaf5c5491 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++config.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++config.h @@ -1,6 +1,6 @@ // Predefined symbols and macros -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -30,8 +30,11 @@ #ifndef _GLIBCXX_CXX_CONFIG_H #define _GLIBCXX_CXX_CONFIG_H 1 -// The current version of the C++ library in compressed ISO date format. -#define __GLIBCXX__ 20151204 +// The major release number for the GCC release the C++ library belongs to. +#define _GLIBCXX_RELEASE 7 + +// The datestamp of the C++ library in compressed ISO date format. +#define __GLIBCXX__ 20170502 // Macros for various attributes. // _GLIBCXX_PURE @@ -111,14 +114,32 @@ # endif #endif +#ifndef _GLIBCXX17_CONSTEXPR +# if __cplusplus > 201402L +# define _GLIBCXX17_CONSTEXPR constexpr +# else +# define _GLIBCXX17_CONSTEXPR +# endif +#endif + +#ifndef _GLIBCXX17_INLINE +# if __cplusplus > 201402L +# define _GLIBCXX17_INLINE inline +# else +# define _GLIBCXX17_INLINE +# endif +#endif + // Macro for noexcept, to support in mixed 03/0x mode. #ifndef _GLIBCXX_NOEXCEPT # if __cplusplus >= 201103L # define _GLIBCXX_NOEXCEPT noexcept +# define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND) # define _GLIBCXX_USE_NOEXCEPT noexcept # define _GLIBCXX_THROW(_EXC) # else # define _GLIBCXX_NOEXCEPT +# define _GLIBCXX_NOEXCEPT_IF(_COND) # define _GLIBCXX_USE_NOEXCEPT throw() # define _GLIBCXX_THROW(_EXC) throw(_EXC) # endif @@ -136,7 +157,15 @@ # endif #endif -// Macro for extern template, ie controling template linkage via use +#if __cpp_noexcept_function_type +#define _GLIBCXX_NOEXCEPT_PARM , bool _NE +#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE) +#else +#define _GLIBCXX_NOEXCEPT_PARM +#define _GLIBCXX_NOEXCEPT_QUAL +#endif + +// Macro for extern template, ie controlling template linkage via use // of extern keyword on template declaration. As documented in the g++ // manual, it inhibits all implicit instantiations and is used // throughout the library to avoid multiple weak definitions for @@ -158,7 +187,9 @@ namespace __profile { } namespace __cxx1998 { } - namespace __detail { } + namespace __detail { + namespace __variant { } // C++17 + } namespace rel_ops { } @@ -173,12 +204,16 @@ namespace decimal { } - namespace chrono { } - namespace placeholders { } - namespace regex_constants { } - namespace this_thread { } - - namespace experimental { } + namespace chrono { } // C++11 + namespace placeholders { } // C++11 + namespace regex_constants { } // C++11 + namespace this_thread { } // C++11 + inline namespace literals { // C++14 + inline namespace chrono_literals { } // C++14 + inline namespace complex_literals { } // C++14 + inline namespace string_literals { } // C++14 + inline namespace string_view_literals { } // C++17 + } } namespace abi { } @@ -258,14 +293,30 @@ namespace std namespace decimal { inline namespace __7 { } } +#if __cplusplus >= 201103L namespace chrono { inline namespace __7 { } } namespace placeholders { inline namespace __7 { } } namespace regex_constants { inline namespace __7 { } } namespace this_thread { inline namespace __7 { } } - namespace experimental { inline namespace __7 { } } +#if __cplusplus >= 201402L + inline namespace literals { + inline namespace chrono_literals { inline namespace __7 { } } + inline namespace complex_literals { inline namespace __7 { } } + inline namespace string_literals { inline namespace __7 { } } +#if __cplusplus > 201402L + inline namespace string_view_literals { inline namespace __7 { } } +#endif // C++17 + } +#endif // C++14 +#endif // C++11 - namespace __detail { inline namespace __7 { } } + namespace __detail { + inline namespace __7 { } +#if __cplusplus > 201402L + namespace __variant { inline namespace __7 { } } +#endif + } } namespace __gnu_cxx @@ -294,7 +345,7 @@ namespace std # endif # if _GLIBCXX_USE_CXX11_ABI - inline namespace __cxx11 __attribute__((__abi_tag__)) { } + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } # endif } @@ -348,8 +399,10 @@ namespace std namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_CONTAINER \ _GLIBCXX_END_NAMESPACE_VERSION } -# undef _GLIBCXX_EXTERN_TEMPLATE -# define _GLIBCXX_EXTERN_TEMPLATE -1 +#else +# define _GLIBCXX_STD_C std +# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION #endif #ifdef _GLIBCXX_PARALLEL @@ -358,30 +411,10 @@ namespace std namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_ALGO \ _GLIBCXX_END_NAMESPACE_VERSION } -#endif - -#ifndef _GLIBCXX_STD_A +#else # define _GLIBCXX_STD_A std -#endif - -#ifndef _GLIBCXX_STD_C -# define _GLIBCXX_STD_C std -#endif - -#ifndef _GLIBCXX_BEGIN_NAMESPACE_ALGO -# define _GLIBCXX_BEGIN_NAMESPACE_ALGO -#endif - -#ifndef _GLIBCXX_END_NAMESPACE_ALGO -# define _GLIBCXX_END_NAMESPACE_ALGO -#endif - -#ifndef _GLIBCXX_BEGIN_NAMESPACE_CONTAINER -# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER -#endif - -#ifndef _GLIBCXX_END_NAMESPACE_CONTAINER -# define _GLIBCXX_END_NAMESPACE_CONTAINER +# define _GLIBCXX_BEGIN_NAMESPACE_ALGO _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_ALGO _GLIBCXX_END_NAMESPACE_VERSION #endif // GLIBCXX_ABI Deprecated @@ -412,10 +445,20 @@ namespace std # define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL #endif +// Debug Mode implies checking assertions. +#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS) +# define _GLIBCXX_ASSERTIONS 1 +#endif + +// Disable std::string explicit instantiation declarations in order to assert. +#ifdef _GLIBCXX_ASSERTIONS +# undef _GLIBCXX_EXTERN_TEMPLATE +# define _GLIBCXX_EXTERN_TEMPLATE -1 +#endif + // Assert. -#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL) -# define __glibcxx_assert(_Condition) -#else +#if defined(_GLIBCXX_ASSERTIONS) \ + || defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS) namespace std { // Avoid the use of assert, because we're trying to keep the @@ -429,7 +472,7 @@ namespace std __builtin_abort(); } } -#define __glibcxx_assert(_Condition) \ +#define __glibcxx_assert_impl(_Condition) \ do \ { \ if (! (_Condition)) \ @@ -438,6 +481,12 @@ namespace std } while (false) #endif +#if defined(_GLIBCXX_ASSERTIONS) +# define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition) +#else +# define __glibcxx_assert(_Condition) +#endif + // Macros for race detectors. // _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and // _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain @@ -470,6 +519,8 @@ namespace std # define _GLIBCXX_BEGIN_EXTERN_C extern "C" { # define _GLIBCXX_END_EXTERN_C } +# define _GLIBCXX_USE_ALLOCATOR_NEW 1 + #else // !__cplusplus # define _GLIBCXX_BEGIN_EXTERN_C # define _GLIBCXX_END_EXTERN_C @@ -497,6 +548,35 @@ namespace std # define _GLIBCXX_WEAK_DEFINITION #endif +// By default, we assume that __GXX_WEAK__ also means that there is support +// for declaring functions as weak while not defining such functions. This +// allows for referring to functions provided by other libraries (e.g., +// libitm) without depending on them if the respective features are not used. +#ifndef _GLIBCXX_USE_WEAK_REF +# define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__ +#endif + +// Conditionally enable annotations for the Transactional Memory TS on C++11. +// Most of the following conditions are due to limitations in the current +// implementation. +#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \ + && _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201505L \ + && !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF \ + && _GLIBCXX_USE_ALLOCATOR_NEW +#define _GLIBCXX_TXN_SAFE transaction_safe +#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic +#else +#define _GLIBCXX_TXN_SAFE +#define _GLIBCXX_TXN_SAFE_DYN +#endif + +#if __cplusplus > 201402L +// In C++17 mathematical special functions are in namespace std. +# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 +#elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0 +// For C++11 and C++14 they are in namespace std when requested. +# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 +#endif // The remainder of the prewritten config is automatic; all the // user hooks are listed above. @@ -518,6 +598,42 @@ namespace std #undef min #undef max +// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally +// so they should be tested with #if not with #ifdef. +#if __cplusplus >= 201103L +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR +# endif +#else +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR +# endif +#endif + // End of prewritten config; the settings discovered at configure time follow. /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -528,6 +644,9 @@ namespace std /* Define to 1 if you have the `acosl' function. */ /* #undef _GLIBCXX_HAVE_ACOSL */ +/* Define to 1 if you have the `aligned_alloc' function. */ +/* #undef _GLIBCXX_HAVE_ALIGNED_ALLOC */ + /* Define to 1 if you have the `asinf' function. */ #define _GLIBCXX_HAVE_ASINF 1 @@ -642,6 +761,9 @@ namespace std /* Define if EWOULDBLOCK exists. */ #define _GLIBCXX_HAVE_EWOULDBLOCK 1 +/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */ +/* #undef _GLIBCXX_HAVE_EXCEPTION_PTR_SINCE_GCC46 */ + /* Define to 1 if you have the header file. */ /* #undef _GLIBCXX_HAVE_EXECINFO_H */ @@ -702,7 +824,7 @@ namespace std /* Define if _Unwind_GetIPInfo is available. */ #define _GLIBCXX_HAVE_GETIPINFO 1 -/* Define if gets is available in . */ +/* Define if gets is available in before C++14. */ #define _GLIBCXX_HAVE_GETS 1 /* Define to 1 if you have the `hypot' function. */ @@ -766,19 +888,19 @@ namespace std /* #undef _GLIBCXX_HAVE_LIBINTL_H */ /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_AS */ +#define _GLIBCXX_HAVE_LIMIT_AS 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_DATA */ +#define _GLIBCXX_HAVE_LIMIT_DATA 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */ +#define _GLIBCXX_HAVE_LIMIT_FSIZE 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_RSS */ +#define _GLIBCXX_HAVE_LIMIT_RSS 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */ +#define _GLIBCXX_HAVE_LIMIT_VMEM 0 /* Define if futex syscall is available. */ /* #undef _GLIBCXX_HAVE_LINUX_FUTEX */ @@ -807,8 +929,11 @@ namespace std /* Define if mbstate_t exists in wchar.h. */ #define _GLIBCXX_HAVE_MBSTATE_T 1 +/* Define to 1 if you have the `memalign' function. */ +#define _GLIBCXX_HAVE_MEMALIGN 1 + /* Define to 1 if you have the header file. */ -/* #undef _GLIBCXX_HAVE_MEMORY_H */ +#define _GLIBCXX_HAVE_MEMORY_H 1 /* Define to 1 if you have the `modf' function. */ /* #undef _GLIBCXX_HAVE_MODF */ @@ -822,9 +947,18 @@ namespace std /* Define to 1 if you have the header file. */ /* #undef _GLIBCXX_HAVE_NAN_H */ +/* Define if defines obsolete isinf function. */ +/* #undef _GLIBCXX_HAVE_OBSOLETE_ISINF */ + +/* Define if defines obsolete isnan function. */ +/* #undef _GLIBCXX_HAVE_OBSOLETE_ISNAN */ + /* Define if poll is available in . */ /* #undef _GLIBCXX_HAVE_POLL */ +/* Define to 1 if you have the `posix_memalign' function. */ +/* #undef _GLIBCXX_HAVE_POSIX_MEMALIGN */ + /* Define to 1 if you have the `powf' function. */ #define _GLIBCXX_HAVE_POWF 1 @@ -958,7 +1092,7 @@ namespace std /* Define if S_IFREG is available in . */ /* #undef _GLIBCXX_HAVE_S_IFREG */ -/* Define if S_IFREG is available in . */ +/* Define if S_ISREG is available in . */ #define _GLIBCXX_HAVE_S_ISREG 1 /* Define to 1 if you have the `tanf' function. */ @@ -979,6 +1113,9 @@ namespace std /* Define to 1 if the target supports thread-local storage. */ /* #undef _GLIBCXX_HAVE_TLS */ +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_UCHAR_H */ + /* Define to 1 if you have the header file. */ #define _GLIBCXX_HAVE_UNISTD_H 1 @@ -1018,6 +1155,9 @@ namespace std /* Define to 1 if you have the `_acosl' function. */ /* #undef _GLIBCXX_HAVE__ACOSL */ +/* Define to 1 if you have the `_aligned_malloc' function. */ +/* #undef _GLIBCXX_HAVE__ALIGNED_MALLOC */ + /* Define to 1 if you have the `_asinf' function. */ /* #undef _GLIBCXX_HAVE__ASINF */ @@ -1198,6 +1338,9 @@ namespace std /* Define to 1 if you have the `_tanl' function. */ /* #undef _GLIBCXX_HAVE__TANL */ +/* Define to 1 if you have the `__cxa_thread_atexit' function. */ +/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT */ + /* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */ /* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ @@ -1250,6 +1393,48 @@ namespace std /* Version number of package */ /* #undef _GLIBCXX_VERSION */ +/* Define if C99 functions in should be used in for + C++11. Using compiler builtins for these functions requires corresponding + C99 library functions to be present. */ +/* #undef _GLIBCXX11_USE_C99_COMPLEX */ + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_STDIO 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_STDLIB 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_WCHAR 1 + +/* Define if C99 functions in should be used in for + C++98. Using compiler builtins for these functions requires corresponding + C99 library functions to be present. */ +/* #undef _GLIBCXX98_USE_C99_COMPLEX */ + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_STDIO 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_STDLIB 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_WCHAR 1 + /* Define if the compiler supports C++11 atomics. */ #define _GLIBCXX_ATOMIC_BUILTINS 1 @@ -1268,6 +1453,12 @@ namespace std /* Define if compatibility should be provided for -mlong-double-64. */ +/* Define to the letter to which size_t is mangled. */ +#define _GLIBCXX_MANGLE_SIZE_T j + +/* Define if C99 llrint and llround functions are missing from . */ +/* #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS */ + /* Define if ptrdiff_t is int. */ #define _GLIBCXX_PTRDIFF_T_IS_INT 1 @@ -1277,9 +1468,6 @@ namespace std /* Define if size_t is unsigned int. */ #define _GLIBCXX_SIZE_T_IS_UINT 1 -/* Define if the compiler is configured for setjmp/longjmp exceptions. */ -/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */ - /* Define to the value of the EOF integer constant. */ #define _GLIBCXX_STDIO_EOF -1 @@ -1304,15 +1492,14 @@ namespace std /* Define to use Sun versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_SUN */ +/* Define if C11 functions in should be imported into namespace std + in . */ +/* #undef _GLIBCXX_USE_C11_UCHAR_CXX11 */ + /* Define if C99 functions or macros from , , , , and can be used or exposed. */ /* #undef _GLIBCXX_USE_C99 */ -/* Define if C99 functions in should be used in . Using - compiler builtins for these functions requires corresponding C99 library - functions to be present. */ -/* #undef _GLIBCXX_USE_C99_COMPLEX */ - /* Define if C99 functions in should be used in . Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ @@ -1334,10 +1521,6 @@ namespace std in namespace std::tr1. */ #define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 -/* Define if C99 functions or macros in should be imported in - in namespace std. */ -#define _GLIBCXX_USE_C99_MATH 1 - /* Define if C99 functions or macros in should be imported in in namespace std::tr1. */ #define _GLIBCXX_USE_C99_MATH_TR1 1 @@ -1412,7 +1595,7 @@ namespace std /* Define if _SC_NPROC_ONLN is available in . */ /* #undef _GLIBCXX_USE_SC_NPROC_ONLN */ -/* Define if sendfile is available in . */ +/* Define if sendfile is available in . */ /* #undef _GLIBCXX_USE_SENDFILE */ /* Define if struct stat has timespec members. */ @@ -1440,9 +1623,14 @@ namespace std /* Define to 1 if mutex_timedlock is available. */ #define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 -/* Define if all C++11 overloads are available in . */ +/* Define if all C++11 floating point overloads are available in . */ #if __cplusplus >= 201103L -/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO */ +/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP */ +#endif + +/* Define if all C++11 integral type overloads are available in . */ +#if __cplusplus >= 201103L +/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT */ #endif #if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++io.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++io.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++io.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++io.h index 8a4b4535d..124e71505 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++io.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++io.h @@ -1,6 +1,6 @@ // Underlying io library details -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++locale.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++locale.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++locale.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++locale.h index ee3ef8698..ce9fbb80d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++locale.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/c++locale.h @@ -1,6 +1,6 @@ // Wrapper for underlying C-language localization -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -53,7 +53,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // fall back to the unsafe vsprintf which, in general, can be dangerous // and should be avoided. inline int - __convert_from_v(const __c_locale&, char* __out, + __convert_from_v(const __c_locale&, char* __out, const int __size __attribute__((__unused__)), const char* __fmt, ...) { @@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __builtin_va_list __args; __builtin_va_start(__args, __fmt); -#ifdef _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); #else const int __ret = __builtin_vsprintf(__out, __fmt, __args); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/cpu_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/cpu_defines.h similarity index 84% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/cpu_defines.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/cpu_defines.h index ce87dd34c..121ece2f9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/cpu_defines.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/cpu_defines.h @@ -1,6 +1,6 @@ // Specific definitions for generic platforms -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2015-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -30,4 +30,11 @@ #ifndef _GLIBCXX_CPU_DEFINES #define _GLIBCXX_CPU_DEFINES 1 +// Integer divide instructions don't trap on ARM. +#ifdef __ARM_ARCH_EXT_IDIV__ +#define __glibcxx_integral_traps false +#else +#define __glibcxx_integral_traps true +#endif + #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/ctype_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/ctype_base.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/ctype_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/ctype_base.h index c236afd74..6a8cce7bc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/ctype_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/ctype_base.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -25,7 +25,7 @@ // // ISO C++ 14882: 22.1 Locales // - + // Information as gleaned from /usr/include/ctype.h namespace std _GLIBCXX_VISIBILITY(default) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/ctype_inline.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/ctype_inline.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/ctype_inline.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/ctype_inline.h index 5952d912b..cbb33392d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/ctype_inline.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/ctype_inline.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/cxxabi_tweaks.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/cxxabi_tweaks.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/cxxabi_tweaks.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/cxxabi_tweaks.h index 05fa83db1..6f37a4fdf 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/cxxabi_tweaks.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/cxxabi_tweaks.h @@ -1,6 +1,6 @@ // Control various target specific ABI tweaks. ARM version. -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -33,7 +33,7 @@ #ifdef __cplusplus namespace __cxxabiv1 { - extern "C" + extern "C" { #endif @@ -49,7 +49,7 @@ namespace __cxxabiv1 // We also want the element size in array cookies. #define _GLIBCXX_ELTSIZE_IN_COOKIE 1 - + // __cxa_vec_ctor should return a pointer to the array. typedef void * __cxa_vec_ctor_return_type; #define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x @@ -79,4 +79,4 @@ namespace __cxxabiv1 } // namespace __cxxabiv1 #endif -#endif +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/error_constants.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/error_constants.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/error_constants.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/error_constants.h index 74492cf61..3f5c92e7c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/error_constants.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/error_constants.h @@ -1,6 +1,6 @@ // Specific definitions for generic platforms -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -93,10 +93,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION no_lock_available = ENOLCK, #ifdef _GLIBCXX_HAVE_ENODATA - no_message_available = ENODATA, + no_message_available = ENODATA, #endif - no_message = ENOMSG, + no_message = ENOMSG, no_protocol_option = ENOPROTOOPT, no_space_on_device = ENOSPC, diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/extc++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/extc++.h similarity index 87% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/extc++.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/extc++.h index de3775b36..68c1681a3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/extc++.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/extc++.h @@ -1,6 +1,6 @@ // C++ includes used for precompiling extensions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -28,13 +28,22 @@ #if __cplusplus < 201103L #include +#else +#include #endif #include +#if __cplusplus >= 201103L +# include +#endif +#include #include #include #include #include +#if __cplusplus >= 201103L +# include +#endif #include #include #include @@ -45,9 +54,13 @@ #include #include #include +#include #include #include #include +#if __cplusplus >= 201103L +# include +#endif #include #include #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr-default.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr-default.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr-default.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr-default.h index 596153700..165711401 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr-default.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr-default.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t; #define __GTHREAD_ONCE_INIT 0 #define __GTHREAD_MUTEX_INIT 0 -#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) #define __GTHREAD_RECURSIVE_MUTEX_INIT 0 #define _GLIBCXX_UNUSED __attribute__((__unused__)) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr-posix.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr-posix.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr-posix.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr-posix.h index 839915a9f..2f844b247 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr-posix.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr-posix.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr-single.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr-single.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr-single.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr-single.h index 596153700..165711401 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr-single.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr-single.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t; #define __GTHREAD_ONCE_INIT 0 #define __GTHREAD_MUTEX_INIT 0 -#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) #define __GTHREAD_RECURSIVE_MUTEX_INIT 0 #define _GLIBCXX_UNUSED __attribute__((__unused__)) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr.h index 0732e0436..5889966e6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/gthr.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/messages_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/messages_members.h similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/messages_members.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/messages_members.h index c2fa47199..7baec1c5a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/messages_members.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/messages_members.h @@ -1,6 +1,6 @@ // std::messages implementation details, generic version -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -44,13 +44,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _M_c_locale_messages = _S_get_c_locale(); } template - messages<_CharT>::messages(__c_locale, const char*, size_t __refs) + messages<_CharT>::messages(__c_locale, const char*, size_t __refs) : facet(__refs) { _M_c_locale_messages = _S_get_c_locale(); } template - typename messages<_CharT>::catalog - messages<_CharT>::open(const basic_string& __s, const locale& __loc, + typename messages<_CharT>::catalog + messages<_CharT>::open(const basic_string& __s, const locale& __loc, const char*) const { return this->do_open(__s, __loc); } @@ -60,31 +60,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _S_destroy_c_locale(_M_c_locale_messages); } template - typename messages<_CharT>::catalog + typename messages<_CharT>::catalog messages<_CharT>::do_open(const basic_string&, const locale&) const { return 0; } template - typename messages<_CharT>::string_type - messages<_CharT>::do_get(catalog, int, int, + typename messages<_CharT>::string_type + messages<_CharT>::do_get(catalog, int, int, const string_type& __dfault) const { return __dfault; } template - void - messages<_CharT>::do_close(catalog) const + void + messages<_CharT>::do_close(catalog) const { } // messages_byname template messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) - : messages<_CharT>(__refs) - { + : messages<_CharT>(__refs) + { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_messages); - this->_S_create_c_locale(this->_M_c_locale_messages, __s); + this->_S_create_c_locale(this->_M_c_locale_messages, __s); } } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/opt_random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/opt_random.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/opt_random.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/opt_random.h index 3bf220397..5e2b7b103 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/opt_random.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/opt_random.h @@ -1,6 +1,6 @@ // Optimizations for random number handling, generic version -*- C++ -*- -// Copyright (C) 2012-2015 Free Software Foundation, Inc. +// Copyright (C) 2012-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/os_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/os_defines.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/os_defines.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/os_defines.h index 72ab3c969..a54dd98f9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/os_defines.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/os_defines.h @@ -1,6 +1,6 @@ // Specific definitions for newlib -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -53,6 +53,9 @@ // their dtors are called #define _GLIBCXX_THREAD_ATEXIT_WIN32 1 +// See libstdc++/69506 +#define _GLIBCXX_USE_WEAK_REF 0 + #endif #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/stdc++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/stdc++.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/stdc++.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/stdc++.h index 8449ec098..262743a3c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/stdc++.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/stdc++.h @@ -1,6 +1,6 @@ // C++ includes used for precompiling -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #endif @@ -98,6 +99,7 @@ #include #include #include +#include #include #include #include @@ -115,3 +117,7 @@ #include #include #endif + +#if __cplusplus >= 201402L +#include +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/stdtr1c++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/stdtr1c++.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/stdtr1c++.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/stdtr1c++.h index 542059cad..9e6a5c230 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/stdtr1c++.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/stdtr1c++.h @@ -1,6 +1,6 @@ // C++ includes used for precompiling TR1 -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/time_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/time_members.h similarity index 89% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/time_members.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/time_members.h index 1f6f02d03..c77c4685b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/time_members.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/bits/time_members.h @@ -1,6 +1,6 @@ // std::time_get, std::time_put implementation, generic version -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,24 +39,24 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION template - __timepunct<_CharT>::__timepunct(size_t __refs) + __timepunct<_CharT>::__timepunct(size_t __refs) : facet(__refs), _M_data(0) - { + { _M_name_timepunct = _S_get_c_name(); - _M_initialize_timepunct(); + _M_initialize_timepunct(); } template - __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) : facet(__refs), _M_data(__cache) - { + { _M_name_timepunct = _S_get_c_name(); - _M_initialize_timepunct(); + _M_initialize_timepunct(); } template - __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, - size_t __refs) + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, + size_t __refs) : facet(__refs), _M_data(0) { if (__builtin_strcmp(__s, _S_get_c_name()) != 0) @@ -81,11 +81,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template __timepunct<_CharT>::~__timepunct() - { + { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; delete _M_data; - _S_destroy_c_locale(_M_c_locale_timepunct); + _S_destroy_c_locale(_M_c_locale_timepunct); } _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/ext/opt_random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/ext/opt_random.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/ext/opt_random.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/ext/opt_random.h index f23a1e1ba..2150f5826 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/ext/opt_random.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/armv6k/fpu/ext/opt_random.h @@ -1,6 +1,6 @@ // Optimizations for random number extensions, generic version -*- C++ -*- -// Copyright (C) 2012-2015 Free Software Foundation, Inc. +// Copyright (C) 2012-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/atomic_word.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/atomic_word.h new file mode 100644 index 000000000..6d2110513 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/atomic_word.h @@ -0,0 +1,40 @@ +// Low-level type for atomic operations -*- C++ -*- + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file atomic_word.h + * This file is a GNU extension to the Standard C++ Library. + */ + +#ifndef _GLIBCXX_ATOMIC_WORD_H +#define _GLIBCXX_ATOMIC_WORD_H 1 + +typedef int _Atomic_word; + + +// This is a memory order acquire fence. +#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE) +// This is a memory order release fence. +#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE) + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/basic_file.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/basic_file.h similarity index 92% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/basic_file.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/basic_file.h index bdd15c149..f959ea534 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/basic_file.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/basic_file.h @@ -1,6 +1,6 @@ // Wrapper of C-language FILE struct -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -47,7 +47,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Generic declaration. template - class __basic_file; + class __basic_file; // Specialization. template<> @@ -81,7 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #endif - __basic_file* + __basic_file* open(const char* __name, ios_base::openmode __mode, int __prot = 0664); __basic_file* @@ -90,13 +90,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __basic_file* sys_open(int __fd, ios_base::openmode __mode) throw (); - __basic_file* - close(); + __basic_file* + close(); - _GLIBCXX_PURE bool + _GLIBCXX_PURE bool is_open() const throw (); - _GLIBCXX_PURE int + _GLIBCXX_PURE int fd() throw (); _GLIBCXX_PURE __c_file* @@ -104,20 +104,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ~__basic_file(); - streamsize + streamsize xsputn(const char* __s, streamsize __n); - streamsize + streamsize xsputn_2(const char* __s1, streamsize __n1, const char* __s2, streamsize __n2); - streamsize + streamsize xsgetn(char* __s, streamsize __n); streamoff seekoff(streamoff __off, ios_base::seekdir __way) throw (); - int + int sync(); streamsize @@ -127,4 +127,4 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#endif +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++allocator.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++allocator.h index 4dcd1d4e7..3d2bb6788 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++allocator.h @@ -1,6 +1,6 @@ // Base to std::allocator -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++config.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++config.h similarity index 84% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++config.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++config.h index 00c2f020d..050d87ac0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++config.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++config.h @@ -1,6 +1,6 @@ // Predefined symbols and macros -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -30,8 +30,11 @@ #ifndef _GLIBCXX_CXX_CONFIG_H #define _GLIBCXX_CXX_CONFIG_H 1 -// The current version of the C++ library in compressed ISO date format. -#define __GLIBCXX__ 20151204 +// The major release number for the GCC release the C++ library belongs to. +#define _GLIBCXX_RELEASE 7 + +// The datestamp of the C++ library in compressed ISO date format. +#define __GLIBCXX__ 20170502 // Macros for various attributes. // _GLIBCXX_PURE @@ -111,14 +114,32 @@ # endif #endif +#ifndef _GLIBCXX17_CONSTEXPR +# if __cplusplus > 201402L +# define _GLIBCXX17_CONSTEXPR constexpr +# else +# define _GLIBCXX17_CONSTEXPR +# endif +#endif + +#ifndef _GLIBCXX17_INLINE +# if __cplusplus > 201402L +# define _GLIBCXX17_INLINE inline +# else +# define _GLIBCXX17_INLINE +# endif +#endif + // Macro for noexcept, to support in mixed 03/0x mode. #ifndef _GLIBCXX_NOEXCEPT # if __cplusplus >= 201103L # define _GLIBCXX_NOEXCEPT noexcept +# define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND) # define _GLIBCXX_USE_NOEXCEPT noexcept # define _GLIBCXX_THROW(_EXC) # else # define _GLIBCXX_NOEXCEPT +# define _GLIBCXX_NOEXCEPT_IF(_COND) # define _GLIBCXX_USE_NOEXCEPT throw() # define _GLIBCXX_THROW(_EXC) throw(_EXC) # endif @@ -136,7 +157,15 @@ # endif #endif -// Macro for extern template, ie controling template linkage via use +#if __cpp_noexcept_function_type +#define _GLIBCXX_NOEXCEPT_PARM , bool _NE +#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE) +#else +#define _GLIBCXX_NOEXCEPT_PARM +#define _GLIBCXX_NOEXCEPT_QUAL +#endif + +// Macro for extern template, ie controlling template linkage via use // of extern keyword on template declaration. As documented in the g++ // manual, it inhibits all implicit instantiations and is used // throughout the library to avoid multiple weak definitions for @@ -158,7 +187,9 @@ namespace __profile { } namespace __cxx1998 { } - namespace __detail { } + namespace __detail { + namespace __variant { } // C++17 + } namespace rel_ops { } @@ -173,12 +204,16 @@ namespace decimal { } - namespace chrono { } - namespace placeholders { } - namespace regex_constants { } - namespace this_thread { } - - namespace experimental { } + namespace chrono { } // C++11 + namespace placeholders { } // C++11 + namespace regex_constants { } // C++11 + namespace this_thread { } // C++11 + inline namespace literals { // C++14 + inline namespace chrono_literals { } // C++14 + inline namespace complex_literals { } // C++14 + inline namespace string_literals { } // C++14 + inline namespace string_view_literals { } // C++17 + } } namespace abi { } @@ -258,14 +293,30 @@ namespace std namespace decimal { inline namespace __7 { } } +#if __cplusplus >= 201103L namespace chrono { inline namespace __7 { } } namespace placeholders { inline namespace __7 { } } namespace regex_constants { inline namespace __7 { } } namespace this_thread { inline namespace __7 { } } - namespace experimental { inline namespace __7 { } } +#if __cplusplus >= 201402L + inline namespace literals { + inline namespace chrono_literals { inline namespace __7 { } } + inline namespace complex_literals { inline namespace __7 { } } + inline namespace string_literals { inline namespace __7 { } } +#if __cplusplus > 201402L + inline namespace string_view_literals { inline namespace __7 { } } +#endif // C++17 + } +#endif // C++14 +#endif // C++11 - namespace __detail { inline namespace __7 { } } + namespace __detail { + inline namespace __7 { } +#if __cplusplus > 201402L + namespace __variant { inline namespace __7 { } } +#endif + } } namespace __gnu_cxx @@ -294,7 +345,7 @@ namespace std # endif # if _GLIBCXX_USE_CXX11_ABI - inline namespace __cxx11 __attribute__((__abi_tag__)) { } + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } # endif } @@ -348,8 +399,10 @@ namespace std namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_CONTAINER \ _GLIBCXX_END_NAMESPACE_VERSION } -# undef _GLIBCXX_EXTERN_TEMPLATE -# define _GLIBCXX_EXTERN_TEMPLATE -1 +#else +# define _GLIBCXX_STD_C std +# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION #endif #ifdef _GLIBCXX_PARALLEL @@ -358,30 +411,10 @@ namespace std namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_ALGO \ _GLIBCXX_END_NAMESPACE_VERSION } -#endif - -#ifndef _GLIBCXX_STD_A +#else # define _GLIBCXX_STD_A std -#endif - -#ifndef _GLIBCXX_STD_C -# define _GLIBCXX_STD_C std -#endif - -#ifndef _GLIBCXX_BEGIN_NAMESPACE_ALGO -# define _GLIBCXX_BEGIN_NAMESPACE_ALGO -#endif - -#ifndef _GLIBCXX_END_NAMESPACE_ALGO -# define _GLIBCXX_END_NAMESPACE_ALGO -#endif - -#ifndef _GLIBCXX_BEGIN_NAMESPACE_CONTAINER -# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER -#endif - -#ifndef _GLIBCXX_END_NAMESPACE_CONTAINER -# define _GLIBCXX_END_NAMESPACE_CONTAINER +# define _GLIBCXX_BEGIN_NAMESPACE_ALGO _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_ALGO _GLIBCXX_END_NAMESPACE_VERSION #endif // GLIBCXX_ABI Deprecated @@ -412,10 +445,20 @@ namespace std # define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL #endif +// Debug Mode implies checking assertions. +#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS) +# define _GLIBCXX_ASSERTIONS 1 +#endif + +// Disable std::string explicit instantiation declarations in order to assert. +#ifdef _GLIBCXX_ASSERTIONS +# undef _GLIBCXX_EXTERN_TEMPLATE +# define _GLIBCXX_EXTERN_TEMPLATE -1 +#endif + // Assert. -#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL) -# define __glibcxx_assert(_Condition) -#else +#if defined(_GLIBCXX_ASSERTIONS) \ + || defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS) namespace std { // Avoid the use of assert, because we're trying to keep the @@ -429,7 +472,7 @@ namespace std __builtin_abort(); } } -#define __glibcxx_assert(_Condition) \ +#define __glibcxx_assert_impl(_Condition) \ do \ { \ if (! (_Condition)) \ @@ -438,6 +481,12 @@ namespace std } while (false) #endif +#if defined(_GLIBCXX_ASSERTIONS) +# define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition) +#else +# define __glibcxx_assert(_Condition) +#endif + // Macros for race detectors. // _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and // _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain @@ -470,6 +519,8 @@ namespace std # define _GLIBCXX_BEGIN_EXTERN_C extern "C" { # define _GLIBCXX_END_EXTERN_C } +# define _GLIBCXX_USE_ALLOCATOR_NEW 1 + #else // !__cplusplus # define _GLIBCXX_BEGIN_EXTERN_C # define _GLIBCXX_END_EXTERN_C @@ -497,6 +548,35 @@ namespace std # define _GLIBCXX_WEAK_DEFINITION #endif +// By default, we assume that __GXX_WEAK__ also means that there is support +// for declaring functions as weak while not defining such functions. This +// allows for referring to functions provided by other libraries (e.g., +// libitm) without depending on them if the respective features are not used. +#ifndef _GLIBCXX_USE_WEAK_REF +# define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__ +#endif + +// Conditionally enable annotations for the Transactional Memory TS on C++11. +// Most of the following conditions are due to limitations in the current +// implementation. +#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \ + && _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201505L \ + && !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF \ + && _GLIBCXX_USE_ALLOCATOR_NEW +#define _GLIBCXX_TXN_SAFE transaction_safe +#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic +#else +#define _GLIBCXX_TXN_SAFE +#define _GLIBCXX_TXN_SAFE_DYN +#endif + +#if __cplusplus > 201402L +// In C++17 mathematical special functions are in namespace std. +# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 +#elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0 +// For C++11 and C++14 they are in namespace std when requested. +# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 +#endif // The remainder of the prewritten config is automatic; all the // user hooks are listed above. @@ -518,6 +598,42 @@ namespace std #undef min #undef max +// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally +// so they should be tested with #if not with #ifdef. +#if __cplusplus >= 201103L +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR +# endif +#else +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR +# endif +#endif + // End of prewritten config; the settings discovered at configure time follow. /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -528,6 +644,9 @@ namespace std /* Define to 1 if you have the `acosl' function. */ /* #undef _GLIBCXX_HAVE_ACOSL */ +/* Define to 1 if you have the `aligned_alloc' function. */ +/* #undef _GLIBCXX_HAVE_ALIGNED_ALLOC */ + /* Define to 1 if you have the `asinf' function. */ #define _GLIBCXX_HAVE_ASINF 1 @@ -642,6 +761,9 @@ namespace std /* Define if EWOULDBLOCK exists. */ #define _GLIBCXX_HAVE_EWOULDBLOCK 1 +/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */ +/* #undef _GLIBCXX_HAVE_EXCEPTION_PTR_SINCE_GCC46 */ + /* Define to 1 if you have the header file. */ /* #undef _GLIBCXX_HAVE_EXECINFO_H */ @@ -702,7 +824,7 @@ namespace std /* Define if _Unwind_GetIPInfo is available. */ #define _GLIBCXX_HAVE_GETIPINFO 1 -/* Define if gets is available in . */ +/* Define if gets is available in before C++14. */ #define _GLIBCXX_HAVE_GETS 1 /* Define to 1 if you have the `hypot' function. */ @@ -766,19 +888,19 @@ namespace std /* #undef _GLIBCXX_HAVE_LIBINTL_H */ /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_AS */ +#define _GLIBCXX_HAVE_LIMIT_AS 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_DATA */ +#define _GLIBCXX_HAVE_LIMIT_DATA 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */ +#define _GLIBCXX_HAVE_LIMIT_FSIZE 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_RSS */ +#define _GLIBCXX_HAVE_LIMIT_RSS 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */ +#define _GLIBCXX_HAVE_LIMIT_VMEM 0 /* Define if futex syscall is available. */ /* #undef _GLIBCXX_HAVE_LINUX_FUTEX */ @@ -807,8 +929,11 @@ namespace std /* Define if mbstate_t exists in wchar.h. */ #define _GLIBCXX_HAVE_MBSTATE_T 1 +/* Define to 1 if you have the `memalign' function. */ +#define _GLIBCXX_HAVE_MEMALIGN 1 + /* Define to 1 if you have the header file. */ -/* #undef _GLIBCXX_HAVE_MEMORY_H */ +#define _GLIBCXX_HAVE_MEMORY_H 1 /* Define to 1 if you have the `modf' function. */ /* #undef _GLIBCXX_HAVE_MODF */ @@ -822,9 +947,18 @@ namespace std /* Define to 1 if you have the header file. */ /* #undef _GLIBCXX_HAVE_NAN_H */ +/* Define if defines obsolete isinf function. */ +/* #undef _GLIBCXX_HAVE_OBSOLETE_ISINF */ + +/* Define if defines obsolete isnan function. */ +/* #undef _GLIBCXX_HAVE_OBSOLETE_ISNAN */ + /* Define if poll is available in . */ /* #undef _GLIBCXX_HAVE_POLL */ +/* Define to 1 if you have the `posix_memalign' function. */ +/* #undef _GLIBCXX_HAVE_POSIX_MEMALIGN */ + /* Define to 1 if you have the `powf' function. */ #define _GLIBCXX_HAVE_POWF 1 @@ -958,7 +1092,7 @@ namespace std /* Define if S_IFREG is available in . */ /* #undef _GLIBCXX_HAVE_S_IFREG */ -/* Define if S_IFREG is available in . */ +/* Define if S_ISREG is available in . */ #define _GLIBCXX_HAVE_S_ISREG 1 /* Define to 1 if you have the `tanf' function. */ @@ -979,6 +1113,9 @@ namespace std /* Define to 1 if the target supports thread-local storage. */ /* #undef _GLIBCXX_HAVE_TLS */ +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_UCHAR_H */ + /* Define to 1 if you have the header file. */ #define _GLIBCXX_HAVE_UNISTD_H 1 @@ -1018,6 +1155,9 @@ namespace std /* Define to 1 if you have the `_acosl' function. */ /* #undef _GLIBCXX_HAVE__ACOSL */ +/* Define to 1 if you have the `_aligned_malloc' function. */ +/* #undef _GLIBCXX_HAVE__ALIGNED_MALLOC */ + /* Define to 1 if you have the `_asinf' function. */ /* #undef _GLIBCXX_HAVE__ASINF */ @@ -1198,6 +1338,9 @@ namespace std /* Define to 1 if you have the `_tanl' function. */ /* #undef _GLIBCXX_HAVE__TANL */ +/* Define to 1 if you have the `__cxa_thread_atexit' function. */ +/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT */ + /* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */ /* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ @@ -1250,6 +1393,48 @@ namespace std /* Version number of package */ /* #undef _GLIBCXX_VERSION */ +/* Define if C99 functions in should be used in for + C++11. Using compiler builtins for these functions requires corresponding + C99 library functions to be present. */ +/* #undef _GLIBCXX11_USE_C99_COMPLEX */ + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_STDIO 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_STDLIB 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_WCHAR 1 + +/* Define if C99 functions in should be used in for + C++98. Using compiler builtins for these functions requires corresponding + C99 library functions to be present. */ +/* #undef _GLIBCXX98_USE_C99_COMPLEX */ + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_STDIO 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_STDLIB 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_WCHAR 1 + /* Define if the compiler supports C++11 atomics. */ /* #undef _GLIBCXX_ATOMIC_BUILTINS */ @@ -1268,6 +1453,12 @@ namespace std /* Define if compatibility should be provided for -mlong-double-64. */ +/* Define to the letter to which size_t is mangled. */ +#define _GLIBCXX_MANGLE_SIZE_T j + +/* Define if C99 llrint and llround functions are missing from . */ +/* #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS */ + /* Define if ptrdiff_t is int. */ #define _GLIBCXX_PTRDIFF_T_IS_INT 1 @@ -1277,9 +1468,6 @@ namespace std /* Define if size_t is unsigned int. */ #define _GLIBCXX_SIZE_T_IS_UINT 1 -/* Define if the compiler is configured for setjmp/longjmp exceptions. */ -/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */ - /* Define to the value of the EOF integer constant. */ #define _GLIBCXX_STDIO_EOF -1 @@ -1304,15 +1492,14 @@ namespace std /* Define to use Sun versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_SUN */ +/* Define if C11 functions in should be imported into namespace std + in . */ +/* #undef _GLIBCXX_USE_C11_UCHAR_CXX11 */ + /* Define if C99 functions or macros from , , , , and can be used or exposed. */ /* #undef _GLIBCXX_USE_C99 */ -/* Define if C99 functions in should be used in . Using - compiler builtins for these functions requires corresponding C99 library - functions to be present. */ -/* #undef _GLIBCXX_USE_C99_COMPLEX */ - /* Define if C99 functions in should be used in . Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ @@ -1334,10 +1521,6 @@ namespace std in namespace std::tr1. */ #define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 -/* Define if C99 functions or macros in should be imported in - in namespace std. */ -#define _GLIBCXX_USE_C99_MATH 1 - /* Define if C99 functions or macros in should be imported in in namespace std::tr1. */ #define _GLIBCXX_USE_C99_MATH_TR1 1 @@ -1412,7 +1595,7 @@ namespace std /* Define if _SC_NPROC_ONLN is available in . */ /* #undef _GLIBCXX_USE_SC_NPROC_ONLN */ -/* Define if sendfile is available in . */ +/* Define if sendfile is available in . */ /* #undef _GLIBCXX_USE_SENDFILE */ /* Define if struct stat has timespec members. */ @@ -1440,9 +1623,14 @@ namespace std /* Define to 1 if mutex_timedlock is available. */ #define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 -/* Define if all C++11 overloads are available in . */ +/* Define if all C++11 floating point overloads are available in . */ #if __cplusplus >= 201103L -/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO */ +/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP */ +#endif + +/* Define if all C++11 integral type overloads are available in . */ +#if __cplusplus >= 201103L +/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT */ #endif #if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++io.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++io.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++io.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++io.h index 8a4b4535d..124e71505 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++io.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++io.h @@ -1,6 +1,6 @@ // Underlying io library details -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++locale.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++locale.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++locale.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++locale.h index ee3ef8698..ce9fbb80d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/c++locale.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/c++locale.h @@ -1,6 +1,6 @@ // Wrapper for underlying C-language localization -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -53,7 +53,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // fall back to the unsafe vsprintf which, in general, can be dangerous // and should be avoided. inline int - __convert_from_v(const __c_locale&, char* __out, + __convert_from_v(const __c_locale&, char* __out, const int __size __attribute__((__unused__)), const char* __fmt, ...) { @@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __builtin_va_list __args; __builtin_va_start(__args, __fmt); -#ifdef _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); #else const int __ret = __builtin_vsprintf(__out, __fmt, __args); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/cpu_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/cpu_defines.h similarity index 84% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/cpu_defines.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/cpu_defines.h index ce87dd34c..121ece2f9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/cpu_defines.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/cpu_defines.h @@ -1,6 +1,6 @@ // Specific definitions for generic platforms -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2015-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -30,4 +30,11 @@ #ifndef _GLIBCXX_CPU_DEFINES #define _GLIBCXX_CPU_DEFINES 1 +// Integer divide instructions don't trap on ARM. +#ifdef __ARM_ARCH_EXT_IDIV__ +#define __glibcxx_integral_traps false +#else +#define __glibcxx_integral_traps true +#endif + #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/ctype_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/ctype_base.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/ctype_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/ctype_base.h index c236afd74..6a8cce7bc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/ctype_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/ctype_base.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -25,7 +25,7 @@ // // ISO C++ 14882: 22.1 Locales // - + // Information as gleaned from /usr/include/ctype.h namespace std _GLIBCXX_VISIBILITY(default) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/ctype_inline.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/ctype_inline.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/ctype_inline.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/ctype_inline.h index 5952d912b..cbb33392d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/ctype_inline.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/ctype_inline.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/cxxabi_tweaks.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/cxxabi_tweaks.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/cxxabi_tweaks.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/cxxabi_tweaks.h index 05fa83db1..6f37a4fdf 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/cxxabi_tweaks.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/cxxabi_tweaks.h @@ -1,6 +1,6 @@ // Control various target specific ABI tweaks. ARM version. -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -33,7 +33,7 @@ #ifdef __cplusplus namespace __cxxabiv1 { - extern "C" + extern "C" { #endif @@ -49,7 +49,7 @@ namespace __cxxabiv1 // We also want the element size in array cookies. #define _GLIBCXX_ELTSIZE_IN_COOKIE 1 - + // __cxa_vec_ctor should return a pointer to the array. typedef void * __cxa_vec_ctor_return_type; #define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x @@ -79,4 +79,4 @@ namespace __cxxabiv1 } // namespace __cxxabiv1 #endif -#endif +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/error_constants.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/error_constants.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/error_constants.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/error_constants.h index 74492cf61..3f5c92e7c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/error_constants.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/error_constants.h @@ -1,6 +1,6 @@ // Specific definitions for generic platforms -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -93,10 +93,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION no_lock_available = ENOLCK, #ifdef _GLIBCXX_HAVE_ENODATA - no_message_available = ENODATA, + no_message_available = ENODATA, #endif - no_message = ENOMSG, + no_message = ENOMSG, no_protocol_option = ENOPROTOOPT, no_space_on_device = ENOSPC, diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/extc++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/extc++.h similarity index 87% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/extc++.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/extc++.h index de3775b36..68c1681a3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/extc++.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/extc++.h @@ -1,6 +1,6 @@ // C++ includes used for precompiling extensions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -28,13 +28,22 @@ #if __cplusplus < 201103L #include +#else +#include #endif #include +#if __cplusplus >= 201103L +# include +#endif +#include #include #include #include #include +#if __cplusplus >= 201103L +# include +#endif #include #include #include @@ -45,9 +54,13 @@ #include #include #include +#include #include #include #include +#if __cplusplus >= 201103L +# include +#endif #include #include #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr-default.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr-default.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr-default.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr-default.h index 596153700..165711401 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr-default.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr-default.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t; #define __GTHREAD_ONCE_INIT 0 #define __GTHREAD_MUTEX_INIT 0 -#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) #define __GTHREAD_RECURSIVE_MUTEX_INIT 0 #define _GLIBCXX_UNUSED __attribute__((__unused__)) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr-posix.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr-posix.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr-posix.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr-posix.h index 839915a9f..2f844b247 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr-posix.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr-posix.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr-single.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr-single.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr-single.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr-single.h index 596153700..165711401 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/gthr-single.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr-single.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t; #define __GTHREAD_ONCE_INIT 0 #define __GTHREAD_MUTEX_INIT 0 -#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) #define __GTHREAD_RECURSIVE_MUTEX_INIT 0 #define _GLIBCXX_UNUSED __attribute__((__unused__)) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr.h index 0732e0436..5889966e6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/gthr.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/messages_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/messages_members.h similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/messages_members.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/messages_members.h index c2fa47199..7baec1c5a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/messages_members.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/messages_members.h @@ -1,6 +1,6 @@ // std::messages implementation details, generic version -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -44,13 +44,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _M_c_locale_messages = _S_get_c_locale(); } template - messages<_CharT>::messages(__c_locale, const char*, size_t __refs) + messages<_CharT>::messages(__c_locale, const char*, size_t __refs) : facet(__refs) { _M_c_locale_messages = _S_get_c_locale(); } template - typename messages<_CharT>::catalog - messages<_CharT>::open(const basic_string& __s, const locale& __loc, + typename messages<_CharT>::catalog + messages<_CharT>::open(const basic_string& __s, const locale& __loc, const char*) const { return this->do_open(__s, __loc); } @@ -60,31 +60,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _S_destroy_c_locale(_M_c_locale_messages); } template - typename messages<_CharT>::catalog + typename messages<_CharT>::catalog messages<_CharT>::do_open(const basic_string&, const locale&) const { return 0; } template - typename messages<_CharT>::string_type - messages<_CharT>::do_get(catalog, int, int, + typename messages<_CharT>::string_type + messages<_CharT>::do_get(catalog, int, int, const string_type& __dfault) const { return __dfault; } template - void - messages<_CharT>::do_close(catalog) const + void + messages<_CharT>::do_close(catalog) const { } // messages_byname template messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) - : messages<_CharT>(__refs) - { + : messages<_CharT>(__refs) + { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_messages); - this->_S_create_c_locale(this->_M_c_locale_messages, __s); + this->_S_create_c_locale(this->_M_c_locale_messages, __s); } } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/opt_random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/opt_random.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/opt_random.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/opt_random.h index 3bf220397..5e2b7b103 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/opt_random.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/opt_random.h @@ -1,6 +1,6 @@ // Optimizations for random number handling, generic version -*- C++ -*- -// Copyright (C) 2012-2015 Free Software Foundation, Inc. +// Copyright (C) 2012-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/os_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/os_defines.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/os_defines.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/os_defines.h index 72ab3c969..a54dd98f9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/os_defines.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/os_defines.h @@ -1,6 +1,6 @@ // Specific definitions for newlib -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -53,6 +53,9 @@ // their dtors are called #define _GLIBCXX_THREAD_ATEXIT_WIN32 1 +// See libstdc++/69506 +#define _GLIBCXX_USE_WEAK_REF 0 + #endif #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/stdc++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/stdc++.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/stdc++.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/stdc++.h index 8449ec098..262743a3c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/stdc++.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/stdc++.h @@ -1,6 +1,6 @@ // C++ includes used for precompiling -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #endif @@ -98,6 +99,7 @@ #include #include #include +#include #include #include #include @@ -115,3 +117,7 @@ #include #include #endif + +#if __cplusplus >= 201402L +#include +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/stdtr1c++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/stdtr1c++.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/stdtr1c++.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/stdtr1c++.h index 542059cad..9e6a5c230 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/stdtr1c++.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/stdtr1c++.h @@ -1,6 +1,6 @@ // C++ includes used for precompiling TR1 -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/time_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/time_members.h similarity index 89% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/time_members.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/time_members.h index 1f6f02d03..c77c4685b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/time_members.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/bits/time_members.h @@ -1,6 +1,6 @@ // std::time_get, std::time_put implementation, generic version -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,24 +39,24 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION template - __timepunct<_CharT>::__timepunct(size_t __refs) + __timepunct<_CharT>::__timepunct(size_t __refs) : facet(__refs), _M_data(0) - { + { _M_name_timepunct = _S_get_c_name(); - _M_initialize_timepunct(); + _M_initialize_timepunct(); } template - __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) : facet(__refs), _M_data(__cache) - { + { _M_name_timepunct = _S_get_c_name(); - _M_initialize_timepunct(); + _M_initialize_timepunct(); } template - __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, - size_t __refs) + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, + size_t __refs) : facet(__refs), _M_data(0) { if (__builtin_strcmp(__s, _S_get_c_name()) != 0) @@ -81,11 +81,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template __timepunct<_CharT>::~__timepunct() - { + { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; delete _M_data; - _S_destroy_c_locale(_M_c_locale_timepunct); + _S_destroy_c_locale(_M_c_locale_timepunct); } _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/ext/opt_random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/ext/opt_random.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/ext/opt_random.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/ext/opt_random.h index f23a1e1ba..2150f5826 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/ext/opt_random.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/be/ext/opt_random.h @@ -1,6 +1,6 @@ // Optimizations for random number extensions, generic version -*- C++ -*- -// Copyright (C) 2012-2015 Free Software Foundation, Inc. +// Copyright (C) 2012-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/atomic_word.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/atomic_word.h new file mode 100644 index 000000000..6d2110513 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/atomic_word.h @@ -0,0 +1,40 @@ +// Low-level type for atomic operations -*- C++ -*- + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file atomic_word.h + * This file is a GNU extension to the Standard C++ Library. + */ + +#ifndef _GLIBCXX_ATOMIC_WORD_H +#define _GLIBCXX_ATOMIC_WORD_H 1 + +typedef int _Atomic_word; + + +// This is a memory order acquire fence. +#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE) +// This is a memory order release fence. +#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE) + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/basic_file.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/basic_file.h similarity index 92% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/basic_file.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/basic_file.h index bdd15c149..f959ea534 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/basic_file.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/basic_file.h @@ -1,6 +1,6 @@ // Wrapper of C-language FILE struct -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -47,7 +47,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Generic declaration. template - class __basic_file; + class __basic_file; // Specialization. template<> @@ -81,7 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #endif - __basic_file* + __basic_file* open(const char* __name, ios_base::openmode __mode, int __prot = 0664); __basic_file* @@ -90,13 +90,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __basic_file* sys_open(int __fd, ios_base::openmode __mode) throw (); - __basic_file* - close(); + __basic_file* + close(); - _GLIBCXX_PURE bool + _GLIBCXX_PURE bool is_open() const throw (); - _GLIBCXX_PURE int + _GLIBCXX_PURE int fd() throw (); _GLIBCXX_PURE __c_file* @@ -104,20 +104,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ~__basic_file(); - streamsize + streamsize xsputn(const char* __s, streamsize __n); - streamsize + streamsize xsputn_2(const char* __s1, streamsize __n1, const char* __s2, streamsize __n2); - streamsize + streamsize xsgetn(char* __s, streamsize __n); streamoff seekoff(streamoff __off, ios_base::seekdir __way) throw (); - int + int sync(); streamsize @@ -127,4 +127,4 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#endif +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++allocator.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++allocator.h index 4dcd1d4e7..3d2bb6788 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++allocator.h @@ -1,6 +1,6 @@ // Base to std::allocator -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++config.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++config.h similarity index 84% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++config.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++config.h index 00c2f020d..050d87ac0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/c++config.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++config.h @@ -1,6 +1,6 @@ // Predefined symbols and macros -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -30,8 +30,11 @@ #ifndef _GLIBCXX_CXX_CONFIG_H #define _GLIBCXX_CXX_CONFIG_H 1 -// The current version of the C++ library in compressed ISO date format. -#define __GLIBCXX__ 20151204 +// The major release number for the GCC release the C++ library belongs to. +#define _GLIBCXX_RELEASE 7 + +// The datestamp of the C++ library in compressed ISO date format. +#define __GLIBCXX__ 20170502 // Macros for various attributes. // _GLIBCXX_PURE @@ -111,14 +114,32 @@ # endif #endif +#ifndef _GLIBCXX17_CONSTEXPR +# if __cplusplus > 201402L +# define _GLIBCXX17_CONSTEXPR constexpr +# else +# define _GLIBCXX17_CONSTEXPR +# endif +#endif + +#ifndef _GLIBCXX17_INLINE +# if __cplusplus > 201402L +# define _GLIBCXX17_INLINE inline +# else +# define _GLIBCXX17_INLINE +# endif +#endif + // Macro for noexcept, to support in mixed 03/0x mode. #ifndef _GLIBCXX_NOEXCEPT # if __cplusplus >= 201103L # define _GLIBCXX_NOEXCEPT noexcept +# define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND) # define _GLIBCXX_USE_NOEXCEPT noexcept # define _GLIBCXX_THROW(_EXC) # else # define _GLIBCXX_NOEXCEPT +# define _GLIBCXX_NOEXCEPT_IF(_COND) # define _GLIBCXX_USE_NOEXCEPT throw() # define _GLIBCXX_THROW(_EXC) throw(_EXC) # endif @@ -136,7 +157,15 @@ # endif #endif -// Macro for extern template, ie controling template linkage via use +#if __cpp_noexcept_function_type +#define _GLIBCXX_NOEXCEPT_PARM , bool _NE +#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE) +#else +#define _GLIBCXX_NOEXCEPT_PARM +#define _GLIBCXX_NOEXCEPT_QUAL +#endif + +// Macro for extern template, ie controlling template linkage via use // of extern keyword on template declaration. As documented in the g++ // manual, it inhibits all implicit instantiations and is used // throughout the library to avoid multiple weak definitions for @@ -158,7 +187,9 @@ namespace __profile { } namespace __cxx1998 { } - namespace __detail { } + namespace __detail { + namespace __variant { } // C++17 + } namespace rel_ops { } @@ -173,12 +204,16 @@ namespace decimal { } - namespace chrono { } - namespace placeholders { } - namespace regex_constants { } - namespace this_thread { } - - namespace experimental { } + namespace chrono { } // C++11 + namespace placeholders { } // C++11 + namespace regex_constants { } // C++11 + namespace this_thread { } // C++11 + inline namespace literals { // C++14 + inline namespace chrono_literals { } // C++14 + inline namespace complex_literals { } // C++14 + inline namespace string_literals { } // C++14 + inline namespace string_view_literals { } // C++17 + } } namespace abi { } @@ -258,14 +293,30 @@ namespace std namespace decimal { inline namespace __7 { } } +#if __cplusplus >= 201103L namespace chrono { inline namespace __7 { } } namespace placeholders { inline namespace __7 { } } namespace regex_constants { inline namespace __7 { } } namespace this_thread { inline namespace __7 { } } - namespace experimental { inline namespace __7 { } } +#if __cplusplus >= 201402L + inline namespace literals { + inline namespace chrono_literals { inline namespace __7 { } } + inline namespace complex_literals { inline namespace __7 { } } + inline namespace string_literals { inline namespace __7 { } } +#if __cplusplus > 201402L + inline namespace string_view_literals { inline namespace __7 { } } +#endif // C++17 + } +#endif // C++14 +#endif // C++11 - namespace __detail { inline namespace __7 { } } + namespace __detail { + inline namespace __7 { } +#if __cplusplus > 201402L + namespace __variant { inline namespace __7 { } } +#endif + } } namespace __gnu_cxx @@ -294,7 +345,7 @@ namespace std # endif # if _GLIBCXX_USE_CXX11_ABI - inline namespace __cxx11 __attribute__((__abi_tag__)) { } + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } # endif } @@ -348,8 +399,10 @@ namespace std namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_CONTAINER \ _GLIBCXX_END_NAMESPACE_VERSION } -# undef _GLIBCXX_EXTERN_TEMPLATE -# define _GLIBCXX_EXTERN_TEMPLATE -1 +#else +# define _GLIBCXX_STD_C std +# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION #endif #ifdef _GLIBCXX_PARALLEL @@ -358,30 +411,10 @@ namespace std namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_ALGO \ _GLIBCXX_END_NAMESPACE_VERSION } -#endif - -#ifndef _GLIBCXX_STD_A +#else # define _GLIBCXX_STD_A std -#endif - -#ifndef _GLIBCXX_STD_C -# define _GLIBCXX_STD_C std -#endif - -#ifndef _GLIBCXX_BEGIN_NAMESPACE_ALGO -# define _GLIBCXX_BEGIN_NAMESPACE_ALGO -#endif - -#ifndef _GLIBCXX_END_NAMESPACE_ALGO -# define _GLIBCXX_END_NAMESPACE_ALGO -#endif - -#ifndef _GLIBCXX_BEGIN_NAMESPACE_CONTAINER -# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER -#endif - -#ifndef _GLIBCXX_END_NAMESPACE_CONTAINER -# define _GLIBCXX_END_NAMESPACE_CONTAINER +# define _GLIBCXX_BEGIN_NAMESPACE_ALGO _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_ALGO _GLIBCXX_END_NAMESPACE_VERSION #endif // GLIBCXX_ABI Deprecated @@ -412,10 +445,20 @@ namespace std # define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL #endif +// Debug Mode implies checking assertions. +#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS) +# define _GLIBCXX_ASSERTIONS 1 +#endif + +// Disable std::string explicit instantiation declarations in order to assert. +#ifdef _GLIBCXX_ASSERTIONS +# undef _GLIBCXX_EXTERN_TEMPLATE +# define _GLIBCXX_EXTERN_TEMPLATE -1 +#endif + // Assert. -#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL) -# define __glibcxx_assert(_Condition) -#else +#if defined(_GLIBCXX_ASSERTIONS) \ + || defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS) namespace std { // Avoid the use of assert, because we're trying to keep the @@ -429,7 +472,7 @@ namespace std __builtin_abort(); } } -#define __glibcxx_assert(_Condition) \ +#define __glibcxx_assert_impl(_Condition) \ do \ { \ if (! (_Condition)) \ @@ -438,6 +481,12 @@ namespace std } while (false) #endif +#if defined(_GLIBCXX_ASSERTIONS) +# define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition) +#else +# define __glibcxx_assert(_Condition) +#endif + // Macros for race detectors. // _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and // _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain @@ -470,6 +519,8 @@ namespace std # define _GLIBCXX_BEGIN_EXTERN_C extern "C" { # define _GLIBCXX_END_EXTERN_C } +# define _GLIBCXX_USE_ALLOCATOR_NEW 1 + #else // !__cplusplus # define _GLIBCXX_BEGIN_EXTERN_C # define _GLIBCXX_END_EXTERN_C @@ -497,6 +548,35 @@ namespace std # define _GLIBCXX_WEAK_DEFINITION #endif +// By default, we assume that __GXX_WEAK__ also means that there is support +// for declaring functions as weak while not defining such functions. This +// allows for referring to functions provided by other libraries (e.g., +// libitm) without depending on them if the respective features are not used. +#ifndef _GLIBCXX_USE_WEAK_REF +# define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__ +#endif + +// Conditionally enable annotations for the Transactional Memory TS on C++11. +// Most of the following conditions are due to limitations in the current +// implementation. +#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \ + && _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201505L \ + && !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF \ + && _GLIBCXX_USE_ALLOCATOR_NEW +#define _GLIBCXX_TXN_SAFE transaction_safe +#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic +#else +#define _GLIBCXX_TXN_SAFE +#define _GLIBCXX_TXN_SAFE_DYN +#endif + +#if __cplusplus > 201402L +// In C++17 mathematical special functions are in namespace std. +# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 +#elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0 +// For C++11 and C++14 they are in namespace std when requested. +# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 +#endif // The remainder of the prewritten config is automatic; all the // user hooks are listed above. @@ -518,6 +598,42 @@ namespace std #undef min #undef max +// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally +// so they should be tested with #if not with #ifdef. +#if __cplusplus >= 201103L +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR +# endif +#else +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR +# endif +#endif + // End of prewritten config; the settings discovered at configure time follow. /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -528,6 +644,9 @@ namespace std /* Define to 1 if you have the `acosl' function. */ /* #undef _GLIBCXX_HAVE_ACOSL */ +/* Define to 1 if you have the `aligned_alloc' function. */ +/* #undef _GLIBCXX_HAVE_ALIGNED_ALLOC */ + /* Define to 1 if you have the `asinf' function. */ #define _GLIBCXX_HAVE_ASINF 1 @@ -642,6 +761,9 @@ namespace std /* Define if EWOULDBLOCK exists. */ #define _GLIBCXX_HAVE_EWOULDBLOCK 1 +/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */ +/* #undef _GLIBCXX_HAVE_EXCEPTION_PTR_SINCE_GCC46 */ + /* Define to 1 if you have the header file. */ /* #undef _GLIBCXX_HAVE_EXECINFO_H */ @@ -702,7 +824,7 @@ namespace std /* Define if _Unwind_GetIPInfo is available. */ #define _GLIBCXX_HAVE_GETIPINFO 1 -/* Define if gets is available in . */ +/* Define if gets is available in before C++14. */ #define _GLIBCXX_HAVE_GETS 1 /* Define to 1 if you have the `hypot' function. */ @@ -766,19 +888,19 @@ namespace std /* #undef _GLIBCXX_HAVE_LIBINTL_H */ /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_AS */ +#define _GLIBCXX_HAVE_LIMIT_AS 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_DATA */ +#define _GLIBCXX_HAVE_LIMIT_DATA 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */ +#define _GLIBCXX_HAVE_LIMIT_FSIZE 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_RSS */ +#define _GLIBCXX_HAVE_LIMIT_RSS 0 /* Only used in build directory testsuite_hooks.h. */ -/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */ +#define _GLIBCXX_HAVE_LIMIT_VMEM 0 /* Define if futex syscall is available. */ /* #undef _GLIBCXX_HAVE_LINUX_FUTEX */ @@ -807,8 +929,11 @@ namespace std /* Define if mbstate_t exists in wchar.h. */ #define _GLIBCXX_HAVE_MBSTATE_T 1 +/* Define to 1 if you have the `memalign' function. */ +#define _GLIBCXX_HAVE_MEMALIGN 1 + /* Define to 1 if you have the header file. */ -/* #undef _GLIBCXX_HAVE_MEMORY_H */ +#define _GLIBCXX_HAVE_MEMORY_H 1 /* Define to 1 if you have the `modf' function. */ /* #undef _GLIBCXX_HAVE_MODF */ @@ -822,9 +947,18 @@ namespace std /* Define to 1 if you have the header file. */ /* #undef _GLIBCXX_HAVE_NAN_H */ +/* Define if defines obsolete isinf function. */ +/* #undef _GLIBCXX_HAVE_OBSOLETE_ISINF */ + +/* Define if defines obsolete isnan function. */ +/* #undef _GLIBCXX_HAVE_OBSOLETE_ISNAN */ + /* Define if poll is available in . */ /* #undef _GLIBCXX_HAVE_POLL */ +/* Define to 1 if you have the `posix_memalign' function. */ +/* #undef _GLIBCXX_HAVE_POSIX_MEMALIGN */ + /* Define to 1 if you have the `powf' function. */ #define _GLIBCXX_HAVE_POWF 1 @@ -958,7 +1092,7 @@ namespace std /* Define if S_IFREG is available in . */ /* #undef _GLIBCXX_HAVE_S_IFREG */ -/* Define if S_IFREG is available in . */ +/* Define if S_ISREG is available in . */ #define _GLIBCXX_HAVE_S_ISREG 1 /* Define to 1 if you have the `tanf' function. */ @@ -979,6 +1113,9 @@ namespace std /* Define to 1 if the target supports thread-local storage. */ /* #undef _GLIBCXX_HAVE_TLS */ +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_UCHAR_H */ + /* Define to 1 if you have the header file. */ #define _GLIBCXX_HAVE_UNISTD_H 1 @@ -1018,6 +1155,9 @@ namespace std /* Define to 1 if you have the `_acosl' function. */ /* #undef _GLIBCXX_HAVE__ACOSL */ +/* Define to 1 if you have the `_aligned_malloc' function. */ +/* #undef _GLIBCXX_HAVE__ALIGNED_MALLOC */ + /* Define to 1 if you have the `_asinf' function. */ /* #undef _GLIBCXX_HAVE__ASINF */ @@ -1198,6 +1338,9 @@ namespace std /* Define to 1 if you have the `_tanl' function. */ /* #undef _GLIBCXX_HAVE__TANL */ +/* Define to 1 if you have the `__cxa_thread_atexit' function. */ +/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT */ + /* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */ /* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ @@ -1250,6 +1393,48 @@ namespace std /* Version number of package */ /* #undef _GLIBCXX_VERSION */ +/* Define if C99 functions in should be used in for + C++11. Using compiler builtins for these functions requires corresponding + C99 library functions to be present. */ +/* #undef _GLIBCXX11_USE_C99_COMPLEX */ + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_STDIO 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_STDLIB 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_WCHAR 1 + +/* Define if C99 functions in should be used in for + C++98. Using compiler builtins for these functions requires corresponding + C99 library functions to be present. */ +/* #undef _GLIBCXX98_USE_C99_COMPLEX */ + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_STDIO 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_STDLIB 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_WCHAR 1 + /* Define if the compiler supports C++11 atomics. */ /* #undef _GLIBCXX_ATOMIC_BUILTINS */ @@ -1268,6 +1453,12 @@ namespace std /* Define if compatibility should be provided for -mlong-double-64. */ +/* Define to the letter to which size_t is mangled. */ +#define _GLIBCXX_MANGLE_SIZE_T j + +/* Define if C99 llrint and llround functions are missing from . */ +/* #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS */ + /* Define if ptrdiff_t is int. */ #define _GLIBCXX_PTRDIFF_T_IS_INT 1 @@ -1277,9 +1468,6 @@ namespace std /* Define if size_t is unsigned int. */ #define _GLIBCXX_SIZE_T_IS_UINT 1 -/* Define if the compiler is configured for setjmp/longjmp exceptions. */ -/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */ - /* Define to the value of the EOF integer constant. */ #define _GLIBCXX_STDIO_EOF -1 @@ -1304,15 +1492,14 @@ namespace std /* Define to use Sun versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_SUN */ +/* Define if C11 functions in should be imported into namespace std + in . */ +/* #undef _GLIBCXX_USE_C11_UCHAR_CXX11 */ + /* Define if C99 functions or macros from , , , , and can be used or exposed. */ /* #undef _GLIBCXX_USE_C99 */ -/* Define if C99 functions in should be used in . Using - compiler builtins for these functions requires corresponding C99 library - functions to be present. */ -/* #undef _GLIBCXX_USE_C99_COMPLEX */ - /* Define if C99 functions in should be used in . Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ @@ -1334,10 +1521,6 @@ namespace std in namespace std::tr1. */ #define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 -/* Define if C99 functions or macros in should be imported in - in namespace std. */ -#define _GLIBCXX_USE_C99_MATH 1 - /* Define if C99 functions or macros in should be imported in in namespace std::tr1. */ #define _GLIBCXX_USE_C99_MATH_TR1 1 @@ -1412,7 +1595,7 @@ namespace std /* Define if _SC_NPROC_ONLN is available in . */ /* #undef _GLIBCXX_USE_SC_NPROC_ONLN */ -/* Define if sendfile is available in . */ +/* Define if sendfile is available in . */ /* #undef _GLIBCXX_USE_SENDFILE */ /* Define if struct stat has timespec members. */ @@ -1440,9 +1623,14 @@ namespace std /* Define to 1 if mutex_timedlock is available. */ #define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 -/* Define if all C++11 overloads are available in . */ +/* Define if all C++11 floating point overloads are available in . */ #if __cplusplus >= 201103L -/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO */ +/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP */ +#endif + +/* Define if all C++11 integral type overloads are available in . */ +#if __cplusplus >= 201103L +/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT */ #endif #if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++io.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++io.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++io.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++io.h index 8a4b4535d..124e71505 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++io.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++io.h @@ -1,6 +1,6 @@ // Underlying io library details -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++locale.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++locale.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++locale.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++locale.h index ee3ef8698..ce9fbb80d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/c++locale.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/c++locale.h @@ -1,6 +1,6 @@ // Wrapper for underlying C-language localization -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -53,7 +53,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // fall back to the unsafe vsprintf which, in general, can be dangerous // and should be avoided. inline int - __convert_from_v(const __c_locale&, char* __out, + __convert_from_v(const __c_locale&, char* __out, const int __size __attribute__((__unused__)), const char* __fmt, ...) { @@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __builtin_va_list __args; __builtin_va_start(__args, __fmt); -#ifdef _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); #else const int __ret = __builtin_vsprintf(__out, __fmt, __args); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/cpu_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/cpu_defines.h similarity index 84% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/cpu_defines.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/cpu_defines.h index ce87dd34c..121ece2f9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/cpu_defines.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/cpu_defines.h @@ -1,6 +1,6 @@ // Specific definitions for generic platforms -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2015-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -30,4 +30,11 @@ #ifndef _GLIBCXX_CPU_DEFINES #define _GLIBCXX_CPU_DEFINES 1 +// Integer divide instructions don't trap on ARM. +#ifdef __ARM_ARCH_EXT_IDIV__ +#define __glibcxx_integral_traps false +#else +#define __glibcxx_integral_traps true +#endif + #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/ctype_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/ctype_base.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/ctype_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/ctype_base.h index c236afd74..6a8cce7bc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/ctype_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/ctype_base.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -25,7 +25,7 @@ // // ISO C++ 14882: 22.1 Locales // - + // Information as gleaned from /usr/include/ctype.h namespace std _GLIBCXX_VISIBILITY(default) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/ctype_inline.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/ctype_inline.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/ctype_inline.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/ctype_inline.h index 5952d912b..cbb33392d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/ctype_inline.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/ctype_inline.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/cxxabi_tweaks.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/cxxabi_tweaks.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/cxxabi_tweaks.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/cxxabi_tweaks.h index 05fa83db1..6f37a4fdf 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/cxxabi_tweaks.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/cxxabi_tweaks.h @@ -1,6 +1,6 @@ // Control various target specific ABI tweaks. ARM version. -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -33,7 +33,7 @@ #ifdef __cplusplus namespace __cxxabiv1 { - extern "C" + extern "C" { #endif @@ -49,7 +49,7 @@ namespace __cxxabiv1 // We also want the element size in array cookies. #define _GLIBCXX_ELTSIZE_IN_COOKIE 1 - + // __cxa_vec_ctor should return a pointer to the array. typedef void * __cxa_vec_ctor_return_type; #define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x @@ -79,4 +79,4 @@ namespace __cxxabiv1 } // namespace __cxxabiv1 #endif -#endif +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/error_constants.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/error_constants.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/error_constants.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/error_constants.h index 74492cf61..3f5c92e7c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/error_constants.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/error_constants.h @@ -1,6 +1,6 @@ // Specific definitions for generic platforms -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -93,10 +93,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION no_lock_available = ENOLCK, #ifdef _GLIBCXX_HAVE_ENODATA - no_message_available = ENODATA, + no_message_available = ENODATA, #endif - no_message = ENOMSG, + no_message = ENOMSG, no_protocol_option = ENOPROTOOPT, no_space_on_device = ENOSPC, diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/extc++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/extc++.h similarity index 87% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/extc++.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/extc++.h index de3775b36..68c1681a3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/extc++.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/extc++.h @@ -1,6 +1,6 @@ // C++ includes used for precompiling extensions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -28,13 +28,22 @@ #if __cplusplus < 201103L #include +#else +#include #endif #include +#if __cplusplus >= 201103L +# include +#endif +#include #include #include #include #include +#if __cplusplus >= 201103L +# include +#endif #include #include #include @@ -45,9 +54,13 @@ #include #include #include +#include #include #include #include +#if __cplusplus >= 201103L +# include +#endif #include #include #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr-default.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr-default.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr-default.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr-default.h index 596153700..165711401 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr-default.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr-default.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t; #define __GTHREAD_ONCE_INIT 0 #define __GTHREAD_MUTEX_INIT 0 -#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) #define __GTHREAD_RECURSIVE_MUTEX_INIT 0 #define _GLIBCXX_UNUSED __attribute__((__unused__)) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr-posix.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr-posix.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr-posix.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr-posix.h index 839915a9f..2f844b247 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/gthr-posix.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr-posix.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr-single.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr-single.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr-single.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr-single.h index 596153700..165711401 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr-single.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr-single.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t; #define __GTHREAD_ONCE_INIT 0 #define __GTHREAD_MUTEX_INIT 0 -#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) #define __GTHREAD_RECURSIVE_MUTEX_INIT 0 #define _GLIBCXX_UNUSED __attribute__((__unused__)) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr.h index 0732e0436..5889966e6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/gthr.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/gthr.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/messages_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/messages_members.h similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/messages_members.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/messages_members.h index c2fa47199..7baec1c5a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/messages_members.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/messages_members.h @@ -1,6 +1,6 @@ // std::messages implementation details, generic version -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -44,13 +44,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _M_c_locale_messages = _S_get_c_locale(); } template - messages<_CharT>::messages(__c_locale, const char*, size_t __refs) + messages<_CharT>::messages(__c_locale, const char*, size_t __refs) : facet(__refs) { _M_c_locale_messages = _S_get_c_locale(); } template - typename messages<_CharT>::catalog - messages<_CharT>::open(const basic_string& __s, const locale& __loc, + typename messages<_CharT>::catalog + messages<_CharT>::open(const basic_string& __s, const locale& __loc, const char*) const { return this->do_open(__s, __loc); } @@ -60,31 +60,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _S_destroy_c_locale(_M_c_locale_messages); } template - typename messages<_CharT>::catalog + typename messages<_CharT>::catalog messages<_CharT>::do_open(const basic_string&, const locale&) const { return 0; } template - typename messages<_CharT>::string_type - messages<_CharT>::do_get(catalog, int, int, + typename messages<_CharT>::string_type + messages<_CharT>::do_get(catalog, int, int, const string_type& __dfault) const { return __dfault; } template - void - messages<_CharT>::do_close(catalog) const + void + messages<_CharT>::do_close(catalog) const { } // messages_byname template messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) - : messages<_CharT>(__refs) - { + : messages<_CharT>(__refs) + { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_messages); - this->_S_create_c_locale(this->_M_c_locale_messages, __s); + this->_S_create_c_locale(this->_M_c_locale_messages, __s); } } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/opt_random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/opt_random.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/opt_random.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/opt_random.h index 3bf220397..5e2b7b103 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/opt_random.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/opt_random.h @@ -1,6 +1,6 @@ // Optimizations for random number handling, generic version -*- C++ -*- -// Copyright (C) 2012-2015 Free Software Foundation, Inc. +// Copyright (C) 2012-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/os_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/os_defines.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/os_defines.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/os_defines.h index 72ab3c969..a54dd98f9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/os_defines.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/os_defines.h @@ -1,6 +1,6 @@ // Specific definitions for newlib -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -53,6 +53,9 @@ // their dtors are called #define _GLIBCXX_THREAD_ATEXIT_WIN32 1 +// See libstdc++/69506 +#define _GLIBCXX_USE_WEAK_REF 0 + #endif #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/stdc++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/stdc++.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/stdc++.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/stdc++.h index 8449ec098..262743a3c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/thumb/bits/stdc++.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/stdc++.h @@ -1,6 +1,6 @@ // C++ includes used for precompiling -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #endif @@ -98,6 +99,7 @@ #include #include #include +#include #include #include #include @@ -115,3 +117,7 @@ #include #include #endif + +#if __cplusplus >= 201402L +#include +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/stdtr1c++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/stdtr1c++.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/stdtr1c++.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/stdtr1c++.h index 542059cad..9e6a5c230 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/bits/stdtr1c++.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/stdtr1c++.h @@ -1,6 +1,6 @@ // C++ includes used for precompiling TR1 -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/time_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/time_members.h similarity index 89% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/time_members.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/time_members.h index 1f6f02d03..c77c4685b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/bits/time_members.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/bits/time_members.h @@ -1,6 +1,6 @@ // std::time_get, std::time_put implementation, generic version -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,24 +39,24 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION template - __timepunct<_CharT>::__timepunct(size_t __refs) + __timepunct<_CharT>::__timepunct(size_t __refs) : facet(__refs), _M_data(0) - { + { _M_name_timepunct = _S_get_c_name(); - _M_initialize_timepunct(); + _M_initialize_timepunct(); } template - __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) : facet(__refs), _M_data(__cache) - { + { _M_name_timepunct = _S_get_c_name(); - _M_initialize_timepunct(); + _M_initialize_timepunct(); } template - __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, - size_t __refs) + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, + size_t __refs) : facet(__refs), _M_data(0) { if (__builtin_strcmp(__s, _S_get_c_name()) != 0) @@ -81,11 +81,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template __timepunct<_CharT>::~__timepunct() - { + { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; delete _M_data; - _S_destroy_c_locale(_M_c_locale_timepunct); + _S_destroy_c_locale(_M_c_locale_timepunct); } _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/ext/opt_random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/ext/opt_random.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/ext/opt_random.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/ext/opt_random.h index f23a1e1ba..2150f5826 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/arm-none-eabi/armv6k/fpu/ext/opt_random.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/ext/opt_random.h @@ -1,6 +1,6 @@ // Optimizations for random number extensions, generic version -*- C++ -*- -// Copyright (C) 2012-2015 Free Software Foundation, Inc. +// Copyright (C) 2012-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/atomic_word.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/atomic_word.h new file mode 100644 index 000000000..6d2110513 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/atomic_word.h @@ -0,0 +1,40 @@ +// Low-level type for atomic operations -*- C++ -*- + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file atomic_word.h + * This file is a GNU extension to the Standard C++ Library. + */ + +#ifndef _GLIBCXX_ATOMIC_WORD_H +#define _GLIBCXX_ATOMIC_WORD_H 1 + +typedef int _Atomic_word; + + +// This is a memory order acquire fence. +#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE) +// This is a memory order release fence. +#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE) + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/basic_file.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/basic_file.h new file mode 100644 index 000000000..f959ea534 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/basic_file.h @@ -0,0 +1,130 @@ +// Wrapper of C-language FILE struct -*- C++ -*- + +// Copyright (C) 2000-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// +// ISO C++ 14882: 27.8 File-based streams +// + +/** @file bits/basic_file.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{ios} + */ + +#ifndef _GLIBCXX_BASIC_FILE_STDIO_H +#define _GLIBCXX_BASIC_FILE_STDIO_H 1 + +#pragma GCC system_header + +#include +#include // for __c_lock and __c_file +#include // for swap +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // Generic declaration. + template + class __basic_file; + + // Specialization. + template<> + class __basic_file + { + // Underlying data source/sink. + __c_file* _M_cfile; + + // True iff we opened _M_cfile, and thus must close it ourselves. + bool _M_cfile_created; + + public: + __basic_file(__c_lock* __lock = 0) throw (); + +#if __cplusplus >= 201103L + __basic_file(__basic_file&& __rv, __c_lock* __lock = 0) noexcept + : _M_cfile(__rv._M_cfile), _M_cfile_created(__rv._M_cfile_created) + { + __rv._M_cfile = nullptr; + __rv._M_cfile_created = false; + } + + __basic_file& operator=(const __basic_file&) = delete; + __basic_file& operator=(__basic_file&&) = delete; + + void + swap(__basic_file& __f) noexcept + { + std::swap(_M_cfile, __f._M_cfile); + std::swap(_M_cfile_created, __f._M_cfile_created); + } +#endif + + __basic_file* + open(const char* __name, ios_base::openmode __mode, int __prot = 0664); + + __basic_file* + sys_open(__c_file* __file, ios_base::openmode); + + __basic_file* + sys_open(int __fd, ios_base::openmode __mode) throw (); + + __basic_file* + close(); + + _GLIBCXX_PURE bool + is_open() const throw (); + + _GLIBCXX_PURE int + fd() throw (); + + _GLIBCXX_PURE __c_file* + file() throw (); + + ~__basic_file(); + + streamsize + xsputn(const char* __s, streamsize __n); + + streamsize + xsputn_2(const char* __s1, streamsize __n1, + const char* __s2, streamsize __n2); + + streamsize + xsgetn(char* __s, streamsize __n); + + streamoff + seekoff(streamoff __off, ios_base::seekdir __way) throw (); + + int + sync(); + + streamsize + showmanyc(); + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++allocator.h new file mode 100644 index 000000000..3d2bb6788 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++allocator.h @@ -0,0 +1,55 @@ +// Base to std::allocator -*- C++ -*- + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/c++allocator.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{memory} + */ + +#ifndef _GLIBCXX_CXX_ALLOCATOR_H +#define _GLIBCXX_CXX_ALLOCATOR_H 1 + +#include + +#if __cplusplus >= 201103L +namespace std +{ + /** + * @brief An alias to the base class for std::allocator. + * @ingroup allocators + * + * Used to set the std::allocator base class to + * __gnu_cxx::new_allocator. + * + * @tparam _Tp Type of allocated object. + */ + template + using __allocator_base = __gnu_cxx::new_allocator<_Tp>; +} +#else +// Define new_allocator as the base class to std::allocator. +# define __allocator_base __gnu_cxx::new_allocator +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++config.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++config.h new file mode 100644 index 000000000..050d87ac0 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++config.h @@ -0,0 +1,1956 @@ +// Predefined symbols and macros -*- C++ -*- + +// Copyright (C) 1997-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/c++config.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{iosfwd} + */ + +#ifndef _GLIBCXX_CXX_CONFIG_H +#define _GLIBCXX_CXX_CONFIG_H 1 + +// The major release number for the GCC release the C++ library belongs to. +#define _GLIBCXX_RELEASE 7 + +// The datestamp of the C++ library in compressed ISO date format. +#define __GLIBCXX__ 20170502 + +// Macros for various attributes. +// _GLIBCXX_PURE +// _GLIBCXX_CONST +// _GLIBCXX_NORETURN +// _GLIBCXX_NOTHROW +// _GLIBCXX_VISIBILITY +#ifndef _GLIBCXX_PURE +# define _GLIBCXX_PURE __attribute__ ((__pure__)) +#endif + +#ifndef _GLIBCXX_CONST +# define _GLIBCXX_CONST __attribute__ ((__const__)) +#endif + +#ifndef _GLIBCXX_NORETURN +# define _GLIBCXX_NORETURN __attribute__ ((__noreturn__)) +#endif + +// See below for C++ +#ifndef _GLIBCXX_NOTHROW +# ifndef __cplusplus +# define _GLIBCXX_NOTHROW __attribute__((__nothrow__)) +# endif +#endif + +// Macros for visibility attributes. +// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY +// _GLIBCXX_VISIBILITY +# define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1 + +#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY +# define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V))) +#else +// If this is not supplied by the OS-specific or CPU-specific +// headers included below, it will be defined to an empty default. +# define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V) +#endif + +// Macros for deprecated attributes. +// _GLIBCXX_USE_DEPRECATED +// _GLIBCXX_DEPRECATED +#ifndef _GLIBCXX_USE_DEPRECATED +# define _GLIBCXX_USE_DEPRECATED 1 +#endif + +#if defined(__DEPRECATED) && (__cplusplus >= 201103L) +# define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__)) +#else +# define _GLIBCXX_DEPRECATED +#endif + +// Macros for ABI tag attributes. +#ifndef _GLIBCXX_ABI_TAG_CXX11 +# define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ ("cxx11"))) +#endif + + +#if __cplusplus + +// Macro for constexpr, to support in mixed 03/0x mode. +#ifndef _GLIBCXX_CONSTEXPR +# if __cplusplus >= 201103L +# define _GLIBCXX_CONSTEXPR constexpr +# define _GLIBCXX_USE_CONSTEXPR constexpr +# else +# define _GLIBCXX_CONSTEXPR +# define _GLIBCXX_USE_CONSTEXPR const +# endif +#endif + +#ifndef _GLIBCXX14_CONSTEXPR +# if __cplusplus >= 201402L +# define _GLIBCXX14_CONSTEXPR constexpr +# else +# define _GLIBCXX14_CONSTEXPR +# endif +#endif + +#ifndef _GLIBCXX17_CONSTEXPR +# if __cplusplus > 201402L +# define _GLIBCXX17_CONSTEXPR constexpr +# else +# define _GLIBCXX17_CONSTEXPR +# endif +#endif + +#ifndef _GLIBCXX17_INLINE +# if __cplusplus > 201402L +# define _GLIBCXX17_INLINE inline +# else +# define _GLIBCXX17_INLINE +# endif +#endif + +// Macro for noexcept, to support in mixed 03/0x mode. +#ifndef _GLIBCXX_NOEXCEPT +# if __cplusplus >= 201103L +# define _GLIBCXX_NOEXCEPT noexcept +# define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND) +# define _GLIBCXX_USE_NOEXCEPT noexcept +# define _GLIBCXX_THROW(_EXC) +# else +# define _GLIBCXX_NOEXCEPT +# define _GLIBCXX_NOEXCEPT_IF(_COND) +# define _GLIBCXX_USE_NOEXCEPT throw() +# define _GLIBCXX_THROW(_EXC) throw(_EXC) +# endif +#endif + +#ifndef _GLIBCXX_NOTHROW +# define _GLIBCXX_NOTHROW _GLIBCXX_USE_NOEXCEPT +#endif + +#ifndef _GLIBCXX_THROW_OR_ABORT +# if __cpp_exceptions +# define _GLIBCXX_THROW_OR_ABORT(_EXC) (throw (_EXC)) +# else +# define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort()) +# endif +#endif + +#if __cpp_noexcept_function_type +#define _GLIBCXX_NOEXCEPT_PARM , bool _NE +#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE) +#else +#define _GLIBCXX_NOEXCEPT_PARM +#define _GLIBCXX_NOEXCEPT_QUAL +#endif + +// Macro for extern template, ie controlling template linkage via use +// of extern keyword on template declaration. As documented in the g++ +// manual, it inhibits all implicit instantiations and is used +// throughout the library to avoid multiple weak definitions for +// required types that are already explicitly instantiated in the +// library binary. This substantially reduces the binary size of +// resulting executables. +// Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern +// templates only in basic_string, thus activating its debug-mode +// checks even at -O0. +# define _GLIBCXX_EXTERN_TEMPLATE 1 + +/* + Outline of libstdc++ namespaces. + + namespace std + { + namespace __debug { } + namespace __parallel { } + namespace __profile { } + namespace __cxx1998 { } + + namespace __detail { + namespace __variant { } // C++17 + } + + namespace rel_ops { } + + namespace tr1 + { + namespace placeholders { } + namespace regex_constants { } + namespace __detail { } + } + + namespace tr2 { } + + namespace decimal { } + + namespace chrono { } // C++11 + namespace placeholders { } // C++11 + namespace regex_constants { } // C++11 + namespace this_thread { } // C++11 + inline namespace literals { // C++14 + inline namespace chrono_literals { } // C++14 + inline namespace complex_literals { } // C++14 + inline namespace string_literals { } // C++14 + inline namespace string_view_literals { } // C++17 + } + } + + namespace abi { } + + namespace __gnu_cxx + { + namespace __detail { } + } + + For full details see: + http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html +*/ +namespace std +{ + typedef __SIZE_TYPE__ size_t; + typedef __PTRDIFF_TYPE__ ptrdiff_t; + +#if __cplusplus >= 201103L + typedef decltype(nullptr) nullptr_t; +#endif +} + +# define _GLIBCXX_USE_DUAL_ABI 1 + +#if ! _GLIBCXX_USE_DUAL_ABI +// Ignore any pre-defined value of _GLIBCXX_USE_CXX11_ABI +# undef _GLIBCXX_USE_CXX11_ABI +#endif + +#ifndef _GLIBCXX_USE_CXX11_ABI +# define _GLIBCXX_USE_CXX11_ABI 1 +#endif + +#if _GLIBCXX_USE_CXX11_ABI +namespace std +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} +namespace __gnu_cxx +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} +# define _GLIBCXX_NAMESPACE_CXX11 __cxx11:: +# define _GLIBCXX_BEGIN_NAMESPACE_CXX11 namespace __cxx11 { +# define _GLIBCXX_END_NAMESPACE_CXX11 } +# define _GLIBCXX_DEFAULT_ABI_TAG _GLIBCXX_ABI_TAG_CXX11 +#else +# define _GLIBCXX_NAMESPACE_CXX11 +# define _GLIBCXX_BEGIN_NAMESPACE_CXX11 +# define _GLIBCXX_END_NAMESPACE_CXX11 +# define _GLIBCXX_DEFAULT_ABI_TAG +#endif + + +// Defined if inline namespaces are used for versioning. +# define _GLIBCXX_INLINE_VERSION 0 + +// Inline namespace for symbol versioning. +#if _GLIBCXX_INLINE_VERSION + +namespace std +{ + inline namespace __7 { } + + namespace rel_ops { inline namespace __7 { } } + + namespace tr1 + { + inline namespace __7 { } + namespace placeholders { inline namespace __7 { } } + namespace regex_constants { inline namespace __7 { } } + namespace __detail { inline namespace __7 { } } + } + + namespace tr2 + { inline namespace __7 { } } + + namespace decimal { inline namespace __7 { } } + +#if __cplusplus >= 201103L + namespace chrono { inline namespace __7 { } } + namespace placeholders { inline namespace __7 { } } + namespace regex_constants { inline namespace __7 { } } + namespace this_thread { inline namespace __7 { } } + +#if __cplusplus >= 201402L + inline namespace literals { + inline namespace chrono_literals { inline namespace __7 { } } + inline namespace complex_literals { inline namespace __7 { } } + inline namespace string_literals { inline namespace __7 { } } +#if __cplusplus > 201402L + inline namespace string_view_literals { inline namespace __7 { } } +#endif // C++17 + } +#endif // C++14 +#endif // C++11 + + namespace __detail { + inline namespace __7 { } +#if __cplusplus > 201402L + namespace __variant { inline namespace __7 { } } +#endif + } +} + +namespace __gnu_cxx +{ + inline namespace __7 { } + namespace __detail { inline namespace __7 { } } +} +# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __7 { +# define _GLIBCXX_END_NAMESPACE_VERSION } +#else +# define _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_VERSION +#endif + + +// Inline namespaces for special modes: debug, parallel, profile. +#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) \ + || defined(_GLIBCXX_PROFILE) +namespace std +{ + // Non-inline namespace for components replaced by alternates in active mode. + namespace __cxx1998 + { +# if _GLIBCXX_INLINE_VERSION + inline namespace __7 { } +# endif + +# if _GLIBCXX_USE_CXX11_ABI + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +# endif + } + + // Inline namespace for debug mode. +# ifdef _GLIBCXX_DEBUG + inline namespace __debug { } +# endif + + // Inline namespaces for parallel mode. +# ifdef _GLIBCXX_PARALLEL + inline namespace __parallel { } +# endif + + // Inline namespaces for profile mode +# ifdef _GLIBCXX_PROFILE + inline namespace __profile { } +# endif +} + +// Check for invalid usage and unsupported mixed-mode use. +# if defined(_GLIBCXX_DEBUG) && defined(_GLIBCXX_PARALLEL) +# error illegal use of multiple inlined namespaces +# endif +# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_DEBUG) +# error illegal use of multiple inlined namespaces +# endif +# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_PARALLEL) +# error illegal use of multiple inlined namespaces +# endif + +// Check for invalid use due to lack for weak symbols. +# if __NO_INLINE__ && !__GXX_WEAK__ +# warning currently using inlined namespace mode which may fail \ + without inlining due to lack of weak symbols +# endif +#endif + +// Macros for namespace scope. Either namespace std:: or the name +// of some nested namespace within it corresponding to the active mode. +// _GLIBCXX_STD_A +// _GLIBCXX_STD_C +// +// Macros for opening/closing conditional namespaces. +// _GLIBCXX_BEGIN_NAMESPACE_ALGO +// _GLIBCXX_END_NAMESPACE_ALGO +// _GLIBCXX_BEGIN_NAMESPACE_CONTAINER +// _GLIBCXX_END_NAMESPACE_CONTAINER +#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE) +# define _GLIBCXX_STD_C __cxx1998 +# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \ + namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_CONTAINER \ + _GLIBCXX_END_NAMESPACE_VERSION } +#else +# define _GLIBCXX_STD_C std +# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION +#endif + +#ifdef _GLIBCXX_PARALLEL +# define _GLIBCXX_STD_A __cxx1998 +# define _GLIBCXX_BEGIN_NAMESPACE_ALGO \ + namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_ALGO \ + _GLIBCXX_END_NAMESPACE_VERSION } +#else +# define _GLIBCXX_STD_A std +# define _GLIBCXX_BEGIN_NAMESPACE_ALGO _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_ALGO _GLIBCXX_END_NAMESPACE_VERSION +#endif + +// GLIBCXX_ABI Deprecated +// Define if compatibility should be provided for -mlong-double-64. +#undef _GLIBCXX_LONG_DOUBLE_COMPAT + +// Inline namespace for long double 128 mode. +#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ +namespace std +{ + inline namespace __gnu_cxx_ldbl128 { } +} +# define _GLIBCXX_NAMESPACE_LDBL __gnu_cxx_ldbl128:: +# define _GLIBCXX_BEGIN_NAMESPACE_LDBL namespace __gnu_cxx_ldbl128 { +# define _GLIBCXX_END_NAMESPACE_LDBL } +#else +# define _GLIBCXX_NAMESPACE_LDBL +# define _GLIBCXX_BEGIN_NAMESPACE_LDBL +# define _GLIBCXX_END_NAMESPACE_LDBL +#endif +#if _GLIBCXX_USE_CXX11_ABI +# define _GLIBCXX_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_NAMESPACE_CXX11 +# define _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_CXX11 +# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_CXX11 +#else +# define _GLIBCXX_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_NAMESPACE_LDBL +# define _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_LDBL +# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL +#endif + +// Debug Mode implies checking assertions. +#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS) +# define _GLIBCXX_ASSERTIONS 1 +#endif + +// Disable std::string explicit instantiation declarations in order to assert. +#ifdef _GLIBCXX_ASSERTIONS +# undef _GLIBCXX_EXTERN_TEMPLATE +# define _GLIBCXX_EXTERN_TEMPLATE -1 +#endif + +// Assert. +#if defined(_GLIBCXX_ASSERTIONS) \ + || defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS) +namespace std +{ + // Avoid the use of assert, because we're trying to keep the + // include out of the mix. + inline void + __replacement_assert(const char* __file, int __line, + const char* __function, const char* __condition) + { + __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line, + __function, __condition); + __builtin_abort(); + } +} +#define __glibcxx_assert_impl(_Condition) \ + do \ + { \ + if (! (_Condition)) \ + std::__replacement_assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, \ + #_Condition); \ + } while (false) +#endif + +#if defined(_GLIBCXX_ASSERTIONS) +# define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition) +#else +# define __glibcxx_assert(_Condition) +#endif + +// Macros for race detectors. +// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and +// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain +// atomic (lock-free) synchronization to race detectors: +// the race detector will infer a happens-before arc from the former to the +// latter when they share the same argument pointer. +// +// The most frequent use case for these macros (and the only case in the +// current implementation of the library) is atomic reference counting: +// void _M_remove_reference() +// { +// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount); +// if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) +// { +// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&this->_M_refcount); +// _M_destroy(__a); +// } +// } +// The annotations in this example tell the race detector that all memory +// accesses occurred when the refcount was positive do not race with +// memory accesses which occurred after the refcount became zero. +#ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE +# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) +#endif +#ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER +# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) +#endif + +// Macros for C linkage: define extern "C" linkage only when using C++. +# define _GLIBCXX_BEGIN_EXTERN_C extern "C" { +# define _GLIBCXX_END_EXTERN_C } + +# define _GLIBCXX_USE_ALLOCATOR_NEW 1 + +#else // !__cplusplus +# define _GLIBCXX_BEGIN_EXTERN_C +# define _GLIBCXX_END_EXTERN_C +#endif + + +// First includes. + +// Pick up any OS-specific definitions. +#include + +// Pick up any CPU-specific definitions. +#include + +// If platform uses neither visibility nor psuedo-visibility, +// specify empty default for namespace annotation macros. +#ifndef _GLIBCXX_PSEUDO_VISIBILITY +# define _GLIBCXX_PSEUDO_VISIBILITY(V) +#endif + +// Certain function definitions that are meant to be overridable from +// user code are decorated with this macro. For some targets, this +// macro causes these definitions to be weak. +#ifndef _GLIBCXX_WEAK_DEFINITION +# define _GLIBCXX_WEAK_DEFINITION +#endif + +// By default, we assume that __GXX_WEAK__ also means that there is support +// for declaring functions as weak while not defining such functions. This +// allows for referring to functions provided by other libraries (e.g., +// libitm) without depending on them if the respective features are not used. +#ifndef _GLIBCXX_USE_WEAK_REF +# define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__ +#endif + +// Conditionally enable annotations for the Transactional Memory TS on C++11. +// Most of the following conditions are due to limitations in the current +// implementation. +#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \ + && _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201505L \ + && !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF \ + && _GLIBCXX_USE_ALLOCATOR_NEW +#define _GLIBCXX_TXN_SAFE transaction_safe +#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic +#else +#define _GLIBCXX_TXN_SAFE +#define _GLIBCXX_TXN_SAFE_DYN +#endif + +#if __cplusplus > 201402L +// In C++17 mathematical special functions are in namespace std. +# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 +#elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0 +// For C++11 and C++14 they are in namespace std when requested. +# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 +#endif + +// The remainder of the prewritten config is automatic; all the +// user hooks are listed above. + +// Create a boolean flag to be used to determine if --fast-math is set. +#ifdef __FAST_MATH__ +# define _GLIBCXX_FAST_MATH 1 +#else +# define _GLIBCXX_FAST_MATH 0 +#endif + +// This marks string literals in header files to be extracted for eventual +// translation. It is primarily used for messages in thrown exceptions; see +// src/functexcept.cc. We use __N because the more traditional _N is used +// for something else under certain OSes (see BADNAMES). +#define __N(msgid) (msgid) + +// For example, is known to #define min and max as macros... +#undef min +#undef max + +// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally +// so they should be tested with #if not with #ifdef. +#if __cplusplus >= 201103L +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR +# endif +#else +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR +# endif +#endif + +// End of prewritten config; the settings discovered at configure time follow. +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the `acosf' function. */ +#define _GLIBCXX_HAVE_ACOSF 1 + +/* Define to 1 if you have the `acosl' function. */ +/* #undef _GLIBCXX_HAVE_ACOSL */ + +/* Define to 1 if you have the `aligned_alloc' function. */ +/* #undef _GLIBCXX_HAVE_ALIGNED_ALLOC */ + +/* Define to 1 if you have the `asinf' function. */ +#define _GLIBCXX_HAVE_ASINF 1 + +/* Define to 1 if you have the `asinl' function. */ +/* #undef _GLIBCXX_HAVE_ASINL */ + +/* Define to 1 if the target assembler supports .symver directive. */ +#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1 + +/* Define to 1 if you have the `atan2f' function. */ +#define _GLIBCXX_HAVE_ATAN2F 1 + +/* Define to 1 if you have the `atan2l' function. */ +/* #undef _GLIBCXX_HAVE_ATAN2L */ + +/* Define to 1 if you have the `atanf' function. */ +#define _GLIBCXX_HAVE_ATANF 1 + +/* Define to 1 if you have the `atanl' function. */ +/* #undef _GLIBCXX_HAVE_ATANL */ + +/* Define to 1 if you have the `at_quick_exit' function. */ +/* #undef _GLIBCXX_HAVE_AT_QUICK_EXIT */ + +/* Define to 1 if the target assembler supports thread-local storage. */ +/* #undef _GLIBCXX_HAVE_CC_TLS */ + +/* Define to 1 if you have the `ceilf' function. */ +#define _GLIBCXX_HAVE_CEILF 1 + +/* Define to 1 if you have the `ceill' function. */ +/* #undef _GLIBCXX_HAVE_CEILL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_COMPLEX_H 1 + +/* Define to 1 if you have the `cosf' function. */ +#define _GLIBCXX_HAVE_COSF 1 + +/* Define to 1 if you have the `coshf' function. */ +#define _GLIBCXX_HAVE_COSHF 1 + +/* Define to 1 if you have the `coshl' function. */ +/* #undef _GLIBCXX_HAVE_COSHL */ + +/* Define to 1 if you have the `cosl' function. */ +/* #undef _GLIBCXX_HAVE_COSL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_DLFCN_H */ + +/* Define if EBADMSG exists. */ +#define _GLIBCXX_HAVE_EBADMSG 1 + +/* Define if ECANCELED exists. */ +#define _GLIBCXX_HAVE_ECANCELED 1 + +/* Define if ECHILD exists. */ +#define _GLIBCXX_HAVE_ECHILD 1 + +/* Define if EIDRM exists. */ +#define _GLIBCXX_HAVE_EIDRM 1 + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_ENDIAN_H */ + +/* Define if ENODATA exists. */ +#define _GLIBCXX_HAVE_ENODATA 1 + +/* Define if ENOLINK exists. */ +#define _GLIBCXX_HAVE_ENOLINK 1 + +/* Define if ENOSPC exists. */ +#define _GLIBCXX_HAVE_ENOSPC 1 + +/* Define if ENOSR exists. */ +#define _GLIBCXX_HAVE_ENOSR 1 + +/* Define if ENOSTR exists. */ +#define _GLIBCXX_HAVE_ENOSTR 1 + +/* Define if ENOTRECOVERABLE exists. */ +#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1 + +/* Define if ENOTSUP exists. */ +#define _GLIBCXX_HAVE_ENOTSUP 1 + +/* Define if EOVERFLOW exists. */ +#define _GLIBCXX_HAVE_EOVERFLOW 1 + +/* Define if EOWNERDEAD exists. */ +#define _GLIBCXX_HAVE_EOWNERDEAD 1 + +/* Define if EPERM exists. */ +#define _GLIBCXX_HAVE_EPERM 1 + +/* Define if EPROTO exists. */ +#define _GLIBCXX_HAVE_EPROTO 1 + +/* Define if ETIME exists. */ +#define _GLIBCXX_HAVE_ETIME 1 + +/* Define if ETIMEDOUT exists. */ +#define _GLIBCXX_HAVE_ETIMEDOUT 1 + +/* Define if ETXTBSY exists. */ +#define _GLIBCXX_HAVE_ETXTBSY 1 + +/* Define if EWOULDBLOCK exists. */ +#define _GLIBCXX_HAVE_EWOULDBLOCK 1 + +/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */ +/* #undef _GLIBCXX_HAVE_EXCEPTION_PTR_SINCE_GCC46 */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_EXECINFO_H */ + +/* Define to 1 if you have the `expf' function. */ +#define _GLIBCXX_HAVE_EXPF 1 + +/* Define to 1 if you have the `expl' function. */ +/* #undef _GLIBCXX_HAVE_EXPL */ + +/* Define to 1 if you have the `fabsf' function. */ +#define _GLIBCXX_HAVE_FABSF 1 + +/* Define to 1 if you have the `fabsl' function. */ +/* #undef _GLIBCXX_HAVE_FABSL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_FCNTL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_FENV_H */ + +/* Define to 1 if you have the `finite' function. */ +/* #undef _GLIBCXX_HAVE_FINITE */ + +/* Define to 1 if you have the `finitef' function. */ +/* #undef _GLIBCXX_HAVE_FINITEF */ + +/* Define to 1 if you have the `finitel' function. */ +/* #undef _GLIBCXX_HAVE_FINITEL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_FLOAT_H 1 + +/* Define to 1 if you have the `floorf' function. */ +#define _GLIBCXX_HAVE_FLOORF 1 + +/* Define to 1 if you have the `floorl' function. */ +/* #undef _GLIBCXX_HAVE_FLOORL */ + +/* Define to 1 if you have the `fmodf' function. */ +#define _GLIBCXX_HAVE_FMODF 1 + +/* Define to 1 if you have the `fmodl' function. */ +/* #undef _GLIBCXX_HAVE_FMODL */ + +/* Define to 1 if you have the `fpclass' function. */ +/* #undef _GLIBCXX_HAVE_FPCLASS */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_FP_H */ + +/* Define to 1 if you have the `frexpf' function. */ +#define _GLIBCXX_HAVE_FREXPF 1 + +/* Define to 1 if you have the `frexpl' function. */ +/* #undef _GLIBCXX_HAVE_FREXPL */ + +/* Define if _Unwind_GetIPInfo is available. */ +#define _GLIBCXX_HAVE_GETIPINFO 1 + +/* Define if gets is available in before C++14. */ +#define _GLIBCXX_HAVE_GETS 1 + +/* Define to 1 if you have the `hypot' function. */ +#define _GLIBCXX_HAVE_HYPOT 1 + +/* Define to 1 if you have the `hypotf' function. */ +/* #undef _GLIBCXX_HAVE_HYPOTF */ + +/* Define to 1 if you have the `hypotl' function. */ +/* #undef _GLIBCXX_HAVE_HYPOTL */ + +/* Define if you have the iconv() function. */ +#define _GLIBCXX_HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_IEEEFP_H 1 + +/* Define if int64_t is available in . */ +#define _GLIBCXX_HAVE_INT64_T 1 + +/* Define if int64_t is a long. */ +/* #undef _GLIBCXX_HAVE_INT64_T_LONG */ + +/* Define if int64_t is a long long. */ +#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `isinf' function. */ +/* #undef _GLIBCXX_HAVE_ISINF */ + +/* Define to 1 if you have the `isinff' function. */ +/* #undef _GLIBCXX_HAVE_ISINFF */ + +/* Define to 1 if you have the `isinfl' function. */ +/* #undef _GLIBCXX_HAVE_ISINFL */ + +/* Define to 1 if you have the `isnan' function. */ +/* #undef _GLIBCXX_HAVE_ISNAN */ + +/* Define to 1 if you have the `isnanf' function. */ +/* #undef _GLIBCXX_HAVE_ISNANF */ + +/* Define to 1 if you have the `isnanl' function. */ +/* #undef _GLIBCXX_HAVE_ISNANL */ + +/* Defined if iswblank exists. */ +#define _GLIBCXX_HAVE_ISWBLANK 1 + +/* Define if LC_MESSAGES is available in . */ +#define _GLIBCXX_HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the `ldexpf' function. */ +#define _GLIBCXX_HAVE_LDEXPF 1 + +/* Define to 1 if you have the `ldexpl' function. */ +/* #undef _GLIBCXX_HAVE_LDEXPL */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_LIBINTL_H */ + +/* Only used in build directory testsuite_hooks.h. */ +#define _GLIBCXX_HAVE_LIMIT_AS 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define _GLIBCXX_HAVE_LIMIT_DATA 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define _GLIBCXX_HAVE_LIMIT_FSIZE 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define _GLIBCXX_HAVE_LIMIT_RSS 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define _GLIBCXX_HAVE_LIMIT_VMEM 0 + +/* Define if futex syscall is available. */ +/* #undef _GLIBCXX_HAVE_LINUX_FUTEX */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_LOCALE_H 1 + +/* Define to 1 if you have the `log10f' function. */ +#define _GLIBCXX_HAVE_LOG10F 1 + +/* Define to 1 if you have the `log10l' function. */ +/* #undef _GLIBCXX_HAVE_LOG10L */ + +/* Define to 1 if you have the `logf' function. */ +#define _GLIBCXX_HAVE_LOGF 1 + +/* Define to 1 if you have the `logl' function. */ +/* #undef _GLIBCXX_HAVE_LOGL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_MACHINE_ENDIAN_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_MACHINE_PARAM_H 1 + +/* Define if mbstate_t exists in wchar.h. */ +#define _GLIBCXX_HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the `memalign' function. */ +#define _GLIBCXX_HAVE_MEMALIGN 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `modf' function. */ +/* #undef _GLIBCXX_HAVE_MODF */ + +/* Define to 1 if you have the `modff' function. */ +#define _GLIBCXX_HAVE_MODFF 1 + +/* Define to 1 if you have the `modfl' function. */ +/* #undef _GLIBCXX_HAVE_MODFL */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_NAN_H */ + +/* Define if defines obsolete isinf function. */ +/* #undef _GLIBCXX_HAVE_OBSOLETE_ISINF */ + +/* Define if defines obsolete isnan function. */ +/* #undef _GLIBCXX_HAVE_OBSOLETE_ISNAN */ + +/* Define if poll is available in . */ +/* #undef _GLIBCXX_HAVE_POLL */ + +/* Define to 1 if you have the `posix_memalign' function. */ +/* #undef _GLIBCXX_HAVE_POSIX_MEMALIGN */ + +/* Define to 1 if you have the `powf' function. */ +#define _GLIBCXX_HAVE_POWF 1 + +/* Define to 1 if you have the `powl' function. */ +/* #undef _GLIBCXX_HAVE_POWL */ + +/* Define to 1 if you have the `qfpclass' function. */ +/* #undef _GLIBCXX_HAVE_QFPCLASS */ + +/* Define to 1 if you have the `quick_exit' function. */ +/* #undef _GLIBCXX_HAVE_QUICK_EXIT */ + +/* Define to 1 if you have the `setenv' function. */ +/* #undef _GLIBCXX_HAVE_SETENV */ + +/* Define to 1 if you have the `sincos' function. */ +/* #undef _GLIBCXX_HAVE_SINCOS */ + +/* Define to 1 if you have the `sincosf' function. */ +/* #undef _GLIBCXX_HAVE_SINCOSF */ + +/* Define to 1 if you have the `sincosl' function. */ +/* #undef _GLIBCXX_HAVE_SINCOSL */ + +/* Define to 1 if you have the `sinf' function. */ +#define _GLIBCXX_HAVE_SINF 1 + +/* Define to 1 if you have the `sinhf' function. */ +#define _GLIBCXX_HAVE_SINHF 1 + +/* Define to 1 if you have the `sinhl' function. */ +/* #undef _GLIBCXX_HAVE_SINHL */ + +/* Define to 1 if you have the `sinl' function. */ +/* #undef _GLIBCXX_HAVE_SINL */ + +/* Defined if sleep exists. */ +#define _GLIBCXX_HAVE_SLEEP 1 + +/* Define to 1 if you have the `sqrtf' function. */ +#define _GLIBCXX_HAVE_SQRTF 1 + +/* Define to 1 if you have the `sqrtl' function. */ +/* #undef _GLIBCXX_HAVE_SQRTL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STDALIGN_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STDLIB_H 1 + +/* Define if strerror_l is available in . */ +/* #undef _GLIBCXX_HAVE_STRERROR_L */ + +/* Define if strerror_r is available in . */ +#define _GLIBCXX_HAVE_STRERROR_R 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtof' function. */ +#define _GLIBCXX_HAVE_STRTOF 1 + +/* Define to 1 if you have the `strtold' function. */ +/* #undef _GLIBCXX_HAVE_STRTOLD */ + +/* Define to 1 if `d_type' is a member of `struct dirent'. */ +#define _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE 1 + +/* Define if strxfrm_l is available in . */ +/* #undef _GLIBCXX_HAVE_STRXFRM_L */ + +/* Define to 1 if the target runtime linker supports binding the same symbol + to different versions. */ +/* #undef _GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_FILIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_IOCTL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_IPC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have a suitable header file */ +/* #undef _GLIBCXX_HAVE_SYS_SDT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_SEM_H */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_STATVFS_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_SYSINFO_H */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_UIO_H */ + +/* Define if S_IFREG is available in . */ +/* #undef _GLIBCXX_HAVE_S_IFREG */ + +/* Define if S_ISREG is available in . */ +#define _GLIBCXX_HAVE_S_ISREG 1 + +/* Define to 1 if you have the `tanf' function. */ +#define _GLIBCXX_HAVE_TANF 1 + +/* Define to 1 if you have the `tanhf' function. */ +#define _GLIBCXX_HAVE_TANHF 1 + +/* Define to 1 if you have the `tanhl' function. */ +/* #undef _GLIBCXX_HAVE_TANHL */ + +/* Define to 1 if you have the `tanl' function. */ +/* #undef _GLIBCXX_HAVE_TANL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_TGMATH_H 1 + +/* Define to 1 if the target supports thread-local storage. */ +/* #undef _GLIBCXX_HAVE_TLS */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_UCHAR_H */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_UNISTD_H 1 + +/* Defined if usleep exists. */ +#define _GLIBCXX_HAVE_USLEEP 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_UTIME_H 1 + +/* Defined if vfwscanf exists. */ +#define _GLIBCXX_HAVE_VFWSCANF 1 + +/* Defined if vswscanf exists. */ +#define _GLIBCXX_HAVE_VSWSCANF 1 + +/* Defined if vwscanf exists. */ +#define _GLIBCXX_HAVE_VWSCANF 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_WCHAR_H 1 + +/* Defined if wcstof exists. */ +#define _GLIBCXX_HAVE_WCSTOF 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_WCTYPE_H 1 + +/* Defined if Sleep exists. */ +/* #undef _GLIBCXX_HAVE_WIN32_SLEEP */ + +/* Define if writev is available in . */ +/* #undef _GLIBCXX_HAVE_WRITEV */ + +/* Define to 1 if you have the `_acosf' function. */ +/* #undef _GLIBCXX_HAVE__ACOSF */ + +/* Define to 1 if you have the `_acosl' function. */ +/* #undef _GLIBCXX_HAVE__ACOSL */ + +/* Define to 1 if you have the `_aligned_malloc' function. */ +/* #undef _GLIBCXX_HAVE__ALIGNED_MALLOC */ + +/* Define to 1 if you have the `_asinf' function. */ +/* #undef _GLIBCXX_HAVE__ASINF */ + +/* Define to 1 if you have the `_asinl' function. */ +/* #undef _GLIBCXX_HAVE__ASINL */ + +/* Define to 1 if you have the `_atan2f' function. */ +/* #undef _GLIBCXX_HAVE__ATAN2F */ + +/* Define to 1 if you have the `_atan2l' function. */ +/* #undef _GLIBCXX_HAVE__ATAN2L */ + +/* Define to 1 if you have the `_atanf' function. */ +/* #undef _GLIBCXX_HAVE__ATANF */ + +/* Define to 1 if you have the `_atanl' function. */ +/* #undef _GLIBCXX_HAVE__ATANL */ + +/* Define to 1 if you have the `_ceilf' function. */ +/* #undef _GLIBCXX_HAVE__CEILF */ + +/* Define to 1 if you have the `_ceill' function. */ +/* #undef _GLIBCXX_HAVE__CEILL */ + +/* Define to 1 if you have the `_cosf' function. */ +/* #undef _GLIBCXX_HAVE__COSF */ + +/* Define to 1 if you have the `_coshf' function. */ +/* #undef _GLIBCXX_HAVE__COSHF */ + +/* Define to 1 if you have the `_coshl' function. */ +/* #undef _GLIBCXX_HAVE__COSHL */ + +/* Define to 1 if you have the `_cosl' function. */ +/* #undef _GLIBCXX_HAVE__COSL */ + +/* Define to 1 if you have the `_expf' function. */ +/* #undef _GLIBCXX_HAVE__EXPF */ + +/* Define to 1 if you have the `_expl' function. */ +/* #undef _GLIBCXX_HAVE__EXPL */ + +/* Define to 1 if you have the `_fabsf' function. */ +/* #undef _GLIBCXX_HAVE__FABSF */ + +/* Define to 1 if you have the `_fabsl' function. */ +/* #undef _GLIBCXX_HAVE__FABSL */ + +/* Define to 1 if you have the `_finite' function. */ +/* #undef _GLIBCXX_HAVE__FINITE */ + +/* Define to 1 if you have the `_finitef' function. */ +/* #undef _GLIBCXX_HAVE__FINITEF */ + +/* Define to 1 if you have the `_finitel' function. */ +/* #undef _GLIBCXX_HAVE__FINITEL */ + +/* Define to 1 if you have the `_floorf' function. */ +/* #undef _GLIBCXX_HAVE__FLOORF */ + +/* Define to 1 if you have the `_floorl' function. */ +/* #undef _GLIBCXX_HAVE__FLOORL */ + +/* Define to 1 if you have the `_fmodf' function. */ +/* #undef _GLIBCXX_HAVE__FMODF */ + +/* Define to 1 if you have the `_fmodl' function. */ +/* #undef _GLIBCXX_HAVE__FMODL */ + +/* Define to 1 if you have the `_fpclass' function. */ +/* #undef _GLIBCXX_HAVE__FPCLASS */ + +/* Define to 1 if you have the `_frexpf' function. */ +/* #undef _GLIBCXX_HAVE__FREXPF */ + +/* Define to 1 if you have the `_frexpl' function. */ +/* #undef _GLIBCXX_HAVE__FREXPL */ + +/* Define to 1 if you have the `_hypot' function. */ +/* #undef _GLIBCXX_HAVE__HYPOT */ + +/* Define to 1 if you have the `_hypotf' function. */ +/* #undef _GLIBCXX_HAVE__HYPOTF */ + +/* Define to 1 if you have the `_hypotl' function. */ +/* #undef _GLIBCXX_HAVE__HYPOTL */ + +/* Define to 1 if you have the `_isinf' function. */ +/* #undef _GLIBCXX_HAVE__ISINF */ + +/* Define to 1 if you have the `_isinff' function. */ +/* #undef _GLIBCXX_HAVE__ISINFF */ + +/* Define to 1 if you have the `_isinfl' function. */ +/* #undef _GLIBCXX_HAVE__ISINFL */ + +/* Define to 1 if you have the `_isnan' function. */ +/* #undef _GLIBCXX_HAVE__ISNAN */ + +/* Define to 1 if you have the `_isnanf' function. */ +/* #undef _GLIBCXX_HAVE__ISNANF */ + +/* Define to 1 if you have the `_isnanl' function. */ +/* #undef _GLIBCXX_HAVE__ISNANL */ + +/* Define to 1 if you have the `_ldexpf' function. */ +/* #undef _GLIBCXX_HAVE__LDEXPF */ + +/* Define to 1 if you have the `_ldexpl' function. */ +/* #undef _GLIBCXX_HAVE__LDEXPL */ + +/* Define to 1 if you have the `_log10f' function. */ +/* #undef _GLIBCXX_HAVE__LOG10F */ + +/* Define to 1 if you have the `_log10l' function. */ +/* #undef _GLIBCXX_HAVE__LOG10L */ + +/* Define to 1 if you have the `_logf' function. */ +/* #undef _GLIBCXX_HAVE__LOGF */ + +/* Define to 1 if you have the `_logl' function. */ +/* #undef _GLIBCXX_HAVE__LOGL */ + +/* Define to 1 if you have the `_modf' function. */ +/* #undef _GLIBCXX_HAVE__MODF */ + +/* Define to 1 if you have the `_modff' function. */ +/* #undef _GLIBCXX_HAVE__MODFF */ + +/* Define to 1 if you have the `_modfl' function. */ +/* #undef _GLIBCXX_HAVE__MODFL */ + +/* Define to 1 if you have the `_powf' function. */ +/* #undef _GLIBCXX_HAVE__POWF */ + +/* Define to 1 if you have the `_powl' function. */ +/* #undef _GLIBCXX_HAVE__POWL */ + +/* Define to 1 if you have the `_qfpclass' function. */ +/* #undef _GLIBCXX_HAVE__QFPCLASS */ + +/* Define to 1 if you have the `_sincos' function. */ +/* #undef _GLIBCXX_HAVE__SINCOS */ + +/* Define to 1 if you have the `_sincosf' function. */ +/* #undef _GLIBCXX_HAVE__SINCOSF */ + +/* Define to 1 if you have the `_sincosl' function. */ +/* #undef _GLIBCXX_HAVE__SINCOSL */ + +/* Define to 1 if you have the `_sinf' function. */ +/* #undef _GLIBCXX_HAVE__SINF */ + +/* Define to 1 if you have the `_sinhf' function. */ +/* #undef _GLIBCXX_HAVE__SINHF */ + +/* Define to 1 if you have the `_sinhl' function. */ +/* #undef _GLIBCXX_HAVE__SINHL */ + +/* Define to 1 if you have the `_sinl' function. */ +/* #undef _GLIBCXX_HAVE__SINL */ + +/* Define to 1 if you have the `_sqrtf' function. */ +/* #undef _GLIBCXX_HAVE__SQRTF */ + +/* Define to 1 if you have the `_sqrtl' function. */ +/* #undef _GLIBCXX_HAVE__SQRTL */ + +/* Define to 1 if you have the `_tanf' function. */ +/* #undef _GLIBCXX_HAVE__TANF */ + +/* Define to 1 if you have the `_tanhf' function. */ +/* #undef _GLIBCXX_HAVE__TANHF */ + +/* Define to 1 if you have the `_tanhl' function. */ +/* #undef _GLIBCXX_HAVE__TANHL */ + +/* Define to 1 if you have the `_tanl' function. */ +/* #undef _GLIBCXX_HAVE__TANL */ + +/* Define to 1 if you have the `__cxa_thread_atexit' function. */ +/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT */ + +/* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */ +/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef _GLIBCXX_ICONV_CONST */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +/* #undef _GLIBCXX_PACKAGE */ + +/* Define to the address where bug reports for this package should be sent. */ +#define _GLIBCXX_PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define _GLIBCXX_PACKAGE_NAME "package-unused" + +/* Define to the full name and version of this package. */ +#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused" + +/* Define to the one symbol short name of this package. */ +#define _GLIBCXX_PACKAGE_TARNAME "libstdc++" + +/* Define to the home page for this package. */ +#define _GLIBCXX_PACKAGE_URL "" + +/* Define to the version of this package. */ +#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused" + +/* The size of `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ + +/* The size of `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ + +/* The size of `long', as computed by sizeof. */ +/* #undef SIZEOF_LONG */ + +/* The size of `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ + +/* The size of `void *', as computed by sizeof. */ +/* #undef SIZEOF_VOID_P */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +/* #undef _GLIBCXX_VERSION */ + +/* Define if C99 functions in should be used in for + C++11. Using compiler builtins for these functions requires corresponding + C99 library functions to be present. */ +/* #undef _GLIBCXX11_USE_C99_COMPLEX */ + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_STDIO 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_STDLIB 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_WCHAR 1 + +/* Define if C99 functions in should be used in for + C++98. Using compiler builtins for these functions requires corresponding + C99 library functions to be present. */ +/* #undef _GLIBCXX98_USE_C99_COMPLEX */ + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_STDIO 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_STDLIB 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_WCHAR 1 + +/* Define if the compiler supports C++11 atomics. */ +/* #undef _GLIBCXX_ATOMIC_BUILTINS */ + +/* Define to use concept checking code from the boost libraries. */ +/* #undef _GLIBCXX_CONCEPT_CHECKS */ + +/* Define to 1 if a fully dynamic basic_string is wanted, 0 to disable, + undefined for platform defaults */ +#define _GLIBCXX_FULLY_DYNAMIC_STRING 0 + +/* Define if gthreads library is available. */ +/* #undef _GLIBCXX_HAS_GTHREADS */ + +/* Define to 1 if a full hosted library is built, or 0 if freestanding. */ +#define _GLIBCXX_HOSTED 1 + +/* Define if compatibility should be provided for -mlong-double-64. */ + +/* Define to the letter to which size_t is mangled. */ +#define _GLIBCXX_MANGLE_SIZE_T j + +/* Define if C99 llrint and llround functions are missing from . */ +/* #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS */ + +/* Define if ptrdiff_t is int. */ +#define _GLIBCXX_PTRDIFF_T_IS_INT 1 + +/* Define if using setrlimit to set resource limits during "make check" */ +/* #undef _GLIBCXX_RES_LIMITS */ + +/* Define if size_t is unsigned int. */ +#define _GLIBCXX_SIZE_T_IS_UINT 1 + +/* Define to the value of the EOF integer constant. */ +#define _GLIBCXX_STDIO_EOF -1 + +/* Define to the value of the SEEK_CUR integer constant. */ +#define _GLIBCXX_STDIO_SEEK_CUR 1 + +/* Define to the value of the SEEK_END integer constant. */ +#define _GLIBCXX_STDIO_SEEK_END 2 + +/* Define to use symbol versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER */ + +/* Define to use darwin versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_DARWIN */ + +/* Define to use GNU versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_GNU */ + +/* Define to use GNU namespace versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */ + +/* Define to use Sun versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_SUN */ + +/* Define if C11 functions in should be imported into namespace std + in . */ +/* #undef _GLIBCXX_USE_C11_UCHAR_CXX11 */ + +/* Define if C99 functions or macros from , , , + , and can be used or exposed. */ +/* #undef _GLIBCXX_USE_C99 */ + +/* Define if C99 functions in should be used in . + Using compiler builtins for these functions requires corresponding C99 + library functions to be present. */ +/* #undef _GLIBCXX_USE_C99_COMPLEX_TR1 */ + +/* Define if C99 functions in should be imported in in + namespace std::tr1. */ +#define _GLIBCXX_USE_C99_CTYPE_TR1 1 + +/* Define if C99 functions in should be imported in in + namespace std::tr1. */ +/* #undef _GLIBCXX_USE_C99_FENV_TR1 */ + +/* Define if C99 functions in should be imported in + in namespace std::tr1. */ +#define _GLIBCXX_USE_C99_INTTYPES_TR1 1 + +/* Define if wchar_t C99 functions in should be imported in + in namespace std::tr1. */ +#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std::tr1. */ +#define _GLIBCXX_USE_C99_MATH_TR1 1 + +/* Define if C99 types in should be imported in in + namespace std::tr1. */ +#define _GLIBCXX_USE_C99_STDINT_TR1 1 + +/* Defined if clock_gettime syscall has monotonic and realtime clock support. + */ +/* #undef _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL */ + +/* Defined if clock_gettime has monotonic clock support. */ +/* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */ + +/* Defined if clock_gettime has realtime clock support. */ +/* #undef _GLIBCXX_USE_CLOCK_REALTIME */ + +/* Define if ISO/IEC TR 24733 decimal floating point types are supported on + this host. */ +/* #undef _GLIBCXX_USE_DECIMAL_FLOAT */ + +/* Define if fchmod is available in . */ +#define _GLIBCXX_USE_FCHMOD 1 + +/* Define if fchmodat is available in . */ +/* #undef _GLIBCXX_USE_FCHMODAT */ + +/* Define if __float128 is supported on this host. */ +/* #undef _GLIBCXX_USE_FLOAT128 */ + +/* Defined if gettimeofday is available. */ +#define _GLIBCXX_USE_GETTIMEOFDAY 1 + +/* Define if get_nprocs is available in . */ +/* #undef _GLIBCXX_USE_GET_NPROCS */ + +/* Define if __int128 is supported on this host. */ +/* #undef _GLIBCXX_USE_INT128 */ + +/* Define if LFS support is available. */ +/* #undef _GLIBCXX_USE_LFS */ + +/* Define if code specialized for long long should be used. */ +#define _GLIBCXX_USE_LONG_LONG 1 + +/* Defined if nanosleep is available. */ +/* #undef _GLIBCXX_USE_NANOSLEEP */ + +/* Define if NLS translations are to be used. */ +/* #undef _GLIBCXX_USE_NLS */ + +/* Define if pthreads_num_processors_np is available in . */ +/* #undef _GLIBCXX_USE_PTHREADS_NUM_PROCESSORS_NP */ + +/* Define if POSIX read/write locks are available in . */ +/* #undef _GLIBCXX_USE_PTHREAD_RWLOCK_T */ + +/* Define if /dev/random and /dev/urandom are available for the random_device + of TR1 (Chapter 5.1). */ +/* #undef _GLIBCXX_USE_RANDOM_TR1 */ + +/* Define if usable realpath is available in . */ +/* #undef _GLIBCXX_USE_REALPATH */ + +/* Defined if sched_yield is available. */ +/* #undef _GLIBCXX_USE_SCHED_YIELD */ + +/* Define if _SC_NPROCESSORS_ONLN is available in . */ +/* #undef _GLIBCXX_USE_SC_NPROCESSORS_ONLN */ + +/* Define if _SC_NPROC_ONLN is available in . */ +/* #undef _GLIBCXX_USE_SC_NPROC_ONLN */ + +/* Define if sendfile is available in . */ +/* #undef _GLIBCXX_USE_SENDFILE */ + +/* Define if struct stat has timespec members. */ +/* #undef _GLIBCXX_USE_ST_MTIM */ + +/* Define if sysctl(), CTL_HW and HW_NCPU are available in . */ +/* #undef _GLIBCXX_USE_SYSCTL_HW_NCPU */ + +/* Define if obsolescent tmpnam is available in . */ +#define _GLIBCXX_USE_TMPNAM 1 + +/* Define if utimensat and UTIME_OMIT are available in and + AT_FDCWD in . */ +/* #undef _GLIBCXX_USE_UTIMENSAT */ + +/* Define if code specialized for wchar_t should be used. */ +#define _GLIBCXX_USE_WCHAR_T 1 + +/* Define to 1 if a verbose library is built, or 0 otherwise. */ +#define _GLIBCXX_VERBOSE 0 + +/* Defined if as can handle rdrand. */ +/* #undef _GLIBCXX_X86_RDRAND */ + +/* Define to 1 if mutex_timedlock is available. */ +#define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 + +/* Define if all C++11 floating point overloads are available in . */ +#if __cplusplus >= 201103L +/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP */ +#endif + +/* Define if all C++11 integral type overloads are available in . */ +#if __cplusplus >= 201103L +/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT */ +#endif + +#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF) +# define _GLIBCXX_HAVE_ACOSF 1 +# define acosf _acosf +#endif + +#if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL) +# define _GLIBCXX_HAVE_ACOSL 1 +# define acosl _acosl +#endif + +#if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF) +# define _GLIBCXX_HAVE_ASINF 1 +# define asinf _asinf +#endif + +#if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL) +# define _GLIBCXX_HAVE_ASINL 1 +# define asinl _asinl +#endif + +#if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F) +# define _GLIBCXX_HAVE_ATAN2F 1 +# define atan2f _atan2f +#endif + +#if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L) +# define _GLIBCXX_HAVE_ATAN2L 1 +# define atan2l _atan2l +#endif + +#if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF) +# define _GLIBCXX_HAVE_ATANF 1 +# define atanf _atanf +#endif + +#if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL) +# define _GLIBCXX_HAVE_ATANL 1 +# define atanl _atanl +#endif + +#if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF) +# define _GLIBCXX_HAVE_CEILF 1 +# define ceilf _ceilf +#endif + +#if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL) +# define _GLIBCXX_HAVE_CEILL 1 +# define ceill _ceill +#endif + +#if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF) +# define _GLIBCXX_HAVE_COSF 1 +# define cosf _cosf +#endif + +#if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF) +# define _GLIBCXX_HAVE_COSHF 1 +# define coshf _coshf +#endif + +#if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL) +# define _GLIBCXX_HAVE_COSHL 1 +# define coshl _coshl +#endif + +#if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL) +# define _GLIBCXX_HAVE_COSL 1 +# define cosl _cosl +#endif + +#if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF) +# define _GLIBCXX_HAVE_EXPF 1 +# define expf _expf +#endif + +#if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL) +# define _GLIBCXX_HAVE_EXPL 1 +# define expl _expl +#endif + +#if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF) +# define _GLIBCXX_HAVE_FABSF 1 +# define fabsf _fabsf +#endif + +#if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL) +# define _GLIBCXX_HAVE_FABSL 1 +# define fabsl _fabsl +#endif + +#if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE) +# define _GLIBCXX_HAVE_FINITE 1 +# define finite _finite +#endif + +#if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF) +# define _GLIBCXX_HAVE_FINITEF 1 +# define finitef _finitef +#endif + +#if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL) +# define _GLIBCXX_HAVE_FINITEL 1 +# define finitel _finitel +#endif + +#if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF) +# define _GLIBCXX_HAVE_FLOORF 1 +# define floorf _floorf +#endif + +#if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL) +# define _GLIBCXX_HAVE_FLOORL 1 +# define floorl _floorl +#endif + +#if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF) +# define _GLIBCXX_HAVE_FMODF 1 +# define fmodf _fmodf +#endif + +#if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL) +# define _GLIBCXX_HAVE_FMODL 1 +# define fmodl _fmodl +#endif + +#if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS) +# define _GLIBCXX_HAVE_FPCLASS 1 +# define fpclass _fpclass +#endif + +#if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF) +# define _GLIBCXX_HAVE_FREXPF 1 +# define frexpf _frexpf +#endif + +#if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL) +# define _GLIBCXX_HAVE_FREXPL 1 +# define frexpl _frexpl +#endif + +#if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT) +# define _GLIBCXX_HAVE_HYPOT 1 +# define hypot _hypot +#endif + +#if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF) +# define _GLIBCXX_HAVE_HYPOTF 1 +# define hypotf _hypotf +#endif + +#if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL) +# define _GLIBCXX_HAVE_HYPOTL 1 +# define hypotl _hypotl +#endif + +#if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF) +# define _GLIBCXX_HAVE_ISINF 1 +# define isinf _isinf +#endif + +#if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF) +# define _GLIBCXX_HAVE_ISINFF 1 +# define isinff _isinff +#endif + +#if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL) +# define _GLIBCXX_HAVE_ISINFL 1 +# define isinfl _isinfl +#endif + +#if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN) +# define _GLIBCXX_HAVE_ISNAN 1 +# define isnan _isnan +#endif + +#if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF) +# define _GLIBCXX_HAVE_ISNANF 1 +# define isnanf _isnanf +#endif + +#if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL) +# define _GLIBCXX_HAVE_ISNANL 1 +# define isnanl _isnanl +#endif + +#if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF) +# define _GLIBCXX_HAVE_LDEXPF 1 +# define ldexpf _ldexpf +#endif + +#if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL) +# define _GLIBCXX_HAVE_LDEXPL 1 +# define ldexpl _ldexpl +#endif + +#if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F) +# define _GLIBCXX_HAVE_LOG10F 1 +# define log10f _log10f +#endif + +#if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L) +# define _GLIBCXX_HAVE_LOG10L 1 +# define log10l _log10l +#endif + +#if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF) +# define _GLIBCXX_HAVE_LOGF 1 +# define logf _logf +#endif + +#if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL) +# define _GLIBCXX_HAVE_LOGL 1 +# define logl _logl +#endif + +#if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF) +# define _GLIBCXX_HAVE_MODF 1 +# define modf _modf +#endif + +#if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF) +# define _GLIBCXX_HAVE_MODFF 1 +# define modff _modff +#endif + +#if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL) +# define _GLIBCXX_HAVE_MODFL 1 +# define modfl _modfl +#endif + +#if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF) +# define _GLIBCXX_HAVE_POWF 1 +# define powf _powf +#endif + +#if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL) +# define _GLIBCXX_HAVE_POWL 1 +# define powl _powl +#endif + +#if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS) +# define _GLIBCXX_HAVE_QFPCLASS 1 +# define qfpclass _qfpclass +#endif + +#if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS) +# define _GLIBCXX_HAVE_SINCOS 1 +# define sincos _sincos +#endif + +#if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF) +# define _GLIBCXX_HAVE_SINCOSF 1 +# define sincosf _sincosf +#endif + +#if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL) +# define _GLIBCXX_HAVE_SINCOSL 1 +# define sincosl _sincosl +#endif + +#if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF) +# define _GLIBCXX_HAVE_SINF 1 +# define sinf _sinf +#endif + +#if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF) +# define _GLIBCXX_HAVE_SINHF 1 +# define sinhf _sinhf +#endif + +#if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL) +# define _GLIBCXX_HAVE_SINHL 1 +# define sinhl _sinhl +#endif + +#if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL) +# define _GLIBCXX_HAVE_SINL 1 +# define sinl _sinl +#endif + +#if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF) +# define _GLIBCXX_HAVE_SQRTF 1 +# define sqrtf _sqrtf +#endif + +#if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL) +# define _GLIBCXX_HAVE_SQRTL 1 +# define sqrtl _sqrtl +#endif + +#if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF) +# define _GLIBCXX_HAVE_STRTOF 1 +# define strtof _strtof +#endif + +#if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD) +# define _GLIBCXX_HAVE_STRTOLD 1 +# define strtold _strtold +#endif + +#if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF) +# define _GLIBCXX_HAVE_TANF 1 +# define tanf _tanf +#endif + +#if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF) +# define _GLIBCXX_HAVE_TANHF 1 +# define tanhf _tanhf +#endif + +#if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL) +# define _GLIBCXX_HAVE_TANHL 1 +# define tanhl _tanhl +#endif + +#if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL) +# define _GLIBCXX_HAVE_TANL 1 +# define tanl _tanl +#endif + +#endif // _GLIBCXX_CXX_CONFIG_H diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++io.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++io.h new file mode 100644 index 000000000..124e71505 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++io.h @@ -0,0 +1,50 @@ +// Underlying io library details -*- C++ -*- + +// Copyright (C) 2000-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/c++io.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{ios} + */ + +// c_io_stdio.h - Defines for using "C" stdio.h + +#ifndef _GLIBCXX_CXX_IO_H +#define _GLIBCXX_CXX_IO_H 1 + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + typedef __gthread_mutex_t __c_lock; + + // for basic_file.h + typedef FILE __c_file; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++locale.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++locale.h new file mode 100644 index 000000000..ce9fbb80d --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/c++locale.h @@ -0,0 +1,92 @@ +// Wrapper for underlying C-language localization -*- C++ -*- + +// Copyright (C) 2001-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/c++locale.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{locale} + */ + +// +// ISO C++ 14882: 22.8 Standard locale categories. +// + +// Written by Benjamin Kosnik + +#ifndef _GLIBCXX_CXX_LOCALE_H +#define _GLIBCXX_CXX_LOCALE_H 1 + +#pragma GCC system_header + +#include + +#define _GLIBCXX_NUM_CATEGORIES 0 + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + typedef int* __c_locale; + + // Convert numeric value of type double and long double to string and + // return length of string. If vsnprintf is available use it, otherwise + // fall back to the unsafe vsprintf which, in general, can be dangerous + // and should be avoided. + inline int + __convert_from_v(const __c_locale&, char* __out, + const int __size __attribute__((__unused__)), + const char* __fmt, ...) + { + char* __old = std::setlocale(LC_NUMERIC, 0); + char* __sav = 0; + if (__builtin_strcmp(__old, "C")) + { + const size_t __len = __builtin_strlen(__old) + 1; + __sav = new char[__len]; + __builtin_memcpy(__sav, __old, __len); + std::setlocale(LC_NUMERIC, "C"); + } + + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +#if _GLIBCXX_USE_C99_STDIO + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); +#else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +#endif + + __builtin_va_end(__args); + + if (__sav) + { + std::setlocale(LC_NUMERIC, __sav); + delete [] __sav; + } + return __ret; + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/cpu_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/cpu_defines.h new file mode 100644 index 000000000..121ece2f9 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/cpu_defines.h @@ -0,0 +1,40 @@ +// Specific definitions for generic platforms -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/cpu_defines.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{iosfwd} + */ + +#ifndef _GLIBCXX_CPU_DEFINES +#define _GLIBCXX_CPU_DEFINES 1 + +// Integer divide instructions don't trap on ARM. +#ifdef __ARM_ARCH_EXT_IDIV__ +#define __glibcxx_integral_traps false +#else +#define __glibcxx_integral_traps true +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/ctype_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/ctype_base.h new file mode 100644 index 000000000..6a8cce7bc --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/ctype_base.h @@ -0,0 +1,61 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 2000-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// +// ISO C++ 14882: 22.1 Locales +// + +// Information as gleaned from /usr/include/ctype.h + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /// @brief Base class for ctype. + struct ctype_base + { + // Non-standard typedefs. + typedef const int* __to_type; + + // NB: Offsets into ctype::_M_table force a particular size + // on the mask type. Because of this, we don't use an enum. + typedef char mask; + static const mask upper = _U; + static const mask lower = _L; + static const mask alpha = _U | _L; + static const mask digit = _N; + static const mask xdigit = _X | _N; + static const mask space = _S; + static const mask print = _P | _U | _L | _N | _B; + static const mask graph = _P | _U | _L | _N; + static const mask cntrl = _C; + static const mask punct = _P; + static const mask alnum = _U | _L | _N; +#if __cplusplus >= 201103L + static const mask blank = space; +#endif + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/ctype_inline.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/ctype_inline.h new file mode 100644 index 000000000..cbb33392d --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/ctype_inline.h @@ -0,0 +1,74 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 2000-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/ctype_inline.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{locale} + */ + +// +// ISO C++ 14882: 22.1 Locales +// + +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) +// functions go in ctype.cc + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + bool + ctype:: + is(mask __m, char __c) const + { return _M_table[static_cast(__c)] & __m; } + + const char* + ctype:: + is(const char* __low, const char* __high, mask* __vec) const + { + while (__low < __high) + *__vec++ = _M_table[static_cast(*__low++)]; + return __high; + } + + const char* + ctype:: + scan_is(mask __m, const char* __low, const char* __high) const + { + while (__low < __high && !this->is(__m, *__low)) + ++__low; + return __low; + } + + const char* + ctype:: + scan_not(mask __m, const char* __low, const char* __high) const + { + while (__low < __high && this->is(__m, *__low) != 0) + ++__low; + return __low; + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/cxxabi_tweaks.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/cxxabi_tweaks.h new file mode 100644 index 000000000..6f37a4fdf --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/cxxabi_tweaks.h @@ -0,0 +1,82 @@ +// Control various target specific ABI tweaks. ARM version. + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/cxxabi_tweaks.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{cxxabi.h} + */ + +#ifndef _CXXABI_TWEAKS_H +#define _CXXABI_TWEAKS_H 1 + +#ifdef __cplusplus +namespace __cxxabiv1 +{ + extern "C" + { +#endif + +#ifdef __ARM_EABI__ + // The ARM EABI uses the least significant bit of a 32-bit + // guard variable. */ +#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0) +#define _GLIBCXX_GUARD_SET(x) *(x) = 1 +#define _GLIBCXX_GUARD_BIT 1 +#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1) +#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1) + typedef int __guard; + + // We also want the element size in array cookies. +#define _GLIBCXX_ELTSIZE_IN_COOKIE 1 + + // __cxa_vec_ctor should return a pointer to the array. + typedef void * __cxa_vec_ctor_return_type; +#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x + // Constructors and destructors return the "this" pointer. + typedef void * __cxa_cdtor_return_type; + +#else // __ARM_EABI__ + + // The generic ABI uses the first byte of a 64-bit guard variable. +#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0) +#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1 +#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1) +#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1) +#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1) + __extension__ typedef int __guard __attribute__((mode (__DI__))); + + // __cxa_vec_ctor has void return type. + typedef void __cxa_vec_ctor_return_type; +#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return + // Constructors and destructors do not return a value. + typedef void __cxa_cdtor_return_type; + +#endif //!__ARM_EABI__ + +#ifdef __cplusplus + } +} // namespace __cxxabiv1 +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/error_constants.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/error_constants.h new file mode 100644 index 000000000..3f5c92e7c --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/error_constants.h @@ -0,0 +1,178 @@ +// Specific definitions for generic platforms -*- C++ -*- + +// Copyright (C) 2007-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/error_constants.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{system_error} + */ + +#ifndef _GLIBCXX_ERROR_CONSTANTS +#define _GLIBCXX_ERROR_CONSTANTS 1 + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + enum class errc + { + address_family_not_supported = EAFNOSUPPORT, + address_in_use = EADDRINUSE, + address_not_available = EADDRNOTAVAIL, + already_connected = EISCONN, + argument_list_too_long = E2BIG, + argument_out_of_domain = EDOM, + bad_address = EFAULT, + bad_file_descriptor = EBADF, + +#ifdef _GLIBCXX_HAVE_EBADMSG + bad_message = EBADMSG, +#endif + + broken_pipe = EPIPE, + connection_aborted = ECONNABORTED, + connection_already_in_progress = EALREADY, + connection_refused = ECONNREFUSED, + connection_reset = ECONNRESET, + cross_device_link = EXDEV, + destination_address_required = EDESTADDRREQ, + device_or_resource_busy = EBUSY, + directory_not_empty = ENOTEMPTY, + executable_format_error = ENOEXEC, + file_exists = EEXIST, + file_too_large = EFBIG, + filename_too_long = ENAMETOOLONG, + function_not_supported = ENOSYS, + host_unreachable = EHOSTUNREACH, + +#ifdef _GLIBCXX_HAVE_EIDRM + identifier_removed = EIDRM, +#endif + + illegal_byte_sequence = EILSEQ, + inappropriate_io_control_operation = ENOTTY, + interrupted = EINTR, + invalid_argument = EINVAL, + invalid_seek = ESPIPE, + io_error = EIO, + is_a_directory = EISDIR, + message_size = EMSGSIZE, + network_down = ENETDOWN, + network_reset = ENETRESET, + network_unreachable = ENETUNREACH, + no_buffer_space = ENOBUFS, + no_child_process = ECHILD, + +#ifdef _GLIBCXX_HAVE_ENOLINK + no_link = ENOLINK, +#endif + + no_lock_available = ENOLCK, + +#ifdef _GLIBCXX_HAVE_ENODATA + no_message_available = ENODATA, +#endif + + no_message = ENOMSG, + no_protocol_option = ENOPROTOOPT, + no_space_on_device = ENOSPC, + +#ifdef _GLIBCXX_HAVE_ENOSR + no_stream_resources = ENOSR, +#endif + + no_such_device_or_address = ENXIO, + no_such_device = ENODEV, + no_such_file_or_directory = ENOENT, + no_such_process = ESRCH, + not_a_directory = ENOTDIR, + not_a_socket = ENOTSOCK, + +#ifdef _GLIBCXX_HAVE_ENOSTR + not_a_stream = ENOSTR, +#endif + + not_connected = ENOTCONN, + not_enough_memory = ENOMEM, + +#ifdef _GLIBCXX_HAVE_ENOTSUP + not_supported = ENOTSUP, +#endif + +#ifdef _GLIBCXX_HAVE_ECANCELED + operation_canceled = ECANCELED, +#endif + + operation_in_progress = EINPROGRESS, + operation_not_permitted = EPERM, + operation_not_supported = EOPNOTSUPP, + operation_would_block = EWOULDBLOCK, + +#ifdef _GLIBCXX_HAVE_EOWNERDEAD + owner_dead = EOWNERDEAD, +#endif + + permission_denied = EACCES, + +#ifdef _GLIBCXX_HAVE_EPROTO + protocol_error = EPROTO, +#endif + + protocol_not_supported = EPROTONOSUPPORT, + read_only_file_system = EROFS, + resource_deadlock_would_occur = EDEADLK, + resource_unavailable_try_again = EAGAIN, + result_out_of_range = ERANGE, + +#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE + state_not_recoverable = ENOTRECOVERABLE, +#endif + +#ifdef _GLIBCXX_HAVE_ETIME + stream_timeout = ETIME, +#endif + +#ifdef _GLIBCXX_HAVE_ETXTBSY + text_file_busy = ETXTBSY, +#endif + + timed_out = ETIMEDOUT, + too_many_files_open_in_system = ENFILE, + too_many_files_open = EMFILE, + too_many_links = EMLINK, + too_many_symbolic_link_levels = ELOOP, + +#ifdef _GLIBCXX_HAVE_EOVERFLOW + value_too_large = EOVERFLOW, +#endif + + wrong_protocol_type = EPROTOTYPE + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/extc++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/extc++.h new file mode 100644 index 000000000..68c1681a3 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/extc++.h @@ -0,0 +1,84 @@ +// C++ includes used for precompiling extensions -*- C++ -*- + +// Copyright (C) 2006-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file extc++.h + * This is an implementation file for a precompiled header. + */ + +#if __cplusplus < 201103L +#include +#else +#include +#endif + +#include +#if __cplusplus >= 201103L +# include +#endif +#include +#include +#include +#include +#include +#if __cplusplus >= 201103L +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if __cplusplus >= 201103L +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef _GLIBCXX_HAVE_ICONV + #include + #include +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr-default.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr-default.h new file mode 100644 index 000000000..165711401 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr-default.h @@ -0,0 +1,298 @@ +/* Threads compatibility routines for libgcc2 and libobjc. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef _GLIBCXX_GCC_GTHR_SINGLE_H +#define _GLIBCXX_GCC_GTHR_SINGLE_H + +/* Just provide compatibility for mutex handling. */ + +typedef int __gthread_key_t; +typedef int __gthread_once_t; +typedef int __gthread_mutex_t; +typedef int __gthread_recursive_mutex_t; + +#define __GTHREAD_ONCE_INIT 0 +#define __GTHREAD_MUTEX_INIT 0 +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) +#define __GTHREAD_RECURSIVE_MUTEX_INIT 0 + +#define _GLIBCXX_UNUSED __attribute__((__unused__)) + +#ifdef _LIBOBJC + +/* Thread local storage for a single thread */ +static void *thread_local_storage = NULL; + +/* Backend initialization functions */ + +/* Initialize the threads subsystem. */ +static inline int +__gthread_objc_init_thread_system (void) +{ + /* No thread support available */ + return -1; +} + +/* Close the threads subsystem. */ +static inline int +__gthread_objc_close_thread_system (void) +{ + /* No thread support available */ + return -1; +} + +/* Backend thread functions */ + +/* Create a new thread of execution. */ +static inline objc_thread_t +__gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED) +{ + /* No thread support available */ + return NULL; +} + +/* Set the current thread's priority. */ +static inline int +__gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED) +{ + /* No thread support available */ + return -1; +} + +/* Return the current thread's priority. */ +static inline int +__gthread_objc_thread_get_priority (void) +{ + return OBJC_THREAD_INTERACTIVE_PRIORITY; +} + +/* Yield our process time to another thread. */ +static inline void +__gthread_objc_thread_yield (void) +{ + return; +} + +/* Terminate the current thread. */ +static inline int +__gthread_objc_thread_exit (void) +{ + /* No thread support available */ + /* Should we really exit the program */ + /* exit (&__objc_thread_exit_status); */ + return -1; +} + +/* Returns an integer value which uniquely describes a thread. */ +static inline objc_thread_t +__gthread_objc_thread_id (void) +{ + /* No thread support, use 1. */ + return (objc_thread_t) 1; +} + +/* Sets the thread's local storage pointer. */ +static inline int +__gthread_objc_thread_set_data (void *value) +{ + thread_local_storage = value; + return 0; +} + +/* Returns the thread's local storage pointer. */ +static inline void * +__gthread_objc_thread_get_data (void) +{ + return thread_local_storage; +} + +/* Backend mutex functions */ + +/* Allocate a mutex. */ +static inline int +__gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Deallocate a mutex. */ +static inline int +__gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + /* There can only be one thread, so we always get the lock */ + return 0; +} + +/* Try to grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + /* There can only be one thread, so we always get the lock */ + return 0; +} + +/* Unlock the mutex */ +static inline int +__gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Backend condition mutex functions */ + +/* Allocate a condition. */ +static inline int +__gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Deallocate a condition. */ +static inline int +__gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wait on the condition */ +static inline int +__gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED, + objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wake up all threads waiting on this condition. */ +static inline int +__gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wake up one thread waiting on this condition. */ +static inline int +__gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +#else /* _LIBOBJC */ + +static inline int +__gthread_active_p (void) +{ + return 0; +} + +static inline int +__gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int _GLIBCXX_UNUSED +__gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED) +{ + return 0; +} + +static int _GLIBCXX_UNUSED +__gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_destroy (__mutex); +} + +#endif /* _LIBOBJC */ + +#undef _GLIBCXX_UNUSED + +#endif /* ! _GLIBCXX_GCC_GTHR_SINGLE_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr-posix.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr-posix.h new file mode 100644 index 000000000..2f844b247 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr-posix.h @@ -0,0 +1,889 @@ +/* Threads compatibility routines for libgcc2 and libobjc. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef _GLIBCXX_GCC_GTHR_POSIX_H +#define _GLIBCXX_GCC_GTHR_POSIX_H + +/* POSIX threads specific definitions. + Easy, since the interface is just one-to-one mapping. */ + +#define __GTHREADS 1 +#define __GTHREADS_CXX0X 1 + +#include + +#if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \ + || !defined(_GTHREAD_USE_MUTEX_TIMEDLOCK)) +# include +# if defined(_POSIX_TIMEOUTS) && _POSIX_TIMEOUTS >= 0 +# define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 +# else +# define _GTHREAD_USE_MUTEX_TIMEDLOCK 0 +# endif +#endif + +typedef pthread_t __gthread_t; +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; +typedef pthread_mutex_t __gthread_recursive_mutex_t; +typedef pthread_cond_t __gthread_cond_t; +typedef struct timespec __gthread_time_t; + +/* POSIX like conditional variables are supported. Please look at comments + in gthr.h for details. */ +#define __GTHREAD_HAS_COND 1 + +#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER +#define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function +#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT +#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER) +#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER +#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) +#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP +#else +#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function +#endif +#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER +#define __GTHREAD_TIME_INIT {0,0} + +#ifdef _GTHREAD_USE_MUTEX_INIT_FUNC +# undef __GTHREAD_MUTEX_INIT +#endif +#ifdef _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC +# undef __GTHREAD_RECURSIVE_MUTEX_INIT +# undef __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION +# define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function +#endif +#ifdef _GTHREAD_USE_COND_INIT_FUNC +# undef __GTHREAD_COND_INIT +# define __GTHREAD_COND_INIT_FUNCTION __gthread_cond_init_function +#endif + +#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK +# ifndef __gthrw_pragma +# define __gthrw_pragma(pragma) +# endif +# define __gthrw2(name,name2,type) \ + static __typeof(type) name __attribute__ ((__weakref__(#name2))); \ + __gthrw_pragma(weak type) +# define __gthrw_(name) __gthrw_ ## name +#else +# define __gthrw2(name,name2,type) +# define __gthrw_(name) name +#endif + +/* Typically, __gthrw_foo is a weak reference to symbol foo. */ +#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name) + +__gthrw(pthread_once) +__gthrw(pthread_getspecific) +__gthrw(pthread_setspecific) + +__gthrw(pthread_create) +__gthrw(pthread_join) +__gthrw(pthread_equal) +__gthrw(pthread_self) +__gthrw(pthread_detach) +#ifndef __BIONIC__ +__gthrw(pthread_cancel) +#endif +__gthrw(sched_yield) + +__gthrw(pthread_mutex_lock) +__gthrw(pthread_mutex_trylock) +#if _GTHREAD_USE_MUTEX_TIMEDLOCK +__gthrw(pthread_mutex_timedlock) +#endif +__gthrw(pthread_mutex_unlock) +__gthrw(pthread_mutex_init) +__gthrw(pthread_mutex_destroy) + +__gthrw(pthread_cond_init) +__gthrw(pthread_cond_broadcast) +__gthrw(pthread_cond_signal) +__gthrw(pthread_cond_wait) +__gthrw(pthread_cond_timedwait) +__gthrw(pthread_cond_destroy) + +__gthrw(pthread_key_create) +__gthrw(pthread_key_delete) +__gthrw(pthread_mutexattr_init) +__gthrw(pthread_mutexattr_settype) +__gthrw(pthread_mutexattr_destroy) + + +#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK) +/* Objective-C. */ +__gthrw(pthread_exit) +#ifdef _POSIX_PRIORITY_SCHEDULING +#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING +__gthrw(sched_get_priority_max) +__gthrw(sched_get_priority_min) +#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ +#endif /* _POSIX_PRIORITY_SCHEDULING */ +__gthrw(pthread_attr_destroy) +__gthrw(pthread_attr_init) +__gthrw(pthread_attr_setdetachstate) +#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING +__gthrw(pthread_getschedparam) +__gthrw(pthread_setschedparam) +#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ +#endif /* _LIBOBJC || _LIBOBJC_WEAK */ + +#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK + +/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if + -pthreads is not specified. The functions are dummies and most return an + error value. However pthread_once returns 0 without invoking the routine + it is passed so we cannot pretend that the interface is active if -pthreads + is not specified. On Solaris 2.5.1, the interface is not exposed at all so + we need to play the usual game with weak symbols. On Solaris 10 and up, a + working interface is always exposed. On FreeBSD 6 and later, libc also + exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up + to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc, + which means the alternate __gthread_active_p below cannot be used there. */ + +#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__)) + +static volatile int __gthread_active = -1; + +static void +__gthread_trigger (void) +{ + __gthread_active = 1; +} + +static inline int +__gthread_active_p (void) +{ + static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER; + static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT; + + /* Avoid reading __gthread_active twice on the main code path. */ + int __gthread_active_latest_value = __gthread_active; + + /* This test is not protected to avoid taking a lock on the main code + path so every update of __gthread_active in a threaded program must + be atomic with regard to the result of the test. */ + if (__builtin_expect (__gthread_active_latest_value < 0, 0)) + { + if (__gthrw_(pthread_once)) + { + /* If this really is a threaded program, then we must ensure that + __gthread_active has been set to 1 before exiting this block. */ + __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex); + __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger); + __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex); + } + + /* Make sure we'll never enter this block again. */ + if (__gthread_active < 0) + __gthread_active = 0; + + __gthread_active_latest_value = __gthread_active; + } + + return __gthread_active_latest_value != 0; +} + +#else /* neither FreeBSD nor Solaris */ + +/* For a program to be multi-threaded the only thing that it certainly must + be using is pthread_create. However, there may be other libraries that + intercept pthread_create with their own definitions to wrap pthreads + functionality for some purpose. In those cases, pthread_create being + defined might not necessarily mean that libpthread is actually linked + in. + + For the GNU C library, we can use a known internal name. This is always + available in the ABI, but no other library would define it. That is + ideal, since any public pthread function might be intercepted just as + pthread_create might be. __pthread_key_create is an "internal" + implementation symbol, but it is part of the public exported ABI. Also, + it's among the symbols that the static libpthread.a always links in + whenever pthread_create is used, so there is no danger of a false + negative result in any statically-linked, multi-threaded program. + + For others, we choose pthread_cancel as a function that seems unlikely + to be redefined by an interceptor library. The bionic (Android) C + library does not provide pthread_cancel, so we do use pthread_create + there (and interceptor libraries lose). */ + +#ifdef __GLIBC__ +__gthrw2(__gthrw_(__pthread_key_create), + __pthread_key_create, + pthread_key_create) +# define GTHR_ACTIVE_PROXY __gthrw_(__pthread_key_create) +#elif defined (__BIONIC__) +# define GTHR_ACTIVE_PROXY __gthrw_(pthread_create) +#else +# define GTHR_ACTIVE_PROXY __gthrw_(pthread_cancel) +#endif + +static inline int +__gthread_active_p (void) +{ + static void *const __gthread_active_ptr + = __extension__ (void *) >HR_ACTIVE_PROXY; + return __gthread_active_ptr != 0; +} + +#endif /* FreeBSD or Solaris */ + +#else /* not __GXX_WEAK__ */ + +/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread + calls in shared flavors of the HP-UX C library. Most of the stubs + have no functionality. The details are described in the "libc cumulative + patch" for each subversion of HP-UX 11. There are two special interfaces + provided for checking whether an application is linked to a shared pthread + library or not. However, these interfaces aren't available in early + libpthread libraries. We also need a test that works for archive + libraries. We can't use pthread_once as some libc versions call the + init function. We also can't use pthread_create or pthread_attr_init + as these create a thread and thereby prevent changing the default stack + size. The function pthread_default_stacksize_np is available in both + the archive and shared versions of libpthread. It can be used to + determine the default pthread stack size. There is a stub in some + shared libc versions which returns a zero size if pthreads are not + active. We provide an equivalent stub to handle cases where libc + doesn't provide one. */ + +#if defined(__hppa__) && defined(__hpux__) + +static volatile int __gthread_active = -1; + +static inline int +__gthread_active_p (void) +{ + /* Avoid reading __gthread_active twice on the main code path. */ + int __gthread_active_latest_value = __gthread_active; + size_t __s; + + if (__builtin_expect (__gthread_active_latest_value < 0, 0)) + { + pthread_default_stacksize_np (0, &__s); + __gthread_active = __s ? 1 : 0; + __gthread_active_latest_value = __gthread_active; + } + + return __gthread_active_latest_value != 0; +} + +#else /* not hppa-hpux */ + +static inline int +__gthread_active_p (void) +{ + return 1; +} + +#endif /* hppa-hpux */ + +#endif /* __GXX_WEAK__ */ + +#ifdef _LIBOBJC + +/* This is the config.h file in libobjc/ */ +#include + +#ifdef HAVE_SCHED_H +# include +#endif + +/* Key structure for maintaining thread specific storage */ +static pthread_key_t _objc_thread_storage; +static pthread_attr_t _objc_thread_attribs; + +/* Thread local storage for a single thread */ +static void *thread_local_storage = NULL; + +/* Backend initialization functions */ + +/* Initialize the threads subsystem. */ +static inline int +__gthread_objc_init_thread_system (void) +{ + if (__gthread_active_p ()) + { + /* Initialize the thread storage key. */ + if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0) + { + /* The normal default detach state for threads is + * PTHREAD_CREATE_JOINABLE which causes threads to not die + * when you think they should. */ + if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0 + && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs, + PTHREAD_CREATE_DETACHED) == 0) + return 0; + } + } + + return -1; +} + +/* Close the threads subsystem. */ +static inline int +__gthread_objc_close_thread_system (void) +{ + if (__gthread_active_p () + && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0 + && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0) + return 0; + + return -1; +} + +/* Backend thread functions */ + +/* Create a new thread of execution. */ +static inline objc_thread_t +__gthread_objc_thread_detach (void (*func)(void *), void *arg) +{ + objc_thread_t thread_id; + pthread_t new_thread_handle; + + if (!__gthread_active_p ()) + return NULL; + + if (!(__gthrw_(pthread_create) (&new_thread_handle, &_objc_thread_attribs, + (void *) func, arg))) + thread_id = (objc_thread_t) new_thread_handle; + else + thread_id = NULL; + + return thread_id; +} + +/* Set the current thread's priority. */ +static inline int +__gthread_objc_thread_set_priority (int priority) +{ + if (!__gthread_active_p ()) + return -1; + else + { +#ifdef _POSIX_PRIORITY_SCHEDULING +#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING + pthread_t thread_id = __gthrw_(pthread_self) (); + int policy; + struct sched_param params; + int priority_min, priority_max; + + if (__gthrw_(pthread_getschedparam) (thread_id, &policy, ¶ms) == 0) + { + if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1) + return -1; + + if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1) + return -1; + + if (priority > priority_max) + priority = priority_max; + else if (priority < priority_min) + priority = priority_min; + params.sched_priority = priority; + + /* + * The solaris 7 and several other man pages incorrectly state that + * this should be a pointer to policy but pthread.h is universally + * at odds with this. + */ + if (__gthrw_(pthread_setschedparam) (thread_id, policy, ¶ms) == 0) + return 0; + } +#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ +#endif /* _POSIX_PRIORITY_SCHEDULING */ + return -1; + } +} + +/* Return the current thread's priority. */ +static inline int +__gthread_objc_thread_get_priority (void) +{ +#ifdef _POSIX_PRIORITY_SCHEDULING +#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING + if (__gthread_active_p ()) + { + int policy; + struct sched_param params; + + if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, ¶ms) == 0) + return params.sched_priority; + else + return -1; + } + else +#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ +#endif /* _POSIX_PRIORITY_SCHEDULING */ + return OBJC_THREAD_INTERACTIVE_PRIORITY; +} + +/* Yield our process time to another thread. */ +static inline void +__gthread_objc_thread_yield (void) +{ + if (__gthread_active_p ()) + __gthrw_(sched_yield) (); +} + +/* Terminate the current thread. */ +static inline int +__gthread_objc_thread_exit (void) +{ + if (__gthread_active_p ()) + /* exit the thread */ + __gthrw_(pthread_exit) (&__objc_thread_exit_status); + + /* Failed if we reached here */ + return -1; +} + +/* Returns an integer value which uniquely describes a thread. */ +static inline objc_thread_t +__gthread_objc_thread_id (void) +{ + if (__gthread_active_p ()) + return (objc_thread_t) __gthrw_(pthread_self) (); + else + return (objc_thread_t) 1; +} + +/* Sets the thread's local storage pointer. */ +static inline int +__gthread_objc_thread_set_data (void *value) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_setspecific) (_objc_thread_storage, value); + else + { + thread_local_storage = value; + return 0; + } +} + +/* Returns the thread's local storage pointer. */ +static inline void * +__gthread_objc_thread_get_data (void) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_getspecific) (_objc_thread_storage); + else + return thread_local_storage; +} + +/* Backend mutex functions */ + +/* Allocate a mutex. */ +static inline int +__gthread_objc_mutex_allocate (objc_mutex_t mutex) +{ + if (__gthread_active_p ()) + { + mutex->backend = objc_malloc (sizeof (pthread_mutex_t)); + + if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL)) + { + objc_free (mutex->backend); + mutex->backend = NULL; + return -1; + } + } + + return 0; +} + +/* Deallocate a mutex. */ +static inline int +__gthread_objc_mutex_deallocate (objc_mutex_t mutex) +{ + if (__gthread_active_p ()) + { + int count; + + /* + * Posix Threads specifically require that the thread be unlocked + * for __gthrw_(pthread_mutex_destroy) to work. + */ + + do + { + count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend); + if (count < 0) + return -1; + } + while (count); + + if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend)) + return -1; + + objc_free (mutex->backend); + mutex->backend = NULL; + } + return 0; +} + +/* Grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_lock (objc_mutex_t mutex) +{ + if (__gthread_active_p () + && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0) + { + return -1; + } + + return 0; +} + +/* Try to grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_trylock (objc_mutex_t mutex) +{ + if (__gthread_active_p () + && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0) + { + return -1; + } + + return 0; +} + +/* Unlock the mutex */ +static inline int +__gthread_objc_mutex_unlock (objc_mutex_t mutex) +{ + if (__gthread_active_p () + && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0) + { + return -1; + } + + return 0; +} + +/* Backend condition mutex functions */ + +/* Allocate a condition. */ +static inline int +__gthread_objc_condition_allocate (objc_condition_t condition) +{ + if (__gthread_active_p ()) + { + condition->backend = objc_malloc (sizeof (pthread_cond_t)); + + if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL)) + { + objc_free (condition->backend); + condition->backend = NULL; + return -1; + } + } + + return 0; +} + +/* Deallocate a condition. */ +static inline int +__gthread_objc_condition_deallocate (objc_condition_t condition) +{ + if (__gthread_active_p ()) + { + if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend)) + return -1; + + objc_free (condition->backend); + condition->backend = NULL; + } + return 0; +} + +/* Wait on the condition */ +static inline int +__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend, + (pthread_mutex_t *) mutex->backend); + else + return 0; +} + +/* Wake up all threads waiting on this condition. */ +static inline int +__gthread_objc_condition_broadcast (objc_condition_t condition) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend); + else + return 0; +} + +/* Wake up one thread waiting on this condition. */ +static inline int +__gthread_objc_condition_signal (objc_condition_t condition) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend); + else + return 0; +} + +#else /* _LIBOBJC */ + +static inline int +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), + void *__args) +{ + return __gthrw_(pthread_create) (__threadid, NULL, __func, __args); +} + +static inline int +__gthread_join (__gthread_t __threadid, void **__value_ptr) +{ + return __gthrw_(pthread_join) (__threadid, __value_ptr); +} + +static inline int +__gthread_detach (__gthread_t __threadid) +{ + return __gthrw_(pthread_detach) (__threadid); +} + +static inline int +__gthread_equal (__gthread_t __t1, __gthread_t __t2) +{ + return __gthrw_(pthread_equal) (__t1, __t2); +} + +static inline __gthread_t +__gthread_self (void) +{ + return __gthrw_(pthread_self) (); +} + +static inline int +__gthread_yield (void) +{ + return __gthrw_(sched_yield) (); +} + +static inline int +__gthread_once (__gthread_once_t *__once, void (*__func) (void)) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_once) (__once, __func); + else + return -1; +} + +static inline int +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) +{ + return __gthrw_(pthread_key_create) (__key, __dtor); +} + +static inline int +__gthread_key_delete (__gthread_key_t __key) +{ + return __gthrw_(pthread_key_delete) (__key); +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key) +{ + return __gthrw_(pthread_getspecific) (__key); +} + +static inline int +__gthread_setspecific (__gthread_key_t __key, const void *__ptr) +{ + return __gthrw_(pthread_setspecific) (__key, __ptr); +} + +static inline void +__gthread_mutex_init_function (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + __gthrw_(pthread_mutex_init) (__mutex, NULL); +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_mutex_destroy) (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_mutex_lock) (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_mutex_trylock) (__mutex); + else + return 0; +} + +#if _GTHREAD_USE_MUTEX_TIMEDLOCK +static inline int +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout); + else + return 0; +} +#endif + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_mutex_unlock) (__mutex); + else + return 0; +} + +#if !defined( PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) \ + || defined(_GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC) +static inline int +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + { + pthread_mutexattr_t __attr; + int __r; + + __r = __gthrw_(pthread_mutexattr_init) (&__attr); + if (!__r) + __r = __gthrw_(pthread_mutexattr_settype) (&__attr, + PTHREAD_MUTEX_RECURSIVE); + if (!__r) + __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr); + if (!__r) + __r = __gthrw_(pthread_mutexattr_destroy) (&__attr); + return __r; + } + return 0; +} +#endif + +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + +#if _GTHREAD_USE_MUTEX_TIMEDLOCK +static inline int +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_mutex_timedlock (__mutex, __abs_timeout); +} +#endif + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_destroy (__mutex); +} + +#ifdef _GTHREAD_USE_COND_INIT_FUNC +static inline void +__gthread_cond_init_function (__gthread_cond_t *__cond) +{ + if (__gthread_active_p ()) + __gthrw_(pthread_cond_init) (__cond, NULL); +} +#endif + +static inline int +__gthread_cond_broadcast (__gthread_cond_t *__cond) +{ + return __gthrw_(pthread_cond_broadcast) (__cond); +} + +static inline int +__gthread_cond_signal (__gthread_cond_t *__cond) +{ + return __gthrw_(pthread_cond_signal) (__cond); +} + +static inline int +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) +{ + return __gthrw_(pthread_cond_wait) (__cond, __mutex); +} + +static inline int +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout); +} + +static inline int +__gthread_cond_wait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex) +{ + return __gthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_destroy (__gthread_cond_t* __cond) +{ + return __gthrw_(pthread_cond_destroy) (__cond); +} + +#endif /* _LIBOBJC */ + +#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr-single.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr-single.h new file mode 100644 index 000000000..165711401 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr-single.h @@ -0,0 +1,298 @@ +/* Threads compatibility routines for libgcc2 and libobjc. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef _GLIBCXX_GCC_GTHR_SINGLE_H +#define _GLIBCXX_GCC_GTHR_SINGLE_H + +/* Just provide compatibility for mutex handling. */ + +typedef int __gthread_key_t; +typedef int __gthread_once_t; +typedef int __gthread_mutex_t; +typedef int __gthread_recursive_mutex_t; + +#define __GTHREAD_ONCE_INIT 0 +#define __GTHREAD_MUTEX_INIT 0 +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) +#define __GTHREAD_RECURSIVE_MUTEX_INIT 0 + +#define _GLIBCXX_UNUSED __attribute__((__unused__)) + +#ifdef _LIBOBJC + +/* Thread local storage for a single thread */ +static void *thread_local_storage = NULL; + +/* Backend initialization functions */ + +/* Initialize the threads subsystem. */ +static inline int +__gthread_objc_init_thread_system (void) +{ + /* No thread support available */ + return -1; +} + +/* Close the threads subsystem. */ +static inline int +__gthread_objc_close_thread_system (void) +{ + /* No thread support available */ + return -1; +} + +/* Backend thread functions */ + +/* Create a new thread of execution. */ +static inline objc_thread_t +__gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED) +{ + /* No thread support available */ + return NULL; +} + +/* Set the current thread's priority. */ +static inline int +__gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED) +{ + /* No thread support available */ + return -1; +} + +/* Return the current thread's priority. */ +static inline int +__gthread_objc_thread_get_priority (void) +{ + return OBJC_THREAD_INTERACTIVE_PRIORITY; +} + +/* Yield our process time to another thread. */ +static inline void +__gthread_objc_thread_yield (void) +{ + return; +} + +/* Terminate the current thread. */ +static inline int +__gthread_objc_thread_exit (void) +{ + /* No thread support available */ + /* Should we really exit the program */ + /* exit (&__objc_thread_exit_status); */ + return -1; +} + +/* Returns an integer value which uniquely describes a thread. */ +static inline objc_thread_t +__gthread_objc_thread_id (void) +{ + /* No thread support, use 1. */ + return (objc_thread_t) 1; +} + +/* Sets the thread's local storage pointer. */ +static inline int +__gthread_objc_thread_set_data (void *value) +{ + thread_local_storage = value; + return 0; +} + +/* Returns the thread's local storage pointer. */ +static inline void * +__gthread_objc_thread_get_data (void) +{ + return thread_local_storage; +} + +/* Backend mutex functions */ + +/* Allocate a mutex. */ +static inline int +__gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Deallocate a mutex. */ +static inline int +__gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + /* There can only be one thread, so we always get the lock */ + return 0; +} + +/* Try to grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + /* There can only be one thread, so we always get the lock */ + return 0; +} + +/* Unlock the mutex */ +static inline int +__gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Backend condition mutex functions */ + +/* Allocate a condition. */ +static inline int +__gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Deallocate a condition. */ +static inline int +__gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wait on the condition */ +static inline int +__gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED, + objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wake up all threads waiting on this condition. */ +static inline int +__gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wake up one thread waiting on this condition. */ +static inline int +__gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +#else /* _LIBOBJC */ + +static inline int +__gthread_active_p (void) +{ + return 0; +} + +static inline int +__gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int _GLIBCXX_UNUSED +__gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED) +{ + return 0; +} + +static int _GLIBCXX_UNUSED +__gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_destroy (__mutex); +} + +#endif /* _LIBOBJC */ + +#undef _GLIBCXX_UNUSED + +#endif /* ! _GLIBCXX_GCC_GTHR_SINGLE_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr.h new file mode 100644 index 000000000..5889966e6 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/gthr.h @@ -0,0 +1,154 @@ +/* Threads compatibility routines for libgcc2. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef _GLIBCXX_GCC_GTHR_H +#define _GLIBCXX_GCC_GTHR_H + +#ifndef _GLIBCXX_HIDE_EXPORTS +#pragma GCC visibility push(default) +#endif + +/* If this file is compiled with threads support, it must + #define __GTHREADS 1 + to indicate that threads support is present. Also it has define + function + int __gthread_active_p () + that returns 1 if thread system is active, 0 if not. + + The threads interface must define the following types: + __gthread_key_t + __gthread_once_t + __gthread_mutex_t + __gthread_recursive_mutex_t + + The threads interface must define the following macros: + + __GTHREAD_ONCE_INIT + to initialize __gthread_once_t + __GTHREAD_MUTEX_INIT + to initialize __gthread_mutex_t to get a fast + non-recursive mutex. + __GTHREAD_MUTEX_INIT_FUNCTION + to initialize __gthread_mutex_t to get a fast + non-recursive mutex. + Define this to a function which looks like this: + void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *) + Some systems can't initialize a mutex without a + function call. Don't define __GTHREAD_MUTEX_INIT in this case. + __GTHREAD_RECURSIVE_MUTEX_INIT + __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION + as above, but for a recursive mutex. + + The threads interface must define the following static functions: + + int __gthread_once (__gthread_once_t *once, void (*func) ()) + + int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *)) + int __gthread_key_delete (__gthread_key_t key) + + void *__gthread_getspecific (__gthread_key_t key) + int __gthread_setspecific (__gthread_key_t key, const void *ptr) + + int __gthread_mutex_destroy (__gthread_mutex_t *mutex); + int __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *mutex); + + int __gthread_mutex_lock (__gthread_mutex_t *mutex); + int __gthread_mutex_trylock (__gthread_mutex_t *mutex); + int __gthread_mutex_unlock (__gthread_mutex_t *mutex); + + int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex); + int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex); + int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex); + + The following are supported in POSIX threads only. They are required to + fix a deadlock in static initialization inside libsupc++. The header file + gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra + features are supported. + + Types: + __gthread_cond_t + + Macros: + __GTHREAD_COND_INIT + __GTHREAD_COND_INIT_FUNCTION + + Interface: + int __gthread_cond_broadcast (__gthread_cond_t *cond); + int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex); + int __gthread_cond_wait_recursive (__gthread_cond_t *cond, + __gthread_recursive_mutex_t *mutex); + + All functions returning int should return zero on success or the error + number. If the operation is not supported, -1 is returned. + + If the following are also defined, you should + #define __GTHREADS_CXX0X 1 + to enable the c++0x thread library. + + Types: + __gthread_t + __gthread_time_t + + Interface: + int __gthread_create (__gthread_t *thread, void *(*func) (void*), + void *args); + int __gthread_join (__gthread_t thread, void **value_ptr); + int __gthread_detach (__gthread_t thread); + int __gthread_equal (__gthread_t t1, __gthread_t t2); + __gthread_t __gthread_self (void); + int __gthread_yield (void); + + int __gthread_mutex_timedlock (__gthread_mutex_t *m, + const __gthread_time_t *abs_timeout); + int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m, + const __gthread_time_t *abs_time); + + int __gthread_cond_signal (__gthread_cond_t *cond); + int __gthread_cond_timedwait (__gthread_cond_t *cond, + __gthread_mutex_t *mutex, + const __gthread_time_t *abs_timeout); + +*/ + +#if __GXX_WEAK__ +/* The pe-coff weak support isn't fully compatible to ELF's weak. + For static libraries it might would work, but as we need to deal + with shared versions too, we disable it for mingw-targets. */ +#ifdef __MINGW32__ +#undef _GLIBCXX_GTHREAD_USE_WEAK +#define _GLIBCXX_GTHREAD_USE_WEAK 0 +#endif + +#ifndef _GLIBCXX_GTHREAD_USE_WEAK +#define _GLIBCXX_GTHREAD_USE_WEAK 1 +#endif +#endif +#include + +#ifndef _GLIBCXX_HIDE_EXPORTS +#pragma GCC visibility pop +#endif + +#endif /* ! _GLIBCXX_GCC_GTHR_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/messages_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/messages_members.h new file mode 100644 index 000000000..7baec1c5a --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/messages_members.h @@ -0,0 +1,92 @@ +// std::messages implementation details, generic version -*- C++ -*- + +// Copyright (C) 2001-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/messages_members.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{locale} + */ + +// +// ISO C++ 14882: 22.2.7.1.2 messages virtual functions +// + +// Written by Benjamin Kosnik + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // Non-virtual member functions. + template + messages<_CharT>::messages(size_t __refs) + : facet(__refs) + { _M_c_locale_messages = _S_get_c_locale(); } + + template + messages<_CharT>::messages(__c_locale, const char*, size_t __refs) + : facet(__refs) + { _M_c_locale_messages = _S_get_c_locale(); } + + template + typename messages<_CharT>::catalog + messages<_CharT>::open(const basic_string& __s, const locale& __loc, + const char*) const + { return this->do_open(__s, __loc); } + + // Virtual member functions. + template + messages<_CharT>::~messages() + { _S_destroy_c_locale(_M_c_locale_messages); } + + template + typename messages<_CharT>::catalog + messages<_CharT>::do_open(const basic_string&, const locale&) const + { return 0; } + + template + typename messages<_CharT>::string_type + messages<_CharT>::do_get(catalog, int, int, + const string_type& __dfault) const + { return __dfault; } + + template + void + messages<_CharT>::do_close(catalog) const + { } + + // messages_byname + template + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) + : messages<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_messages); + this->_S_create_c_locale(this->_M_c_locale_messages, __s); + } + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/opt_random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/opt_random.h new file mode 100644 index 000000000..5e2b7b103 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/opt_random.h @@ -0,0 +1,38 @@ +// Optimizations for random number handling, generic version -*- C++ -*- + +// Copyright (C) 2012-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/opt_random.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{random} + */ + +#ifndef _BITS_OPT_RANDOM_H +#define _BITS_OPT_RANDOM_H 1 + +#pragma GCC system_header + + + + +#endif // _BITS_OPT_RANDOM_H diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/os_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/os_defines.h new file mode 100644 index 000000000..a54dd98f9 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/os_defines.h @@ -0,0 +1,61 @@ +// Specific definitions for newlib -*- C++ -*- + +// Copyright (C) 2000-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/os_defines.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{iosfwd} + */ + +#ifndef _GLIBCXX_OS_DEFINES +#define _GLIBCXX_OS_DEFINES 1 + +// System-specific #define, typedefs, corrections, etc, go here. This +// file will come before all others. + +#ifdef __CYGWIN__ +#define _GLIBCXX_GTHREAD_USE_WEAK 0 + +#if defined (_GLIBCXX_DLL) +#define _GLIBCXX_PSEUDO_VISIBILITY_default __attribute__ ((__dllimport__)) +#else +#define _GLIBCXX_PSEUDO_VISIBILITY_default +#endif +#define _GLIBCXX_PSEUDO_VISIBILITY_hidden + +#define _GLIBCXX_PSEUDO_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY_ ## V + +// See libstdc++/20806. +#define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1 + +// Enable use of GetModuleHandleEx (requires Windows XP/2003) in +// __cxa_thread_atexit to prevent modules from being unloaded before +// their dtors are called +#define _GLIBCXX_THREAD_ATEXIT_WIN32 1 + +// See libstdc++/69506 +#define _GLIBCXX_USE_WEAK_REF 0 + +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/stdc++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/stdc++.h new file mode 100644 index 000000000..262743a3c --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/stdc++.h @@ -0,0 +1,123 @@ +// C++ includes used for precompiling -*- C++ -*- + +// Copyright (C) 2003-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file stdc++.h + * This is an implementation file for a precompiled header. + */ + +// 17.4.1.2 Headers + +// C +#ifndef _GLIBCXX_NO_ASSERT +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __cplusplus >= 201103L +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +// C++ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __cplusplus >= 201103L +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +#if __cplusplus >= 201402L +#include +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/stdtr1c++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/stdtr1c++.h new file mode 100644 index 000000000..9e6a5c230 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/stdtr1c++.h @@ -0,0 +1,53 @@ +// C++ includes used for precompiling TR1 -*- C++ -*- + +// Copyright (C) 2006-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file stdtr1c++.h + * This is an implementation file for a precompiled header. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/time_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/time_members.h new file mode 100644 index 000000000..c77c4685b --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/bits/time_members.h @@ -0,0 +1,92 @@ +// std::time_get, std::time_put implementation, generic version -*- C++ -*- + +// Copyright (C) 2001-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/time_members.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{locale} + */ + +// +// ISO C++ 14882: 22.2.5.1.2 - time_get functions +// ISO C++ 14882: 22.2.5.3.2 - time_put functions +// + +// Written by Benjamin Kosnik + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + __timepunct<_CharT>::__timepunct(size_t __refs) + : facet(__refs), _M_data(0) + { + _M_name_timepunct = _S_get_c_name(); + _M_initialize_timepunct(); + } + + template + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) + : facet(__refs), _M_data(__cache) + { + _M_name_timepunct = _S_get_c_name(); + _M_initialize_timepunct(); + } + + template + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, + size_t __refs) + : facet(__refs), _M_data(0) + { + if (__builtin_strcmp(__s, _S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + _M_name_timepunct = __tmp; + } + else + _M_name_timepunct = _S_get_c_name(); + + __try + { _M_initialize_timepunct(__cloc); } + __catch(...) + { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; + __throw_exception_again; + } + } + + template + __timepunct<_CharT>::~__timepunct() + { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; + delete _M_data; + _S_destroy_c_locale(_M_c_locale_timepunct); + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/ext/opt_random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/ext/opt_random.h new file mode 100644 index 000000000..2150f5826 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/be/ext/opt_random.h @@ -0,0 +1,38 @@ +// Optimizations for random number extensions, generic version -*- C++ -*- + +// Copyright (C) 2012-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file ext/opt_random.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{ext/random} + */ + +#ifndef _EXT_OPT_RANDOM_H +#define _EXT_OPT_RANDOM_H 1 + +#pragma GCC system_header + + + + +#endif // _EXT_OPT_RANDOM_H diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/atomic_word.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/atomic_word.h new file mode 100644 index 000000000..6d2110513 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/atomic_word.h @@ -0,0 +1,40 @@ +// Low-level type for atomic operations -*- C++ -*- + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file atomic_word.h + * This file is a GNU extension to the Standard C++ Library. + */ + +#ifndef _GLIBCXX_ATOMIC_WORD_H +#define _GLIBCXX_ATOMIC_WORD_H 1 + +typedef int _Atomic_word; + + +// This is a memory order acquire fence. +#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE) +// This is a memory order release fence. +#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE) + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/basic_file.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/basic_file.h new file mode 100644 index 000000000..f959ea534 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/basic_file.h @@ -0,0 +1,130 @@ +// Wrapper of C-language FILE struct -*- C++ -*- + +// Copyright (C) 2000-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// +// ISO C++ 14882: 27.8 File-based streams +// + +/** @file bits/basic_file.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{ios} + */ + +#ifndef _GLIBCXX_BASIC_FILE_STDIO_H +#define _GLIBCXX_BASIC_FILE_STDIO_H 1 + +#pragma GCC system_header + +#include +#include // for __c_lock and __c_file +#include // for swap +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // Generic declaration. + template + class __basic_file; + + // Specialization. + template<> + class __basic_file + { + // Underlying data source/sink. + __c_file* _M_cfile; + + // True iff we opened _M_cfile, and thus must close it ourselves. + bool _M_cfile_created; + + public: + __basic_file(__c_lock* __lock = 0) throw (); + +#if __cplusplus >= 201103L + __basic_file(__basic_file&& __rv, __c_lock* __lock = 0) noexcept + : _M_cfile(__rv._M_cfile), _M_cfile_created(__rv._M_cfile_created) + { + __rv._M_cfile = nullptr; + __rv._M_cfile_created = false; + } + + __basic_file& operator=(const __basic_file&) = delete; + __basic_file& operator=(__basic_file&&) = delete; + + void + swap(__basic_file& __f) noexcept + { + std::swap(_M_cfile, __f._M_cfile); + std::swap(_M_cfile_created, __f._M_cfile_created); + } +#endif + + __basic_file* + open(const char* __name, ios_base::openmode __mode, int __prot = 0664); + + __basic_file* + sys_open(__c_file* __file, ios_base::openmode); + + __basic_file* + sys_open(int __fd, ios_base::openmode __mode) throw (); + + __basic_file* + close(); + + _GLIBCXX_PURE bool + is_open() const throw (); + + _GLIBCXX_PURE int + fd() throw (); + + _GLIBCXX_PURE __c_file* + file() throw (); + + ~__basic_file(); + + streamsize + xsputn(const char* __s, streamsize __n); + + streamsize + xsputn_2(const char* __s1, streamsize __n1, + const char* __s2, streamsize __n2); + + streamsize + xsgetn(char* __s, streamsize __n); + + streamoff + seekoff(streamoff __off, ios_base::seekdir __way) throw (); + + int + sync(); + + streamsize + showmanyc(); + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++allocator.h new file mode 100644 index 000000000..3d2bb6788 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++allocator.h @@ -0,0 +1,55 @@ +// Base to std::allocator -*- C++ -*- + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/c++allocator.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{memory} + */ + +#ifndef _GLIBCXX_CXX_ALLOCATOR_H +#define _GLIBCXX_CXX_ALLOCATOR_H 1 + +#include + +#if __cplusplus >= 201103L +namespace std +{ + /** + * @brief An alias to the base class for std::allocator. + * @ingroup allocators + * + * Used to set the std::allocator base class to + * __gnu_cxx::new_allocator. + * + * @tparam _Tp Type of allocated object. + */ + template + using __allocator_base = __gnu_cxx::new_allocator<_Tp>; +} +#else +// Define new_allocator as the base class to std::allocator. +# define __allocator_base __gnu_cxx::new_allocator +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++config.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++config.h new file mode 100644 index 000000000..050d87ac0 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++config.h @@ -0,0 +1,1956 @@ +// Predefined symbols and macros -*- C++ -*- + +// Copyright (C) 1997-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/c++config.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{iosfwd} + */ + +#ifndef _GLIBCXX_CXX_CONFIG_H +#define _GLIBCXX_CXX_CONFIG_H 1 + +// The major release number for the GCC release the C++ library belongs to. +#define _GLIBCXX_RELEASE 7 + +// The datestamp of the C++ library in compressed ISO date format. +#define __GLIBCXX__ 20170502 + +// Macros for various attributes. +// _GLIBCXX_PURE +// _GLIBCXX_CONST +// _GLIBCXX_NORETURN +// _GLIBCXX_NOTHROW +// _GLIBCXX_VISIBILITY +#ifndef _GLIBCXX_PURE +# define _GLIBCXX_PURE __attribute__ ((__pure__)) +#endif + +#ifndef _GLIBCXX_CONST +# define _GLIBCXX_CONST __attribute__ ((__const__)) +#endif + +#ifndef _GLIBCXX_NORETURN +# define _GLIBCXX_NORETURN __attribute__ ((__noreturn__)) +#endif + +// See below for C++ +#ifndef _GLIBCXX_NOTHROW +# ifndef __cplusplus +# define _GLIBCXX_NOTHROW __attribute__((__nothrow__)) +# endif +#endif + +// Macros for visibility attributes. +// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY +// _GLIBCXX_VISIBILITY +# define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1 + +#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY +# define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V))) +#else +// If this is not supplied by the OS-specific or CPU-specific +// headers included below, it will be defined to an empty default. +# define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V) +#endif + +// Macros for deprecated attributes. +// _GLIBCXX_USE_DEPRECATED +// _GLIBCXX_DEPRECATED +#ifndef _GLIBCXX_USE_DEPRECATED +# define _GLIBCXX_USE_DEPRECATED 1 +#endif + +#if defined(__DEPRECATED) && (__cplusplus >= 201103L) +# define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__)) +#else +# define _GLIBCXX_DEPRECATED +#endif + +// Macros for ABI tag attributes. +#ifndef _GLIBCXX_ABI_TAG_CXX11 +# define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ ("cxx11"))) +#endif + + +#if __cplusplus + +// Macro for constexpr, to support in mixed 03/0x mode. +#ifndef _GLIBCXX_CONSTEXPR +# if __cplusplus >= 201103L +# define _GLIBCXX_CONSTEXPR constexpr +# define _GLIBCXX_USE_CONSTEXPR constexpr +# else +# define _GLIBCXX_CONSTEXPR +# define _GLIBCXX_USE_CONSTEXPR const +# endif +#endif + +#ifndef _GLIBCXX14_CONSTEXPR +# if __cplusplus >= 201402L +# define _GLIBCXX14_CONSTEXPR constexpr +# else +# define _GLIBCXX14_CONSTEXPR +# endif +#endif + +#ifndef _GLIBCXX17_CONSTEXPR +# if __cplusplus > 201402L +# define _GLIBCXX17_CONSTEXPR constexpr +# else +# define _GLIBCXX17_CONSTEXPR +# endif +#endif + +#ifndef _GLIBCXX17_INLINE +# if __cplusplus > 201402L +# define _GLIBCXX17_INLINE inline +# else +# define _GLIBCXX17_INLINE +# endif +#endif + +// Macro for noexcept, to support in mixed 03/0x mode. +#ifndef _GLIBCXX_NOEXCEPT +# if __cplusplus >= 201103L +# define _GLIBCXX_NOEXCEPT noexcept +# define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND) +# define _GLIBCXX_USE_NOEXCEPT noexcept +# define _GLIBCXX_THROW(_EXC) +# else +# define _GLIBCXX_NOEXCEPT +# define _GLIBCXX_NOEXCEPT_IF(_COND) +# define _GLIBCXX_USE_NOEXCEPT throw() +# define _GLIBCXX_THROW(_EXC) throw(_EXC) +# endif +#endif + +#ifndef _GLIBCXX_NOTHROW +# define _GLIBCXX_NOTHROW _GLIBCXX_USE_NOEXCEPT +#endif + +#ifndef _GLIBCXX_THROW_OR_ABORT +# if __cpp_exceptions +# define _GLIBCXX_THROW_OR_ABORT(_EXC) (throw (_EXC)) +# else +# define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort()) +# endif +#endif + +#if __cpp_noexcept_function_type +#define _GLIBCXX_NOEXCEPT_PARM , bool _NE +#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE) +#else +#define _GLIBCXX_NOEXCEPT_PARM +#define _GLIBCXX_NOEXCEPT_QUAL +#endif + +// Macro for extern template, ie controlling template linkage via use +// of extern keyword on template declaration. As documented in the g++ +// manual, it inhibits all implicit instantiations and is used +// throughout the library to avoid multiple weak definitions for +// required types that are already explicitly instantiated in the +// library binary. This substantially reduces the binary size of +// resulting executables. +// Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern +// templates only in basic_string, thus activating its debug-mode +// checks even at -O0. +# define _GLIBCXX_EXTERN_TEMPLATE 1 + +/* + Outline of libstdc++ namespaces. + + namespace std + { + namespace __debug { } + namespace __parallel { } + namespace __profile { } + namespace __cxx1998 { } + + namespace __detail { + namespace __variant { } // C++17 + } + + namespace rel_ops { } + + namespace tr1 + { + namespace placeholders { } + namespace regex_constants { } + namespace __detail { } + } + + namespace tr2 { } + + namespace decimal { } + + namespace chrono { } // C++11 + namespace placeholders { } // C++11 + namespace regex_constants { } // C++11 + namespace this_thread { } // C++11 + inline namespace literals { // C++14 + inline namespace chrono_literals { } // C++14 + inline namespace complex_literals { } // C++14 + inline namespace string_literals { } // C++14 + inline namespace string_view_literals { } // C++17 + } + } + + namespace abi { } + + namespace __gnu_cxx + { + namespace __detail { } + } + + For full details see: + http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html +*/ +namespace std +{ + typedef __SIZE_TYPE__ size_t; + typedef __PTRDIFF_TYPE__ ptrdiff_t; + +#if __cplusplus >= 201103L + typedef decltype(nullptr) nullptr_t; +#endif +} + +# define _GLIBCXX_USE_DUAL_ABI 1 + +#if ! _GLIBCXX_USE_DUAL_ABI +// Ignore any pre-defined value of _GLIBCXX_USE_CXX11_ABI +# undef _GLIBCXX_USE_CXX11_ABI +#endif + +#ifndef _GLIBCXX_USE_CXX11_ABI +# define _GLIBCXX_USE_CXX11_ABI 1 +#endif + +#if _GLIBCXX_USE_CXX11_ABI +namespace std +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} +namespace __gnu_cxx +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} +# define _GLIBCXX_NAMESPACE_CXX11 __cxx11:: +# define _GLIBCXX_BEGIN_NAMESPACE_CXX11 namespace __cxx11 { +# define _GLIBCXX_END_NAMESPACE_CXX11 } +# define _GLIBCXX_DEFAULT_ABI_TAG _GLIBCXX_ABI_TAG_CXX11 +#else +# define _GLIBCXX_NAMESPACE_CXX11 +# define _GLIBCXX_BEGIN_NAMESPACE_CXX11 +# define _GLIBCXX_END_NAMESPACE_CXX11 +# define _GLIBCXX_DEFAULT_ABI_TAG +#endif + + +// Defined if inline namespaces are used for versioning. +# define _GLIBCXX_INLINE_VERSION 0 + +// Inline namespace for symbol versioning. +#if _GLIBCXX_INLINE_VERSION + +namespace std +{ + inline namespace __7 { } + + namespace rel_ops { inline namespace __7 { } } + + namespace tr1 + { + inline namespace __7 { } + namespace placeholders { inline namespace __7 { } } + namespace regex_constants { inline namespace __7 { } } + namespace __detail { inline namespace __7 { } } + } + + namespace tr2 + { inline namespace __7 { } } + + namespace decimal { inline namespace __7 { } } + +#if __cplusplus >= 201103L + namespace chrono { inline namespace __7 { } } + namespace placeholders { inline namespace __7 { } } + namespace regex_constants { inline namespace __7 { } } + namespace this_thread { inline namespace __7 { } } + +#if __cplusplus >= 201402L + inline namespace literals { + inline namespace chrono_literals { inline namespace __7 { } } + inline namespace complex_literals { inline namespace __7 { } } + inline namespace string_literals { inline namespace __7 { } } +#if __cplusplus > 201402L + inline namespace string_view_literals { inline namespace __7 { } } +#endif // C++17 + } +#endif // C++14 +#endif // C++11 + + namespace __detail { + inline namespace __7 { } +#if __cplusplus > 201402L + namespace __variant { inline namespace __7 { } } +#endif + } +} + +namespace __gnu_cxx +{ + inline namespace __7 { } + namespace __detail { inline namespace __7 { } } +} +# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __7 { +# define _GLIBCXX_END_NAMESPACE_VERSION } +#else +# define _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_VERSION +#endif + + +// Inline namespaces for special modes: debug, parallel, profile. +#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) \ + || defined(_GLIBCXX_PROFILE) +namespace std +{ + // Non-inline namespace for components replaced by alternates in active mode. + namespace __cxx1998 + { +# if _GLIBCXX_INLINE_VERSION + inline namespace __7 { } +# endif + +# if _GLIBCXX_USE_CXX11_ABI + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +# endif + } + + // Inline namespace for debug mode. +# ifdef _GLIBCXX_DEBUG + inline namespace __debug { } +# endif + + // Inline namespaces for parallel mode. +# ifdef _GLIBCXX_PARALLEL + inline namespace __parallel { } +# endif + + // Inline namespaces for profile mode +# ifdef _GLIBCXX_PROFILE + inline namespace __profile { } +# endif +} + +// Check for invalid usage and unsupported mixed-mode use. +# if defined(_GLIBCXX_DEBUG) && defined(_GLIBCXX_PARALLEL) +# error illegal use of multiple inlined namespaces +# endif +# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_DEBUG) +# error illegal use of multiple inlined namespaces +# endif +# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_PARALLEL) +# error illegal use of multiple inlined namespaces +# endif + +// Check for invalid use due to lack for weak symbols. +# if __NO_INLINE__ && !__GXX_WEAK__ +# warning currently using inlined namespace mode which may fail \ + without inlining due to lack of weak symbols +# endif +#endif + +// Macros for namespace scope. Either namespace std:: or the name +// of some nested namespace within it corresponding to the active mode. +// _GLIBCXX_STD_A +// _GLIBCXX_STD_C +// +// Macros for opening/closing conditional namespaces. +// _GLIBCXX_BEGIN_NAMESPACE_ALGO +// _GLIBCXX_END_NAMESPACE_ALGO +// _GLIBCXX_BEGIN_NAMESPACE_CONTAINER +// _GLIBCXX_END_NAMESPACE_CONTAINER +#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE) +# define _GLIBCXX_STD_C __cxx1998 +# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \ + namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_CONTAINER \ + _GLIBCXX_END_NAMESPACE_VERSION } +#else +# define _GLIBCXX_STD_C std +# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION +#endif + +#ifdef _GLIBCXX_PARALLEL +# define _GLIBCXX_STD_A __cxx1998 +# define _GLIBCXX_BEGIN_NAMESPACE_ALGO \ + namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_ALGO \ + _GLIBCXX_END_NAMESPACE_VERSION } +#else +# define _GLIBCXX_STD_A std +# define _GLIBCXX_BEGIN_NAMESPACE_ALGO _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_ALGO _GLIBCXX_END_NAMESPACE_VERSION +#endif + +// GLIBCXX_ABI Deprecated +// Define if compatibility should be provided for -mlong-double-64. +#undef _GLIBCXX_LONG_DOUBLE_COMPAT + +// Inline namespace for long double 128 mode. +#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ +namespace std +{ + inline namespace __gnu_cxx_ldbl128 { } +} +# define _GLIBCXX_NAMESPACE_LDBL __gnu_cxx_ldbl128:: +# define _GLIBCXX_BEGIN_NAMESPACE_LDBL namespace __gnu_cxx_ldbl128 { +# define _GLIBCXX_END_NAMESPACE_LDBL } +#else +# define _GLIBCXX_NAMESPACE_LDBL +# define _GLIBCXX_BEGIN_NAMESPACE_LDBL +# define _GLIBCXX_END_NAMESPACE_LDBL +#endif +#if _GLIBCXX_USE_CXX11_ABI +# define _GLIBCXX_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_NAMESPACE_CXX11 +# define _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_CXX11 +# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_CXX11 +#else +# define _GLIBCXX_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_NAMESPACE_LDBL +# define _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_LDBL +# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL +#endif + +// Debug Mode implies checking assertions. +#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS) +# define _GLIBCXX_ASSERTIONS 1 +#endif + +// Disable std::string explicit instantiation declarations in order to assert. +#ifdef _GLIBCXX_ASSERTIONS +# undef _GLIBCXX_EXTERN_TEMPLATE +# define _GLIBCXX_EXTERN_TEMPLATE -1 +#endif + +// Assert. +#if defined(_GLIBCXX_ASSERTIONS) \ + || defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS) +namespace std +{ + // Avoid the use of assert, because we're trying to keep the + // include out of the mix. + inline void + __replacement_assert(const char* __file, int __line, + const char* __function, const char* __condition) + { + __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line, + __function, __condition); + __builtin_abort(); + } +} +#define __glibcxx_assert_impl(_Condition) \ + do \ + { \ + if (! (_Condition)) \ + std::__replacement_assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, \ + #_Condition); \ + } while (false) +#endif + +#if defined(_GLIBCXX_ASSERTIONS) +# define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition) +#else +# define __glibcxx_assert(_Condition) +#endif + +// Macros for race detectors. +// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and +// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain +// atomic (lock-free) synchronization to race detectors: +// the race detector will infer a happens-before arc from the former to the +// latter when they share the same argument pointer. +// +// The most frequent use case for these macros (and the only case in the +// current implementation of the library) is atomic reference counting: +// void _M_remove_reference() +// { +// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount); +// if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) +// { +// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&this->_M_refcount); +// _M_destroy(__a); +// } +// } +// The annotations in this example tell the race detector that all memory +// accesses occurred when the refcount was positive do not race with +// memory accesses which occurred after the refcount became zero. +#ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE +# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) +#endif +#ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER +# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) +#endif + +// Macros for C linkage: define extern "C" linkage only when using C++. +# define _GLIBCXX_BEGIN_EXTERN_C extern "C" { +# define _GLIBCXX_END_EXTERN_C } + +# define _GLIBCXX_USE_ALLOCATOR_NEW 1 + +#else // !__cplusplus +# define _GLIBCXX_BEGIN_EXTERN_C +# define _GLIBCXX_END_EXTERN_C +#endif + + +// First includes. + +// Pick up any OS-specific definitions. +#include + +// Pick up any CPU-specific definitions. +#include + +// If platform uses neither visibility nor psuedo-visibility, +// specify empty default for namespace annotation macros. +#ifndef _GLIBCXX_PSEUDO_VISIBILITY +# define _GLIBCXX_PSEUDO_VISIBILITY(V) +#endif + +// Certain function definitions that are meant to be overridable from +// user code are decorated with this macro. For some targets, this +// macro causes these definitions to be weak. +#ifndef _GLIBCXX_WEAK_DEFINITION +# define _GLIBCXX_WEAK_DEFINITION +#endif + +// By default, we assume that __GXX_WEAK__ also means that there is support +// for declaring functions as weak while not defining such functions. This +// allows for referring to functions provided by other libraries (e.g., +// libitm) without depending on them if the respective features are not used. +#ifndef _GLIBCXX_USE_WEAK_REF +# define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__ +#endif + +// Conditionally enable annotations for the Transactional Memory TS on C++11. +// Most of the following conditions are due to limitations in the current +// implementation. +#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \ + && _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201505L \ + && !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF \ + && _GLIBCXX_USE_ALLOCATOR_NEW +#define _GLIBCXX_TXN_SAFE transaction_safe +#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic +#else +#define _GLIBCXX_TXN_SAFE +#define _GLIBCXX_TXN_SAFE_DYN +#endif + +#if __cplusplus > 201402L +// In C++17 mathematical special functions are in namespace std. +# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 +#elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0 +// For C++11 and C++14 they are in namespace std when requested. +# define _GLIBCXX_USE_STD_SPEC_FUNCS 1 +#endif + +// The remainder of the prewritten config is automatic; all the +// user hooks are listed above. + +// Create a boolean flag to be used to determine if --fast-math is set. +#ifdef __FAST_MATH__ +# define _GLIBCXX_FAST_MATH 1 +#else +# define _GLIBCXX_FAST_MATH 0 +#endif + +// This marks string literals in header files to be extracted for eventual +// translation. It is primarily used for messages in thrown exceptions; see +// src/functexcept.cc. We use __N because the more traditional _N is used +// for something else under certain OSes (see BADNAMES). +#define __N(msgid) (msgid) + +// For example, is known to #define min and max as macros... +#undef min +#undef max + +// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally +// so they should be tested with #if not with #ifdef. +#if __cplusplus >= 201103L +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR +# endif +#else +# ifndef _GLIBCXX_USE_C99_MATH +# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH +# endif +# ifndef _GLIBCXX_USE_C99_COMPLEX +# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX +# endif +# ifndef _GLIBCXX_USE_C99_STDIO +# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO +# endif +# ifndef _GLIBCXX_USE_C99_STDLIB +# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB +# endif +# ifndef _GLIBCXX_USE_C99_WCHAR +# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR +# endif +#endif + +// End of prewritten config; the settings discovered at configure time follow. +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the `acosf' function. */ +#define _GLIBCXX_HAVE_ACOSF 1 + +/* Define to 1 if you have the `acosl' function. */ +/* #undef _GLIBCXX_HAVE_ACOSL */ + +/* Define to 1 if you have the `aligned_alloc' function. */ +/* #undef _GLIBCXX_HAVE_ALIGNED_ALLOC */ + +/* Define to 1 if you have the `asinf' function. */ +#define _GLIBCXX_HAVE_ASINF 1 + +/* Define to 1 if you have the `asinl' function. */ +/* #undef _GLIBCXX_HAVE_ASINL */ + +/* Define to 1 if the target assembler supports .symver directive. */ +#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1 + +/* Define to 1 if you have the `atan2f' function. */ +#define _GLIBCXX_HAVE_ATAN2F 1 + +/* Define to 1 if you have the `atan2l' function. */ +/* #undef _GLIBCXX_HAVE_ATAN2L */ + +/* Define to 1 if you have the `atanf' function. */ +#define _GLIBCXX_HAVE_ATANF 1 + +/* Define to 1 if you have the `atanl' function. */ +/* #undef _GLIBCXX_HAVE_ATANL */ + +/* Define to 1 if you have the `at_quick_exit' function. */ +/* #undef _GLIBCXX_HAVE_AT_QUICK_EXIT */ + +/* Define to 1 if the target assembler supports thread-local storage. */ +/* #undef _GLIBCXX_HAVE_CC_TLS */ + +/* Define to 1 if you have the `ceilf' function. */ +#define _GLIBCXX_HAVE_CEILF 1 + +/* Define to 1 if you have the `ceill' function. */ +/* #undef _GLIBCXX_HAVE_CEILL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_COMPLEX_H 1 + +/* Define to 1 if you have the `cosf' function. */ +#define _GLIBCXX_HAVE_COSF 1 + +/* Define to 1 if you have the `coshf' function. */ +#define _GLIBCXX_HAVE_COSHF 1 + +/* Define to 1 if you have the `coshl' function. */ +/* #undef _GLIBCXX_HAVE_COSHL */ + +/* Define to 1 if you have the `cosl' function. */ +/* #undef _GLIBCXX_HAVE_COSL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_DLFCN_H */ + +/* Define if EBADMSG exists. */ +#define _GLIBCXX_HAVE_EBADMSG 1 + +/* Define if ECANCELED exists. */ +#define _GLIBCXX_HAVE_ECANCELED 1 + +/* Define if ECHILD exists. */ +#define _GLIBCXX_HAVE_ECHILD 1 + +/* Define if EIDRM exists. */ +#define _GLIBCXX_HAVE_EIDRM 1 + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_ENDIAN_H */ + +/* Define if ENODATA exists. */ +#define _GLIBCXX_HAVE_ENODATA 1 + +/* Define if ENOLINK exists. */ +#define _GLIBCXX_HAVE_ENOLINK 1 + +/* Define if ENOSPC exists. */ +#define _GLIBCXX_HAVE_ENOSPC 1 + +/* Define if ENOSR exists. */ +#define _GLIBCXX_HAVE_ENOSR 1 + +/* Define if ENOSTR exists. */ +#define _GLIBCXX_HAVE_ENOSTR 1 + +/* Define if ENOTRECOVERABLE exists. */ +#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1 + +/* Define if ENOTSUP exists. */ +#define _GLIBCXX_HAVE_ENOTSUP 1 + +/* Define if EOVERFLOW exists. */ +#define _GLIBCXX_HAVE_EOVERFLOW 1 + +/* Define if EOWNERDEAD exists. */ +#define _GLIBCXX_HAVE_EOWNERDEAD 1 + +/* Define if EPERM exists. */ +#define _GLIBCXX_HAVE_EPERM 1 + +/* Define if EPROTO exists. */ +#define _GLIBCXX_HAVE_EPROTO 1 + +/* Define if ETIME exists. */ +#define _GLIBCXX_HAVE_ETIME 1 + +/* Define if ETIMEDOUT exists. */ +#define _GLIBCXX_HAVE_ETIMEDOUT 1 + +/* Define if ETXTBSY exists. */ +#define _GLIBCXX_HAVE_ETXTBSY 1 + +/* Define if EWOULDBLOCK exists. */ +#define _GLIBCXX_HAVE_EWOULDBLOCK 1 + +/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */ +/* #undef _GLIBCXX_HAVE_EXCEPTION_PTR_SINCE_GCC46 */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_EXECINFO_H */ + +/* Define to 1 if you have the `expf' function. */ +#define _GLIBCXX_HAVE_EXPF 1 + +/* Define to 1 if you have the `expl' function. */ +/* #undef _GLIBCXX_HAVE_EXPL */ + +/* Define to 1 if you have the `fabsf' function. */ +#define _GLIBCXX_HAVE_FABSF 1 + +/* Define to 1 if you have the `fabsl' function. */ +/* #undef _GLIBCXX_HAVE_FABSL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_FCNTL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_FENV_H */ + +/* Define to 1 if you have the `finite' function. */ +/* #undef _GLIBCXX_HAVE_FINITE */ + +/* Define to 1 if you have the `finitef' function. */ +/* #undef _GLIBCXX_HAVE_FINITEF */ + +/* Define to 1 if you have the `finitel' function. */ +/* #undef _GLIBCXX_HAVE_FINITEL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_FLOAT_H 1 + +/* Define to 1 if you have the `floorf' function. */ +#define _GLIBCXX_HAVE_FLOORF 1 + +/* Define to 1 if you have the `floorl' function. */ +/* #undef _GLIBCXX_HAVE_FLOORL */ + +/* Define to 1 if you have the `fmodf' function. */ +#define _GLIBCXX_HAVE_FMODF 1 + +/* Define to 1 if you have the `fmodl' function. */ +/* #undef _GLIBCXX_HAVE_FMODL */ + +/* Define to 1 if you have the `fpclass' function. */ +/* #undef _GLIBCXX_HAVE_FPCLASS */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_FP_H */ + +/* Define to 1 if you have the `frexpf' function. */ +#define _GLIBCXX_HAVE_FREXPF 1 + +/* Define to 1 if you have the `frexpl' function. */ +/* #undef _GLIBCXX_HAVE_FREXPL */ + +/* Define if _Unwind_GetIPInfo is available. */ +#define _GLIBCXX_HAVE_GETIPINFO 1 + +/* Define if gets is available in before C++14. */ +#define _GLIBCXX_HAVE_GETS 1 + +/* Define to 1 if you have the `hypot' function. */ +#define _GLIBCXX_HAVE_HYPOT 1 + +/* Define to 1 if you have the `hypotf' function. */ +/* #undef _GLIBCXX_HAVE_HYPOTF */ + +/* Define to 1 if you have the `hypotl' function. */ +/* #undef _GLIBCXX_HAVE_HYPOTL */ + +/* Define if you have the iconv() function. */ +#define _GLIBCXX_HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_IEEEFP_H 1 + +/* Define if int64_t is available in . */ +#define _GLIBCXX_HAVE_INT64_T 1 + +/* Define if int64_t is a long. */ +/* #undef _GLIBCXX_HAVE_INT64_T_LONG */ + +/* Define if int64_t is a long long. */ +#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `isinf' function. */ +/* #undef _GLIBCXX_HAVE_ISINF */ + +/* Define to 1 if you have the `isinff' function. */ +/* #undef _GLIBCXX_HAVE_ISINFF */ + +/* Define to 1 if you have the `isinfl' function. */ +/* #undef _GLIBCXX_HAVE_ISINFL */ + +/* Define to 1 if you have the `isnan' function. */ +/* #undef _GLIBCXX_HAVE_ISNAN */ + +/* Define to 1 if you have the `isnanf' function. */ +/* #undef _GLIBCXX_HAVE_ISNANF */ + +/* Define to 1 if you have the `isnanl' function. */ +/* #undef _GLIBCXX_HAVE_ISNANL */ + +/* Defined if iswblank exists. */ +#define _GLIBCXX_HAVE_ISWBLANK 1 + +/* Define if LC_MESSAGES is available in . */ +#define _GLIBCXX_HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the `ldexpf' function. */ +#define _GLIBCXX_HAVE_LDEXPF 1 + +/* Define to 1 if you have the `ldexpl' function. */ +/* #undef _GLIBCXX_HAVE_LDEXPL */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_LIBINTL_H */ + +/* Only used in build directory testsuite_hooks.h. */ +#define _GLIBCXX_HAVE_LIMIT_AS 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define _GLIBCXX_HAVE_LIMIT_DATA 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define _GLIBCXX_HAVE_LIMIT_FSIZE 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define _GLIBCXX_HAVE_LIMIT_RSS 0 + +/* Only used in build directory testsuite_hooks.h. */ +#define _GLIBCXX_HAVE_LIMIT_VMEM 0 + +/* Define if futex syscall is available. */ +/* #undef _GLIBCXX_HAVE_LINUX_FUTEX */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_LOCALE_H 1 + +/* Define to 1 if you have the `log10f' function. */ +#define _GLIBCXX_HAVE_LOG10F 1 + +/* Define to 1 if you have the `log10l' function. */ +/* #undef _GLIBCXX_HAVE_LOG10L */ + +/* Define to 1 if you have the `logf' function. */ +#define _GLIBCXX_HAVE_LOGF 1 + +/* Define to 1 if you have the `logl' function. */ +/* #undef _GLIBCXX_HAVE_LOGL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_MACHINE_ENDIAN_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_MACHINE_PARAM_H 1 + +/* Define if mbstate_t exists in wchar.h. */ +#define _GLIBCXX_HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the `memalign' function. */ +#define _GLIBCXX_HAVE_MEMALIGN 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `modf' function. */ +/* #undef _GLIBCXX_HAVE_MODF */ + +/* Define to 1 if you have the `modff' function. */ +#define _GLIBCXX_HAVE_MODFF 1 + +/* Define to 1 if you have the `modfl' function. */ +/* #undef _GLIBCXX_HAVE_MODFL */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_NAN_H */ + +/* Define if defines obsolete isinf function. */ +/* #undef _GLIBCXX_HAVE_OBSOLETE_ISINF */ + +/* Define if defines obsolete isnan function. */ +/* #undef _GLIBCXX_HAVE_OBSOLETE_ISNAN */ + +/* Define if poll is available in . */ +/* #undef _GLIBCXX_HAVE_POLL */ + +/* Define to 1 if you have the `posix_memalign' function. */ +/* #undef _GLIBCXX_HAVE_POSIX_MEMALIGN */ + +/* Define to 1 if you have the `powf' function. */ +#define _GLIBCXX_HAVE_POWF 1 + +/* Define to 1 if you have the `powl' function. */ +/* #undef _GLIBCXX_HAVE_POWL */ + +/* Define to 1 if you have the `qfpclass' function. */ +/* #undef _GLIBCXX_HAVE_QFPCLASS */ + +/* Define to 1 if you have the `quick_exit' function. */ +/* #undef _GLIBCXX_HAVE_QUICK_EXIT */ + +/* Define to 1 if you have the `setenv' function. */ +/* #undef _GLIBCXX_HAVE_SETENV */ + +/* Define to 1 if you have the `sincos' function. */ +/* #undef _GLIBCXX_HAVE_SINCOS */ + +/* Define to 1 if you have the `sincosf' function. */ +/* #undef _GLIBCXX_HAVE_SINCOSF */ + +/* Define to 1 if you have the `sincosl' function. */ +/* #undef _GLIBCXX_HAVE_SINCOSL */ + +/* Define to 1 if you have the `sinf' function. */ +#define _GLIBCXX_HAVE_SINF 1 + +/* Define to 1 if you have the `sinhf' function. */ +#define _GLIBCXX_HAVE_SINHF 1 + +/* Define to 1 if you have the `sinhl' function. */ +/* #undef _GLIBCXX_HAVE_SINHL */ + +/* Define to 1 if you have the `sinl' function. */ +/* #undef _GLIBCXX_HAVE_SINL */ + +/* Defined if sleep exists. */ +#define _GLIBCXX_HAVE_SLEEP 1 + +/* Define to 1 if you have the `sqrtf' function. */ +#define _GLIBCXX_HAVE_SQRTF 1 + +/* Define to 1 if you have the `sqrtl' function. */ +/* #undef _GLIBCXX_HAVE_SQRTL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STDALIGN_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STDLIB_H 1 + +/* Define if strerror_l is available in . */ +/* #undef _GLIBCXX_HAVE_STRERROR_L */ + +/* Define if strerror_r is available in . */ +#define _GLIBCXX_HAVE_STRERROR_R 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtof' function. */ +#define _GLIBCXX_HAVE_STRTOF 1 + +/* Define to 1 if you have the `strtold' function. */ +/* #undef _GLIBCXX_HAVE_STRTOLD */ + +/* Define to 1 if `d_type' is a member of `struct dirent'. */ +#define _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE 1 + +/* Define if strxfrm_l is available in . */ +/* #undef _GLIBCXX_HAVE_STRXFRM_L */ + +/* Define to 1 if the target runtime linker supports binding the same symbol + to different versions. */ +/* #undef _GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_FILIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_IOCTL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_IPC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have a suitable header file */ +/* #undef _GLIBCXX_HAVE_SYS_SDT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_SEM_H */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_STATVFS_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_SYSINFO_H */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_SYS_UIO_H */ + +/* Define if S_IFREG is available in . */ +/* #undef _GLIBCXX_HAVE_S_IFREG */ + +/* Define if S_ISREG is available in . */ +#define _GLIBCXX_HAVE_S_ISREG 1 + +/* Define to 1 if you have the `tanf' function. */ +#define _GLIBCXX_HAVE_TANF 1 + +/* Define to 1 if you have the `tanhf' function. */ +#define _GLIBCXX_HAVE_TANHF 1 + +/* Define to 1 if you have the `tanhl' function. */ +/* #undef _GLIBCXX_HAVE_TANHL */ + +/* Define to 1 if you have the `tanl' function. */ +/* #undef _GLIBCXX_HAVE_TANL */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_TGMATH_H 1 + +/* Define to 1 if the target supports thread-local storage. */ +/* #undef _GLIBCXX_HAVE_TLS */ + +/* Define to 1 if you have the header file. */ +/* #undef _GLIBCXX_HAVE_UCHAR_H */ + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_UNISTD_H 1 + +/* Defined if usleep exists. */ +#define _GLIBCXX_HAVE_USLEEP 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_UTIME_H 1 + +/* Defined if vfwscanf exists. */ +#define _GLIBCXX_HAVE_VFWSCANF 1 + +/* Defined if vswscanf exists. */ +#define _GLIBCXX_HAVE_VSWSCANF 1 + +/* Defined if vwscanf exists. */ +#define _GLIBCXX_HAVE_VWSCANF 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_WCHAR_H 1 + +/* Defined if wcstof exists. */ +#define _GLIBCXX_HAVE_WCSTOF 1 + +/* Define to 1 if you have the header file. */ +#define _GLIBCXX_HAVE_WCTYPE_H 1 + +/* Defined if Sleep exists. */ +/* #undef _GLIBCXX_HAVE_WIN32_SLEEP */ + +/* Define if writev is available in . */ +/* #undef _GLIBCXX_HAVE_WRITEV */ + +/* Define to 1 if you have the `_acosf' function. */ +/* #undef _GLIBCXX_HAVE__ACOSF */ + +/* Define to 1 if you have the `_acosl' function. */ +/* #undef _GLIBCXX_HAVE__ACOSL */ + +/* Define to 1 if you have the `_aligned_malloc' function. */ +/* #undef _GLIBCXX_HAVE__ALIGNED_MALLOC */ + +/* Define to 1 if you have the `_asinf' function. */ +/* #undef _GLIBCXX_HAVE__ASINF */ + +/* Define to 1 if you have the `_asinl' function. */ +/* #undef _GLIBCXX_HAVE__ASINL */ + +/* Define to 1 if you have the `_atan2f' function. */ +/* #undef _GLIBCXX_HAVE__ATAN2F */ + +/* Define to 1 if you have the `_atan2l' function. */ +/* #undef _GLIBCXX_HAVE__ATAN2L */ + +/* Define to 1 if you have the `_atanf' function. */ +/* #undef _GLIBCXX_HAVE__ATANF */ + +/* Define to 1 if you have the `_atanl' function. */ +/* #undef _GLIBCXX_HAVE__ATANL */ + +/* Define to 1 if you have the `_ceilf' function. */ +/* #undef _GLIBCXX_HAVE__CEILF */ + +/* Define to 1 if you have the `_ceill' function. */ +/* #undef _GLIBCXX_HAVE__CEILL */ + +/* Define to 1 if you have the `_cosf' function. */ +/* #undef _GLIBCXX_HAVE__COSF */ + +/* Define to 1 if you have the `_coshf' function. */ +/* #undef _GLIBCXX_HAVE__COSHF */ + +/* Define to 1 if you have the `_coshl' function. */ +/* #undef _GLIBCXX_HAVE__COSHL */ + +/* Define to 1 if you have the `_cosl' function. */ +/* #undef _GLIBCXX_HAVE__COSL */ + +/* Define to 1 if you have the `_expf' function. */ +/* #undef _GLIBCXX_HAVE__EXPF */ + +/* Define to 1 if you have the `_expl' function. */ +/* #undef _GLIBCXX_HAVE__EXPL */ + +/* Define to 1 if you have the `_fabsf' function. */ +/* #undef _GLIBCXX_HAVE__FABSF */ + +/* Define to 1 if you have the `_fabsl' function. */ +/* #undef _GLIBCXX_HAVE__FABSL */ + +/* Define to 1 if you have the `_finite' function. */ +/* #undef _GLIBCXX_HAVE__FINITE */ + +/* Define to 1 if you have the `_finitef' function. */ +/* #undef _GLIBCXX_HAVE__FINITEF */ + +/* Define to 1 if you have the `_finitel' function. */ +/* #undef _GLIBCXX_HAVE__FINITEL */ + +/* Define to 1 if you have the `_floorf' function. */ +/* #undef _GLIBCXX_HAVE__FLOORF */ + +/* Define to 1 if you have the `_floorl' function. */ +/* #undef _GLIBCXX_HAVE__FLOORL */ + +/* Define to 1 if you have the `_fmodf' function. */ +/* #undef _GLIBCXX_HAVE__FMODF */ + +/* Define to 1 if you have the `_fmodl' function. */ +/* #undef _GLIBCXX_HAVE__FMODL */ + +/* Define to 1 if you have the `_fpclass' function. */ +/* #undef _GLIBCXX_HAVE__FPCLASS */ + +/* Define to 1 if you have the `_frexpf' function. */ +/* #undef _GLIBCXX_HAVE__FREXPF */ + +/* Define to 1 if you have the `_frexpl' function. */ +/* #undef _GLIBCXX_HAVE__FREXPL */ + +/* Define to 1 if you have the `_hypot' function. */ +/* #undef _GLIBCXX_HAVE__HYPOT */ + +/* Define to 1 if you have the `_hypotf' function. */ +/* #undef _GLIBCXX_HAVE__HYPOTF */ + +/* Define to 1 if you have the `_hypotl' function. */ +/* #undef _GLIBCXX_HAVE__HYPOTL */ + +/* Define to 1 if you have the `_isinf' function. */ +/* #undef _GLIBCXX_HAVE__ISINF */ + +/* Define to 1 if you have the `_isinff' function. */ +/* #undef _GLIBCXX_HAVE__ISINFF */ + +/* Define to 1 if you have the `_isinfl' function. */ +/* #undef _GLIBCXX_HAVE__ISINFL */ + +/* Define to 1 if you have the `_isnan' function. */ +/* #undef _GLIBCXX_HAVE__ISNAN */ + +/* Define to 1 if you have the `_isnanf' function. */ +/* #undef _GLIBCXX_HAVE__ISNANF */ + +/* Define to 1 if you have the `_isnanl' function. */ +/* #undef _GLIBCXX_HAVE__ISNANL */ + +/* Define to 1 if you have the `_ldexpf' function. */ +/* #undef _GLIBCXX_HAVE__LDEXPF */ + +/* Define to 1 if you have the `_ldexpl' function. */ +/* #undef _GLIBCXX_HAVE__LDEXPL */ + +/* Define to 1 if you have the `_log10f' function. */ +/* #undef _GLIBCXX_HAVE__LOG10F */ + +/* Define to 1 if you have the `_log10l' function. */ +/* #undef _GLIBCXX_HAVE__LOG10L */ + +/* Define to 1 if you have the `_logf' function. */ +/* #undef _GLIBCXX_HAVE__LOGF */ + +/* Define to 1 if you have the `_logl' function. */ +/* #undef _GLIBCXX_HAVE__LOGL */ + +/* Define to 1 if you have the `_modf' function. */ +/* #undef _GLIBCXX_HAVE__MODF */ + +/* Define to 1 if you have the `_modff' function. */ +/* #undef _GLIBCXX_HAVE__MODFF */ + +/* Define to 1 if you have the `_modfl' function. */ +/* #undef _GLIBCXX_HAVE__MODFL */ + +/* Define to 1 if you have the `_powf' function. */ +/* #undef _GLIBCXX_HAVE__POWF */ + +/* Define to 1 if you have the `_powl' function. */ +/* #undef _GLIBCXX_HAVE__POWL */ + +/* Define to 1 if you have the `_qfpclass' function. */ +/* #undef _GLIBCXX_HAVE__QFPCLASS */ + +/* Define to 1 if you have the `_sincos' function. */ +/* #undef _GLIBCXX_HAVE__SINCOS */ + +/* Define to 1 if you have the `_sincosf' function. */ +/* #undef _GLIBCXX_HAVE__SINCOSF */ + +/* Define to 1 if you have the `_sincosl' function. */ +/* #undef _GLIBCXX_HAVE__SINCOSL */ + +/* Define to 1 if you have the `_sinf' function. */ +/* #undef _GLIBCXX_HAVE__SINF */ + +/* Define to 1 if you have the `_sinhf' function. */ +/* #undef _GLIBCXX_HAVE__SINHF */ + +/* Define to 1 if you have the `_sinhl' function. */ +/* #undef _GLIBCXX_HAVE__SINHL */ + +/* Define to 1 if you have the `_sinl' function. */ +/* #undef _GLIBCXX_HAVE__SINL */ + +/* Define to 1 if you have the `_sqrtf' function. */ +/* #undef _GLIBCXX_HAVE__SQRTF */ + +/* Define to 1 if you have the `_sqrtl' function. */ +/* #undef _GLIBCXX_HAVE__SQRTL */ + +/* Define to 1 if you have the `_tanf' function. */ +/* #undef _GLIBCXX_HAVE__TANF */ + +/* Define to 1 if you have the `_tanhf' function. */ +/* #undef _GLIBCXX_HAVE__TANHF */ + +/* Define to 1 if you have the `_tanhl' function. */ +/* #undef _GLIBCXX_HAVE__TANHL */ + +/* Define to 1 if you have the `_tanl' function. */ +/* #undef _GLIBCXX_HAVE__TANL */ + +/* Define to 1 if you have the `__cxa_thread_atexit' function. */ +/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT */ + +/* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */ +/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef _GLIBCXX_ICONV_CONST */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +/* #undef _GLIBCXX_PACKAGE */ + +/* Define to the address where bug reports for this package should be sent. */ +#define _GLIBCXX_PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define _GLIBCXX_PACKAGE_NAME "package-unused" + +/* Define to the full name and version of this package. */ +#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused" + +/* Define to the one symbol short name of this package. */ +#define _GLIBCXX_PACKAGE_TARNAME "libstdc++" + +/* Define to the home page for this package. */ +#define _GLIBCXX_PACKAGE_URL "" + +/* Define to the version of this package. */ +#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused" + +/* The size of `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ + +/* The size of `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ + +/* The size of `long', as computed by sizeof. */ +/* #undef SIZEOF_LONG */ + +/* The size of `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ + +/* The size of `void *', as computed by sizeof. */ +/* #undef SIZEOF_VOID_P */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +/* #undef _GLIBCXX_VERSION */ + +/* Define if C99 functions in should be used in for + C++11. Using compiler builtins for these functions requires corresponding + C99 library functions to be present. */ +/* #undef _GLIBCXX11_USE_C99_COMPLEX */ + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_STDIO 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_STDLIB 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++11. */ +#define _GLIBCXX11_USE_C99_WCHAR 1 + +/* Define if C99 functions in should be used in for + C++98. Using compiler builtins for these functions requires corresponding + C99 library functions to be present. */ +/* #undef _GLIBCXX98_USE_C99_COMPLEX */ + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_STDIO 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_STDLIB 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std for C++98. */ +#define _GLIBCXX98_USE_C99_WCHAR 1 + +/* Define if the compiler supports C++11 atomics. */ +/* #undef _GLIBCXX_ATOMIC_BUILTINS */ + +/* Define to use concept checking code from the boost libraries. */ +/* #undef _GLIBCXX_CONCEPT_CHECKS */ + +/* Define to 1 if a fully dynamic basic_string is wanted, 0 to disable, + undefined for platform defaults */ +#define _GLIBCXX_FULLY_DYNAMIC_STRING 0 + +/* Define if gthreads library is available. */ +/* #undef _GLIBCXX_HAS_GTHREADS */ + +/* Define to 1 if a full hosted library is built, or 0 if freestanding. */ +#define _GLIBCXX_HOSTED 1 + +/* Define if compatibility should be provided for -mlong-double-64. */ + +/* Define to the letter to which size_t is mangled. */ +#define _GLIBCXX_MANGLE_SIZE_T j + +/* Define if C99 llrint and llround functions are missing from . */ +/* #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS */ + +/* Define if ptrdiff_t is int. */ +#define _GLIBCXX_PTRDIFF_T_IS_INT 1 + +/* Define if using setrlimit to set resource limits during "make check" */ +/* #undef _GLIBCXX_RES_LIMITS */ + +/* Define if size_t is unsigned int. */ +#define _GLIBCXX_SIZE_T_IS_UINT 1 + +/* Define to the value of the EOF integer constant. */ +#define _GLIBCXX_STDIO_EOF -1 + +/* Define to the value of the SEEK_CUR integer constant. */ +#define _GLIBCXX_STDIO_SEEK_CUR 1 + +/* Define to the value of the SEEK_END integer constant. */ +#define _GLIBCXX_STDIO_SEEK_END 2 + +/* Define to use symbol versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER */ + +/* Define to use darwin versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_DARWIN */ + +/* Define to use GNU versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_GNU */ + +/* Define to use GNU namespace versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */ + +/* Define to use Sun versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_SUN */ + +/* Define if C11 functions in should be imported into namespace std + in . */ +/* #undef _GLIBCXX_USE_C11_UCHAR_CXX11 */ + +/* Define if C99 functions or macros from , , , + , and can be used or exposed. */ +/* #undef _GLIBCXX_USE_C99 */ + +/* Define if C99 functions in should be used in . + Using compiler builtins for these functions requires corresponding C99 + library functions to be present. */ +/* #undef _GLIBCXX_USE_C99_COMPLEX_TR1 */ + +/* Define if C99 functions in should be imported in in + namespace std::tr1. */ +#define _GLIBCXX_USE_C99_CTYPE_TR1 1 + +/* Define if C99 functions in should be imported in in + namespace std::tr1. */ +/* #undef _GLIBCXX_USE_C99_FENV_TR1 */ + +/* Define if C99 functions in should be imported in + in namespace std::tr1. */ +#define _GLIBCXX_USE_C99_INTTYPES_TR1 1 + +/* Define if wchar_t C99 functions in should be imported in + in namespace std::tr1. */ +#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std::tr1. */ +#define _GLIBCXX_USE_C99_MATH_TR1 1 + +/* Define if C99 types in should be imported in in + namespace std::tr1. */ +#define _GLIBCXX_USE_C99_STDINT_TR1 1 + +/* Defined if clock_gettime syscall has monotonic and realtime clock support. + */ +/* #undef _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL */ + +/* Defined if clock_gettime has monotonic clock support. */ +/* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */ + +/* Defined if clock_gettime has realtime clock support. */ +/* #undef _GLIBCXX_USE_CLOCK_REALTIME */ + +/* Define if ISO/IEC TR 24733 decimal floating point types are supported on + this host. */ +/* #undef _GLIBCXX_USE_DECIMAL_FLOAT */ + +/* Define if fchmod is available in . */ +#define _GLIBCXX_USE_FCHMOD 1 + +/* Define if fchmodat is available in . */ +/* #undef _GLIBCXX_USE_FCHMODAT */ + +/* Define if __float128 is supported on this host. */ +/* #undef _GLIBCXX_USE_FLOAT128 */ + +/* Defined if gettimeofday is available. */ +#define _GLIBCXX_USE_GETTIMEOFDAY 1 + +/* Define if get_nprocs is available in . */ +/* #undef _GLIBCXX_USE_GET_NPROCS */ + +/* Define if __int128 is supported on this host. */ +/* #undef _GLIBCXX_USE_INT128 */ + +/* Define if LFS support is available. */ +/* #undef _GLIBCXX_USE_LFS */ + +/* Define if code specialized for long long should be used. */ +#define _GLIBCXX_USE_LONG_LONG 1 + +/* Defined if nanosleep is available. */ +/* #undef _GLIBCXX_USE_NANOSLEEP */ + +/* Define if NLS translations are to be used. */ +/* #undef _GLIBCXX_USE_NLS */ + +/* Define if pthreads_num_processors_np is available in . */ +/* #undef _GLIBCXX_USE_PTHREADS_NUM_PROCESSORS_NP */ + +/* Define if POSIX read/write locks are available in . */ +/* #undef _GLIBCXX_USE_PTHREAD_RWLOCK_T */ + +/* Define if /dev/random and /dev/urandom are available for the random_device + of TR1 (Chapter 5.1). */ +/* #undef _GLIBCXX_USE_RANDOM_TR1 */ + +/* Define if usable realpath is available in . */ +/* #undef _GLIBCXX_USE_REALPATH */ + +/* Defined if sched_yield is available. */ +/* #undef _GLIBCXX_USE_SCHED_YIELD */ + +/* Define if _SC_NPROCESSORS_ONLN is available in . */ +/* #undef _GLIBCXX_USE_SC_NPROCESSORS_ONLN */ + +/* Define if _SC_NPROC_ONLN is available in . */ +/* #undef _GLIBCXX_USE_SC_NPROC_ONLN */ + +/* Define if sendfile is available in . */ +/* #undef _GLIBCXX_USE_SENDFILE */ + +/* Define if struct stat has timespec members. */ +/* #undef _GLIBCXX_USE_ST_MTIM */ + +/* Define if sysctl(), CTL_HW and HW_NCPU are available in . */ +/* #undef _GLIBCXX_USE_SYSCTL_HW_NCPU */ + +/* Define if obsolescent tmpnam is available in . */ +#define _GLIBCXX_USE_TMPNAM 1 + +/* Define if utimensat and UTIME_OMIT are available in and + AT_FDCWD in . */ +/* #undef _GLIBCXX_USE_UTIMENSAT */ + +/* Define if code specialized for wchar_t should be used. */ +#define _GLIBCXX_USE_WCHAR_T 1 + +/* Define to 1 if a verbose library is built, or 0 otherwise. */ +#define _GLIBCXX_VERBOSE 0 + +/* Defined if as can handle rdrand. */ +/* #undef _GLIBCXX_X86_RDRAND */ + +/* Define to 1 if mutex_timedlock is available. */ +#define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 + +/* Define if all C++11 floating point overloads are available in . */ +#if __cplusplus >= 201103L +/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP */ +#endif + +/* Define if all C++11 integral type overloads are available in . */ +#if __cplusplus >= 201103L +/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT */ +#endif + +#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF) +# define _GLIBCXX_HAVE_ACOSF 1 +# define acosf _acosf +#endif + +#if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL) +# define _GLIBCXX_HAVE_ACOSL 1 +# define acosl _acosl +#endif + +#if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF) +# define _GLIBCXX_HAVE_ASINF 1 +# define asinf _asinf +#endif + +#if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL) +# define _GLIBCXX_HAVE_ASINL 1 +# define asinl _asinl +#endif + +#if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F) +# define _GLIBCXX_HAVE_ATAN2F 1 +# define atan2f _atan2f +#endif + +#if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L) +# define _GLIBCXX_HAVE_ATAN2L 1 +# define atan2l _atan2l +#endif + +#if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF) +# define _GLIBCXX_HAVE_ATANF 1 +# define atanf _atanf +#endif + +#if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL) +# define _GLIBCXX_HAVE_ATANL 1 +# define atanl _atanl +#endif + +#if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF) +# define _GLIBCXX_HAVE_CEILF 1 +# define ceilf _ceilf +#endif + +#if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL) +# define _GLIBCXX_HAVE_CEILL 1 +# define ceill _ceill +#endif + +#if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF) +# define _GLIBCXX_HAVE_COSF 1 +# define cosf _cosf +#endif + +#if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF) +# define _GLIBCXX_HAVE_COSHF 1 +# define coshf _coshf +#endif + +#if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL) +# define _GLIBCXX_HAVE_COSHL 1 +# define coshl _coshl +#endif + +#if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL) +# define _GLIBCXX_HAVE_COSL 1 +# define cosl _cosl +#endif + +#if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF) +# define _GLIBCXX_HAVE_EXPF 1 +# define expf _expf +#endif + +#if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL) +# define _GLIBCXX_HAVE_EXPL 1 +# define expl _expl +#endif + +#if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF) +# define _GLIBCXX_HAVE_FABSF 1 +# define fabsf _fabsf +#endif + +#if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL) +# define _GLIBCXX_HAVE_FABSL 1 +# define fabsl _fabsl +#endif + +#if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE) +# define _GLIBCXX_HAVE_FINITE 1 +# define finite _finite +#endif + +#if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF) +# define _GLIBCXX_HAVE_FINITEF 1 +# define finitef _finitef +#endif + +#if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL) +# define _GLIBCXX_HAVE_FINITEL 1 +# define finitel _finitel +#endif + +#if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF) +# define _GLIBCXX_HAVE_FLOORF 1 +# define floorf _floorf +#endif + +#if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL) +# define _GLIBCXX_HAVE_FLOORL 1 +# define floorl _floorl +#endif + +#if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF) +# define _GLIBCXX_HAVE_FMODF 1 +# define fmodf _fmodf +#endif + +#if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL) +# define _GLIBCXX_HAVE_FMODL 1 +# define fmodl _fmodl +#endif + +#if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS) +# define _GLIBCXX_HAVE_FPCLASS 1 +# define fpclass _fpclass +#endif + +#if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF) +# define _GLIBCXX_HAVE_FREXPF 1 +# define frexpf _frexpf +#endif + +#if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL) +# define _GLIBCXX_HAVE_FREXPL 1 +# define frexpl _frexpl +#endif + +#if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT) +# define _GLIBCXX_HAVE_HYPOT 1 +# define hypot _hypot +#endif + +#if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF) +# define _GLIBCXX_HAVE_HYPOTF 1 +# define hypotf _hypotf +#endif + +#if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL) +# define _GLIBCXX_HAVE_HYPOTL 1 +# define hypotl _hypotl +#endif + +#if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF) +# define _GLIBCXX_HAVE_ISINF 1 +# define isinf _isinf +#endif + +#if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF) +# define _GLIBCXX_HAVE_ISINFF 1 +# define isinff _isinff +#endif + +#if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL) +# define _GLIBCXX_HAVE_ISINFL 1 +# define isinfl _isinfl +#endif + +#if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN) +# define _GLIBCXX_HAVE_ISNAN 1 +# define isnan _isnan +#endif + +#if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF) +# define _GLIBCXX_HAVE_ISNANF 1 +# define isnanf _isnanf +#endif + +#if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL) +# define _GLIBCXX_HAVE_ISNANL 1 +# define isnanl _isnanl +#endif + +#if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF) +# define _GLIBCXX_HAVE_LDEXPF 1 +# define ldexpf _ldexpf +#endif + +#if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL) +# define _GLIBCXX_HAVE_LDEXPL 1 +# define ldexpl _ldexpl +#endif + +#if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F) +# define _GLIBCXX_HAVE_LOG10F 1 +# define log10f _log10f +#endif + +#if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L) +# define _GLIBCXX_HAVE_LOG10L 1 +# define log10l _log10l +#endif + +#if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF) +# define _GLIBCXX_HAVE_LOGF 1 +# define logf _logf +#endif + +#if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL) +# define _GLIBCXX_HAVE_LOGL 1 +# define logl _logl +#endif + +#if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF) +# define _GLIBCXX_HAVE_MODF 1 +# define modf _modf +#endif + +#if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF) +# define _GLIBCXX_HAVE_MODFF 1 +# define modff _modff +#endif + +#if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL) +# define _GLIBCXX_HAVE_MODFL 1 +# define modfl _modfl +#endif + +#if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF) +# define _GLIBCXX_HAVE_POWF 1 +# define powf _powf +#endif + +#if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL) +# define _GLIBCXX_HAVE_POWL 1 +# define powl _powl +#endif + +#if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS) +# define _GLIBCXX_HAVE_QFPCLASS 1 +# define qfpclass _qfpclass +#endif + +#if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS) +# define _GLIBCXX_HAVE_SINCOS 1 +# define sincos _sincos +#endif + +#if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF) +# define _GLIBCXX_HAVE_SINCOSF 1 +# define sincosf _sincosf +#endif + +#if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL) +# define _GLIBCXX_HAVE_SINCOSL 1 +# define sincosl _sincosl +#endif + +#if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF) +# define _GLIBCXX_HAVE_SINF 1 +# define sinf _sinf +#endif + +#if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF) +# define _GLIBCXX_HAVE_SINHF 1 +# define sinhf _sinhf +#endif + +#if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL) +# define _GLIBCXX_HAVE_SINHL 1 +# define sinhl _sinhl +#endif + +#if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL) +# define _GLIBCXX_HAVE_SINL 1 +# define sinl _sinl +#endif + +#if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF) +# define _GLIBCXX_HAVE_SQRTF 1 +# define sqrtf _sqrtf +#endif + +#if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL) +# define _GLIBCXX_HAVE_SQRTL 1 +# define sqrtl _sqrtl +#endif + +#if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF) +# define _GLIBCXX_HAVE_STRTOF 1 +# define strtof _strtof +#endif + +#if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD) +# define _GLIBCXX_HAVE_STRTOLD 1 +# define strtold _strtold +#endif + +#if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF) +# define _GLIBCXX_HAVE_TANF 1 +# define tanf _tanf +#endif + +#if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF) +# define _GLIBCXX_HAVE_TANHF 1 +# define tanhf _tanhf +#endif + +#if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL) +# define _GLIBCXX_HAVE_TANHL 1 +# define tanhl _tanhl +#endif + +#if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL) +# define _GLIBCXX_HAVE_TANL 1 +# define tanl _tanl +#endif + +#endif // _GLIBCXX_CXX_CONFIG_H diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++io.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++io.h new file mode 100644 index 000000000..124e71505 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++io.h @@ -0,0 +1,50 @@ +// Underlying io library details -*- C++ -*- + +// Copyright (C) 2000-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/c++io.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{ios} + */ + +// c_io_stdio.h - Defines for using "C" stdio.h + +#ifndef _GLIBCXX_CXX_IO_H +#define _GLIBCXX_CXX_IO_H 1 + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + typedef __gthread_mutex_t __c_lock; + + // for basic_file.h + typedef FILE __c_file; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++locale.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++locale.h new file mode 100644 index 000000000..ce9fbb80d --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/c++locale.h @@ -0,0 +1,92 @@ +// Wrapper for underlying C-language localization -*- C++ -*- + +// Copyright (C) 2001-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/c++locale.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{locale} + */ + +// +// ISO C++ 14882: 22.8 Standard locale categories. +// + +// Written by Benjamin Kosnik + +#ifndef _GLIBCXX_CXX_LOCALE_H +#define _GLIBCXX_CXX_LOCALE_H 1 + +#pragma GCC system_header + +#include + +#define _GLIBCXX_NUM_CATEGORIES 0 + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + typedef int* __c_locale; + + // Convert numeric value of type double and long double to string and + // return length of string. If vsnprintf is available use it, otherwise + // fall back to the unsafe vsprintf which, in general, can be dangerous + // and should be avoided. + inline int + __convert_from_v(const __c_locale&, char* __out, + const int __size __attribute__((__unused__)), + const char* __fmt, ...) + { + char* __old = std::setlocale(LC_NUMERIC, 0); + char* __sav = 0; + if (__builtin_strcmp(__old, "C")) + { + const size_t __len = __builtin_strlen(__old) + 1; + __sav = new char[__len]; + __builtin_memcpy(__sav, __old, __len); + std::setlocale(LC_NUMERIC, "C"); + } + + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +#if _GLIBCXX_USE_C99_STDIO + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); +#else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +#endif + + __builtin_va_end(__args); + + if (__sav) + { + std::setlocale(LC_NUMERIC, __sav); + delete [] __sav; + } + return __ret; + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/cpu_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/cpu_defines.h new file mode 100644 index 000000000..121ece2f9 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/cpu_defines.h @@ -0,0 +1,40 @@ +// Specific definitions for generic platforms -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/cpu_defines.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{iosfwd} + */ + +#ifndef _GLIBCXX_CPU_DEFINES +#define _GLIBCXX_CPU_DEFINES 1 + +// Integer divide instructions don't trap on ARM. +#ifdef __ARM_ARCH_EXT_IDIV__ +#define __glibcxx_integral_traps false +#else +#define __glibcxx_integral_traps true +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/ctype_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/ctype_base.h new file mode 100644 index 000000000..6a8cce7bc --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/ctype_base.h @@ -0,0 +1,61 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 2000-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// +// ISO C++ 14882: 22.1 Locales +// + +// Information as gleaned from /usr/include/ctype.h + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /// @brief Base class for ctype. + struct ctype_base + { + // Non-standard typedefs. + typedef const int* __to_type; + + // NB: Offsets into ctype::_M_table force a particular size + // on the mask type. Because of this, we don't use an enum. + typedef char mask; + static const mask upper = _U; + static const mask lower = _L; + static const mask alpha = _U | _L; + static const mask digit = _N; + static const mask xdigit = _X | _N; + static const mask space = _S; + static const mask print = _P | _U | _L | _N | _B; + static const mask graph = _P | _U | _L | _N; + static const mask cntrl = _C; + static const mask punct = _P; + static const mask alnum = _U | _L | _N; +#if __cplusplus >= 201103L + static const mask blank = space; +#endif + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/ctype_inline.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/ctype_inline.h new file mode 100644 index 000000000..cbb33392d --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/ctype_inline.h @@ -0,0 +1,74 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 2000-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/ctype_inline.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{locale} + */ + +// +// ISO C++ 14882: 22.1 Locales +// + +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) +// functions go in ctype.cc + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + bool + ctype:: + is(mask __m, char __c) const + { return _M_table[static_cast(__c)] & __m; } + + const char* + ctype:: + is(const char* __low, const char* __high, mask* __vec) const + { + while (__low < __high) + *__vec++ = _M_table[static_cast(*__low++)]; + return __high; + } + + const char* + ctype:: + scan_is(mask __m, const char* __low, const char* __high) const + { + while (__low < __high && !this->is(__m, *__low)) + ++__low; + return __low; + } + + const char* + ctype:: + scan_not(mask __m, const char* __low, const char* __high) const + { + while (__low < __high && this->is(__m, *__low) != 0) + ++__low; + return __low; + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/cxxabi_tweaks.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/cxxabi_tweaks.h new file mode 100644 index 000000000..6f37a4fdf --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/cxxabi_tweaks.h @@ -0,0 +1,82 @@ +// Control various target specific ABI tweaks. ARM version. + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/cxxabi_tweaks.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{cxxabi.h} + */ + +#ifndef _CXXABI_TWEAKS_H +#define _CXXABI_TWEAKS_H 1 + +#ifdef __cplusplus +namespace __cxxabiv1 +{ + extern "C" + { +#endif + +#ifdef __ARM_EABI__ + // The ARM EABI uses the least significant bit of a 32-bit + // guard variable. */ +#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0) +#define _GLIBCXX_GUARD_SET(x) *(x) = 1 +#define _GLIBCXX_GUARD_BIT 1 +#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1) +#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1) + typedef int __guard; + + // We also want the element size in array cookies. +#define _GLIBCXX_ELTSIZE_IN_COOKIE 1 + + // __cxa_vec_ctor should return a pointer to the array. + typedef void * __cxa_vec_ctor_return_type; +#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x + // Constructors and destructors return the "this" pointer. + typedef void * __cxa_cdtor_return_type; + +#else // __ARM_EABI__ + + // The generic ABI uses the first byte of a 64-bit guard variable. +#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0) +#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1 +#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1) +#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1) +#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1) + __extension__ typedef int __guard __attribute__((mode (__DI__))); + + // __cxa_vec_ctor has void return type. + typedef void __cxa_vec_ctor_return_type; +#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return + // Constructors and destructors do not return a value. + typedef void __cxa_cdtor_return_type; + +#endif //!__ARM_EABI__ + +#ifdef __cplusplus + } +} // namespace __cxxabiv1 +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/error_constants.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/error_constants.h new file mode 100644 index 000000000..3f5c92e7c --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/error_constants.h @@ -0,0 +1,178 @@ +// Specific definitions for generic platforms -*- C++ -*- + +// Copyright (C) 2007-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/error_constants.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{system_error} + */ + +#ifndef _GLIBCXX_ERROR_CONSTANTS +#define _GLIBCXX_ERROR_CONSTANTS 1 + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + enum class errc + { + address_family_not_supported = EAFNOSUPPORT, + address_in_use = EADDRINUSE, + address_not_available = EADDRNOTAVAIL, + already_connected = EISCONN, + argument_list_too_long = E2BIG, + argument_out_of_domain = EDOM, + bad_address = EFAULT, + bad_file_descriptor = EBADF, + +#ifdef _GLIBCXX_HAVE_EBADMSG + bad_message = EBADMSG, +#endif + + broken_pipe = EPIPE, + connection_aborted = ECONNABORTED, + connection_already_in_progress = EALREADY, + connection_refused = ECONNREFUSED, + connection_reset = ECONNRESET, + cross_device_link = EXDEV, + destination_address_required = EDESTADDRREQ, + device_or_resource_busy = EBUSY, + directory_not_empty = ENOTEMPTY, + executable_format_error = ENOEXEC, + file_exists = EEXIST, + file_too_large = EFBIG, + filename_too_long = ENAMETOOLONG, + function_not_supported = ENOSYS, + host_unreachable = EHOSTUNREACH, + +#ifdef _GLIBCXX_HAVE_EIDRM + identifier_removed = EIDRM, +#endif + + illegal_byte_sequence = EILSEQ, + inappropriate_io_control_operation = ENOTTY, + interrupted = EINTR, + invalid_argument = EINVAL, + invalid_seek = ESPIPE, + io_error = EIO, + is_a_directory = EISDIR, + message_size = EMSGSIZE, + network_down = ENETDOWN, + network_reset = ENETRESET, + network_unreachable = ENETUNREACH, + no_buffer_space = ENOBUFS, + no_child_process = ECHILD, + +#ifdef _GLIBCXX_HAVE_ENOLINK + no_link = ENOLINK, +#endif + + no_lock_available = ENOLCK, + +#ifdef _GLIBCXX_HAVE_ENODATA + no_message_available = ENODATA, +#endif + + no_message = ENOMSG, + no_protocol_option = ENOPROTOOPT, + no_space_on_device = ENOSPC, + +#ifdef _GLIBCXX_HAVE_ENOSR + no_stream_resources = ENOSR, +#endif + + no_such_device_or_address = ENXIO, + no_such_device = ENODEV, + no_such_file_or_directory = ENOENT, + no_such_process = ESRCH, + not_a_directory = ENOTDIR, + not_a_socket = ENOTSOCK, + +#ifdef _GLIBCXX_HAVE_ENOSTR + not_a_stream = ENOSTR, +#endif + + not_connected = ENOTCONN, + not_enough_memory = ENOMEM, + +#ifdef _GLIBCXX_HAVE_ENOTSUP + not_supported = ENOTSUP, +#endif + +#ifdef _GLIBCXX_HAVE_ECANCELED + operation_canceled = ECANCELED, +#endif + + operation_in_progress = EINPROGRESS, + operation_not_permitted = EPERM, + operation_not_supported = EOPNOTSUPP, + operation_would_block = EWOULDBLOCK, + +#ifdef _GLIBCXX_HAVE_EOWNERDEAD + owner_dead = EOWNERDEAD, +#endif + + permission_denied = EACCES, + +#ifdef _GLIBCXX_HAVE_EPROTO + protocol_error = EPROTO, +#endif + + protocol_not_supported = EPROTONOSUPPORT, + read_only_file_system = EROFS, + resource_deadlock_would_occur = EDEADLK, + resource_unavailable_try_again = EAGAIN, + result_out_of_range = ERANGE, + +#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE + state_not_recoverable = ENOTRECOVERABLE, +#endif + +#ifdef _GLIBCXX_HAVE_ETIME + stream_timeout = ETIME, +#endif + +#ifdef _GLIBCXX_HAVE_ETXTBSY + text_file_busy = ETXTBSY, +#endif + + timed_out = ETIMEDOUT, + too_many_files_open_in_system = ENFILE, + too_many_files_open = EMFILE, + too_many_links = EMLINK, + too_many_symbolic_link_levels = ELOOP, + +#ifdef _GLIBCXX_HAVE_EOVERFLOW + value_too_large = EOVERFLOW, +#endif + + wrong_protocol_type = EPROTOTYPE + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/extc++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/extc++.h new file mode 100644 index 000000000..68c1681a3 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/extc++.h @@ -0,0 +1,84 @@ +// C++ includes used for precompiling extensions -*- C++ -*- + +// Copyright (C) 2006-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file extc++.h + * This is an implementation file for a precompiled header. + */ + +#if __cplusplus < 201103L +#include +#else +#include +#endif + +#include +#if __cplusplus >= 201103L +# include +#endif +#include +#include +#include +#include +#include +#if __cplusplus >= 201103L +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if __cplusplus >= 201103L +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef _GLIBCXX_HAVE_ICONV + #include + #include +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr-default.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr-default.h new file mode 100644 index 000000000..165711401 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr-default.h @@ -0,0 +1,298 @@ +/* Threads compatibility routines for libgcc2 and libobjc. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef _GLIBCXX_GCC_GTHR_SINGLE_H +#define _GLIBCXX_GCC_GTHR_SINGLE_H + +/* Just provide compatibility for mutex handling. */ + +typedef int __gthread_key_t; +typedef int __gthread_once_t; +typedef int __gthread_mutex_t; +typedef int __gthread_recursive_mutex_t; + +#define __GTHREAD_ONCE_INIT 0 +#define __GTHREAD_MUTEX_INIT 0 +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) +#define __GTHREAD_RECURSIVE_MUTEX_INIT 0 + +#define _GLIBCXX_UNUSED __attribute__((__unused__)) + +#ifdef _LIBOBJC + +/* Thread local storage for a single thread */ +static void *thread_local_storage = NULL; + +/* Backend initialization functions */ + +/* Initialize the threads subsystem. */ +static inline int +__gthread_objc_init_thread_system (void) +{ + /* No thread support available */ + return -1; +} + +/* Close the threads subsystem. */ +static inline int +__gthread_objc_close_thread_system (void) +{ + /* No thread support available */ + return -1; +} + +/* Backend thread functions */ + +/* Create a new thread of execution. */ +static inline objc_thread_t +__gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED) +{ + /* No thread support available */ + return NULL; +} + +/* Set the current thread's priority. */ +static inline int +__gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED) +{ + /* No thread support available */ + return -1; +} + +/* Return the current thread's priority. */ +static inline int +__gthread_objc_thread_get_priority (void) +{ + return OBJC_THREAD_INTERACTIVE_PRIORITY; +} + +/* Yield our process time to another thread. */ +static inline void +__gthread_objc_thread_yield (void) +{ + return; +} + +/* Terminate the current thread. */ +static inline int +__gthread_objc_thread_exit (void) +{ + /* No thread support available */ + /* Should we really exit the program */ + /* exit (&__objc_thread_exit_status); */ + return -1; +} + +/* Returns an integer value which uniquely describes a thread. */ +static inline objc_thread_t +__gthread_objc_thread_id (void) +{ + /* No thread support, use 1. */ + return (objc_thread_t) 1; +} + +/* Sets the thread's local storage pointer. */ +static inline int +__gthread_objc_thread_set_data (void *value) +{ + thread_local_storage = value; + return 0; +} + +/* Returns the thread's local storage pointer. */ +static inline void * +__gthread_objc_thread_get_data (void) +{ + return thread_local_storage; +} + +/* Backend mutex functions */ + +/* Allocate a mutex. */ +static inline int +__gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Deallocate a mutex. */ +static inline int +__gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + /* There can only be one thread, so we always get the lock */ + return 0; +} + +/* Try to grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + /* There can only be one thread, so we always get the lock */ + return 0; +} + +/* Unlock the mutex */ +static inline int +__gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Backend condition mutex functions */ + +/* Allocate a condition. */ +static inline int +__gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Deallocate a condition. */ +static inline int +__gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wait on the condition */ +static inline int +__gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED, + objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wake up all threads waiting on this condition. */ +static inline int +__gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wake up one thread waiting on this condition. */ +static inline int +__gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +#else /* _LIBOBJC */ + +static inline int +__gthread_active_p (void) +{ + return 0; +} + +static inline int +__gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int _GLIBCXX_UNUSED +__gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED) +{ + return 0; +} + +static int _GLIBCXX_UNUSED +__gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_destroy (__mutex); +} + +#endif /* _LIBOBJC */ + +#undef _GLIBCXX_UNUSED + +#endif /* ! _GLIBCXX_GCC_GTHR_SINGLE_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr-posix.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr-posix.h new file mode 100644 index 000000000..2f844b247 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr-posix.h @@ -0,0 +1,889 @@ +/* Threads compatibility routines for libgcc2 and libobjc. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef _GLIBCXX_GCC_GTHR_POSIX_H +#define _GLIBCXX_GCC_GTHR_POSIX_H + +/* POSIX threads specific definitions. + Easy, since the interface is just one-to-one mapping. */ + +#define __GTHREADS 1 +#define __GTHREADS_CXX0X 1 + +#include + +#if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \ + || !defined(_GTHREAD_USE_MUTEX_TIMEDLOCK)) +# include +# if defined(_POSIX_TIMEOUTS) && _POSIX_TIMEOUTS >= 0 +# define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 +# else +# define _GTHREAD_USE_MUTEX_TIMEDLOCK 0 +# endif +#endif + +typedef pthread_t __gthread_t; +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; +typedef pthread_mutex_t __gthread_recursive_mutex_t; +typedef pthread_cond_t __gthread_cond_t; +typedef struct timespec __gthread_time_t; + +/* POSIX like conditional variables are supported. Please look at comments + in gthr.h for details. */ +#define __GTHREAD_HAS_COND 1 + +#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER +#define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function +#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT +#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER) +#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER +#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) +#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP +#else +#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function +#endif +#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER +#define __GTHREAD_TIME_INIT {0,0} + +#ifdef _GTHREAD_USE_MUTEX_INIT_FUNC +# undef __GTHREAD_MUTEX_INIT +#endif +#ifdef _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC +# undef __GTHREAD_RECURSIVE_MUTEX_INIT +# undef __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION +# define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function +#endif +#ifdef _GTHREAD_USE_COND_INIT_FUNC +# undef __GTHREAD_COND_INIT +# define __GTHREAD_COND_INIT_FUNCTION __gthread_cond_init_function +#endif + +#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK +# ifndef __gthrw_pragma +# define __gthrw_pragma(pragma) +# endif +# define __gthrw2(name,name2,type) \ + static __typeof(type) name __attribute__ ((__weakref__(#name2))); \ + __gthrw_pragma(weak type) +# define __gthrw_(name) __gthrw_ ## name +#else +# define __gthrw2(name,name2,type) +# define __gthrw_(name) name +#endif + +/* Typically, __gthrw_foo is a weak reference to symbol foo. */ +#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name) + +__gthrw(pthread_once) +__gthrw(pthread_getspecific) +__gthrw(pthread_setspecific) + +__gthrw(pthread_create) +__gthrw(pthread_join) +__gthrw(pthread_equal) +__gthrw(pthread_self) +__gthrw(pthread_detach) +#ifndef __BIONIC__ +__gthrw(pthread_cancel) +#endif +__gthrw(sched_yield) + +__gthrw(pthread_mutex_lock) +__gthrw(pthread_mutex_trylock) +#if _GTHREAD_USE_MUTEX_TIMEDLOCK +__gthrw(pthread_mutex_timedlock) +#endif +__gthrw(pthread_mutex_unlock) +__gthrw(pthread_mutex_init) +__gthrw(pthread_mutex_destroy) + +__gthrw(pthread_cond_init) +__gthrw(pthread_cond_broadcast) +__gthrw(pthread_cond_signal) +__gthrw(pthread_cond_wait) +__gthrw(pthread_cond_timedwait) +__gthrw(pthread_cond_destroy) + +__gthrw(pthread_key_create) +__gthrw(pthread_key_delete) +__gthrw(pthread_mutexattr_init) +__gthrw(pthread_mutexattr_settype) +__gthrw(pthread_mutexattr_destroy) + + +#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK) +/* Objective-C. */ +__gthrw(pthread_exit) +#ifdef _POSIX_PRIORITY_SCHEDULING +#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING +__gthrw(sched_get_priority_max) +__gthrw(sched_get_priority_min) +#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ +#endif /* _POSIX_PRIORITY_SCHEDULING */ +__gthrw(pthread_attr_destroy) +__gthrw(pthread_attr_init) +__gthrw(pthread_attr_setdetachstate) +#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING +__gthrw(pthread_getschedparam) +__gthrw(pthread_setschedparam) +#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ +#endif /* _LIBOBJC || _LIBOBJC_WEAK */ + +#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK + +/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if + -pthreads is not specified. The functions are dummies and most return an + error value. However pthread_once returns 0 without invoking the routine + it is passed so we cannot pretend that the interface is active if -pthreads + is not specified. On Solaris 2.5.1, the interface is not exposed at all so + we need to play the usual game with weak symbols. On Solaris 10 and up, a + working interface is always exposed. On FreeBSD 6 and later, libc also + exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up + to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc, + which means the alternate __gthread_active_p below cannot be used there. */ + +#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__)) + +static volatile int __gthread_active = -1; + +static void +__gthread_trigger (void) +{ + __gthread_active = 1; +} + +static inline int +__gthread_active_p (void) +{ + static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER; + static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT; + + /* Avoid reading __gthread_active twice on the main code path. */ + int __gthread_active_latest_value = __gthread_active; + + /* This test is not protected to avoid taking a lock on the main code + path so every update of __gthread_active in a threaded program must + be atomic with regard to the result of the test. */ + if (__builtin_expect (__gthread_active_latest_value < 0, 0)) + { + if (__gthrw_(pthread_once)) + { + /* If this really is a threaded program, then we must ensure that + __gthread_active has been set to 1 before exiting this block. */ + __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex); + __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger); + __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex); + } + + /* Make sure we'll never enter this block again. */ + if (__gthread_active < 0) + __gthread_active = 0; + + __gthread_active_latest_value = __gthread_active; + } + + return __gthread_active_latest_value != 0; +} + +#else /* neither FreeBSD nor Solaris */ + +/* For a program to be multi-threaded the only thing that it certainly must + be using is pthread_create. However, there may be other libraries that + intercept pthread_create with their own definitions to wrap pthreads + functionality for some purpose. In those cases, pthread_create being + defined might not necessarily mean that libpthread is actually linked + in. + + For the GNU C library, we can use a known internal name. This is always + available in the ABI, but no other library would define it. That is + ideal, since any public pthread function might be intercepted just as + pthread_create might be. __pthread_key_create is an "internal" + implementation symbol, but it is part of the public exported ABI. Also, + it's among the symbols that the static libpthread.a always links in + whenever pthread_create is used, so there is no danger of a false + negative result in any statically-linked, multi-threaded program. + + For others, we choose pthread_cancel as a function that seems unlikely + to be redefined by an interceptor library. The bionic (Android) C + library does not provide pthread_cancel, so we do use pthread_create + there (and interceptor libraries lose). */ + +#ifdef __GLIBC__ +__gthrw2(__gthrw_(__pthread_key_create), + __pthread_key_create, + pthread_key_create) +# define GTHR_ACTIVE_PROXY __gthrw_(__pthread_key_create) +#elif defined (__BIONIC__) +# define GTHR_ACTIVE_PROXY __gthrw_(pthread_create) +#else +# define GTHR_ACTIVE_PROXY __gthrw_(pthread_cancel) +#endif + +static inline int +__gthread_active_p (void) +{ + static void *const __gthread_active_ptr + = __extension__ (void *) >HR_ACTIVE_PROXY; + return __gthread_active_ptr != 0; +} + +#endif /* FreeBSD or Solaris */ + +#else /* not __GXX_WEAK__ */ + +/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread + calls in shared flavors of the HP-UX C library. Most of the stubs + have no functionality. The details are described in the "libc cumulative + patch" for each subversion of HP-UX 11. There are two special interfaces + provided for checking whether an application is linked to a shared pthread + library or not. However, these interfaces aren't available in early + libpthread libraries. We also need a test that works for archive + libraries. We can't use pthread_once as some libc versions call the + init function. We also can't use pthread_create or pthread_attr_init + as these create a thread and thereby prevent changing the default stack + size. The function pthread_default_stacksize_np is available in both + the archive and shared versions of libpthread. It can be used to + determine the default pthread stack size. There is a stub in some + shared libc versions which returns a zero size if pthreads are not + active. We provide an equivalent stub to handle cases where libc + doesn't provide one. */ + +#if defined(__hppa__) && defined(__hpux__) + +static volatile int __gthread_active = -1; + +static inline int +__gthread_active_p (void) +{ + /* Avoid reading __gthread_active twice on the main code path. */ + int __gthread_active_latest_value = __gthread_active; + size_t __s; + + if (__builtin_expect (__gthread_active_latest_value < 0, 0)) + { + pthread_default_stacksize_np (0, &__s); + __gthread_active = __s ? 1 : 0; + __gthread_active_latest_value = __gthread_active; + } + + return __gthread_active_latest_value != 0; +} + +#else /* not hppa-hpux */ + +static inline int +__gthread_active_p (void) +{ + return 1; +} + +#endif /* hppa-hpux */ + +#endif /* __GXX_WEAK__ */ + +#ifdef _LIBOBJC + +/* This is the config.h file in libobjc/ */ +#include + +#ifdef HAVE_SCHED_H +# include +#endif + +/* Key structure for maintaining thread specific storage */ +static pthread_key_t _objc_thread_storage; +static pthread_attr_t _objc_thread_attribs; + +/* Thread local storage for a single thread */ +static void *thread_local_storage = NULL; + +/* Backend initialization functions */ + +/* Initialize the threads subsystem. */ +static inline int +__gthread_objc_init_thread_system (void) +{ + if (__gthread_active_p ()) + { + /* Initialize the thread storage key. */ + if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0) + { + /* The normal default detach state for threads is + * PTHREAD_CREATE_JOINABLE which causes threads to not die + * when you think they should. */ + if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0 + && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs, + PTHREAD_CREATE_DETACHED) == 0) + return 0; + } + } + + return -1; +} + +/* Close the threads subsystem. */ +static inline int +__gthread_objc_close_thread_system (void) +{ + if (__gthread_active_p () + && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0 + && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0) + return 0; + + return -1; +} + +/* Backend thread functions */ + +/* Create a new thread of execution. */ +static inline objc_thread_t +__gthread_objc_thread_detach (void (*func)(void *), void *arg) +{ + objc_thread_t thread_id; + pthread_t new_thread_handle; + + if (!__gthread_active_p ()) + return NULL; + + if (!(__gthrw_(pthread_create) (&new_thread_handle, &_objc_thread_attribs, + (void *) func, arg))) + thread_id = (objc_thread_t) new_thread_handle; + else + thread_id = NULL; + + return thread_id; +} + +/* Set the current thread's priority. */ +static inline int +__gthread_objc_thread_set_priority (int priority) +{ + if (!__gthread_active_p ()) + return -1; + else + { +#ifdef _POSIX_PRIORITY_SCHEDULING +#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING + pthread_t thread_id = __gthrw_(pthread_self) (); + int policy; + struct sched_param params; + int priority_min, priority_max; + + if (__gthrw_(pthread_getschedparam) (thread_id, &policy, ¶ms) == 0) + { + if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1) + return -1; + + if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1) + return -1; + + if (priority > priority_max) + priority = priority_max; + else if (priority < priority_min) + priority = priority_min; + params.sched_priority = priority; + + /* + * The solaris 7 and several other man pages incorrectly state that + * this should be a pointer to policy but pthread.h is universally + * at odds with this. + */ + if (__gthrw_(pthread_setschedparam) (thread_id, policy, ¶ms) == 0) + return 0; + } +#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ +#endif /* _POSIX_PRIORITY_SCHEDULING */ + return -1; + } +} + +/* Return the current thread's priority. */ +static inline int +__gthread_objc_thread_get_priority (void) +{ +#ifdef _POSIX_PRIORITY_SCHEDULING +#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING + if (__gthread_active_p ()) + { + int policy; + struct sched_param params; + + if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, ¶ms) == 0) + return params.sched_priority; + else + return -1; + } + else +#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ +#endif /* _POSIX_PRIORITY_SCHEDULING */ + return OBJC_THREAD_INTERACTIVE_PRIORITY; +} + +/* Yield our process time to another thread. */ +static inline void +__gthread_objc_thread_yield (void) +{ + if (__gthread_active_p ()) + __gthrw_(sched_yield) (); +} + +/* Terminate the current thread. */ +static inline int +__gthread_objc_thread_exit (void) +{ + if (__gthread_active_p ()) + /* exit the thread */ + __gthrw_(pthread_exit) (&__objc_thread_exit_status); + + /* Failed if we reached here */ + return -1; +} + +/* Returns an integer value which uniquely describes a thread. */ +static inline objc_thread_t +__gthread_objc_thread_id (void) +{ + if (__gthread_active_p ()) + return (objc_thread_t) __gthrw_(pthread_self) (); + else + return (objc_thread_t) 1; +} + +/* Sets the thread's local storage pointer. */ +static inline int +__gthread_objc_thread_set_data (void *value) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_setspecific) (_objc_thread_storage, value); + else + { + thread_local_storage = value; + return 0; + } +} + +/* Returns the thread's local storage pointer. */ +static inline void * +__gthread_objc_thread_get_data (void) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_getspecific) (_objc_thread_storage); + else + return thread_local_storage; +} + +/* Backend mutex functions */ + +/* Allocate a mutex. */ +static inline int +__gthread_objc_mutex_allocate (objc_mutex_t mutex) +{ + if (__gthread_active_p ()) + { + mutex->backend = objc_malloc (sizeof (pthread_mutex_t)); + + if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL)) + { + objc_free (mutex->backend); + mutex->backend = NULL; + return -1; + } + } + + return 0; +} + +/* Deallocate a mutex. */ +static inline int +__gthread_objc_mutex_deallocate (objc_mutex_t mutex) +{ + if (__gthread_active_p ()) + { + int count; + + /* + * Posix Threads specifically require that the thread be unlocked + * for __gthrw_(pthread_mutex_destroy) to work. + */ + + do + { + count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend); + if (count < 0) + return -1; + } + while (count); + + if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend)) + return -1; + + objc_free (mutex->backend); + mutex->backend = NULL; + } + return 0; +} + +/* Grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_lock (objc_mutex_t mutex) +{ + if (__gthread_active_p () + && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0) + { + return -1; + } + + return 0; +} + +/* Try to grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_trylock (objc_mutex_t mutex) +{ + if (__gthread_active_p () + && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0) + { + return -1; + } + + return 0; +} + +/* Unlock the mutex */ +static inline int +__gthread_objc_mutex_unlock (objc_mutex_t mutex) +{ + if (__gthread_active_p () + && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0) + { + return -1; + } + + return 0; +} + +/* Backend condition mutex functions */ + +/* Allocate a condition. */ +static inline int +__gthread_objc_condition_allocate (objc_condition_t condition) +{ + if (__gthread_active_p ()) + { + condition->backend = objc_malloc (sizeof (pthread_cond_t)); + + if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL)) + { + objc_free (condition->backend); + condition->backend = NULL; + return -1; + } + } + + return 0; +} + +/* Deallocate a condition. */ +static inline int +__gthread_objc_condition_deallocate (objc_condition_t condition) +{ + if (__gthread_active_p ()) + { + if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend)) + return -1; + + objc_free (condition->backend); + condition->backend = NULL; + } + return 0; +} + +/* Wait on the condition */ +static inline int +__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend, + (pthread_mutex_t *) mutex->backend); + else + return 0; +} + +/* Wake up all threads waiting on this condition. */ +static inline int +__gthread_objc_condition_broadcast (objc_condition_t condition) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend); + else + return 0; +} + +/* Wake up one thread waiting on this condition. */ +static inline int +__gthread_objc_condition_signal (objc_condition_t condition) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend); + else + return 0; +} + +#else /* _LIBOBJC */ + +static inline int +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), + void *__args) +{ + return __gthrw_(pthread_create) (__threadid, NULL, __func, __args); +} + +static inline int +__gthread_join (__gthread_t __threadid, void **__value_ptr) +{ + return __gthrw_(pthread_join) (__threadid, __value_ptr); +} + +static inline int +__gthread_detach (__gthread_t __threadid) +{ + return __gthrw_(pthread_detach) (__threadid); +} + +static inline int +__gthread_equal (__gthread_t __t1, __gthread_t __t2) +{ + return __gthrw_(pthread_equal) (__t1, __t2); +} + +static inline __gthread_t +__gthread_self (void) +{ + return __gthrw_(pthread_self) (); +} + +static inline int +__gthread_yield (void) +{ + return __gthrw_(sched_yield) (); +} + +static inline int +__gthread_once (__gthread_once_t *__once, void (*__func) (void)) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_once) (__once, __func); + else + return -1; +} + +static inline int +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) +{ + return __gthrw_(pthread_key_create) (__key, __dtor); +} + +static inline int +__gthread_key_delete (__gthread_key_t __key) +{ + return __gthrw_(pthread_key_delete) (__key); +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key) +{ + return __gthrw_(pthread_getspecific) (__key); +} + +static inline int +__gthread_setspecific (__gthread_key_t __key, const void *__ptr) +{ + return __gthrw_(pthread_setspecific) (__key, __ptr); +} + +static inline void +__gthread_mutex_init_function (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + __gthrw_(pthread_mutex_init) (__mutex, NULL); +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_mutex_destroy) (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_mutex_lock) (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_mutex_trylock) (__mutex); + else + return 0; +} + +#if _GTHREAD_USE_MUTEX_TIMEDLOCK +static inline int +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout); + else + return 0; +} +#endif + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_(pthread_mutex_unlock) (__mutex); + else + return 0; +} + +#if !defined( PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) \ + || defined(_GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC) +static inline int +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + { + pthread_mutexattr_t __attr; + int __r; + + __r = __gthrw_(pthread_mutexattr_init) (&__attr); + if (!__r) + __r = __gthrw_(pthread_mutexattr_settype) (&__attr, + PTHREAD_MUTEX_RECURSIVE); + if (!__r) + __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr); + if (!__r) + __r = __gthrw_(pthread_mutexattr_destroy) (&__attr); + return __r; + } + return 0; +} +#endif + +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + +#if _GTHREAD_USE_MUTEX_TIMEDLOCK +static inline int +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_mutex_timedlock (__mutex, __abs_timeout); +} +#endif + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_destroy (__mutex); +} + +#ifdef _GTHREAD_USE_COND_INIT_FUNC +static inline void +__gthread_cond_init_function (__gthread_cond_t *__cond) +{ + if (__gthread_active_p ()) + __gthrw_(pthread_cond_init) (__cond, NULL); +} +#endif + +static inline int +__gthread_cond_broadcast (__gthread_cond_t *__cond) +{ + return __gthrw_(pthread_cond_broadcast) (__cond); +} + +static inline int +__gthread_cond_signal (__gthread_cond_t *__cond) +{ + return __gthrw_(pthread_cond_signal) (__cond); +} + +static inline int +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) +{ + return __gthrw_(pthread_cond_wait) (__cond, __mutex); +} + +static inline int +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout); +} + +static inline int +__gthread_cond_wait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex) +{ + return __gthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_destroy (__gthread_cond_t* __cond) +{ + return __gthrw_(pthread_cond_destroy) (__cond); +} + +#endif /* _LIBOBJC */ + +#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr-single.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr-single.h new file mode 100644 index 000000000..165711401 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr-single.h @@ -0,0 +1,298 @@ +/* Threads compatibility routines for libgcc2 and libobjc. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef _GLIBCXX_GCC_GTHR_SINGLE_H +#define _GLIBCXX_GCC_GTHR_SINGLE_H + +/* Just provide compatibility for mutex handling. */ + +typedef int __gthread_key_t; +typedef int __gthread_once_t; +typedef int __gthread_mutex_t; +typedef int __gthread_recursive_mutex_t; + +#define __GTHREAD_ONCE_INIT 0 +#define __GTHREAD_MUTEX_INIT 0 +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) +#define __GTHREAD_RECURSIVE_MUTEX_INIT 0 + +#define _GLIBCXX_UNUSED __attribute__((__unused__)) + +#ifdef _LIBOBJC + +/* Thread local storage for a single thread */ +static void *thread_local_storage = NULL; + +/* Backend initialization functions */ + +/* Initialize the threads subsystem. */ +static inline int +__gthread_objc_init_thread_system (void) +{ + /* No thread support available */ + return -1; +} + +/* Close the threads subsystem. */ +static inline int +__gthread_objc_close_thread_system (void) +{ + /* No thread support available */ + return -1; +} + +/* Backend thread functions */ + +/* Create a new thread of execution. */ +static inline objc_thread_t +__gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED) +{ + /* No thread support available */ + return NULL; +} + +/* Set the current thread's priority. */ +static inline int +__gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED) +{ + /* No thread support available */ + return -1; +} + +/* Return the current thread's priority. */ +static inline int +__gthread_objc_thread_get_priority (void) +{ + return OBJC_THREAD_INTERACTIVE_PRIORITY; +} + +/* Yield our process time to another thread. */ +static inline void +__gthread_objc_thread_yield (void) +{ + return; +} + +/* Terminate the current thread. */ +static inline int +__gthread_objc_thread_exit (void) +{ + /* No thread support available */ + /* Should we really exit the program */ + /* exit (&__objc_thread_exit_status); */ + return -1; +} + +/* Returns an integer value which uniquely describes a thread. */ +static inline objc_thread_t +__gthread_objc_thread_id (void) +{ + /* No thread support, use 1. */ + return (objc_thread_t) 1; +} + +/* Sets the thread's local storage pointer. */ +static inline int +__gthread_objc_thread_set_data (void *value) +{ + thread_local_storage = value; + return 0; +} + +/* Returns the thread's local storage pointer. */ +static inline void * +__gthread_objc_thread_get_data (void) +{ + return thread_local_storage; +} + +/* Backend mutex functions */ + +/* Allocate a mutex. */ +static inline int +__gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Deallocate a mutex. */ +static inline int +__gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + /* There can only be one thread, so we always get the lock */ + return 0; +} + +/* Try to grab a lock on a mutex. */ +static inline int +__gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + /* There can only be one thread, so we always get the lock */ + return 0; +} + +/* Unlock the mutex */ +static inline int +__gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Backend condition mutex functions */ + +/* Allocate a condition. */ +static inline int +__gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Deallocate a condition. */ +static inline int +__gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wait on the condition */ +static inline int +__gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED, + objc_mutex_t mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wake up all threads waiting on this condition. */ +static inline int +__gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +/* Wake up one thread waiting on this condition. */ +static inline int +__gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED) +{ + return 0; +} + +#else /* _LIBOBJC */ + +static inline int +__gthread_active_p (void) +{ + return 0; +} + +static inline int +__gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int _GLIBCXX_UNUSED +__gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED) +{ + return 0; +} + +static int _GLIBCXX_UNUSED +__gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED) +{ + return 0; +} + +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_destroy (__mutex); +} + +#endif /* _LIBOBJC */ + +#undef _GLIBCXX_UNUSED + +#endif /* ! _GLIBCXX_GCC_GTHR_SINGLE_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr.h new file mode 100644 index 000000000..5889966e6 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/gthr.h @@ -0,0 +1,154 @@ +/* Threads compatibility routines for libgcc2. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef _GLIBCXX_GCC_GTHR_H +#define _GLIBCXX_GCC_GTHR_H + +#ifndef _GLIBCXX_HIDE_EXPORTS +#pragma GCC visibility push(default) +#endif + +/* If this file is compiled with threads support, it must + #define __GTHREADS 1 + to indicate that threads support is present. Also it has define + function + int __gthread_active_p () + that returns 1 if thread system is active, 0 if not. + + The threads interface must define the following types: + __gthread_key_t + __gthread_once_t + __gthread_mutex_t + __gthread_recursive_mutex_t + + The threads interface must define the following macros: + + __GTHREAD_ONCE_INIT + to initialize __gthread_once_t + __GTHREAD_MUTEX_INIT + to initialize __gthread_mutex_t to get a fast + non-recursive mutex. + __GTHREAD_MUTEX_INIT_FUNCTION + to initialize __gthread_mutex_t to get a fast + non-recursive mutex. + Define this to a function which looks like this: + void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *) + Some systems can't initialize a mutex without a + function call. Don't define __GTHREAD_MUTEX_INIT in this case. + __GTHREAD_RECURSIVE_MUTEX_INIT + __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION + as above, but for a recursive mutex. + + The threads interface must define the following static functions: + + int __gthread_once (__gthread_once_t *once, void (*func) ()) + + int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *)) + int __gthread_key_delete (__gthread_key_t key) + + void *__gthread_getspecific (__gthread_key_t key) + int __gthread_setspecific (__gthread_key_t key, const void *ptr) + + int __gthread_mutex_destroy (__gthread_mutex_t *mutex); + int __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *mutex); + + int __gthread_mutex_lock (__gthread_mutex_t *mutex); + int __gthread_mutex_trylock (__gthread_mutex_t *mutex); + int __gthread_mutex_unlock (__gthread_mutex_t *mutex); + + int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex); + int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex); + int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex); + + The following are supported in POSIX threads only. They are required to + fix a deadlock in static initialization inside libsupc++. The header file + gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra + features are supported. + + Types: + __gthread_cond_t + + Macros: + __GTHREAD_COND_INIT + __GTHREAD_COND_INIT_FUNCTION + + Interface: + int __gthread_cond_broadcast (__gthread_cond_t *cond); + int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex); + int __gthread_cond_wait_recursive (__gthread_cond_t *cond, + __gthread_recursive_mutex_t *mutex); + + All functions returning int should return zero on success or the error + number. If the operation is not supported, -1 is returned. + + If the following are also defined, you should + #define __GTHREADS_CXX0X 1 + to enable the c++0x thread library. + + Types: + __gthread_t + __gthread_time_t + + Interface: + int __gthread_create (__gthread_t *thread, void *(*func) (void*), + void *args); + int __gthread_join (__gthread_t thread, void **value_ptr); + int __gthread_detach (__gthread_t thread); + int __gthread_equal (__gthread_t t1, __gthread_t t2); + __gthread_t __gthread_self (void); + int __gthread_yield (void); + + int __gthread_mutex_timedlock (__gthread_mutex_t *m, + const __gthread_time_t *abs_timeout); + int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m, + const __gthread_time_t *abs_time); + + int __gthread_cond_signal (__gthread_cond_t *cond); + int __gthread_cond_timedwait (__gthread_cond_t *cond, + __gthread_mutex_t *mutex, + const __gthread_time_t *abs_timeout); + +*/ + +#if __GXX_WEAK__ +/* The pe-coff weak support isn't fully compatible to ELF's weak. + For static libraries it might would work, but as we need to deal + with shared versions too, we disable it for mingw-targets. */ +#ifdef __MINGW32__ +#undef _GLIBCXX_GTHREAD_USE_WEAK +#define _GLIBCXX_GTHREAD_USE_WEAK 0 +#endif + +#ifndef _GLIBCXX_GTHREAD_USE_WEAK +#define _GLIBCXX_GTHREAD_USE_WEAK 1 +#endif +#endif +#include + +#ifndef _GLIBCXX_HIDE_EXPORTS +#pragma GCC visibility pop +#endif + +#endif /* ! _GLIBCXX_GCC_GTHR_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/messages_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/messages_members.h new file mode 100644 index 000000000..7baec1c5a --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/messages_members.h @@ -0,0 +1,92 @@ +// std::messages implementation details, generic version -*- C++ -*- + +// Copyright (C) 2001-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/messages_members.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{locale} + */ + +// +// ISO C++ 14882: 22.2.7.1.2 messages virtual functions +// + +// Written by Benjamin Kosnik + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // Non-virtual member functions. + template + messages<_CharT>::messages(size_t __refs) + : facet(__refs) + { _M_c_locale_messages = _S_get_c_locale(); } + + template + messages<_CharT>::messages(__c_locale, const char*, size_t __refs) + : facet(__refs) + { _M_c_locale_messages = _S_get_c_locale(); } + + template + typename messages<_CharT>::catalog + messages<_CharT>::open(const basic_string& __s, const locale& __loc, + const char*) const + { return this->do_open(__s, __loc); } + + // Virtual member functions. + template + messages<_CharT>::~messages() + { _S_destroy_c_locale(_M_c_locale_messages); } + + template + typename messages<_CharT>::catalog + messages<_CharT>::do_open(const basic_string&, const locale&) const + { return 0; } + + template + typename messages<_CharT>::string_type + messages<_CharT>::do_get(catalog, int, int, + const string_type& __dfault) const + { return __dfault; } + + template + void + messages<_CharT>::do_close(catalog) const + { } + + // messages_byname + template + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) + : messages<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_messages); + this->_S_create_c_locale(this->_M_c_locale_messages, __s); + } + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/opt_random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/opt_random.h new file mode 100644 index 000000000..5e2b7b103 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/opt_random.h @@ -0,0 +1,38 @@ +// Optimizations for random number handling, generic version -*- C++ -*- + +// Copyright (C) 2012-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/opt_random.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{random} + */ + +#ifndef _BITS_OPT_RANDOM_H +#define _BITS_OPT_RANDOM_H 1 + +#pragma GCC system_header + + + + +#endif // _BITS_OPT_RANDOM_H diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/os_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/os_defines.h new file mode 100644 index 000000000..a54dd98f9 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/os_defines.h @@ -0,0 +1,61 @@ +// Specific definitions for newlib -*- C++ -*- + +// Copyright (C) 2000-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/os_defines.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{iosfwd} + */ + +#ifndef _GLIBCXX_OS_DEFINES +#define _GLIBCXX_OS_DEFINES 1 + +// System-specific #define, typedefs, corrections, etc, go here. This +// file will come before all others. + +#ifdef __CYGWIN__ +#define _GLIBCXX_GTHREAD_USE_WEAK 0 + +#if defined (_GLIBCXX_DLL) +#define _GLIBCXX_PSEUDO_VISIBILITY_default __attribute__ ((__dllimport__)) +#else +#define _GLIBCXX_PSEUDO_VISIBILITY_default +#endif +#define _GLIBCXX_PSEUDO_VISIBILITY_hidden + +#define _GLIBCXX_PSEUDO_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY_ ## V + +// See libstdc++/20806. +#define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1 + +// Enable use of GetModuleHandleEx (requires Windows XP/2003) in +// __cxa_thread_atexit to prevent modules from being unloaded before +// their dtors are called +#define _GLIBCXX_THREAD_ATEXIT_WIN32 1 + +// See libstdc++/69506 +#define _GLIBCXX_USE_WEAK_REF 0 + +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/stdc++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/stdc++.h new file mode 100644 index 000000000..262743a3c --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/stdc++.h @@ -0,0 +1,123 @@ +// C++ includes used for precompiling -*- C++ -*- + +// Copyright (C) 2003-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file stdc++.h + * This is an implementation file for a precompiled header. + */ + +// 17.4.1.2 Headers + +// C +#ifndef _GLIBCXX_NO_ASSERT +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __cplusplus >= 201103L +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +// C++ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __cplusplus >= 201103L +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +#if __cplusplus >= 201402L +#include +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/stdtr1c++.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/stdtr1c++.h new file mode 100644 index 000000000..9e6a5c230 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/stdtr1c++.h @@ -0,0 +1,53 @@ +// C++ includes used for precompiling TR1 -*- C++ -*- + +// Copyright (C) 2006-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file stdtr1c++.h + * This is an implementation file for a precompiled header. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/time_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/time_members.h new file mode 100644 index 000000000..c77c4685b --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/bits/time_members.h @@ -0,0 +1,92 @@ +// std::time_get, std::time_put implementation, generic version -*- C++ -*- + +// Copyright (C) 2001-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/time_members.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{locale} + */ + +// +// ISO C++ 14882: 22.2.5.1.2 - time_get functions +// ISO C++ 14882: 22.2.5.3.2 - time_put functions +// + +// Written by Benjamin Kosnik + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + __timepunct<_CharT>::__timepunct(size_t __refs) + : facet(__refs), _M_data(0) + { + _M_name_timepunct = _S_get_c_name(); + _M_initialize_timepunct(); + } + + template + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) + : facet(__refs), _M_data(__cache) + { + _M_name_timepunct = _S_get_c_name(); + _M_initialize_timepunct(); + } + + template + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, + size_t __refs) + : facet(__refs), _M_data(0) + { + if (__builtin_strcmp(__s, _S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + _M_name_timepunct = __tmp; + } + else + _M_name_timepunct = _S_get_c_name(); + + __try + { _M_initialize_timepunct(__cloc); } + __catch(...) + { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; + __throw_exception_again; + } + } + + template + __timepunct<_CharT>::~__timepunct() + { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; + delete _M_data; + _S_destroy_c_locale(_M_c_locale_timepunct); + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/ext/opt_random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/ext/opt_random.h new file mode 100644 index 000000000..2150f5826 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/arm-none-eabi/thumb/ext/opt_random.h @@ -0,0 +1,38 @@ +// Optimizations for random number extensions, generic version -*- C++ -*- + +// Copyright (C) 2012-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file ext/opt_random.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{ext/random} + */ + +#ifndef _EXT_OPT_RANDOM_H +#define _EXT_OPT_RANDOM_H 1 + +#pragma GCC system_header + + + + +#endif // _EXT_OPT_RANDOM_H diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/array b/devkitARM/arm-none-eabi/include/c++/7.1.0/array similarity index 78% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/array rename to devkitARM/arm-none-eabi/include/c++/7.1.0/array index 24be44f5b..1c7d6dc4a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/array +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/array @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -35,6 +35,7 @@ # include #else +#include #include #include #include @@ -47,6 +48,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER struct __array_traits { typedef _Tp _Type[_Nm]; + typedef __is_swappable<_Tp> _Is_swappable; + typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable; static constexpr _Tp& _S_ref(const _Type& __t, std::size_t __n) noexcept @@ -61,6 +64,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER struct __array_traits<_Tp, 0> { struct _Type { }; + typedef true_type _Is_swappable; + typedef true_type _Is_nothrow_swappable; static constexpr _Tp& _S_ref(const _Type&, std::size_t) noexcept @@ -113,70 +118,70 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER void swap(array& __other) - noexcept(noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))) + noexcept(_AT_Type::_Is_nothrow_swappable::value) { std::swap_ranges(begin(), end(), __other.begin()); } // Iterators. - iterator + _GLIBCXX17_CONSTEXPR iterator begin() noexcept { return iterator(data()); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator begin() const noexcept { return const_iterator(data()); } - iterator + _GLIBCXX17_CONSTEXPR iterator end() noexcept { return iterator(data() + _Nm); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator end() const noexcept { return const_iterator(data() + _Nm); } - reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } - reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator rend() noexcept { return reverse_iterator(begin()); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator cbegin() const noexcept { return const_iterator(data()); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator cend() const noexcept { return const_iterator(data() + _Nm); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } // Capacity. - constexpr size_type + constexpr size_type size() const noexcept { return _Nm; } - constexpr size_type + constexpr size_type max_size() const noexcept { return _Nm; } - constexpr bool + constexpr bool empty() const noexcept { return size() == 0; } // Element access. - reference + _GLIBCXX17_CONSTEXPR reference operator[](size_type __n) noexcept { return _AT_Type::_S_ref(_M_elems, __n); } @@ -184,7 +189,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER operator[](size_type __n) const noexcept { return _AT_Type::_S_ref(_M_elems, __n); } - reference + _GLIBCXX17_CONSTEXPR reference at(size_type __n) { if (__n >= _Nm) @@ -206,37 +211,44 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _AT_Type::_S_ref(_M_elems, 0)); } - reference + _GLIBCXX17_CONSTEXPR reference front() noexcept { return *begin(); } - constexpr const_reference + constexpr const_reference front() const noexcept { return _AT_Type::_S_ref(_M_elems, 0); } - reference + _GLIBCXX17_CONSTEXPR reference back() noexcept { return _Nm ? *(end() - 1) : *end(); } - constexpr const_reference + constexpr const_reference back() const noexcept - { - return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) + { + return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) : _AT_Type::_S_ref(_M_elems, 0); } - pointer + _GLIBCXX17_CONSTEXPR pointer data() noexcept { return _AT_Type::_S_ptr(_M_elems); } - const_pointer + _GLIBCXX17_CONSTEXPR const_pointer data() const noexcept { return _AT_Type::_S_ptr(_M_elems); } }; +#if __cpp_deduction_guides >= 201606 + template + array(_Tp, _Up...) + -> array && ...), _Tp>, + 1 + sizeof...(_Up)>; +#endif + // Array comparisons. template - inline bool + inline bool operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return std::equal(__one.begin(), __one.end(), __two.begin()); } @@ -248,9 +260,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template inline bool operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) - { + { return std::lexicographical_compare(__a.begin(), __a.end(), - __b.begin(), __b.end()); + __b.begin(), __b.end()); } template @@ -270,16 +282,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // Specialized algorithms. template - inline void + inline +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + // Constrained free swap overload, see p0185r1 + typename enable_if< + _GLIBCXX_STD_C::__array_traits<_Tp, _Nm>::_Is_swappable::value + >::type +#else + void +#endif swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) noexcept(noexcept(__one.swap(__two))) { __one.swap(__two); } +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + template + typename enable_if< + !_GLIBCXX_STD_C::__array_traits<_Tp, _Nm>::_Is_swappable::value>::type + swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete; +#endif + template constexpr _Tp& get(array<_Tp, _Nm>& __arr) noexcept { - static_assert(_Int < _Nm, "index is out of bounds"); + static_assert(_Int < _Nm, "array index is within bounds"); return _GLIBCXX_STD_C::__array_traits<_Tp, _Nm>:: _S_ref(__arr._M_elems, _Int); } @@ -288,7 +315,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER constexpr _Tp&& get(array<_Tp, _Nm>&& __arr) noexcept { - static_assert(_Int < _Nm, "index is out of bounds"); + static_assert(_Int < _Nm, "array index is within bounds"); return std::move(_GLIBCXX_STD_C::get<_Int>(__arr)); } @@ -296,7 +323,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER constexpr const _Tp& get(const array<_Tp, _Nm>& __arr) noexcept { - static_assert(_Int < _Nm, "index is out of bounds"); + static_assert(_Int < _Nm, "array index is within bounds"); return _GLIBCXX_STD_C::__array_traits<_Tp, _Nm>:: _S_ref(__arr._M_elems, _Int); } @@ -311,7 +338,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Tuple interface to class template array. /// tuple_size - template + template class tuple_size; /// Partial specialization for std::array @@ -331,6 +358,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef _Tp type; }; + template + struct __is_tuple_like_impl<_GLIBCXX_STD_C::array<_Tp, _Nm>> : true_type + { }; + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/atomic b/devkitARM/arm-none-eabi/include/c++/7.1.0/atomic similarity index 89% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/atomic rename to devkitARM/arm-none-eabi/include/c++/7.1.0/atomic index cdd1f0b99..5b252a43e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/atomic +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/atomic @@ -1,6 +1,6 @@ // -*- C++ -*- header. -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,6 +39,7 @@ #else #include +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -49,6 +50,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @{ */ +#if __cplusplus > 201402L +# define __cpp_lib_atomic_is_always_lock_free 201603 +#endif + template struct atomic; @@ -89,6 +94,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const volatile noexcept { return _M_base.is_lock_free(); } +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_BOOL_LOCK_FREE == 2; +#endif + void store(bool __i, memory_order __m = memory_order_seq_cst) noexcept { _M_base.store(__i, __m); } @@ -197,11 +206,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return load(); } _Tp - operator=(_Tp __i) noexcept + operator=(_Tp __i) noexcept { store(__i); return __i; } _Tp - operator=(_Tp __i) volatile noexcept + operator=(_Tp __i) volatile noexcept { store(__i); return __i; } bool @@ -220,59 +229,76 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION reinterpret_cast(-__alignof(_M_i))); } +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free + = __atomic_always_lock_free(sizeof(_M_i), 0); +#endif + void store(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept - { __atomic_store(&_M_i, &__i, __m); } + { __atomic_store(std::__addressof(_M_i), std::__addressof(__i), __m); } void store(_Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept - { __atomic_store(&_M_i, &__i, __m); } + { __atomic_store(std::__addressof(_M_i), std::__addressof(__i), __m); } _Tp load(memory_order __m = memory_order_seq_cst) const noexcept - { - _Tp tmp; - __atomic_load(&_M_i, &tmp, __m); - return tmp; + { + alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; + _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); + __atomic_load(std::__addressof(_M_i), __ptr, __m); + return *__ptr; } _Tp load(memory_order __m = memory_order_seq_cst) const volatile noexcept - { - _Tp tmp; - __atomic_load(&_M_i, &tmp, __m); - return tmp; + { + alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; + _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); + __atomic_load(std::__addressof(_M_i), __ptr, __m); + return *__ptr; } _Tp exchange(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept - { - _Tp tmp; - __atomic_exchange(&_M_i, &__i, &tmp, __m); - return tmp; + { + alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; + _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); + __atomic_exchange(std::__addressof(_M_i), std::__addressof(__i), + __ptr, __m); + return *__ptr; } _Tp - exchange(_Tp __i, + exchange(_Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept - { - _Tp tmp; - __atomic_exchange(&_M_i, &__i, &tmp, __m); - return tmp; + { + alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; + _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); + __atomic_exchange(std::__addressof(_M_i), std::__addressof(__i), + __ptr, __m); + return *__ptr; } bool - compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, + compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, memory_order __f) noexcept { - return __atomic_compare_exchange(&_M_i, &__e, &__i, true, __s, __f); + return __atomic_compare_exchange(std::__addressof(_M_i), + std::__addressof(__e), + std::__addressof(__i), + true, __s, __f); } bool - compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, + compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, memory_order __f) volatile noexcept { - return __atomic_compare_exchange(&_M_i, &__e, &__i, true, __s, __f); + return __atomic_compare_exchange(std::__addressof(_M_i), + std::__addressof(__e), + std::__addressof(__i), + true, __s, __f); } bool @@ -288,17 +314,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __cmpexch_failure_order(__m)); } bool - compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, + compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, memory_order __f) noexcept { - return __atomic_compare_exchange(&_M_i, &__e, &__i, false, __s, __f); + return __atomic_compare_exchange(std::__addressof(_M_i), + std::__addressof(__e), + std::__addressof(__i), + false, __s, __f); } bool - compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, + compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, memory_order __f) volatile noexcept { - return __atomic_compare_exchange(&_M_i, &__e, &__i, false, __s, __f); + return __atomic_compare_exchange(std::__addressof(_M_i), + std::__addressof(__e), + std::__addressof(__i), + false, __s, __f); } bool @@ -401,6 +433,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION is_lock_free() const volatile noexcept { return _M_b.is_lock_free(); } +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_POINTER_LOCK_FREE == 2; +#endif + void store(__pointer_type __p, memory_order __m = memory_order_seq_cst) noexcept @@ -522,6 +558,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_CHAR_LOCK_FREE == 2; +#endif }; /// Explicit specialization for signed char. @@ -541,6 +581,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_CHAR_LOCK_FREE == 2; +#endif }; /// Explicit specialization for unsigned char. @@ -560,6 +604,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_CHAR_LOCK_FREE == 2; +#endif }; /// Explicit specialization for short. @@ -579,6 +627,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_SHORT_LOCK_FREE == 2; +#endif }; /// Explicit specialization for unsigned short. @@ -598,6 +650,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_SHORT_LOCK_FREE == 2; +#endif }; /// Explicit specialization for int. @@ -617,6 +673,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_INT_LOCK_FREE == 2; +#endif }; /// Explicit specialization for unsigned int. @@ -636,6 +696,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_INT_LOCK_FREE == 2; +#endif }; /// Explicit specialization for long. @@ -655,6 +719,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_LONG_LOCK_FREE == 2; +#endif }; /// Explicit specialization for unsigned long. @@ -674,6 +742,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_LONG_LOCK_FREE == 2; +#endif }; /// Explicit specialization for long long. @@ -693,6 +765,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_LLONG_LOCK_FREE == 2; +#endif }; /// Explicit specialization for unsigned long long. @@ -712,6 +788,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_LLONG_LOCK_FREE == 2; +#endif }; /// Explicit specialization for wchar_t. @@ -731,6 +811,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_WCHAR_T_LOCK_FREE == 2; +#endif }; /// Explicit specialization for char16_t. @@ -750,6 +834,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_CHAR16_T_LOCK_FREE == 2; +#endif }; /// Explicit specialization for char32_t. @@ -769,6 +857,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::operator __integral_type; using __base_type::operator=; + +#if __cplusplus > 201402L + static constexpr bool is_always_lock_free = ATOMIC_CHAR32_T_LOCK_FREE == 2; +#endif }; @@ -818,6 +910,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef atomic atomic_char32_t; + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2441. Exact-width atomic typedefs should be provided + + /// atomic_int8_t + typedef atomic atomic_int8_t; + + /// atomic_uint8_t + typedef atomic atomic_uint8_t; + + /// atomic_int16_t + typedef atomic atomic_int16_t; + + /// atomic_uint16_t + typedef atomic atomic_uint16_t; + + /// atomic_int32_t + typedef atomic atomic_int32_t; + + /// atomic_uint32_t + typedef atomic atomic_uint32_t; + + /// atomic_int64_t + typedef atomic atomic_int64_t; + + /// atomic_uint64_t + typedef atomic atomic_uint64_t; + + /// atomic_int_least8_t typedef atomic atomic_int_least8_t; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/auto_ptr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/auto_ptr.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/backward/auto_ptr.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/backward/auto_ptr.h index a6aa2ebc2..9ad187388 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/auto_ptr.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/auto_ptr.h @@ -1,6 +1,6 @@ // auto_ptr implementation -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -180,7 +180,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION element_type& operator*() const throw() { - _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0); + __glibcxx_assert(_M_ptr != 0); return *_M_ptr; } @@ -193,7 +193,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION element_type* operator->() const throw() { - _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0); + __glibcxx_assert(_M_ptr != 0); return _M_ptr; } @@ -249,13 +249,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Automatic conversions * - * These operations convert an %auto_ptr into and from an auto_ptr_ref - * automatically as needed. This allows constructs such as + * These operations are supposed to convert an %auto_ptr into and from + * an auto_ptr_ref automatically as needed. This would allow + * constructs such as * @code * auto_ptr func_returning_auto_ptr(.....); * ... * auto_ptr ptr = func_returning_auto_ptr(.....); * @endcode + * + * But it doesn't work, and won't be fixed. For further details see + * http://cplusplus.github.io/LWG/lwg-closed.html#463 */ auto_ptr(auto_ptr_ref __ref) throw() : _M_ptr(__ref._M_ptr) { } @@ -298,7 +302,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { __r.release(); } template - template + template inline __shared_ptr<_Tp, _Lp>::__shared_ptr(std::auto_ptr<_Tp1>&& __r) : _M_ptr(__r.get()), _M_refcount() @@ -307,11 +311,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static_assert( sizeof(_Tp1) > 0, "incomplete type" ); _Tp1* __tmp = __r.get(); _M_refcount = __shared_count<_Lp>(std::move(__r)); - __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp); + _M_enable_shared_from_this_with(__tmp); } template - template + template inline shared_ptr<_Tp>::shared_ptr(std::auto_ptr<_Tp1>&& __r) : __shared_ptr<_Tp>(std::move(__r)) { } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/backward_warning.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/backward_warning.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/backward/backward_warning.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/backward/backward_warning.h index 0b264eb98..7eba3f851 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/backward_warning.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/backward_warning.h @@ -1,4 +1,4 @@ -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/binders.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/binders.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/backward/binders.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/backward/binders.h index f3e061673..7564a6c12 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/binders.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/binders.h @@ -1,6 +1,6 @@ // Functor implementations -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hash_fun.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hash_fun.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hash_fun.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hash_fun.h index 995511241..dc38ad505 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hash_fun.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hash_fun.h @@ -1,6 +1,6 @@ // 'struct hash' from SGI -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hash_map b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hash_map similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hash_map rename to devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hash_map index a9dc9cf77..dcd0b71cc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hash_map +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hash_map @@ -1,6 +1,6 @@ // Hashing map implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hash_set b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hash_set similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hash_set rename to devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hash_set index 3c9ec7017..242cca194 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hash_set +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hash_set @@ -1,6 +1,6 @@ // Hashing set implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hashtable.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hashtable.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hashtable.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hashtable.h index 3f2bb9e2a..956fe5e17 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/hashtable.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/hashtable.h @@ -1,6 +1,6 @@ // Hashtable implementation used by containers -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/strstream b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/strstream similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/backward/strstream rename to devkitARM/arm-none-eabi/include/c++/7.1.0/backward/strstream index 9288e5639..9946ba8cd 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/backward/strstream +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/backward/strstream @@ -1,6 +1,6 @@ // Backward-compat support -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -40,9 +40,8 @@ // MAY BE REMOVED in a future standard revision. One should use the // header instead. -/** @file backward/strstream - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{sstream} +/** @file strstream + * This is a Standard C++ Library header. */ #ifndef _BACKWARD_STRSTREAM @@ -53,7 +52,6 @@ #include #include #include -#include namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/algorithmfwd.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/algorithmfwd.h similarity index 89% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/algorithmfwd.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/algorithmfwd.h index 1dfc4ad7b..3ff4ff712 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/algorithmfwd.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/algorithmfwd.h @@ -1,6 +1,6 @@ // Forward declarations -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -45,13 +45,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /* adjacent_find - all_of (C++0x) - any_of (C++0x) + all_of (C++11) + any_of (C++11) binary_search + clamp (C++17) copy copy_backward - copy_if (C++0x) - copy_n (C++0x) + copy_if (C++11) + copy_n (C++11) count count_if equal @@ -62,17 +63,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION find_end find_first_of find_if - find_if_not (C++0x) + find_if_not (C++11) for_each generate generate_n includes inplace_merge - is_heap (C++0x) - is_heap_until (C++0x) - is_partitioned (C++0x) - is_sorted (C++0x) - is_sorted_until (C++0x) + is_heap (C++11) + is_heap_until (C++11) + is_partitioned (C++11) + is_sorted (C++11) + is_sorted_until (C++11) iter_swap lexicographical_compare lower_bound @@ -82,17 +83,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION merge min min_element - minmax (C++0x) - minmax_element (C++0x) + minmax (C++11) + minmax_element (C++11) mismatch next_permutation - none_of (C++0x) + none_of (C++11) nth_element partial_sort partial_sort_copy partition - partition_copy (C++0x) - partition_point (C++0x) + partition_copy (C++11) + partition_point (C++11) pop_heap prev_permutation push_heap @@ -115,7 +116,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION set_intersection set_symmetric_difference set_union - shuffle (C++0x) + shuffle (C++11) sort sort_heap stable_partition @@ -167,12 +168,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * These algorithms are variations of a classic binary search, and * all assume that the sequence being searched is already sorted. - * + * * The number of comparisons will be logarithmic (and as few as * possible). The number of steps through the sequence will be * logarithmic for random-access iterators (e.g., pointers), and * linear otherwise. - * + * * The LWG has passed Defect Report 270, which notes: The * proposed resolution reinterprets binary search. Instead of * thinking about searching for a value in a sorted range, we view @@ -201,15 +202,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif template - bool + bool binary_search(_FIter, _FIter, const _Tp&); template - bool + bool binary_search(_FIter, _FIter, const _Tp&, _Compare); +#if __cplusplus > 201402L + template + _GLIBCXX14_CONSTEXPR + const _Tp& + clamp(const _Tp&, const _Tp&, const _Tp&); + + template + _GLIBCXX14_CONSTEXPR + const _Tp& + clamp(const _Tp&, const _Tp&, const _Tp&, _Compare); +#endif + template - _OIter + _OIter copy(_IIter, _IIter, _OIter); template @@ -238,7 +251,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION equal_range(_FIter, _FIter, const _Tp&, _Compare); template - void + void fill(_FIter, _FIter, const _Tp&); template @@ -269,36 +282,36 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // generate_n template - bool + bool includes(_IIter1, _IIter1, _IIter2, _IIter2); template - bool + bool includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); template - void + void inplace_merge(_BIter, _BIter, _BIter); template - void + void inplace_merge(_BIter, _BIter, _BIter, _Compare); #if __cplusplus >= 201103L template - bool + bool is_heap(_RAIter, _RAIter); template - bool + bool is_heap(_RAIter, _RAIter, _Compare); template - _RAIter + _RAIter is_heap_until(_RAIter, _RAIter); template - _RAIter + _RAIter is_heap_until(_RAIter, _RAIter, _Compare); template @@ -315,63 +328,63 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate); template - bool + bool is_sorted(_FIter, _FIter); template - bool + bool is_sorted(_FIter, _FIter, _Compare); template - _FIter + _FIter is_sorted_until(_FIter, _FIter); template - _FIter + _FIter is_sorted_until(_FIter, _FIter, _Compare); #endif template - void + void iter_swap(_FIter1, _FIter2); template - _FIter + _FIter lower_bound(_FIter, _FIter, const _Tp&); template - _FIter + _FIter lower_bound(_FIter, _FIter, const _Tp&, _Compare); template - void + void make_heap(_RAIter, _RAIter); template - void + void make_heap(_RAIter, _RAIter, _Compare); - template + template _GLIBCXX14_CONSTEXPR - const _Tp& + const _Tp& max(const _Tp&, const _Tp&); template _GLIBCXX14_CONSTEXPR - const _Tp& + const _Tp& max(const _Tp&, const _Tp&, _Compare); // max_element // merge - template + template _GLIBCXX14_CONSTEXPR - const _Tp& + const _Tp& min(const _Tp&, const _Tp&); template _GLIBCXX14_CONSTEXPR - const _Tp& + const _Tp& min(const _Tp&, const _Tp&, _Compare); // min_element @@ -379,7 +392,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L template _GLIBCXX14_CONSTEXPR - pair + pair minmax(const _Tp&, const _Tp&); template @@ -431,11 +444,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // mismatch template - bool + bool next_permutation(_BIter, _BIter); template - bool + bool next_permutation(_BIter, _BIter, _Compare); #if __cplusplus >= 201103L @@ -469,65 +482,65 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif template - void + void pop_heap(_RAIter, _RAIter); template - void + void pop_heap(_RAIter, _RAIter, _Compare); template - bool + bool prev_permutation(_BIter, _BIter); template - bool + bool prev_permutation(_BIter, _BIter, _Compare); template - void + void push_heap(_RAIter, _RAIter); template - void + void push_heap(_RAIter, _RAIter, _Compare); // random_shuffle template - _FIter + _FIter remove(_FIter, _FIter, const _Tp&); template - _FIter + _FIter remove_if(_FIter, _FIter, _Predicate); template - _OIter + _OIter remove_copy(_IIter, _IIter, _OIter, const _Tp&); template - _OIter + _OIter remove_copy_if(_IIter, _IIter, _OIter, _Predicate); // replace template - _OIter + _OIter replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); template - _OIter + _OIter replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); // replace_if template - void + void reverse(_BIter, _BIter); template - _OIter + _OIter reverse_copy(_BIter, _BIter, _OIter); inline namespace _V2 @@ -538,7 +551,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - _OIter + _OIter rotate_copy(_FIter, _FIter, _FIter, _OIter); // search @@ -555,56 +568,51 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif template - void + void sort_heap(_RAIter, _RAIter); template - void + void sort_heap(_RAIter, _RAIter, _Compare); template - _BIter + _BIter stable_partition(_BIter, _BIter, _Predicate); - template - void - swap(_Tp&, _Tp&) -#if __cplusplus >= 201103L - noexcept(__and_, - is_nothrow_move_assignable<_Tp>>::value) -#endif - ; +#if __cplusplus < 201103L + // For C++11 swap() is declared in . template - void - swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) -#if __cplusplus >= 201103L - noexcept(noexcept(swap(*__a, *__b))) + inline void + swap(_Tp& __a, _Tp& __b); + + template + inline void + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]); #endif - ; template - _FIter2 + _FIter2 swap_ranges(_FIter1, _FIter1, _FIter2); // transform template - _FIter + _FIter unique(_FIter, _FIter); template - _FIter + _FIter unique(_FIter, _FIter, _BinaryPredicate); // unique_copy template - _FIter + _FIter upper_bound(_FIter, _FIter, const _Tp&); template - _FIter + _FIter upper_bound(_FIter, _FIter, const _Tp&, _Compare); _GLIBCXX_END_NAMESPACE_VERSION @@ -612,11 +620,11 @@ _GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_ALGO template - _FIter + _FIter adjacent_find(_FIter, _FIter); template - _FIter + _FIter adjacent_find(_FIter, _FIter, _BinaryPredicate); template @@ -628,15 +636,15 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO count_if(_IIter, _IIter, _Predicate); template - bool + bool equal(_IIter1, _IIter1, _IIter2); template - bool + bool equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); template - _IIter + _IIter find(_IIter, _IIter, const _Tp&); template @@ -652,11 +660,11 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO find_if(_IIter, _IIter, _Predicate); template - _Funct + _Funct for_each(_IIter, _IIter, _Funct); template - void + void generate(_FIter, _FIter, _Generator); template @@ -664,40 +672,40 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO generate_n(_OIter, _Size, _Generator); template - bool + bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); template - bool + bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); template _GLIBCXX14_CONSTEXPR - _FIter + _FIter max_element(_FIter, _FIter); template _GLIBCXX14_CONSTEXPR - _FIter + _FIter max_element(_FIter, _FIter, _Compare); template - _OIter + _OIter merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); - template - _OIter + _OIter merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _GLIBCXX14_CONSTEXPR - _FIter + _FIter min_element(_FIter, _FIter); template _GLIBCXX14_CONSTEXPR - _FIter + _FIter min_element(_FIter, _FIter, _Compare); template @@ -709,31 +717,31 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); template - void + void nth_element(_RAIter, _RAIter, _RAIter); template - void + void nth_element(_RAIter, _RAIter, _RAIter, _Compare); template - void + void partial_sort(_RAIter, _RAIter, _RAIter); template - void + void partial_sort(_RAIter, _RAIter, _RAIter, _Compare); template - _BIter + _BIter partition(_BIter, _BIter, _Predicate); template - void + void random_shuffle(_RAIter, _RAIter); template - void + void random_shuffle(_RAIter, _RAIter, #if __cplusplus >= 201103L _Generator&&); @@ -742,98 +750,98 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO #endif template - void + void replace(_FIter, _FIter, const _Tp&, const _Tp&); template - void + void replace_if(_FIter, _FIter, _Predicate, const _Tp&); template - _FIter1 + _FIter1 search(_FIter1, _FIter1, _FIter2, _FIter2); template - _FIter1 + _FIter1 search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); template - _FIter + _FIter search_n(_FIter, _FIter, _Size, const _Tp&); - template - _FIter + _FIter search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); template - _OIter + _OIter set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); - template - _OIter + _OIter set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template - _OIter + _OIter set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template - _OIter + _OIter set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _OIter set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); - template _OIter - set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template - _OIter + _OIter set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template - _OIter + _OIter set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template - void + void sort(_RAIter, _RAIter); template - void + void sort(_RAIter, _RAIter, _Compare); template - void + void stable_sort(_RAIter, _RAIter); template - void + void stable_sort(_RAIter, _RAIter, _Compare); template - _OIter + _OIter transform(_IIter, _IIter, _OIter, _UnaryOperation); - template - _OIter + _OIter transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); template - _OIter + _OIter unique_copy(_IIter, _IIter, _OIter); template - _OIter + _OIter unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); _GLIBCXX_END_NAMESPACE_ALGO diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/alloc_traits.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/alloc_traits.h similarity index 57% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/alloc_traits.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/alloc_traits.h index 12c6c12f1..4d1e489b0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/alloc_traits.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/alloc_traits.h @@ -1,6 +1,6 @@ // Allocator traits -*- C++ -*- -// Copyright (C) 2011-2015 Free Software Foundation, Inc. +// Copyright (C) 2011-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,87 +36,103 @@ #include #include +#define __cpp_lib_allocator_traits_is_always_equal 201411 + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION - template - class __alloctr_rebind_helper - { - template - static constexpr true_type - _S_chk(typename _Alloc2::template rebind<_Tp2>::other*); + struct __allocator_traits_base + { + template + struct __rebind : __replace_first_arg<_Tp, _Up> { }; - template - static constexpr false_type - _S_chk(...); + template + struct __rebind<_Tp, _Up, + __void_t::other>> + { using type = typename _Tp::template rebind<_Up>::other; }; - public: - using __type = decltype(_S_chk<_Alloc, _Tp>(nullptr)); - }; + protected: + template + using __pointer = typename _Tp::pointer; + template + using __c_pointer = typename _Tp::const_pointer; + template + using __v_pointer = typename _Tp::void_pointer; + template + using __cv_pointer = typename _Tp::const_void_pointer; + template + using __pocca = typename _Tp::propagate_on_container_copy_assignment; + template + using __pocma = typename _Tp::propagate_on_container_move_assignment; + template + using __pocs = typename _Tp::propagate_on_container_swap; + template + using __equal = typename _Tp::is_always_equal; + }; - template::__type::value> - struct __alloctr_rebind; - - template - struct __alloctr_rebind<_Alloc, _Tp, true> - { - typedef typename _Alloc::template rebind<_Tp>::other __type; - }; - - template class _Alloc, typename _Tp, - typename _Up, typename... _Args> - struct __alloctr_rebind<_Alloc<_Up, _Args...>, _Tp, false> - { - typedef _Alloc<_Tp, _Args...> __type; - }; - - template - using __alloc_rebind = typename __alloctr_rebind<_Alloc, _Tp>::__type; + template + using __alloc_rebind + = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type; /** * @brief Uniform interface to all allocator types. * @ingroup allocators */ template - struct allocator_traits + struct allocator_traits : __allocator_traits_base { /// The allocator type typedef _Alloc allocator_type; /// The allocated type typedef typename _Alloc::value_type value_type; -#define _GLIBCXX_ALLOC_TR_NESTED_TYPE(_NTYPE, _ALT) \ - private: \ - template \ - static typename _Tp::_NTYPE _S_##_NTYPE##_helper(_Tp*); \ - static _ALT _S_##_NTYPE##_helper(...); \ - typedef decltype(_S_##_NTYPE##_helper((_Alloc*)0)) __##_NTYPE; \ - public: - -_GLIBCXX_ALLOC_TR_NESTED_TYPE(pointer, value_type*) - /** * @brief The allocator's pointer type. * * @c Alloc::pointer if that type exists, otherwise @c value_type* */ - typedef __pointer pointer; + using pointer = __detected_or_t; -_GLIBCXX_ALLOC_TR_NESTED_TYPE(const_pointer, - typename pointer_traits::template rebind) + private: + // Select _Func<_Alloc> or pointer_traits::rebind<_Tp> + template class _Func, typename _Tp, typename = void> + struct _Ptr + { + using type = typename pointer_traits::template rebind<_Tp>; + }; + template class _Func, typename _Tp> + struct _Ptr<_Func, _Tp, __void_t<_Func<_Alloc>>> + { + using type = _Func<_Alloc>; + }; + + // Select _A2::difference_type or pointer_traits<_Ptr>::difference_type + template + struct _Diff + { using type = typename pointer_traits<_PtrT>::difference_type; }; + + template + struct _Diff<_A2, _PtrT, __void_t> + { using type = typename _A2::difference_type; }; + + // Select _A2::size_type or make_unsigned<_DiffT>::type + template + struct _Size : make_unsigned<_DiffT> { }; + + template + struct _Size<_A2, _DiffT, __void_t> + { using type = typename _A2::size_type; }; + + public: /** * @brief The allocator's const pointer type. * * @c Alloc::const_pointer if that type exists, otherwise * pointer_traits::rebind */ - typedef __const_pointer const_pointer; - -_GLIBCXX_ALLOC_TR_NESTED_TYPE(void_pointer, - typename pointer_traits::template rebind) + using const_pointer = typename _Ptr<__c_pointer, const value_type>::type; /** * @brief The allocator's void pointer type. @@ -124,10 +140,7 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(void_pointer, * @c Alloc::void_pointer if that type exists, otherwise * pointer_traits::rebind */ - typedef __void_pointer void_pointer; - -_GLIBCXX_ALLOC_TR_NESTED_TYPE(const_void_pointer, - typename pointer_traits::template rebind) + using void_pointer = typename _Ptr<__v_pointer, void>::type; /** * @brief The allocator's const void pointer type. @@ -135,10 +148,7 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(const_void_pointer, * @c Alloc::const_void_pointer if that type exists, otherwise * pointer_traits::rebind */ - typedef __const_void_pointer const_void_pointer; - -_GLIBCXX_ALLOC_TR_NESTED_TYPE(difference_type, - typename pointer_traits::difference_type) + using const_void_pointer = typename _Ptr<__cv_pointer, const void>::type; /** * @brief The allocator's difference type @@ -146,10 +156,7 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(difference_type, * @c Alloc::difference_type if that type exists, otherwise * pointer_traits::difference_type */ - typedef __difference_type difference_type; - -_GLIBCXX_ALLOC_TR_NESTED_TYPE(size_type, - typename make_unsigned::type) + using difference_type = typename _Diff<_Alloc, pointer>::type; /** * @brief The allocator's size type @@ -157,10 +164,7 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(size_type, * @c Alloc::size_type if that type exists, otherwise * make_unsigned::type */ - typedef __size_type size_type; - -_GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_copy_assignment, - false_type) + using size_type = typename _Size<_Alloc, difference_type>::type; /** * @brief How the allocator is propagated on copy assignment @@ -168,11 +172,8 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_copy_assignment, * @c Alloc::propagate_on_container_copy_assignment if that type exists, * otherwise @c false_type */ - typedef __propagate_on_container_copy_assignment - propagate_on_container_copy_assignment; - -_GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_move_assignment, - false_type) + using propagate_on_container_copy_assignment + = __detected_or_t; /** * @brief How the allocator is propagated on move assignment @@ -180,11 +181,8 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_move_assignment, * @c Alloc::propagate_on_container_move_assignment if that type exists, * otherwise @c false_type */ - typedef __propagate_on_container_move_assignment - propagate_on_container_move_assignment; - -_GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap, - false_type) + using propagate_on_container_move_assignment + = __detected_or_t; /** * @brief How the allocator is propagated on swap @@ -192,44 +190,33 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap, * @c Alloc::propagate_on_container_swap if that type exists, * otherwise @c false_type */ - typedef __propagate_on_container_swap propagate_on_container_swap; + using propagate_on_container_swap + = __detected_or_t; -#undef _GLIBCXX_ALLOC_TR_NESTED_TYPE + /** + * @brief Whether all instances of the allocator type compare equal. + * + * @c Alloc::is_always_equal if that type exists, + * otherwise @c is_empty::type + */ + using is_always_equal + = __detected_or_t::type, __equal, _Alloc>; template - using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type; + using rebind_alloc = __alloc_rebind<_Alloc, _Tp>; template using rebind_traits = allocator_traits>; private: template - struct __allocate_helper - { - template()->allocate( - std::declval(), - std::declval()))> - static true_type __test(int); - - template - static false_type __test(...); - - using type = decltype(__test<_Alloc>(0)); - }; - - template - using __has_allocate = typename __allocate_helper<_Alloc2>::type; - - template>> - static pointer - _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint) + static auto + _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint, int) + -> decltype(__a.allocate(__n, __hint)) { return __a.allocate(__n, __hint); } - template>>> + template static pointer - _S_allocate(_Alloc2& __a, size_type __n, _UnusedHint) + _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) { return __a.allocate(__n); } template @@ -262,86 +249,40 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap, _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); } - template - struct __destroy_helper - { - template()->destroy( - std::declval<_Tp*>()))> - static true_type __test(int); - - template - static false_type __test(...); - - using type = decltype(__test<_Alloc>(0)); - }; - - template - using __has_destroy = typename __destroy_helper<_Tp>::type; - - template - static _Require<__has_destroy<_Tp>> - _S_destroy(_Alloc& __a, _Tp* __p) + template + static auto + _S_destroy(_Alloc2& __a, _Tp* __p, int) + -> decltype(__a.destroy(__p)) { __a.destroy(__p); } - template - static _Require<__not_<__has_destroy<_Tp>>> - _S_destroy(_Alloc&, _Tp* __p) + template + static void + _S_destroy(_Alloc2&, _Tp* __p, ...) { __p->~_Tp(); } template - struct __maxsize_helper - { - template()->max_size())> - static true_type __test(int); - - template - static false_type __test(...); - - using type = decltype(__test<_Alloc2>(0)); - }; - - template - using __has_max_size = typename __maxsize_helper<_Alloc2>::type; - - template>> - static size_type + static auto _S_max_size(_Alloc2& __a, int) + -> decltype(__a.max_size()) { return __a.max_size(); } - template>>> + template static size_type _S_max_size(_Alloc2&, ...) - { return __gnu_cxx::__numeric_traits::__max; } - - template - struct __select_helper { - template() - ->select_on_container_copy_construction())> - static true_type __test(int); - - template - static false_type __test(...); - - using type = decltype(__test<_Alloc2>(0)); - }; + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2466. allocator_traits::max_size() default behavior is incorrect + return __gnu_cxx::__numeric_traits::__max + / sizeof(value_type); + } template - using __has_soccc = typename __select_helper<_Alloc2>::type; - - template>> - static _Alloc2 + static auto _S_select(_Alloc2& __a, int) + -> decltype(__a.select_on_container_copy_construction()) { return __a.select_on_container_copy_construction(); } - template>>> + template static _Alloc2 _S_select(_Alloc2& __a, ...) { return __a; } @@ -372,7 +313,7 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap, */ static pointer allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) - { return _S_allocate(__a, __n, __hint); } + { return _S_allocate(__a, __n, __hint, 0); } /** * @brief Deallocate memory. @@ -382,7 +323,8 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap, * * Calls a.deallocate(p, n) */ - static void deallocate(_Alloc& __a, pointer __p, size_type __n) + static void + deallocate(_Alloc& __a, pointer __p, size_type __n) { __a.deallocate(__p, __n); } /** @@ -409,9 +351,9 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap, * Calls @c __a.destroy(__p) if that expression is well-formed, * otherwise calls @c __p->~_Tp() */ - template + template static void destroy(_Alloc& __a, _Tp* __p) - { _S_destroy(__a, __p); } + { _S_destroy(__a, __p, 0); } /** * @brief The maximum supported allocation size @@ -437,6 +379,133 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap, { return _S_select(__rhs, 0); } }; + /// Partial specialization for std::allocator. + template + struct allocator_traits> + { + /// The allocator type + using allocator_type = allocator<_Tp>; + /// The allocated type + using value_type = _Tp; + + /// The allocator's pointer type. + using pointer = _Tp*; + + /// The allocator's const pointer type. + using const_pointer = const _Tp*; + + /// The allocator's void pointer type. + using void_pointer = void*; + + /// The allocator's const void pointer type. + using const_void_pointer = const void*; + + /// The allocator's difference type + using difference_type = std::ptrdiff_t; + + /// The allocator's size type + using size_type = std::size_t; + + /// How the allocator is propagated on copy assignment + using propagate_on_container_copy_assignment = false_type; + + /// How the allocator is propagated on move assignment + using propagate_on_container_move_assignment = true_type; + + /// How the allocator is propagated on swap + using propagate_on_container_swap = false_type; + + /// Whether all instances of the allocator type compare equal. + using is_always_equal = true_type; + + template + using rebind_alloc = allocator<_Up>; + + template + using rebind_traits = allocator_traits>; + + /** + * @brief Allocate memory. + * @param __a An allocator. + * @param __n The number of objects to allocate space for. + * + * Calls @c a.allocate(n) + */ + static pointer + allocate(allocator_type& __a, size_type __n) + { return __a.allocate(__n); } + + /** + * @brief Allocate memory. + * @param __a An allocator. + * @param __n The number of objects to allocate space for. + * @param __hint Aid to locality. + * @return Memory of suitable size and alignment for @a n objects + * of type @c value_type + * + * Returns a.allocate(n, hint) + */ + static pointer + allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) + { return __a.allocate(__n, __hint); } + + /** + * @brief Deallocate memory. + * @param __a An allocator. + * @param __p Pointer to the memory to deallocate. + * @param __n The number of objects space was allocated for. + * + * Calls a.deallocate(p, n) + */ + static void + deallocate(allocator_type& __a, pointer __p, size_type __n) + { __a.deallocate(__p, __n); } + + /** + * @brief Construct an object of type @a _Up + * @param __a An allocator. + * @param __p Pointer to memory of suitable size and alignment for Tp + * @param __args Constructor arguments. + * + * Calls __a.construct(__p, std::forward(__args)...) + */ + template + static void + construct(allocator_type& __a, _Up* __p, _Args&&... __args) + { __a.construct(__p, std::forward<_Args>(__args)...); } + + /** + * @brief Destroy an object of type @a _Up + * @param __a An allocator. + * @param __p Pointer to the object to destroy + * + * Calls @c __a.destroy(__p). + */ + template + static void + destroy(allocator_type& __a, _Up* __p) + { __a.destroy(__p); } + + /** + * @brief The maximum supported allocation size + * @param __a An allocator. + * @return @c __a.max_size() + */ + static size_type + max_size(const allocator_type& __a) noexcept + { return __a.max_size(); } + + /** + * @brief Obtain an allocator to use when copying a container. + * @param __rhs An allocator. + * @return @c __rhs + */ + static allocator_type + select_on_container_copy_construction(const allocator_type& __rhs) + { return __rhs; } + }; + + template inline void __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/allocated_ptr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/allocated_ptr.h similarity index 89% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/allocated_ptr.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/allocated_ptr.h index 63088c22d..773b3f500 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/allocated_ptr.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/allocated_ptr.h @@ -1,6 +1,6 @@ // Guarded Allocation -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -50,14 +50,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Take ownership of __ptr __allocated_ptr(_Alloc& __a, pointer __ptr) noexcept - : _M_alloc(&__a), _M_ptr(__ptr) + : _M_alloc(std::__addressof(__a)), _M_ptr(__ptr) { } /// Convert __ptr to allocator's pointer type and take ownership of it template>> __allocated_ptr(_Alloc& __a, _Ptr __ptr) - : _M_alloc(&__a), _M_ptr(pointer_traits::pointer_to(*__ptr)) + : _M_alloc(std::__addressof(__a)), + _M_ptr(pointer_traits::pointer_to(*__ptr)) { } /// Transfer ownership of the owned pointer @@ -84,10 +85,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION value_type* get() { return _S_raw_ptr(_M_ptr); } private: - value_type* _S_raw_ptr(value_type* __ptr) { return __ptr; } + static value_type* _S_raw_ptr(value_type* __ptr) { return __ptr; } template - auto _S_raw_ptr(_Ptr __ptr) -> decltype(_S_raw_ptr(__ptr.operator->())) + static auto + _S_raw_ptr(_Ptr __ptr) -> decltype(_S_raw_ptr(__ptr.operator->())) { return _S_raw_ptr(__ptr.operator->()); } _Alloc* _M_alloc; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/allocator.h similarity index 90% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/allocator.h index 605731533..20813864c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/allocator.h @@ -1,6 +1,6 @@ // Allocators -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -49,6 +49,11 @@ #include #endif +#define __cpp_lib_incomplete_container_elements 201505 +#if __cplusplus >= 201103L +# define __cpp_lib_allocator_is_always_equal 201411 +#endif + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -70,13 +75,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef void value_type; template - struct rebind - { typedef allocator<_Tp1> other; }; + struct rebind + { typedef allocator<_Tp1> other; }; #if __cplusplus >= 201103L // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2103. std::allocator propagate_on_container_move_assignment typedef true_type propagate_on_container_move_assignment; + + typedef true_type is_always_equal; + + template + void + construct(_Up* __p, _Args&&... __args) + { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } + + template + void + destroy(_Up* __p) { __p->~_Up(); } #endif }; @@ -101,13 +117,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef _Tp value_type; template - struct rebind - { typedef allocator<_Tp1> other; }; + struct rebind + { typedef allocator<_Tp1> other; }; #if __cplusplus >= 201103L // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2103. std::allocator propagate_on_container_move_assignment typedef true_type propagate_on_container_move_assignment; + + typedef true_type is_always_equal; #endif allocator() throw() { } @@ -116,7 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : __allocator_base<_Tp>(__a) { } template - allocator(const allocator<_Tp1>&) throw() { } + allocator(const allocator<_Tp1>&) throw() { } ~allocator() throw() { } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/atomic_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/atomic_base.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/atomic_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/atomic_base.h index 75a7ca773..e79ff67ea 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/atomic_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/atomic_base.h @@ -1,6 +1,6 @@ // -*- C++ -*- header. -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -366,7 +366,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_ALWAYS_INLINE void store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept { - memory_order __b = __m & __memory_order_mask; + memory_order __b = __m & __memory_order_mask; __glibcxx_assert(__b != memory_order_acquire); __glibcxx_assert(__b != memory_order_acq_rel); __glibcxx_assert(__b != memory_order_consume); @@ -378,7 +378,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION store(__int_type __i, memory_order __m = memory_order_seq_cst) volatile noexcept { - memory_order __b = __m & __memory_order_mask; + memory_order __b = __m & __memory_order_mask; __glibcxx_assert(__b != memory_order_acquire); __glibcxx_assert(__b != memory_order_acq_rel); __glibcxx_assert(__b != memory_order_consume); @@ -389,7 +389,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_ALWAYS_INLINE __int_type load(memory_order __m = memory_order_seq_cst) const noexcept { - memory_order __b = __m & __memory_order_mask; + memory_order __b = __m & __memory_order_mask; __glibcxx_assert(__b != memory_order_release); __glibcxx_assert(__b != memory_order_acq_rel); @@ -399,7 +399,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_ALWAYS_INLINE __int_type load(memory_order __m = memory_order_seq_cst) const volatile noexcept { - memory_order __b = __m & __memory_order_mask; + memory_order __b = __m & __memory_order_mask; __glibcxx_assert(__b != memory_order_release); __glibcxx_assert(__b != memory_order_acq_rel); @@ -425,8 +425,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION compare_exchange_weak(__int_type& __i1, __int_type __i2, memory_order __m1, memory_order __m2) noexcept { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; + memory_order __b2 = __m2 & __memory_order_mask; + memory_order __b1 = __m1 & __memory_order_mask; __glibcxx_assert(__b2 != memory_order_release); __glibcxx_assert(__b2 != memory_order_acq_rel); __glibcxx_assert(__b2 <= __b1); @@ -439,8 +439,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m1, memory_order __m2) volatile noexcept { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; + memory_order __b2 = __m2 & __memory_order_mask; + memory_order __b1 = __m1 & __memory_order_mask; __glibcxx_assert(__b2 != memory_order_release); __glibcxx_assert(__b2 != memory_order_acq_rel); __glibcxx_assert(__b2 <= __b1); @@ -468,8 +468,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION compare_exchange_strong(__int_type& __i1, __int_type __i2, memory_order __m1, memory_order __m2) noexcept { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; + memory_order __b2 = __m2 & __memory_order_mask; + memory_order __b1 = __m1 & __memory_order_mask; __glibcxx_assert(__b2 != memory_order_release); __glibcxx_assert(__b2 != memory_order_acq_rel); __glibcxx_assert(__b2 <= __b1); @@ -482,8 +482,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m1, memory_order __m2) volatile noexcept { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; + memory_order __b2 = __m2 & __memory_order_mask; + memory_order __b1 = __m1 & __memory_order_mask; __glibcxx_assert(__b2 != memory_order_release); __glibcxx_assert(__b2 != memory_order_acq_rel); @@ -695,7 +695,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION store(__pointer_type __p, memory_order __m = memory_order_seq_cst) volatile noexcept { - memory_order __b = __m & __memory_order_mask; + memory_order __b = __m & __memory_order_mask; __glibcxx_assert(__b != memory_order_acquire); __glibcxx_assert(__b != memory_order_acq_rel); __glibcxx_assert(__b != memory_order_consume); @@ -706,7 +706,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_ALWAYS_INLINE __pointer_type load(memory_order __m = memory_order_seq_cst) const noexcept { - memory_order __b = __m & __memory_order_mask; + memory_order __b = __m & __memory_order_mask; __glibcxx_assert(__b != memory_order_release); __glibcxx_assert(__b != memory_order_acq_rel); @@ -716,7 +716,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_ALWAYS_INLINE __pointer_type load(memory_order __m = memory_order_seq_cst) const volatile noexcept { - memory_order __b = __m & __memory_order_mask; + memory_order __b = __m & __memory_order_mask; __glibcxx_assert(__b != memory_order_release); __glibcxx_assert(__b != memory_order_acq_rel); @@ -743,8 +743,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m1, memory_order __m2) noexcept { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; + memory_order __b2 = __m2 & __memory_order_mask; + memory_order __b1 = __m1 & __memory_order_mask; __glibcxx_assert(__b2 != memory_order_release); __glibcxx_assert(__b2 != memory_order_acq_rel); __glibcxx_assert(__b2 <= __b1); @@ -757,8 +757,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION memory_order __m1, memory_order __m2) volatile noexcept { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; + memory_order __b2 = __m2 & __memory_order_mask; + memory_order __b1 = __m1 & __memory_order_mask; __glibcxx_assert(__b2 != memory_order_release); __glibcxx_assert(__b2 != memory_order_acq_rel); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/atomic_futex.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/atomic_futex.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/atomic_futex.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/atomic_futex.h index 90317f2d0..afcfeb772 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/atomic_futex.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/atomic_futex.h @@ -1,6 +1,6 @@ // -*- C++ -*- header. -// Copyright (C) 2015 Free Software Foundation, Inc. +// Copyright (C) 2015-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/atomic_lockfree_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/atomic_lockfree_defines.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/atomic_lockfree_defines.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/atomic_lockfree_defines.h index fa84d06bd..9aa4142f6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/atomic_lockfree_defines.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/atomic_lockfree_defines.h @@ -1,6 +1,6 @@ // -*- C++ -*- header. -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_ios.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_ios.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_ios.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_ios.h index 8bea1761f..318e41b7c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_ios.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_ios.h @@ -1,6 +1,6 @@ // Iostreams base classes -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_ios.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_ios.tcc similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_ios.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_ios.tcc index be6b13ba0..8b3c829e4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_ios.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_ios.tcc @@ -1,6 +1,6 @@ // basic_ios member functions -*- C++ -*- -// Copyright (C) 1999-2015 Free Software Foundation, Inc. +// Copyright (C) 1999-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -157,17 +157,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) { if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) - _M_ctype = &use_facet<__ctype_type>(__loc); + _M_ctype = std::__addressof(use_facet<__ctype_type>(__loc)); else _M_ctype = 0; if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) - _M_num_put = &use_facet<__num_put_type>(__loc); + _M_num_put = std::__addressof(use_facet<__num_put_type>(__loc)); else _M_num_put = 0; if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) - _M_num_get = &use_facet<__num_get_type>(__loc); + _M_num_get = std::__addressof(use_facet<__num_get_type>(__loc)); else _M_num_get = 0; } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_string.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_string.h similarity index 85% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_string.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_string.h index 19222d138..b6693c440 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_string.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_string.h @@ -1,6 +1,6 @@ // Components for manipulating sequences of characters -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,10 +39,16 @@ #include #include #include + #if __cplusplus >= 201103L #include #endif +#if __cplusplus > 201402L +# include +#endif + + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -102,11 +108,30 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 typedef const_iterator __const_iterator; #endif +#if __cplusplus > 201402L + // A helper type for avoiding boiler-plate. + typedef basic_string_view<_CharT, _Traits> __sv_type; + + template + using _If_sv = enable_if_t< + __and_, + __not_>>::value, + _Res>; +#endif + // Use empty-base optimization: http://www.cantrip.org/emptyopt.html struct _Alloc_hider : allocator_type // TODO check __is_final { +#if __cplusplus < 201103L _Alloc_hider(pointer __dat, const _Alloc& __a = _Alloc()) : allocator_type(__a), _M_p(__dat) { } +#else + _Alloc_hider(pointer __dat, const _Alloc& __a) + : allocator_type(__a), _M_p(__dat) { } + + _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc()) + : allocator_type(std::move(__a)), _M_p(__dat) { } +#endif pointer _M_p; // The actual data. }; @@ -322,9 +347,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 template static void _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) - _GLIBCXX_NOEXCEPT { - for (; __k1 != __k2; ++__k1, ++__p) + for (; __k1 != __k2; ++__k1, (void)++__p) traits_type::assign(*__p, *__k1); // These types are off. } @@ -360,7 +384,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 } void - _M_assign(const basic_string& __rcs); + _M_assign(const basic_string&); void _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, @@ -378,9 +402,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * @brief Default constructor creates an empty string. */ basic_string() -#if __cplusplus >= 201103L - noexcept(is_nothrow_default_constructible<_Alloc>::value) -#endif + _GLIBCXX_NOEXCEPT_IF(is_nothrow_default_constructible<_Alloc>::value) : _M_dataplus(_M_local_data()) { _M_set_length(0); } @@ -388,7 +410,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * @brief Construct an empty string using allocator @a a. */ explicit - basic_string(const _Alloc& __a) + basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT : _M_dataplus(_M_local_data(), __a) { _M_set_length(0); } @@ -397,19 +419,35 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * @param __str Source string. */ basic_string(const basic_string& __str) - : _M_dataplus(_M_local_data(), __str._M_get_allocator()) // TODO A traits + : _M_dataplus(_M_local_data(), + _Alloc_traits::_S_select_on_copy(__str._M_get_allocator())) { _M_construct(__str._M_data(), __str._M_data() + __str.length()); } + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2583. no way to supply an allocator for basic_string(str, pos) + /** + * @brief Construct string as copy of a substring. + * @param __str Source string. + * @param __pos Index of first character to copy from. + * @param __a Allocator to use. + */ + basic_string(const basic_string& __str, size_type __pos, + const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { + const _CharT* __start = __str._M_data() + + __str._M_check(__pos, "basic_string::basic_string"); + _M_construct(__start, __start + __str._M_limit(__pos, npos)); + } + /** * @brief Construct string as copy of a substring. * @param __str Source string. * @param __pos Index of first character to copy from. - * @param __n Number of characters to copy (default remainder). + * @param __n Number of characters to copy. */ - // _GLIBCXX_RESOLVE_LIB_DEFECTS - // 2402. [this constructor] shouldn't use Allocator() basic_string(const basic_string& __str, size_type __pos, - size_type __n = npos) + size_type __n) : _M_dataplus(_M_local_data()) { const _CharT* __start = __str._M_data() @@ -421,7 +459,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * @brief Construct string as copy of a substring. * @param __str Source string. * @param __pos Index of first character to copy from. - * @param __n Number of characters to copy (default remainder). + * @param __n Number of characters to copy. * @param __a Allocator to use. */ basic_string(const basic_string& __str, size_type __pos, @@ -510,10 +548,25 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 { _M_construct(__str.begin(), __str.end()); } basic_string(basic_string&& __str, const _Alloc& __a) + noexcept(_Alloc_traits::_S_always_equal()) : _M_dataplus(_M_local_data(), __a) { - if (__str.get_allocator() == __a) - *this = std::move(__str); + if (__str._M_is_local()) + { + traits_type::copy(_M_local_buf, __str._M_local_buf, + _S_local_capacity + 1); + _M_length(__str.length()); + __str._M_set_length(0); + } + else if (_Alloc_traits::_S_always_equal() + || __str.get_allocator() == __a) + { + _M_data(__str._M_data()); + _M_length(__str.length()); + _M_capacity(__str._M_allocated_capacity); + __str._M_data(__str._M_local_buf); + __str._M_set_length(0); + } else _M_construct(__str.begin(), __str.end()); } @@ -537,6 +590,29 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 : _M_dataplus(_M_local_data(), __a) { _M_construct(__beg, __end); } +#if __cplusplus > 201402L + /** + * @brief Construct string from a substring of a string_view. + * @param __t Source string view. + * @param __pos The index of the first character to copy from __t. + * @param __n The number of characters to copy from __t. + * @param __a Allocator to use. + */ + template> + basic_string(const _Tp& __t, size_type __pos, size_type __n, + const _Alloc& __a = _Alloc()) + : basic_string(__sv_type(__t).substr(__pos, __n), __a) { } + + /** + * @brief Construct string from a string_view. + * @param __sv Source string view. + * @param __a Allocator to use (default is default allocator). + */ + explicit + basic_string(__sv_type __sv, const _Alloc& __a = _Alloc()) + : basic_string(__sv.data(), __sv.size(), __a) { } +#endif // C++17 + /** * @brief Destroy the string instance. */ @@ -549,7 +625,38 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ basic_string& operator=(const basic_string& __str) - { return this->assign(__str); } + { +#if __cplusplus >= 201103L + if (_Alloc_traits::_S_propagate_on_copy_assign()) + { + if (!_Alloc_traits::_S_always_equal() && !_M_is_local() + && _M_get_allocator() != __str._M_get_allocator()) + { + // Propagating allocator cannot free existing storage so must + // deallocate it before replacing current allocator. + if (__str.size() <= _S_local_capacity) + { + _M_destroy(_M_allocated_capacity); + _M_data(_M_local_data()); + _M_set_length(0); + } + else + { + const auto __len = __str.size(); + auto __alloc = __str._M_get_allocator(); + // If this allocation throws there are no effects: + auto __ptr = _Alloc_traits::allocate(__alloc, __len + 1); + _M_destroy(_M_allocated_capacity); + _M_data(__ptr); + _M_capacity(__len); + _M_set_length(__len); + } + } + std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator()); + } +#endif + return this->assign(__str); + } /** * @brief Copy contents of @a s into this string. @@ -586,8 +693,51 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 // 2063. Contradictory requirements for string move assignment basic_string& operator=(basic_string&& __str) + noexcept(_Alloc_traits::_S_nothrow_move()) { - this->swap(__str); + if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign() + && !_Alloc_traits::_S_always_equal() + && _M_get_allocator() != __str._M_get_allocator()) + { + // Destroy existing storage before replacing allocator. + _M_destroy(_M_allocated_capacity); + _M_data(_M_local_data()); + _M_set_length(0); + } + // Replace allocator if POCMA is true. + std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator()); + + if (!__str._M_is_local() + && (_Alloc_traits::_S_propagate_on_move_assign() + || _Alloc_traits::_S_always_equal())) + { + pointer __data = nullptr; + size_type __capacity; + if (!_M_is_local()) + { + if (_Alloc_traits::_S_always_equal()) + { + __data = _M_data(); + __capacity = _M_allocated_capacity; + } + else + _M_destroy(_M_allocated_capacity); + } + + _M_data(__str._M_data()); + _M_length(__str.length()); + _M_capacity(__str._M_allocated_capacity); + if (__data) + { + __str._M_data(__data); + __str._M_capacity(__capacity); + } + else + __str._M_data(__str._M_local_buf); + } + else + assign(__str); + __str.clear(); return *this; } @@ -603,6 +753,24 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 } #endif // C++11 +#if __cplusplus > 201402L + /** + * @brief Set value to string constructed from a string_view. + * @param __sv A string_view. + */ + template + _If_sv<_Tp, basic_string&> + operator=(_Tp __sv) + { return this->assign(__sv); } + + /** + * @brief Convert to a string_view. + * @return A string_view. + */ + operator __sv_type() const noexcept + { return __sv_type(data(), size()); } +#endif // C++17 + // Iterators: /** * Returns a read/write iterator that points to the first character in @@ -831,7 +999,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 const_reference operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT { - _GLIBCXX_DEBUG_ASSERT(__pos <= size()); + __glibcxx_assert(__pos <= size()); return _M_data()[__pos]; } @@ -850,7 +1018,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 { // Allow pos == size() both in C++98 mode, as v3 extension, // and in C++11 mode. - _GLIBCXX_DEBUG_ASSERT(__pos <= size()); + __glibcxx_assert(__pos <= size()); // In pedantic mode be strict in C++98 mode. _GLIBCXX_DEBUG_PEDASSERT(__cplusplus >= 201103L || __pos < size()); return _M_data()[__pos]; @@ -905,7 +1073,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ reference front() noexcept - { return operator[](0); } + { + __glibcxx_assert(!empty()); + return operator[](0); + } /** * Returns a read-only (constant) reference to the data at the first @@ -913,7 +1084,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ const_reference front() const noexcept - { return operator[](0); } + { + __glibcxx_assert(!empty()); + return operator[](0); + } /** * Returns a read/write reference to the data at the last @@ -921,7 +1095,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ reference back() noexcept - { return operator[](this->size() - 1); } + { + __glibcxx_assert(!empty()); + return operator[](this->size() - 1); + } /** * Returns a read-only (constant) reference to the data at the @@ -929,7 +1106,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ const_reference back() const noexcept - { return operator[](this->size() - 1); } + { + __glibcxx_assert(!empty()); + return operator[](this->size() - 1); + } #endif // Modifiers: @@ -974,6 +1154,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 { return this->append(__l.begin(), __l.size()); } #endif // C++11 +#if __cplusplus > 201402L + /** + * @brief Append a string_view. + * @param __sv The string_view to be appended. + * @return Reference to this string. + */ + basic_string& + operator+=(__sv_type __sv) + { return this->append(__sv); } +#endif // C++17 + /** * @brief Append a string to this string. * @param __str The string to append. @@ -1071,6 +1262,34 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 append(_InputIterator __first, _InputIterator __last) { return this->replace(end(), end(), __first, __last); } +#if __cplusplus > 201402L + /** + * @brief Append a string_view. + * @param __sv The string_view to be appended. + * @return Reference to this string. + */ + basic_string& + append(__sv_type __sv) + { return this->append(__sv.data(), __sv.size()); } + + /** + * @brief Append a range of characters from a string_view. + * @param __sv The string_view to be appended from. + * @param __pos The position in the string_view to append from. + * @param __n The number of characters to append from the string_view. + * @return Reference to this string. + */ + template + _If_sv<_Tp, basic_string&> + append(const _Tp& __svt, size_type __pos, size_type __n = npos) + { + __sv_type __sv = __svt; + return _M_append(__sv.data() + + __sv._M_check(__pos, "basic_string::append"), + __sv._M_limit(__pos, __n)); + } +#endif // C++17 + /** * @brief Append a single character. * @param __c Character to append. @@ -1108,6 +1327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ basic_string& assign(basic_string&& __str) + noexcept(_Alloc_traits::_S_nothrow_move()) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2063. Contradictory requirements for string move assignment @@ -1210,6 +1430,34 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 { return this->assign(__l.begin(), __l.size()); } #endif // C++11 +#if __cplusplus > 201402L + /** + * @brief Set value from a string_view. + * @param __sv The source string_view. + * @return Reference to this string. + */ + basic_string& + assign(__sv_type __sv) + { return this->assign(__sv.data(), __sv.size()); } + + /** + * @brief Set value from a range of characters in a string_view. + * @param __sv The source string_view. + * @param __pos The position in the string_view to assign from. + * @param __n The number of characters to assign. + * @return Reference to this string. + */ + template + _If_sv<_Tp, basic_string&> + assign(const _Tp& __svt, size_type __pos, size_type __n = npos) + { + __sv_type __sv = __svt; + return _M_replace(size_type(0), this->size(), __sv.data() + + __sv._M_check(__pos, "basic_string::assign"), + __sv._M_limit(__pos, __n)); + } +#endif // C++17 + #if __cplusplus >= 201103L /** * @brief Insert multiple characters. @@ -1440,6 +1688,38 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 return iterator(_M_data() + __pos); } +#if __cplusplus > 201402L + /** + * @brief Insert a string_view. + * @param __pos Iterator referencing position in string to insert at. + * @param __sv The string_view to insert. + * @return Reference to this string. + */ + basic_string& + insert(size_type __pos, __sv_type __sv) + { return this->insert(__pos, __sv.data(), __sv.size()); } + + /** + * @brief Insert a string_view. + * @param __pos Iterator referencing position in string to insert at. + * @param __sv The string_view to insert from. + * @param __pos Iterator referencing position in string_view to insert + * from. + * @param __n The number of characters to insert. + * @return Reference to this string. + */ + template + _If_sv<_Tp, basic_string&> + insert(size_type __pos1, const _Tp& __svt, + size_type __pos2, size_type __n = npos) + { + __sv_type __sv = __svt; + return this->replace(__pos1, size_type(0), __sv.data() + + __sv._M_check(__pos2, "basic_string::insert"), + __sv._M_limit(__pos2, __n)); + } +#endif // C++17 + /** * @brief Remove characters. * @param __pos Index of first character to remove (default 0). @@ -1458,8 +1738,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 basic_string& erase(size_type __pos = 0, size_type __n = npos) { - this->_M_erase(_M_check(__pos, "basic_string::erase"), - _M_limit(__pos, __n)); + _M_check(__pos, "basic_string::erase"); + if (__n == npos) + this->_M_set_length(__pos); + else if (__n != 0) + this->_M_erase(__pos, _M_limit(__pos, __n)); return *this; } @@ -1496,7 +1779,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 _GLIBCXX_DEBUG_PEDASSERT(__first >= begin() && __first <= __last && __last <= end()); const size_type __pos = __first - begin(); - this->_M_erase(__pos, __last - __first); + if (__last == end()) + this->_M_set_length(__pos); + else + this->_M_erase(__pos, __last - __first); return iterator(this->_M_data() + __pos); } @@ -1508,7 +1794,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ void pop_back() noexcept - { _M_erase(size()-1, 1); } + { + __glibcxx_assert(!empty()); + _M_erase(size() - 1, 1); + } #endif // C++11 /** @@ -1823,9 +2112,55 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<_CharT> __l) - { return this->replace(__i1, __i2, __l.begin(), __l.end()); } + { return this->replace(__i1, __i2, __l.begin(), __l.size()); } #endif // C++11 +#if __cplusplus > 201402L + /** + * @brief Replace range of characters with string_view. + * @param __pos The position to replace at. + * @param __n The number of characters to replace. + * @param __sv The string_view to insert. + * @return Reference to this string. + */ + basic_string& + replace(size_type __pos, size_type __n, __sv_type __sv) + { return this->replace(__pos, __n, __sv.data(), __sv.size()); } + + /** + * @brief Replace range of characters with string_view. + * @param __pos1 The position to replace at. + * @param __n1 The number of characters to replace. + * @param __sv The string_view to insert from. + * @param __pos2 The position in the string_view to insert from. + * @param __n2 The number of characters to insert. + * @return Reference to this string. + */ + template + _If_sv<_Tp, basic_string&> + replace(size_type __pos1, size_type __n1, const _Tp& __svt, + size_type __pos2, size_type __n2 = npos) + { + __sv_type __sv = __svt; + return this->replace(__pos1, __n1, __sv.data() + + __sv._M_check(__pos2, "basic_string::replace"), + __sv._M_limit(__pos2, __n2)); + } + + /** + * @brief Replace range of characters with string_view. + * @param __i1 An iterator referencing the start position + to replace at. + * @param __i2 An iterator referencing the end position + for the replace. + * @param __sv The string_view to insert from. + * @return Reference to this string. + */ + basic_string& + replace(const_iterator __i1, const_iterator __i2, __sv_type __sv) + { return this->replace(__i1 - begin(), __i2 - __i1, __sv); } +#endif // C++17 + private: template basic_string& @@ -1891,13 +2226,27 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 /** * @brief Return const pointer to contents. * - * This is a handle to internal data. Do not modify or dire things may - * happen. + * This is a pointer to internal data. It is undefined to modify + * the contents through the returned pointer. To get a pointer that + * allows modifying the contents use @c &str[0] instead, + * (or in C++17 the non-const @c str.data() overload). */ const _CharT* data() const _GLIBCXX_NOEXCEPT { return _M_data(); } +#if __cplusplus > 201402L + /** + * @brief Return non-const pointer to contents. + * + * This is a pointer to the character sequence held by the string. + * Modifying the characters in the sequence is allowed. + */ + _CharT* + data() noexcept + { return _M_data(); } +#endif + /** * @brief Return copy of allocator used to construct this string. */ @@ -1918,7 +2267,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * npos. */ size_type - find(const _CharT* __s, size_type __pos, size_type __n) const; + find(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT; /** * @brief Find position of a string. @@ -1932,9 +2282,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find(const basic_string& __str, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->find(__str.data(), __pos, __str.size()); } +#if __cplusplus > 201402L + /** + * @brief Find position of a string_view. + * @param __sv The string_view to locate. + * @param __pos Index of character to search from (default 0). + * @return Index of start of first occurrence. + */ + size_type + find(__sv_type __sv, size_type __pos = 0) const noexcept + { return this->find(__sv.data(), __pos, __sv.size()); } +#endif // C++17 + /** * @brief Find position of a C string. * @param __s C string to locate. @@ -1946,7 +2308,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * it begins. If not found, returns npos. */ size_type - find(const _CharT* __s, size_type __pos = 0) const + find(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find(__s, __pos, traits_type::length(__s)); @@ -1977,9 +2339,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type rfind(const basic_string& __str, size_type __pos = npos) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->rfind(__str.data(), __pos, __str.size()); } +#if __cplusplus > 201402L + /** + * @brief Find last position of a string_view. + * @param __sv The string_view to locate. + * @param __pos Index of character to search back from (default end). + * @return Index of start of last occurrence. + */ + size_type + rfind(__sv_type __sv, size_type __pos = npos) const noexcept + { return this->rfind(__sv.data(), __pos, __sv.size()); } +#endif // C++17 + /** * @brief Find last position of a C substring. * @param __s C string to locate. @@ -1993,7 +2367,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * npos. */ size_type - rfind(const _CharT* __s, size_type __pos, size_type __n) const; + rfind(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a C string. @@ -2038,9 +2413,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_first_of(const basic_string& __str, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->find_first_of(__str.data(), __pos, __str.size()); } +#if __cplusplus > 201402L + /** + * @brief Find position of a character of a string_view. + * @param __sv A string_view containing characters to locate. + * @param __pos Index of character to search from (default 0). + * @return Index of first occurrence. + */ + size_type + find_first_of(__sv_type __sv, size_type __pos = 0) const noexcept + { return this->find_first_of(__sv.data(), __pos, __sv.size()); } +#endif // C++17 + /** * @brief Find position of a character of C substring. * @param __s String containing characters to locate. @@ -2054,7 +2441,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * returns npos. */ size_type - find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character of C string. @@ -2068,6 +2456,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_first_of(const _CharT* __s, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_first_of(__s, __pos, traits_type::length(__s)); @@ -2102,9 +2491,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_last_of(const basic_string& __str, size_type __pos = npos) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->find_last_of(__str.data(), __pos, __str.size()); } +#if __cplusplus > 201402L + /** + * @brief Find last position of a character of string. + * @param __sv A string_view containing characters to locate. + * @param __pos Index of character to search back from (default end). + * @return Index of last occurrence. + */ + size_type + find_last_of(__sv_type __sv, size_type __pos = npos) const noexcept + { return this->find_last_of(__sv.data(), __pos, __sv.size()); } +#endif // C++17 + /** * @brief Find last position of a character of C substring. * @param __s C string containing characters to locate. @@ -2118,7 +2519,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * returns npos. */ size_type - find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character of C string. @@ -2132,6 +2534,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_last_of(const _CharT* __s, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_last_of(__s, __pos, traits_type::length(__s)); @@ -2165,9 +2568,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->find_first_not_of(__str.data(), __pos, __str.size()); } +#if __cplusplus > 201402L + /** + * @brief Find position of a character not in a string_view. + * @param __sv A string_view containing characters to avoid. + * @param __pos Index of character to search from (default 0). + * @return Index of first occurrence. + */ + size_type + find_first_not_of(__sv_type __sv, size_type __pos = 0) const noexcept + { return this->find_first_not_of(__sv.data(), __pos, __sv.size()); } +#endif // C++17 + /** * @brief Find position of a character not in C substring. * @param __s C string containing characters to avoid. @@ -2182,7 +2597,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_first_not_of(const _CharT* __s, size_type __pos, - size_type __n) const; + size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character not in C string. @@ -2196,6 +2611,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_first_not_of(__s, __pos, traits_type::length(__s)); @@ -2213,7 +2629,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_first_not_of(_CharT __c, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT; + _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character not in string. @@ -2228,9 +2644,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->find_last_not_of(__str.data(), __pos, __str.size()); } +#if __cplusplus > 201402L + /** + * @brief Find last position of a character not in a string_view. + * @param __sv A string_view containing characters to avoid. + * @param __pos Index of character to search back from (default end). + * @return Index of last occurrence. + */ + size_type + find_last_not_of(__sv_type __sv, size_type __pos = npos) const noexcept + { return this->find_last_not_of(__sv.data(), __pos, __sv.size()); } +#endif // C++17 + /** * @brief Find last position of a character not in C substring. * @param __s C string containing characters to avoid. @@ -2245,7 +2673,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_last_not_of(const _CharT* __s, size_type __pos, - size_type __n) const; + size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character not in C string. * @param __s C string containing characters to avoid. @@ -2259,6 +2687,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_last_not_of(__s, __pos, traits_type::length(__s)); @@ -2276,7 +2705,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ size_type find_last_not_of(_CharT __c, size_type __pos = npos) const - _GLIBCXX_NOEXCEPT; + _GLIBCXX_NOEXCEPT; /** * @brief Get a substring. @@ -2322,6 +2751,56 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 return __r; } +#if __cplusplus > 201402L + /** + * @brief Compare to a string_view. + * @param __sv A string_view to compare against. + * @return Integer < 0, 0, or > 0. + */ + int + compare(__sv_type __sv) const + { + const size_type __size = this->size(); + const size_type __osize = __sv.size(); + const size_type __len = std::min(__size, __osize); + + int __r = traits_type::compare(_M_data(), __sv.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + + /** + * @brief Compare to a string_view. + * @param __pos A position in the string to start comparing from. + * @param __n The number of characters to compare. + * @param __sv A string_view to compare against. + * @return Integer < 0, 0, or > 0. + */ + int + compare(size_type __pos, size_type __n, __sv_type __sv) const + { return __sv_type(*this).substr(__pos, __n).compare(__sv); } + + /** + * @brief Compare to a string_view. + * @param __pos1 A position in the string to start comparing from. + * @param __n1 The number of characters to compare. + * @param __sv A string_view to compare against. + * @param __pos2 A position in the string_view to start comparing from. + * @param __n2 The number of characters to compare. + * @return Integer < 0, 0, or > 0. + */ + template + _If_sv<_Tp, int> + compare(size_type __pos1, size_type __n1, const _Tp& __svt, + size_type __pos2, size_type __n2 = npos) const + { + __sv_type __sv = __svt; + return __sv_type(*this) + .substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2)); + } +#endif // C++17 + /** * @brief Compare substring to a string. * @param __pos Index of first character of substring. @@ -2386,7 +2865,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * ordered first. */ int - compare(const _CharT* __s) const; + compare(const _CharT* __s) const _GLIBCXX_NOEXCEPT; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 5 String::compare specification questionable @@ -2587,11 +3066,32 @@ _GLIBCXX_END_NAMESPACE_CXX11 bool _M_is_leaked() const _GLIBCXX_NOEXCEPT - { return this->_M_refcount < 0; } + { +#if defined(__GTHREADS) + // _M_refcount is mutated concurrently by _M_refcopy/_M_dispose, + // so we need to use an atomic load. However, _M_is_leaked + // predicate does not change concurrently (i.e. the string is either + // leaked or not), so a relaxed load is enough. + return __atomic_load_n(&this->_M_refcount, __ATOMIC_RELAXED) < 0; +#else + return this->_M_refcount < 0; +#endif + } bool _M_is_shared() const _GLIBCXX_NOEXCEPT - { return this->_M_refcount > 0; } + { +#if defined(__GTHREADS) + // _M_refcount is mutated concurrently by _M_refcopy/_M_dispose, + // so we need to use an atomic load. Another thread can drop last + // but one reference concurrently with this check, so we need this + // load to be acquire to synchronize with release fetch_and_add in + // _M_dispose. + return __atomic_load_n(&this->_M_refcount, __ATOMIC_ACQUIRE) > 0; +#else + return this->_M_refcount > 0; +#endif + } void _M_set_leaked() _GLIBCXX_NOEXCEPT @@ -2640,6 +3140,14 @@ _GLIBCXX_END_NAMESPACE_CXX11 { // Be race-detector-friendly. For more info see bits/c++config. _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount); + // Decrement of _M_refcount is acq_rel, because: + // - all but last decrements need to release to synchronize with + // the last decrement that will delete the object. + // - the last decrement needs to acquire to synchronize with + // all the previous decrements. + // - last but one decrement needs to release to synchronize with + // the acquire load in _M_is_shared that will conclude that + // the object is not shared anymore. if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) { @@ -2782,9 +3290,8 @@ _GLIBCXX_END_NAMESPACE_CXX11 template static void _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) - _GLIBCXX_NOEXCEPT { - for (; __k1 != __k2; ++__k1, ++__p) + for (; __k1 != __k2; ++__k1, (void)++__p) traits_type::assign(*__p, *__k1); // These types are off. } @@ -2829,6 +3336,17 @@ _GLIBCXX_END_NAMESPACE_CXX11 _S_empty_rep() _GLIBCXX_NOEXCEPT { return _Rep::_S_empty_rep(); } +#if __cplusplus > 201402L + // A helper type for avoiding boiler-plate. + typedef basic_string_view<_CharT, _Traits> __sv_type; + + template + using _If_sv = enable_if_t< + __and_, + __not_>>::value, + _Res>; +#endif + public: // Construct/copy/destroy: // NB: We overload ctors in some cases instead of using default @@ -2856,14 +3374,26 @@ _GLIBCXX_END_NAMESPACE_CXX11 * @param __str Source string. */ basic_string(const basic_string& __str); + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2583. no way to supply an allocator for basic_string(str, pos) /** * @brief Construct string as copy of a substring. * @param __str Source string. * @param __pos Index of first character to copy from. - * @param __n Number of characters to copy (default remainder). + * @param __a Allocator to use. */ basic_string(const basic_string& __str, size_type __pos, - size_type __n = npos); + const _Alloc& __a = _Alloc()); + + /** + * @brief Construct string as copy of a substring. + * @param __str Source string. + * @param __pos Index of first character to copy from. + * @param __n Number of characters to copy. + */ + basic_string(const basic_string& __str, size_type __pos, + size_type __n); /** * @brief Construct string as copy of a substring. * @param __str Source string. @@ -2938,6 +3468,29 @@ _GLIBCXX_END_NAMESPACE_CXX11 basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a = _Alloc()); +#if __cplusplus > 201402L + /** + * @brief Construct string from a substring of a string_view. + * @param __t Source string view. + * @param __pos The index of the first character to copy from __t. + * @param __n The number of characters to copy from __t. + * @param __a Allocator to use. + */ + template> + basic_string(const _Tp& __t, size_type __pos, size_type __n, + const _Alloc& __a = _Alloc()) + : basic_string(__sv_type(__t).substr(__pos, __n), __a) { } + + /** + * @brief Construct string from a string_view. + * @param __sv Source string view. + * @param __a Allocator to use (default is default allocator). + */ + explicit + basic_string(__sv_type __sv, const _Alloc& __a = _Alloc()) + : basic_string(__sv.data(), __sv.size(), __a) { } +#endif // C++17 + /** * @brief Destroy the string instance. */ @@ -3003,6 +3556,24 @@ _GLIBCXX_END_NAMESPACE_CXX11 } #endif // C++11 +#if __cplusplus > 201402L + /** + * @brief Set value to string constructed from a string_view. + * @param __sv A string_view. + */ + template + _If_sv<_Tp, basic_string&> + operator=(_Tp __sv) + { return this->assign(__sv); } + + /** + * @brief Convert to a string_view. + * @return A string_view. + */ + operator __sv_type() const noexcept + { return __sv_type(data(), size()); } +#endif // C++17 + // Iterators: /** * Returns a read/write iterator that points to the first character in @@ -3208,10 +3779,24 @@ _GLIBCXX_END_NAMESPACE_CXX11 /** * Erases the string, making it empty. */ +#if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 + void + clear() _GLIBCXX_NOEXCEPT + { + if (_M_rep()->_M_is_shared()) + { + _M_rep()->_M_dispose(this->get_allocator()); + _M_data(_S_empty_rep()._M_refdata()); + } + else + _M_rep()->_M_set_length_and_sharable(0); + } +#else // PR 56166: this should not throw. void clear() { _M_mutate(0, this->size(), 0); } +#endif /** * Returns true if the %string is empty. Equivalent to @@ -3235,7 +3820,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 const_reference operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT { - _GLIBCXX_DEBUG_ASSERT(__pos <= size()); + __glibcxx_assert(__pos <= size()); return _M_data()[__pos]; } @@ -3254,7 +3839,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 { // Allow pos == size() both in C++98 mode, as v3 extension, // and in C++11 mode. - _GLIBCXX_DEBUG_ASSERT(__pos <= size()); + __glibcxx_assert(__pos <= size()); // In pedantic mode be strict in C++98 mode. _GLIBCXX_DEBUG_PEDASSERT(__cplusplus >= 201103L || __pos < size()); _M_leak(); @@ -3312,15 +3897,21 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ reference front() - { return operator[](0); } + { + __glibcxx_assert(!empty()); + return operator[](0); + } /** * Returns a read-only (constant) reference to the data at the first * element of the %string. */ const_reference - front() const _GLIBCXX_NOEXCEPT - { return operator[](0); } + front() const noexcept + { + __glibcxx_assert(!empty()); + return operator[](0); + } /** * Returns a read/write reference to the data at the last @@ -3328,15 +3919,21 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ reference back() - { return operator[](this->size() - 1); } + { + __glibcxx_assert(!empty()); + return operator[](this->size() - 1); + } /** * Returns a read-only (constant) reference to the data at the * last element of the %string. */ const_reference - back() const _GLIBCXX_NOEXCEPT - { return operator[](this->size() - 1); } + back() const noexcept + { + __glibcxx_assert(!empty()); + return operator[](this->size() - 1); + } #endif // Modifiers: @@ -3381,6 +3978,17 @@ _GLIBCXX_END_NAMESPACE_CXX11 { return this->append(__l.begin(), __l.size()); } #endif // C++11 +#if __cplusplus > 201402L + /** + * @brief Append a string_view. + * @param __sv The string_view to be appended. + * @return Reference to this string. + */ + basic_string& + operator+=(__sv_type __sv) + { return this->append(__sv); } +#endif // C++17 + /** * @brief Append a string to this string. * @param __str The string to append. @@ -3461,6 +4069,34 @@ _GLIBCXX_END_NAMESPACE_CXX11 append(_InputIterator __first, _InputIterator __last) { return this->replace(_M_iend(), _M_iend(), __first, __last); } +#if __cplusplus > 201402L + /** + * @brief Append a string_view. + * @param __sv The string_view to be appended. + * @return Reference to this string. + */ + basic_string& + append(__sv_type __sv) + { return this->append(__sv.data(), __sv.size()); } + + /** + * @brief Append a range of characters from a string_view. + * @param __sv The string_view to be appended from. + * @param __pos The position in the string_view to append from. + * @param __n The number of characters to append from the string_view. + * @return Reference to this string. + */ + template + _If_sv<_Tp, basic_string&> + append(const _Tp& __svt, size_type __pos, size_type __n = npos) + { + __sv_type __sv = __svt; + return append(__sv.data() + + __sv._M_check(__pos, "basic_string::append"), + __sv._M_limit(__pos, __n)); + } +#endif // C++17 + /** * @brief Append a single character. * @param __c Character to append. @@ -3586,6 +4222,34 @@ _GLIBCXX_END_NAMESPACE_CXX11 { return this->assign(__l.begin(), __l.size()); } #endif // C++11 +#if __cplusplus > 201402L + /** + * @brief Set value from a string_view. + * @param __sv The source string_view. + * @return Reference to this string. + */ + basic_string& + assign(__sv_type __sv) + { return this->assign(__sv.data(), __sv.size()); } + + /** + * @brief Set value from a range of characters in a string_view. + * @param __sv The source string_view. + * @param __pos The position in the string_view to assign from. + * @param __n The number of characters to assign. + * @return Reference to this string. + */ + template + _If_sv<_Tp, basic_string&> + assign(const _Tp& __svt, size_type __pos, size_type __n = npos) + { + __sv_type __sv = __svt; + return assign(__sv.data() + + __sv._M_check(__pos, "basic_string::assign"), + __sv._M_limit(__pos, __n)); + } +#endif // C++17 + /** * @brief Insert multiple characters. * @param __p Iterator referencing location in string to insert at. @@ -3761,6 +4425,38 @@ _GLIBCXX_END_NAMESPACE_CXX11 return iterator(_M_data() + __pos); } +#if __cplusplus > 201402L + /** + * @brief Insert a string_view. + * @param __pos Iterator referencing position in string to insert at. + * @param __sv The string_view to insert. + * @return Reference to this string. + */ + basic_string& + insert(size_type __pos, __sv_type __sv) + { return this->insert(__pos, __sv.data(), __sv.size()); } + + /** + * @brief Insert a string_view. + * @param __pos Iterator referencing position in string to insert at. + * @param __sv The string_view to insert from. + * @param __pos Iterator referencing position in string_view to insert + * from. + * @param __n The number of characters to insert. + * @return Reference to this string. + */ + template + _If_sv<_Tp, basic_string&> + insert(size_type __pos1, const _Tp& __svt, + size_type __pos2, size_type __n = npos) + { + __sv_type __sv = __svt; + return this->replace(__pos1, size_type(0), __sv.data() + + __sv._M_check(__pos2, "basic_string::insert"), + __sv._M_limit(__pos2, __n)); + } +#endif // C++17 + /** * @brief Remove characters. * @param __pos Index of first character to remove (default 0). @@ -3823,7 +4519,10 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ void pop_back() // FIXME C++11: should be noexcept. - { erase(size()-1, 1); } + { + __glibcxx_assert(!empty()); + erase(size() - 1, 1); + } #endif // C++11 /** @@ -4112,6 +4811,52 @@ _GLIBCXX_END_NAMESPACE_CXX11 { return this->replace(__i1, __i2, __l.begin(), __l.end()); } #endif // C++11 +#if __cplusplus > 201402L + /** + * @brief Replace range of characters with string_view. + * @param __pos The position to replace at. + * @param __n The number of characters to replace. + * @param __sv The string_view to insert. + * @return Reference to this string. + */ + basic_string& + replace(size_type __pos, size_type __n, __sv_type __sv) + { return this->replace(__pos, __n, __sv.data(), __sv.size()); } + + /** + * @brief Replace range of characters with string_view. + * @param __pos1 The position to replace at. + * @param __n1 The number of characters to replace. + * @param __sv The string_view to insert from. + * @param __pos2 The position in the string_view to insert from. + * @param __n2 The number of characters to insert. + * @return Reference to this string. + */ + template + _If_sv<_Tp, basic_string&> + replace(size_type __pos1, size_type __n1, const _Tp& __svt, + size_type __pos2, size_type __n2 = npos) + { + __sv_type __sv = __svt; + return this->replace(__pos1, __n1, __sv.data() + + __sv._M_check(__pos2, "basic_string::replace"), + __sv._M_limit(__pos2, __n2)); + } + + /** + * @brief Replace range of characters with string_view. + * @param __i1 An iterator referencing the start position + to replace at. + * @param __i2 An iterator referencing the end position + for the replace. + * @param __sv The string_view to insert from. + * @return Reference to this string. + */ + basic_string& + replace(const_iterator __i1, const_iterator __i2, __sv_type __sv) + { return this->replace(__i1 - begin(), __i2 - __i1, __sv); } +#endif // C++17 + private: template basic_string& @@ -4222,13 +4967,27 @@ _GLIBCXX_END_NAMESPACE_CXX11 /** * @brief Return const pointer to contents. * - * This is a handle to internal data. Do not modify or dire things may - * happen. + * This is a pointer to internal data. It is undefined to modify + * the contents through the returned pointer. To get a pointer that + * allows modifying the contents use @c &str[0] instead, + * (or in C++17 the non-const @c str.data() overload). */ const _CharT* data() const _GLIBCXX_NOEXCEPT { return _M_data(); } +#if __cplusplus > 201402L + /** + * @brief Return non-const pointer to contents. + * + * This is a pointer to the character sequence held by the string. + * Modifying the characters in the sequence is allowed. + */ + _CharT* + data() noexcept + { return _M_data(); } +#endif + /** * @brief Return copy of allocator used to construct this string. */ @@ -4249,7 +5008,8 @@ _GLIBCXX_END_NAMESPACE_CXX11 * npos. */ size_type - find(const _CharT* __s, size_type __pos, size_type __n) const; + find(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT; /** * @brief Find position of a string. @@ -4263,7 +5023,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find(const basic_string& __str, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->find(__str.data(), __pos, __str.size()); } /** @@ -4277,7 +5037,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 * it begins. If not found, returns npos. */ size_type - find(const _CharT* __s, size_type __pos = 0) const + find(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find(__s, __pos, traits_type::length(__s)); @@ -4296,6 +5056,18 @@ _GLIBCXX_END_NAMESPACE_CXX11 size_type find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT; +#if __cplusplus > 201402L + /** + * @brief Find position of a string_view. + * @param __sv The string_view to locate. + * @param __pos Index of character to search from (default 0). + * @return Index of start of first occurrence. + */ + size_type + find(__sv_type __sv, size_type __pos = 0) const noexcept + { return this->find(__sv.data(), __pos, __sv.size()); } +#endif // C++17 + /** * @brief Find last position of a string. * @param __str String to locate. @@ -4308,7 +5080,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type rfind(const basic_string& __str, size_type __pos = npos) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->rfind(__str.data(), __pos, __str.size()); } /** @@ -4324,7 +5096,8 @@ _GLIBCXX_END_NAMESPACE_CXX11 * npos. */ size_type - rfind(const _CharT* __s, size_type __pos, size_type __n) const; + rfind(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a C string. @@ -4337,7 +5110,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 * where it begins. If not found, returns npos. */ size_type - rfind(const _CharT* __s, size_type __pos = npos) const + rfind(const _CharT* __s, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->rfind(__s, __pos, traits_type::length(__s)); @@ -4356,6 +5129,18 @@ _GLIBCXX_END_NAMESPACE_CXX11 size_type rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT; +#if __cplusplus > 201402L + /** + * @brief Find last position of a string_view. + * @param __sv The string_view to locate. + * @param __pos Index of character to search back from (default end). + * @return Index of start of last occurrence. + */ + size_type + rfind(__sv_type __sv, size_type __pos = npos) const noexcept + { return this->rfind(__sv.data(), __pos, __sv.size()); } +#endif // C++17 + /** * @brief Find position of a character of string. * @param __str String containing characters to locate. @@ -4369,7 +5154,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_first_of(const basic_string& __str, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->find_first_of(__str.data(), __pos, __str.size()); } /** @@ -4385,7 +5170,8 @@ _GLIBCXX_END_NAMESPACE_CXX11 * returns npos. */ size_type - find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character of C string. @@ -4399,6 +5185,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_first_of(const _CharT* __s, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_first_of(__s, __pos, traits_type::length(__s)); @@ -4420,6 +5207,18 @@ _GLIBCXX_END_NAMESPACE_CXX11 find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find(__c, __pos); } +#if __cplusplus > 201402L + /** + * @brief Find position of a character of a string_view. + * @param __sv A string_view containing characters to locate. + * @param __pos Index of character to search from (default 0). + * @return Index of first occurrence. + */ + size_type + find_first_of(__sv_type __sv, size_type __pos = 0) const noexcept + { return this->find_first_of(__sv.data(), __pos, __sv.size()); } +#endif // C++17 + /** * @brief Find last position of a character of string. * @param __str String containing characters to locate. @@ -4433,7 +5232,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_last_of(const basic_string& __str, size_type __pos = npos) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->find_last_of(__str.data(), __pos, __str.size()); } /** @@ -4449,7 +5248,8 @@ _GLIBCXX_END_NAMESPACE_CXX11 * returns npos. */ size_type - find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character of C string. @@ -4463,6 +5263,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_last_of(const _CharT* __s, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_last_of(__s, __pos, traits_type::length(__s)); @@ -4484,6 +5285,18 @@ _GLIBCXX_END_NAMESPACE_CXX11 find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->rfind(__c, __pos); } +#if __cplusplus > 201402L + /** + * @brief Find last position of a character of string. + * @param __sv A string_view containing characters to locate. + * @param __pos Index of character to search back from (default end). + * @return Index of last occurrence. + */ + size_type + find_last_of(__sv_type __sv, size_type __pos = npos) const noexcept + { return this->find_last_of(__sv.data(), __pos, __sv.size()); } +#endif // C++17 + /** * @brief Find position of a character not in string. * @param __str String containing characters to avoid. @@ -4496,7 +5309,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->find_first_not_of(__str.data(), __pos, __str.size()); } /** @@ -4513,7 +5326,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_first_not_of(const _CharT* __s, size_type __pos, - size_type __n) const; + size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character not in C string. @@ -4527,6 +5340,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_first_not_of(__s, __pos, traits_type::length(__s)); @@ -4544,7 +5358,19 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_first_not_of(_CharT __c, size_type __pos = 0) const - _GLIBCXX_NOEXCEPT; + _GLIBCXX_NOEXCEPT; + +#if __cplusplus > 201402L + /** + * @brief Find position of a character not in a string_view. + * @param __sv A string_view containing characters to avoid. + * @param __pos Index of character to search from (default 0). + * @return Index of first occurrence. + */ + size_type + find_first_not_of(__sv_type __sv, size_type __pos = 0) const noexcept + { return this->find_first_not_of(__sv.data(), __pos, __sv.size()); } +#endif // C++17 /** * @brief Find last position of a character not in string. @@ -4559,7 +5385,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const - _GLIBCXX_NOEXCEPT + _GLIBCXX_NOEXCEPT { return this->find_last_not_of(__str.data(), __pos, __str.size()); } /** @@ -4576,7 +5402,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_last_not_of(const _CharT* __s, size_type __pos, - size_type __n) const; + size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character not in C string. * @param __s C string containing characters to avoid. @@ -4590,6 +5416,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_last_not_of(__s, __pos, traits_type::length(__s)); @@ -4607,7 +5434,19 @@ _GLIBCXX_END_NAMESPACE_CXX11 */ size_type find_last_not_of(_CharT __c, size_type __pos = npos) const - _GLIBCXX_NOEXCEPT; + _GLIBCXX_NOEXCEPT; + +#if __cplusplus > 201402L + /** + * @brief Find last position of a character not in a string_view. + * @param __sv A string_view containing characters to avoid. + * @param __pos Index of character to search back from (default end). + * @return Index of last occurrence. + */ + size_type + find_last_not_of(__sv_type __sv, size_type __pos = npos) const noexcept + { return this->find_last_not_of(__sv.data(), __pos, __sv.size()); } +#endif // C++17 /** * @brief Get a substring. @@ -4653,6 +5492,56 @@ _GLIBCXX_END_NAMESPACE_CXX11 return __r; } +#if __cplusplus > 201402L + /** + * @brief Compare to a string_view. + * @param __sv A string_view to compare against. + * @return Integer < 0, 0, or > 0. + */ + int + compare(__sv_type __sv) const + { + const size_type __size = this->size(); + const size_type __osize = __sv.size(); + const size_type __len = std::min(__size, __osize); + + int __r = traits_type::compare(_M_data(), __sv.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + + /** + * @brief Compare to a string_view. + * @param __pos A position in the string to start comparing from. + * @param __n The number of characters to compare. + * @param __sv A string_view to compare against. + * @return Integer < 0, 0, or > 0. + */ + int + compare(size_type __pos, size_type __n, __sv_type __sv) const + { return __sv_type(*this).substr(__pos, __n).compare(__sv); } + + /** + * @brief Compare to a string_view. + * @param __pos1 A position in the string to start comparing from. + * @param __n1 The number of characters to compare. + * @param __sv A string_view to compare against. + * @param __pos2 A position in the string_view to start comparing from. + * @param __n2 The number of characters to compare. + * @return Integer < 0, 0, or > 0. + */ + template + _If_sv<_Tp, int> + compare(size_type __pos1, size_type __n1, const _Tp& __svt, + size_type __pos2, size_type __n2 = npos) const + { + __sv_type __sv = __svt; + return __sv_type(*this) + .substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2)); + } +#endif // C++17 + /** * @brief Compare substring to a string. * @param __pos Index of first character of substring. @@ -4717,7 +5606,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 * ordered first. */ int - compare(const _CharT* __s) const; + compare(const _CharT* __s) const _GLIBCXX_NOEXCEPT; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 5 String::compare specification questionable @@ -4770,6 +5659,18 @@ _GLIBCXX_END_NAMESPACE_CXX11 int compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const; + +# ifdef _GLIBCXX_TM_TS_INTERNAL + friend void + ::_txnal_cow_string_C1_for_exceptions(void* that, const char* s, + void* exc); + friend const char* + ::_txnal_cow_string_c_str(const void *that); + friend void + ::_txnal_cow_string_D1(void *that); + friend void + ::_txnal_cow_string_D1_commit(void *that); +# endif }; #endif // !_GLIBCXX_USE_CXX11_ABI @@ -4905,13 +5806,14 @@ _GLIBCXX_END_NAMESPACE_CXX11 inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.compare(__rhs) == 0; } template inline typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type operator==(const basic_string<_CharT>& __lhs, - const basic_string<_CharT>& __rhs) + const basic_string<_CharT>& __rhs) _GLIBCXX_NOEXCEPT { return (__lhs.size() == __rhs.size() && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), __lhs.size())); } @@ -4951,6 +5853,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT { return !(__lhs == __rhs); } /** @@ -4988,6 +5891,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.compare(__rhs) < 0; } /** @@ -5025,6 +5929,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.compare(__rhs) > 0; } /** @@ -5062,6 +5967,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.compare(__rhs) <= 0; } /** @@ -5099,6 +6005,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.compare(__rhs) >= 0; } /** @@ -5136,6 +6043,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 inline void swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } @@ -5246,7 +6154,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99) +#if __cplusplus >= 201103L #include @@ -5255,6 +6163,7 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CXX11 +#if _GLIBCXX_USE_C99_STDLIB // 21.4 Numeric Conversions [string.conversions]. inline int stoi(const string& __str, size_t* __idx = 0, int __base = 10) @@ -5293,7 +6202,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 inline long double stold(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } +#endif // _GLIBCXX_USE_C99_STDLIB +#if _GLIBCXX_USE_C99_STDIO // NB: (v)snprintf vs sprintf. // DR 1261. @@ -5357,8 +6268,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, "%Lf", __val); } +#endif // _GLIBCXX_USE_C99_STDIO -#ifdef _GLIBCXX_USE_WCHAR_T +#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_WCHAR inline int stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstol, "stoi", __str.c_str(), @@ -5460,13 +6372,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 L"%Lf", __val); } #endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF -#endif +#endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR _GLIBCXX_END_NAMESPACE_CXX11 _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#endif /* C++11 && _GLIBCXX_USE_C99 ... */ +#endif /* C++11 */ #if __cplusplus >= 201103L @@ -5543,6 +6455,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { }; #endif +_GLIBCXX_END_NAMESPACE_VERSION + #if __cplusplus > 201103L #define __cpp_lib_string_udls 201304 @@ -5551,6 +6465,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { inline namespace string_literals { +_GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_DEFAULT_ABI_TAG inline basic_string @@ -5576,12 +6491,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return basic_string{__str, __len}; } #endif +_GLIBCXX_END_NAMESPACE_VERSION } // inline namespace string_literals } // inline namespace literals #endif // __cplusplus > 201103L -_GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++11 diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_string.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_string.tcc similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_string.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_string.tcc index b9da93bf1..41b7fa196 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/basic_string.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/basic_string.tcc @@ -1,6 +1,6 @@ // Components for manipulating sequences of characters -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -61,11 +61,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (this == &__s) return; - // _GLIBCXX_RESOLVE_LIB_DEFECTS - // 431. Swapping containers with unequal allocators. - // TODO propagation traits - std::__alloc_swap::_S_do_it(_M_get_allocator(), - __s._M_get_allocator()); + _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator()); if (_M_is_local()) if (__s._M_is_local()) @@ -355,7 +351,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__size < __n) this->append(__n - __size, __c); else if (__n < __size) - this->_M_erase(__n, __size - __n); + this->_M_set_length(__n); } template @@ -404,7 +400,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__new_size <= this->capacity()) { - _CharT* __p = this->_M_data() + __pos1; + pointer __p = this->_M_data() + __pos1; const size_type __how_much = __old_size - __pos1 - __n1; if (__how_much && __n1 != __n2) @@ -433,7 +429,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__new_size <= this->capacity()) { - _CharT* __p = this->_M_data() + __pos; + pointer __p = this->_M_data() + __pos; const size_type __how_much = __old_size - __pos - __len1; if (_M_disjunct(__s)) @@ -623,6 +619,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, const _Alloc& __a) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, npos) + + __pos, __a), __a) + { } + template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n) @@ -1180,21 +1186,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); const size_type __size = this->size(); - const _CharT* __data = _M_data(); if (__n == 0) return __pos <= __size ? __pos : npos; + if (__pos >= __size) + return npos; - if (__n <= __size) + const _CharT __elem0 = __s[0]; + const _CharT* const __data = data(); + const _CharT* __first = __data + __pos; + const _CharT* const __last = __data + __size; + size_type __len = __size - __pos; + + while (__len >= __n) { - for (; __pos <= __size - __n; ++__pos) - if (traits_type::eq(__data[__pos], __s[0]) - && traits_type::compare(__data + __pos + 1, - __s + 1, __n - 1) == 0) - return __pos; + // Find the first occurrence of __elem0: + __first = traits_type::find(__first, __len - __n + 1, __elem0); + if (!__first) + return npos; + // Compare the full strings from the first occurrence of __elem0. + // We already know that __first[0] == __s[0] but compare them again + // anyway because __s is probably aligned, which helps memcmp. + if (traits_type::compare(__first, __s, __n) == 0) + return __first - __data; + __len = __last - ++__first; } return npos; } @@ -1221,6 +1240,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); const size_type __size = this->size(); @@ -1259,6 +1279,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); for (; __n && __pos < this->size(); ++__pos) @@ -1274,6 +1295,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); size_type __size = this->size(); @@ -1295,6 +1317,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); for (; __pos < this->size(); ++__pos) @@ -1318,6 +1341,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); size_type __size = this->size(); @@ -1391,7 +1415,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template int basic_string<_CharT, _Traits, _Alloc>:: - compare(const _CharT* __s) const + compare(const _CharT* __s) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); const size_type __size = this->size(); @@ -1573,7 +1597,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. -#if _GLIBCXX_EXTERN_TEMPLATE > 0 +#if _GLIBCXX_EXTERN_TEMPLATE > 0 && __cplusplus <= 201402L extern template class basic_string; extern template basic_istream& diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/boost_concept_check.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/boost_concept_check.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/boost_concept_check.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/boost_concept_check.h index 89e3ec7c0..fb9a643c8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/boost_concept_check.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/boost_concept_check.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/c++0x_warning.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/c++0x_warning.h similarity index 82% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/c++0x_warning.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/c++0x_warning.h index 5c7e97202..d2bc7148c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/c++0x_warning.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/c++0x_warning.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,9 +29,9 @@ #define _CXX0X_WARNING_H 1 #if __cplusplus < 201103L -#error This file requires compiler and library support for the \ -ISO C++ 2011 standard. This support is currently experimental, and must be \ -enabled with the -std=c++11 or -std=gnu++11 compiler options. +#error This file requires compiler and library support \ +for the ISO C++ 2011 standard. This support must be enabled \ +with the -std=c++11 or -std=gnu++11 compiler options. #endif #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/c++14_warning.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/c++14_warning.h similarity index 81% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/c++14_warning.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/c++14_warning.h index 295794fb2..5ead9c6b1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/c++14_warning.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/c++14_warning.h @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,9 +29,9 @@ #define _CXX14_WARNING_H 1 #if __cplusplus <= 201103L -#error This file requires compiler and library support for the forthcoming \ -ISO C++ 2014 standard. This support is currently experimental, and must be \ -enabled with the -std=c++1y or -std=gnu++1y compiler options. +#error This file requires compiler and library support \ +for the ISO C++ 2014 standard. This support must be enabled \ +with the -std=c++14 or -std=gnu++14 compiler options. #endif #endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/c++17_warning.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/c++17_warning.h new file mode 100644 index 000000000..759fdc922 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/c++17_warning.h @@ -0,0 +1,37 @@ +// Copyright (C) 2016-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/c++17_warning.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{iosfwd} + */ + +#ifndef _CXX17_WARNING_H +#define _CXX17_WARNING_H 1 + +#if __cplusplus <= 201402L +#error This file requires compiler and library support \ +for the ISO C++ 2017 standard. This support must be enabled \ +with the -std=c++17 or -std=gnu++17 compiler options. +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/char_traits.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/char_traits.h similarity index 93% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/char_traits.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/char_traits.h index 0d0063bce..75db5b893 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/char_traits.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/char_traits.h @@ -1,6 +1,6 @@ // Character Traits for use by standard string and iostream -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -88,7 +88,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename _Char_types<_CharT>::off_type off_type; typedef typename _Char_types<_CharT>::state_type state_type; - static void + static _GLIBCXX14_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } @@ -100,13 +100,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } - static int + static _GLIBCXX14_CONSTEXPR int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); - static std::size_t + static _GLIBCXX14_CONSTEXPR std::size_t length(const char_type* __s); - static const char_type* + static _GLIBCXX14_CONSTEXPR const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); static char_type* @@ -139,8 +139,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } }; +// #define __cpp_lib_constexpr_char_traits 201611 + template - int + _GLIBCXX14_CONSTEXPR int char_traits<_CharT>:: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) { @@ -153,7 +155,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - std::size_t + _GLIBCXX14_CONSTEXPR std::size_t char_traits<_CharT>:: length(const char_type* __p) { @@ -164,7 +166,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - const typename char_traits<_CharT>::char_type* + _GLIBCXX14_CONSTEXPR const typename char_traits<_CharT>::char_type* char_traits<_CharT>:: find(const char_type* __s, std::size_t __n, const char_type& __a) { @@ -238,7 +240,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef streamoff off_type; typedef mbstate_t state_type; - static void + static _GLIBCXX17_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { __c1 = __c2; } @@ -254,7 +256,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION < static_cast(__c2)); } - static int + static /* _GLIBCXX17_CONSTEXPR */ int compare(const char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) @@ -262,11 +264,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __builtin_memcmp(__s1, __s2, __n); } - static size_t + static /* _GLIBCXX17_CONSTEXPR */ size_t length(const char_type* __s) { return __builtin_strlen(__s); } - static const char_type* + static /* _GLIBCXX17_CONSTEXPR */ const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { if (__n == 0) @@ -333,7 +335,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef wstreampos pos_type; typedef mbstate_t state_type; - static void + static _GLIBCXX17_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { __c1 = __c2; } @@ -345,7 +347,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION lt(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 < __c2; } - static int + static /* _GLIBCXX17_CONSTEXPR */ int compare(const char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) @@ -353,11 +355,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return wmemcmp(__s1, __s2, __n); } - static size_t + static /* _GLIBCXX17_CONSTEXPR */ size_t length(const char_type* __s) { return wcslen(__s); } - static const char_type* + static /* _GLIBCXX17_CONSTEXPR */ const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { if (__n == 0) @@ -432,7 +434,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef u16streampos pos_type; typedef mbstate_t state_type; - static void + static _GLIBCXX17_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } @@ -444,7 +446,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } - static int + static _GLIBCXX17_CONSTEXPR int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) @@ -455,7 +457,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return 0; } - static size_t + static _GLIBCXX17_CONSTEXPR size_t length(const char_type* __s) { size_t __i = 0; @@ -464,7 +466,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __i; } - static const char_type* + static _GLIBCXX17_CONSTEXPR const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (size_t __i = 0; __i < __n; ++__i) @@ -529,7 +531,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef u32streampos pos_type; typedef mbstate_t state_type; - static void + static _GLIBCXX17_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } @@ -541,7 +543,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } - static int + static _GLIBCXX17_CONSTEXPR int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) @@ -552,7 +554,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return 0; } - static size_t + static _GLIBCXX17_CONSTEXPR size_t length(const char_type* __s) { size_t __i = 0; @@ -561,7 +563,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __i; } - static const char_type* + static _GLIBCXX17_CONSTEXPR const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (size_t __i = 0; __i < __n; ++__i) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/codecvt.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/codecvt.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/codecvt.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/codecvt.h index c76215f87..fc2da321a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/codecvt.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/codecvt.h @@ -1,6 +1,6 @@ // Locale support (codecvt) -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/concept_check.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/concept_check.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/concept_check.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/concept_check.h index e1a5c9c17..83a96f4dc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/concept_check.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/concept_check.h @@ -1,6 +1,6 @@ // Concept-checking control -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -41,8 +41,9 @@ // Concept-checking code is off by default unless users turn it on via // configure options or editing c++config.h. +// It is not supported for freestanding implementations. -#ifndef _GLIBCXX_CONCEPT_CHECKS +#if !defined(_GLIBCXX_CONCEPT_CHECKS) || !_GLIBCXX_HOSTED #define __glibcxx_function_requires(...) #define __glibcxx_class_requires(_a,_b) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/cpp_type_traits.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/cpp_type_traits.h similarity index 90% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/cpp_type_traits.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/cpp_type_traits.h index 8c6bb7f2c..932360cd2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/cpp_type_traits.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/cpp_type_traits.h @@ -1,6 +1,6 @@ // The -*- C++ -*- type traits classes for internal use in libstdc++ -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -64,16 +64,7 @@ // removed. // -// Forward declaration hack, should really include this from somewhere. -namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - template - class __normal_iterator; - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace +extern "C++" { namespace std _GLIBCXX_VISIBILITY(default) { @@ -330,24 +321,6 @@ __INT_N(__GLIBCXX_TYPE_INT_N_3) typedef __true_type __type; }; - // - // Normal iterator type - // - template - struct __is_normal_iterator - { - enum { __value = 0 }; - typedef __false_type __type; - }; - - template - struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, - _Container> > - { - enum { __value = 1 }; - typedef __true_type __type; - }; - // // An arithmetic type is an integer type or a floating point type // @@ -428,19 +401,15 @@ __INT_N(__GLIBCXX_TYPE_INT_N_3) typedef __false_type __type; }; -#if __cplusplus >= 201103L + // Fallback implementation of the function in bits/stl_iterator.h used to + // remove the move_iterator wrapper. template - class move_iterator; - - template - struct __is_move_iterator< move_iterator<_Iterator> > - { - enum { __value = 1 }; - typedef __true_type __type; - }; -#endif + inline _Iterator + __miter_base(_Iterator __it) + { return __it; } _GLIBCXX_END_NAMESPACE_VERSION } // namespace +} // extern "C++" #endif //_CPP_TYPE_TRAITS_H diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/cxxabi_forced.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/cxxabi_forced.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/cxxabi_forced.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/cxxabi_forced.h index e5ae02829..40c9a1645 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/cxxabi_forced.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/cxxabi_forced.h @@ -1,6 +1,6 @@ // cxxabi.h subset for cancellation -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of GCC. // diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/cxxabi_init_exception.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/cxxabi_init_exception.h new file mode 100644 index 000000000..bf7b4bada --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/cxxabi_init_exception.h @@ -0,0 +1,77 @@ +// ABI Support -*- C++ -*- + +// Copyright (C) 2016-2017 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/cxxabi_init_exception.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. + */ + +#ifndef _CXXABI_INIT_EXCEPTION_H +#define _CXXABI_INIT_EXCEPTION_H 1 + +#pragma GCC system_header + +#pragma GCC visibility push(default) + +#include +#include + +#ifndef _GLIBCXX_CDTOR_CALLABI +#define _GLIBCXX_CDTOR_CALLABI +#define _GLIBCXX_HAVE_CDTOR_CALLABI 0 +#else +#define _GLIBCXX_HAVE_CDTOR_CALLABI 1 +#endif + +#ifdef __cplusplus + +namespace std +{ + class type_info; +} + +namespace __cxxabiv1 +{ + struct __cxa_refcounted_exception; + + extern "C" + { + // Allocate memory for the primary exception plus the thrown object. + void* + __cxa_allocate_exception(size_t) _GLIBCXX_NOTHROW; + + // Initialize exception (this is a GNU extension) + __cxa_refcounted_exception* + __cxa_init_primary_exception(void *object, std::type_info *tinfo, + void (_GLIBCXX_CDTOR_CALLABI *dest) (void *)) _GLIBCXX_NOTHROW; + + } +} // namespace __cxxabiv1 + +#endif + +#pragma GCC visibility pop + +#endif // _CXXABI_INIT_EXCEPTION_H diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/deque.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/deque.tcc similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/deque.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/deque.tcc index f7c2c7979..38a6e82aa 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/deque.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/deque.tcc @@ -1,6 +1,6 @@ // Deque implementation (out of line) -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -119,7 +119,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { const_iterator __mid = __x.begin() + difference_type(__len); std::copy(__x.begin(), __mid, this->_M_impl._M_start); - insert(this->_M_impl._M_finish, __mid, __x.end()); + _M_range_insert_aux(this->_M_impl._M_finish, __mid, __x.end(), + std::random_access_iterator_tag()); } } return *this; @@ -128,7 +129,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #if __cplusplus >= 201103L template template +#if __cplusplus > 201402L + typename deque<_Tp, _Alloc>::reference +#else void +#endif deque<_Tp, _Alloc>:: emplace_front(_Args&&... __args) { @@ -141,11 +146,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER } else _M_push_front_aux(std::forward<_Args>(__args)...); +#if __cplusplus > 201402L + return front(); +#endif } template template +#if __cplusplus > 201402L + typename deque<_Tp, _Alloc>::reference +#else void +#endif deque<_Tp, _Alloc>:: emplace_back(_Args&&... __args) { @@ -159,6 +171,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER } else _M_push_back_aux(std::forward<_Args>(__args)...); +#if __cplusplus > 201402L + return back(); +#endif } #endif @@ -280,7 +295,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER if (__first == __last) _M_erase_at_end(__cur); else - insert(end(), __first, __last); + _M_range_insert_aux(end(), __first, __last, + std::__iterator_category(__first)); } template diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/enable_special_members.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/enable_special_members.h similarity index 88% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/enable_special_members.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/enable_special_members.h index 1a1264e58..2c35eb50a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/enable_special_members.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/enable_special_members.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,13 +36,33 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION + struct _Enable_default_constructor_tag + { + explicit constexpr _Enable_default_constructor_tag() = default; + }; + /** * @brief A mixin helper to conditionally enable or disable the default * constructor. * @sa _Enable_special_members */ template - struct _Enable_default_constructor { }; + struct _Enable_default_constructor + { + constexpr _Enable_default_constructor() noexcept = default; + constexpr _Enable_default_constructor(_Enable_default_constructor const&) + noexcept = default; + constexpr _Enable_default_constructor(_Enable_default_constructor&&) + noexcept = default; + _Enable_default_constructor& + operator=(_Enable_default_constructor const&) noexcept = default; + _Enable_default_constructor& + operator=(_Enable_default_constructor&&) noexcept = default; + + // Can be used in other ctors. + constexpr explicit + _Enable_default_constructor(_Enable_default_constructor_tag) { } + }; /** @@ -86,7 +106,21 @@ template struct _Enable_default_constructor - { constexpr _Enable_default_constructor() noexcept = delete; }; + { + constexpr _Enable_default_constructor() noexcept = delete; + constexpr _Enable_default_constructor(_Enable_default_constructor const&) + noexcept = default; + constexpr _Enable_default_constructor(_Enable_default_constructor&&) + noexcept = default; + _Enable_default_constructor& + operator=(_Enable_default_constructor const&) noexcept = default; + _Enable_default_constructor& + operator=(_Enable_default_constructor&&) noexcept = default; + + // Can be used in other ctors. + constexpr explicit + _Enable_default_constructor(_Enable_default_constructor_tag) { } + }; template struct _Enable_destructor diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/exception.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/exception.h new file mode 100644 index 000000000..bfb6a0649 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/exception.h @@ -0,0 +1,78 @@ +// Exception Handling support header for -*- C++ -*- + +// Copyright (C) 2016-2017 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/exception.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. + */ + +#ifndef __EXCEPTION_H +#define __EXCEPTION_H 1 + +#pragma GCC system_header + +#pragma GCC visibility push(default) + +#include + +extern "C++" { + +namespace std +{ + /** + * @defgroup exceptions Exceptions + * @ingroup diagnostics + * + * Classes and functions for reporting errors via exception classes. + * @{ + */ + + /** + * @brief Base class for all library exceptions. + * + * This is the base class for all exceptions thrown by the standard + * library, and by certain language expressions. You are free to derive + * your own %exception classes, or use a different hierarchy, or to + * throw non-class data (e.g., fundamental types). + */ + class exception + { + public: + exception() _GLIBCXX_USE_NOEXCEPT { } + virtual ~exception() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT; + + /** Returns a C-style character string describing the general cause + * of the current error. */ + virtual const char* + what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT; + }; + +} // namespace std + +} + +#pragma GCC visibility pop + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/exception_defines.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/exception_defines.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/exception_defines.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/exception_defines.h index 8b2137f16..3668a3743 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/exception_defines.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/exception_defines.h @@ -1,6 +1,6 @@ // -fno-exceptions Support -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/exception_ptr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/exception_ptr.h similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/exception_ptr.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/exception_ptr.h index 8fbad1c86..0ece81d81 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/exception_ptr.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/exception_ptr.h @@ -1,6 +1,6 @@ // Exception Handling support header (exception_ptr class) for -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -35,10 +35,9 @@ #include #include - -#if ATOMIC_INT_LOCK_FREE < 2 -# error This platform does not support exception propagation. -#endif +#include +#include +#include extern "C++" { @@ -63,11 +62,16 @@ namespace std */ exception_ptr current_exception() _GLIBCXX_USE_NOEXCEPT; + template + exception_ptr make_exception_ptr(_Ex) _GLIBCXX_USE_NOEXCEPT; + /// Throw the object pointed to by the exception_ptr. void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); namespace __exception_ptr { + using std::rethrow_exception; + /** * @brief An opaque pointer to an arbitrary exception. * @ingroup exceptions @@ -85,6 +89,8 @@ namespace std friend exception_ptr std::current_exception() _GLIBCXX_USE_NOEXCEPT; friend void std::rethrow_exception(exception_ptr); + template + friend exception_ptr std::make_exception_ptr(_Ex) _GLIBCXX_USE_NOEXCEPT; public: exception_ptr() _GLIBCXX_USE_NOEXCEPT; @@ -160,8 +166,12 @@ namespace std swap(exception_ptr& __lhs, exception_ptr& __rhs) { __lhs.swap(__rhs); } - } // namespace __exception_ptr + template + inline void + __dest_thunk(void* __x) + { static_cast<_Ex*>(__x)->~_Ex(); } + } // namespace __exception_ptr /// Obtain an exception_ptr pointing to a copy of the supplied object. template @@ -171,7 +181,16 @@ namespace std #if __cpp_exceptions try { - throw __ex; +#if __cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI + void *__e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); + (void)__cxxabiv1::__cxa_init_primary_exception( + __e, const_cast(&typeid(__ex)), + __exception_ptr::__dest_thunk<_Ex>); + ::new (__e) _Ex(__ex); + return exception_ptr(__e); +#else + throw __ex; +#endif } catch(...) { diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/forward_list.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/forward_list.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/forward_list.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/forward_list.h index 88eee1f74..c37bf0134 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/forward_list.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/forward_list.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -305,19 +305,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _Node_alloc_type& _M_get_Node_allocator() noexcept - { return *static_cast<_Node_alloc_type*>(&this->_M_impl); } + { return this->_M_impl; } const _Node_alloc_type& _M_get_Node_allocator() const noexcept - { return *static_cast(&this->_M_impl); } + { return this->_M_impl; } _Fwd_list_base() : _M_impl() { } - _Fwd_list_base(const _Node_alloc_type& __a) - : _M_impl(__a) { } + _Fwd_list_base(_Node_alloc_type&& __a) + : _M_impl(std::move(__a)) { } - _Fwd_list_base(_Fwd_list_base&& __lst, const _Node_alloc_type& __a); + _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a); _Fwd_list_base(_Fwd_list_base&& __lst) : _M_impl(std::move(__lst._M_get_Node_allocator())) @@ -433,15 +433,24 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // 23.3.4.2 construct/copy/destroy: + /** + * @brief Creates a %forward_list with no elements. + */ + forward_list() + noexcept(is_nothrow_default_constructible<_Node_alloc_type>::value) + : _Base() + { } + /** * @brief Creates a %forward_list with no elements. * @param __al An allocator object. */ explicit - forward_list(const _Alloc& __al = _Alloc()) + forward_list(const _Alloc& __al) noexcept : _Base(_Node_alloc_type(__al)) { } + /** * @brief Copy constructor with allocator argument. * @param __list Input list to copy. @@ -459,11 +468,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER forward_list(forward_list&& __list, const _Alloc& __al) noexcept(_Node_alloc_traits::_S_always_equal()) : _Base(std::move(__list), _Node_alloc_type(__al)) - { } + { + // If __list is not empty it means its allocator is not equal to __a, + // so we need to move from each element individually. + insert_after(cbefore_begin(), + std::__make_move_if_noexcept_iterator(__list.begin()), + std::__make_move_if_noexcept_iterator(__list.end())); + } /** * @brief Creates a %forward_list with default constructed elements. - * @param __n The number of elements to initially create. + * @param __n The number of elements to initially create. + * @param __al An allocator object. * * This constructor creates the %forward_list with @a __n default * constructed elements. @@ -550,8 +566,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @param __list A %forward_list of identical element and allocator * types. * - * All the elements of @a __list are copied, but unlike the copy - * constructor, the allocator object is not copied. + * All the elements of @a __list are copied. + * + * Whether the allocator is copied depends on the allocator traits. */ forward_list& operator=(const forward_list& __list); @@ -563,7 +580,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * The contents of @a __list are moved into this %forward_list * (without copying, if the allocators permit it). - * @a __list is a valid, but unspecified %forward_list + * + * Afterwards @a __list is a valid, but unspecified %forward_list + * + * Whether the allocator is moved depends on the allocator traits. */ forward_list& operator=(forward_list&& __list) @@ -572,8 +592,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER constexpr bool __move_storage = _Node_alloc_traits::_S_propagate_on_move_assign() || _Node_alloc_traits::_S_always_equal(); - _M_move_assign(std::move(__list), - integral_constant()); + _M_move_assign(std::move(__list), __bool_constant<__move_storage>()); return *this; } @@ -602,7 +621,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %forward_list and * that the number of elements of the resulting %forward_list is the - * same as the number of elements assigned. Old data is lost. + * same as the number of elements assigned. */ template> @@ -621,7 +640,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * This function fills a %forward_list with @a __n copies of the * given value. Note that the assignment completely changes the * %forward_list, and that the resulting %forward_list has __n - * elements. Old data is lost. + * elements. */ void assign(size_type __n, const _Tp& __val) @@ -778,10 +797,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * and references. */ template - void +#if __cplusplus > 201402L + reference +#else + void +#endif emplace_front(_Args&&... __args) - { this->_M_insert_after(cbefore_begin(), - std::forward<_Args>(__args)...); } + { + this->_M_insert_after(cbefore_begin(), + std::forward<_Args>(__args)...); +#if __cplusplus > 201402L + return front(); +#endif + } /** * @brief Add data to the front of the %forward_list. @@ -976,10 +1004,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * time. Note that the global std::swap() function is * specialized such that std::swap(l1,l2) will feed to this * function. + * + * Whether the allocators are swapped depends on the allocator traits. */ void - swap(forward_list& __list) - noexcept(_Node_alloc_traits::_S_nothrow_swap()) + swap(forward_list& __list) noexcept { std::swap(this->_M_impl._M_head._M_next, __list._M_impl._M_head._M_next); @@ -1042,14 +1071,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * Requires this != @a x. */ void - splice_after(const_iterator __pos, forward_list&& __list) + splice_after(const_iterator __pos, forward_list&& __list) noexcept { if (!__list.empty()) _M_splice_after(__pos, __list.before_begin(), __list.end()); } void - splice_after(const_iterator __pos, forward_list& __list) + splice_after(const_iterator __pos, forward_list& __list) noexcept { splice_after(__pos, std::move(__list)); } /** @@ -1064,11 +1093,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ void splice_after(const_iterator __pos, forward_list&& __list, - const_iterator __i); + const_iterator __i) noexcept; void splice_after(const_iterator __pos, forward_list& __list, - const_iterator __i) + const_iterator __i) noexcept { splice_after(__pos, std::move(__list), __i); } /** @@ -1083,16 +1112,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * after @a __pos in constant time. * * Undefined if @a __pos is in (__before,__last). + * @{ */ void splice_after(const_iterator __pos, forward_list&&, - const_iterator __before, const_iterator __last) + const_iterator __before, const_iterator __last) noexcept { _M_splice_after(__pos, __before, __last); } void splice_after(const_iterator __pos, forward_list&, - const_iterator __before, const_iterator __last) + const_iterator __before, const_iterator __last) noexcept { _M_splice_after(__pos, __before, __last); } + // @} /** * @brief Remove all elements equal to value. @@ -1248,8 +1279,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _M_move_assign(forward_list&& __list, std::true_type) noexcept { clear(); - std::swap(this->_M_impl._M_head._M_next, - __list._M_impl._M_head._M_next); + this->_M_impl._M_head._M_next = __list._M_impl._M_head._M_next; + __list._M_impl._M_head._M_next = nullptr; std::__alloc_on_move(this->_M_get_Node_allocator(), __list._M_get_Node_allocator()); } @@ -1395,6 +1426,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER inline void swap(forward_list<_Tp, _Alloc>& __lx, forward_list<_Tp, _Alloc>& __ly) + noexcept(noexcept(__lx.swap(__ly))) { __lx.swap(__ly); } _GLIBCXX_END_NAMESPACE_CONTAINER diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/forward_list.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/forward_list.tcc similarity index 93% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/forward_list.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/forward_list.tcc index 00a26ed72..b823b09e1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/forward_list.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/forward_list.tcc @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,28 +36,16 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template _Fwd_list_base<_Tp, _Alloc>:: - _Fwd_list_base(_Fwd_list_base&& __lst, const _Node_alloc_type& __a) - : _M_impl(__a) + _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a) + : _M_impl(std::move(__a)) { - if (__lst._M_get_Node_allocator() == __a) + if (__lst._M_get_Node_allocator() == _M_get_Node_allocator()) { this->_M_impl._M_head._M_next = __lst._M_impl._M_head._M_next; __lst._M_impl._M_head._M_next = 0; } else - { - this->_M_impl._M_head._M_next = 0; - _Fwd_list_node_base* __to = &this->_M_impl._M_head; - _Node* __curr = static_cast<_Node*>(__lst._M_impl._M_head._M_next); - - while (__curr) - { - __to->_M_next = - _M_create_node(std::move_if_noexcept(*__curr->_M_valptr())); - __to = __to->_M_next; - __curr = static_cast<_Node*>(__curr->_M_next); - } - } + this->_M_impl._M_head._M_next = 0; } template @@ -155,7 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER forward_list<_Tp, _Alloc>:: operator=(const forward_list& __list) { - if (&__list != this) + if (std::__addressof(__list) != this) { if (_Node_alloc_traits::_S_propagate_on_copy_assign()) { @@ -253,7 +241,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER void forward_list<_Tp, _Alloc>:: splice_after(const_iterator __pos, forward_list&&, - const_iterator __i) + const_iterator __i) noexcept { const_iterator __j = __i; ++__j; @@ -299,8 +287,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER forward_list<_Tp, _Alloc>:: remove(const _Tp& __val) { - _Node* __curr = static_cast<_Node*>(&this->_M_impl._M_head); - _Node* __extra = 0; + _Node_base* __curr = &this->_M_impl._M_head; + _Node_base* __extra = nullptr; while (_Node* __tmp = static_cast<_Node*>(__curr->_M_next)) { @@ -314,7 +302,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER else __extra = __curr; } - __curr = static_cast<_Node*>(__curr->_M_next); + __curr = __curr->_M_next; } if (__extra) @@ -327,13 +315,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER forward_list<_Tp, _Alloc>:: remove_if(_Pred __pred) { - _Node* __curr = static_cast<_Node*>(&this->_M_impl._M_head); + _Node_base* __curr = &this->_M_impl._M_head; while (_Node* __tmp = static_cast<_Node*>(__curr->_M_next)) { if (__pred(*__tmp->_M_valptr())) this->_M_erase_after(__curr); else - __curr = static_cast<_Node*>(__curr->_M_next); + __curr = __curr->_M_next; } } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/fstream.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/fstream.tcc similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/fstream.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/fstream.tcc index d5fc8bbc3..b1beff86a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/fstream.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/fstream.tcc @@ -1,6 +1,6 @@ // File based streams -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/functexcept.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/functexcept.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/functexcept.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/functexcept.h index 355275db9..148351f9f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/functexcept.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/functexcept.h @@ -1,6 +1,6 @@ // Function-Based Exception Support -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/functional_hash.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/functional_hash.h similarity index 73% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/functional_hash.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/functional_hash.h index d94843f51..38be1724d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/functional_hash.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/functional_hash.h @@ -1,6 +1,6 @@ // functional_hash.h header -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -57,6 +57,50 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct hash; + template + struct __poison_hash + { + static constexpr bool __enable_hash_call = false; + private: + // Private rather than deleted to be non-trivially-copyable. + __poison_hash(__poison_hash&&); + ~__poison_hash(); + }; + + template + struct __poison_hash<_Tp, __void_t()(declval<_Tp>()))>> + { + static constexpr bool __enable_hash_call = true; + }; + + // Helper struct for SFINAE-poisoning non-enum types. + template::value> + struct __hash_enum + { + private: + // Private rather than deleted to be non-trivially-copyable. + __hash_enum(__hash_enum&&); + ~__hash_enum(); + }; + + // Helper struct for hash with enum types. + template + struct __hash_enum<_Tp, true> : public __hash_base + { + size_t + operator()(_Tp __val) const noexcept + { + using __type = typename underlying_type<_Tp>::type; + return hash<__type>{}(static_cast<__type>(__val)); + } + }; + + /// Primary class template hash, usable for enum types only. + // Use with non-enum types still SFINAES. + template + struct hash : __hash_enum<_Tp> + { }; + /// Partial specializations for pointer types. template struct hash<_Tp*> : public __hash_base @@ -121,6 +165,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Explicit specialization for unsigned long long. _Cxx_hashtable_define_trivial_hash(unsigned long long) +#ifdef __GLIBCXX_TYPE_INT_N_0 + _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_0) + _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_0 unsigned) +#endif +#ifdef __GLIBCXX_TYPE_INT_N_1 + _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_1) + _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_1 unsigned) +#endif +#ifdef __GLIBCXX_TYPE_INT_N_2 + _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_2) + _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_2 unsigned) +#endif +#ifdef __GLIBCXX_TYPE_INT_N_3 + _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_3) + _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_3 unsigned) +#endif + #undef _Cxx_hashtable_define_trivial_hash struct _Hash_impl @@ -141,6 +202,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return hash(&__val, sizeof(__val), __hash); } }; + // A hash function similar to FNV-1a (see PR59406 for how it differs). struct _Fnv_hash_impl { static size_t @@ -194,9 +256,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // @} group hashes - // Hint about performance of hash functor. If not fast the hash based + // Hint about performance of hash functor. If not fast the hash-based // containers will cache the hash code. - // Default behavior is to consider that hasher are fast unless specified + // Default behavior is to consider that hashers are fast unless specified // otherwise. template struct __is_fast_hash : public std::true_type diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/gslice.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/gslice.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/gslice.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/gslice.h index 93e96eb2c..8909dfde0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/gslice.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/gslice.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- gslice class. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/gslice_array.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/gslice_array.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/gslice_array.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/gslice_array.h index e5df385c4..dd4545017 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/gslice_array.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/gslice_array.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- gslice_array class. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/hash_bytes.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/hash_bytes.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/hash_bytes.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/hash_bytes.h index 91214c0ca..f9b98a032 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/hash_bytes.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/hash_bytes.h @@ -1,6 +1,6 @@ // Declarations for hash functions. -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/hashtable.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/hashtable.h similarity index 93% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/hashtable.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/hashtable.h index f5f298ea3..bc7448bcf 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/hashtable.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/hashtable.h @@ -1,6 +1,6 @@ // hashtable.h header -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -33,6 +33,9 @@ #pragma GCC system_header #include +#if __cplusplus > 201402L +# include +#endif namespace std _GLIBCXX_VISIBILITY(default) { @@ -179,15 +182,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>, private __detail::_Hashtable_alloc< - typename __alloctr_rebind<_Alloc, - __detail::_Hash_node<_Value, - _Traits::__hash_cached::value> >::__type> + __alloc_rebind<_Alloc, + __detail::_Hash_node<_Value, + _Traits::__hash_cached::value>>> { using __traits_type = _Traits; using __hash_cached = typename __traits_type::__hash_cached; using __node_type = __detail::_Hash_node<_Value, __hash_cached::value>; - using __node_alloc_type = - typename __alloctr_rebind<_Alloc, __node_type>::__type; + using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; using __hashtable_alloc = __detail::_Hashtable_alloc<__node_alloc_type>; @@ -295,7 +297,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _ExtractKeya, typename _Equala, typename _H1a, typename _H2a, typename _Hasha, typename _RehashPolicya, typename _Traitsa, - bool _Constant_iteratorsa, bool _Unique_keysa> + bool _Constant_iteratorsa> friend struct __detail::_Insert; public: @@ -309,6 +311,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using const_local_iterator = typename __hashtable_base:: const_local_iterator; +#if __cplusplus > 201402L + using node_type = _Node_handle<_Key, _Value, __node_alloc_type>; + using insert_return_type = _Node_insert_return; +#endif + private: __bucket_type* _M_buckets = &_M_single_bucket; size_type _M_bucket_count = 1; @@ -451,13 +458,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Hashtable& operator=(_Hashtable&& __ht) - noexcept(__node_alloc_traits::_S_nothrow_move()) + noexcept(__node_alloc_traits::_S_nothrow_move() + && is_nothrow_move_assignable<_H1>::value + && is_nothrow_move_assignable<_Equal>::value) { constexpr bool __move_storage = - __node_alloc_traits::_S_propagate_on_move_assign() - || __node_alloc_traits::_S_always_equal(); - _M_move_assign(std::move(__ht), - integral_constant()); + __node_alloc_traits::_S_propagate_on_move_assign() + || __node_alloc_traits::_S_always_equal(); + _M_move_assign(std::move(__ht), __bool_constant<__move_storage>()); return *this; } @@ -475,7 +483,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void swap(_Hashtable&) - noexcept(__node_alloc_traits::_S_nothrow_swap()); + noexcept(__and_<__is_nothrow_swappable<_H1>, + __is_nothrow_swappable<_Equal>>::value); // Basic container operations iterator @@ -592,7 +601,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return _M_rehash_policy; } void - __rehash_policy(const _RehashPolicy&); + __rehash_policy(const _RehashPolicy& __pol) + { _M_rehash_policy = __pol; } // Lookup. iterator @@ -760,6 +770,135 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // DR 1189. // reserve, if present, comes from _Rehash_base. +#if __cplusplus > 201402L + /// Re-insert an extracted node into a container with unique keys. + insert_return_type + _M_reinsert_node(node_type&& __nh) + { + insert_return_type __ret; + if (__nh.empty()) + __ret.position = end(); + else + { + __glibcxx_assert(get_allocator() == __nh.get_allocator()); + + const key_type& __k = __nh._M_key(); + __hash_code __code = this->_M_hash_code(__k); + size_type __bkt = _M_bucket_index(__k, __code); + if (__node_type* __n = _M_find_node(__bkt, __k, __code)) + { + __ret.node = std::move(__nh); + __ret.position = iterator(__n); + __ret.inserted = false; + } + else + { + __ret.position + = _M_insert_unique_node(__bkt, __code, __nh._M_ptr); + __nh._M_ptr = nullptr; + __ret.inserted = true; + } + } + return __ret; + } + + /// Re-insert an extracted node into a container with equivalent keys. + iterator + _M_reinsert_node_multi(const_iterator __hint, node_type&& __nh) + { + iterator __ret; + if (__nh.empty()) + __ret = end(); + else + { + __glibcxx_assert(get_allocator() == __nh.get_allocator()); + + auto __code = this->_M_hash_code(__nh._M_key()); + auto __node = std::exchange(__nh._M_ptr, nullptr); + // FIXME: this deallocates the node on exception. + __ret = _M_insert_multi_node(__hint._M_cur, __code, __node); + } + return __ret; + } + + /// Extract a node. + node_type + extract(const_iterator __pos) + { + __node_type* __n = __pos._M_cur; + size_t __bkt = _M_bucket_index(__n); + + // Look for previous node to unlink it from the erased one, this + // is why we need buckets to contain the before begin to make + // this search fast. + __node_base* __prev_n = _M_get_previous_node(__bkt, __n); + + if (__prev_n == _M_buckets[__bkt]) + _M_remove_bucket_begin(__bkt, __n->_M_next(), + __n->_M_nxt ? _M_bucket_index(__n->_M_next()) : 0); + else if (__n->_M_nxt) + { + size_type __next_bkt = _M_bucket_index(__n->_M_next()); + if (__next_bkt != __bkt) + _M_buckets[__next_bkt] = __prev_n; + } + + __prev_n->_M_nxt = __n->_M_nxt; + __n->_M_nxt = nullptr; + --_M_element_count; + return { __n, this->_M_node_allocator() }; + } + + /// Extract a node. + node_type + extract(const _Key& __k) + { + node_type __nh; + auto __pos = find(__k); + if (__pos != end()) + __nh = extract(const_iterator(__pos)); + return __nh; + } + + /// Merge from a compatible container into one with unique keys. + template + void + _M_merge_unique(_Compatible_Hashtable& __src) noexcept + { + static_assert(is_same_v, "Node types are compatible"); + __glibcxx_assert(get_allocator() == __src.get_allocator()); + + for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) + { + auto __pos = __i++; + const key_type& __k = this->_M_extract()(__pos._M_cur->_M_v()); + __hash_code __code = this->_M_hash_code(__k); + size_type __bkt = _M_bucket_index(__k, __code); + if (_M_find_node(__bkt, __k, __code) == nullptr) + { + auto __nh = __src.extract(__pos); + _M_insert_unique_node(__bkt, __code, __nh._M_ptr); + __nh._M_ptr = nullptr; + } + } + } + + /// Merge from a compatible container into one with equivalent keys. + template + void + _M_merge_multi(_Compatible_Hashtable& __src) noexcept + { + static_assert(is_same_v, "Node types are compatible"); + __glibcxx_assert(get_allocator() == __src.get_allocator()); + + this->reserve(size() + __src.size()); + for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) + _M_reinsert_node_multi(cend(), __src.extract(__i++)); + } +#endif // C++17 + private: // Helper rehash method used when keys are unique. void _M_rehash_aux(size_type __n, std::true_type); @@ -1234,7 +1373,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: swap(_Hashtable& __x) - noexcept(__node_alloc_traits::_S_nothrow_swap()) + noexcept(__and_<__is_nothrow_swappable<_H1>, + __is_nothrow_swappable<_Equal>>::value) { // The only base class with member variables is hash_code_base. // We define _Hash_code_base::_M_swap because different @@ -1276,22 +1416,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION = &__x._M_before_begin; } - template - void - _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, - _H1, _H2, _Hash, _RehashPolicy, _Traits>:: - __rehash_policy(const _RehashPolicy& __pol) - { - auto __do_rehash = - __pol._M_need_rehash(_M_bucket_count, _M_element_count, 0); - if (__do_rehash.first) - _M_rehash(__do_rehash.second, _M_rehash_policy._M_state()); - _M_rehash_policy = __pol; - } - template 201402L + template class _Hash_merge_helper { }; +#endif // C++17 + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/hashtable_policy.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/hashtable_policy.h similarity index 92% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/hashtable_policy.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/hashtable_policy.h index 14bcca656..8af8c498d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/hashtable_policy.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/hashtable_policy.h @@ -1,6 +1,6 @@ // Internal policy header for unordered_set and unordered_map -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -31,6 +31,8 @@ #ifndef _HASHTABLE_POLICY_H #define _HASHTABLE_POLICY_H 1 +#include // for std::min. + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -457,6 +459,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// smallest prime that keeps the load factor small enough. struct _Prime_rehash_policy { + using __has_load_factor = std::true_type; + _Prime_rehash_policy(float __z = 1.0) noexcept : _M_max_load_factor(__z), _M_next_resize(0) { } @@ -495,14 +499,138 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_reset(_State __state) { _M_next_resize = __state; } - enum { _S_n_primes = sizeof(unsigned long) != 8 ? 256 : 256 + 48 }; - static const std::size_t _S_growth_factor = 2; float _M_max_load_factor; mutable std::size_t _M_next_resize; }; + /// Range hashing function assuming that second arg is a power of 2. + struct _Mask_range_hashing + { + typedef std::size_t first_argument_type; + typedef std::size_t second_argument_type; + typedef std::size_t result_type; + + result_type + operator()(first_argument_type __num, + second_argument_type __den) const noexcept + { return __num & (__den - 1); } + }; + + /// Compute closest power of 2. + _GLIBCXX14_CONSTEXPR + inline std::size_t + __clp2(std::size_t __n) noexcept + { +#if __SIZEOF_SIZE_T__ >= 8 + std::uint_fast64_t __x = __n; +#else + std::uint_fast32_t __x = __n; +#endif + // Algorithm from Hacker's Delight, Figure 3-3. + __x = __x - 1; + __x = __x | (__x >> 1); + __x = __x | (__x >> 2); + __x = __x | (__x >> 4); + __x = __x | (__x >> 8); + __x = __x | (__x >>16); +#if __SIZEOF_SIZE_T__ >= 8 + __x = __x | (__x >>32); +#endif + return __x + 1; + } + + /// Rehash policy providing power of 2 bucket numbers. Avoids modulo + /// operations. + struct _Power2_rehash_policy + { + using __has_load_factor = std::true_type; + + _Power2_rehash_policy(float __z = 1.0) noexcept + : _M_max_load_factor(__z), _M_next_resize(0) { } + + float + max_load_factor() const noexcept + { return _M_max_load_factor; } + + // Return a bucket size no smaller than n (as long as n is not above the + // highest power of 2). + std::size_t + _M_next_bkt(std::size_t __n) noexcept + { + const auto __max_width = std::min(sizeof(size_t), 8); + const auto __max_bkt = size_t(1) << (__max_width * __CHAR_BIT__ - 1); + std::size_t __res = __clp2(__n); + + if (__res == __n) + __res <<= 1; + + if (__res == 0) + __res = __max_bkt; + + if (__res == __max_bkt) + // Set next resize to the max value so that we never try to rehash again + // as we already reach the biggest possible bucket number. + // Note that it might result in max_load_factor not being respected. + _M_next_resize = std::size_t(-1); + else + _M_next_resize + = __builtin_ceil(__res * (long double)_M_max_load_factor); + + return __res; + } + + // Return a bucket count appropriate for n elements + std::size_t + _M_bkt_for_elements(std::size_t __n) const noexcept + { return __builtin_ceil(__n / (long double)_M_max_load_factor); } + + // __n_bkt is current bucket count, __n_elt is current element count, + // and __n_ins is number of elements to be inserted. Do we need to + // increase bucket count? If so, return make_pair(true, n), where n + // is the new bucket count. If not, return make_pair(false, 0). + std::pair + _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, + std::size_t __n_ins) noexcept + { + if (__n_elt + __n_ins >= _M_next_resize) + { + long double __min_bkts = (__n_elt + __n_ins) + / (long double)_M_max_load_factor; + if (__min_bkts >= __n_bkt) + return std::make_pair(true, + _M_next_bkt(std::max(__builtin_floor(__min_bkts) + 1, + __n_bkt * _S_growth_factor))); + + _M_next_resize + = __builtin_floor(__n_bkt * (long double)_M_max_load_factor); + return std::make_pair(false, 0); + } + else + return std::make_pair(false, 0); + } + + typedef std::size_t _State; + + _State + _M_state() const noexcept + { return _M_next_resize; } + + void + _M_reset() noexcept + { _M_next_resize = 0; } + + void + _M_reset(_State __state) noexcept + { _M_next_resize = __state; } + + static const std::size_t _S_growth_factor = 2; + + float _M_max_load_factor; + std::size_t _M_next_resize; + }; + // Base classes for std::_Hashtable. We define these base classes // because in some cases we want to do different things depending on // the value of a policy class. In some cases the policy class @@ -669,7 +797,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * Primary class template _Insert_base. * - * insert member functions appropriate to all _Hashtables. + * Defines @c insert member functions appropriate to all _Hashtables. */ template + bool _Constant_iterators = _Traits::__constant_iterators::value> struct _Insert; /// Specialization. @@ -787,24 +915,30 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, - _RehashPolicy, _Traits, true, true> + _RehashPolicy, _Traits, true> : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits> { using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; + + using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, + _Equal, _H1, _H2, _Hash, + _Traits>; + using value_type = typename __base_type::value_type; using iterator = typename __base_type::iterator; using const_iterator = typename __base_type::const_iterator; using __unique_keys = typename __base_type::__unique_keys; + using __ireturn_type = typename __hashtable_base::__ireturn_type; using __hashtable = typename __base_type::__hashtable; using __node_gen_type = typename __base_type::__node_gen_type; using __base_type::insert; - std::pair + __ireturn_type insert(value_type&& __v) { __hashtable& __h = this->_M_conjure_hashtable(); @@ -828,48 +962,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, - _RehashPolicy, _Traits, true, false> - : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, - _H1, _H2, _Hash, _RehashPolicy, _Traits> - { - using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, - _Equal, _H1, _H2, _Hash, - _RehashPolicy, _Traits>; - using value_type = typename __base_type::value_type; - using iterator = typename __base_type::iterator; - using const_iterator = typename __base_type::const_iterator; - - using __unique_keys = typename __base_type::__unique_keys; - using __hashtable = typename __base_type::__hashtable; - using __node_gen_type = typename __base_type::__node_gen_type; - - using __base_type::insert; - - iterator - insert(value_type&& __v) - { - __hashtable& __h = this->_M_conjure_hashtable(); - __node_gen_type __node_gen(__h); - return __h._M_insert(std::move(__v), __node_gen, __unique_keys()); - } - - iterator - insert(const_iterator __hint, value_type&& __v) - { - __hashtable& __h = this->_M_conjure_hashtable(); - __node_gen_type __node_gen(__h); - return __h._M_insert(__hint, std::move(__v), __node_gen, - __unique_keys()); - } - }; - - /// Specialization. - template - struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, - _RehashPolicy, _Traits, false, _Unique_keys> + _RehashPolicy, _Traits, false> : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits> { @@ -913,28 +1006,46 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } }; + template + using __has_load_factor = typename _Policy::__has_load_factor; + /** * Primary class template _Rehash_base. * * Give hashtable the max_load_factor functions and reserve iff the - * rehash policy is _Prime_rehash_policy. + * rehash policy supports it. */ template + typename _RehashPolicy, typename _Traits, + typename = + __detected_or_t> struct _Rehash_base; - /// Specialization. + /// Specialization when rehash policy doesn't provide load factor management. template + typename _H1, typename _H2, typename _Hash, + typename _RehashPolicy, typename _Traits> struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, - _H1, _H2, _Hash, _Prime_rehash_policy, _Traits> + _H1, _H2, _Hash, _RehashPolicy, _Traits, + std::false_type> + { + }; + + /// Specialization when rehash policy provide load factor management. + template + struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _H1, _H2, _Hash, _RehashPolicy, _Traits, + std::true_type> { using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, - _Prime_rehash_policy, _Traits>; + _RehashPolicy, _Traits>; float max_load_factor() const noexcept @@ -947,7 +1058,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION max_load_factor(float __z) { __hashtable* __this = static_cast<__hashtable*>(this); - __this->__rehash_policy(_Prime_rehash_policy(__z)); + __this->__rehash_policy(_RehashPolicy(__z)); } void diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/indirect_array.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/indirect_array.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/indirect_array.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/indirect_array.h index 7228c6841..ed799707e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/indirect_array.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/indirect_array.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- indirect_array class. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/invoke.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/invoke.h new file mode 100644 index 000000000..eba870743 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/invoke.h @@ -0,0 +1,104 @@ +// Implementation of INVOKE -*- C++ -*- + +// Copyright (C) 2016-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file include/bits/invoke.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{functional} + */ + +#ifndef _GLIBCXX_INVOKE_H +#define _GLIBCXX_INVOKE_H 1 + +#pragma GCC system_header + +#if __cplusplus < 201103L +# include +#else + +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @addtogroup utilities + * @{ + */ + + // Used by __invoke_impl instead of std::forward<_Tp> so that a + // reference_wrapper is converted to an lvalue-reference. + template::type> + constexpr _Up&& + __invfwd(typename remove_reference<_Tp>::type& __t) noexcept + { return static_cast<_Up&&>(__t); } + + template + constexpr _Res + __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) + { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } + + template + constexpr _Res + __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, + _Args&&... __args) + { return (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...); } + + template + constexpr _Res + __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, + _Args&&... __args) + { + return ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...); + } + + template + constexpr _Res + __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t) + { return __invfwd<_Tp>(__t).*__f; } + + template + constexpr _Res + __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t) + { return (*std::forward<_Tp>(__t)).*__f; } + + /// Invoke a callable object. + template + constexpr typename __invoke_result<_Callable, _Args...>::type + __invoke(_Callable&& __fn, _Args&&... __args) + noexcept(__is_nothrow_invocable<_Callable, _Args...>::value) + { + using __result = __invoke_result<_Callable, _Args...>; + using __type = typename __result::type; + using __tag = typename __result::__invoke_type; + return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // C++11 + +#endif // _GLIBCXX_INVOKE_H diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ios_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ios_base.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ios_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ios_base.h index 908ba7c7e..e5a107db4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ios_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ios_base.h @@ -1,6 +1,6 @@ // Iostreams base classes -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -52,8 +52,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // The following definitions of bitmask types are enums, not ints, // as permitted (but not required) in the standard, in order to provide - // better type safety in iostream calls. A side effect is that - // expressions involving them are no longer compile-time constants. + // better type safety in iostream calls. A side effect is that in C++98 + // expressions involving them are not compile-time constants. enum _Ios_Fmtflags { _S_boolalpha = 1L << 0, @@ -207,12 +207,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const error_category& iostream_category() noexcept; inline error_code - make_error_code(io_errc e) noexcept - { return error_code(static_cast(e), iostream_category()); } + make_error_code(io_errc __e) noexcept + { return error_code(static_cast(__e), iostream_category()); } inline error_condition - make_error_condition(io_errc e) noexcept - { return error_condition(static_cast(e), iostream_category()); } + make_error_condition(io_errc __e) noexcept + { return error_condition(static_cast(__e), iostream_category()); } #endif // 27.4.2 Class ios_base diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/istream.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/istream.tcc similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/istream.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/istream.tcc index e8cbb261b..b390f743b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/istream.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/istream.tcc @@ -1,6 +1,6 @@ // istream classes -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/list.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/list.tcc similarity index 71% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/list.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/list.tcc index a9c8a550b..fcb8353e0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/list.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/list.tcc @@ -1,6 +1,6 @@ // List implementation (out of line) -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -71,10 +71,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { _Node* __tmp = static_cast<_Node*>(__cur); __cur = __tmp->_M_next; + _Tp* __val = __tmp->_M_valptr(); #if __cplusplus >= 201103L - _M_get_Node_allocator().destroy(__tmp); + _Node_alloc_traits::destroy(_M_get_Node_allocator(), __val); #else - _M_get_Tp_allocator().destroy(std::__addressof(__tmp->_M_data)); + _Tp_alloc_type(_M_get_Node_allocator()).destroy(__val); #endif _M_put_node(__tmp); } @@ -157,6 +158,52 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER return __ret; } + // Return a const_iterator indicating the position to start inserting or + // erasing elements (depending whether the list is growing or shrinking), + // and set __new_size to the number of new elements that must be appended. + // Equivalent to the following, but performed optimally: + // if (__new_size < size()) { + // __new_size = 0; + // return std::next(begin(), __new_size); + // } else { + // __newsize -= size(); + // return end(); + // } + template + typename list<_Tp, _Alloc>::const_iterator + list<_Tp, _Alloc>:: + _M_resize_pos(size_type& __new_size) const + { + const_iterator __i; +#if _GLIBCXX_USE_CXX11_ABI + const size_type __len = size(); + if (__new_size < __len) + { + if (__new_size <= __len / 2) + { + __i = begin(); + std::advance(__i, __new_size); + } + else + { + __i = end(); + ptrdiff_t __num_erase = __len - __new_size; + std::advance(__i, -__num_erase); + } + __new_size = 0; + return __i; + } + else + __i = end(); +#else + size_type __len = 0; + for (__i = begin(); __i != end() && __len < __new_size; ++__i, ++__len) + ; +#endif + __new_size -= __len; + return __i; + } + #if __cplusplus >= 201103L template void @@ -182,14 +229,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER list<_Tp, _Alloc>:: resize(size_type __new_size) { - iterator __i = begin(); - size_type __len = 0; - for (; __i != end() && __len < __new_size; ++__i, ++__len) - ; - if (__len == __new_size) + const_iterator __i = _M_resize_pos(__new_size); + if (__new_size) + _M_default_append(__new_size); + else erase(__i, end()); - else // __i == end() - _M_default_append(__new_size - __len); } template @@ -197,14 +241,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER list<_Tp, _Alloc>:: resize(size_type __new_size, const value_type& __x) { - iterator __i = begin(); - size_type __len = 0; - for (; __i != end() && __len < __new_size; ++__i, ++__len) - ; - if (__len == __new_size) + const_iterator __i = _M_resize_pos(__new_size); + if (__new_size) + insert(end(), __new_size, __x); + else erase(__i, end()); - else // __i == end() - insert(end(), __new_size - __len, __x); } #else template @@ -212,14 +253,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER list<_Tp, _Alloc>:: resize(size_type __new_size, value_type __x) { - iterator __i = begin(); - size_type __len = 0; - for (; __i != end() && __len < __new_size; ++__i, ++__len) - ; - if (__len == __new_size) - erase(__i, end()); - else // __i == end() - insert(end(), __new_size - __len, __x); + const_iterator __i = _M_resize_pos(__new_size); + if (__new_size) + insert(end(), __new_size, __x); + else + erase(__i._M_const_cast(), end()); } #endif @@ -228,19 +266,23 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER list<_Tp, _Alloc>:: operator=(const list& __x) { - if (this != &__x) + if (this != std::__addressof(__x)) { - iterator __first1 = begin(); - iterator __last1 = end(); - const_iterator __first2 = __x.begin(); - const_iterator __last2 = __x.end(); - for (; __first1 != __last1 && __first2 != __last2; - ++__first1, ++__first2) - *__first1 = *__first2; - if (__first2 == __last2) - erase(__first1, __last1); - else - insert(__last1, __first2, __last2); +#if __cplusplus >= 201103L + if (_Node_alloc_traits::_S_propagate_on_copy_assign()) + { + auto& __this_alloc = this->_M_get_Node_allocator(); + auto& __that_alloc = __x._M_get_Node_allocator(); + if (!_Node_alloc_traits::_S_always_equal() + && __this_alloc != __that_alloc) + { + // replacement allocator cannot free existing storage + clear(); + } + std::__alloc_on_copy(__this_alloc, __that_alloc); + } +#endif + _M_assign_dispatch(__x.begin(), __x.end(), __false_type()); } return *this; } @@ -336,28 +378,38 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 300. list::merge() specification incomplete - if (this != &__x) + if (this != std::__addressof(__x)) { - _M_check_equal_allocators(__x); + _M_check_equal_allocators(__x); iterator __first1 = begin(); iterator __last1 = end(); iterator __first2 = __x.begin(); iterator __last2 = __x.end(); - while (__first1 != __last1 && __first2 != __last2) - if (*__first2 < *__first1) - { - iterator __next = __first2; - _M_transfer(__first1, __first2, ++__next); - __first2 = __next; - } - else - ++__first1; - if (__first2 != __last2) - _M_transfer(__last1, __first2, __last2); + const size_t __orig_size = __x.size(); + __try { + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); - this->_M_inc_size(__x._M_get_size()); - __x._M_set_size(0); + this->_M_inc_size(__x._M_get_size()); + __x._M_set_size(0); + } + __catch(...) + { + const size_t __dist = std::distance(__first2, __last2); + this->_M_inc_size(__orig_size - __dist); + __x._M_set_size(__dist); + __throw_exception_again; + } } } @@ -373,7 +425,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 300. list::merge() specification incomplete - if (this != &__x) + if (this != std::__addressof(__x)) { _M_check_equal_allocators(__x); @@ -381,20 +433,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER iterator __last1 = end(); iterator __first2 = __x.begin(); iterator __last2 = __x.end(); - while (__first1 != __last1 && __first2 != __last2) - if (__comp(*__first2, *__first1)) - { - iterator __next = __first2; - _M_transfer(__first1, __first2, ++__next); - __first2 = __next; - } - else - ++__first1; - if (__first2 != __last2) - _M_transfer(__last1, __first2, __last2); + const size_t __orig_size = __x.size(); + __try + { + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); - this->_M_inc_size(__x._M_get_size()); - __x._M_set_size(0); + this->_M_inc_size(__x._M_get_size()); + __x._M_set_size(0); + } + __catch(...) + { + const size_t __dist = std::distance(__first2, __last2); + this->_M_inc_size(__orig_size - __dist); + __x._M_set_size(__dist); + __throw_exception_again; + } } } @@ -409,29 +472,38 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { list __carry; list __tmp[64]; - list * __fill = &__tmp[0]; + list * __fill = __tmp; list * __counter; - - do + __try { - __carry.splice(__carry.begin(), *this, begin()); - - for(__counter = &__tmp[0]; - __counter != __fill && !__counter->empty(); - ++__counter) + do { - __counter->merge(__carry); - __carry.swap(*__counter); - } - __carry.swap(*__counter); - if (__counter == __fill) - ++__fill; - } - while ( !empty() ); + __carry.splice(__carry.begin(), *this, begin()); - for (__counter = &__tmp[1]; __counter != __fill; ++__counter) - __counter->merge(*(__counter - 1)); - swap( *(__fill - 1) ); + for(__counter = __tmp; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + + for (__counter = __tmp + 1; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1)); + swap( *(__fill - 1) ); + } + __catch(...) + { + this->splice(this->end(), __carry); + for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) + this->splice(this->end(), __tmp[__i]); + __throw_exception_again; + } } } @@ -486,29 +558,38 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { list __carry; list __tmp[64]; - list * __fill = &__tmp[0]; + list * __fill = __tmp; list * __counter; - - do + __try { - __carry.splice(__carry.begin(), *this, begin()); - - for(__counter = &__tmp[0]; - __counter != __fill && !__counter->empty(); - ++__counter) + do { - __counter->merge(__carry, __comp); - __carry.swap(*__counter); - } - __carry.swap(*__counter); - if (__counter == __fill) - ++__fill; - } - while ( !empty() ); + __carry.splice(__carry.begin(), *this, begin()); - for (__counter = &__tmp[1]; __counter != __fill; ++__counter) - __counter->merge(*(__counter - 1), __comp); - swap(*(__fill - 1)); + for(__counter = __tmp; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry, __comp); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + + for (__counter = __tmp + 1; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1), __comp); + swap(*(__fill - 1)); + } + __catch(...) + { + this->splice(this->end(), __carry); + for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) + this->splice(this->end(), __tmp[__i]); + __throw_exception_again; + } } } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_classes.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_classes.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_classes.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_classes.h index f3898ebf7..b63e9c8a3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_classes.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_classes.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -428,6 +428,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_CONST static const char* _S_get_c_name() throw(); +#if __cplusplus < 201103L + private: + facet(const facet&); // Not defined. + + facet& + operator=(const facet&); // Not defined. +#else + facet(const facet&) = delete; + + facet& + operator=(const facet&) = delete; +#endif + private: void _M_add_reference() const throw() @@ -448,15 +461,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } - facet(const facet&); // Not defined. - - facet& - operator=(const facet&); // Not defined. - - class __shim; - const facet* _M_sso_shim(const id*) const; const facet* _M_cow_shim(const id*) const; + + protected: + class __shim; // For internal use only. }; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_classes.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_classes.tcc similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_classes.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_classes.tcc index dbc8c8ed4..71378f68b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_classes.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_classes.tcc @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_conv.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_conv.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_conv.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_conv.h index 16b48758e..9b952d451 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_conv.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_conv.h @@ -1,6 +1,6 @@ // wstring_convert implementation -*- C++ -*- -// Copyright (C) 2015 Free Software Foundation, Inc. +// Copyright (C) 2015-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -81,7 +81,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION && (__outstr.size() - __outchars) < __maxlen); if (__result == codecvt_base::error) - return false; + { + __count = __next - __first; + return false; + } if (__result == codecvt_base::noconv) { diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets.h index 0226b497c..1ad0eb5ab 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -1128,7 +1128,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @return The converted char. */ virtual char - do_narrow(char_type __c, char __dfault) const + do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const { return __c; } /** @@ -1155,7 +1155,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, - char __dfault, char* __to) const + char __dfault __attribute__((__unused__)), char* __to) const { __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets.tcc similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets.tcc index bd5877139..351190ccb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets.tcc @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -959,13 +959,13 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL } // The following code uses vsnprintf (or vsprintf(), when - // _GLIBCXX_USE_C99 is not defined) to convert floating point values - // for insertion into a stream. An optimization would be to replace - // them with code that works directly on a wide buffer and then use - // __pad to do the padding. It would be good to replace them anyway - // to gain back the efficiency that C++ provides by knowing up front - // the type of the values to insert. Also, sprintf is dangerous - // since may lead to accidental buffer overruns. This + // _GLIBCXX_USE_C99_STDIO is not defined) to convert floating point + // values for insertion into a stream. An optimization would be to + // replace them with code that works directly on a wide buffer and + // then use __pad to do the padding. It would be good to replace + // them anyway to gain back the efficiency that C++ provides by + // knowing up front the type of the values to insert. Also, sprintf + // is dangerous since may lead to accidental buffer overruns. This // implementation follows the C++ standard fairly directly as // outlined in 22.2.2.2 [lib.locale.num.put] template @@ -992,7 +992,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL char __fbuf[16]; __num_base::_S_format_float(__io, __fbuf, __mod); -#ifdef _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO // Precision is always used except for hexfloat format. const bool __use_prec = (__io.flags() & ios_base::floatfield) != ios_base::floatfield; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets_nonio.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets_nonio.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets_nonio.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets_nonio.h index 7eae6c806..0cd307fb5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets_nonio.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets_nonio.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -709,7 +709,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * * @param __s Start of string to parse. * @param __end End of string to parse. - * @param __io Source of the locale. + * @param __f Source of the locale. * @param __err Error flags to set. * @param __tm Pointer to struct tm to fill in. * @param __format Format specifier. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets_nonio.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets_nonio.tcc similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets_nonio.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets_nonio.tcc index 188d07bd7..a449c41e6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/locale_facets_nonio.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/locale_facets_nonio.tcc @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -202,7 +202,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 size_type __j = 0; for (; __beg != __end && __j < __len && *__beg == __lc->_M_curr_symbol[__j]; - ++__beg, ++__j); + ++__beg, (void)++__j); if (__j != __len && (__j || __io.flags() & ios_base::showbase)) __testvalid = false; @@ -298,7 +298,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 : __lc->_M_positive_sign; size_type __i = 1; for (; __beg != __end && __i < __sign_size - && *__beg == __sign[__i]; ++__beg, ++__i); + && *__beg == __sign[__i]; ++__beg, (void)++__i); if (__i != __sign_size) __testvalid = false; @@ -578,7 +578,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 { const locale __loc = __io.getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); -#ifdef _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO // First try a buffer perhaps big enough. int __cs_size = 64; char* __cs = static_cast(__builtin_alloca(__cs_size)); @@ -659,30 +659,38 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 // Abbreviated weekday name [tm_wday] const char_type* __days1[7]; __tp._M_days_abbreviated(__days1); - __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1, + __beg = _M_extract_name(__beg, __end, __mem, __days1, 7, __io, __tmperr); + if (!__tmperr) + __tm->tm_wday = __mem; break; case 'A': // Weekday name [tm_wday]. const char_type* __days2[7]; __tp._M_days(__days2); - __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2, + __beg = _M_extract_name(__beg, __end, __mem, __days2, 7, __io, __tmperr); + if (!__tmperr) + __tm->tm_wday = __mem; break; case 'h': case 'b': // Abbreviated month name [tm_mon] const char_type* __months1[12]; __tp._M_months_abbreviated(__months1); - __beg = _M_extract_name(__beg, __end, __tm->tm_mon, + __beg = _M_extract_name(__beg, __end, __mem, __months1, 12, __io, __tmperr); + if (!__tmperr) + __tm->tm_mon = __mem; break; case 'B': // Month name [tm_mon]. const char_type* __months2[12]; __tp._M_months(__months2); - __beg = _M_extract_name(__beg, __end, __tm->tm_mon, + __beg = _M_extract_name(__beg, __end, __mem, __months2, 12, __io, __tmperr); + if (!__tmperr) + __tm->tm_mon = __mem; break; case 'c': // Default time and date representation. @@ -693,18 +701,22 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 break; case 'd': // Day [01, 31]. [tm_mday] - __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2, + __beg = _M_extract_num(__beg, __end, __mem, 1, 31, 2, __io, __tmperr); + if (!__tmperr) + __tm->tm_mday = __mem; break; case 'e': // Day [1, 31], with single digits preceded by // space. [tm_mday] if (__ctype.is(ctype_base::space, *__beg)) - __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9, + __beg = _M_extract_num(++__beg, __end, __mem, 1, 9, 1, __io, __tmperr); else - __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31, + __beg = _M_extract_num(__beg, __end, __mem, 10, 31, 2, __io, __tmperr); + if (!__tmperr) + __tm->tm_mday = __mem; break; case 'D': // Equivalent to %m/%d/%y.[tm_mon, tm_mday, tm_year] @@ -715,13 +727,17 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 break; case 'H': // Hour [00, 23]. [tm_hour] - __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2, + __beg = _M_extract_num(__beg, __end, __mem, 0, 23, 2, __io, __tmperr); + if (!__tmperr) + __tm->tm_hour = __mem; break; case 'I': // Hour [01, 12]. [tm_hour] - __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2, + __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, __io, __tmperr); + if (!__tmperr) + __tm->tm_hour = __mem; break; case 'm': // Month [01, 12]. [tm_mon] @@ -732,8 +748,10 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 break; case 'M': // Minute [00, 59]. [tm_min] - __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2, + __beg = _M_extract_num(__beg, __end, __mem, 0, 59, 2, __io, __tmperr); + if (!__tmperr) + __tm->tm_min = __mem; break; case 'n': if (__ctype.narrow(*__beg, 0) == '\n') @@ -751,12 +769,14 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 case 'S': // Seconds. [tm_sec] // [00, 60] in C99 (one leap-second), [00, 61] in C89. -#ifdef _GLIBCXX_USE_C99 - __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2, +#if _GLIBCXX_USE_C99 + __beg = _M_extract_num(__beg, __end, __mem, 0, 60, 2, #else - __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 61, 2, + __beg = _M_extract_num(__beg, __end, __mem, 0, 61, 2, #endif __io, __tmperr); + if (!__tmperr) + __tm->tm_sec = __mem; break; case 't': if (__ctype.narrow(*__beg, 0) == '\t') @@ -858,7 +878,7 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 ++__min; size_t __i = 0; int __value = 0; - for (; __beg != __end && __i < __len; ++__beg, ++__i) + for (; __beg != __end && __i < __len; ++__beg, (void)++__i) { const char __c = __ctype.narrow(*__beg, '*'); if (__c >= '0' && __c <= '9') @@ -923,7 +943,8 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) __minlen = std::min(__minlen, __traits_type::length(__names[__matches[__i2]])); - ++__beg, ++__pos; + ++__beg; + ++__pos; if (__pos < __minlen && __beg != __end) for (size_t __i3 = 0; __i3 < __nmatches;) { @@ -940,11 +961,12 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 if (__nmatches == 1) { // Make sure found name is completely extracted. - ++__beg, ++__pos; + ++__beg; + ++__pos; __name = __names[__matches[0]]; const size_t __len = __traits_type::length(__name); while (__pos < __len && __beg != __end && __name[__pos] == *__beg) - ++__beg, ++__pos; + ++__beg, (void)++__pos; if (__len == __pos) __member = __matches[0]; @@ -987,7 +1009,8 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 if (__nmatches) { - ++__beg, ++__pos; + ++__beg; + ++__pos; __matches_lengths = static_cast(__builtin_alloca(sizeof(size_t) @@ -997,7 +1020,7 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 = __traits_type::length(__names[__matches[__i]]); } - for (; __beg != __end; ++__beg, ++__pos) + for (; __beg != __end; ++__beg, (void)++__pos) { size_t __nskipped = 0; const char_type __c = *__beg; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/localefwd.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/localefwd.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/localefwd.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/localefwd.h index e9d795fda..ae302e26e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/localefwd.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/localefwd.h @@ -1,6 +1,6 @@ // Forward declarations -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/mask_array.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/mask_array.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/mask_array.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/mask_array.h index 5078f1736..5c4fcc676 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/mask_array.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/mask_array.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- mask_array class. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -136,8 +136,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - inline mask_array<_Tp>::mask_array(const mask_array<_Tp>& a) - : _M_sz(a._M_sz), _M_mask(a._M_mask), _M_array(a._M_array) {} + inline mask_array<_Tp>::mask_array(const mask_array<_Tp>& __a) + : _M_sz(__a._M_sz), _M_mask(__a._M_mask), _M_array(__a._M_array) {} template inline diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/memoryfwd.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/memoryfwd.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/memoryfwd.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/memoryfwd.h index bbee8d995..1429026c4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/memoryfwd.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/memoryfwd.h @@ -1,6 +1,6 @@ // Forward declarations -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/move.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/move.h similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/move.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/move.h index 1dfd667a7..5f47b0e7b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/move.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/move.h @@ -1,6 +1,6 @@ -// Move, forward and identity for C++0x + swap -*- C++ -*- +// Move, forward and identity for C++11 + swap -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -43,12 +43,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @ingroup utilities */ template - inline _Tp* + inline _GLIBCXX_CONSTEXPR _Tp* __addressof(_Tp& __r) _GLIBCXX_NOEXCEPT - { - return reinterpret_cast<_Tp*> - (&const_cast(reinterpret_cast(__r))); - } + { return __builtin_addressof(__r); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace @@ -123,6 +120,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // declval, from type_traits. +#if __cplusplus > 201402L + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2296. std::addressof should be constexpr +# define __cpp_lib_addressof_constexpr 201603 +#endif /** * @brief Returns the actual address of the object or function * referenced by r, even in the presence of an overloaded @@ -131,10 +133,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @return The actual address. */ template - inline _Tp* + inline _GLIBCXX17_CONSTEXPR _Tp* addressof(_Tp& __r) noexcept { return std::__addressof(__r); } + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2598. addressof works on temporaries + template + const _Tp* addressof(const _Tp&&) = delete; + // C++11 version of std::exchange for internal use. template inline _Tp @@ -172,11 +179,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @return Nothing. */ template - inline void - swap(_Tp& __a, _Tp& __b) + inline #if __cplusplus >= 201103L + typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, + is_move_constructible<_Tp>, + is_move_assignable<_Tp>>::value>::type + swap(_Tp& __a, _Tp& __b) noexcept(__and_, is_nothrow_move_assignable<_Tp>>::value) +#else + void + swap(_Tp& __a, _Tp& __b) #endif { // concept requirements @@ -191,10 +204,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // DR 809. std::swap should be overloaded for array types. /// Swap the contents of two arrays. template - inline void - swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + inline #if __cplusplus >= 201103L - noexcept(noexcept(swap(*__a, *__b))) + typename enable_if<__is_swappable<_Tp>::value>::type + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + noexcept(__is_nothrow_swappable<_Tp>::value) +#else + void + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) #endif { for (size_t __n = 0; __n < _Nm; ++__n) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/nested_exception.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/nested_exception.h similarity index 64% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/nested_exception.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/nested_exception.h index a716f75ad..43970b4ef 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/nested_exception.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/nested_exception.h @@ -1,6 +1,6 @@ // Nested Exception support header (nested_exception class) for -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -37,10 +37,7 @@ #else #include - -#if ATOMIC_INT_LOCK_FREE < 2 -# error This platform does not support exception propagation. -#endif +#include extern "C++" { @@ -91,41 +88,21 @@ namespace std { } }; - template - struct _Throw_with_nested_impl + // [except.nested]/8 + // Throw an exception of unspecified type that is publicly derived from + // both remove_reference_t<_Tp> and nested_exception. + template + inline void + __throw_with_nested_impl(_Tp&& __t, true_type) { - template - static void _S_throw(_Up&& __t) - { throw _Nested_exception<_Tp>{static_cast<_Up&&>(__t)}; } - }; + using _Up = typename remove_reference<_Tp>::type; + throw _Nested_exception<_Up>{std::forward<_Tp>(__t)}; + } template - struct _Throw_with_nested_impl<_Tp, false> - { - template - static void _S_throw(_Up&& __t) - { throw static_cast<_Up&&>(__t); } - }; - - template - struct _Throw_with_nested_helper : _Throw_with_nested_impl<_Tp> - { }; - - template - struct _Throw_with_nested_helper<_Tp, false> - : _Throw_with_nested_impl<_Tp, false> - { }; - - template - struct _Throw_with_nested_helper<_Tp&, false> - : _Throw_with_nested_helper<_Tp> - { }; - - template - struct _Throw_with_nested_helper<_Tp&&, false> - : _Throw_with_nested_helper<_Tp> - { }; + inline void + __throw_with_nested_impl(_Tp&& __t, false_type) + { throw std::forward<_Tp>(__t); } /// If @p __t is derived from nested_exception, throws @p __t. /// Else, throws an implementation-defined object derived from both. @@ -134,32 +111,43 @@ namespace std inline void throw_with_nested(_Tp&& __t) { - _Throw_with_nested_helper<_Tp>::_S_throw(static_cast<_Tp&&>(__t)); + using _Up = typename decay<_Tp>::type; + using _CopyConstructible + = __and_, is_move_constructible<_Up>>; + static_assert(_CopyConstructible::value, + "throw_with_nested argument must be CopyConstructible"); + using __nest = __and_, __bool_constant, + __not_>>; + std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{}); } - template - struct _Rethrow_if_nested_impl - { - static void _S_rethrow(const _Tp& __t) - { - if (auto __tp = dynamic_cast(&__t)) - __tp->rethrow_nested(); - } - }; - + // Determine if dynamic_cast would be well-formed. template - struct _Rethrow_if_nested_impl<_Tp, false> + using __rethrow_if_nested_cond = typename enable_if< + __and_, + __or_<__not_>, + is_convertible<_Tp*, nested_exception*>>>::value + >::type; + + // Attempt dynamic_cast to nested_exception and call rethrow_nested(). + template + inline __rethrow_if_nested_cond<_Ex> + __rethrow_if_nested_impl(const _Ex* __ptr) { - static void _S_rethrow(const _Tp&) { } - }; + if (auto __ne_ptr = dynamic_cast(__ptr)) + __ne_ptr->rethrow_nested(); + } + + // Otherwise, no effects. + inline void + __rethrow_if_nested_impl(const void*) + { } /// If @p __ex is derived from nested_exception, @p __ex.rethrow_nested(). template inline void rethrow_if_nested(const _Ex& __ex) - { - _Rethrow_if_nested_impl<_Ex>::_S_rethrow(__ex); - } + { std::__rethrow_if_nested_impl(std::__addressof(__ex)); } // @} group exceptions } // namespace std diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/node_handle.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/node_handle.h new file mode 100644 index 000000000..44a92644c --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/node_handle.h @@ -0,0 +1,328 @@ +// Node handles for containers -*- C++ -*- + +// Copyright (C) 2016-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/node_handle.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. + * @headername{map,set,unordered_map,unordered_set} + */ + +#ifndef _NODE_HANDLE +#define _NODE_HANDLE 1 + +#pragma GCC system_header + +#if __cplusplus > 201402L +# define __cpp_lib_node_extract 201606 + +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /// Base class for node handle types of maps and sets. + template + class _Node_handle_common + { + using _AllocTraits = allocator_traits<_NodeAlloc>; + + public: + using allocator_type = __alloc_rebind<_NodeAlloc, _Val>; + + allocator_type + get_allocator() const noexcept + { + __glibcxx_assert(!this->empty()); + return allocator_type(*_M_alloc); + } + + explicit operator bool() const noexcept { return _M_ptr != nullptr; } + + bool empty() const noexcept { return _M_ptr == nullptr; } + + protected: + constexpr _Node_handle_common() noexcept : _M_ptr(), _M_alloc() {} + + ~_Node_handle_common() { _M_destroy(); } + + _Node_handle_common(_Node_handle_common&& __nh) noexcept + : _M_ptr(__nh._M_ptr), _M_alloc(std::move(__nh._M_alloc)) + { + __nh._M_ptr = nullptr; + __nh._M_alloc = nullopt; + } + + _Node_handle_common& + operator=(_Node_handle_common&& __nh) noexcept + { + _M_destroy(); + _M_ptr = __nh._M_ptr; + if constexpr (is_move_assignable_v<_NodeAlloc>) + { + if (_AllocTraits::propagate_on_container_move_assignment::value + || !this->_M_alloc) + this->_M_alloc = std::move(__nh._M_alloc); + else + __glibcxx_assert(this->_M_alloc == __nh._M_alloc); + } + else + __glibcxx_assert(_M_alloc); + __nh._M_ptr = nullptr; + __nh._M_alloc = nullopt; + return *this; + } + + _Node_handle_common(typename _AllocTraits::pointer __ptr, + const _NodeAlloc& __alloc) + : _M_ptr(__ptr), _M_alloc(__alloc) { } + + void + _M_swap(_Node_handle_common& __nh) noexcept + { + using std::swap; + swap(_M_ptr, __nh._M_ptr); + if (_AllocTraits::propagate_on_container_swap + || !_M_alloc || !__nh._M_alloc) + _M_alloc.swap(__nh._M_alloc); + else + __glibcxx_assert(_M_alloc == __nh._M_alloc); + } + + private: + void + _M_destroy() noexcept + { + if (_M_ptr != nullptr) + { + allocator_type __alloc(*_M_alloc); + allocator_traits::destroy(__alloc, + _M_ptr->_M_valptr()); + _AllocTraits::deallocate(*_M_alloc, _M_ptr, 1); + } + } + + protected: + typename _AllocTraits::pointer _M_ptr; + private: + optional<_NodeAlloc> _M_alloc; + + template + friend class _Rb_tree; + }; + + /// Node handle type for maps. + template + class _Node_handle : public _Node_handle_common<_Value, _NodeAlloc> + { + public: + constexpr _Node_handle() noexcept = default; + ~_Node_handle() = default; + _Node_handle(_Node_handle&&) noexcept = default; + + _Node_handle& + operator=(_Node_handle&&) noexcept = default; + + using key_type = _Key; + using mapped_type = typename _Value::second_type; + + key_type& + key() const noexcept + { + __glibcxx_assert(!this->empty()); + return *_M_pkey; + } + + mapped_type& + mapped() const noexcept + { + __glibcxx_assert(!this->empty()); + return *_M_pmapped; + } + + void + swap(_Node_handle& __nh) noexcept + { + this->_M_swap(__nh); + using std::swap; + swap(_M_pkey, __nh._M_pkey); + swap(_M_pmapped, __nh._M_pmapped); + } + + friend void + swap(_Node_handle& __x, _Node_handle& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + private: + using _AllocTraits = allocator_traits<_NodeAlloc>; + + _Node_handle(typename _AllocTraits::pointer __ptr, + const _NodeAlloc& __alloc) + : _Node_handle_common<_Value, _NodeAlloc>(__ptr, __alloc) + { + if (__ptr) + { + auto& __key = const_cast<_Key&>(__ptr->_M_valptr()->first); + _M_pkey = _S_pointer_to(__key); + _M_pmapped = _S_pointer_to(__ptr->_M_valptr()->second); + } + else + { + _M_pkey = nullptr; + _M_pmapped = nullptr; + } + } + + template + using __pointer = __ptr_rebind; + + __pointer<_Key> _M_pkey = nullptr; + __pointer _M_pmapped = nullptr; + + template + __pointer<_Tp> + _S_pointer_to(_Tp& __obj) + { return pointer_traits<__pointer<_Tp>>::pointer_to(__obj); } + + const key_type& + _M_key() const noexcept { return key(); } + + template + friend class _Rb_tree; + + template + friend class _Hashtable; + }; + + /// Node handle type for sets. + template + class _Node_handle<_Value, _Value, _NodeAlloc> + : public _Node_handle_common<_Value, _NodeAlloc> + { + public: + constexpr _Node_handle() noexcept = default; + ~_Node_handle() = default; + _Node_handle(_Node_handle&&) noexcept = default; + + _Node_handle& + operator=(_Node_handle&&) noexcept = default; + + using value_type = _Value; + + value_type& + value() const noexcept + { + __glibcxx_assert(!this->empty()); + return *this->_M_ptr->_M_valptr(); + } + + void + swap(_Node_handle& __nh) noexcept + { this->_M_swap(__nh); } + + friend void + swap(_Node_handle& __x, _Node_handle& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + private: + using _AllocTraits = allocator_traits<_NodeAlloc>; + + _Node_handle(typename _AllocTraits::pointer __ptr, + const _NodeAlloc& __alloc) + : _Node_handle_common<_Value, _NodeAlloc>(__ptr, __alloc) { } + + const value_type& + _M_key() const noexcept { return value(); } + + template + friend class _Rb_tree; + + template + friend class _Hashtable; + }; + + /// Return type of insert(node_handle&&) on unique maps/sets. + template + struct _Node_insert_return + { + bool inserted = false; + _Iterator position = _Iterator(); + _NodeHandle node; + + template + decltype(auto) get() & + { return std::get<_Idx>(std::tie(inserted, position, node)); } + + template + decltype(auto) get() const & + { return std::get<_Idx>(std::tie(inserted, position, node)); } + + template + decltype(auto) get() && + { + return std::move(std::get<_Idx>(std::tie(inserted, position, node))); + } + + template + decltype(auto) get() const && + { + return std::move(std::get<_Idx>(std::tie(inserted, position, node))); + } + }; + + template + struct tuple_size<_Node_insert_return<_Iterator, _NodeHandle>> + : integral_constant { }; + + template + struct tuple_element<0, _Node_insert_return<_Iterator, _NodeHandle>> + { using type = bool; }; + + template + struct tuple_element<1, _Node_insert_return<_Iterator, _NodeHandle>> + { using type = _Iterator; }; + + template + struct tuple_element<2, _Node_insert_return<_Iterator, _NodeHandle>> + { using type = _NodeHandle; }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // C++17 +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ostream.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ostream.tcc similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ostream.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ostream.tcc index 50e7619c1..e96bad812 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ostream.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ostream.tcc @@ -1,6 +1,6 @@ // ostream classes -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ostream_insert.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ostream_insert.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ostream_insert.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ostream_insert.h index dd60145c9..8c9b941a1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/ostream_insert.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ostream_insert.h @@ -1,6 +1,6 @@ // Helpers for ostream inserters -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/parse_numbers.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/parse_numbers.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/parse_numbers.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/parse_numbers.h index 85ea4dbec..b82df7551 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/parse_numbers.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/parse_numbers.h @@ -1,6 +1,6 @@ // Components for compile-time parsing of numbers -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/postypes.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/postypes.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/postypes.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/postypes.h index 746bcb1c7..818086313 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/postypes.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/postypes.h @@ -1,6 +1,6 @@ // Position types -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -41,7 +41,7 @@ // XXX If is really needed, make sure to define the macros // before including it, in order not to break (and -// in C++0x). Reconsider all this as soon as possible... +// in C++11). Reconsider all this as soon as possible... #if (defined(_GLIBCXX_HAVE_INT64_T) && !defined(_GLIBCXX_HAVE_INT64_T_LONG) \ && !defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG)) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/predefined_ops.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/predefined_ops.h similarity index 75% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/predefined_ops.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/predefined_ops.h index 7178567c9..0624a38a1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/predefined_ops.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/predefined_ops.h @@ -1,6 +1,6 @@ // Default predicates for internal use -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -24,7 +24,7 @@ /** @file predefined_ops.h * This is an internal header file, included by other library headers. - * You should not attempt to use it directly. + * You should not attempt to use it directly. @headername{algorithm} */ #ifndef _GLIBCXX_PREDEFINED_OPS_H @@ -42,6 +42,7 @@ namespace __ops operator()(_Iterator1 __it1, _Iterator2 __it2) const { return *__it1 < *__it2; } }; + _GLIBCXX14_CONSTEXPR inline _Iter_less_iter __iter_less_iter() @@ -49,11 +50,20 @@ namespace __ops struct _Iter_less_val { +#if __cplusplus >= 201103L + constexpr _Iter_less_val() = default; +#else + _Iter_less_val() { } +#endif + + explicit + _Iter_less_val(_Iter_less_iter) { } + template bool operator()(_Iterator __it, _Value& __val) const { return *__it < __val; } - }; + }; inline _Iter_less_val __iter_less_val() @@ -65,11 +75,20 @@ namespace __ops struct _Val_less_iter { +#if __cplusplus >= 201103L + constexpr _Val_less_iter() = default; +#else + _Val_less_iter() { } +#endif + + explicit + _Val_less_iter(_Iter_less_iter) { } + template bool operator()(_Value& __val, _Iterator __it) const { return __val < *__it; } - }; + }; inline _Val_less_iter __val_less_iter() @@ -85,7 +104,7 @@ namespace __ops bool operator()(_Iterator1 __it1, _Iterator2 __it2) const { return *__it1 == *__it2; } - }; + }; inline _Iter_equal_to_iter __iter_equal_to_iter() @@ -97,7 +116,7 @@ namespace __ops bool operator()(_Iterator __it, _Value& __val) const { return *__it == __val; } - }; + }; inline _Iter_equal_to_val __iter_equal_to_val() @@ -111,9 +130,10 @@ namespace __ops struct _Iter_comp_iter { _Compare _M_comp; - _GLIBCXX14_CONSTEXPR + + explicit _GLIBCXX14_CONSTEXPR _Iter_comp_iter(_Compare __comp) - : _M_comp(__comp) + : _M_comp(_GLIBCXX_MOVE(__comp)) { } template @@ -127,17 +147,30 @@ namespace __ops _GLIBCXX14_CONSTEXPR inline _Iter_comp_iter<_Compare> __iter_comp_iter(_Compare __comp) - { return _Iter_comp_iter<_Compare>(__comp); } + { return _Iter_comp_iter<_Compare>(_GLIBCXX_MOVE(__comp)); } template struct _Iter_comp_val { _Compare _M_comp; + explicit _Iter_comp_val(_Compare __comp) - : _M_comp(__comp) + : _M_comp(_GLIBCXX_MOVE(__comp)) { } + explicit + _Iter_comp_val(const _Iter_comp_iter<_Compare>& __comp) + : _M_comp(__comp._M_comp) + { } + +#if __cplusplus >= 201103L + explicit + _Iter_comp_val(_Iter_comp_iter<_Compare>&& __comp) + : _M_comp(std::move(__comp._M_comp)) + { } +#endif + template bool operator()(_Iterator __it, _Value& __val) @@ -147,22 +180,35 @@ namespace __ops template inline _Iter_comp_val<_Compare> __iter_comp_val(_Compare __comp) - { return _Iter_comp_val<_Compare>(__comp); } + { return _Iter_comp_val<_Compare>(_GLIBCXX_MOVE(__comp)); } template inline _Iter_comp_val<_Compare> __iter_comp_val(_Iter_comp_iter<_Compare> __comp) - { return _Iter_comp_val<_Compare>(__comp._M_comp); } + { return _Iter_comp_val<_Compare>(_GLIBCXX_MOVE(__comp)); } template struct _Val_comp_iter { _Compare _M_comp; + explicit _Val_comp_iter(_Compare __comp) - : _M_comp(__comp) + : _M_comp(_GLIBCXX_MOVE(__comp)) { } + explicit + _Val_comp_iter(const _Iter_comp_iter<_Compare>& __comp) + : _M_comp(__comp._M_comp) + { } + +#if __cplusplus >= 201103L + explicit + _Val_comp_iter(_Iter_comp_iter<_Compare>&& __comp) + : _M_comp(std::move(__comp._M_comp)) + { } +#endif + template bool operator()(_Value& __val, _Iterator __it) @@ -172,18 +218,19 @@ namespace __ops template inline _Val_comp_iter<_Compare> __val_comp_iter(_Compare __comp) - { return _Val_comp_iter<_Compare>(__comp); } + { return _Val_comp_iter<_Compare>(_GLIBCXX_MOVE(__comp)); } template inline _Val_comp_iter<_Compare> __val_comp_iter(_Iter_comp_iter<_Compare> __comp) - { return _Val_comp_iter<_Compare>(__comp._M_comp); } + { return _Val_comp_iter<_Compare>(_GLIBCXX_MOVE(__comp)); } template struct _Iter_equals_val { _Value& _M_value; + explicit _Iter_equals_val(_Value& __value) : _M_value(__value) { } @@ -202,16 +249,17 @@ namespace __ops template struct _Iter_equals_iter { - typename std::iterator_traits<_Iterator1>::reference _M_ref; + _Iterator1 _M_it1; + explicit _Iter_equals_iter(_Iterator1 __it1) - : _M_ref(*__it1) + : _M_it1(__it1) { } template bool operator()(_Iterator2 __it2) - { return *__it2 == _M_ref; } + { return *__it2 == *_M_it1; } }; template @@ -224,8 +272,9 @@ namespace __ops { _Predicate _M_pred; + explicit _Iter_pred(_Predicate __pred) - : _M_pred(__pred) + : _M_pred(_GLIBCXX_MOVE(__pred)) { } template @@ -237,7 +286,7 @@ namespace __ops template inline _Iter_pred<_Predicate> __pred_iter(_Predicate __pred) - { return _Iter_pred<_Predicate>(__pred); } + { return _Iter_pred<_Predicate>(_GLIBCXX_MOVE(__pred)); } template struct _Iter_comp_to_val @@ -246,7 +295,7 @@ namespace __ops _Value& _M_value; _Iter_comp_to_val(_Compare __comp, _Value& __value) - : _M_comp(__comp), _M_value(__value) + : _M_comp(_GLIBCXX_MOVE(__comp)), _M_value(__value) { } template @@ -258,36 +307,42 @@ namespace __ops template _Iter_comp_to_val<_Compare, _Value> __iter_comp_val(_Compare __comp, _Value &__val) - { return _Iter_comp_to_val<_Compare, _Value>(__comp, __val); } + { + return _Iter_comp_to_val<_Compare, _Value>(_GLIBCXX_MOVE(__comp), __val); + } template struct _Iter_comp_to_iter { _Compare _M_comp; - typename std::iterator_traits<_Iterator1>::reference _M_ref; + _Iterator1 _M_it1; _Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1) - : _M_comp(__comp), _M_ref(*__it1) + : _M_comp(_GLIBCXX_MOVE(__comp)), _M_it1(__it1) { } template bool operator()(_Iterator2 __it2) - { return bool(_M_comp(*__it2, _M_ref)); } + { return bool(_M_comp(*__it2, *_M_it1)); } }; template inline _Iter_comp_to_iter<_Compare, _Iterator> __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it) - { return _Iter_comp_to_iter<_Compare, _Iterator>(__comp._M_comp, __it); } + { + return _Iter_comp_to_iter<_Compare, _Iterator>( + _GLIBCXX_MOVE(__comp._M_comp), __it); + } template struct _Iter_negate { _Predicate _M_pred; + explicit _Iter_negate(_Predicate __pred) - : _M_pred(__pred) + : _M_pred(_GLIBCXX_MOVE(__pred)) { } template @@ -299,7 +354,7 @@ namespace __ops template inline _Iter_negate<_Predicate> __negate(_Iter_pred<_Predicate> __pred) - { return _Iter_negate<_Predicate>(__pred._M_pred); } + { return _Iter_negate<_Predicate>(_GLIBCXX_MOVE(__pred._M_pred)); } } // namespace __ops } // namespace __gnu_cxx diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ptr_traits.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ptr_traits.h new file mode 100644 index 000000000..797e7fcec --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/ptr_traits.h @@ -0,0 +1,154 @@ +// Pointer Traits -*- C++ -*- + +// Copyright (C) 2011-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/ptr_traits.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{memory} + */ + +#ifndef _PTR_TRAITS_H +#define _PTR_TRAITS_H 1 + +#if __cplusplus >= 201103L + +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + class __undefined; + + // Given Template return T, otherwise invalid. + template + struct __get_first_arg + { using type = __undefined; }; + + template class _Template, typename _Tp, + typename... _Types> + struct __get_first_arg<_Template<_Tp, _Types...>> + { using type = _Tp; }; + + template + using __get_first_arg_t = typename __get_first_arg<_Tp>::type; + + // Given Template and U return Template, otherwise invalid. + template + struct __replace_first_arg + { }; + + template class _Template, typename _Up, + typename _Tp, typename... _Types> + struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> + { using type = _Template<_Up, _Types...>; }; + + template + using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type; + + template + using __make_not_void + = typename conditional::value, __undefined, _Tp>::type; + + /** + * @brief Uniform interface to all pointer-like types + * @ingroup pointer_abstractions + */ + template + struct pointer_traits + { + private: + template + using __element_type = typename _Tp::element_type; + + template + using __difference_type = typename _Tp::difference_type; + + template + struct __rebind : __replace_first_arg<_Tp, _Up> { }; + + template + struct __rebind<_Tp, _Up, __void_t>> + { using type = typename _Tp::template rebind<_Up>; }; + + public: + /// The pointer type. + using pointer = _Ptr; + + /// The type pointed to. + using element_type + = __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>; + + /// The type used to represent the difference between two pointers. + using difference_type + = __detected_or_t; + + /// A pointer to a different type. + template + using rebind = typename __rebind<_Ptr, _Up>::type; + + static _Ptr + pointer_to(__make_not_void& __e) + { return _Ptr::pointer_to(__e); } + + static_assert(!is_same::value, + "pointer type defines element_type or is like SomePointer"); + }; + + /** + * @brief Partial specialization for built-in pointers. + * @ingroup pointer_abstractions + */ + template + struct pointer_traits<_Tp*> + { + /// The pointer type + typedef _Tp* pointer; + /// The type pointed to + typedef _Tp element_type; + /// Type used to represent the difference between two pointers + typedef ptrdiff_t difference_type; + + template + using rebind = _Up*; + + /** + * @brief Obtain a pointer to an object + * @param __r A reference to an object of type @c element_type + * @return @c addressof(__r) + */ + static pointer + pointer_to(__make_not_void& __r) noexcept + { return std::addressof(__r); } + }; + + /// Convenience alias for rebinding pointers. + template + using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/quoted_string.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/quoted_string.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/quoted_string.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/quoted_string.h index 7e75ce4b9..10cfec211 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/quoted_string.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/quoted_string.h @@ -1,6 +1,6 @@ // Helpers for quoted stream manipulators -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/random.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/random.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/random.h index 8caade508..d39cc3e06 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/random.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/random.h @@ -1,6 +1,6 @@ // random number generation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -32,6 +32,7 @@ #define _RANDOM_H 1 #include +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -149,14 +150,6 @@ _GLIBCXX_END_NAMESPACE_VERSION __mod(_Tp __x) { return _Mod<_Tp, __m, __a, __c>::__calc(__x); } - /* Determine whether number is a power of 2. */ - template - inline bool - _Power_of_2(_Tp __x) - { - return ((__x - 1) & __x) == 0; - }; - /* * An adaptor class for converting the output of any Generator into * the input for a specific Distribution. @@ -165,7 +158,7 @@ _GLIBCXX_END_NAMESPACE_VERSION struct _Adaptor { static_assert(std::is_floating_point<_DInputType>::value, - "template argument not a floating point type"); + "template argument must be a floating point type"); public: _Adaptor(_Engine& __g) @@ -242,8 +235,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template class linear_congruential_engine { - static_assert(std::is_unsigned<_UIntType>::value, "template argument " - "substituting _UIntType not an unsigned integral type"); + static_assert(std::is_unsigned<_UIntType>::value, + "result_type must be an unsigned integral type"); static_assert(__m == 0u || (__a < __m && __c < __m), "template argument substituting __m out of bounds"); @@ -450,8 +443,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UIntType __c, size_t __l, _UIntType __f> class mersenne_twister_engine { - static_assert(std::is_unsigned<_UIntType>::value, "template argument " - "substituting _UIntType not an unsigned integral type"); + static_assert(std::is_unsigned<_UIntType>::value, + "result_type must be an unsigned integral type"); static_assert(1u <= __m && __m <= __n, "template argument substituting __m out of bounds"); static_assert(__r <= __w, "template argument substituting " @@ -665,10 +658,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template class subtract_with_carry_engine { - static_assert(std::is_unsigned<_UIntType>::value, "template argument " - "substituting _UIntType not an unsigned integral type"); + static_assert(std::is_unsigned<_UIntType>::value, + "result_type must be an unsigned integral type"); static_assert(0u < __s && __s < __r, - "template argument substituting __s out of bounds"); + "0 < s < r"); static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits, "template argument substituting __w out of bounds"); @@ -1072,8 +1065,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template class independent_bits_engine { - static_assert(std::is_unsigned<_UIntType>::value, "template argument " - "substituting _UIntType not an unsigned integral type"); + static_assert(std::is_unsigned<_UIntType>::value, + "result_type must be an unsigned integral type"); static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits, "template argument substituting __w out of bounds"); @@ -1285,7 +1278,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Produces random numbers by combining random numbers from some * base engine to produce random numbers with a specifies number of bits - * @p __w. + * @p __k. */ template class shuffle_order_engine @@ -1656,164 +1649,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @{ */ - /** - * @brief Uniform discrete distribution for random numbers. - * A discrete random distribution on the range @f$[min, max]@f$ with equal - * probability throughout the range. - */ - template - class uniform_int_distribution - { - static_assert(std::is_integral<_IntType>::value, - "template argument not an integral type"); - - public: - /** The type of the range of the distribution. */ - typedef _IntType result_type; - /** Parameter type. */ - struct param_type - { - typedef uniform_int_distribution<_IntType> distribution_type; - - explicit - param_type(_IntType __a = 0, - _IntType __b = std::numeric_limits<_IntType>::max()) - : _M_a(__a), _M_b(__b) - { - _GLIBCXX_DEBUG_ASSERT(_M_a <= _M_b); - } - - result_type - a() const - { return _M_a; } - - result_type - b() const - { return _M_b; } - - friend bool - operator==(const param_type& __p1, const param_type& __p2) - { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } - - private: - _IntType _M_a; - _IntType _M_b; - }; - - public: - /** - * @brief Constructs a uniform distribution object. - */ - explicit - uniform_int_distribution(_IntType __a = 0, - _IntType __b = std::numeric_limits<_IntType>::max()) - : _M_param(__a, __b) - { } - - explicit - uniform_int_distribution(const param_type& __p) - : _M_param(__p) - { } - - /** - * @brief Resets the distribution state. - * - * Does nothing for the uniform integer distribution. - */ - void - reset() { } - - result_type - a() const - { return _M_param.a(); } - - result_type - b() const - { return _M_param.b(); } - - /** - * @brief Returns the parameter set of the distribution. - */ - param_type - param() const - { return _M_param; } - - /** - * @brief Sets the parameter set of the distribution. - * @param __param The new parameter set of the distribution. - */ - void - param(const param_type& __param) - { _M_param = __param; } - - /** - * @brief Returns the inclusive lower bound of the distribution range. - */ - result_type - min() const - { return this->a(); } - - /** - * @brief Returns the inclusive upper bound of the distribution range. - */ - result_type - max() const - { return this->b(); } - - /** - * @brief Generating functions. - */ - template - result_type - operator()(_UniformRandomNumberGenerator& __urng) - { return this->operator()(__urng, _M_param); } - - template - result_type - operator()(_UniformRandomNumberGenerator& __urng, - const param_type& __p); - - template - void - __generate(_ForwardIterator __f, _ForwardIterator __t, - _UniformRandomNumberGenerator& __urng) - { this->__generate(__f, __t, __urng, _M_param); } - - template - void - __generate(_ForwardIterator __f, _ForwardIterator __t, - _UniformRandomNumberGenerator& __urng, - const param_type& __p) - { this->__generate_impl(__f, __t, __urng, __p); } - - template - void - __generate(result_type* __f, result_type* __t, - _UniformRandomNumberGenerator& __urng, - const param_type& __p) - { this->__generate_impl(__f, __t, __urng, __p); } - - /** - * @brief Return true if two uniform integer distributions have - * the same parameters. - */ - friend bool - operator==(const uniform_int_distribution& __d1, - const uniform_int_distribution& __d2) - { return __d1._M_param == __d2._M_param; } - - private: - template - void - __generate_impl(_ForwardIterator __f, _ForwardIterator __t, - _UniformRandomNumberGenerator& __urng, - const param_type& __p); - - param_type _M_param; - }; + // std::uniform_int_distribution is defined in /** * @brief Return true if two uniform integer distributions have @@ -1866,11 +1702,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class uniform_real_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -1881,7 +1718,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RealType __b = _RealType(1)) : _M_a(__a), _M_b(__b) { - _GLIBCXX_DEBUG_ASSERT(_M_a <= _M_b); + __glibcxx_assert(_M_a <= _M_b); } result_type @@ -1896,6 +1733,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _RealType _M_a; _RealType _M_b; @@ -2084,11 +1925,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class normal_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -2099,7 +1941,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RealType __stddev = _RealType(1)) : _M_mean(__mean), _M_stddev(__stddev) { - _GLIBCXX_DEBUG_ASSERT(_M_stddev > _RealType(0)); + __glibcxx_assert(_M_stddev > _RealType(0)); } _RealType @@ -2115,6 +1957,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return (__p1._M_mean == __p2._M_mean && __p1._M_stddev == __p2._M_stddev); } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _RealType _M_mean; _RealType _M_stddev; @@ -2297,11 +2143,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class lognormal_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -2325,6 +2172,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_m == __p2._M_m && __p1._M_s == __p2._M_s; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _RealType _M_m; _RealType _M_s; @@ -2501,11 +2352,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class gamma_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -2517,7 +2369,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RealType __beta_val = _RealType(1)) : _M_alpha(__alpha_val), _M_beta(__beta_val) { - _GLIBCXX_DEBUG_ASSERT(_M_alpha > _RealType(0)); + __glibcxx_assert(_M_alpha > _RealType(0)); _M_initialize(); } @@ -2534,6 +2386,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return (__p1._M_alpha == __p2._M_alpha && __p1._M_beta == __p2._M_beta); } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: void _M_initialize(); @@ -2718,11 +2574,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class chi_squared_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -2741,6 +2598,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_n == __p2._M_n; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _RealType _M_n; }; @@ -2928,11 +2789,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class cauchy_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -2956,6 +2818,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _RealType _M_a; _RealType _M_b; @@ -3129,11 +2995,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class fisher_f_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -3157,6 +3024,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_m == __p2._M_m && __p1._M_n == __p2._M_n; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _RealType _M_m; _RealType _M_n; @@ -3353,11 +3224,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class student_t_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -3376,6 +3248,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_n == __p2._M_n; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _RealType _M_n; }; @@ -3573,6 +3449,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef bool result_type; + /** Parameter type. */ struct param_type { @@ -3582,7 +3459,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION param_type(double __p = 0.5) : _M_p(__p) { - _GLIBCXX_DEBUG_ASSERT((_M_p >= 0.0) && (_M_p <= 1.0)); + __glibcxx_assert((_M_p >= 0.0) && (_M_p <= 1.0)); } double @@ -3593,6 +3470,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_p == __p2._M_p; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: double _M_p; }; @@ -3776,11 +3657,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class binomial_distribution { static_assert(std::is_integral<_IntType>::value, - "template argument not an integral type"); + "result_type must be an integral type"); public: /** The type of the range of the distribution. */ typedef _IntType result_type; + /** Parameter type. */ struct param_type { @@ -3791,7 +3673,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION param_type(_IntType __t = _IntType(1), double __p = 0.5) : _M_t(__t), _M_p(__p) { - _GLIBCXX_DEBUG_ASSERT((_M_t >= _IntType(0)) + __glibcxx_assert((_M_t >= _IntType(0)) && (_M_p >= 0.0) && (_M_p <= 1.0)); _M_initialize(); @@ -3809,6 +3691,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_t == __p2._M_t && __p1._M_p == __p2._M_p; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: void _M_initialize(); @@ -4007,11 +3893,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class geometric_distribution { static_assert(std::is_integral<_IntType>::value, - "template argument not an integral type"); + "result_type must be an integral type"); public: /** The type of the range of the distribution. */ typedef _IntType result_type; + /** Parameter type. */ struct param_type { @@ -4022,7 +3909,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION param_type(double __p = 0.5) : _M_p(__p) { - _GLIBCXX_DEBUG_ASSERT((_M_p > 0.0) && (_M_p < 1.0)); + __glibcxx_assert((_M_p > 0.0) && (_M_p < 1.0)); _M_initialize(); } @@ -4034,6 +3921,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_p == __p2._M_p; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: void _M_initialize() @@ -4207,11 +4098,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class negative_binomial_distribution { static_assert(std::is_integral<_IntType>::value, - "template argument not an integral type"); + "result_type must be an integral type"); public: /** The type of the range of the distribution. */ typedef _IntType result_type; + /** Parameter type. */ struct param_type { @@ -4221,7 +4113,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION param_type(_IntType __k = 1, double __p = 0.5) : _M_k(__k), _M_p(__p) { - _GLIBCXX_DEBUG_ASSERT((_M_k > 0) && (_M_p > 0.0) && (_M_p <= 1.0)); + __glibcxx_assert((_M_k > 0) && (_M_p > 0.0) && (_M_p <= 1.0)); } _IntType @@ -4236,6 +4128,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_k == __p2._M_k && __p1._M_p == __p2._M_p; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _IntType _M_k; double _M_p; @@ -4429,11 +4325,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class poisson_distribution { static_assert(std::is_integral<_IntType>::value, - "template argument not an integral type"); + "result_type must be an integral type"); public: /** The type of the range of the distribution. */ typedef _IntType result_type; + /** Parameter type. */ struct param_type { @@ -4444,7 +4341,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION param_type(double __mean = 1.0) : _M_mean(__mean) { - _GLIBCXX_DEBUG_ASSERT(_M_mean > 0.0); + __glibcxx_assert(_M_mean > 0.0); _M_initialize(); } @@ -4456,6 +4353,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_mean == __p2._M_mean; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: // Hosts either log(mean) or the threshold of the simple method. void @@ -4645,11 +4546,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class exponential_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -4659,7 +4561,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION param_type(_RealType __lambda = _RealType(1)) : _M_lambda(__lambda) { - _GLIBCXX_DEBUG_ASSERT(_M_lambda > _RealType(0)); + __glibcxx_assert(_M_lambda > _RealType(0)); } _RealType @@ -4670,6 +4572,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_lambda == __p2._M_lambda; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _RealType _M_lambda; }; @@ -4847,11 +4753,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class weibull_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -4875,6 +4782,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _RealType _M_a; _RealType _M_b; @@ -5050,11 +4961,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class extreme_value_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -5078,6 +4990,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: _RealType _M_a; _RealType _M_b; @@ -5250,11 +5166,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class discrete_distribution { static_assert(std::is_integral<_IntType>::value, - "template argument not an integral type"); + "result_type must be an integral type"); public: /** The type of the range of the distribution. */ typedef _IntType result_type; + /** Parameter type. */ struct param_type { @@ -5291,6 +5208,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_prob == __p2._M_prob; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: void _M_initialize(); @@ -5480,11 +5401,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class piecewise_constant_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -5532,6 +5454,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: void _M_initialize(); @@ -5747,11 +5673,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class piecewise_linear_distribution { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "result_type must be a floating point type"); public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -5797,8 +5724,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend bool operator==(const param_type& __p1, const param_type& __p2) - { return (__p1._M_int == __p2._M_int - && __p1._M_den == __p2._M_den); } + { return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } private: void @@ -6023,13 +5953,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ class seed_seq { - public: /** The type of the seed vales. */ typedef uint_least32_t result_type; /** Default constructor. */ - seed_seq() + seed_seq() noexcept : _M_v() { } @@ -6045,7 +5974,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION generate(_RandomAccessIterator __begin, _RandomAccessIterator __end); // property functions - size_t size() const + size_t size() const noexcept { return _M_v.size(); } template @@ -6053,8 +5982,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION param(OutputIterator __dest) const { std::copy(_M_v.begin(), _M_v.end(), __dest); } + // no copy functions + seed_seq(const seed_seq&) = delete; + seed_seq& operator=(const seed_seq&) = delete; + private: - /// std::vector _M_v; }; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/random.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/random.tcc similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/random.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/random.tcc index f10d052f9..df05ebea6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/random.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/random.tcc @@ -1,6 +1,6 @@ // random number generation (out of line) -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -872,158 +872,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } - template - template - typename uniform_int_distribution<_IntType>::result_type - uniform_int_distribution<_IntType>:: - operator()(_UniformRandomNumberGenerator& __urng, - const param_type& __param) - { - typedef typename _UniformRandomNumberGenerator::result_type - _Gresult_type; - typedef typename std::make_unsigned::type __utype; - typedef typename std::common_type<_Gresult_type, __utype>::type - __uctype; - - const __uctype __urngmin = __urng.min(); - const __uctype __urngmax = __urng.max(); - const __uctype __urngrange = __urngmax - __urngmin; - const __uctype __urange - = __uctype(__param.b()) - __uctype(__param.a()); - - __uctype __ret; - - if (__urngrange > __urange) - { - // downscaling - const __uctype __uerange = __urange + 1; // __urange can be zero - const __uctype __scaling = __urngrange / __uerange; - const __uctype __past = __uerange * __scaling; - do - __ret = __uctype(__urng()) - __urngmin; - while (__ret >= __past); - __ret /= __scaling; - } - else if (__urngrange < __urange) - { - // upscaling - /* - Note that every value in [0, urange] - can be written uniquely as - - (urngrange + 1) * high + low - - where - - high in [0, urange / (urngrange + 1)] - - and - - low in [0, urngrange]. - */ - __uctype __tmp; // wraparound control - do - { - const __uctype __uerngrange = __urngrange + 1; - __tmp = (__uerngrange * operator() - (__urng, param_type(0, __urange / __uerngrange))); - __ret = __tmp + (__uctype(__urng()) - __urngmin); - } - while (__ret > __urange || __ret < __tmp); - } - else - __ret = __uctype(__urng()) - __urngmin; - - return __ret + __param.a(); - } - - - template - template - void - uniform_int_distribution<_IntType>:: - __generate_impl(_ForwardIterator __f, _ForwardIterator __t, - _UniformRandomNumberGenerator& __urng, - const param_type& __param) - { - __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) - typedef typename _UniformRandomNumberGenerator::result_type - _Gresult_type; - typedef typename std::make_unsigned::type __utype; - typedef typename std::common_type<_Gresult_type, __utype>::type - __uctype; - - const __uctype __urngmin = __urng.min(); - const __uctype __urngmax = __urng.max(); - const __uctype __urngrange = __urngmax - __urngmin; - const __uctype __urange - = __uctype(__param.b()) - __uctype(__param.a()); - - __uctype __ret; - - if (__urngrange > __urange) - { - if (__detail::_Power_of_2(__urngrange + 1) - && __detail::_Power_of_2(__urange + 1)) - { - while (__f != __t) - { - __ret = __uctype(__urng()) - __urngmin; - *__f++ = (__ret & __urange) + __param.a(); - } - } - else - { - // downscaling - const __uctype __uerange = __urange + 1; // __urange can be zero - const __uctype __scaling = __urngrange / __uerange; - const __uctype __past = __uerange * __scaling; - while (__f != __t) - { - do - __ret = __uctype(__urng()) - __urngmin; - while (__ret >= __past); - *__f++ = __ret / __scaling + __param.a(); - } - } - } - else if (__urngrange < __urange) - { - // upscaling - /* - Note that every value in [0, urange] - can be written uniquely as - - (urngrange + 1) * high + low - - where - - high in [0, urange / (urngrange + 1)] - - and - - low in [0, urngrange]. - */ - __uctype __tmp; // wraparound control - while (__f != __t) - { - do - { - const __uctype __uerngrange = __urngrange + 1; - __tmp = (__uerngrange * operator() - (__urng, param_type(0, __urange / __uerngrange))); - __ret = __tmp + (__uctype(__urng()) - __urngmin); - } - while (__ret > __urange || __ret < __tmp); - *__f++ = __ret; - } - } - else - while (__f != __t) - *__f++ = __uctype(__urng()) - __urngmin + __param.a(); - } - template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, @@ -1405,7 +1253,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const double __pi_4 = 0.7853981633974483096156608458198757L; const double __dx = std::sqrt(2 * __m * std::log(32 * __m / __pi_4)); - _M_d = std::round(std::max(6.0, std::min(__m, __dx))); + _M_d = std::round(std::max(6.0, std::min(__m, __dx))); const double __cx = 2 * __m + _M_d; _M_scx = std::sqrt(__cx / 2); _M_1cx = 1 / __cx; @@ -1613,11 +1461,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const double __d1x = std::sqrt(__np * __1p * std::log(32 * __np / (81 * __pi_4 * __1p))); - _M_d1 = std::round(std::max(1.0, __d1x)); + _M_d1 = std::round(std::max(1.0, __d1x)); const double __d2x = std::sqrt(__np * __1p * std::log(32 * _M_t * __1p / (__pi_4 * __pa))); - _M_d2 = std::round(std::max(1.0, __d2x)); + _M_d2 = std::round(std::max(1.0, __d2x)); // sqrt(pi / 2) const double __spi_2 = 1.2533141373155002512078826424055226L; @@ -3464,7 +3312,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION generate_canonical(_UniformRandomNumberGenerator& __urng) { static_assert(std::is_floating_point<_RealType>::value, - "template argument not a floating point type"); + "template argument must be a floating point type"); const size_t __b = std::min(static_cast(std::numeric_limits<_RealType>::digits), @@ -3472,15 +3320,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const long double __r = static_cast(__urng.max()) - static_cast(__urng.min()) + 1.0L; const size_t __log2r = std::log(__r) / std::log(2.0L); - size_t __k = std::max(1UL, (__b + __log2r - 1UL) / __log2r); + const size_t __m = std::max(1UL, + (__b + __log2r - 1UL) / __log2r); + _RealType __ret; _RealType __sum = _RealType(0); _RealType __tmp = _RealType(1); - for (; __k != 0; --__k) + for (size_t __k = __m; __k != 0; --__k) { __sum += _RealType(__urng() - __urng.min()) * __tmp; __tmp *= __r; } - return __sum / __tmp; + __ret = __sum / __tmp; + if (__builtin_expect(__ret >= _RealType(1), 0)) + { +#if _GLIBCXX_USE_C99_MATH_TR1 + __ret = std::nextafter(_RealType(1), _RealType(0)); +#else + __ret = _RealType(1) + - std::numeric_limits<_RealType>::epsilon() / _RealType(2); +#endif + } + return __ret; } _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/range_access.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/range_access.h similarity index 64% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/range_access.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/range_access.h index 89dc4d6e1..3987c2add 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/range_access.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/range_access.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -43,8 +43,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the container. * @param __cont Container. */ - template - inline auto + template + inline _GLIBCXX17_CONSTEXPR auto begin(_Container& __cont) -> decltype(__cont.begin()) { return __cont.begin(); } @@ -53,8 +53,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the const container. * @param __cont Container. */ - template - inline auto + template + inline _GLIBCXX17_CONSTEXPR auto begin(const _Container& __cont) -> decltype(__cont.begin()) { return __cont.begin(); } @@ -63,8 +63,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the container. * @param __cont Container. */ - template - inline auto + template + inline _GLIBCXX17_CONSTEXPR auto end(_Container& __cont) -> decltype(__cont.end()) { return __cont.end(); } @@ -73,8 +73,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the const container. * @param __cont Container. */ - template - inline auto + template + inline _GLIBCXX17_CONSTEXPR auto end(const _Container& __cont) -> decltype(__cont.end()) { return __cont.end(); } @@ -82,7 +82,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @brief Return an iterator pointing to the first element of the array. * @param __arr Array. */ - template + template inline _GLIBCXX14_CONSTEXPR _Tp* begin(_Tp (&__arr)[_Nm]) { return __arr; } @@ -92,7 +92,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * of the array. * @param __arr Array. */ - template + template inline _GLIBCXX14_CONSTEXPR _Tp* end(_Tp (&__arr)[_Nm]) { return __arr + _Nm; } @@ -111,7 +111,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the const container. * @param __cont Container. */ - template + template inline constexpr auto cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont))) -> decltype(std::begin(__cont)) @@ -122,7 +122,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the const container. * @param __cont Container. */ - template + template inline constexpr auto cend(const _Container& __cont) noexcept(noexcept(std::end(__cont))) -> decltype(std::end(__cont)) @@ -133,8 +133,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the container. * @param __cont Container. */ - template - inline auto + template + inline _GLIBCXX17_CONSTEXPR auto rbegin(_Container& __cont) -> decltype(__cont.rbegin()) { return __cont.rbegin(); } @@ -143,8 +143,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the const container. * @param __cont Container. */ - template - inline auto + template + inline _GLIBCXX17_CONSTEXPR auto rbegin(const _Container& __cont) -> decltype(__cont.rbegin()) { return __cont.rbegin(); } @@ -153,8 +153,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the container. * @param __cont Container. */ - template - inline auto + template + inline _GLIBCXX17_CONSTEXPR auto rend(_Container& __cont) -> decltype(__cont.rend()) { return __cont.rend(); } @@ -163,8 +163,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the const container. * @param __cont Container. */ - template - inline auto + template + inline _GLIBCXX17_CONSTEXPR auto rend(const _Container& __cont) -> decltype(__cont.rend()) { return __cont.rend(); } @@ -173,8 +173,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the array. * @param __arr Array. */ - template - inline reverse_iterator<_Tp*> + template + inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Tp*> rbegin(_Tp (&__arr)[_Nm]) { return reverse_iterator<_Tp*>(__arr + _Nm); } @@ -183,8 +183,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the array. * @param __arr Array. */ - template - inline reverse_iterator<_Tp*> + template + inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Tp*> rend(_Tp (&__arr)[_Nm]) { return reverse_iterator<_Tp*>(__arr); } @@ -193,8 +193,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the initializer_list. * @param __il initializer_list. */ - template - inline reverse_iterator + template + inline _GLIBCXX17_CONSTEXPR reverse_iterator rbegin(initializer_list<_Tp> __il) { return reverse_iterator(__il.end()); } @@ -203,8 +203,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the initializer_list. * @param __il initializer_list. */ - template - inline reverse_iterator + template + inline _GLIBCXX17_CONSTEXPR reverse_iterator rend(initializer_list<_Tp> __il) { return reverse_iterator(__il.begin()); } @@ -213,8 +213,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the const container. * @param __cont Container. */ - template - inline auto + template + inline _GLIBCXX17_CONSTEXPR auto crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont)) { return std::rbegin(__cont); } @@ -223,13 +223,99 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the const container. * @param __cont Container. */ - template - inline auto + template + inline _GLIBCXX17_CONSTEXPR auto crend(const _Container& __cont) -> decltype(std::rend(__cont)) { return std::rend(__cont); } #endif // C++14 +#if __cplusplus > 201402L +#define __cpp_lib_nonmember_container_access 201411 + + /** + * @brief Return the size of a container. + * @param __cont Container. + */ + template + constexpr auto + size(const _Container& __cont) -> decltype(__cont.size()) + { return __cont.size(); } + + /** + * @brief Return the size of an array. + * @param __array Array. + */ + template + constexpr size_t + size(const _Tp (&/*__array*/)[_Nm]) noexcept + { return _Nm; } + + /** + * @brief Return whether a container is empty. + * @param __cont Container. + */ + template + constexpr auto + empty(const _Container& __cont) -> decltype(__cont.empty()) + { return __cont.empty(); } + + /** + * @brief Return whether an array is empty (always false). + * @param __array Container. + */ + template + constexpr bool + empty(const _Tp (&/*__array*/)[_Nm]) noexcept + { return false; } + + /** + * @brief Return whether an initializer_list is empty. + * @param __il Initializer list. + */ + template + constexpr bool + empty(initializer_list<_Tp> __il) noexcept + { return __il.size() == 0;} + + /** + * @brief Return the data pointer of a container. + * @param __cont Container. + */ + template + constexpr auto + data(_Container& __cont) -> decltype(__cont.data()) + { return __cont.data(); } + + /** + * @brief Return the data pointer of a const container. + * @param __cont Container. + */ + template + constexpr auto + data(const _Container& __cont) -> decltype(__cont.data()) + { return __cont.data(); } + + /** + * @brief Return the data pointer of an array. + * @param __array Array. + */ + template + constexpr _Tp* + data(_Tp (&__array)[_Nm]) noexcept + { return __array; } + + /** + * @brief Return the data pointer of an initializer list. + * @param __il Initializer list. + */ + template + constexpr const _Tp* + data(initializer_list<_Tp> __il) noexcept + { return __il.begin(); } + +#endif // C++17 + _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/refwrap.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/refwrap.h new file mode 100644 index 000000000..124ee97bd --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/refwrap.h @@ -0,0 +1,383 @@ +// Implementation of std::reference_wrapper -*- C++ -*- + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file include/bits/bind.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{functional} + */ + +#ifndef _GLIBCXX_REFWRAP_H +#define _GLIBCXX_REFWRAP_H 1 + +#pragma GCC system_header + +#if __cplusplus < 201103L +# include +#else + +#include +#include +#include // for unary_function and binary_function + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /// If we have found a result_type, extract it. + template> + struct _Maybe_get_result_type + { }; + + template + struct _Maybe_get_result_type<_Functor, + __void_t> + { typedef typename _Functor::result_type result_type; }; + + /** + * Base class for any function object that has a weak result type, as + * defined in 20.8.2 [func.require] of C++11. + */ + template + struct _Weak_result_type_impl + : _Maybe_get_result_type<_Functor> + { }; + + /// Retrieve the result type for a function type. + template + struct _Weak_result_type_impl<_Res(_ArgTypes...)> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res(_ArgTypes......)> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res(_ArgTypes...) const> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res(_ArgTypes......) const> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res(_ArgTypes...) volatile> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res(_ArgTypes......) volatile> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res(_ArgTypes...) const volatile> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res(_ArgTypes......) const volatile> + { typedef _Res result_type; }; + + /// Retrieve the result type for a function reference. + template + struct _Weak_result_type_impl<_Res(&)(_ArgTypes...)> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res(&)(_ArgTypes......)> + { typedef _Res result_type; }; + + /// Retrieve the result type for a function pointer. + template + struct _Weak_result_type_impl<_Res(*)(_ArgTypes...)> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res(*)(_ArgTypes......)> + { typedef _Res result_type; }; + + /// Retrieve result type for a member function pointer. + template + struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......)> + { typedef _Res result_type; }; + + /// Retrieve result type for a const member function pointer. + template + struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) const> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) const> + { typedef _Res result_type; }; + + /// Retrieve result type for a volatile member function pointer. + template + struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) volatile> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) volatile> + { typedef _Res result_type; }; + + /// Retrieve result type for a const volatile member function pointer. + template + struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) + const volatile> + { typedef _Res result_type; }; + + template + struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) + const volatile> + { typedef _Res result_type; }; + + /** + * Strip top-level cv-qualifiers from the function object and let + * _Weak_result_type_impl perform the real work. + */ + template + struct _Weak_result_type + : _Weak_result_type_impl::type> + { }; + + // Detect nested argument_type. + template> + struct _Refwrap_base_arg1 + { }; + + // Nested argument_type. + template + struct _Refwrap_base_arg1<_Tp, + __void_t> + { + typedef typename _Tp::argument_type argument_type; + }; + + // Detect nested first_argument_type and second_argument_type. + template> + struct _Refwrap_base_arg2 + { }; + + // Nested first_argument_type and second_argument_type. + template + struct _Refwrap_base_arg2<_Tp, + __void_t> + { + typedef typename _Tp::first_argument_type first_argument_type; + typedef typename _Tp::second_argument_type second_argument_type; + }; + + /** + * Derives from unary_function or binary_function when it + * can. Specializations handle all of the easy cases. The primary + * template determines what to do with a class type, which may + * derive from both unary_function and binary_function. + */ + template + struct _Reference_wrapper_base + : _Weak_result_type<_Tp>, _Refwrap_base_arg1<_Tp>, _Refwrap_base_arg2<_Tp> + { }; + + // - a function type (unary) + template + struct _Reference_wrapper_base<_Res(_T1)> + : unary_function<_T1, _Res> + { }; + + template + struct _Reference_wrapper_base<_Res(_T1) const> + : unary_function<_T1, _Res> + { }; + + template + struct _Reference_wrapper_base<_Res(_T1) volatile> + : unary_function<_T1, _Res> + { }; + + template + struct _Reference_wrapper_base<_Res(_T1) const volatile> + : unary_function<_T1, _Res> + { }; + + // - a function type (binary) + template + struct _Reference_wrapper_base<_Res(_T1, _T2)> + : binary_function<_T1, _T2, _Res> + { }; + + template + struct _Reference_wrapper_base<_Res(_T1, _T2) const> + : binary_function<_T1, _T2, _Res> + { }; + + template + struct _Reference_wrapper_base<_Res(_T1, _T2) volatile> + : binary_function<_T1, _T2, _Res> + { }; + + template + struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile> + : binary_function<_T1, _T2, _Res> + { }; + + // - a function pointer type (unary) + template + struct _Reference_wrapper_base<_Res(*)(_T1)> + : unary_function<_T1, _Res> + { }; + + // - a function pointer type (binary) + template + struct _Reference_wrapper_base<_Res(*)(_T1, _T2)> + : binary_function<_T1, _T2, _Res> + { }; + + // - a pointer to member function type (unary, no qualifiers) + template + struct _Reference_wrapper_base<_Res (_T1::*)()> + : unary_function<_T1*, _Res> + { }; + + // - a pointer to member function type (binary, no qualifiers) + template + struct _Reference_wrapper_base<_Res (_T1::*)(_T2)> + : binary_function<_T1*, _T2, _Res> + { }; + + // - a pointer to member function type (unary, const) + template + struct _Reference_wrapper_base<_Res (_T1::*)() const> + : unary_function + { }; + + // - a pointer to member function type (binary, const) + template + struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const> + : binary_function + { }; + + // - a pointer to member function type (unary, volatile) + template + struct _Reference_wrapper_base<_Res (_T1::*)() volatile> + : unary_function + { }; + + // - a pointer to member function type (binary, volatile) + template + struct _Reference_wrapper_base<_Res (_T1::*)(_T2) volatile> + : binary_function + { }; + + // - a pointer to member function type (unary, const volatile) + template + struct _Reference_wrapper_base<_Res (_T1::*)() const volatile> + : unary_function + { }; + + // - a pointer to member function type (binary, const volatile) + template + struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const volatile> + : binary_function + { }; + + /** + * @brief Primary class template for reference_wrapper. + * @ingroup functors + * @{ + */ + template + class reference_wrapper + : public _Reference_wrapper_base::type> + { + _Tp* _M_data; + + public: + typedef _Tp type; + + reference_wrapper(_Tp& __indata) noexcept + : _M_data(std::__addressof(__indata)) + { } + + reference_wrapper(_Tp&&) = delete; + + reference_wrapper(const reference_wrapper&) = default; + + reference_wrapper& + operator=(const reference_wrapper&) = default; + + operator _Tp&() const noexcept + { return this->get(); } + + _Tp& + get() const noexcept + { return *_M_data; } + + template + typename result_of<_Tp&(_Args&&...)>::type + operator()(_Args&&... __args) const + { + return std::__invoke(get(), std::forward<_Args>(__args)...); + } + }; + + + /// Denotes a reference should be taken to a variable. + template + inline reference_wrapper<_Tp> + ref(_Tp& __t) noexcept + { return reference_wrapper<_Tp>(__t); } + + /// Denotes a const reference should be taken to a variable. + template + inline reference_wrapper + cref(const _Tp& __t) noexcept + { return reference_wrapper(__t); } + + template + void ref(const _Tp&&) = delete; + + template + void cref(const _Tp&&) = delete; + + /// Partial specialization. + template + inline reference_wrapper<_Tp> + ref(reference_wrapper<_Tp> __t) noexcept + { return ref(__t.get()); } + + /// Partial specialization. + template + inline reference_wrapper + cref(reference_wrapper<_Tp> __t) noexcept + { return cref(__t.get()); } + + // @} group functors + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // C++11 + +#endif // _GLIBCXX_REFWRAP_H diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex.h index a23c2c9b3..60837ea6c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex.h @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -762,17 +762,22 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 template basic_regex(_FwdIter __first, _FwdIter __last, locale_type __loc, flag_type __f) - : _M_flags(__f), _M_loc(std::move(__loc)), + : _M_flags((__f & (ECMAScript | basic | extended | awk | grep | egrep)) + ? __f : (__f | ECMAScript)), + _M_loc(std::move(__loc)), _M_automaton(__detail::__compile_nfa<_FwdIter, _Rx_traits>( std::move(__first), std::move(__last), _M_loc, _M_flags)) { } template - friend bool - __detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&, - const basic_regex<_Cp, _Rp>&, - regex_constants::match_flag_type); + friend bool __detail:: +#if _GLIBCXX_INLINE_VERSION + __7:: // Required due to PR c++/59256 +#endif + __regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&, + const basic_regex<_Cp, _Rp>&, + regex_constants::match_flag_type); template friend class __detail::_Executor; @@ -1693,7 +1698,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 const_reference operator[](size_type __sub) const { - _GLIBCXX_DEBUG_ASSERT( ready() ); + __glibcxx_assert( ready() ); return __sub < size() ? _Base_type::operator[](__sub) : _M_unmatched_sub(); @@ -1710,7 +1715,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 const_reference prefix() const { - _GLIBCXX_DEBUG_ASSERT( ready() ); + __glibcxx_assert( ready() ); return !empty() ? _M_prefix() : _M_unmatched_sub(); } @@ -1725,7 +1730,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 const_reference suffix() const { - _GLIBCXX_DEBUG_ASSERT( ready() ); + __glibcxx_assert( ready() ); return !empty() ? _M_suffix() : _M_unmatched_sub(); } @@ -1860,10 +1865,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 template - friend bool - __detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&, - const basic_regex<_Cp, _Rp>&, - regex_constants::match_flag_type); + friend bool __detail:: +#if _GLIBCXX_INLINE_VERSION + __7:: // Required due to PR c++/59256 +#endif + __regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&, + const basic_regex<_Cp, _Rp>&, + regex_constants::match_flag_type); void _M_resize(unsigned int __size) @@ -2448,7 +2456,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * one-past-the-end of a range. */ regex_iterator() - : _M_match() + : _M_pregex() { } /** @@ -2666,9 +2674,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 initializer_list, regex_constants::match_flag_type = regex_constants::match_default) = delete; - template + template regex_token_iterator(_Bi_iter, _Bi_iter, const regex_type&&, - const int (&)[N], + const int (&)[_Nm], regex_constants::match_flag_type = regex_constants::match_default) = delete; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex.tcc similarity index 92% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex.tcc index 823ad51c3..dc32a49dc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex.tcc @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -28,13 +28,6 @@ * Do not attempt to use it directly. @headername{regex} */ -// A non-standard switch to let the user pick the matching algorithm. -// If _GLIBCXX_REGEX_USE_THOMPSON_NFA is defined, the thompson NFA -// algorithm will be used. This algorithm is not enabled by default, -// and cannot be used if the regex contains back-references, but has better -// (polynomial instead of exponential) worst case performance. -// See __regex_algo_impl below. - namespace std _GLIBCXX_VISIBILITY(default) { namespace __detail @@ -67,16 +60,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION for (auto& __it : __res) __it.matched = false; - // __policy is used by testsuites so that they can use Thompson NFA - // without defining a macro. Users should define - // _GLIBCXX_REGEX_USE_THOMPSON_NFA if they need to use this approach. bool __ret; - if (!__re._M_automaton->_M_has_backref - && !(__re._M_flags & regex_constants::ECMAScript) -#ifndef _GLIBCXX_REGEX_USE_THOMPSON_NFA - && __policy == _RegexExecutorPolicy::_S_alternate -#endif - ) + if ((__re.flags() & regex_constants::__polynomial) + || (__policy == _RegexExecutorPolicy::_S_alternate + && !__re._M_automaton->_M_has_backref)) { _Executor<_BiIter, _Alloc, _TraitsT, false> __executor(__s, __e, __m, __re, __flags); @@ -375,7 +362,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const match_results<_Bi_iter, _Alloc>::char_type* __fmt_last, match_flag_type __flags) const { - _GLIBCXX_DEBUG_ASSERT( ready() ); + __glibcxx_assert( ready() ); regex_traits __traits; typedef std::ctype __ctype_type; const __ctype_type& @@ -509,12 +496,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION regex_iterator<_Bi_iter, _Ch_type, _Rx_traits>:: operator==(const regex_iterator& __rhs) const { - return (_M_match.empty() && __rhs._M_match.empty()) - || (_M_begin == __rhs._M_begin - && _M_end == __rhs._M_end - && _M_pregex == __rhs._M_pregex - && _M_flags == __rhs._M_flags - && _M_match[0] == __rhs._M_match[0]); + if (_M_pregex == nullptr && __rhs._M_pregex == nullptr) + return true; + return _M_pregex == __rhs._M_pregex + && _M_begin == __rhs._M_begin + && _M_end == __rhs._M_end + && _M_flags == __rhs._M_flags + && _M_match[0] == __rhs._M_match[0]; } template> _M_matcher_storage; }; + protected: explicit _State_base(_Opcode __opcode) : _M_opcode(__opcode), _M_next(_S_invalid_state_id) { } - protected: - ~_State_base() = default; - public: + bool + _M_has_alt() + { + return _M_opcode == _S_opcode_alternative + || _M_opcode == _S_opcode_repeat + || _M_opcode == _S_opcode_subexpr_lookahead; + } + #ifdef _GLIBCXX_DEBUG std::ostream& _M_print(std::ostream& ostr) const; @@ -107,14 +118,67 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif }; - template + template struct _State : _State_base { - typedef _Matcher _MatcherT; + typedef _Matcher<_Char_type> _MatcherT; + static_assert(sizeof(_MatcherT) == sizeof(_Matcher), + "std::function has the same size as " + "std::function"); + static_assert(alignof(_MatcherT) == alignof(_Matcher), + "std::function has the same alignment as " + "std::function"); - _MatcherT _M_matches; // for _S_opcode_match + explicit + _State(_Opcode __opcode) : _State_base(__opcode) + { + if (_M_opcode() == _S_opcode_match) + new (this->_M_matcher_storage._M_addr()) _MatcherT(); + } - explicit _State(_Opcode __opcode) : _State_base(__opcode) { } + _State(const _State& __rhs) : _State_base(__rhs) + { + if (__rhs._M_opcode() == _S_opcode_match) + new (this->_M_matcher_storage._M_addr()) + _MatcherT(__rhs._M_get_matcher()); + } + + _State(_State&& __rhs) : _State_base(__rhs) + { + if (__rhs._M_opcode() == _S_opcode_match) + new (this->_M_matcher_storage._M_addr()) + _MatcherT(std::move(__rhs._M_get_matcher())); + } + + _State& + operator=(const _State&) = delete; + + ~_State() + { + if (_M_opcode() == _S_opcode_match) + _M_get_matcher().~_MatcherT(); + } + + // Since correct ctor and dtor rely on _M_opcode, it's better not to + // change it over time. + _Opcode + _M_opcode() const + { return _State_base::_M_opcode; } + + bool + _M_matches(_Char_type __char) const + { return _M_get_matcher()(__char); } + + _MatcherT& + _M_get_matcher() + { return *static_cast<_MatcherT*>(this->_M_matcher_storage._M_addr()); } + + const _MatcherT& + _M_get_matcher() const + { + return *static_cast( + this->_M_matcher_storage._M_addr()); + } }; struct _NFA_base @@ -155,10 +219,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct _NFA - : _NFA_base, std::vector<_State<_TraitsT>> + : _NFA_base, std::vector<_State> { - typedef _State<_TraitsT> _StateT; - typedef _Matcher _MatcherT; + typedef typename _TraitsT::char_type _Char_type; + typedef _State<_Char_type> _StateT; + typedef _Matcher<_Char_type> _MatcherT; _NFA(const typename _TraitsT::locale_type& __loc, _FlagT __flags) : _NFA_base(__flags) @@ -176,7 +241,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } _StateIdT - _M_insert_alt(_StateIdT __next, _StateIdT __alt, bool __neg) + _M_insert_alt(_StateIdT __next, _StateIdT __alt, + bool __neg __attribute__((__unused__))) { _StateT __tmp(_S_opcode_alternative); // It labels every quantifier to make greedy comparison easier in BFS @@ -202,7 +268,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_insert_matcher(_MatcherT __m) { _StateT __tmp(_S_opcode_match); - __tmp._M_matches = std::move(__m); + __tmp._M_get_matcher() = std::move(__m); return _M_insert_state(std::move(__tmp)); } @@ -262,7 +328,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { this->push_back(std::move(__s)); if (this->size() > _GLIBCXX_REGEX_STATE_LIMIT) - __throw_regex_error(regex_constants::error_space); + __throw_regex_error( + regex_constants::error_space, + "Number of NFA states exceeds limit. Please use shorter regex " + "string, or use smaller brace expression, or make " + "_GLIBCXX_REGEX_STATE_LIMIT larger."); return this->size()-1; } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_automaton.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_automaton.tcc similarity index 88% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_automaton.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_automaton.tcc index fbc338975..727bde1f6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_automaton.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_automaton.tcc @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -148,6 +148,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _StateIdT _NFA<_TraitsT>::_M_insert_backref(size_t __index) { + if (this->_M_flags & regex_constants::__polynomial) + __throw_regex_error(regex_constants::error_complexity, + "Unexpected back-reference in polynomial mode."); // To figure out whether a backref is valid, a stack is used to store // unfinished sub-expressions. For example, when parsing // "(a(b)(c\\1(d)))" at '\\1', _M_subexpr_count is 3, indicating that 3 @@ -156,10 +159,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _M_paren_stack is {1, 3}, for incomplete "(a.." and "(c..". At this // time, "\\2" is valid, but "\\1" and "\\3" are not. if (__index >= _M_subexpr_count) - __throw_regex_error(regex_constants::error_backref); + __throw_regex_error( + regex_constants::error_backref, + "Back-reference index exceeds current sub-expression count."); for (auto __it : this->_M_paren_stack) if (__index == __it) - __throw_regex_error(regex_constants::error_backref); + __throw_regex_error( + regex_constants::error_backref, + "Back-reference referred to an opened sub-expression."); this->_M_has_backref = true; _StateT __tmp(_S_opcode_backref); __tmp._M_backref_index = __index; @@ -172,13 +179,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { for (auto& __it : *this) { - while (__it._M_next >= 0 && (*this)[__it._M_next]._M_opcode + while (__it._M_next >= 0 && (*this)[__it._M_next]._M_opcode() == _S_opcode_dummy) __it._M_next = (*this)[__it._M_next]._M_next; - if (__it._M_opcode == _S_opcode_alternative - || __it._M_opcode == _S_opcode_repeat - || __it._M_opcode == _S_opcode_subexpr_lookahead) - while (__it._M_alt >= 0 && (*this)[__it._M_alt]._M_opcode + if (__it._M_has_alt()) + while (__it._M_alt >= 0 && (*this)[__it._M_alt]._M_opcode() == _S_opcode_dummy) __it._M_alt = (*this)[__it._M_alt]._M_next; } @@ -198,11 +203,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __stack.pop(); auto __dup = _M_nfa[__u]; // _M_insert_state() never return -1 - auto __id = _M_nfa._M_insert_state(__dup); + auto __id = _M_nfa._M_insert_state(std::move(__dup)); __m[__u] = __id; - if (__dup._M_opcode == _S_opcode_alternative - || __dup._M_opcode == _S_opcode_repeat - || __dup._M_opcode == _S_opcode_subexpr_lookahead) + if (__dup._M_has_alt()) if (__dup._M_alt != _S_invalid_state_id && __m.count(__dup._M_alt) == 0) __stack.push(__dup._M_alt); @@ -218,15 +221,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION auto& __ref = _M_nfa[__v]; if (__ref._M_next != _S_invalid_state_id) { - _GLIBCXX_DEBUG_ASSERT(__m.count(__ref._M_next) > 0); + __glibcxx_assert(__m.count(__ref._M_next) > 0); __ref._M_next = __m[__ref._M_next]; } - if (__ref._M_opcode == _S_opcode_alternative - || __ref._M_opcode == _S_opcode_repeat - || __ref._M_opcode == _S_opcode_subexpr_lookahead) + if (__ref._M_has_alt()) if (__ref._M_alt != _S_invalid_state_id) { - _GLIBCXX_DEBUG_ASSERT(__m.count(__ref._M_alt) > 0); + __glibcxx_assert(__m.count(__ref._M_alt) > 0); __ref._M_alt = __m[__ref._M_alt]; } } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_compiler.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_compiler.h similarity index 79% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_compiler.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_compiler.h index 0cb0c04b1..49c01840c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_compiler.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_compiler.h @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -30,6 +30,15 @@ namespace std _GLIBCXX_VISIBILITY(default) { +_GLIBCXX_BEGIN_NAMESPACE_VERSION +_GLIBCXX_BEGIN_NAMESPACE_CXX11 + + template + class regex_traits; + +_GLIBCXX_END_NAMESPACE_CXX11 +_GLIBCXX_END_NAMESPACE_VERSION + namespace __detail { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -207,17 +216,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // [28.13.14] template - class _RegexTranslator + class _RegexTranslatorBase { public: typedef typename _TraitsT::char_type _CharT; typedef typename _TraitsT::string_type _StringT; - typedef typename std::conditional<__collate, - _StringT, - _CharT>::type _StrTransT; + typedef _StringT _StrTransT; explicit - _RegexTranslator(const _TraitsT& __traits) + _RegexTranslatorBase(const _TraitsT& __traits) : _M_traits(__traits) { } @@ -235,25 +242,88 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _StrTransT _M_transform(_CharT __ch) const { - return _M_transform_impl(__ch, typename integral_constant::type()); - } - - private: - _StrTransT - _M_transform_impl(_CharT __ch, false_type) const - { return __ch; } - - _StrTransT - _M_transform_impl(_CharT __ch, true_type) const - { - _StrTransT __str = _StrTransT(1, _M_translate(__ch)); + _StrTransT __str(1, __ch); return _M_traits.transform(__str.begin(), __str.end()); } + // See LWG 523. It's not efficiently implementable when _TraitsT is not + // std::regex_traits<>, and __collate is true. See specializations for + // implementations of other cases. + bool + _M_match_range(const _StrTransT& __first, const _StrTransT& __last, + const _StrTransT& __s) const + { return __first <= __s && __s <= __last; } + + protected: + bool _M_in_range_icase(_CharT __first, _CharT __last, _CharT __ch) const + { + typedef std::ctype<_CharT> __ctype_type; + const auto& __fctyp = use_facet<__ctype_type>(this->_M_traits.getloc()); + auto __lower = __fctyp.tolower(__ch); + auto __upper = __fctyp.toupper(__ch); + return (__first <= __lower && __lower <= __last) + || (__first <= __upper && __upper <= __last); + } + const _TraitsT& _M_traits; }; + template + class _RegexTranslator + : public _RegexTranslatorBase<_TraitsT, __icase, __collate> + { + public: + typedef _RegexTranslatorBase<_TraitsT, __icase, __collate> _Base; + using _Base::_Base; + }; + + template + class _RegexTranslator<_TraitsT, __icase, false> + : public _RegexTranslatorBase<_TraitsT, __icase, false> + { + public: + typedef _RegexTranslatorBase<_TraitsT, __icase, false> _Base; + typedef typename _Base::_CharT _CharT; + typedef _CharT _StrTransT; + + using _Base::_Base; + + _StrTransT + _M_transform(_CharT __ch) const + { return __ch; } + + bool + _M_match_range(_CharT __first, _CharT __last, _CharT __ch) const + { + if (!__icase) + return __first <= __ch && __ch <= __last; + return this->_M_in_range_icase(__first, __last, __ch); + } + }; + + template + class _RegexTranslator, true, true> + : public _RegexTranslatorBase, true, true> + { + public: + typedef _RegexTranslatorBase, true, true> + _Base; + typedef typename _Base::_CharT _CharT; + typedef typename _Base::_StrTransT _StrTransT; + + using _Base::_Base; + + bool + _M_match_range(const _StrTransT& __first, const _StrTransT& __last, + const _StrTransT& __str) const + { + __glibcxx_assert(__first.size() == 1); + __glibcxx_assert(__last.size() == 1); + __glibcxx_assert(__str.size() == 1); + return this->_M_in_range_icase(__first[0], __last[0], __str[0]); + } + }; + template class _RegexTranslator<_TraitsT, false, false> { @@ -272,6 +342,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _StrTransT _M_transform(_CharT __ch) const { return __ch; } + + bool + _M_match_range(_CharT __first, _CharT __last, _CharT __ch) const + { return __first <= __ch && __ch <= __last; } }; template @@ -370,9 +444,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const _TraitsT& __traits) : _M_class_set(0), _M_translator(__traits), _M_traits(__traits), _M_is_non_matching(__is_non_matching) -#ifdef _GLIBCXX_DEBUG - , _M_is_ready(false) -#endif { } bool @@ -386,9 +457,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_add_char(_CharT __c) { _M_char_set.push_back(_M_translator._M_translate(__c)); -#ifdef _GLIBCXX_DEBUG - _M_is_ready = false; -#endif + _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); } _StringT @@ -397,11 +466,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION auto __st = _M_traits.lookup_collatename(__s.data(), __s.data() + __s.size()); if (__st.empty()) - __throw_regex_error(regex_constants::error_collate); + __throw_regex_error(regex_constants::error_collate, + "Invalid collate element."); _M_char_set.push_back(_M_translator._M_translate(__st[0])); -#ifdef _GLIBCXX_DEBUG - _M_is_ready = false; -#endif + _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); return __st; } @@ -411,13 +479,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION auto __st = _M_traits.lookup_collatename(__s.data(), __s.data() + __s.size()); if (__st.empty()) - __throw_regex_error(regex_constants::error_collate); + __throw_regex_error(regex_constants::error_collate, + "Invalid equivalence class."); __st = _M_traits.transform_primary(__st.data(), __st.data() + __st.size()); _M_equiv_set.push_back(__st); -#ifdef _GLIBCXX_DEBUG - _M_is_ready = false; -#endif + _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); } // __neg should be true for \D, \S and \W only. @@ -428,26 +495,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __s.data() + __s.size(), __icase); if (__mask == 0) - __throw_regex_error(regex_constants::error_ctype); + __throw_regex_error(regex_constants::error_collate, + "Invalid character class."); if (!__neg) _M_class_set |= __mask; else _M_neg_class_set.push_back(__mask); -#ifdef _GLIBCXX_DEBUG - _M_is_ready = false; -#endif + _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); } void _M_make_range(_CharT __l, _CharT __r) { if (__l > __r) - __throw_regex_error(regex_constants::error_range); + __throw_regex_error(regex_constants::error_range, + "Invalid range in bracket expression."); _M_range_set.push_back(make_pair(_M_translator._M_transform(__l), _M_translator._M_transform(__r))); -#ifdef _GLIBCXX_DEBUG - _M_is_ready = false; -#endif + _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); } void @@ -457,9 +522,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION auto __end = std::unique(_M_char_set.begin(), _M_char_set.end()); _M_char_set.erase(__end, _M_char_set.end()); _M_make_cache(_UseCache()); -#ifdef _GLIBCXX_DEBUG - _M_is_ready = true; -#endif + _GLIBCXX_DEBUG_ONLY(_M_is_ready = true); } private: @@ -507,7 +570,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool _M_is_non_matching; _CacheT _M_cache; #ifdef _GLIBCXX_DEBUG - bool _M_is_ready; + bool _M_is_ready = false; #endif }; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_compiler.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_compiler.tcc similarity index 81% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_compiler.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_compiler.tcc index 9a6231115..a6d8016d8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_compiler.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_compiler.tcc @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -83,7 +83,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (!_M_match_token(_ScannerT::_S_token_eof)) __throw_regex_error(regex_constants::error_paren); __r._M_append(_M_pop()); - _GLIBCXX_DEBUG_ASSERT(_M_stack.empty()); + __glibcxx_assert(_M_stack.empty()); __r._M_append(_M_nfa->_M_insert_subexpr_end()); __r._M_append(_M_nfa->_M_insert_accept()); _M_nfa->_M_eliminate_dummy(); @@ -162,7 +162,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION auto __neg = _M_value[0] == 'n'; this->_M_disjunction(); if (!_M_match_token(_ScannerT::_S_token_subexpr_end)) - __throw_regex_error(regex_constants::error_paren); + __throw_regex_error(regex_constants::error_paren, + "Parenthesis is not closed."); auto __tmp = _M_pop(); __tmp._M_append(_M_nfa->_M_insert_accept()); _M_stack.push( @@ -184,7 +185,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION auto __init = [this, &__neg]() { if (_M_stack.empty()) - __throw_regex_error(regex_constants::error_badrepeat); + __throw_regex_error(regex_constants::error_badrepeat, + "Nothing to repeat before a quantifier."); __neg = __neg && _M_match_token(_ScannerT::_S_token_opt); }; if (_M_match_token(_ScannerT::_S_token_closure0)) @@ -220,9 +222,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else if (_M_match_token(_ScannerT::_S_token_interval_begin)) { if (_M_stack.empty()) - __throw_regex_error(regex_constants::error_badrepeat); + __throw_regex_error(regex_constants::error_badrepeat, + "Nothing to repeat before a quantifier."); if (!_M_match_token(_ScannerT::_S_token_dup_count)) - __throw_regex_error(regex_constants::error_badbrace); + __throw_regex_error(regex_constants::error_badbrace, + "Unexpected token in brace expression."); _StateSeqT __r(_M_pop()); _StateSeqT __e(*_M_nfa, _M_nfa->_M_insert_dummy()); long __min_rep = _M_cur_int_value(10); @@ -238,7 +242,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else __n = 0; if (!_M_match_token(_ScannerT::_S_token_interval_end)) - __throw_regex_error(regex_constants::error_brace); + __throw_regex_error(regex_constants::error_brace, + "Unexpected end of brace expression."); __neg = __neg && _M_match_token(_ScannerT::_S_token_opt); @@ -257,7 +262,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else { if (__n < 0) - __throw_regex_error(regex_constants::error_badbrace); + __throw_regex_error(regex_constants::error_badbrace, + "Invalid range in brace expression."); auto __end = _M_nfa->_M_insert_dummy(); // _M_alt is the "match more" branch, and _M_next is the // "match less" one. Switch _M_alt and _M_next of all created @@ -324,7 +330,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _StateSeqT __r(*_M_nfa, _M_nfa->_M_insert_dummy()); this->_M_disjunction(); if (!_M_match_token(_ScannerT::_S_token_subexpr_end)) - __throw_regex_error(regex_constants::error_paren); + __throw_regex_error(regex_constants::error_paren, + "Parenthesis is not closed."); __r._M_append(_M_pop()); _M_stack.push(__r); } @@ -333,7 +340,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _StateSeqT __r(*_M_nfa, _M_nfa->_M_insert_subexpr_begin()); this->_M_disjunction(); if (!_M_match_token(_ScannerT::_S_token_subexpr_end)) - __throw_regex_error(regex_constants::error_paren); + __throw_regex_error(regex_constants::error_paren, + "Parenthesis is not closed."); __r._M_append(_M_pop()); __r._M_append(_M_nfa->_M_insert_subexpr_end()); _M_stack.push(__r); @@ -399,7 +407,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Compiler<_TraitsT>:: _M_insert_character_class_matcher() { - _GLIBCXX_DEBUG_ASSERT(_M_value.size() == 1); + __glibcxx_assert(_M_value.size() == 1); _BracketMatcher<_TraitsT, __icase, __collate> __matcher (_M_ctype.is(_CtypeT::upper, _M_value[0]), _M_traits); __matcher._M_add_character_class(_M_value, false); @@ -418,13 +426,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION pair __last_char; // Optional<_CharT> __last_char.first = false; if (!(_M_flags & regex_constants::ECMAScript)) - if (_M_try_char()) - { - __matcher._M_add_char(_M_value[0]); - __last_char.first = true; - __last_char.second = _M_value[0]; - } + { + if (_M_try_char()) + { + __last_char.first = true; + __last_char.second = _M_value[0]; + } + else if (_M_match_token(_ScannerT::_S_token_bracket_dash)) + { + __last_char.first = true; + __last_char.second = '-'; + } + } while (_M_expression_term(__last_char, __matcher)); + if (__last_char.first) + __matcher._M_add_char(__last_char.second); __matcher._M_ready(); _M_stack.push(_StateSeqT( *_M_nfa, @@ -441,19 +457,43 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (_M_match_token(_ScannerT::_S_token_bracket_end)) return false; + const auto __push_char = [&](_CharT __ch) + { + if (__last_char.first) + __matcher._M_add_char(__last_char.second); + else + __last_char.first = true; + __last_char.second = __ch; + }; + const auto __flush = [&] + { + if (__last_char.first) + { + __matcher._M_add_char(__last_char.second); + __last_char.first = false; + } + }; + if (_M_match_token(_ScannerT::_S_token_collsymbol)) { auto __symbol = __matcher._M_add_collate_element(_M_value); if (__symbol.size() == 1) - { - __last_char.first = true; - __last_char.second = __symbol[0]; - } + __push_char(__symbol[0]); + else + __flush(); } else if (_M_match_token(_ScannerT::_S_token_equiv_class_name)) - __matcher._M_add_equivalence_class(_M_value); + { + __flush(); + __matcher._M_add_equivalence_class(_M_value); + } else if (_M_match_token(_ScannerT::_S_token_char_class_name)) - __matcher._M_add_character_class(_M_value, false); + { + __flush(); + __matcher._M_add_character_class(_M_value, false); + } + else if (_M_try_char()) + __push_char(_M_value[0]); // POSIX doesn't allow '-' as a start-range char (say [a-z--0]), // except when the '-' is the first or last character in the bracket // expression ([--0]). ECMAScript treats all '-' after a range as a @@ -464,51 +504,58 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Clang (3.5) always uses ECMAScript style even in its POSIX syntax. // // It turns out that no one reads BNFs ;) - else if (_M_try_char()) + else if (_M_match_token(_ScannerT::_S_token_bracket_dash)) { if (!__last_char.first) { - __matcher._M_add_char(_M_value[0]); - if (_M_value[0] == '-' - && !(_M_flags & regex_constants::ECMAScript)) + if (!(_M_flags & regex_constants::ECMAScript)) { if (_M_match_token(_ScannerT::_S_token_bracket_end)) - return false; - __throw_regex_error(regex_constants::error_range); + { + __push_char('-'); + return false; + } + __throw_regex_error( + regex_constants::error_range, + "Unexpected dash in bracket expression. For POSIX syntax, " + "a dash is not treated literally only when it is at " + "beginning or end."); } - __last_char.first = true; - __last_char.second = _M_value[0]; + __push_char('-'); } else { - if (_M_value[0] == '-') + if (_M_try_char()) { - if (_M_try_char()) - { - __matcher._M_make_range(__last_char.second , _M_value[0]); - __last_char.first = false; - } - else - { - if (_M_scanner._M_get_token() - != _ScannerT::_S_token_bracket_end) - __throw_regex_error(regex_constants::error_range); - __matcher._M_add_char(_M_value[0]); - } + __matcher._M_make_range(__last_char.second, _M_value[0]); + __last_char.first = false; + } + else if (_M_match_token(_ScannerT::_S_token_bracket_dash)) + { + __matcher._M_make_range(__last_char.second, '-'); + __last_char.first = false; } else { - __matcher._M_add_char(_M_value[0]); - __last_char.second = _M_value[0]; + if (_M_scanner._M_get_token() + != _ScannerT::_S_token_bracket_end) + __throw_regex_error( + regex_constants::error_range, + "Character is expected after a dash."); + __push_char('-'); } } } else if (_M_match_token(_ScannerT::_S_token_quoted_class)) - __matcher._M_add_character_class(_M_value, - _M_ctype.is(_CtypeT::upper, - _M_value[0])); + { + __flush(); + __matcher._M_add_character_class(_M_value, + _M_ctype.is(_CtypeT::upper, + _M_value[0])); + } else - __throw_regex_error(regex_constants::error_brack); + __throw_regex_error(regex_constants::error_brack, + "Unexpected character in bracket expression."); return true; } @@ -565,37 +612,26 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _BracketMatcher<_TraitsT, __icase, __collate>:: _M_apply(_CharT __ch, false_type) const { - bool __ret = std::binary_search(_M_char_set.begin(), _M_char_set.end(), - _M_translator._M_translate(__ch)); - if (!__ret) - { - auto __s = _M_translator._M_transform(__ch); - for (auto& __it : _M_range_set) - if (__it.first <= __s && __s <= __it.second) - { - __ret = true; - break; - } - if (_M_traits.isctype(__ch, _M_class_set)) - __ret = true; - else if (std::find(_M_equiv_set.begin(), _M_equiv_set.end(), - _M_traits.transform_primary(&__ch, &__ch+1)) - != _M_equiv_set.end()) - __ret = true; - else - { - for (auto& __it : _M_neg_class_set) - if (!_M_traits.isctype(__ch, __it)) - { - __ret = true; - break; - } - } - } - if (_M_is_non_matching) - return !__ret; - else - return __ret; + return [this, __ch] + { + if (std::binary_search(_M_char_set.begin(), _M_char_set.end(), + _M_translator._M_translate(__ch))) + return true; + auto __s = _M_translator._M_transform(__ch); + for (auto& __it : _M_range_set) + if (_M_translator._M_match_range(__it.first, __it.second, __s)) + return true; + if (_M_traits.isctype(__ch, _M_class_set)) + return true; + if (std::find(_M_equiv_set.begin(), _M_equiv_set.end(), + _M_traits.transform_primary(&__ch, &__ch+1)) + != _M_equiv_set.end()) + return true; + for (auto& __it : _M_neg_class_set) + if (!_M_traits.isctype(__ch, __it)) + return true; + return false; + }() ^ _M_is_non_matching; } _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_constants.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_constants.h similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_constants.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_constants.h index e2c763178..dad2d637a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_constants.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_constants.h @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -63,6 +63,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _S_awk, _S_grep, _S_egrep, + _S_polynomial, _S_syntax_last }; @@ -83,7 +84,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Specifies that the matching of regular expressions against a character * sequence shall be performed without regard to case. */ - constexpr syntax_option_type icase = + _GLIBCXX17_INLINE constexpr syntax_option_type icase = static_cast(1 << _S_icase); /** @@ -91,7 +92,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * container sequence, no sub-expression matches are to be stored in the * supplied match_results structure. */ - constexpr syntax_option_type nosubs = + _GLIBCXX17_INLINE constexpr syntax_option_type nosubs = static_cast(1 << _S_nosubs); /** @@ -100,14 +101,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * speed with which regular expression objects are constructed. Otherwise * it has no detectable effect on the program output. */ - constexpr syntax_option_type optimize = + _GLIBCXX17_INLINE constexpr syntax_option_type optimize = static_cast(1 << _S_optimize); /** * Specifies that character ranges of the form [a-b] should be locale * sensitive. */ - constexpr syntax_option_type collate = + _GLIBCXX17_INLINE constexpr syntax_option_type collate = static_cast(1 << _S_collate); /** @@ -118,7 +119,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * in the PERL scripting language but extended with elements found in the * POSIX regular expression grammar. */ - constexpr syntax_option_type ECMAScript = + _GLIBCXX17_INLINE constexpr syntax_option_type ECMAScript = static_cast(1 << _S_ECMAScript); /** @@ -128,7 +129,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Headers, Section 9, Regular Expressions [IEEE, Information Technology -- * Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001]. */ - constexpr syntax_option_type basic = + _GLIBCXX17_INLINE constexpr syntax_option_type basic = static_cast(1 << _S_basic); /** @@ -137,7 +138,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Portable Operating System Interface (POSIX), Base Definitions and * Headers, Section 9, Regular Expressions. */ - constexpr syntax_option_type extended = + _GLIBCXX17_INLINE constexpr syntax_option_type extended = static_cast(1 << _S_extended); /** @@ -148,7 +149,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * \\\\, \\a, \\b, \\f, \\n, \\r, \\t , \\v, \\&apos,, &apos,, * and \\ddd (where ddd is one, two, or three octal digits). */ - constexpr syntax_option_type awk = + _GLIBCXX17_INLINE constexpr syntax_option_type awk = static_cast(1 << _S_awk); /** @@ -157,7 +158,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * identical to syntax_option_type basic, except that newlines are treated * as whitespace. */ - constexpr syntax_option_type grep = + _GLIBCXX17_INLINE constexpr syntax_option_type grep = static_cast(1 << _S_grep); /** @@ -166,9 +167,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * IEEE Std 1003.1-2001. This option is identical to syntax_option_type * extended, except that newlines are treated as whitespace. */ - constexpr syntax_option_type egrep = + _GLIBCXX17_INLINE constexpr syntax_option_type egrep = static_cast(1 << _S_egrep); + /** + * Extension: Ensure both space complexity of compiled regex and + * time complexity execution are not exponential. + * If specified in a regex with back-references, the exception + * regex_constants::error_complexity will be thrown. + */ + _GLIBCXX17_INLINE constexpr syntax_option_type __polynomial = + static_cast(1 << _S_polynomial); + constexpr inline syntax_option_type operator&(syntax_option_type __a, syntax_option_type __b) { @@ -247,14 +257,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * The default matching rules. */ - constexpr match_flag_type match_default = static_cast(0); + _GLIBCXX17_INLINE constexpr match_flag_type match_default = + static_cast(0); /** * The first character in the sequence [first, last) is treated as though it * is not at the beginning of a line, so the character (^) in the regular * expression shall not match [first, first). */ - constexpr match_flag_type match_not_bol = + _GLIBCXX17_INLINE constexpr match_flag_type match_not_bol = static_cast(1 << _S_not_bol); /** @@ -262,40 +273,40 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * is not at the end of a line, so the character ($) in the regular * expression shall not match [last, last). */ - constexpr match_flag_type match_not_eol = + _GLIBCXX17_INLINE constexpr match_flag_type match_not_eol = static_cast(1 << _S_not_eol); /** * The expression \\b is not matched against the sub-sequence * [first,first). */ - constexpr match_flag_type match_not_bow = + _GLIBCXX17_INLINE constexpr match_flag_type match_not_bow = static_cast(1 << _S_not_bow); /** * The expression \\b should not be matched against the sub-sequence * [last,last). */ - constexpr match_flag_type match_not_eow = + _GLIBCXX17_INLINE constexpr match_flag_type match_not_eow = static_cast(1 << _S_not_eow); /** * If more than one match is possible then any match is an acceptable * result. */ - constexpr match_flag_type match_any = + _GLIBCXX17_INLINE constexpr match_flag_type match_any = static_cast(1 << _S_any); /** * The expression does not match an empty sequence. */ - constexpr match_flag_type match_not_null = + _GLIBCXX17_INLINE constexpr match_flag_type match_not_null = static_cast(1 << _S_not_null); /** * The expression only matches a sub-sequence that begins at first . */ - constexpr match_flag_type match_continuous = + _GLIBCXX17_INLINE constexpr match_flag_type match_continuous = static_cast(1 << _S_continuous); /** @@ -303,7 +314,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * flags match_not_bol and match_not_bow are ignored by the regular * expression algorithms 28.11 and iterators 28.12. */ - constexpr match_flag_type match_prev_avail = + _GLIBCXX17_INLINE constexpr match_flag_type match_prev_avail = static_cast(1 << _S_prev_avail); /** @@ -332,7 +343,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * undefined, use the empty string instead. If * nn > match_results::size(), the result is implementation-defined. */ - constexpr match_flag_type format_default = static_cast(0); + _GLIBCXX17_INLINE constexpr match_flag_type format_default = + static_cast(0); /** * When a regular expression match is to be replaced by a new string, the @@ -340,7 +352,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * in IEEE Std 1003.1- 2001 [IEEE, Information Technology -- Portable * Operating System Interface (POSIX), IEEE Standard 1003.1-2001]. */ - constexpr match_flag_type format_sed = + _GLIBCXX17_INLINE constexpr match_flag_type format_sed = static_cast(1 << _S_sed); /** @@ -348,14 +360,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * container sequence being searched that do not match the regular * expression shall not be copied to the output string. */ - constexpr match_flag_type format_no_copy = + _GLIBCXX17_INLINE constexpr match_flag_type format_no_copy = static_cast(1 << _S_no_copy); /** * When specified during a search and replace operation, only the first * occurrence of the regular expression shall be replaced. */ - constexpr match_flag_type format_first_only = + _GLIBCXX17_INLINE constexpr match_flag_type format_first_only = static_cast(1 << _S_first_only); constexpr inline match_flag_type diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_error.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_error.h similarity index 91% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_error.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_error.h index 778edd5a0..55f6db9cf 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_error.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_error.h @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -155,6 +155,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION regex_constants::error_type code() const { return _M_code; } + + private: + regex_error(regex_constants::error_type __ecode, const char* __what) + : std::runtime_error(__what), _M_code(__ecode) + { } + + friend void __throw_regex_error(regex_constants::error_type, const char*); }; //@} // group regex @@ -162,5 +169,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void __throw_regex_error(regex_constants::error_type __ecode); + inline void + __throw_regex_error(regex_constants::error_type __ecode, const char* __what) + { _GLIBCXX_THROW_OR_ABORT(regex_error(__ecode, __what)); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_executor.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_executor.h similarity index 89% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_executor.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_executor.h index 404f30bf1..610547428 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_executor.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_executor.h @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -108,6 +108,39 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void _M_rep_once_more(_Match_mode __match_mode, _StateIdT); + void + _M_handle_repeat(_Match_mode, _StateIdT); + + void + _M_handle_subexpr_begin(_Match_mode, _StateIdT); + + void + _M_handle_subexpr_end(_Match_mode, _StateIdT); + + void + _M_handle_line_begin_assertion(_Match_mode, _StateIdT); + + void + _M_handle_line_end_assertion(_Match_mode, _StateIdT); + + void + _M_handle_word_boundary(_Match_mode, _StateIdT); + + void + _M_handle_subexpr_lookahead(_Match_mode, _StateIdT); + + void + _M_handle_match(_Match_mode, _StateIdT); + + void + _M_handle_backref(_Match_mode, _StateIdT); + + void + _M_handle_accept(_Match_mode, _StateIdT); + + void + _M_handle_alternative(_Match_mode, _StateIdT); + void _M_dfs(_Match_mode __match_mode, _StateIdT __start); @@ -148,7 +181,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_word_boundary() const; bool - _M_lookahead(_State<_TraitsT> __state); + _M_lookahead(_StateIdT __next); // Holds additional information used in BFS-mode. template diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_executor.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_executor.tcc new file mode 100644 index 000000000..9d4ece744 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_executor.tcc @@ -0,0 +1,519 @@ +// class template regex -*- C++ -*- + +// Copyright (C) 2013-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** + * @file bits/regex_executor.tcc + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{regex} + */ + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace __detail +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_search() + { + if (_M_search_from_first()) + return true; + if (_M_flags & regex_constants::match_continuous) + return false; + _M_flags |= regex_constants::match_prev_avail; + while (_M_begin != _M_end) + { + ++_M_begin; + if (_M_search_from_first()) + return true; + } + return false; + } + + // The _M_main function operates in different modes, DFS mode or BFS mode, + // indicated by template parameter __dfs_mode, and dispatches to one of the + // _M_main_dispatch overloads. + // + // ------------------------------------------------------------ + // + // DFS mode: + // + // It applies a Depth-First-Search (aka backtracking) on given NFA and input + // string. + // At the very beginning the executor stands in the start state, then it + // tries every possible state transition in current state recursively. Some + // state transitions consume input string, say, a single-char-matcher or a + // back-reference matcher; some don't, like assertion or other anchor nodes. + // When the input is exhausted and/or the current state is an accepting + // state, the whole executor returns true. + // + // TODO: This approach is exponentially slow for certain input. + // Try to compile the NFA to a DFA. + // + // Time complexity: \Omega(match_length), O(2^(_M_nfa.size())) + // Space complexity: \theta(match_results.size() + match_length) + // + template + bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_main_dispatch(_Match_mode __match_mode, __dfs) + { + _M_has_sol = false; + *_M_states._M_get_sol_pos() = _BiIter(); + _M_cur_results = _M_results; + _M_dfs(__match_mode, _M_states._M_start); + return _M_has_sol; + } + + // ------------------------------------------------------------ + // + // BFS mode: + // + // Russ Cox's article (http://swtch.com/~rsc/regexp/regexp1.html) + // explained this algorithm clearly. + // + // It first computes epsilon closure (states that can be achieved without + // consuming characters) for every state that's still matching, + // using the same DFS algorithm, but doesn't re-enter states (using + // _M_states._M_visited to check), nor follow _S_opcode_match. + // + // Then apply DFS using every _S_opcode_match (in _M_states._M_match_queue) + // as the start state. + // + // It significantly reduces potential duplicate states, so has a better + // upper bound; but it requires more overhead. + // + // Time complexity: \Omega(match_length * match_results.size()) + // O(match_length * _M_nfa.size() * match_results.size()) + // Space complexity: \Omega(_M_nfa.size() + match_results.size()) + // O(_M_nfa.size() * match_results.size()) + template + bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_main_dispatch(_Match_mode __match_mode, __bfs) + { + _M_states._M_queue(_M_states._M_start, _M_results); + bool __ret = false; + while (1) + { + _M_has_sol = false; + if (_M_states._M_match_queue.empty()) + break; + std::fill_n(_M_states._M_visited_states.get(), _M_nfa.size(), false); + auto __old_queue = std::move(_M_states._M_match_queue); + for (auto& __task : __old_queue) + { + _M_cur_results = std::move(__task.second); + _M_dfs(__match_mode, __task.first); + } + if (__match_mode == _Match_mode::_Prefix) + __ret |= _M_has_sol; + if (_M_current == _M_end) + break; + ++_M_current; + } + if (__match_mode == _Match_mode::_Exact) + __ret = _M_has_sol; + _M_states._M_match_queue.clear(); + return __ret; + } + + // Return whether now match the given sub-NFA. + template + bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_lookahead(_StateIdT __next) + { + // Backreferences may refer to captured content. + // We may want to make this faster by not copying, + // but let's not be clever prematurely. + _ResultsVec __what(_M_cur_results); + _Executor __sub(_M_current, _M_end, __what, _M_re, _M_flags); + __sub._M_states._M_start = __next; + if (__sub._M_search_from_first()) + { + for (size_t __i = 0; __i < __what.size(); __i++) + if (__what[__i].matched) + _M_cur_results[__i] = __what[__i]; + return true; + } + return false; + } + + // __rep_count records how many times (__rep_count.second) + // this node is visited under certain input iterator + // (__rep_count.first). This prevent the executor from entering + // infinite loop by refusing to continue when it's already been + // visited more than twice. It's `twice` instead of `once` because + // we need to spare one more time for potential group capture. + template + void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_rep_once_more(_Match_mode __match_mode, _StateIdT __i) + { + const auto& __state = _M_nfa[__i]; + auto& __rep_count = _M_rep_count[__i]; + if (__rep_count.second == 0 || __rep_count.first != _M_current) + { + auto __back = __rep_count; + __rep_count.first = _M_current; + __rep_count.second = 1; + _M_dfs(__match_mode, __state._M_alt); + __rep_count = __back; + } + else + { + if (__rep_count.second < 2) + { + __rep_count.second++; + _M_dfs(__match_mode, __state._M_alt); + __rep_count.second--; + } + } + }; + + // _M_alt branch is "match once more", while _M_next is "get me out + // of this quantifier". Executing _M_next first or _M_alt first don't + // mean the same thing, and we need to choose the correct order under + // given greedy mode. + template + void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_repeat(_Match_mode __match_mode, _StateIdT __i) + { + const auto& __state = _M_nfa[__i]; + + // Greedy. + if (!__state._M_neg) + { + _M_rep_once_more(__match_mode, __i); + // If it's DFS executor and already accepted, we're done. + if (!__dfs_mode || !_M_has_sol) + _M_dfs(__match_mode, __state._M_next); + } + else // Non-greedy mode + { + if (__dfs_mode) + { + // vice-versa. + _M_dfs(__match_mode, __state._M_next); + if (!_M_has_sol) + _M_rep_once_more(__match_mode, __i); + } + else + { + // DON'T attempt anything, because there's already another + // state with higher priority accepted. This state cannot + // be better by attempting its next node. + if (!_M_has_sol) + { + _M_dfs(__match_mode, __state._M_next); + // DON'T attempt anything if it's already accepted. An + // accepted state *must* be better than a solution that + // matches a non-greedy quantifier one more time. + if (!_M_has_sol) + _M_rep_once_more(__match_mode, __i); + } + } + } + } + + template + void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_subexpr_begin(_Match_mode __match_mode, _StateIdT __i) + { + const auto& __state = _M_nfa[__i]; + + auto& __res = _M_cur_results[__state._M_subexpr]; + auto __back = __res.first; + __res.first = _M_current; + _M_dfs(__match_mode, __state._M_next); + __res.first = __back; + } + + template + void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_subexpr_end(_Match_mode __match_mode, _StateIdT __i) + { + const auto& __state = _M_nfa[__i]; + + auto& __res = _M_cur_results[__state._M_subexpr]; + auto __back = __res; + __res.second = _M_current; + __res.matched = true; + _M_dfs(__match_mode, __state._M_next); + __res = __back; + } + + template + inline void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_line_begin_assertion(_Match_mode __match_mode, _StateIdT __i) + { + const auto& __state = _M_nfa[__i]; + if (_M_at_begin()) + _M_dfs(__match_mode, __state._M_next); + } + + template + inline void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_line_end_assertion(_Match_mode __match_mode, _StateIdT __i) + { + const auto& __state = _M_nfa[__i]; + if (_M_at_end()) + _M_dfs(__match_mode, __state._M_next); + } + + template + inline void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_word_boundary(_Match_mode __match_mode, _StateIdT __i) + { + const auto& __state = _M_nfa[__i]; + if (_M_word_boundary() == !__state._M_neg) + _M_dfs(__match_mode, __state._M_next); + } + + // Here __state._M_alt offers a single start node for a sub-NFA. + // We recursively invoke our algorithm to match the sub-NFA. + template + void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_subexpr_lookahead(_Match_mode __match_mode, _StateIdT __i) + { + const auto& __state = _M_nfa[__i]; + if (_M_lookahead(__state._M_alt) == !__state._M_neg) + _M_dfs(__match_mode, __state._M_next); + } + + template + void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_match(_Match_mode __match_mode, _StateIdT __i) + { + const auto& __state = _M_nfa[__i]; + + if (_M_current == _M_end) + return; + if (__dfs_mode) + { + if (__state._M_matches(*_M_current)) + { + ++_M_current; + _M_dfs(__match_mode, __state._M_next); + --_M_current; + } + } + else + if (__state._M_matches(*_M_current)) + _M_states._M_queue(__state._M_next, _M_cur_results); + } + + // First fetch the matched result from _M_cur_results as __submatch; + // then compare it with + // (_M_current, _M_current + (__submatch.second - __submatch.first)). + // If matched, keep going; else just return and try another state. + template + void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_backref(_Match_mode __match_mode, _StateIdT __i) + { + __glibcxx_assert(__dfs_mode); + + const auto& __state = _M_nfa[__i]; + auto& __submatch = _M_cur_results[__state._M_backref_index]; + if (!__submatch.matched) + return; + auto __last = _M_current; + for (auto __tmp = __submatch.first; + __last != _M_end && __tmp != __submatch.second; + ++__tmp) + ++__last; + if (_M_re._M_automaton->_M_traits.transform(__submatch.first, + __submatch.second) + == _M_re._M_automaton->_M_traits.transform(_M_current, __last)) + { + if (__last != _M_current) + { + auto __backup = _M_current; + _M_current = __last; + _M_dfs(__match_mode, __state._M_next); + _M_current = __backup; + } + else + _M_dfs(__match_mode, __state._M_next); + } + } + + template + void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_accept(_Match_mode __match_mode, _StateIdT __i) + { + if (__dfs_mode) + { + __glibcxx_assert(!_M_has_sol); + if (__match_mode == _Match_mode::_Exact) + _M_has_sol = _M_current == _M_end; + else + _M_has_sol = true; + if (_M_current == _M_begin + && (_M_flags & regex_constants::match_not_null)) + _M_has_sol = false; + if (_M_has_sol) + { + if (_M_nfa._M_flags & regex_constants::ECMAScript) + _M_results = _M_cur_results; + else // POSIX + { + __glibcxx_assert(_M_states._M_get_sol_pos()); + // Here's POSIX's logic: match the longest one. However + // we never know which one (lhs or rhs of "|") is longer + // unless we try both of them and compare the results. + // The member variable _M_sol_pos records the end + // position of the last successful match. It's better + // to be larger, because POSIX regex is always greedy. + // TODO: This could be slow. + if (*_M_states._M_get_sol_pos() == _BiIter() + || std::distance(_M_begin, + *_M_states._M_get_sol_pos()) + < std::distance(_M_begin, _M_current)) + { + *_M_states._M_get_sol_pos() = _M_current; + _M_results = _M_cur_results; + } + } + } + } + else + { + if (_M_current == _M_begin + && (_M_flags & regex_constants::match_not_null)) + return; + if (__match_mode == _Match_mode::_Prefix || _M_current == _M_end) + if (!_M_has_sol) + { + _M_has_sol = true; + _M_results = _M_cur_results; + } + } + } + + template + void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_handle_alternative(_Match_mode __match_mode, _StateIdT __i) + { + const auto& __state = _M_nfa[__i]; + + if (_M_nfa._M_flags & regex_constants::ECMAScript) + { + // TODO: Fix BFS support. It is wrong. + _M_dfs(__match_mode, __state._M_alt); + // Pick lhs if it matches. Only try rhs if it doesn't. + if (!_M_has_sol) + _M_dfs(__match_mode, __state._M_next); + } + else + { + // Try both and compare the result. + // See "case _S_opcode_accept:" handling above. + _M_dfs(__match_mode, __state._M_alt); + auto __has_sol = _M_has_sol; + _M_has_sol = false; + _M_dfs(__match_mode, __state._M_next); + _M_has_sol |= __has_sol; + } + } + + template + void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_dfs(_Match_mode __match_mode, _StateIdT __i) + { + if (_M_states._M_visited(__i)) + return; + + switch (_M_nfa[__i]._M_opcode()) + { + case _S_opcode_repeat: + _M_handle_repeat(__match_mode, __i); break; + case _S_opcode_subexpr_begin: + _M_handle_subexpr_begin(__match_mode, __i); break; + case _S_opcode_subexpr_end: + _M_handle_subexpr_end(__match_mode, __i); break; + case _S_opcode_line_begin_assertion: + _M_handle_line_begin_assertion(__match_mode, __i); break; + case _S_opcode_line_end_assertion: + _M_handle_line_end_assertion(__match_mode, __i); break; + case _S_opcode_word_boundary: + _M_handle_word_boundary(__match_mode, __i); break; + case _S_opcode_subexpr_lookahead: + _M_handle_subexpr_lookahead(__match_mode, __i); break; + case _S_opcode_match: + _M_handle_match(__match_mode, __i); break; + case _S_opcode_backref: + _M_handle_backref(__match_mode, __i); break; + case _S_opcode_accept: + _M_handle_accept(__match_mode, __i); break; + case _S_opcode_alternative: + _M_handle_alternative(__match_mode, __i); break; + default: + __glibcxx_assert(false); + } + } + + // Return whether now is at some word boundary. + template + bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>:: + _M_word_boundary() const + { + if (_M_current == _M_begin && (_M_flags & regex_constants::match_not_bow)) + return false; + if (_M_current == _M_end && (_M_flags & regex_constants::match_not_eow)) + return false; + + bool __left_is_word = false; + if (_M_current != _M_begin + || (_M_flags & regex_constants::match_prev_avail)) + { + auto __prev = _M_current; + if (_M_is_word(*std::prev(__prev))) + __left_is_word = true; + } + bool __right_is_word = + _M_current != _M_end && _M_is_word(*_M_current); + + return __left_is_word != __right_is_word; + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace __detail +} // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_scanner.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_scanner.h similarity index 92% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_scanner.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_scanner.h index b47103e82..37ad862a6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_scanner.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_scanner.h @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -43,7 +43,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { public: /// Token types returned from the scanner. - enum _TokenT + enum _TokenT : unsigned { _S_token_anychar, _S_token_ord_char, @@ -73,7 +73,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _S_token_comma, _S_token_dup_count, _S_token_eof, - _S_token_unknown + _S_token_bracket_dash, + _S_token_unknown = -1u }; protected: @@ -95,11 +96,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_awk_escape_tbl), _M_spec_char(_M_is_ecma() ? _M_ecma_spec_char - : _M_is_basic() + : _M_flags & regex_constants::basic ? _M_basic_spec_char - : _M_extended_spec_char), + : _M_flags & regex_constants::extended + ? _M_extended_spec_char + : _M_flags & regex_constants::grep + ? ".[\\*^$\n" + : _M_flags & regex_constants::egrep + ? ".[\\()*+?{|^$\n" + : _M_flags & regex_constants::awk + ? _M_extended_spec_char + : nullptr), _M_at_bracket_start(false) - { } + { __glibcxx_assert(_M_spec_char); } protected: const char* @@ -137,6 +146,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return _M_flags & regex_constants::awk; } protected: + // TODO: Make them static in the next abi change. const std::pair _M_token_tbl[9] = { {'^', _S_token_line_begin}, diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_scanner.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_scanner.tcc similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_scanner.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_scanner.tcc index 155566939..ad0b0477f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/regex_scanner.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/regex_scanner.tcc @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -84,7 +84,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_scan_in_brace(); else { - _GLIBCXX_DEBUG_ASSERT(false); + __glibcxx_assert(false); } } @@ -97,9 +97,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_scan_normal() { auto __c = *_M_current++; - const char* __pos; - if (std::strchr(_M_spec_char, _M_ctype.narrow(__c, '\0')) == nullptr) + if (std::strchr(_M_spec_char, _M_ctype.narrow(__c, ' ')) == nullptr) { _M_token = _S_token_ord_char; _M_value.assign(1, __c); @@ -108,7 +107,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__c == '\\') { if (_M_current == _M_end) - __throw_regex_error(regex_constants::error_escape); + __throw_regex_error( + regex_constants::error_escape, + "Unexpected end of regex when escaping."); if (!_M_is_basic() || (*_M_current != '(' @@ -125,7 +126,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (_M_is_ecma() && *_M_current == '?') { if (++_M_current == _M_end) - __throw_regex_error(regex_constants::error_paren); + __throw_regex_error( + regex_constants::error_paren, + "Unexpected end of regex when in an open parenthesis."); if (*_M_current == ':') { @@ -145,7 +148,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_value.assign(1, 'n'); } else - __throw_regex_error(regex_constants::error_paren); + __throw_regex_error( + regex_constants::error_paren, + "Invalid special open parenthesis."); } else if (_M_flags & regex_constants::nosubs) _M_token = _S_token_subexpr_no_group_begin; @@ -171,12 +176,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_state = _S_state_in_brace; _M_token = _S_token_interval_begin; } - else if (((__pos = std::strchr(_M_spec_char, _M_ctype.narrow(__c, '\0'))) - != nullptr - && *__pos != '\0' - && __c != ']' - && __c != '}') - || (_M_is_grep() && __c == '\n')) + else if (__c != ']' && __c != '}') { auto __it = _M_token_tbl; auto __narrowc = _M_ctype.narrow(__c, '\0'); @@ -186,7 +186,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_token = __it->second; return; } - _GLIBCXX_DEBUG_ASSERT(false); + __glibcxx_assert(false); } else { @@ -204,14 +204,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_scan_in_bracket() { if (_M_current == _M_end) - __throw_regex_error(regex_constants::error_brack); + __throw_regex_error( + regex_constants::error_brack, + "Unexpected end of regex when in bracket expression."); auto __c = *_M_current++; - if (__c == '[') + if (__c == '-') + _M_token = _S_token_bracket_dash; + else if (__c == '[') { if (_M_current == _M_end) - __throw_regex_error(regex_constants::error_brack); + __throw_regex_error(regex_constants::error_brack, + "Unexpected character class open bracket."); if (*_M_current == '.') { @@ -261,7 +266,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_scan_in_brace() { if (_M_current == _M_end) - __throw_regex_error(regex_constants::error_brace); + __throw_regex_error( + regex_constants::error_brace, + "Unexpected end of regex when in brace expression."); auto __c = *_M_current++; @@ -285,7 +292,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ++_M_current; } else - __throw_regex_error(regex_constants::error_badbrace); + __throw_regex_error(regex_constants::error_badbrace, + "Unexpected character in brace expression."); } else if (__c == '}') { @@ -293,7 +301,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_token = _S_token_interval_end; } else - __throw_regex_error(regex_constants::error_badbrace); + __throw_regex_error(regex_constants::error_badbrace, + "Unexpected character in brace expression."); } template @@ -302,7 +311,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_eat_escape_ecma() { if (_M_current == _M_end) - __throw_regex_error(regex_constants::error_escape); + __throw_regex_error(regex_constants::error_escape, + "Unexpected end of regex when escaping."); auto __c = *_M_current++; auto __pos = _M_find_escape(_M_ctype.narrow(__c, '\0')); @@ -336,7 +346,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else if (__c == 'c') { if (_M_current == _M_end) - __throw_regex_error(regex_constants::error_escape); + __throw_regex_error( + regex_constants::error_escape, + "Unexpected end of regex when reading control code."); _M_token = _S_token_ord_char; _M_value.assign(1, *_M_current++); } @@ -347,7 +359,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { if (_M_current == _M_end || !_M_ctype.is(_CtypeT::xdigit, *_M_current)) - __throw_regex_error(regex_constants::error_escape); + __throw_regex_error( + regex_constants::error_escape, + "Unexpected end of regex when ascii character."); _M_value += *_M_current++; } _M_token = _S_token_hex_num; @@ -376,7 +390,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_eat_escape_posix() { if (_M_current == _M_end) - __throw_regex_error(regex_constants::error_escape); + __throw_regex_error(regex_constants::error_escape, + "Unexpected end of regex when escaping."); auto __c = *_M_current; auto __pos = std::strchr(_M_spec_char, _M_ctype.narrow(__c, '\0')); @@ -401,7 +416,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { #ifdef __STRICT_ANSI__ // POSIX says it is undefined to escape ordinary characters - __throw_regex_error(regex_constants::error_escape); + __throw_regex_error(regex_constants::error_escape, + "Unexpected escape character."); #else _M_token = _S_token_ord_char; _M_value.assign(1, __c); @@ -441,7 +457,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return; } else - __throw_regex_error(regex_constants::error_escape); + __throw_regex_error(regex_constants::error_escape, + "Unexpected escape character."); } // Eats a character class or throws an exception. @@ -460,9 +477,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION || *_M_current++ != ']') // skip ']' { if (__ch == ':') - __throw_regex_error(regex_constants::error_ctype); + __throw_regex_error(regex_constants::error_ctype, + "Unexpected end of character class."); else - __throw_regex_error(regex_constants::error_collate); + __throw_regex_error(regex_constants::error_collate, + "Unexpected end of character class."); } } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/shared_ptr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/shared_ptr.h similarity index 68% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/shared_ptr.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/shared_ptr.h index f96c07835..fe933ff2a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/shared_ptr.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/shared_ptr.h @@ -1,6 +1,6 @@ // shared_ptr and weak_ptr implementation -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -41,7 +41,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -/** @file bits/shared_ptr.h +/** @file * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{memory} */ @@ -92,17 +92,29 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template class shared_ptr : public __shared_ptr<_Tp> { - template - using _Convertible - = typename enable_if::value>::type; + template + using _Constructible = typename enable_if< + is_constructible<__shared_ptr<_Tp>, _Args...>::value + >::type; + + template + using _Assignable = typename enable_if< + is_assignable<__shared_ptr<_Tp>&, _Arg>::value, shared_ptr& + >::type; public: + + using element_type = typename __shared_ptr<_Tp>::element_type; + +#if __cplusplus > 201402L +# define __cpp_lib_shared_ptr_weak_type 201606 + using weak_type = weak_ptr<_Tp>; +#endif /** * @brief Construct an empty %shared_ptr. * @post use_count()==0 && get()==0 */ - constexpr shared_ptr() noexcept - : __shared_ptr<_Tp>() { } + constexpr shared_ptr() noexcept : __shared_ptr<_Tp>() { } shared_ptr(const shared_ptr&) noexcept = default; @@ -112,9 +124,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @post use_count() == 1 && get() == __p * @throw std::bad_alloc, in which case @c delete @a __p is called. */ - template - explicit shared_ptr(_Tp1* __p) - : __shared_ptr<_Tp>(__p) { } + template> + explicit + shared_ptr(_Yp* __p) : __shared_ptr<_Tp>(__p) { } /** * @brief Construct a %shared_ptr that owns the pointer @a __p @@ -129,8 +141,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * __shared_ptr will release __p by calling __d(__p) */ - template - shared_ptr(_Tp1* __p, _Deleter __d) + template> + shared_ptr(_Yp* __p, _Deleter __d) : __shared_ptr<_Tp>(__p, __d) { } /** @@ -165,8 +178,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * __shared_ptr will release __p by calling __d(__p) */ - template - shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a) + template> + shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) : __shared_ptr<_Tp>(__p, __d, std::move(__a)) { } /** @@ -206,8 +220,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * assert(pii.use_count() == 2); * @endcode */ - template - shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p) noexcept + template + shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) noexcept : __shared_ptr<_Tp>(__r, __p) { } /** @@ -217,8 +231,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @param __r A %shared_ptr. * @post get() == __r.get() && use_count() == __r.use_count() */ - template> - shared_ptr(const shared_ptr<_Tp1>& __r) noexcept + template&>> + shared_ptr(const shared_ptr<_Yp>& __r) noexcept : __shared_ptr<_Tp>(__r) { } /** @@ -234,8 +249,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @param __r A %shared_ptr rvalue. * @post *this contains the old value of @a __r, @a __r is empty. */ - template> - shared_ptr(shared_ptr<_Tp1>&& __r) noexcept + template>> + shared_ptr(shared_ptr<_Yp>&& __r) noexcept : __shared_ptr<_Tp>(std::move(__r)) { } /** @@ -246,22 +261,32 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @throw bad_weak_ptr when __r.expired(), * in which case the constructor has no effect. */ - template - explicit shared_ptr(const weak_ptr<_Tp1>& __r) + template&>> + explicit shared_ptr(const weak_ptr<_Yp>& __r) : __shared_ptr<_Tp>(__r) { } #if _GLIBCXX_USE_DEPRECATED - template - shared_ptr(std::auto_ptr<_Tp1>&& __r); + template>> + shared_ptr(auto_ptr<_Yp>&& __r); #endif // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2399. shared_ptr's constructor from unique_ptr should be constrained - template::pointer>> - shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r) + template>> + shared_ptr(unique_ptr<_Yp, _Del>&& __r) : __shared_ptr<_Tp>(std::move(__r)) { } +#if __cplusplus <= 201402L && _GLIBCXX_USE_DEPRECATED + // This non-standard constructor exists to support conversions that + // were possible in C++11 and C++14 but are ill-formed in C++17. + // If an exception is thrown this constructor has no effect. + template, __sp_array_delete>* = 0> + shared_ptr(unique_ptr<_Yp, _Del>&& __r) + : __shared_ptr<_Tp>(std::move(__r), __sp_array_delete()) { } +#endif + /** * @brief Construct an empty %shared_ptr. * @post use_count() == 0 && get() == nullptr @@ -270,18 +295,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION shared_ptr& operator=(const shared_ptr&) noexcept = default; - template - shared_ptr& - operator=(const shared_ptr<_Tp1>& __r) noexcept + template + _Assignable&> + operator=(const shared_ptr<_Yp>& __r) noexcept { this->__shared_ptr<_Tp>::operator=(__r); return *this; } #if _GLIBCXX_USE_DEPRECATED - template - shared_ptr& - operator=(std::auto_ptr<_Tp1>&& __r) + template + _Assignable> + operator=(auto_ptr<_Yp>&& __r) { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; @@ -295,17 +320,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } - template - shared_ptr& - operator=(shared_ptr<_Tp1>&& __r) noexcept + template + _Assignable> + operator=(shared_ptr<_Yp>&& __r) noexcept { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; } - template - shared_ptr& - operator=(std::unique_ptr<_Tp1, _Del>&& __r) + template + _Assignable> + operator=(unique_ptr<_Yp, _Del>&& __r) { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; @@ -319,8 +344,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...) { } - template - friend shared_ptr<_Tp1> + template + friend shared_ptr<_Yp> allocate_shared(const _Alloc& __a, _Args&&... __args); // This constructor is non-standard, it is used by weak_ptr::lock(). @@ -330,11 +355,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class weak_ptr<_Tp>; }; +#if __cpp_deduction_guides >= 201606 + template + shared_ptr(weak_ptr<_Tp>) -> shared_ptr<_Tp>; + template + shared_ptr(unique_ptr<_Tp, _Del>) -> shared_ptr<_Tp>; +#endif + // 20.7.2.2.7 shared_ptr comparisons - template + template inline bool - operator==(const shared_ptr<_Tp1>& __a, - const shared_ptr<_Tp2>& __b) noexcept + operator==(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { return __a.get() == __b.get(); } template @@ -347,10 +378,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return !__a; } - template + template inline bool - operator!=(const shared_ptr<_Tp1>& __a, - const shared_ptr<_Tp2>& __b) noexcept + operator!=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { return __a.get() != __b.get(); } template @@ -363,29 +393,35 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return (bool)__a; } - template + template inline bool - operator<(const shared_ptr<_Tp1>& __a, - const shared_ptr<_Tp2>& __b) noexcept + operator<(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { - typedef typename std::common_type<_Tp1*, _Tp2*>::type _CT; - return std::less<_CT>()(__a.get(), __b.get()); + using _Tp_elt = typename shared_ptr<_Tp>::element_type; + using _Up_elt = typename shared_ptr<_Up>::element_type; + using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; + return less<_Vp>()(__a.get(), __b.get()); } template inline bool operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept - { return std::less<_Tp*>()(__a.get(), nullptr); } + { + using _Tp_elt = typename shared_ptr<_Tp>::element_type; + return less<_Tp_elt*>()(__a.get(), nullptr); + } template inline bool operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept - { return std::less<_Tp*>()(nullptr, __a.get()); } + { + using _Tp_elt = typename shared_ptr<_Tp>::element_type; + return less<_Tp_elt*>()(nullptr, __a.get()); + } - template + template inline bool - operator<=(const shared_ptr<_Tp1>& __a, - const shared_ptr<_Tp2>& __b) noexcept + operator<=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { return !(__b < __a); } template @@ -398,26 +434,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return !(__a < nullptr); } - template + template inline bool - operator>(const shared_ptr<_Tp1>& __a, - const shared_ptr<_Tp2>& __b) noexcept + operator>(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { return (__b < __a); } template inline bool operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept - { return std::less<_Tp*>()(nullptr, __a.get()); } + { return nullptr < __a; } template inline bool operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept - { return std::less<_Tp*>()(__a.get(), nullptr); } + { return __a < nullptr; } - template + template inline bool - operator>=(const shared_ptr<_Tp1>& __a, - const shared_ptr<_Tp2>& __b) noexcept + operator>=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept { return !(__a < __b); } template @@ -441,25 +475,41 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { __a.swap(__b); } // 20.7.2.2.9 shared_ptr casts. - template + template inline shared_ptr<_Tp> - static_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept - { return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get())); } - - template - inline shared_ptr<_Tp> - const_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept - { return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get())); } - - template - inline shared_ptr<_Tp> - dynamic_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept + static_pointer_cast(const shared_ptr<_Up>& __r) noexcept { - if (_Tp* __p = dynamic_cast<_Tp*>(__r.get())) - return shared_ptr<_Tp>(__r, __p); - return shared_ptr<_Tp>(); + using _Sp = shared_ptr<_Tp>; + return _Sp(__r, static_cast(__r.get())); } + template + inline shared_ptr<_Tp> + const_pointer_cast(const shared_ptr<_Up>& __r) noexcept + { + using _Sp = shared_ptr<_Tp>; + return _Sp(__r, const_cast(__r.get())); + } + + template + inline shared_ptr<_Tp> + dynamic_pointer_cast(const shared_ptr<_Up>& __r) noexcept + { + using _Sp = shared_ptr<_Tp>; + if (auto* __p = dynamic_cast(__r.get())) + return _Sp(__r, __p); + return _Sp(); + } + +#if __cplusplus > 201402L + template + inline shared_ptr<_Tp> + reinterpret_pointer_cast(const shared_ptr<_Up>& __r) noexcept + { + using _Sp = shared_ptr<_Tp>; + return _Sp(__r, reinterpret_cast(__r.get())); + } +#endif /** * @brief A smart pointer with weak semantics. @@ -469,43 +519,50 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template class weak_ptr : public __weak_ptr<_Tp> { - template - using _Convertible - = typename enable_if::value>::type; + template + using _Constructible = typename enable_if< + is_constructible<__weak_ptr<_Tp>, _Arg>::value + >::type; + + template + using _Assignable = typename enable_if< + is_assignable<__weak_ptr<_Tp>&, _Arg>::value, weak_ptr& + >::type; public: constexpr weak_ptr() noexcept = default; - template> - weak_ptr(const shared_ptr<_Tp1>& __r) noexcept + template&>> + weak_ptr(const shared_ptr<_Yp>& __r) noexcept : __weak_ptr<_Tp>(__r) { } weak_ptr(const weak_ptr&) noexcept = default; - template> - weak_ptr(const weak_ptr<_Tp1>& __r) noexcept + template&>> + weak_ptr(const weak_ptr<_Yp>& __r) noexcept : __weak_ptr<_Tp>(__r) { } weak_ptr(weak_ptr&&) noexcept = default; - template> - weak_ptr(weak_ptr<_Tp1>&& __r) noexcept + template>> + weak_ptr(weak_ptr<_Yp>&& __r) noexcept : __weak_ptr<_Tp>(std::move(__r)) { } weak_ptr& operator=(const weak_ptr& __r) noexcept = default; - template - weak_ptr& - operator=(const weak_ptr<_Tp1>& __r) noexcept + template + _Assignable&> + operator=(const weak_ptr<_Yp>& __r) noexcept { this->__weak_ptr<_Tp>::operator=(__r); return *this; } - template - weak_ptr& - operator=(const shared_ptr<_Tp1>& __r) noexcept + template + _Assignable&> + operator=(const shared_ptr<_Yp>& __r) noexcept { this->__weak_ptr<_Tp>::operator=(__r); return *this; @@ -514,9 +571,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION weak_ptr& operator=(weak_ptr&& __r) noexcept = default; - template - weak_ptr& - operator=(weak_ptr<_Tp1>&& __r) noexcept + template + _Assignable> + operator=(weak_ptr<_Yp>&& __r) noexcept { this->__weak_ptr<_Tp>::operator=(std::move(__r)); return *this; @@ -527,6 +584,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return shared_ptr<_Tp>(*this, std::nothrow); } }; +#if __cpp_deduction_guides >= 201606 + template + weak_ptr(shared_ptr<_Tp>) -> weak_ptr<_Tp>; +#endif + // 20.7.2.3.6 weak_ptr specialized algorithms. template inline void @@ -535,9 +597,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Primary template owner_less - template + template struct owner_less; + /// Void specialization of owner_less + template<> + struct owner_less : _Sp_owner_less + { }; + /// Partial specialization of owner_less for shared_ptr. template struct owner_less> @@ -576,21 +643,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION shared_from_this() const { return shared_ptr(this->_M_weak_this); } +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 +#define __cpp_lib_enable_shared_from_this 201603 + weak_ptr<_Tp> + weak_from_this() noexcept + { return this->_M_weak_this; } + + weak_ptr + weak_from_this() const noexcept + { return this->_M_weak_this; } +#endif + private: template void _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept { _M_weak_this._M_assign(__p, __n); } - template - friend void - __enable_shared_from_this_helper(const __shared_count<>& __pn, - const enable_shared_from_this* __pe, - const _Tp1* __px) noexcept - { - if (__pe != 0) - __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn); - } + // Found by ADL when this is an associated class. + friend const enable_shared_from_this* + __enable_shared_from_this_base(const __shared_count<>&, + const enable_shared_from_this* __p) + { return __p; } + + template + friend class __shared_ptr; mutable weak_ptr<_Tp> _M_weak_this; }; @@ -637,7 +714,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { size_t operator()(const shared_ptr<_Tp>& __s) const noexcept - { return std::hash<_Tp*>()(__s.get()); } + { + return std::hash::element_type*>()(__s.get()); + } }; // @} group pointer_abstractions diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/shared_ptr_atomic.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/shared_ptr_atomic.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/shared_ptr_atomic.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/shared_ptr_atomic.h index 9eec3e04b..d05d68655 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/shared_ptr_atomic.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/shared_ptr_atomic.h @@ -1,6 +1,6 @@ // shared_ptr atomic access -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/shared_ptr_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/shared_ptr_base.h similarity index 73% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/shared_ptr_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/shared_ptr_base.h index 8c3af1285..c8d7f20d5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/shared_ptr_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/shared_ptr_base.h @@ -1,6 +1,6 @@ // shared_ptr and weak_ptr implementation details -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -49,7 +49,12 @@ #ifndef _SHARED_PTR_BASE_H #define _SHARED_PTR_BASE_H 1 +#if __cpp_rtti +# include +#endif #include +#include +#include #include namespace std _GLIBCXX_VISIBILITY(default) @@ -67,10 +72,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class bad_weak_ptr : public std::exception { public: - virtual char const* - what() const noexcept; + virtual char const* what() const noexcept; - virtual ~bad_weak_ptr() noexcept; + virtual ~bad_weak_ptr() noexcept; }; // Substitute for bad_weak_ptr object in the case of -fno-exceptions. @@ -108,31 +112,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class _Sp_counted_base : public _Mutex_base<_Lp> { - public: + public: _Sp_counted_base() noexcept : _M_use_count(1), _M_weak_count(1) { } - + virtual ~_Sp_counted_base() noexcept { } - + // Called when _M_use_count drops to zero, to release the resources // managed by *this. virtual void _M_dispose() noexcept = 0; - + // Called when _M_weak_count drops to zero. virtual void _M_destroy() noexcept { delete this; } - + virtual void* _M_get_deleter(const std::type_info&) noexcept = 0; void _M_add_ref_copy() { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } - + void _M_add_ref_lock(); @@ -154,8 +158,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // See http://gcc.gnu.org/ml/libstdc++/2005-11/msg00136.html if (_Mutex_base<_Lp>::_S_need_barriers) { - _GLIBCXX_READ_MEM_BARRIER; - _GLIBCXX_WRITE_MEM_BARRIER; + __atomic_thread_fence (__ATOMIC_ACQ_REL); } // Be race-detector-friendly. For more info see bits/c++config. @@ -168,7 +171,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } } - + void _M_weak_add_ref() noexcept { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } @@ -185,13 +188,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { // See _M_release(), // destroy() must observe results of dispose() - _GLIBCXX_READ_MEM_BARRIER; - _GLIBCXX_WRITE_MEM_BARRIER; + __atomic_thread_fence (__ATOMIC_ACQ_REL); } _M_destroy(); } } - + long _M_get_use_count() const noexcept { @@ -200,7 +202,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __atomic_load_n(&_M_use_count, __ATOMIC_RELAXED); } - private: + private: _Sp_counted_base(_Sp_counted_base const&) = delete; _Sp_counted_base& operator=(_Sp_counted_base const&) = delete; @@ -231,7 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } - template<> + template<> inline void _Sp_counted_base<_S_atomic>:: _M_add_ref_lock() @@ -243,10 +245,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__count == 0) __throw_bad_weak_ptr(); // Replace the current counter value with the old value + 1, as - // long as it's not changed meanwhile. + // long as it's not changed meanwhile. } while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, - true, __ATOMIC_ACQ_REL, + true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED)); } @@ -557,6 +559,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Impl _M_impl; }; + // The default deleter for shared_ptr and shared_ptr. + struct __sp_array_delete + { + template + void operator()(_Yp* __p) const { delete[] __p; } + }; template<_Lock_policy _Lp> class __shared_count @@ -580,6 +588,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } + template + __shared_count(_Ptr __p, /* is_array = */ false_type) + : __shared_count(__p) + { } + + template + __shared_count(_Ptr __p, /* is_array = */ true_type) + : __shared_count(__p, __sp_array_delete{}, allocator()) + { } + template __shared_count(_Ptr __p, _Deleter __d) : __shared_count(__p, std::move(__d), allocator()) @@ -632,6 +650,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION explicit __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0) { + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2415. Inconsistency between unique_ptr and shared_ptr + if (__r.get() == nullptr) + return; + using _Ptr = typename unique_ptr<_Tp, _Del>::pointer; using _Del2 = typename conditional::value, reference_wrapper::type>, @@ -841,68 +864,240 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_pi = nullptr; } - // Support for enable_shared_from_this. +#define __cpp_lib_shared_ptr_arrays 201603 - // Friend of __enable_shared_from_this. - template<_Lock_policy _Lp, typename _Tp1, typename _Tp2> - void - __enable_shared_from_this_helper(const __shared_count<_Lp>&, - const __enable_shared_from_this<_Tp1, - _Lp>*, const _Tp2*) noexcept; + // Helper traits for shared_ptr of array: - // Friend of enable_shared_from_this. - template - void - __enable_shared_from_this_helper(const __shared_count<>&, - const enable_shared_from_this<_Tp1>*, - const _Tp2*) noexcept; + // A pointer type Y* is said to be compatible with a pointer type T* when + // either Y* is convertible to T* or Y is U[N] and T is U cv []. + template + struct __sp_compatible_with + : false_type + { }; - template<_Lock_policy _Lp> - inline void - __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...) noexcept - { } + template + struct __sp_compatible_with<_Yp*, _Tp*> + : is_convertible<_Yp*, _Tp*>::type + { }; + template + struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]> + : true_type + { }; + + template + struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]> + : true_type + { }; + + template + struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]> + : true_type + { }; + + template + struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]> + : true_type + { }; + + // Test conversion from Y(*)[N] to U(*)[N] without forming invalid type Y[N]. + template + struct __sp_is_constructible_arrN + : false_type + { }; + + template + struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>> + : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type + { }; + + // Test conversion from Y(*)[] to U(*)[] without forming invalid type Y[]. + template + struct __sp_is_constructible_arr + : false_type + { }; + + template + struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>> + : is_convertible<_Yp(*)[], _Up(*)[]>::type + { }; + + // Trait to check if shared_ptr can be constructed from Y*. + template + struct __sp_is_constructible; + + // When T is U[N], Y(*)[N] shall be convertible to T*; + template + struct __sp_is_constructible<_Up[_Nm], _Yp> + : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type + { }; + + // when T is U[], Y(*)[] shall be convertible to T*; + template + struct __sp_is_constructible<_Up[], _Yp> + : __sp_is_constructible_arr<_Up, _Yp>::type + { }; + + // otherwise, Y* shall be convertible to T*. + template + struct __sp_is_constructible + : is_convertible<_Yp*, _Tp*>::type + { }; + + + // Define operator* and operator-> for shared_ptr. + template::value, bool = is_void<_Tp>::value> + class __shared_ptr_access + { + public: + using element_type = _Tp; + + element_type& + operator*() const noexcept + { + __glibcxx_assert(_M_get() != nullptr); + return *_M_get(); + } + + element_type* + operator->() const noexcept + { + _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr); + return _M_get(); + } + + private: + element_type* + _M_get() const noexcept + { return static_cast*>(this)->get(); } + }; + + // Define operator-> for shared_ptr. + template + class __shared_ptr_access<_Tp, _Lp, false, true> + { + public: + using element_type = _Tp; + + element_type* + operator->() const noexcept + { + auto __ptr = static_cast*>(this)->get(); + _GLIBCXX_DEBUG_PEDASSERT(__ptr != nullptr); + return __ptr; + } + }; + + // Define operator[] for shared_ptr and shared_ptr. + template + class __shared_ptr_access<_Tp, _Lp, true, false> + { + public: + using element_type = typename remove_extent<_Tp>::type; + +#if __cplusplus <= 201402L + [[__deprecated__("shared_ptr::operator* is absent from C++17")]] + element_type& + operator*() const noexcept + { + __glibcxx_assert(_M_get() != nullptr); + return *_M_get(); + } + + [[__deprecated__("shared_ptr::operator-> is absent from C++17")]] + element_type* + operator->() const noexcept + { + _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr); + return _M_get(); + } +#endif + + element_type& + operator[](ptrdiff_t __i) const + { + __glibcxx_assert(_M_get() != nullptr); + __glibcxx_assert(!extent<_Tp>::value || __i < extent<_Tp>::value); + return _M_get()[__i]; + } + + private: + element_type* + _M_get() const noexcept + { return static_cast*>(this)->get(); } + }; template class __shared_ptr + : public __shared_ptr_access<_Tp, _Lp> { - template - using _Convertible - = typename enable_if::value>::type; + public: + using element_type = typename remove_extent<_Tp>::type; + + private: + // Constraint for taking ownership of a pointer of type _Yp*: + template + using _SafeConv + = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type; + + // Constraint for construction from shared_ptr and weak_ptr: + template + using _Compatible = typename + enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; + + // Constraint for assignment from shared_ptr and weak_ptr: + template + using _Assignable = _Compatible<_Yp, __shared_ptr&>; + + // Constraint for construction from unique_ptr: + template::pointer> + using _UniqCompatible = typename enable_if<__and_< + __sp_compatible_with<_Yp*, _Tp*>, is_convertible<_Ptr, element_type*> + >::value, _Res>::type; + + // Constraint for assignment from unique_ptr: + template + using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>; public: - typedef _Tp element_type; + +#if __cplusplus > 201402L + using weak_type = __weak_ptr<_Tp, _Lp>; +#endif constexpr __shared_ptr() noexcept : _M_ptr(0), _M_refcount() { } - template - explicit __shared_ptr(_Tp1* __p) - : _M_ptr(__p), _M_refcount(__p) + template> + explicit + __shared_ptr(_Yp* __p) + : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type()) { - __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) - static_assert( !is_void<_Tp1>::value, "incomplete type" ); - static_assert( sizeof(_Tp1) > 0, "incomplete type" ); - __enable_shared_from_this_helper(_M_refcount, __p, __p); + static_assert( !is_void<_Yp>::value, "incomplete type" ); + static_assert( sizeof(_Yp) > 0, "incomplete type" ); + _M_enable_shared_from_this_with(__p); } - template - __shared_ptr(_Tp1* __p, _Deleter __d) + template> + __shared_ptr(_Yp* __p, _Deleter __d) : _M_ptr(__p), _M_refcount(__p, __d) { - __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) - // TODO requires _Deleter CopyConstructible and __d(__p) well-formed - __enable_shared_from_this_helper(_M_refcount, __p, __p); + static_assert(__is_invocable<_Deleter&, _Yp*&>::value, + "deleter expression d(p) is well-formed"); + _M_enable_shared_from_this_with(__p); } - template - __shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a) + template> + __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) : _M_ptr(__p), _M_refcount(__p, __d, std::move(__a)) { - __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) - // TODO requires _Deleter CopyConstructible and __d(__p) well-formed - __enable_shared_from_this_helper(_M_refcount, __p, __p); + static_assert(__is_invocable<_Deleter&, _Yp*&>::value, + "deleter expression d(p) is well-formed"); + _M_enable_shared_from_this_with(__p); } template @@ -915,8 +1110,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_ptr(0), _M_refcount(__p, __d, std::move(__a)) { } - template - __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, _Tp* __p) noexcept + template + __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r, + element_type* __p) noexcept : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws { } @@ -924,8 +1120,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __shared_ptr& operator=(const __shared_ptr&) noexcept = default; ~__shared_ptr() = default; - template> - __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r) noexcept + template> + __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) { } @@ -936,48 +1132,63 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __r._M_ptr = 0; } - template> - __shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r) noexcept + template> + __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount() { _M_refcount._M_swap(__r._M_refcount); __r._M_ptr = 0; } - template - explicit __shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r) + template> + explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r) : _M_refcount(__r._M_refcount) // may throw { - __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) - // It is now safe to copy __r._M_ptr, as // _M_refcount(__r._M_refcount) did not throw. _M_ptr = __r._M_ptr; } // If an exception is thrown this constructor has no effect. - template::pointer>> - __shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r) + template> + __shared_ptr(unique_ptr<_Yp, _Del>&& __r) : _M_ptr(__r.get()), _M_refcount() { - __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) auto __raw = _S_raw_ptr(__r.get()); _M_refcount = __shared_count<_Lp>(std::move(__r)); - __enable_shared_from_this_helper(_M_refcount, __raw, __raw); + _M_enable_shared_from_this_with(__raw); } +#if __cplusplus <= 201402L && _GLIBCXX_USE_DEPRECATED + protected: + // If an exception is thrown this constructor has no effect. + template>, is_array<_Tp1>, + is_convertible::pointer, _Tp*> + >::value, bool>::type = true> + __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete) + : _M_ptr(__r.get()), _M_refcount() + { + auto __raw = _S_raw_ptr(__r.get()); + _M_refcount = __shared_count<_Lp>(std::move(__r)); + _M_enable_shared_from_this_with(__raw); + } + public: +#endif + #if _GLIBCXX_USE_DEPRECATED // Postcondition: use_count() == 1 and __r.get() == 0 - template - __shared_ptr(std::auto_ptr<_Tp1>&& __r); + template> + __shared_ptr(auto_ptr<_Yp>&& __r); #endif constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { } - template - __shared_ptr& - operator=(const __shared_ptr<_Tp1, _Lp>& __r) noexcept + template + _Assignable<_Yp> + operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept { _M_ptr = __r._M_ptr; _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw @@ -985,9 +1196,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #if _GLIBCXX_USE_DEPRECATED - template - __shared_ptr& - operator=(std::auto_ptr<_Tp1>&& __r) + template + _Assignable<_Yp> + operator=(auto_ptr<_Yp>&& __r) { __shared_ptr(std::move(__r)).swap(*this); return *this; @@ -1001,17 +1212,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } - template - __shared_ptr& - operator=(__shared_ptr<_Tp1, _Lp>&& __r) noexcept + template + _Assignable<_Yp> + operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept { __shared_ptr(std::move(__r)).swap(*this); return *this; } - template - __shared_ptr& - operator=(std::unique_ptr<_Tp1, _Del>&& __r) + template + _UniqAssignable<_Yp, _Del> + operator=(unique_ptr<_Yp, _Del>&& __r) { __shared_ptr(std::move(__r)).swap(*this); return *this; @@ -1021,41 +1232,26 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION reset() noexcept { __shared_ptr().swap(*this); } - template - void - reset(_Tp1* __p) // _Tp1 must be complete. + template + _SafeConv<_Yp> + reset(_Yp* __p) // _Yp must be complete. { // Catch self-reset errors. - _GLIBCXX_DEBUG_ASSERT(__p == 0 || __p != _M_ptr); + __glibcxx_assert(__p == 0 || __p != _M_ptr); __shared_ptr(__p).swap(*this); } - template - void - reset(_Tp1* __p, _Deleter __d) + template + _SafeConv<_Yp> + reset(_Yp* __p, _Deleter __d) { __shared_ptr(__p, __d).swap(*this); } - template - void - reset(_Tp1* __p, _Deleter __d, _Alloc __a) + template + _SafeConv<_Yp> + reset(_Yp* __p, _Deleter __d, _Alloc __a) { __shared_ptr(__p, __d, std::move(__a)).swap(*this); } - // Allow class instantiation when _Tp is [cv-qual] void. - typename std::add_lvalue_reference<_Tp>::type - operator*() const noexcept - { - _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0); - return *_M_ptr; - } - - _Tp* - operator->() const noexcept - { - _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0); - return _M_ptr; - } - - _Tp* + element_type* get() const noexcept { return _M_ptr; } @@ -1100,7 +1296,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // This relies on _Sp_counted_ptr_inplace::_M_get_deleter. void* __p = _M_refcount._M_get_deleter(typeid(__tag)); _M_ptr = static_cast<_Tp*>(__p); - __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr); + _M_enable_shared_from_this_with(_M_ptr); } #else template @@ -1132,7 +1328,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __shared_count<_Lp> __count(__ptr, __del, __del._M_alloc); _M_refcount._M_swap(__count); _M_ptr = __ptr; - __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr); + _M_enable_shared_from_this_with(_M_ptr); } #endif @@ -1152,6 +1348,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class __weak_ptr<_Tp, _Lp>; private: + + template + using __esft_base_t = decltype(__enable_shared_from_this_base( + std::declval&>(), + std::declval<_Yp*>())); + + // Detect an accessible and unambiguous enable_shared_from_this base. + template + struct __has_esft_base + : false_type { }; + + template + struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>> + : __not_> { }; // No enable shared_from_this for arrays + + template::type> + typename enable_if<__has_esft_base<_Yp2>::value>::type + _M_enable_shared_from_this_with(_Yp* __p) noexcept + { + if (auto __base = __enable_shared_from_this_base(_M_refcount, __p)) + __base->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount); + } + + template::type> + typename enable_if::value>::type + _M_enable_shared_from_this_with(_Yp*) noexcept + { } + void* _M_get_deleter(const std::type_info& __ti) const noexcept { return _M_refcount._M_get_deleter(__ti); } @@ -1172,7 +1396,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept; - _Tp* _M_ptr; // Contained pointer. + element_type* _M_ptr; // Contained pointer. __shared_count<_Lp> _M_refcount; // Reference counter. }; @@ -1210,24 +1434,32 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return (bool)__a; } - template + template inline bool - operator<(const __shared_ptr<_Tp1, _Lp>& __a, - const __shared_ptr<_Tp2, _Lp>& __b) noexcept + operator<(const __shared_ptr<_Tp, _Lp>& __a, + const __shared_ptr<_Up, _Lp>& __b) noexcept { - typedef typename std::common_type<_Tp1*, _Tp2*>::type _CT; - return std::less<_CT>()(__a.get(), __b.get()); + using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; + using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type; + using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; + return less<_Vp>()(__a.get(), __b.get()); } template inline bool operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept - { return std::less<_Tp*>()(__a.get(), nullptr); } + { + using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; + return less<_Tp_elt*>()(__a.get(), nullptr); + } template inline bool operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept - { return std::less<_Tp*>()(nullptr, __a.get()); } + { + using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; + return less<_Tp_elt*>()(nullptr, __a.get()); + } template inline bool @@ -1254,12 +1486,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline bool operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept - { return std::less<_Tp*>()(nullptr, __a.get()); } + { return nullptr < __a; } template inline bool operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept - { return std::less<_Tp*>()(__a.get(), nullptr); } + { return __a < nullptr; } template inline bool @@ -1309,7 +1541,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline __shared_ptr<_Tp, _Lp> static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept - { return __shared_ptr<_Tp, _Lp>(__r, static_cast<_Tp*>(__r.get())); } + { + using _Sp = __shared_ptr<_Tp, _Lp>; + return _Sp(__r, static_cast(__r.get())); + } // The seemingly equivalent code: // shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get())) @@ -1319,7 +1554,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline __shared_ptr<_Tp, _Lp> const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept - { return __shared_ptr<_Tp, _Lp>(__r, const_cast<_Tp*>(__r.get())); } + { + using _Sp = __shared_ptr<_Tp, _Lp>; + return _Sp(__r, const_cast(__r.get())); + } // The seemingly equivalent code: // shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get())) @@ -1330,21 +1568,35 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline __shared_ptr<_Tp, _Lp> dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept { - if (_Tp* __p = dynamic_cast<_Tp*>(__r.get())) - return __shared_ptr<_Tp, _Lp>(__r, __p); - return __shared_ptr<_Tp, _Lp>(); + using _Sp = __shared_ptr<_Tp, _Lp>; + if (auto* __p = dynamic_cast(__r.get())) + return _Sp(__r, __p); + return _Sp(); } +#if __cplusplus > 201402L + template + inline __shared_ptr<_Tp, _Lp> + reinterpret_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept + { + using _Sp = __shared_ptr<_Tp, _Lp>; + return _Sp(__r, reinterpret_cast(__r.get())); + } +#endif template class __weak_ptr { - template - using _Convertible - = typename enable_if::value>::type; + template + using _Compatible = typename + enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; + + // Constraint for assignment from shared_ptr and weak_ptr: + template + using _Assignable = _Compatible<_Yp, __weak_ptr&>; public: - typedef _Tp element_type; + using element_type = typename remove_extent<_Tp>::type; constexpr __weak_ptr() noexcept : _M_ptr(nullptr), _M_refcount() @@ -1368,13 +1620,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // // It is not possible to avoid spurious access violations since // in multithreaded programs __r._M_ptr may be invalidated at any point. - template> - __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r) noexcept + template> + __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept : _M_refcount(__r._M_refcount) { _M_ptr = __r.lock().get(); } - template> - __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r) noexcept + template> + __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) { } @@ -1382,26 +1634,26 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount)) { __r._M_ptr = nullptr; } - template> - __weak_ptr(__weak_ptr<_Tp1, _Lp>&& __r) noexcept + template> + __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept : _M_ptr(__r.lock().get()), _M_refcount(std::move(__r._M_refcount)) { __r._M_ptr = nullptr; } __weak_ptr& operator=(const __weak_ptr& __r) noexcept = default; - template - __weak_ptr& - operator=(const __weak_ptr<_Tp1, _Lp>& __r) noexcept + template + _Assignable<_Yp> + operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept { _M_ptr = __r.lock().get(); _M_refcount = __r._M_refcount; return *this; } - template - __weak_ptr& - operator=(const __shared_ptr<_Tp1, _Lp>& __r) noexcept + template + _Assignable<_Yp> + operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept { _M_ptr = __r._M_ptr; _M_refcount = __r._M_refcount; @@ -1417,9 +1669,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } - template - __weak_ptr& - operator=(__weak_ptr<_Tp1, _Lp>&& __r) noexcept + template + _Assignable<_Yp> + operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept { _M_ptr = __r.lock().get(); _M_refcount = std::move(__r._M_refcount); @@ -1465,8 +1717,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept { - _M_ptr = __ptr; - _M_refcount = __refcount; + if (use_count() == 0) + { + _M_ptr = __ptr; + _M_refcount = __refcount; + } } template friend class __shared_ptr; @@ -1474,7 +1729,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class __enable_shared_from_this<_Tp, _Lp>; friend class enable_shared_from_this<_Tp>; - _Tp* _M_ptr; // Contained pointer. + element_type* _M_ptr; // Contained pointer. __weak_count<_Lp> _M_refcount; // Reference counter. }; @@ -1500,6 +1755,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __lhs.owner_before(__rhs); } }; + template<> + struct _Sp_owner_less + { + template + auto + operator()(const _Tp& __lhs, const _Up& __rhs) const + -> decltype(__lhs.owner_before(__rhs)) + { return __lhs.owner_before(__rhs); } + + using is_transparent = void; + }; + template struct owner_less<__shared_ptr<_Tp, _Lp>> : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>> @@ -1534,26 +1801,33 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION shared_from_this() const { return __shared_ptr(this->_M_weak_this); } +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + __weak_ptr<_Tp, _Lp> + weak_from_this() noexcept + { return this->_M_weak_this; } + + __weak_ptr + weak_from_this() const noexcept + { return this->_M_weak_this; } +#endif + private: template void _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept { _M_weak_this._M_assign(__p, __n); } - template - friend void - __enable_shared_from_this_helper(const __shared_count<_Lp>& __pn, - const __enable_shared_from_this* __pe, - const _Tp1* __px) noexcept - { - if (__pe != 0) - __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn); - } + friend const __enable_shared_from_this* + __enable_shared_from_this_base(const __shared_count<_Lp>&, + const __enable_shared_from_this* __p) + { return __p; } + + template + friend class __shared_ptr; mutable __weak_ptr<_Tp, _Lp> _M_weak_this; }; - template inline __shared_ptr<_Tp, _Lp> __allocate_shared(const _Alloc& __a, _Args&&... __args) @@ -1578,7 +1852,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { size_t operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept - { return std::hash<_Tp*>()(__s.get()); } + { + return hash::element_type*>()( + __s.get()); + } }; _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/slice_array.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/slice_array.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/slice_array.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/slice_array.h index ee1c546a7..cd668fbc1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/slice_array.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/slice_array.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- slice_array class. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -204,8 +204,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline - slice_array<_Tp>::slice_array(const slice_array<_Tp>& a) - : _M_sz(a._M_sz), _M_stride(a._M_stride), _M_array(a._M_array) {} + slice_array<_Tp>::slice_array(const slice_array<_Tp>& __a) + : _M_sz(__a._M_sz), _M_stride(__a._M_stride), _M_array(__a._M_array) {} // template // inline slice_array<_Tp>::~slice_array () {} diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/specfun.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/specfun.h new file mode 100644 index 000000000..6dd23d2c4 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/specfun.h @@ -0,0 +1,1309 @@ +// Mathematical Special Functions for -*- C++ -*- + +// Copyright (C) 2006-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/specfun.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{cmath} + */ + +#ifndef _GLIBCXX_BITS_SPECFUN_H +#define _GLIBCXX_BITS_SPECFUN_H 1 + +#pragma GCC visibility push(default) + +#include + +#define __STDCPP_MATH_SPEC_FUNCS__ 201003L + +#define __cpp_lib_math_special_functions 201603L + +#if __cplusplus <= 201403L && __STDCPP_WANT_MATH_SPEC_FUNCS__ == 0 +# error include and define __STDCPP_WANT_MATH_SPEC_FUNCS__ +#endif + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @defgroup mathsf Mathematical Special Functions + * @ingroup numerics + * + * A collection of advanced mathematical special functions, + * defined by ISO/IEC IS 29124. + * @{ + */ + + /** + * @mainpage Mathematical Special Functions + * + * @section intro Introduction and History + * The first significant library upgrade on the road to C++2011, + * + * TR1, included a set of 23 mathematical functions that significantly + * extended the standard transcendental functions inherited from C and declared + * in @. + * + * Although most components from TR1 were eventually adopted for C++11 these + * math functions were left behind out of concern for implementability. + * The math functions were published as a separate international standard + * + * IS 29124 - Extensions to the C++ Library to Support Mathematical Special + * Functions. + * + * For C++17 these functions were incorporated into the main standard. + * + * @section contents Contents + * The following functions are implemented in namespace @c std: + * - @ref assoc_laguerre "assoc_laguerre - Associated Laguerre functions" + * - @ref assoc_legendre "assoc_legendre - Associated Legendre functions" + * - @ref beta "beta - Beta functions" + * - @ref comp_ellint_1 "comp_ellint_1 - Complete elliptic functions of the first kind" + * - @ref comp_ellint_2 "comp_ellint_2 - Complete elliptic functions of the second kind" + * - @ref comp_ellint_3 "comp_ellint_3 - Complete elliptic functions of the third kind" + * - @ref cyl_bessel_i "cyl_bessel_i - Regular modified cylindrical Bessel functions" + * - @ref cyl_bessel_j "cyl_bessel_j - Cylindrical Bessel functions of the first kind" + * - @ref cyl_bessel_k "cyl_bessel_k - Irregular modified cylindrical Bessel functions" + * - @ref cyl_neumann "cyl_neumann - Cylindrical Neumann functions or Cylindrical Bessel functions of the second kind" + * - @ref ellint_1 "ellint_1 - Incomplete elliptic functions of the first kind" + * - @ref ellint_2 "ellint_2 - Incomplete elliptic functions of the second kind" + * - @ref ellint_3 "ellint_3 - Incomplete elliptic functions of the third kind" + * - @ref expint "expint - The exponential integral" + * - @ref hermite "hermite - Hermite polynomials" + * - @ref laguerre "laguerre - Laguerre functions" + * - @ref legendre "legendre - Legendre polynomials" + * - @ref riemann_zeta "riemann_zeta - The Riemann zeta function" + * - @ref sph_bessel "sph_bessel - Spherical Bessel functions" + * - @ref sph_legendre "sph_legendre - Spherical Legendre functions" + * - @ref sph_neumann "sph_neumann - Spherical Neumann functions" + * + * The hypergeometric functions were stricken from the TR29124 and C++17 + * versions of this math library because of implementation concerns. + * However, since they were in the TR1 version and since they are popular + * we kept them as an extension in namespace @c __gnu_cxx: + * - @ref conf_hyperg "conf_hyperg - Confluent hypergeometric functions" + * - @ref hyperg "hyperg - Hypergeometric functions" + * + * @section general General Features + * + * @subsection promotion Argument Promotion + * The arguments suppled to the non-suffixed functions will be promoted + * according to the following rules: + * 1. If any argument intended to be floating point is given an integral value + * That integral value is promoted to double. + * 2. All floating point arguments are promoted up to the largest floating + * point precision among them. + * + * @subsection NaN NaN Arguments + * If any of the floating point arguments supplied to these functions is + * invalid or NaN (std::numeric_limits::quiet_NaN), + * the value NaN is returned. + * + * @section impl Implementation + * + * We strive to implement the underlying math with type generic algorithms + * to the greatest extent possible. In practice, the functions are thin + * wrappers that dispatch to function templates. Type dependence is + * controlled with std::numeric_limits and functions thereof. + * + * We don't promote @c float to @c double or @c double to long double + * reflexively. The goal is for @c float functions to operate more quickly, + * at the cost of @c float accuracy and possibly a smaller domain of validity. + * Similaryly, long double should give you more dynamic range + * and slightly more pecision than @c double on many systems. + * + * @section testing Testing + * + * These functions have been tested against equivalent implementations + * from the + * Gnu Scientific Library, GSL and + * should declare abs(double) + +#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO + inline _GLIBCXX_CONSTEXPR double + abs(double __x) + { return __builtin_fabs(__x); } + + inline _GLIBCXX_CONSTEXPR float + abs(float __x) + { return __builtin_fabsf(__x); } + + inline _GLIBCXX_CONSTEXPR long double + abs(long double __x) + { return __builtin_fabsl(__x); } +#endif + +#if defined(__GLIBCXX_TYPE_INT_N_0) + inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_0 + abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; } +#endif +#if defined(__GLIBCXX_TYPE_INT_N_1) + inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_1 + abs(__GLIBCXX_TYPE_INT_N_1 __x) { return __x >= 0 ? __x : -__x; } +#endif +#if defined(__GLIBCXX_TYPE_INT_N_2) + inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_2 + abs(__GLIBCXX_TYPE_INT_N_2 __x) { return __x >= 0 ? __x : -__x; } +#endif +#if defined(__GLIBCXX_TYPE_INT_N_3) + inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_3 + abs(__GLIBCXX_TYPE_INT_N_3 __x) { return __x >= 0 ? __x : -__x; } +#endif + +#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) + inline _GLIBCXX_CONSTEXPR + __float128 + abs(__float128 __x) + { return __x < 0 ? -__x : __x; } +#endif + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace +} + +#endif // _GLIBCXX_BITS_STD_ABS_H diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/std_function.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/std_function.h new file mode 100644 index 000000000..b393a9448 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/std_function.h @@ -0,0 +1,811 @@ +// Implementation of std::function -*- C++ -*- + +// Copyright (C) 2004-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file include/bits/function.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{functional} + */ + +#ifndef _GLIBCXX_STD_FUNCTION_H +#define _GLIBCXX_STD_FUNCTION_H 1 + +#pragma GCC system_header + +#if __cplusplus < 201103L +# include +#else + +#if __cpp_rtti +# include +#endif +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * Derives from @c unary_function or @c binary_function, or perhaps + * nothing, depending on the number of arguments provided. The + * primary template is the basis case, which derives nothing. + */ + template + struct _Maybe_unary_or_binary_function { }; + + /// Derives from @c unary_function, as appropriate. + template + struct _Maybe_unary_or_binary_function<_Res, _T1> + : std::unary_function<_T1, _Res> { }; + + /// Derives from @c binary_function, as appropriate. + template + struct _Maybe_unary_or_binary_function<_Res, _T1, _T2> + : std::binary_function<_T1, _T2, _Res> { }; + + + /** + * @brief Exception class thrown when class template function's + * operator() is called with an empty target. + * @ingroup exceptions + */ + class bad_function_call : public std::exception + { + public: + virtual ~bad_function_call() noexcept; + + const char* what() const noexcept; + }; + + /** + * Trait identifying "location-invariant" types, meaning that the + * address of the object (or any of its members) will not escape. + * Trivially copyable types are location-invariant and users can + * specialize this trait for other types. + */ + template + struct __is_location_invariant + : is_trivially_copyable<_Tp>::type + { }; + + class _Undefined_class; + + union _Nocopy_types + { + void* _M_object; + const void* _M_const_object; + void (*_M_function_pointer)(); + void (_Undefined_class::*_M_member_pointer)(); + }; + + union [[gnu::may_alias]] _Any_data + { + void* _M_access() { return &_M_pod_data[0]; } + const void* _M_access() const { return &_M_pod_data[0]; } + + template + _Tp& + _M_access() + { return *static_cast<_Tp*>(_M_access()); } + + template + const _Tp& + _M_access() const + { return *static_cast(_M_access()); } + + _Nocopy_types _M_unused; + char _M_pod_data[sizeof(_Nocopy_types)]; + }; + + enum _Manager_operation + { + __get_type_info, + __get_functor_ptr, + __clone_functor, + __destroy_functor + }; + + // Simple type wrapper that helps avoid annoying const problems + // when casting between void pointers and pointers-to-pointers. + template + struct _Simple_type_wrapper + { + _Simple_type_wrapper(_Tp __value) : __value(__value) { } + + _Tp __value; + }; + + template + struct __is_location_invariant<_Simple_type_wrapper<_Tp> > + : __is_location_invariant<_Tp> + { }; + + template + class function; + + /// Base class of all polymorphic function object wrappers. + class _Function_base + { + public: + static const std::size_t _M_max_size = sizeof(_Nocopy_types); + static const std::size_t _M_max_align = __alignof__(_Nocopy_types); + + template + class _Base_manager + { + protected: + static const bool __stored_locally = + (__is_location_invariant<_Functor>::value + && sizeof(_Functor) <= _M_max_size + && __alignof__(_Functor) <= _M_max_align + && (_M_max_align % __alignof__(_Functor) == 0)); + + typedef integral_constant _Local_storage; + + // Retrieve a pointer to the function object + static _Functor* + _M_get_pointer(const _Any_data& __source) + { + const _Functor* __ptr = + __stored_locally? std::__addressof(__source._M_access<_Functor>()) + /* have stored a pointer */ : __source._M_access<_Functor*>(); + return const_cast<_Functor*>(__ptr); + } + + // Clone a location-invariant function object that fits within + // an _Any_data structure. + static void + _M_clone(_Any_data& __dest, const _Any_data& __source, true_type) + { + ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>()); + } + + // Clone a function object that is not location-invariant or + // that cannot fit into an _Any_data structure. + static void + _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) + { + __dest._M_access<_Functor*>() = + new _Functor(*__source._M_access<_Functor*>()); + } + + // Destroying a location-invariant object may still require + // destruction. + static void + _M_destroy(_Any_data& __victim, true_type) + { + __victim._M_access<_Functor>().~_Functor(); + } + + // Destroying an object located on the heap. + static void + _M_destroy(_Any_data& __victim, false_type) + { + delete __victim._M_access<_Functor*>(); + } + + public: + static bool + _M_manager(_Any_data& __dest, const _Any_data& __source, + _Manager_operation __op) + { + switch (__op) + { +#if __cpp_rtti + case __get_type_info: + __dest._M_access() = &typeid(_Functor); + break; +#endif + case __get_functor_ptr: + __dest._M_access<_Functor*>() = _M_get_pointer(__source); + break; + + case __clone_functor: + _M_clone(__dest, __source, _Local_storage()); + break; + + case __destroy_functor: + _M_destroy(__dest, _Local_storage()); + break; + } + return false; + } + + static void + _M_init_functor(_Any_data& __functor, _Functor&& __f) + { _M_init_functor(__functor, std::move(__f), _Local_storage()); } + + template + static bool + _M_not_empty_function(const function<_Signature>& __f) + { return static_cast(__f); } + + template + static bool + _M_not_empty_function(_Tp* __fp) + { return __fp != nullptr; } + + template + static bool + _M_not_empty_function(_Tp _Class::* __mp) + { return __mp != nullptr; } + + template + static bool + _M_not_empty_function(const _Tp&) + { return true; } + + private: + static void + _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type) + { ::new (__functor._M_access()) _Functor(std::move(__f)); } + + static void + _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) + { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); } + }; + + _Function_base() : _M_manager(nullptr) { } + + ~_Function_base() + { + if (_M_manager) + _M_manager(_M_functor, _M_functor, __destroy_functor); + } + + bool _M_empty() const { return !_M_manager; } + + typedef bool (*_Manager_type)(_Any_data&, const _Any_data&, + _Manager_operation); + + _Any_data _M_functor; + _Manager_type _M_manager; + }; + + template + class _Function_handler; + + template + class _Function_handler<_Res(_ArgTypes...), _Functor> + : public _Function_base::_Base_manager<_Functor> + { + typedef _Function_base::_Base_manager<_Functor> _Base; + + public: + static _Res + _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) + { + return (*_Base::_M_get_pointer(__functor))( + std::forward<_ArgTypes>(__args)...); + } + }; + + template + class _Function_handler + : public _Function_base::_Base_manager<_Functor> + { + typedef _Function_base::_Base_manager<_Functor> _Base; + + public: + static void + _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) + { + (*_Base::_M_get_pointer(__functor))( + std::forward<_ArgTypes>(__args)...); + } + }; + + template + class _Function_handler<_Res(_ArgTypes...), _Member _Class::*> + : public _Function_handler + { + typedef _Function_handler + _Base; + + public: + static _Res + _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) + { + return std::__invoke(_Base::_M_get_pointer(__functor)->__value, + std::forward<_ArgTypes>(__args)...); + } + }; + + template + class _Function_handler + : public _Function_base::_Base_manager< + _Simple_type_wrapper< _Member _Class::* > > + { + typedef _Member _Class::* _Functor; + typedef _Simple_type_wrapper<_Functor> _Wrapper; + typedef _Function_base::_Base_manager<_Wrapper> _Base; + + public: + static bool + _M_manager(_Any_data& __dest, const _Any_data& __source, + _Manager_operation __op) + { + switch (__op) + { +#if __cpp_rtti + case __get_type_info: + __dest._M_access() = &typeid(_Functor); + break; +#endif + case __get_functor_ptr: + __dest._M_access<_Functor*>() = + &_Base::_M_get_pointer(__source)->__value; + break; + + default: + _Base::_M_manager(__dest, __source, __op); + } + return false; + } + + static void + _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) + { + std::__invoke(_Base::_M_get_pointer(__functor)->__value, + std::forward<_ArgTypes>(__args)...); + } + }; + + template + using __check_func_return_type + = __or_, is_same<_From, _To>, is_convertible<_From, _To>>; + + /** + * @brief Primary class template for std::function. + * @ingroup functors + * + * Polymorphic function wrapper. + */ + template + class function<_Res(_ArgTypes...)> + : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, + private _Function_base + { + template::type> + struct _Callable : __check_func_return_type<_Res2, _Res> { }; + + // Used so the return type convertibility checks aren't done when + // performing overload resolution for copy construction/assignment. + template + struct _Callable : false_type { }; + + template + using _Requires = typename enable_if<_Cond::value, _Tp>::type; + + public: + typedef _Res result_type; + + // [3.7.2.1] construct/copy/destroy + + /** + * @brief Default construct creates an empty function call wrapper. + * @post @c !(bool)*this + */ + function() noexcept + : _Function_base() { } + + /** + * @brief Creates an empty function call wrapper. + * @post @c !(bool)*this + */ + function(nullptr_t) noexcept + : _Function_base() { } + + /** + * @brief %Function copy constructor. + * @param __x A %function object with identical call signature. + * @post @c bool(*this) == bool(__x) + * + * The newly-created %function contains a copy of the target of @a + * __x (if it has one). + */ + function(const function& __x); + + /** + * @brief %Function move constructor. + * @param __x A %function object rvalue with identical call signature. + * + * The newly-created %function contains the target of @a __x + * (if it has one). + */ + function(function&& __x) : _Function_base() + { + __x.swap(*this); + } + + /** + * @brief Builds a %function that targets a copy of the incoming + * function object. + * @param __f A %function object that is callable with parameters of + * type @c T1, @c T2, ..., @c TN and returns a value convertible + * to @c Res. + * + * The newly-created %function object will target a copy of + * @a __f. If @a __f is @c reference_wrapper, then this function + * object will contain a reference to the function object @c + * __f.get(). If @a __f is a NULL function pointer or NULL + * pointer-to-member, the newly-created object will be empty. + * + * If @a __f is a non-NULL function pointer or an object of type @c + * reference_wrapper, this function will not throw. + */ + template>, void>, + typename = _Requires<_Callable<_Functor>, void>> + function(_Functor); + + /** + * @brief %Function assignment operator. + * @param __x A %function with identical call signature. + * @post @c (bool)*this == (bool)x + * @returns @c *this + * + * The target of @a __x is copied to @c *this. If @a __x has no + * target, then @c *this will be empty. + * + * If @a __x targets a function pointer or a reference to a function + * object, then this operation will not throw an %exception. + */ + function& + operator=(const function& __x) + { + function(__x).swap(*this); + return *this; + } + + /** + * @brief %Function move-assignment operator. + * @param __x A %function rvalue with identical call signature. + * @returns @c *this + * + * The target of @a __x is moved to @c *this. If @a __x has no + * target, then @c *this will be empty. + * + * If @a __x targets a function pointer or a reference to a function + * object, then this operation will not throw an %exception. + */ + function& + operator=(function&& __x) + { + function(std::move(__x)).swap(*this); + return *this; + } + + /** + * @brief %Function assignment to zero. + * @post @c !(bool)*this + * @returns @c *this + * + * The target of @c *this is deallocated, leaving it empty. + */ + function& + operator=(nullptr_t) noexcept + { + if (_M_manager) + { + _M_manager(_M_functor, _M_functor, __destroy_functor); + _M_manager = nullptr; + _M_invoker = nullptr; + } + return *this; + } + + /** + * @brief %Function assignment to a new target. + * @param __f A %function object that is callable with parameters of + * type @c T1, @c T2, ..., @c TN and returns a value convertible + * to @c Res. + * @return @c *this + * + * This %function object wrapper will target a copy of @a + * __f. If @a __f is @c reference_wrapper, then this function + * object will contain a reference to the function object @c + * __f.get(). If @a __f is a NULL function pointer or NULL + * pointer-to-member, @c this object will be empty. + * + * If @a __f is a non-NULL function pointer or an object of type @c + * reference_wrapper, this function will not throw. + */ + template + _Requires<_Callable::type>, function&> + operator=(_Functor&& __f) + { + function(std::forward<_Functor>(__f)).swap(*this); + return *this; + } + + /// @overload + template + function& + operator=(reference_wrapper<_Functor> __f) noexcept + { + function(__f).swap(*this); + return *this; + } + + // [3.7.2.2] function modifiers + + /** + * @brief Swap the targets of two %function objects. + * @param __x A %function with identical call signature. + * + * Swap the targets of @c this function object and @a __f. This + * function will not throw an %exception. + */ + void swap(function& __x) noexcept + { + std::swap(_M_functor, __x._M_functor); + std::swap(_M_manager, __x._M_manager); + std::swap(_M_invoker, __x._M_invoker); + } + + // [3.7.2.3] function capacity + + /** + * @brief Determine if the %function wrapper has a target. + * + * @return @c true when this %function object contains a target, + * or @c false when it is empty. + * + * This function will not throw an %exception. + */ + explicit operator bool() const noexcept + { return !_M_empty(); } + + // [3.7.2.4] function invocation + + /** + * @brief Invokes the function targeted by @c *this. + * @returns the result of the target. + * @throws bad_function_call when @c !(bool)*this + * + * The function call operator invokes the target function object + * stored by @c this. + */ + _Res operator()(_ArgTypes... __args) const; + +#if __cpp_rtti + // [3.7.2.5] function target access + /** + * @brief Determine the type of the target of this function object + * wrapper. + * + * @returns the type identifier of the target function object, or + * @c typeid(void) if @c !(bool)*this. + * + * This function will not throw an %exception. + */ + const type_info& target_type() const noexcept; + + /** + * @brief Access the stored target function object. + * + * @return Returns a pointer to the stored target function object, + * if @c typeid(_Functor).equals(target_type()); otherwise, a NULL + * pointer. + * + * This function does not throw exceptions. + * + * @{ + */ + template _Functor* target() noexcept; + + template const _Functor* target() const noexcept; + // @} +#endif + + private: + using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...); + _Invoker_type _M_invoker; + }; + +#if __cpp_deduction_guides >= 201606 + template + struct __function_guide_helper + { }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) & noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) const noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) const & noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + function(_Res(*)(_ArgTypes...)) -> function<_Res(_ArgTypes...)>; + + template::type> + function(_Functor) -> function<_Signature>; +#endif + + // Out-of-line member definitions. + template + function<_Res(_ArgTypes...)>:: + function(const function& __x) + : _Function_base() + { + if (static_cast(__x)) + { + __x._M_manager(_M_functor, __x._M_functor, __clone_functor); + _M_invoker = __x._M_invoker; + _M_manager = __x._M_manager; + } + } + + template + template + function<_Res(_ArgTypes...)>:: + function(_Functor __f) + : _Function_base() + { + typedef _Function_handler<_Res(_ArgTypes...), _Functor> _My_handler; + + if (_My_handler::_M_not_empty_function(__f)) + { + _My_handler::_M_init_functor(_M_functor, std::move(__f)); + _M_invoker = &_My_handler::_M_invoke; + _M_manager = &_My_handler::_M_manager; + } + } + + template + _Res + function<_Res(_ArgTypes...)>:: + operator()(_ArgTypes... __args) const + { + if (_M_empty()) + __throw_bad_function_call(); + return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); + } + +#if __cpp_rtti + template + const type_info& + function<_Res(_ArgTypes...)>:: + target_type() const noexcept + { + if (_M_manager) + { + _Any_data __typeinfo_result; + _M_manager(__typeinfo_result, _M_functor, __get_type_info); + return *__typeinfo_result._M_access(); + } + else + return typeid(void); + } + + template + template + _Functor* + function<_Res(_ArgTypes...)>:: + target() noexcept + { + const function* __const_this = this; + const _Functor* __func = __const_this->template target<_Functor>(); + return const_cast<_Functor*>(__func); + } + + template + template + const _Functor* + function<_Res(_ArgTypes...)>:: + target() const noexcept + { + if (typeid(_Functor) == target_type() && _M_manager) + { + _Any_data __ptr; + _M_manager(__ptr, _M_functor, __get_functor_ptr); + return __ptr._M_access(); + } + else + return nullptr; + } +#endif + + // [20.7.15.2.6] null pointer comparisons + + /** + * @brief Compares a polymorphic function object wrapper against 0 + * (the NULL pointer). + * @returns @c true if the wrapper has no target, @c false otherwise + * + * This function will not throw an %exception. + */ + template + inline bool + operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept + { return !static_cast(__f); } + + /// @overload + template + inline bool + operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept + { return !static_cast(__f); } + + /** + * @brief Compares a polymorphic function object wrapper against 0 + * (the NULL pointer). + * @returns @c false if the wrapper has no target, @c true otherwise + * + * This function will not throw an %exception. + */ + template + inline bool + operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept + { return static_cast(__f); } + + /// @overload + template + inline bool + operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept + { return static_cast(__f); } + + + // [20.7.15.2.7] specialized algorithms + + /** + * @brief Swap the targets of two polymorphic function object wrappers. + * + * This function will not throw an %exception. + */ + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2062. Effect contradictions w/o no-throw guarantee of std::function swaps + template + inline void + swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept + { __x.swap(__y); } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // C++11 + +#endif // _GLIBCXX_STD_FUNCTION_H diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/std_mutex.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/std_mutex.h new file mode 100644 index 000000000..17d55f557 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/std_mutex.h @@ -0,0 +1,373 @@ +// std::mutex implementation -*- C++ -*- + +// Copyright (C) 2003-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/std_mutex.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{mutex} + */ + +#ifndef _GLIBCXX_MUTEX_H +#define _GLIBCXX_MUTEX_H 1 + +#pragma GCC system_header + +#if __cplusplus < 201103L +# include +#else + +#include +#include +#include +#include // for std::swap + +#ifdef _GLIBCXX_USE_C99_STDINT_TR1 + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @defgroup mutexes Mutexes + * @ingroup concurrency + * + * Classes for mutex support. + * @{ + */ + +#ifdef _GLIBCXX_HAS_GTHREADS + // Common base class for std::mutex and std::timed_mutex + class __mutex_base + { + protected: + typedef __gthread_mutex_t __native_type; + +#ifdef __GTHREAD_MUTEX_INIT + __native_type _M_mutex = __GTHREAD_MUTEX_INIT; + + constexpr __mutex_base() noexcept = default; +#else + __native_type _M_mutex; + + __mutex_base() noexcept + { + // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may) + __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex); + } + + ~__mutex_base() noexcept { __gthread_mutex_destroy(&_M_mutex); } +#endif + + __mutex_base(const __mutex_base&) = delete; + __mutex_base& operator=(const __mutex_base&) = delete; + }; + + /// The standard mutex type. + class mutex : private __mutex_base + { + public: + typedef __native_type* native_handle_type; + +#ifdef __GTHREAD_MUTEX_INIT + constexpr +#endif + mutex() noexcept = default; + ~mutex() = default; + + mutex(const mutex&) = delete; + mutex& operator=(const mutex&) = delete; + + void + lock() + { + int __e = __gthread_mutex_lock(&_M_mutex); + + // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may) + if (__e) + __throw_system_error(__e); + } + + bool + try_lock() noexcept + { + // XXX EINVAL, EAGAIN, EBUSY + return !__gthread_mutex_trylock(&_M_mutex); + } + + void + unlock() + { + // XXX EINVAL, EAGAIN, EPERM + __gthread_mutex_unlock(&_M_mutex); + } + + native_handle_type + native_handle() noexcept + { return &_M_mutex; } + }; + +#endif // _GLIBCXX_HAS_GTHREADS + + /// Do not acquire ownership of the mutex. + struct defer_lock_t { explicit defer_lock_t() = default; }; + + /// Try to acquire ownership of the mutex without blocking. + struct try_to_lock_t { explicit try_to_lock_t() = default; }; + + /// Assume the calling thread has already obtained mutex ownership + /// and manage it. + struct adopt_lock_t { explicit adopt_lock_t() = default; }; + + /// Tag used to prevent a scoped lock from acquiring ownership of a mutex. + _GLIBCXX17_INLINE constexpr defer_lock_t defer_lock { }; + + /// Tag used to prevent a scoped lock from blocking if a mutex is locked. + _GLIBCXX17_INLINE constexpr try_to_lock_t try_to_lock { }; + + /// Tag used to make a scoped lock take ownership of a locked mutex. + _GLIBCXX17_INLINE constexpr adopt_lock_t adopt_lock { }; + + /** @brief A simple scoped lock type. + * + * A lock_guard controls mutex ownership within a scope, releasing + * ownership in the destructor. + */ + template + class lock_guard + { + public: + typedef _Mutex mutex_type; + + explicit lock_guard(mutex_type& __m) : _M_device(__m) + { _M_device.lock(); } + + lock_guard(mutex_type& __m, adopt_lock_t) noexcept : _M_device(__m) + { } // calling thread owns mutex + + ~lock_guard() + { _M_device.unlock(); } + + lock_guard(const lock_guard&) = delete; + lock_guard& operator=(const lock_guard&) = delete; + + private: + mutex_type& _M_device; + }; + + /** @brief A movable scoped lock type. + * + * A unique_lock controls mutex ownership within a scope. Ownership of the + * mutex can be delayed until after construction and can be transferred + * to another unique_lock by move construction or move assignment. If a + * mutex lock is owned when the destructor runs ownership will be released. + */ + template + class unique_lock + { + public: + typedef _Mutex mutex_type; + + unique_lock() noexcept + : _M_device(0), _M_owns(false) + { } + + explicit unique_lock(mutex_type& __m) + : _M_device(std::__addressof(__m)), _M_owns(false) + { + lock(); + _M_owns = true; + } + + unique_lock(mutex_type& __m, defer_lock_t) noexcept + : _M_device(std::__addressof(__m)), _M_owns(false) + { } + + unique_lock(mutex_type& __m, try_to_lock_t) + : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock()) + { } + + unique_lock(mutex_type& __m, adopt_lock_t) noexcept + : _M_device(std::__addressof(__m)), _M_owns(true) + { + // XXX calling thread owns mutex + } + + template + unique_lock(mutex_type& __m, + const chrono::time_point<_Clock, _Duration>& __atime) + : _M_device(std::__addressof(__m)), + _M_owns(_M_device->try_lock_until(__atime)) + { } + + template + unique_lock(mutex_type& __m, + const chrono::duration<_Rep, _Period>& __rtime) + : _M_device(std::__addressof(__m)), + _M_owns(_M_device->try_lock_for(__rtime)) + { } + + ~unique_lock() + { + if (_M_owns) + unlock(); + } + + unique_lock(const unique_lock&) = delete; + unique_lock& operator=(const unique_lock&) = delete; + + unique_lock(unique_lock&& __u) noexcept + : _M_device(__u._M_device), _M_owns(__u._M_owns) + { + __u._M_device = 0; + __u._M_owns = false; + } + + unique_lock& operator=(unique_lock&& __u) noexcept + { + if(_M_owns) + unlock(); + + unique_lock(std::move(__u)).swap(*this); + + __u._M_device = 0; + __u._M_owns = false; + + return *this; + } + + void + lock() + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_device->lock(); + _M_owns = true; + } + } + + bool + try_lock() + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_owns = _M_device->try_lock(); + return _M_owns; + } + } + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_owns = _M_device->try_lock_until(__atime); + return _M_owns; + } + } + + template + bool + try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_owns = _M_device->try_lock_for(__rtime); + return _M_owns; + } + } + + void + unlock() + { + if (!_M_owns) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_device) + { + _M_device->unlock(); + _M_owns = false; + } + } + + void + swap(unique_lock& __u) noexcept + { + std::swap(_M_device, __u._M_device); + std::swap(_M_owns, __u._M_owns); + } + + mutex_type* + release() noexcept + { + mutex_type* __ret = _M_device; + _M_device = 0; + _M_owns = false; + return __ret; + } + + bool + owns_lock() const noexcept + { return _M_owns; } + + explicit operator bool() const noexcept + { return owns_lock(); } + + mutex_type* + mutex() const noexcept + { return _M_device; } + + private: + mutex_type* _M_device; + bool _M_owns; // XXX use atomic_bool + }; + + /// Swap overload for unique_lock objects. + template + inline void + swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept + { __x.swap(__y); } + + // @} group mutexes +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace +#endif // _GLIBCXX_USE_C99_STDINT_TR1 + +#endif // C++11 + +#endif // _GLIBCXX_MUTEX_H diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_algo.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_algo.h similarity index 93% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_algo.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_algo.h index 53c455b16..2cd5303a1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_algo.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_algo.h @@ -1,6 +1,6 @@ // Algorithm implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -56,14 +56,14 @@ #ifndef _STL_ALGO_H #define _STL_ALGO_H 1 -#include // for rand +#include // for rand #include #include #include // for _Temporary_buffer #include #if __cplusplus >= 201103L -#include // for std::uniform_int_distribution +#include #endif // See concept_check.h for the __glibcxx_*_requires macros. @@ -306,7 +306,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION while (__unary_pred(--__backTrack)) { if (--__remainder == 0) - return (__first - __count); // Success + return (__first - __count); // Success } __remainder = __count + 1 - (__first - __backTrack); } @@ -314,7 +314,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template + typename _UnaryPredicate> _ForwardIterator __search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, @@ -583,6 +583,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Predicate __pred) { __first = std::find_if_not(__first, __last, __pred); + if (__first == __last) + return true; + ++__first; return std::none_of(__first, __last, __pred); } @@ -859,15 +862,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { __first = std::__find_if(__first, __last, __pred); if (__first == __last) - return __first; + return __first; _ForwardIterator __result = __first; ++__first; for (; __first != __last; ++__first) - if (!__pred(__first)) - { - *__result = _GLIBCXX_MOVE(*__first); - ++__result; - } + if (!__pred(__first)) + { + *__result = _GLIBCXX_MOVE(*__first); + ++__result; + } return __result; } @@ -1020,7 +1023,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline _ForwardIterator unique(_ForwardIterator __first, _ForwardIterator __last, - _BinaryPredicate __binary_pred) + _BinaryPredicate __binary_pred) { // concept requirements __glibcxx_function_requires(_Mutable_ForwardIteratorConcept< @@ -1466,7 +1469,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline _OutputIterator rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, - _ForwardIterator __last, _OutputIterator __result) + _ForwardIterator __last, _OutputIterator __result) { // concept requirements __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) @@ -1476,7 +1479,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_requires_valid_range(__middle, __last); return std::copy(__first, __middle, - std::copy(__middle, __last, __result)); + std::copy(__middle, __last, __result)); } /// This is a helper function... @@ -1735,21 +1738,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RandomAccessIterator __result_first, _RandomAccessIterator __result_last) { +#ifdef _GLIBCXX_CONCEPT_CHECKS typedef typename iterator_traits<_InputIterator>::value_type _InputValueType; typedef typename iterator_traits<_RandomAccessIterator>::value_type _OutputValueType; - typedef typename iterator_traits<_RandomAccessIterator>::difference_type - _DistanceType; +#endif // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) __glibcxx_function_requires(_ConvertibleConcept<_InputValueType, _OutputValueType>) __glibcxx_function_requires(_LessThanOpConcept<_InputValueType, - _OutputValueType>) + _OutputValueType>) __glibcxx_function_requires(_LessThanComparableConcept<_OutputValueType>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); __glibcxx_requires_valid_range(__result_first, __result_last); return std::__partial_sort_copy(__first, __last, @@ -1785,12 +1789,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RandomAccessIterator __result_last, _Compare __comp) { +#ifdef _GLIBCXX_CONCEPT_CHECKS typedef typename iterator_traits<_InputIterator>::value_type _InputValueType; typedef typename iterator_traits<_RandomAccessIterator>::value_type _OutputValueType; - typedef typename iterator_traits<_RandomAccessIterator>::difference_type - _DistanceType; +#endif // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) @@ -1803,6 +1807,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, _OutputValueType, _OutputValueType>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); __glibcxx_requires_valid_range(__result_first, __result_last); return std::__partial_sort_copy(__first, __last, @@ -2018,13 +2023,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { - typedef typename iterator_traits<_ForwardIterator>::value_type - _ValueType; - // concept requirements __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, - _ValueType, _Tp>) + typename iterator_traits<_ForwardIterator>::value_type, _Tp>) __glibcxx_requires_partitioned_lower_pred(__first, __last, __val, __comp); @@ -2075,12 +2077,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { - typedef typename iterator_traits<_ForwardIterator>::value_type - _ValueType; - // concept requirements __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) - __glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>) + __glibcxx_function_requires(_LessThanOpConcept< + _Tp, typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_partitioned_upper(__first, __last, __val); return std::__upper_bound(__first, __last, __val, @@ -2107,13 +2107,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { - typedef typename iterator_traits<_ForwardIterator>::value_type - _ValueType; - // concept requirements __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, - _Tp, _ValueType>) + _Tp, typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_partitioned_upper_pred(__first, __last, __val, __comp); @@ -2181,15 +2178,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { - typedef typename iterator_traits<_ForwardIterator>::value_type - _ValueType; - // concept requirements __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) - __glibcxx_function_requires(_LessThanOpConcept<_ValueType, _Tp>) - __glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>) + __glibcxx_function_requires(_LessThanOpConcept< + typename iterator_traits<_ForwardIterator>::value_type, _Tp>) + __glibcxx_function_requires(_LessThanOpConcept< + _Tp, typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_partitioned_lower(__first, __last, __val); - __glibcxx_requires_partitioned_upper(__first, __last, __val); + __glibcxx_requires_partitioned_upper(__first, __last, __val); return std::__equal_range(__first, __last, __val, __gnu_cxx::__ops::__iter_less_val(), @@ -2218,15 +2214,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { - typedef typename iterator_traits<_ForwardIterator>::value_type - _ValueType; - // concept requirements __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, - _ValueType, _Tp>) + typename iterator_traits<_ForwardIterator>::value_type, _Tp>) __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, - _Tp, _ValueType>) + _Tp, typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_partitioned_lower_pred(__first, __last, __val, __comp); __glibcxx_requires_partitioned_upper_pred(__first, __last, @@ -2252,14 +2245,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template bool binary_search(_ForwardIterator __first, _ForwardIterator __last, - const _Tp& __val) + const _Tp& __val) { - typedef typename iterator_traits<_ForwardIterator>::value_type - _ValueType; - // concept requirements __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) - __glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>) + __glibcxx_function_requires(_LessThanOpConcept< + _Tp, typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_partitioned_lower(__first, __last, __val); __glibcxx_requires_partitioned_upper(__first, __last, __val); @@ -2287,15 +2278,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template bool binary_search(_ForwardIterator __first, _ForwardIterator __last, - const _Tp& __val, _Compare __comp) + const _Tp& __val, _Compare __comp) { - typedef typename iterator_traits<_ForwardIterator>::value_type - _ValueType; - // concept requirements __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, - _Tp, _ValueType>) + _Tp, typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_partitioned_lower_pred(__first, __last, __val, __comp); __glibcxx_requires_partitioned_upper_pred(__first, __last, @@ -2425,7 +2413,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _Pointer, typename _Compare> void __merge_adaptive(_BidirectionalIterator __first, - _BidirectionalIterator __middle, + _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size, @@ -2486,7 +2474,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _Compare> void __merge_without_buffer(_BidirectionalIterator __first, - _BidirectionalIterator __middle, + _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Compare __comp) @@ -2541,9 +2529,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Compare __comp) { typedef typename iterator_traits<_BidirectionalIterator>::value_type - _ValueType; + _ValueType; typedef typename iterator_traits<_BidirectionalIterator>::difference_type - _DistanceType; + _DistanceType; if (__first == __middle || __middle == __last) return; @@ -2594,6 +2582,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename iterator_traits<_BidirectionalIterator>::value_type>) __glibcxx_requires_sorted(__first, __middle); __glibcxx_requires_sorted(__middle, __last); + __glibcxx_requires_irreflexive(__first, __last); std::__inplace_merge(__first, __middle, __last, __gnu_cxx::__ops::__iter_less_iter()); @@ -2636,6 +2625,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename iterator_traits<_BidirectionalIterator>::value_type>) __glibcxx_requires_sorted_pred(__first, __middle, __comp); __glibcxx_requires_sorted_pred(__middle, __last, __comp); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); std::__inplace_merge(__first, __middle, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); @@ -2714,7 +2704,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void __merge_sort_with_buffer(_RandomAccessIterator __first, _RandomAccessIterator __last, - _Pointer __buffer, _Compare __comp) + _Pointer __buffer, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; @@ -2741,8 +2731,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void __stable_sort_adaptive(_RandomAccessIterator __first, _RandomAccessIterator __last, - _Pointer __buffer, _Distance __buffer_size, - _Compare __comp) + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) { const _Distance __len = (__last - __first + 1) / 2; const _RandomAccessIterator __middle = __first + __len; @@ -2805,7 +2795,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else if (__comp(__first1, __first2)) ++__first1; else - ++__first1, ++__first2; + { + ++__first1; + ++__first2; + } return __first2 == __last2; } @@ -2844,6 +2837,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set(__first1, __last1, __first2); __glibcxx_requires_sorted_set(__first2, __last2, __first1); + __glibcxx_requires_irreflexive2(__first1, __last1); + __glibcxx_requires_irreflexive2(__first2, __last2); return std::__includes(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_less_iter()); @@ -2888,6 +2883,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp); __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp); + __glibcxx_requires_irreflexive_pred2(__first1, __last1, __comp); + __glibcxx_requires_irreflexive_pred2(__first2, __last2, __comp); return std::__includes(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__comp)); @@ -2963,6 +2960,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_BidirectionalIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); return std::__next_permutation (__first, __last, __gnu_cxx::__ops::__iter_less_iter()); @@ -2995,6 +2993,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename iterator_traits<_BidirectionalIterator>::value_type, typename iterator_traits<_BidirectionalIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); return std::__next_permutation (__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); @@ -3061,6 +3060,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_BidirectionalIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); return std::__prev_permutation(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); @@ -3093,6 +3093,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename iterator_traits<_BidirectionalIterator>::value_type, typename iterator_traits<_BidirectionalIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); return std::__prev_permutation(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); @@ -3108,7 +3109,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _OutputIterator __result, _Predicate __pred, const _Tp& __new_value) { - for (; __first != __last; ++__first, ++__result) + for (; __first != __last; ++__first, (void)++__result) if (__pred(__first)) *__result = __new_value; else @@ -3232,7 +3233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __last; _ForwardIterator __next = __first; - for (++__next; __next != __last; __first = __next, ++__next) + for (++__next; __next != __last; __first = __next, (void)++__next) if (__comp(__next, __first)) return __next; return __next; @@ -3255,6 +3256,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); return std::__is_sorted_until(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); @@ -3280,6 +3282,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename iterator_traits<_ForwardIterator>::value_type, typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); return std::__is_sorted_until(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); @@ -3302,7 +3305,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_LessThanComparableConcept<_Tp>) return __b < __a ? pair(__b, __a) - : pair(__a, __b); + : pair(__a, __b); } /** @@ -3320,7 +3323,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) { return __comp(__b, __a) ? pair(__b, __a) - : pair(__a, __b); + : pair(__a, __b); } template @@ -3404,6 +3407,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); return std::__minmax_element(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); @@ -3433,6 +3437,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename iterator_traits<_ForwardIterator>::value_type, typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); return std::__minmax_element(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); @@ -3491,7 +3496,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { // Efficiently compare identical prefixes: O(N) if sequences // have the same elements in the same order. - for (; __first1 != __last1; ++__first1, ++__first2) + for (; __first1 != __last1; ++__first1, (void)++__first2) if (!__pred(__first1, __first2)) break; @@ -3607,7 +3612,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Efficiently compare identical prefixes: O(N) if sequences // have the same elements in the same order. for (; __first1 != __last1 && __first2 != __last2; - ++__first1, ++__first2) + ++__first1, (void)++__first2) if (!__pred(__first1, __first2)) break; @@ -3696,9 +3701,79 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return std::__is_permutation(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__pred)); } -#endif + +#if __cplusplus > 201402L + +#define __cpp_lib_clamp 201603 + + /** + * @brief Returns the value clamped between lo and hi. + * @ingroup sorting_algorithms + * @param __val A value of arbitrary type. + * @param __lo A lower limit of arbitrary type. + * @param __hi An upper limit of arbitrary type. + * @return max(__val, __lo) if __val < __hi or min(__val, __hi) otherwise. + */ + template + constexpr const _Tp& + clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi) + { + __glibcxx_assert(!(__hi < __lo)); + return (__val < __lo) ? __lo : (__hi < __val) ? __hi : __val; + } + + /** + * @brief Returns the value clamped between lo and hi. + * @ingroup sorting_algorithms + * @param __val A value of arbitrary type. + * @param __lo A lower limit of arbitrary type. + * @param __hi An upper limit of arbitrary type. + * @param __comp A comparison functor. + * @return max(__val, __lo, __comp) if __comp(__val, __hi) + * or min(__val, __hi, __comp) otherwise. + */ + template + constexpr const _Tp& + clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi, _Compare __comp) + { + __glibcxx_assert(!__comp(__hi, __lo)); + return __comp(__val, __lo) ? __lo : __comp(__hi, __val) ? __hi : __val; + } +#endif // C++17 +#endif // C++14 #ifdef _GLIBCXX_USE_C99_STDINT_TR1 + /** + * @brief Generate two uniformly distributed integers using a + * single distribution invocation. + * @param __b0 The upper bound for the first integer. + * @param __b1 The upper bound for the second integer. + * @param __g A UniformRandomBitGenerator. + * @return A pair (i, j) with i and j uniformly distributed + * over [0, __b0) and [0, __b1), respectively. + * + * Requires: __b0 * __b1 <= __g.max() - __g.min(). + * + * Using uniform_int_distribution with a range that is very + * small relative to the range of the generator ends up wasting + * potentially expensively generated randomness, since + * uniform_int_distribution does not store leftover randomness + * between invocations. + * + * If we know we want two integers in ranges that are sufficiently + * small, we can compose the ranges, use a single distribution + * invocation, and significantly reduce the waste. + */ + template + pair<_IntType, _IntType> + __gen_two_uniform_ints(_IntType __b0, _IntType __b1, + _UniformRandomBitGenerator&& __g) + { + _IntType __x + = uniform_int_distribution<_IntType>{0, (__b0 * __b1) - 1}(__g); + return std::make_pair(__x / __b1, __x % __b1); + } + /** * @brief Shuffle the elements of a sequence using a uniform random * number generator. @@ -3731,6 +3806,48 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename std::make_unsigned<_DistanceType>::type __ud_type; typedef typename std::uniform_int_distribution<__ud_type> __distr_type; typedef typename __distr_type::param_type __p_type; + + typedef typename remove_reference<_UniformRandomNumberGenerator>::type + _Gen; + typedef typename common_type::type + __uc_type; + + const __uc_type __urngrange = __g.max() - __g.min(); + const __uc_type __urange = __uc_type(__last - __first); + + if (__urngrange / __urange >= __urange) + // I.e. (__urngrange >= __urange * __urange) but without wrap issues. + { + _RandomAccessIterator __i = __first + 1; + + // Since we know the range isn't empty, an even number of elements + // means an uneven number of elements /to swap/, in which case we + // do the first one up front: + + if ((__urange % 2) == 0) + { + __distr_type __d{0, 1}; + std::iter_swap(__i++, __first + __d(__g)); + } + + // Now we know that __last - __i is even, so we do the rest in pairs, + // using a single distribution invocation to produce swap positions + // for two successive elements at a time: + + while (__i != __last) + { + const __uc_type __swap_range = __uc_type(__i - __first) + 1; + + const pair<__uc_type, __uc_type> __pospos = + __gen_two_uniform_ints(__swap_range, __swap_range + 1, __g); + + std::iter_swap(__i++, __first + __pospos.first); + std::iter_swap(__i++, __first + __pospos.second); + } + + return; + } + __distr_type __d; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) @@ -3750,7 +3867,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * @param __first An input iterator. * @param __last An input iterator. * @param __f A unary function object. - * @return @p __f (std::move(@p __f) in C++0x). + * @return @p __f * * Applies the function object @p __f to each element in the range * @p [first,last). @p __f must not modify the order of the sequence. @@ -3765,7 +3882,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __glibcxx_requires_valid_range(__first, __last); for (; __first != __last; ++__first) __f(*__first); - return _GLIBCXX_MOVE(__f); + return __f; // N.B. [alg.foreach] says std::move(f) but it's redundant. } /** @@ -4125,7 +4242,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO * consecutive elements for which the predicate returns true. */ template + typename _BinaryPredicate> inline _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, @@ -4167,11 +4284,11 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, - // "the type returned by a _UnaryOperation" - __typeof__(__unary_op(*__first))>) + // "the type returned by a _UnaryOperation" + __typeof__(__unary_op(*__first))>) __glibcxx_requires_valid_range(__first, __last); - for (; __first != __last; ++__first, ++__result) + for (; __first != __last; ++__first, (void)++__result) *__result = __unary_op(*__first); return __result; } @@ -4206,11 +4323,11 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>) __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>) __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, - // "the type returned by a _BinaryOperation" - __typeof__(__binary_op(*__first1,*__first2))>) + // "the type returned by a _BinaryOperation" + __typeof__(__binary_op(*__first1,*__first2))>) __glibcxx_requires_valid_range(__first1, __last1); - for (; __first1 != __last1; ++__first1, ++__first2, ++__result) + for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result) *__result = __binary_op(*__first1, *__first2); return __result; } @@ -4329,8 +4446,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO { // concept requirements __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, - // "the type returned by a _Generator" - __typeof__(__gen())>) + // "the type returned by a _Generator" + __typeof__(__gen())>) for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, ++__first) @@ -4420,6 +4537,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO std::__iterator_category(__result)); } +#if _GLIBCXX_HOSTED /** * @brief Randomly shuffle the elements of a sequence. * @ingroup mutating_algorithms @@ -4450,6 +4568,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO std::iter_swap(__i, __j); } } +#endif /** * @brief Shuffle the elements of a sequence using a random number @@ -4551,6 +4670,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __middle); __glibcxx_requires_valid_range(__middle, __last); + __glibcxx_requires_irreflexive(__first, __last); std::__partial_sort(__first, __middle, __last, __gnu_cxx::__ops::__iter_less_iter()); @@ -4590,6 +4710,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __middle); __glibcxx_requires_valid_range(__middle, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); std::__partial_sort(__first, __middle, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); @@ -4622,6 +4743,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __nth); __glibcxx_requires_valid_range(__nth, __last); + __glibcxx_requires_irreflexive(__first, __last); if (__first == __last || __nth == __last) return; @@ -4661,6 +4783,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __nth); __glibcxx_requires_valid_range(__nth, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); if (__first == __last || __nth == __last) return; @@ -4694,6 +4817,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); } @@ -4725,6 +4849,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_RandomAccessIterator>::value_type, typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } @@ -4792,6 +4917,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set(__first1, __last1, __first2); __glibcxx_requires_sorted_set(__first2, __last2, __first1); + __glibcxx_requires_irreflexive2(__first1, __last1); + __glibcxx_requires_irreflexive2(__first2, __last2); return _GLIBCXX_STD_A::__merge(__first1, __last1, __first2, __last2, __result, @@ -4840,6 +4967,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp); __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp); + __glibcxx_requires_irreflexive_pred2(__first1, __last1, __comp); + __glibcxx_requires_irreflexive_pred2(__first2, __last2, __comp); return _GLIBCXX_STD_A::__merge(__first1, __last1, __first2, __last2, __result, @@ -4893,6 +5022,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); _GLIBCXX_STD_A::__stable_sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); @@ -4928,6 +5058,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_RandomAccessIterator>::value_type, typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); _GLIBCXX_STD_A::__stable_sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); @@ -5005,6 +5136,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set(__first1, __last1, __first2); __glibcxx_requires_sorted_set(__first2, __last2, __first1); + __glibcxx_requires_irreflexive2(__first1, __last1); + __glibcxx_requires_irreflexive2(__first2, __last2); return _GLIBCXX_STD_A::__set_union(__first1, __last1, __first2, __last2, __result, @@ -5052,6 +5185,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp); __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp); + __glibcxx_requires_irreflexive_pred2(__first1, __last1, __comp); + __glibcxx_requires_irreflexive_pred2(__first2, __last2, __comp); return _GLIBCXX_STD_A::__set_union(__first1, __last1, __first2, __last2, __result, @@ -5118,6 +5253,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set(__first1, __last1, __first2); __glibcxx_requires_sorted_set(__first2, __last2, __first1); + __glibcxx_requires_irreflexive2(__first1, __last1); + __glibcxx_requires_irreflexive2(__first2, __last2); return _GLIBCXX_STD_A::__set_intersection(__first1, __last1, __first2, __last2, __result, @@ -5164,6 +5301,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp); __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp); + __glibcxx_requires_irreflexive_pred2(__first1, __last1, __comp); + __glibcxx_requires_irreflexive_pred2(__first2, __last2, __comp); return _GLIBCXX_STD_A::__set_intersection(__first1, __last1, __first2, __last2, __result, @@ -5234,6 +5373,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set(__first1, __last1, __first2); __glibcxx_requires_sorted_set(__first2, __last2, __first1); + __glibcxx_requires_irreflexive2(__first1, __last1); + __glibcxx_requires_irreflexive2(__first2, __last2); return _GLIBCXX_STD_A::__set_difference(__first1, __last1, __first2, __last2, __result, @@ -5282,6 +5423,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp); __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp); + __glibcxx_requires_irreflexive_pred2(__first1, __last1, __comp); + __glibcxx_requires_irreflexive_pred2(__first2, __last2, __comp); return _GLIBCXX_STD_A::__set_difference(__first1, __last1, __first2, __last2, __result, @@ -5360,6 +5503,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set(__first1, __last1, __first2); __glibcxx_requires_sorted_set(__first2, __last2, __first1); + __glibcxx_requires_irreflexive2(__first1, __last1); + __glibcxx_requires_irreflexive2(__first2, __last2); return _GLIBCXX_STD_A::__set_symmetric_difference(__first1, __last1, __first2, __last2, __result, @@ -5409,6 +5554,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_InputIterator1>::value_type>) __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp); __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp); + __glibcxx_requires_irreflexive_pred2(__first1, __last1, __comp); + __glibcxx_requires_irreflexive_pred2(__first2, __last2, __comp); return _GLIBCXX_STD_A::__set_symmetric_difference(__first1, __last1, __first2, __last2, __result, @@ -5447,6 +5594,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); return _GLIBCXX_STD_A::__min_element(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); @@ -5473,6 +5621,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_ForwardIterator>::value_type, typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); return _GLIBCXX_STD_A::__min_element(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); @@ -5509,6 +5658,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); return _GLIBCXX_STD_A::__max_element(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); @@ -5535,11 +5685,136 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO typename iterator_traits<_ForwardIterator>::value_type, typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); return _GLIBCXX_STD_A::__max_element(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } +#if __cplusplus >= 201402L + /// Reservoir sampling algorithm. + template + _RandomAccessIterator + __sample(_InputIterator __first, _InputIterator __last, input_iterator_tag, + _RandomAccessIterator __out, random_access_iterator_tag, + _Size __n, _UniformRandomBitGenerator&& __g) + { + using __distrib_type = uniform_int_distribution<_Size>; + using __param_type = typename __distrib_type::param_type; + __distrib_type __d{}; + _Size __sample_sz = 0; + while (__first != __last && __sample_sz != __n) + { + __out[__sample_sz++] = *__first; + ++__first; + } + for (auto __pop_sz = __sample_sz; __first != __last; + ++__first, (void) ++__pop_sz) + { + const auto __k = __d(__g, __param_type{0, __pop_sz}); + if (__k < __n) + __out[__k] = *__first; + } + return __out + __sample_sz; + } + + /// Selection sampling algorithm. + template + _OutputIterator + __sample(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag, + _OutputIterator __out, _Cat, + _Size __n, _UniformRandomBitGenerator&& __g) + { + using __distrib_type = uniform_int_distribution<_Size>; + using __param_type = typename __distrib_type::param_type; + using _USize = make_unsigned_t<_Size>; + using _Gen = remove_reference_t<_UniformRandomBitGenerator>; + using __uc_type = common_type_t; + + __distrib_type __d{}; + _Size __unsampled_sz = std::distance(__first, __last); + __n = std::min(__n, __unsampled_sz); + + // If possible, we use __gen_two_uniform_ints to efficiently produce + // two random numbers using a single distribution invocation: + + const __uc_type __urngrange = __g.max() - __g.min(); + if (__urngrange / __uc_type(__unsampled_sz) >= __uc_type(__unsampled_sz)) + // I.e. (__urngrange >= __unsampled_sz * __unsampled_sz) but without + // wrapping issues. + { + while (__n != 0 && __unsampled_sz >= 2) + { + const pair<_Size, _Size> __p = + __gen_two_uniform_ints(__unsampled_sz, __unsampled_sz - 1, __g); + + --__unsampled_sz; + if (__p.first < __n) + { + *__out++ = *__first; + --__n; + } + + ++__first; + + if (__n == 0) break; + + --__unsampled_sz; + if (__p.second < __n) + { + *__out++ = *__first; + --__n; + } + + ++__first; + } + } + + // The loop above is otherwise equivalent to this one-at-a-time version: + + for (; __n != 0; ++__first) + if (__d(__g, __param_type{0, --__unsampled_sz}) < __n) + { + *__out++ = *__first; + --__n; + } + return __out; + } + +#if __cplusplus > 201402L +#define __cpp_lib_sample 201603 + /// Take a random sample from a population. + template + _SampleIterator + sample(_PopulationIterator __first, _PopulationIterator __last, + _SampleIterator __out, _Distance __n, + _UniformRandomBitGenerator&& __g) + { + using __pop_cat = typename + std::iterator_traits<_PopulationIterator>::iterator_category; + using __samp_cat = typename + std::iterator_traits<_SampleIterator>::iterator_category; + + static_assert( + __or_, + is_convertible<__samp_cat, random_access_iterator_tag>>::value, + "output range must use a RandomAccessIterator when input range" + " does not meet the ForwardIterator requirements"); + + static_assert(is_integral<_Distance>::value, + "sample size must be an integer type"); + + typename iterator_traits<_PopulationIterator>::difference_type __d = __n; + return std::__sample(__first, __last, __pop_cat{}, __out, __samp_cat{}, + __d, std::forward<_UniformRandomBitGenerator>(__g)); + } +#endif // C++17 +#endif // C++14 + _GLIBCXX_END_NAMESPACE_ALGO } // namespace std diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_algobase.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_algobase.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_algobase.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_algobase.h index 2b69e6189..ea7cd2102 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_algobase.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_algobase.h @@ -1,6 +1,6 @@ // Core algorithmic facilities -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -173,7 +173,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _ForwardIterator2>) __glibcxx_requires_valid_range(__first1, __last1); - for (; __first1 != __last1; ++__first1, ++__first2) + for (; __first1 != __last1; ++__first1, (void)++__first2) std::iter_swap(__first1, __first2); return __first2; } @@ -270,28 +270,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __a; } - // If _Iterator is a __normal_iterator return its base (a plain pointer, - // normally) otherwise return it untouched. See copy, fill, ... + // Fallback implementation of the function in bits/stl_iterator.h used to + // remove the __normal_iterator wrapper. See copy, fill, ... template - struct _Niter_base - : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> - { }; - - template - inline typename _Niter_base<_Iterator>::iterator_type + inline _Iterator __niter_base(_Iterator __it) - { return std::_Niter_base<_Iterator>::_S_base(__it); } - - // Likewise, for move_iterator. - template - struct _Miter_base - : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value> - { }; - - template - inline typename _Miter_base<_Iterator>::iterator_type - __miter_base(_Iterator __it) - { return std::_Miter_base<_Iterator>::_S_base(__it); } + { return __it; } // All of these auxiliary structs serve two purposes. (1) Replace // calls to copy with memmove whenever possible. (Memmove, not memcpy, @@ -306,7 +290,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _OI __copy_m(_II __first, _II __last, _OI __result) { - for (; __first != __last; ++__result, ++__first) + for (; __first != __last; ++__result, (void)++__first) *__result = *__first; return __result; } @@ -320,7 +304,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _OI __copy_m(_II __first, _II __last, _OI __result) { - for (; __first != __last; ++__result, ++__first) + for (; __first != __last; ++__result, (void)++__first) *__result = std::move(*__first); return __result; } @@ -373,9 +357,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) { #if __cplusplus >= 201103L + using __assignable = conditional<_IsMove, + is_move_assignable<_Tp>, + is_copy_assignable<_Tp>>; // trivial types can have deleted assignment - static_assert( is_copy_assignable<_Tp>::value, - "type is not assignable" ); + static_assert( __assignable::type::value, "type is not assignable" ); #endif const ptrdiff_t _Num = __last - __first; if (_Num) @@ -573,9 +559,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) { #if __cplusplus >= 201103L + using __assignable = conditional<_IsMove, + is_move_assignable<_Tp>, + is_copy_assignable<_Tp>>; // trivial types can have deleted assignment - static_assert( is_copy_assignable<_Tp>::value, - "type is not assignable" ); + static_assert( __assignable::type::value, "type is not assignable" ); #endif const ptrdiff_t _Num = __last - __first; if (_Num) @@ -808,7 +796,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { - for (; __first1 != __last1; ++__first1, ++__first2) + for (; __first1 != __last1; ++__first1, (void)++__first2) if (!(*__first1 == *__first2)) return false; return true; @@ -890,7 +878,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); - ++__first1, ++__first2) + ++__first1, (void)++__first2) { if (__comp(__first1, __first2)) return true; @@ -1090,7 +1078,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __glibcxx_function_requires(_InputIteratorConcept<_IIter2>) __glibcxx_requires_valid_range(__first1, __last1); - for (; __first1 != __last1; ++__first1, ++__first2) + for (; __first1 != __last1; ++__first1, (void)++__first2) if (!bool(__binary_pred(*__first1, *__first2))) return false; return true; @@ -1139,7 +1127,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO return _GLIBCXX_STD_A::equal(__first1, __last1, __first2); } - for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) if (!(*__first1 == *__first2)) return false; return __first1 == __last1 && __first2 == __last2; @@ -1186,7 +1175,8 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __binary_pred); } - for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) if (!bool(__binary_pred(*__first1, *__first2))) return false; return __first1 == __last1 && __first2 == __last2; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_bvector.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_bvector.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_bvector.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_bvector.h index 71bee213a..37e000ad9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_bvector.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_bvector.h @@ -1,6 +1,6 @@ // vector specialization -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -500,6 +500,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _Bit_alloc_traits::deallocate(_M_impl, _M_impl._M_end_of_storage - __n, __n); + _M_impl._M_start = _M_impl._M_finish = _Bit_iterator(); + _M_impl._M_end_of_storage = _Bit_pointer(); } } @@ -927,10 +929,7 @@ template } void - swap(vector& __x) -#if __cplusplus >= 201103L - noexcept(_Bit_alloc_traits::_S_nothrow_swap()) -#endif + swap(vector& __x) _GLIBCXX_NOEXCEPT { std::swap(this->_M_impl._M_start, __x._M_impl._M_start); std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); @@ -1057,9 +1056,18 @@ template #if __cplusplus >= 201103L template +#if __cplusplus > 201402L + reference +#else void +#endif emplace_back(_Args&&... __args) - { push_back(bool(__args...)); } + { + push_back(bool(__args...)); +#if __cplusplus > 201402L + return back(); +#endif + } template iterator diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_construct.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_construct.h similarity index 78% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_construct.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_construct.h index 5933d2d5e..c1504e9bc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_construct.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_construct.h @@ -1,6 +1,6 @@ // nonstandard construct and destroy functions -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -84,6 +84,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #endif + template + inline void + _Construct_novalue(_T1* __p) + { ::new(static_cast(__p)) _T1; } + /** * Destroy the object pointed to by a pointer type. */ @@ -127,6 +132,46 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __destroy(__first, __last); } + template + struct _Destroy_n_aux + { + template + static _ForwardIterator + __destroy_n(_ForwardIterator __first, _Size __count) + { + for (; __count > 0; (void)++__first, --__count) + std::_Destroy(std::__addressof(*__first)); + return __first; + } + }; + + template<> + struct _Destroy_n_aux + { + template + static _ForwardIterator + __destroy_n(_ForwardIterator __first, _Size __count) + { + std::advance(__first, __count); + return __first; + } + }; + + /** + * Destroy a range of objects. If the value_type of the object has + * a trivial destructor, the compiler should optimize all of this + * away, otherwise the objects' destructors must be invoked. + */ + template + inline _ForwardIterator + _Destroy_n(_ForwardIterator __first, _Size __count) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + return std::_Destroy_n_aux<__has_trivial_destructor(_Value_type)>:: + __destroy_n(__first, __count); + } + /** * Destroy a range of objects using the supplied allocator. For * nondefault allocators we do not optimize away invocation of diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_deque.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_deque.h similarity index 91% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_deque.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_deque.h index fa3602349..6090635b7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_deque.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_deque.h @@ -1,6 +1,6 @@ // Deque implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -63,6 +63,8 @@ #include #endif +#include + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_CONTAINER @@ -106,10 +108,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER struct _Deque_iterator { #if __cplusplus < 201103L - typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; + typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; - typedef _Tp* _Elt_pointer; - typedef _Tp** _Map_pointer; + typedef _Tp* _Elt_pointer; + typedef _Tp** _Map_pointer; #else private: template @@ -126,13 +128,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER static size_t _S_buffer_size() _GLIBCXX_NOEXCEPT { return __deque_buf_size(sizeof(_Tp)); } - typedef std::random_access_iterator_tag iterator_category; - typedef _Tp value_type; - typedef _Ptr pointer; - typedef _Ref reference; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Deque_iterator _Self; + typedef std::random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Ptr pointer; + typedef _Ref reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Deque_iterator _Self; _Elt_pointer _M_cur; _Elt_pointer _M_first; @@ -141,14 +143,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _Deque_iterator(_Elt_pointer __x, _Map_pointer __y) _GLIBCXX_NOEXCEPT : _M_cur(__x), _M_first(*__y), - _M_last(*__y + _S_buffer_size()), _M_node(__y) { } + _M_last(*__y + _S_buffer_size()), _M_node(__y) { } _Deque_iterator() _GLIBCXX_NOEXCEPT : _M_cur(), _M_first(), _M_last(), _M_node() { } _Deque_iterator(const iterator& __x) _GLIBCXX_NOEXCEPT : _M_cur(__x._M_cur), _M_first(__x._M_first), - _M_last(__x._M_last), _M_node(__x._M_node) { } + _M_last(__x._M_last), _M_node(__x._M_node) { } iterator _M_const_cast() const _GLIBCXX_NOEXCEPT @@ -212,7 +214,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { const difference_type __node_offset = __offset > 0 ? __offset / difference_type(_S_buffer_size()) - : -difference_type((-__offset - 1) + : -difference_type((-__offset - 1) / _S_buffer_size()) - 1; _M_set_node(_M_node + __node_offset); _M_cur = _M_first + (__offset - __node_offset @@ -243,7 +245,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER operator[](difference_type __n) const _GLIBCXX_NOEXCEPT { return *(*this + __n); } - /** + /** * Prepares to traverse new_node. Sets everything except * _M_cur, which should therefore be set by the caller * immediately afterwards, based on _M_first and _M_last. @@ -291,7 +293,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) _GLIBCXX_NOEXCEPT { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) - : (__x._M_node < __y._M_node); } + : (__x._M_node < __y._M_node); } template @@ -299,7 +301,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) _GLIBCXX_NOEXCEPT { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) - : (__x._M_node < __y._M_node); } + : (__x._M_node < __y._M_node); } template inline bool @@ -475,14 +477,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef __gnu_cxx::__alloc_traits<_Map_alloc_type> _Map_alloc_traits; public: - typedef _Alloc allocator_type; + typedef _Alloc allocator_type; typedef typename _Alloc_traits::size_type size_type; allocator_type get_allocator() const _GLIBCXX_NOEXCEPT { return allocator_type(_M_get_Tp_allocator()); } - typedef _Deque_iterator<_Tp, _Tp&, _Ptr> iterator; + typedef _Deque_iterator<_Tp, _Tp&, _Ptr> iterator; typedef _Deque_iterator<_Tp, const _Tp&, _Ptr_const> const_iterator; _Deque_base() @@ -515,8 +517,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER } _Deque_base(_Deque_base&& __x) - : _Deque_base(std::move(__x), - __gnu_cxx::__allocator_always_compares_equal<_Alloc>{}) + : _Deque_base(std::move(__x), typename _Alloc_traits::is_always_equal{}) { } _Deque_base(_Deque_base&& __x, const allocator_type& __a, size_type __n) @@ -596,7 +597,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _Ptr _M_allocate_node() - { + { typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; return _Traits::allocate(_M_impl, __deque_buf_size(sizeof(_Tp))); } @@ -829,10 +830,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template > class deque : protected _Deque_base<_Tp, _Alloc> { +#ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements - typedef typename _Alloc::value_type _Alloc_value_type; + typedef typename _Alloc::value_type _Alloc_value_type; +# if __cplusplus < 201103L __glibcxx_class_requires(_Tp, _SGIAssignableConcept) +# endif __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept) +#endif typedef _Deque_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; @@ -840,18 +845,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef typename _Base::_Map_pointer _Map_pointer; public: - typedef _Tp value_type; - typedef typename _Alloc_traits::pointer pointer; - typedef typename _Alloc_traits::const_pointer const_pointer; - typedef typename _Alloc_traits::reference reference; - typedef typename _Alloc_traits::const_reference const_reference; - typedef typename _Base::iterator iterator; - typedef typename _Base::const_iterator const_iterator; - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Alloc allocator_type; + typedef _Tp value_type; + typedef typename _Alloc_traits::pointer pointer; + typedef typename _Alloc_traits::const_pointer const_pointer; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; + typedef typename _Base::iterator iterator; + typedef typename _Base::const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; protected: static size_t _S_buffer_size() _GLIBCXX_NOEXCEPT @@ -867,7 +872,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER using _Base::_M_deallocate_map; using _Base::_M_get_Tp_allocator; - /** + /** * A total of four data members accumulated down the hierarchy. * May be accessed via _M_impl.* */ @@ -894,6 +899,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief Creates a %deque with default constructed elements. * @param __n The number of elements to initially create. + * @param __a An allocator. * * This constructor fills the %deque with @a n default * constructed elements. @@ -935,13 +941,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief %Deque copy constructor. * @param __x A %deque of identical element and allocator types. * - * The newly-created %deque uses a copy of the allocation object used - * by @a __x. + * The newly-created %deque uses a copy of the allocator object used + * by @a __x (unless the allocator traits dictate a different object). */ deque(const deque& __x) : _Base(_Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator()), __x.size()) - { std::__uninitialized_copy_a(__x.begin(), __x.end(), + { std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } @@ -1014,16 +1020,16 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #if __cplusplus >= 201103L template> - deque(_InputIterator __first, _InputIterator __last, + deque(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) - { _M_initialize_dispatch(__first, __last, __false_type()); } + { _M_initialize_dispatch(__first, __last, __false_type()); } #else template - deque(_InputIterator __first, _InputIterator __last, + deque(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) - { + { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); @@ -1042,8 +1048,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief %Deque assignment operator. * @param __x A %deque of identical element and allocator types. * - * All the elements of @a x are copied, but unlike the copy constructor, - * the allocator object is not copied. + * All the elements of @a x are copied. + * + * The newly-created %deque uses a copy of the allocator object used + * by @a __x (unless the allocator traits dictate a different object). */ deque& operator=(const deque& __x); @@ -1060,9 +1068,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER deque& operator=(deque&& __x) noexcept(_Alloc_traits::_S_always_equal()) { - constexpr bool __always_equal = _Alloc_traits::_S_always_equal(); - _M_move_assign1(std::move(__x), - integral_constant()); + using __always_equal = typename _Alloc_traits::is_always_equal; + _M_move_assign1(std::move(__x), __always_equal{}); return *this; } @@ -1075,12 +1082,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %deque and that the * resulting %deque's size is the same as the number of elements - * assigned. Old data may be lost. + * assigned. */ deque& operator=(initializer_list __l) { - this->assign(__l.begin(), __l.end()); + _M_assign_aux(__l.begin(), __l.end(), + random_access_iterator_tag()); return *this; } #endif @@ -1093,7 +1101,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * This function fills a %deque with @a n copies of the given * value. Note that the assignment completely changes the * %deque and that the resulting %deque's size is the same as - * the number of elements assigned. Old data may be lost. + * the number of elements assigned. */ void assign(size_type __n, const value_type& __val) @@ -1109,19 +1117,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %deque and that the * resulting %deque's size is the same as the number of elements - * assigned. Old data may be lost. + * assigned. */ #if __cplusplus >= 201103L template> - void - assign(_InputIterator __first, _InputIterator __last) - { _M_assign_dispatch(__first, __last, __false_type()); } + void + assign(_InputIterator __first, _InputIterator __last) + { _M_assign_dispatch(__first, __last, __false_type()); } #else template - void - assign(_InputIterator __first, _InputIterator __last) - { + void + assign(_InputIterator __first, _InputIterator __last) + { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } @@ -1137,11 +1145,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %deque and that the * resulting %deque's size is the same as the number of elements - * assigned. Old data may be lost. + * assigned. */ void assign(initializer_list __l) - { this->assign(__l.begin(), __l.end()); } + { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } #endif /// Get a copy of the memory allocation object. @@ -1305,7 +1313,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { const size_type __len = size(); if (__new_size > __len) - insert(this->_M_impl._M_finish, __new_size - __len, __x); + _M_fill_insert(this->_M_impl._M_finish, __new_size - __len, __x); else if (__new_size < __len) _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size)); @@ -1327,7 +1335,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { const size_type __len = size(); if (__new_size > __len) - insert(this->_M_impl._M_finish, __new_size - __len, __x); + _M_fill_insert(this->_M_impl._M_finish, __new_size - __len, __x); else if (__new_size < __len) _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size)); @@ -1363,7 +1371,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ reference operator[](size_type __n) _GLIBCXX_NOEXCEPT - { return this->_M_impl._M_start[difference_type(__n)]; } + { + __glibcxx_requires_subscript(__n); + return this->_M_impl._M_start[difference_type(__n)]; + } /** * @brief Subscript access to the data contained in the %deque. @@ -1378,7 +1389,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ const_reference operator[](size_type __n) const _GLIBCXX_NOEXCEPT - { return this->_M_impl._M_start[difference_type(__n)]; } + { + __glibcxx_requires_subscript(__n); + return this->_M_impl._M_start[difference_type(__n)]; + } protected: /// Safety check used only from at(). @@ -1435,7 +1449,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ reference front() _GLIBCXX_NOEXCEPT - { return *begin(); } + { + __glibcxx_requires_nonempty(); + return *begin(); + } /** * Returns a read-only (constant) reference to the data at the first @@ -1443,7 +1460,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ const_reference front() const _GLIBCXX_NOEXCEPT - { return *begin(); } + { + __glibcxx_requires_nonempty(); + return *begin(); + } /** * Returns a read/write reference to the data at the last element of the @@ -1452,6 +1472,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER reference back() _GLIBCXX_NOEXCEPT { + __glibcxx_requires_nonempty(); iterator __tmp = end(); --__tmp; return *__tmp; @@ -1464,6 +1485,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER const_reference back() const _GLIBCXX_NOEXCEPT { + __glibcxx_requires_nonempty(); const_iterator __tmp = end(); --__tmp; return *__tmp; @@ -1485,8 +1507,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) { _Alloc_traits::construct(this->_M_impl, - this->_M_impl._M_start._M_cur - 1, - __x); + this->_M_impl._M_start._M_cur - 1, + __x); --this->_M_impl._M_start._M_cur; } else @@ -1499,8 +1521,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { emplace_front(std::move(__x)); } template - void - emplace_front(_Args&&... __args); +#if __cplusplus > 201402L + reference +#else + void +#endif + emplace_front(_Args&&... __args); #endif /** @@ -1519,7 +1545,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER != this->_M_impl._M_finish._M_last - 1) { _Alloc_traits::construct(this->_M_impl, - this->_M_impl._M_finish._M_cur, __x); + this->_M_impl._M_finish._M_cur, __x); ++this->_M_impl._M_finish._M_cur; } else @@ -1532,8 +1558,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { emplace_back(std::move(__x)); } template - void - emplace_back(_Args&&... __args); +#if __cplusplus > 201402L + reference +#else + void +#endif + emplace_back(_Args&&... __args); #endif /** @@ -1547,11 +1577,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER void pop_front() _GLIBCXX_NOEXCEPT { + __glibcxx_requires_nonempty(); if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_last - 1) { _Alloc_traits::destroy(this->_M_impl, - this->_M_impl._M_start._M_cur); + this->_M_impl._M_start._M_cur); ++this->_M_impl._M_start._M_cur; } else @@ -1569,12 +1600,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER void pop_back() _GLIBCXX_NOEXCEPT { + __glibcxx_requires_nonempty(); if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_first) { --this->_M_impl._M_finish._M_cur; _Alloc_traits::destroy(this->_M_impl, - this->_M_impl._M_finish._M_cur); + this->_M_impl._M_finish._M_cur); } else _M_pop_back_aux(); @@ -1591,8 +1623,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * with T(std::forward(args)...) before the specified location. */ template - iterator - emplace(const_iterator __position, _Args&&... __args); + iterator + emplace(const_iterator __position, _Args&&... __args); /** * @brief Inserts given value into %deque before specified iterator. @@ -1644,7 +1676,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ iterator insert(const_iterator __p, initializer_list __l) - { return this->insert(__p, __l.begin(), __l.end()); } + { + auto __offset = __p - cbegin(); + _M_range_insert_aux(__p._M_const_cast(), __l.begin(), __l.end(), + std::random_access_iterator_tag()); + return begin() + __offset; + } #endif #if __cplusplus >= 201103L @@ -1694,10 +1731,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ template> - iterator - insert(const_iterator __position, _InputIterator __first, + iterator + insert(const_iterator __position, _InputIterator __first, _InputIterator __last) - { + { difference_type __offset = __position - cbegin(); _M_insert_dispatch(__position._M_const_cast(), __first, __last, __false_type()); @@ -1715,10 +1752,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * by @a __position. This is known as range insert. */ template - void - insert(iterator __position, _InputIterator __first, + void + insert(iterator __position, _InputIterator __first, _InputIterator __last) - { + { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); @@ -1778,13 +1815,16 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * (Four pointers, so it should be quite fast.) * Note that the global std::swap() function is specialized such that * std::swap(d1,d2) will feed to this function. + * + * Whether the allocators are swapped depends on the allocator traits. */ void - swap(deque& __x) -#if __cplusplus >= 201103L - noexcept(_Alloc_traits::_S_nothrow_swap()) -#endif + swap(deque& __x) _GLIBCXX_NOEXCEPT { +#if __cplusplus >= 201103L + __glibcxx_assert(_Alloc_traits::propagate_on_container_swap::value + || _M_get_Tp_allocator() == __x._M_get_Tp_allocator()); +#endif _M_impl._M_swap_data(__x._M_impl); _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); @@ -1808,22 +1848,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template - void - _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) - { + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { _M_initialize_map(static_cast(__n)); _M_fill_initialize(__x); } // called by the range constructor to implement [23.1.1]/9 template - void - _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) - { - typedef typename std::iterator_traits<_InputIterator>:: - iterator_category _IterCategory; - _M_range_initialize(__first, __last, _IterCategory()); + { + _M_range_initialize(__first, __last, + std::__iterator_category(__first)); } // called by the second initialize_dispatch above @@ -1839,14 +1878,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * push_back on each value from the iterator. */ template - void - _M_range_initialize(_InputIterator __first, _InputIterator __last, + void + _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); // called by the second initialize_dispatch above template - void - _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, + void + _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); //@} @@ -1877,40 +1916,37 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template - void - _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) - { _M_fill_assign(__n, __val); } + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } // called by the range assign to implement [23.1.1]/9 template - void - _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) - { - typedef typename std::iterator_traits<_InputIterator>:: - iterator_category _IterCategory; - _M_assign_aux(__first, __last, _IterCategory()); - } + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } // called by the second assign_dispatch above template - void - _M_assign_aux(_InputIterator __first, _InputIterator __last, + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); // called by the second assign_dispatch above template - void - _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) - { + { const size_type __len = std::distance(__first, __last); if (__len > size()) { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, begin()); - insert(end(), __mid, __last); + _M_range_insert_aux(end(), __mid, __last, + std::__iterator_category(__first)); } else _M_erase_at_end(std::copy(__first, __last, begin())); @@ -1924,7 +1960,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER if (__n > size()) { std::fill(begin(), end(), __val); - insert(end(), __n - size(), __val); + _M_fill_insert(end(), __n - size(), __val); } else { @@ -1941,10 +1977,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER void _M_push_front_aux(const value_type&); #else template - void _M_push_back_aux(_Args&&... __args); + void _M_push_back_aux(_Args&&... __args); template - void _M_push_front_aux(_Args&&... __args); + void _M_push_front_aux(_Args&&... __args); #endif void _M_pop_back_aux(); @@ -1960,33 +1996,32 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template - void - _M_insert_dispatch(iterator __pos, + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type) - { _M_fill_insert(__pos, __n, __x); } + { _M_fill_insert(__pos, __n, __x); } // called by the range insert to implement [23.1.1]/9 template - void - _M_insert_dispatch(iterator __pos, + void + _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) - { - typedef typename std::iterator_traits<_InputIterator>:: - iterator_category _IterCategory; - _M_range_insert_aux(__pos, __first, __last, _IterCategory()); + { + _M_range_insert_aux(__pos, __first, __last, + std::__iterator_category(__first)); } // called by the second insert_dispatch above template - void - _M_range_insert_aux(iterator __pos, _InputIterator __first, + void + _M_range_insert_aux(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); // called by the second insert_dispatch above template - void - _M_range_insert_aux(iterator __pos, _ForwardIterator __first, + void + _M_range_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); // Called by insert(p,n,x), and the range insert when it turns out to be @@ -2001,8 +2036,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _M_insert_aux(iterator __pos, const value_type& __x); #else template - iterator - _M_insert_aux(iterator __pos, _Args&&... __args); + iterator + _M_insert_aux(iterator __pos, _Args&&... __args); #endif // called by insert(p,n,x) via fill_insert @@ -2011,8 +2046,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // called by range_insert_aux for forward iterators template - void - _M_insert_aux(iterator __pos, + void + _M_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, size_type __n); @@ -2025,9 +2060,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // Called by ~deque(). // NB: Doesn't deallocate the nodes. template - void - _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) - { _M_destroy_data_aux(__first, __last); } + void + _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) + { _M_destroy_data_aux(__first, __last); } void _M_destroy_data(iterator __first, iterator __last, @@ -2078,7 +2113,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _M_reserve_elements_at_front(size_type __n) { const size_type __vacancies = this->_M_impl._M_start._M_cur - - this->_M_impl._M_start._M_first; + - this->_M_impl._M_start._M_first; if (__n > __vacancies) _M_new_elements_at_front(__n - __vacancies); return this->_M_impl._M_start - difference_type(__n); @@ -2141,13 +2176,15 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } + // When the allocators are not equal the operation could throw, because + // we might need to allocate a new map for __x after moving from it + // or we might need to allocate new elements for *this. void _M_move_assign1(deque&& __x, /* always equal: */ false_type) { constexpr bool __move_storage = _Alloc_traits::_S_propagate_on_move_assign(); - _M_move_assign2(std::move(__x), - integral_constant()); + _M_move_assign2(std::move(__x), __bool_constant<__move_storage>()); } // Destroy all elements and deallocate all memory, then replace @@ -2196,8 +2233,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { // The rvalue's allocator cannot be moved and is not equal, // so we need to individually move each element. - this->assign(std::__make_move_if_noexcept_iterator(__x.begin()), - std::__make_move_if_noexcept_iterator(__x.end())); + _M_assign_aux(std::__make_move_if_noexcept_iterator(__x.begin()), + std::__make_move_if_noexcept_iterator(__x.end()), + std::random_access_iterator_tag()); __x.clear(); } } @@ -2220,7 +2258,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER operator==(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return __x.size() == __y.size() - && std::equal(__x.begin(), __x.end(), __y.begin()); } + && std::equal(__x.begin(), __x.end(), __y.begin()); } /** * @brief Deque ordering relation. @@ -2272,6 +2310,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template inline void swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { __x.swap(__y); } #undef _GLIBCXX_DEQUE_BUF_SIZE diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_function.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_function.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_function.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_function.h index 0c16357e6..4fbcdb91f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_function.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_function.h @@ -1,6 +1,6 @@ // Functor implementations -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -224,8 +224,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus > 201103L -#define __cpp_lib_transparent_operators 201210 -//#define __cpp_lib_generic_associative_lookup 201304 +#define __cpp_lib_transparent_operators 201510 template<> struct plus diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_heap.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_heap.h similarity index 83% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_heap.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_heap.h index 3ab37c757..f8cd0c054 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_heap.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_heap.h @@ -1,6 +1,6 @@ // Heap implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -72,7 +72,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _Compare> _Distance __is_heap_until(_RandomAccessIterator __first, _Distance __n, - _Compare __comp) + _Compare& __comp) { _Distance __parent = 0; for (_Distance __child = 1; __child < __n; ++__child) @@ -91,8 +91,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline bool __is_heap(_RandomAccessIterator __first, _Distance __n) { - return std::__is_heap_until(__first, __n, - __gnu_cxx::__ops::__iter_less_iter()) == __n; + __gnu_cxx::__ops::_Iter_less_iter __comp; + return std::__is_heap_until(__first, __n, __comp) == __n; } template __cmp(_GLIBCXX_MOVE(__comp)); + return std::__is_heap_until(__first, __n, __cmp) == __n; } template @@ -113,7 +114,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) - { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } + { + return std::__is_heap(__first, _GLIBCXX_MOVE(__comp), + std::distance(__first, __last)); + } // Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap, // + is_heap and is_heap_until in C++0x. @@ -123,7 +127,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __topIndex, _Tp __value, - _Compare __comp) + _Compare& __comp) { _Distance __parent = (__holeIndex - 1) / 2; while (__holeIndex > __topIndex && __comp(__first + __parent, __value)) @@ -159,12 +163,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RandomAccessIterator>) __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); __glibcxx_requires_heap(__first, __last - 1); + __gnu_cxx::__ops::_Iter_less_val __comp; _ValueType __value = _GLIBCXX_MOVE(*(__last - 1)); std::__push_heap(__first, _DistanceType((__last - __first) - 1), - _DistanceType(0), _GLIBCXX_MOVE(__value), - __gnu_cxx::__ops::__iter_less_val()); + _DistanceType(0), _GLIBCXX_MOVE(__value), __comp); } /** @@ -193,12 +198,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); __glibcxx_requires_heap_pred(__first, __last - 1, __comp); + __decltype(__gnu_cxx::__ops::__iter_comp_val(_GLIBCXX_MOVE(__comp))) + __cmp(_GLIBCXX_MOVE(__comp)); _ValueType __value = _GLIBCXX_MOVE(*(__last - 1)); std::__push_heap(__first, _DistanceType((__last - __first) - 1), - _DistanceType(0), _GLIBCXX_MOVE(__value), - __gnu_cxx::__ops::__iter_comp_val(__comp)); + _DistanceType(0), _GLIBCXX_MOVE(__value), __cmp); } template inline void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, - _RandomAccessIterator __result, _Compare __comp) + _RandomAccessIterator __result, _Compare& __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; @@ -262,22 +270,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { - typedef typename iterator_traits<_RandomAccessIterator>::value_type - _ValueType; - // concept requirements __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) - __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>) + __glibcxx_function_requires(_LessThanComparableConcept< + typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_non_empty_range(__first, __last); __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); __glibcxx_requires_heap(__first, __last); if (__last - __first > 1) { --__last; - std::__pop_heap(__first, __last, __last, - __gnu_cxx::__ops::__iter_less_iter()); + __gnu_cxx::__ops::_Iter_less_iter __comp; + std::__pop_heap(__first, __last, __last, __comp); } } @@ -301,21 +308,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); __glibcxx_requires_non_empty_range(__first, __last); __glibcxx_requires_heap_pred(__first, __last, __comp); if (__last - __first > 1) { + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); --__last; - std::__pop_heap(__first, __last, __last, - __gnu_cxx::__ops::__iter_comp_iter(__comp)); + std::__pop_heap(__first, __last, __last, __cmp); } } template void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, - _Compare __comp) + _Compare& __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; @@ -356,9 +365,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); - std::__make_heap(__first, __last, - __gnu_cxx::__ops::__iter_less_iter()); + __gnu_cxx::__ops::_Iter_less_iter __comp; + std::__make_heap(__first, __last, __comp); } /** @@ -380,15 +390,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); - std::__make_heap(__first, __last, - __gnu_cxx::__ops::__iter_comp_iter(__comp)); + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); + std::__make_heap(__first, __last, __cmp); } template void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, - _Compare __comp) + _Compare& __comp) { while (__last - __first > 1) { @@ -415,10 +427,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); __glibcxx_requires_heap(__first, __last); - std::__sort_heap(__first, __last, - __gnu_cxx::__ops::__iter_less_iter()); + __gnu_cxx::__ops::_Iter_less_iter __comp; + std::__sort_heap(__first, __last, __comp); } /** @@ -440,10 +453,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); __glibcxx_requires_heap_pred(__first, __last, __comp); - std::__sort_heap(__first, __last, - __gnu_cxx::__ops::__iter_comp_iter(__comp)); + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); + std::__sort_heap(__first, __last, __cmp); } #if __cplusplus >= 201103L @@ -467,10 +482,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive(__first, __last); + __gnu_cxx::__ops::_Iter_less_iter __comp; return __first + - std::__is_heap_until(__first, std::distance(__first, __last), - __gnu_cxx::__ops::__iter_less_iter()); + std::__is_heap_until(__first, std::distance(__first, __last), __comp); } /** @@ -493,10 +509,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __glibcxx_function_requires(_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); return __first - + std::__is_heap_until(__first, std::distance(__first, __last), - __gnu_cxx::__ops::__iter_comp_iter(__comp)); + + std::__is_heap_until(__first, std::distance(__first, __last), __cmp); } /** @@ -523,7 +541,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline bool is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) - { return std::is_heap_until(__first, __last, __comp) == __last; } + { + // concept requirements + __glibcxx_function_requires(_RandomAccessIteratorConcept< + _RandomAccessIterator>) + __glibcxx_requires_valid_range(__first, __last); + __glibcxx_requires_irreflexive_pred(__first, __last, __comp); + + const auto __dist = std::distance(__first, __last); + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); + return std::__is_heap_until(__first, __dist, __cmp) == __dist; + } #endif _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_iterator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_iterator.h similarity index 87% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_iterator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_iterator.h index 7b5872ee0..e6ef784ce 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_iterator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_iterator.h @@ -1,6 +1,6 @@ // Iterators -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -65,6 +65,10 @@ #include #include +#if __cplusplus > 201402L +# define __cpp_lib_array_constexpr 201603 +#endif + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -118,17 +122,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ // _GLIBCXX_RESOLVE_LIB_DEFECTS // 235 No specification of default ctor for reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator() : current() { } /** * This %iterator will move in the opposite direction that @p x does. */ - explicit + explicit _GLIBCXX17_CONSTEXPR reverse_iterator(iterator_type __x) : current(__x) { } /** * The copy constructor is normal. */ + _GLIBCXX17_CONSTEXPR reverse_iterator(const reverse_iterator& __x) : current(__x.current) { } @@ -137,13 +143,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * underlying %iterator can be converted to the type of @c current. */ template + _GLIBCXX17_CONSTEXPR reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) { } /** * @return @c current, the %iterator used for underlying work. */ - iterator_type + _GLIBCXX17_CONSTEXPR iterator_type base() const { return current; } @@ -157,7 +164,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @c *x remains valid after @c x has been modified or * destroyed. This is a bug: http://gcc.gnu.org/PR51823 */ - reference + _GLIBCXX17_CONSTEXPR reference operator*() const { _Iterator __tmp = current; @@ -169,7 +176,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * This requires that @c --current is dereferenceable. */ - pointer + _GLIBCXX17_CONSTEXPR pointer operator->() const { return &(operator*()); } @@ -178,7 +185,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * Decrements the underlying iterator. */ - reverse_iterator& + _GLIBCXX17_CONSTEXPR reverse_iterator& operator++() { --current; @@ -190,7 +197,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * Decrements the underlying iterator. */ - reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator operator++(int) { reverse_iterator __tmp = *this; @@ -203,7 +210,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * Increments the underlying iterator. */ - reverse_iterator& + _GLIBCXX17_CONSTEXPR reverse_iterator& operator--() { ++current; @@ -215,7 +222,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * Increments the underlying iterator. */ - reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator operator--(int) { reverse_iterator __tmp = *this; @@ -228,7 +235,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * The underlying iterator must be a Random Access Iterator. */ - reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator operator+(difference_type __n) const { return reverse_iterator(current - __n); } @@ -238,7 +245,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Moves the underlying iterator backwards @a __n steps. * The underlying iterator must be a Random Access Iterator. */ - reverse_iterator& + _GLIBCXX17_CONSTEXPR reverse_iterator& operator+=(difference_type __n) { current -= __n; @@ -250,7 +257,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * The underlying iterator must be a Random Access Iterator. */ - reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator operator-(difference_type __n) const { return reverse_iterator(current + __n); } @@ -260,7 +267,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Moves the underlying iterator forwards @a __n steps. * The underlying iterator must be a Random Access Iterator. */ - reverse_iterator& + _GLIBCXX17_CONSTEXPR reverse_iterator& operator-=(difference_type __n) { current += __n; @@ -272,7 +279,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * The underlying iterator must be a Random Access Iterator. */ - reference + _GLIBCXX17_CONSTEXPR reference operator[](difference_type __n) const { return *(*this + __n); } }; @@ -288,116 +295,146 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * */ template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator==(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator<(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() < __x.base(); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator!=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x == __y); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator>(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y < __x; } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator<=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__y < __x); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator>=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x < __y); } + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // DR 280. Comparison of reverse_iterator to const reverse_iterator. + template + inline _GLIBCXX17_CONSTEXPR bool + operator==(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __x.base() == __y.base(); } + + template + inline _GLIBCXX17_CONSTEXPR bool + operator<(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() < __x.base(); } + + template + inline _GLIBCXX17_CONSTEXPR bool + operator!=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x == __y); } + + template + inline _GLIBCXX17_CONSTEXPR bool + operator>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y < __x; } + + template + inline _GLIBCXX17_CONSTEXPR bool + operator<=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__y < __x); } + + template + inline _GLIBCXX17_CONSTEXPR bool + operator>=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x < __y); } + //@} + +#if __cplusplus < 201103L template inline typename reverse_iterator<_Iterator>::difference_type operator-(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() - __x.base(); } + template + inline typename reverse_iterator<_IteratorL>::difference_type + operator-(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() - __x.base(); } +#else + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // DR 685. reverse_iterator/move_iterator difference has invalid signatures + template + inline _GLIBCXX17_CONSTEXPR auto + operator-(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + -> decltype(__y.base() - __x.base()) + { return __y.base() - __x.base(); } +#endif + template - inline reverse_iterator<_Iterator> + inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Iterator> operator+(typename reverse_iterator<_Iterator>::difference_type __n, const reverse_iterator<_Iterator>& __x) { return reverse_iterator<_Iterator>(__x.base() - __n); } - // _GLIBCXX_RESOLVE_LIB_DEFECTS - // DR 280. Comparison of reverse_iterator to const reverse_iterator. - template - inline bool - operator==(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return __x.base() == __y.base(); } - - template - inline bool - operator<(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return __y.base() < __x.base(); } - - template - inline bool - operator!=(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return !(__x == __y); } - - template - inline bool - operator>(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return __y < __x; } - - template - inline bool - operator<=(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return !(__y < __x); } - - template - inline bool - operator>=(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return !(__x < __y); } - - template #if __cplusplus >= 201103L - // DR 685. - inline auto - operator-(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - -> decltype(__y.base() - __x.base()) -#else - inline typename reverse_iterator<_IteratorL>::difference_type - operator-(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) -#endif - { return __y.base() - __x.base(); } - //@} + // Same as C++14 make_reverse_iterator but used in C++03 mode too. + template + inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Iterator> + __make_reverse_iterator(_Iterator __i) + { return reverse_iterator<_Iterator>(__i); } -#if __cplusplus > 201103L -#define __cpp_lib_make_reverse_iterator 201402 +# if __cplusplus > 201103L +# define __cpp_lib_make_reverse_iterator 201402 // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 2285. make_reverse_iterator /// Generator function for reverse_iterator. template - inline reverse_iterator<_Iterator> + inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Iterator> make_reverse_iterator(_Iterator __i) { return reverse_iterator<_Iterator>(__i); } +# endif +#endif + +#if __cplusplus >= 201103L + template + auto + __niter_base(reverse_iterator<_Iterator> __it) + -> decltype(__make_reverse_iterator(__niter_base(__it.base()))) + { return __make_reverse_iterator(__niter_base(__it.base())); } + + template + struct __is_move_iterator > + : __is_move_iterator<_Iterator> + { }; + + template + auto + __miter_base(reverse_iterator<_Iterator> __it) + -> decltype(__make_reverse_iterator(__miter_base(__it.base()))) + { return __make_reverse_iterator(__miter_base(__it.base())); } #endif // 24.4.2.2.1 back_insert_iterator @@ -424,7 +461,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// The only way to create this %iterator is with a container. explicit - back_insert_iterator(_Container& __x) : container(&__x) { } + back_insert_iterator(_Container& __x) + : container(std::__addressof(__x)) { } /** * @param __value An instance of whatever type @@ -514,7 +552,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef _Container container_type; /// The only way to create this %iterator is with a container. - explicit front_insert_iterator(_Container& __x) : container(&__x) { } + explicit front_insert_iterator(_Container& __x) + : container(std::__addressof(__x)) { } /** * @param __value An instance of whatever type @@ -613,7 +652,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * initial position (a normal %iterator into the container). */ insert_iterator(_Container& __x, typename _Container::iterator __i) - : container(&__x), iter(__i) {} + : container(std::__addressof(__x)), iter(__i) {} /** * @param __value An instance of whatever type @@ -935,6 +974,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + _Iterator + __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) + { return __it.base(); } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace + #if __cplusplus >= 201103L namespace std _GLIBCXX_VISIBILITY(default) @@ -977,37 +1028,39 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename remove_reference<__base_ref>::type&&, __base_ref>::type reference; + _GLIBCXX17_CONSTEXPR move_iterator() : _M_current() { } - explicit + explicit _GLIBCXX17_CONSTEXPR move_iterator(iterator_type __i) : _M_current(__i) { } template + _GLIBCXX17_CONSTEXPR move_iterator(const move_iterator<_Iter>& __i) : _M_current(__i.base()) { } - iterator_type + _GLIBCXX17_CONSTEXPR iterator_type base() const { return _M_current; } - reference + _GLIBCXX17_CONSTEXPR reference operator*() const { return static_cast(*_M_current); } - pointer + _GLIBCXX17_CONSTEXPR pointer operator->() const { return _M_current; } - move_iterator& + _GLIBCXX17_CONSTEXPR move_iterator& operator++() { ++_M_current; return *this; } - move_iterator + _GLIBCXX17_CONSTEXPR move_iterator operator++(int) { move_iterator __tmp = *this; @@ -1015,14 +1068,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __tmp; } - move_iterator& + _GLIBCXX17_CONSTEXPR move_iterator& operator--() { --_M_current; return *this; } - move_iterator + _GLIBCXX17_CONSTEXPR move_iterator operator--(int) { move_iterator __tmp = *this; @@ -1030,29 +1083,29 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __tmp; } - move_iterator + _GLIBCXX17_CONSTEXPR move_iterator operator+(difference_type __n) const { return move_iterator(_M_current + __n); } - move_iterator& + _GLIBCXX17_CONSTEXPR move_iterator& operator+=(difference_type __n) { _M_current += __n; return *this; } - move_iterator + _GLIBCXX17_CONSTEXPR move_iterator operator-(difference_type __n) const { return move_iterator(_M_current - __n); } - move_iterator& + _GLIBCXX17_CONSTEXPR move_iterator& operator-=(difference_type __n) { _M_current -= __n; return *this; } - reference + _GLIBCXX17_CONSTEXPR reference operator[](difference_type __n) const { return std::move(_M_current[__n]); } }; @@ -1061,100 +1114,93 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // why there are always 2 versions for most of the move_iterator // operators. template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator==(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator==(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator!=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__x == __y); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator!=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__x == __y); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator<(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __x.base() < __y.base(); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator<(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __x.base() < __y.base(); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator<=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__y < __x); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator<=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__y < __x); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator>(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __y < __x; } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator>(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __y < __x; } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator>=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__x < __y); } template - inline bool + inline _GLIBCXX17_CONSTEXPR bool operator>=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__x < __y); } // DR 685. template - inline auto + inline _GLIBCXX17_CONSTEXPR auto operator-(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) -> decltype(__x.base() - __y.base()) { return __x.base() - __y.base(); } template - inline auto - operator-(const move_iterator<_Iterator>& __x, - const move_iterator<_Iterator>& __y) - -> decltype(__x.base() - __y.base()) - { return __x.base() - __y.base(); } - - template - inline move_iterator<_Iterator> + inline _GLIBCXX17_CONSTEXPR move_iterator<_Iterator> operator+(typename move_iterator<_Iterator>::difference_type __n, const move_iterator<_Iterator>& __x) { return __x + __n; } template - inline move_iterator<_Iterator> + inline _GLIBCXX17_CONSTEXPR move_iterator<_Iterator> make_move_iterator(_Iterator __i) { return move_iterator<_Iterator>(__i); } @@ -1162,12 +1208,40 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION = typename conditional<__move_if_noexcept_cond ::value_type>::value, _Iterator, move_iterator<_Iterator>>::type> - inline _ReturnType + inline _GLIBCXX17_CONSTEXPR _ReturnType __make_move_if_noexcept_iterator(_Iterator __i) { return _ReturnType(__i); } + // Overload for pointers that matches std::move_if_noexcept more closely, + // returning a constant iterator when we don't want to move. + template::value, + const _Tp*, move_iterator<_Tp*>>::type> + inline _GLIBCXX17_CONSTEXPR _ReturnType + __make_move_if_noexcept_iterator(_Tp* __i) + { return _ReturnType(__i); } + // @} group iterators + template + auto + __niter_base(move_iterator<_Iterator> __it) + -> decltype(make_move_iterator(__niter_base(__it.base()))) + { return make_move_iterator(__niter_base(__it.base())); } + + template + struct __is_move_iterator > + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template + auto + __miter_base(move_iterator<_Iterator> __it) + -> decltype(__miter_base(__it.base())) + { return __miter_base(__it.base()); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace @@ -1179,4 +1253,8 @@ _GLIBCXX_END_NAMESPACE_VERSION #define _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter) (_Iter) #endif // C++11 +#ifdef _GLIBCXX_DEBUG +# include +#endif + #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_iterator_base_funcs.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_iterator_base_funcs.h similarity index 80% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_iterator_base_funcs.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_iterator_base_funcs.h index a146611b2..ce6c3d20e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_iterator_base_funcs.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_iterator_base_funcs.h @@ -1,6 +1,6 @@ // Functions used by iterators -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -62,14 +62,21 @@ #pragma GCC system_header #include -#include +#include namespace std _GLIBCXX_VISIBILITY(default) { +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER + // Forward declaration for the overloads of __distance. + template struct _List_iterator; + template struct _List_const_iterator; +_GLIBCXX_END_NAMESPACE_CONTAINER + _GLIBCXX_BEGIN_NAMESPACE_VERSION template - inline typename iterator_traits<_InputIterator>::difference_type + inline _GLIBCXX14_CONSTEXPR + typename iterator_traits<_InputIterator>::difference_type __distance(_InputIterator __first, _InputIterator __last, input_iterator_tag) { @@ -86,7 +93,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - inline typename iterator_traits<_RandomAccessIterator>::difference_type + inline _GLIBCXX14_CONSTEXPR + typename iterator_traits<_RandomAccessIterator>::difference_type __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { @@ -96,6 +104,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __last - __first; } +#if _GLIBCXX_USE_CXX11_ABI + // Forward declaration because of the qualified call in distance. + template + ptrdiff_t + __distance(_GLIBCXX_STD_C::_List_iterator<_Tp>, + _GLIBCXX_STD_C::_List_iterator<_Tp>, + input_iterator_tag); + + template + ptrdiff_t + __distance(_GLIBCXX_STD_C::_List_const_iterator<_Tp>, + _GLIBCXX_STD_C::_List_const_iterator<_Tp>, + input_iterator_tag); +#endif + /** * @brief A generalization of pointer arithmetic. * @param __first An input iterator. @@ -110,7 +133,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * and are constant time. For other %iterator classes they are linear time. */ template - inline typename iterator_traits<_InputIterator>::difference_type + inline _GLIBCXX17_CONSTEXPR + typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { // concept requirements -- taken care of in __distance @@ -119,18 +143,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - inline void + inline _GLIBCXX14_CONSTEXPR void __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) - _GLIBCXX_DEBUG_ASSERT(__n >= 0); + __glibcxx_assert(__n >= 0); while (__n--) ++__i; } template - inline void + inline _GLIBCXX14_CONSTEXPR void __advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag) { @@ -146,7 +170,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - inline void + inline _GLIBCXX14_CONSTEXPR void __advance(_RandomAccessIterator& __i, _Distance __n, random_access_iterator_tag) { @@ -169,7 +193,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * and are constant time. For other %iterator classes they are linear time. */ template - inline void + inline _GLIBCXX17_CONSTEXPR void advance(_InputIterator& __i, _Distance __n) { // concept requirements -- taken care of in __advance @@ -180,19 +204,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L template - inline _ForwardIterator + inline _GLIBCXX17_CONSTEXPR _ForwardIterator next(_ForwardIterator __x, typename iterator_traits<_ForwardIterator>::difference_type __n = 1) { + // concept requirements + __glibcxx_function_requires(_ForwardIteratorConcept< + _ForwardIterator>) std::advance(__x, __n); return __x; } template - inline _BidirectionalIterator + inline _GLIBCXX17_CONSTEXPR _BidirectionalIterator prev(_BidirectionalIterator __x, typename iterator_traits<_BidirectionalIterator>::difference_type __n = 1) { + // concept requirements + __glibcxx_function_requires(_BidirectionalIteratorConcept< + _BidirectionalIterator>) std::advance(__x, -__n); return __x; } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_iterator_base_types.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_iterator_base_types.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_iterator_base_types.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_iterator_base_types.h index 83e6444ab..24ed016b9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_iterator_base_types.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_iterator_base_types.h @@ -1,6 +1,6 @@ // Types used in iterator implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -206,6 +206,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION //@} +#if __cplusplus < 201103L // If _Iterator has a base returns it otherwise _Iterator is returned // untouched template @@ -223,6 +224,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static iterator_type _S_base(_Iterator __it) { return __it.base(); } }; +#endif #if __cplusplus >= 201103L template diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_list.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_list.h similarity index 82% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_list.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_list.h index f8bfff18b..0420dbfbb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_list.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_list.h @@ -1,6 +1,6 @@ // List implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -57,8 +57,11 @@ #define _STL_LIST_H 1 #include +#include #if __cplusplus >= 201103L #include +#include +#include #endif namespace std _GLIBCXX_VISIBILITY(default) @@ -73,7 +76,7 @@ namespace std _GLIBCXX_VISIBILITY(default) // "needless" static_cast'ing later on, but it's all safe // downcasting. - /// Common part of a node in the %list. + /// Common part of a node in the %list. struct _List_node_base { _List_node_base* _M_next; @@ -105,14 +108,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template struct _List_node : public __detail::_List_node_base { - ///< User's data. - _Tp _M_data; - #if __cplusplus >= 201103L - template - _List_node(_Args&&... __args) - : __detail::_List_node_base(), _M_data(std::forward<_Args>(__args)...) - { } + __gnu_cxx::__aligned_membuf<_Tp> _M_storage; + _Tp* _M_valptr() { return _M_storage._M_ptr(); } + _Tp const* _M_valptr() const { return _M_storage._M_ptr(); } +#else + _Tp _M_data; + _Tp* _M_valptr() { return std::__addressof(_M_data); } + _Tp const* _M_valptr() const { return std::__addressof(_M_data); } #endif }; @@ -124,14 +127,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template struct _List_iterator { - typedef _List_iterator<_Tp> _Self; - typedef _List_node<_Tp> _Node; + typedef _List_iterator<_Tp> _Self; + typedef _List_node<_Tp> _Node; - typedef ptrdiff_t difference_type; - typedef std::bidirectional_iterator_tag iterator_category; - typedef _Tp value_type; - typedef _Tp* pointer; - typedef _Tp& reference; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Tp* pointer; + typedef _Tp& reference; _List_iterator() _GLIBCXX_NOEXCEPT : _M_node() { } @@ -144,14 +147,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _M_const_cast() const _GLIBCXX_NOEXCEPT { return *this; } - // Must downcast from _List_node_base to _List_node to get to _M_data. + // Must downcast from _List_node_base to _List_node to get to value. reference operator*() const _GLIBCXX_NOEXCEPT - { return static_cast<_Node*>(_M_node)->_M_data; } + { return *static_cast<_Node*>(_M_node)->_M_valptr(); } pointer operator->() const _GLIBCXX_NOEXCEPT - { return std::__addressof(static_cast<_Node*>(_M_node)->_M_data); } + { return static_cast<_Node*>(_M_node)->_M_valptr(); } _Self& operator++() _GLIBCXX_NOEXCEPT @@ -203,15 +206,15 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template struct _List_const_iterator { - typedef _List_const_iterator<_Tp> _Self; - typedef const _List_node<_Tp> _Node; - typedef _List_iterator<_Tp> iterator; + typedef _List_const_iterator<_Tp> _Self; + typedef const _List_node<_Tp> _Node; + typedef _List_iterator<_Tp> iterator; - typedef ptrdiff_t difference_type; - typedef std::bidirectional_iterator_tag iterator_category; - typedef _Tp value_type; - typedef const _Tp* pointer; - typedef const _Tp& reference; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; _List_const_iterator() _GLIBCXX_NOEXCEPT : _M_node() { } @@ -228,15 +231,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _M_const_cast() const _GLIBCXX_NOEXCEPT { return iterator(const_cast<__detail::_List_node_base*>(_M_node)); } - // Must downcast from List_node_base to _List_node to get to - // _M_data. + // Must downcast from List_node_base to _List_node to get to value. reference operator*() const _GLIBCXX_NOEXCEPT - { return static_cast<_Node*>(_M_node)->_M_data; } + { return *static_cast<_Node*>(_M_node)->_M_valptr(); } pointer operator->() const _GLIBCXX_NOEXCEPT - { return std::__addressof(static_cast<_Node*>(_M_node)->_M_data); } + { return static_cast<_Node*>(_M_node)->_M_valptr(); } _Self& operator++() _GLIBCXX_NOEXCEPT @@ -289,7 +291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template inline bool operator!=(const _List_iterator<_Val>& __x, - const _List_const_iterator<_Val>& __y) _GLIBCXX_NOEXCEPT + const _List_const_iterator<_Val>& __y) _GLIBCXX_NOEXCEPT { return __x._M_node != __y._M_node; } _GLIBCXX_BEGIN_NAMESPACE_CXX11 @@ -298,23 +300,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 class _List_base { protected: - // NOTA BENE - // The stored instance is not actually of "allocator_type"'s - // type. Instead we rebind the type to - // Allocator>, which according to [20.1.5]/4 - // should probably be the same. List_node is not the same - // size as Tp (it's two pointers larger), and specializations on - // Tp may go unused because List_node is being bound - // instead. - // - // We put this to the test in the constructors and in - // get_allocator, where we use conversions between - // allocator_type and _Node_alloc_type. The conversion is - // required by table 32 in [20.1.5]. - typedef typename _Alloc::template rebind<_List_node<_Tp> >::other - _Node_alloc_type; - - typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_Tp>::other _Tp_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tp_alloc_traits; + typedef typename _Tp_alloc_traits::template + rebind<_List_node<_Tp> >::other _Node_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Node_alloc_type> _Node_alloc_traits; static size_t _S_distance(const __detail::_List_node_base* __first, @@ -338,7 +329,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 __detail::_List_node_base _M_node; #endif - _List_impl() + _List_impl() _GLIBCXX_NOEXCEPT : _Node_alloc_type(), _M_node() { } @@ -347,7 +338,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 { } #if __cplusplus >= 201103L - _List_impl(_Node_alloc_type&& __a) _GLIBCXX_NOEXCEPT + _List_impl(_Node_alloc_type&& __a) noexcept : _Node_alloc_type(std::move(__a)), _M_node() { } #endif @@ -356,13 +347,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 _List_impl _M_impl; #if _GLIBCXX_USE_CXX11_ABI - size_t _M_get_size() const { return _M_impl._M_node._M_data; } + size_t _M_get_size() const { return *_M_impl._M_node._M_valptr(); } - void _M_set_size(size_t __n) { _M_impl._M_node._M_data = __n; } + void _M_set_size(size_t __n) { *_M_impl._M_node._M_valptr() = __n; } - void _M_inc_size(size_t __n) { _M_impl._M_node._M_data += __n; } + void _M_inc_size(size_t __n) { *_M_impl._M_node._M_valptr() += __n; } - void _M_dec_size(size_t __n) { _M_impl._M_node._M_data -= __n; } + void _M_dec_size(size_t __n) { *_M_impl._M_node._M_valptr() -= __n; } size_t _M_distance(const __detail::_List_node_base* __first, @@ -370,7 +361,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 { return _S_distance(__first, __last); } // return the stored size - size_t _M_node_count() const { return _M_impl._M_node._M_data; } + size_t _M_node_count() const { return *_M_impl._M_node._M_valptr(); } #else // dummy implementations used when the size is not stored size_t _M_get_size() const { return 0; } @@ -387,32 +378,24 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 } #endif - _List_node<_Tp>* + typename _Node_alloc_traits::pointer _M_get_node() - { return _M_impl._Node_alloc_type::allocate(1); } + { return _Node_alloc_traits::allocate(_M_impl, 1); } void - _M_put_node(_List_node<_Tp>* __p) _GLIBCXX_NOEXCEPT - { _M_impl._Node_alloc_type::deallocate(__p, 1); } + _M_put_node(typename _Node_alloc_traits::pointer __p) _GLIBCXX_NOEXCEPT + { _Node_alloc_traits::deallocate(_M_impl, __p, 1); } public: typedef _Alloc allocator_type; _Node_alloc_type& _M_get_Node_allocator() _GLIBCXX_NOEXCEPT - { return *static_cast<_Node_alloc_type*>(&_M_impl); } + { return _M_impl; } const _Node_alloc_type& _M_get_Node_allocator() const _GLIBCXX_NOEXCEPT - { return *static_cast(&_M_impl); } - - _Tp_alloc_type - _M_get_Tp_allocator() const _GLIBCXX_NOEXCEPT - { return _Tp_alloc_type(_M_get_Node_allocator()); } - - allocator_type - get_allocator() const _GLIBCXX_NOEXCEPT - { return allocator_type(_M_get_Node_allocator()); } + { return _M_impl; } _List_base() : _M_impl() @@ -425,6 +408,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 #if __cplusplus >= 201103L _List_base(_List_base&& __x) noexcept : _M_impl(std::move(__x._M_get_Node_allocator())) + { _M_move_nodes(std::move(__x)); } + + _List_base(_List_base&& __x, _Node_alloc_type&& __a) + : _M_impl(std::move(__a)) + { + if (__x._M_get_Node_allocator() == _M_get_Node_allocator()) + _M_move_nodes(std::move(__x)); + else + _M_init(); // Caller must move individual elements. + } + + void + _M_move_nodes(_List_base&& __x) { auto* const __xnode = std::__addressof(__x._M_impl._M_node); if (__xnode->_M_next == __xnode) @@ -451,8 +447,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 void _M_init() _GLIBCXX_NOEXCEPT { - this->_M_impl._M_node._M_next = &this->_M_impl._M_node; - this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; + this->_M_impl._M_node._M_next = &this->_M_impl._M_node; + this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; _M_set_size(0); } }; @@ -501,33 +497,39 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * pointing to @e D, not to @e A! To get to the head of the %list, * we start at the tail and move forward by one. When this member * iterator's next/previous pointers refer to itself, the %list is - * %empty. + * %empty. */ template > class list : protected _List_base<_Tp, _Alloc> { +#ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements - typedef typename _Alloc::value_type _Alloc_value_type; + typedef typename _Alloc::value_type _Alloc_value_type; +# if __cplusplus < 201103L __glibcxx_class_requires(_Tp, _SGIAssignableConcept) +# endif __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept) +#endif - typedef _List_base<_Tp, _Alloc> _Base; - typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; - typedef typename _Base::_Node_alloc_type _Node_alloc_type; + typedef _List_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + typedef typename _Base::_Tp_alloc_traits _Tp_alloc_traits; + typedef typename _Base::_Node_alloc_type _Node_alloc_type; + typedef typename _Base::_Node_alloc_traits _Node_alloc_traits; public: - typedef _Tp value_type; - typedef typename _Tp_alloc_type::pointer pointer; - typedef typename _Tp_alloc_type::const_pointer const_pointer; - typedef typename _Tp_alloc_type::reference reference; - typedef typename _Tp_alloc_type::const_reference const_reference; - typedef _List_iterator<_Tp> iterator; - typedef _List_const_iterator<_Tp> const_iterator; - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Alloc allocator_type; + typedef _Tp value_type; + typedef typename _Tp_alloc_traits::pointer pointer; + typedef typename _Tp_alloc_traits::const_pointer const_pointer; + typedef typename _Tp_alloc_traits::reference reference; + typedef typename _Tp_alloc_traits::const_reference const_reference; + typedef _List_iterator<_Tp> iterator; + typedef _List_const_iterator<_Tp> const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; protected: // Note that pointers-to-_Node's can be ctor-converted to @@ -537,7 +539,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 using _Base::_M_impl; using _Base::_M_put_node; using _Base::_M_get_node; - using _Base::_M_get_Tp_allocator; using _Base::_M_get_Node_allocator; /** @@ -553,8 +554,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 _Node* __p = this->_M_get_node(); __try { - _M_get_Tp_allocator().construct - (std::__addressof(__p->_M_data), __x); + _Tp_alloc_type __alloc(_M_get_Node_allocator()); + __alloc.construct(__p->_M_valptr(), __x); } __catch(...) { @@ -565,20 +566,15 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 } #else template - _Node* - _M_create_node(_Args&&... __args) + _Node* + _M_create_node(_Args&&... __args) { - _Node* __p = this->_M_get_node(); - __try - { - _M_get_Node_allocator().construct(__p, - std::forward<_Args>(__args)...); - } - __catch(...) - { - _M_put_node(__p); - __throw_exception_again; - } + auto __p = this->_M_get_node(); + auto& __alloc = _M_get_Node_allocator(); + __allocated_ptr<_Node_alloc_type> __guard{__alloc, __p}; + _Node_alloc_traits::construct(__alloc, __p->_M_valptr(), + std::forward<_Args>(__args)...); + __guard = nullptr; return __p; } #endif @@ -608,13 +604,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 /** * @brief Creates a %list with default constructed elements. * @param __n The number of elements to initially create. + * @param __a An allocator object. * * This constructor fills the %list with @a __n default * constructed elements. */ explicit - list(size_type __n) - : _Base() + list(size_type __n, const allocator_type& __a = allocator_type()) + : _Base(_Node_alloc_type(__a)) { _M_default_initialize(__n); } /** @@ -650,10 +647,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * @param __x A %list of identical element and allocator types. * * The newly-created %list uses a copy of the allocation object used - * by @a __x. + * by @a __x (unless the allocator traits dictate a different object). */ list(const list& __x) - : _Base(__x._M_get_Node_allocator()) + : _Base(_Node_alloc_traits:: + _S_select_on_copy(__x._M_get_Node_allocator())) { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } #if __cplusplus >= 201103L @@ -676,9 +674,23 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * initializer_list @a __l. This is linear in __l.size(). */ list(initializer_list __l, - const allocator_type& __a = allocator_type()) + const allocator_type& __a = allocator_type()) : _Base(_Node_alloc_type(__a)) { _M_initialize_dispatch(__l.begin(), __l.end(), __false_type()); } + + list(const list& __x, const allocator_type& __a) + : _Base(_Node_alloc_type(__a)) + { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } + + list(list&& __x, const allocator_type& __a) + noexcept(_Node_alloc_traits::_S_always_equal()) + : _Base(std::move(__x), _Node_alloc_type(__a)) + { + // If __x is not empty it means its allocator is not equal to __a, + // so we need to move from each element individually. + insert(begin(), std::__make_move_if_noexcept_iterator(__x.begin()), + std::__make_move_if_noexcept_iterator(__x.end())); + } #endif /** @@ -694,22 +706,23 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 #if __cplusplus >= 201103L template> - list(_InputIterator __first, _InputIterator __last, + list(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(_Node_alloc_type(__a)) - { _M_initialize_dispatch(__first, __last, __false_type()); } + { _M_initialize_dispatch(__first, __last, __false_type()); } #else template - list(_InputIterator __first, _InputIterator __last, + list(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(_Node_alloc_type(__a)) - { + { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } #endif +#if __cplusplus >= 201103L /** * No explicit dtor needed as the _Base dtor takes care of * things. The _Base dtor only erases the elements, and note @@ -717,13 +730,16 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * memory is not touched in any way. Managing the pointer is * the user's responsibility. */ + ~list() = default; +#endif /** * @brief %List assignment operator. * @param __x A %list of identical element and allocator types. * - * All the elements of @a __x are copied, but unlike the copy - * constructor, the allocator object is not copied. + * All the elements of @a __x are copied. + * + * Whether the allocator is copied depends on the allocator traits. */ list& operator=(const list& __x); @@ -734,15 +750,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * @param __x A %list of identical element and allocator types. * * The contents of @a __x are moved into this %list (without copying). - * @a __x is a valid, but unspecified %list + * + * Afterwards @a __x is a valid, but unspecified %list + * + * Whether the allocator is moved depends on the allocator traits. */ list& operator=(list&& __x) + noexcept(_Node_alloc_traits::_S_nothrow_move()) { - // NB: DR 1204. - // NB: DR 675. - this->clear(); - this->swap(__x); + constexpr bool __move_storage = + _Node_alloc_traits::_S_propagate_on_move_assign() + || _Node_alloc_traits::_S_always_equal(); + _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); return *this; } @@ -769,7 +789,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * This function fills a %list with @a __n copies of the given * value. Note that the assignment completely changes the %list * and that the resulting %list's size is the same as the number - * of elements assigned. Old data may be lost. + * of elements assigned. */ void assign(size_type __n, const value_type& __val) @@ -785,19 +805,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * * Note that the assignment completely changes the %list and * that the resulting %list's size is the same as the number of - * elements assigned. Old data may be lost. + * elements assigned. */ #if __cplusplus >= 201103L template> - void - assign(_InputIterator __first, _InputIterator __last) - { _M_assign_dispatch(__first, __last, __false_type()); } + void + assign(_InputIterator __first, _InputIterator __last) + { _M_assign_dispatch(__first, __last, __false_type()); } #else template - void - assign(_InputIterator __first, _InputIterator __last) - { + void + assign(_InputIterator __first, _InputIterator __last) + { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); @@ -814,13 +834,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ void assign(initializer_list __l) - { this->assign(__l.begin(), __l.end()); } + { this->_M_assign_dispatch(__l.begin(), __l.end(), __false_type()); } #endif /// Get a copy of the memory allocation object. allocator_type get_allocator() const _GLIBCXX_NOEXCEPT - { return _Base::get_allocator(); } + { return allocator_type(_Base::_M_get_Node_allocator()); } // iterators /** @@ -949,7 +969,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 /** Returns the size() of the largest possible %list. */ size_type max_size() const _GLIBCXX_NOEXCEPT - { return _M_get_Node_allocator().max_size(); } + { return _Node_alloc_traits::max_size(_M_get_Node_allocator()); } #if __cplusplus >= 201103L /** @@ -1014,7 +1034,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ reference back() _GLIBCXX_NOEXCEPT - { + { iterator __tmp = end(); --__tmp; return *__tmp; @@ -1026,7 +1046,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ const_reference back() const _GLIBCXX_NOEXCEPT - { + { const_iterator __tmp = end(); --__tmp; return *__tmp; @@ -1053,9 +1073,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 { this->_M_insert(begin(), std::move(__x)); } template - void - emplace_front(_Args&&... __args) - { this->_M_insert(begin(), std::forward<_Args>(__args)...); } +#if __cplusplus > 201402L + reference +#else + void +#endif + emplace_front(_Args&&... __args) + { + this->_M_insert(begin(), std::forward<_Args>(__args)...); +#if __cplusplus > 201402L + return front(); +#endif + } #endif /** @@ -1094,9 +1123,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 { this->_M_insert(end(), std::move(__x)); } template - void - emplace_back(_Args&&... __args) - { this->_M_insert(end(), std::forward<_Args>(__args)...); } +#if __cplusplus > 201402L + reference +#else + void +#endif + emplace_back(_Args&&... __args) + { + this->_M_insert(end(), std::forward<_Args>(__args)...); +#if __cplusplus > 201402L + return back(); +#endif + } #endif /** @@ -1128,8 +1166,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * and references. */ template - iterator - emplace(const_iterator __position, _Args&&... __args); + iterator + emplace(const_iterator __position, _Args&&... __args); /** * @brief Inserts given value into %list before specified iterator. @@ -1171,7 +1209,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * the specified location. Due to the nature of a %list this * operation can be done in constant time, and does not * invalidate iterators and references. - */ + */ iterator insert(const_iterator __position, value_type&& __x) { return emplace(__position, std::move(__x)); } @@ -1270,10 +1308,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * does not invalidate iterators and references. */ template - void - insert(iterator __position, _InputIterator __first, + void + insert(iterator __position, _InputIterator __first, _InputIterator __last) - { + { list __tmp(__first, __last, get_allocator()); splice(__position, __tmp); } @@ -1339,21 +1377,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * time. Note that the global std::swap() function is * specialized such that std::swap(l1,l2) will feed to this * function. + * + * Whether the allocators are swapped depends on the allocator traits. */ void - swap(list& __x) + swap(list& __x) _GLIBCXX_NOEXCEPT { - __detail::_List_node_base::swap(this->_M_impl._M_node, + __detail::_List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node); size_t __xsize = __x._M_get_size(); __x._M_set_size(this->_M_get_size()); this->_M_set_size(__xsize); - // _GLIBCXX_RESOLVE_LIB_DEFECTS - // 431. Swapping containers with unequal allocators. - std::__alloc_swap:: - _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()); + _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(), + __x._M_get_Node_allocator()); } /** @@ -1365,8 +1403,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 void clear() _GLIBCXX_NOEXCEPT { - _Base::_M_clear(); - _Base::_M_init(); + _Base::_M_clear(); + _Base::_M_init(); } // [23.2.2.4] list operations @@ -1438,7 +1476,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 if (__position == __i || __position == __j) return; - if (this != &__x) + if (this != std::__addressof(__x)) _M_check_equal_allocators(__x); this->_M_transfer(__position._M_const_cast(), @@ -1501,7 +1539,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 { if (__first != __last) { - if (this != &__x) + if (this != std::__addressof(__x)) _M_check_equal_allocators(__x); size_t __n = this->_M_distance(__first._M_node, __last._M_node); @@ -1560,8 +1598,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * responsibility. */ template - void - remove_if(_Predicate); + void + remove_if(_Predicate); /** * @brief Remove consecutive duplicate elements. @@ -1589,8 +1627,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * Managing the pointer is the user's responsibility. */ template - void - unique(_BinaryPredicate); + void + unique(_BinaryPredicate); /** * @brief Merge sorted lists. @@ -1628,17 +1666,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 */ #if __cplusplus >= 201103L template - void - merge(list&& __x, _StrictWeakOrdering __comp); + void + merge(list&& __x, _StrictWeakOrdering __comp); template - void - merge(list& __x, _StrictWeakOrdering __comp) - { merge(std::move(__x), __comp); } + void + merge(list& __x, _StrictWeakOrdering __comp) + { merge(std::move(__x), __comp); } #else template - void - merge(list& __x, _StrictWeakOrdering __comp); + void + merge(list& __x, _StrictWeakOrdering __comp); #endif /** @@ -1666,8 +1704,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 * elements remain in list order. */ template - void - sort(_StrictWeakOrdering); + void + sort(_StrictWeakOrdering); protected: // Internal constructor functions follow. @@ -1677,16 +1715,16 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template - void - _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) - { _M_fill_initialize(static_cast(__n), __x); } + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { _M_fill_initialize(static_cast(__n), __x); } // Called by the range constructor to implement [23.1.1]/9 template - void - _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) - { + { for (; __first != __last; ++__first) #if __cplusplus >= 201103L emplace_back(*__first); @@ -1725,14 +1763,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template - void - _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) - { _M_fill_assign(__n, __val); } + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } // Called by the range assign to implement [23.1.1]/9 template - void - _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type); // Called by assign(n,t), and the range assign when it turns out @@ -1751,8 +1789,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 void _M_insert(iterator __position, const value_type& __x) { - _Node* __tmp = _M_create_node(__x); - __tmp->_M_hook(__position._M_node); + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); this->_M_inc_size(1); } #else @@ -1771,14 +1809,15 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 _M_erase(iterator __position) _GLIBCXX_NOEXCEPT { this->_M_dec_size(1); - __position._M_node->_M_unhook(); - _Node* __n = static_cast<_Node*>(__position._M_node); + __position._M_node->_M_unhook(); + _Node* __n = static_cast<_Node*>(__position._M_node); #if __cplusplus >= 201103L - _M_get_Node_allocator().destroy(__n); + _Node_alloc_traits::destroy(_M_get_Node_allocator(), __n->_M_valptr()); #else - _M_get_Tp_allocator().destroy(std::__addressof(__n->_M_data)); + _Tp_alloc_type(_M_get_Node_allocator()).destroy(__n->_M_valptr()); #endif - _M_put_node(__n); + + _M_put_node(__n); } // To implement the splice (and merge) bits of N1599. @@ -1789,6 +1828,44 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) __builtin_abort(); } + + // Used to implement resize. + const_iterator + _M_resize_pos(size_type& __new_size) const; + +#if __cplusplus >= 201103L + void + _M_move_assign(list&& __x, true_type) noexcept + { + this->_M_clear(); + if (__x.empty()) + this->_M_init(); + else + { + this->_M_impl._M_node._M_next = __x._M_impl._M_node._M_next; + this->_M_impl._M_node._M_next->_M_prev = &this->_M_impl._M_node; + this->_M_impl._M_node._M_prev = __x._M_impl._M_node._M_prev; + this->_M_impl._M_node._M_prev->_M_next = &this->_M_impl._M_node; + this->_M_set_size(__x._M_get_size()); + __x._M_init(); + } + std::__alloc_on_move(this->_M_get_Node_allocator(), + __x._M_get_Node_allocator()); + } + + void + _M_move_assign(list&& __x, false_type) + { + if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator()) + _M_move_assign(std::move(__x), true_type{}); + else + // The rvalue's allocator cannot be moved, or is not equal, + // so we need to individually move each element. + _M_assign_dispatch(std::__make_move_if_noexcept_iterator(__x.begin()), + std::__make_move_if_noexcept_iterator(__x.end()), + __false_type{}); + } +#endif }; _GLIBCXX_END_NAMESPACE_CXX11 @@ -1806,6 +1883,11 @@ _GLIBCXX_END_NAMESPACE_CXX11 inline bool operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { +#if _GLIBCXX_USE_CXX11_ABI + if (__x.size() != __y.size()) + return false; +#endif + typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; const_iterator __end1 = __x.end(); const_iterator __end2 = __y.end(); @@ -1865,9 +1947,49 @@ _GLIBCXX_END_NAMESPACE_CXX11 template inline void swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { __x.swap(__y); } _GLIBCXX_END_NAMESPACE_CONTAINER + +#if _GLIBCXX_USE_CXX11_ABI +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // Detect when distance is used to compute the size of the whole list. + template + inline ptrdiff_t + __distance(_GLIBCXX_STD_C::_List_iterator<_Tp> __first, + _GLIBCXX_STD_C::_List_iterator<_Tp> __last, + input_iterator_tag __tag) + { + typedef _GLIBCXX_STD_C::_List_const_iterator<_Tp> _CIter; + return std::__distance(_CIter(__first), _CIter(__last), __tag); + } + + template + inline ptrdiff_t + __distance(_GLIBCXX_STD_C::_List_const_iterator<_Tp> __first, + _GLIBCXX_STD_C::_List_const_iterator<_Tp> __last, + input_iterator_tag) + { + typedef _GLIBCXX_STD_C::_List_node _Sentinel; + _GLIBCXX_STD_C::_List_const_iterator<_Tp> __beyond = __last; + ++__beyond; + bool __whole = __first == __beyond; + if (__builtin_constant_p (__whole) && __whole) + return *static_cast(__last._M_node)->_M_valptr(); + + ptrdiff_t __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + +_GLIBCXX_END_NAMESPACE_VERSION +#endif } // namespace std #endif /* _STL_LIST_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_map.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_map.h similarity index 71% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_map.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_map.h index 179e3f2a0..30339536f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_map.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_map.h @@ -1,6 +1,6 @@ // Map implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -67,6 +67,9 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_CONTAINER + template + class multimap; + /** * @brief A standard container made up of (key,value) pairs, which can be * retrieved based on a key, in logarithmic time. @@ -76,7 +79,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @tparam _Key Type of key objects. * @tparam _Tp Type of mapped objects. * @tparam _Compare Comparison function object type, defaults to less<_Key>. - * @tparam _Alloc Allocator type, defaults to + * @tparam _Alloc Allocator type, defaults to * allocator. * * Meets the requirements of a container, a @@ -92,23 +95,27 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * called (*_unique versus *_equal, same as the standard). */ template , - typename _Alloc = std::allocator > > + typename _Alloc = std::allocator > > class map { public: - typedef _Key key_type; - typedef _Tp mapped_type; - typedef std::pair value_type; - typedef _Compare key_compare; - typedef _Alloc allocator_type; + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; private: +#ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements - typedef typename _Alloc::value_type _Alloc_value_type; + typedef typename _Alloc::value_type _Alloc_value_type; +# if __cplusplus < 201103L __glibcxx_class_requires(_Tp, _SGIAssignableConcept) +# endif __glibcxx_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept) __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept) +#endif public: class value_compare @@ -127,7 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER }; private: - /// This turns a red-black tree into a [multi]map. + /// This turns a red-black tree into a [multi]map. typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind::other _Pair_alloc_type; @@ -142,28 +149,33 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER public: // many of these are specified differently in ISO, but the following are // "functionally equivalent" - typedef typename _Alloc_traits::pointer pointer; - typedef typename _Alloc_traits::const_pointer const_pointer; - typedef typename _Alloc_traits::reference reference; - typedef typename _Alloc_traits::const_reference const_reference; - typedef typename _Rep_type::iterator iterator; - typedef typename _Rep_type::const_iterator const_iterator; - typedef typename _Rep_type::size_type size_type; - typedef typename _Rep_type::difference_type difference_type; - typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Alloc_traits::pointer pointer; + typedef typename _Alloc_traits::const_pointer const_pointer; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; +#if __cplusplus > 201402L + using node_type = typename _Rep_type::node_type; + using insert_return_type = typename _Rep_type::insert_return_type; +#endif + // [23.3.1.1] construct/copy/destroy // (get_allocator() is also listed in this section) /** * @brief Default constructor creates no elements. */ - map() -#if __cplusplus >= 201103L - noexcept(is_nothrow_default_constructible::value) +#if __cplusplus < 201103L + map() : _M_t() { } +#else + map() = default; #endif - : _M_t() { } /** * @brief Creates a %map with no elements. @@ -177,25 +189,22 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief %Map copy constructor. - * @param __x A %map of identical element and allocator types. * - * The newly-created %map uses a copy of the allocation object - * used by @a __x. + * Whether the allocator is copied depends on the allocator traits. */ +#if __cplusplus < 201103L map(const map& __x) : _M_t(__x._M_t) { } +#else + map(const map&) = default; -#if __cplusplus >= 201103L /** * @brief %Map move constructor. - * @param __x A %map of identical element and allocator types. * - * The newly-created %map contains the exact contents of @a __x. - * The contents of @a __x are a valid, but unspecified %map. + * The newly-created %map contains the exact contents of the moved + * instance. The moved instance is a valid, but unspecified, %map. */ - map(map&& __x) - noexcept(is_nothrow_copy_constructible<_Compare>::value) - : _M_t(std::move(__x._M_t)) { } + map(map&&) = default; /** * @brief Builds a %map from an initializer_list. @@ -236,10 +245,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /// Allocator-extended range constructor. template - map(_InputIterator __first, _InputIterator __last, + map(_InputIterator __first, _InputIterator __last, const allocator_type& __a) : _M_t(_Compare(), _Pair_alloc_type(__a)) - { _M_t._M_insert_unique(__first, __last); } + { _M_t._M_insert_unique(__first, __last); } #endif /** @@ -253,9 +262,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * distance(__first,__last)). */ template - map(_InputIterator __first, _InputIterator __last) + map(_InputIterator __first, _InputIterator __last) : _M_t() - { _M_t._M_insert_unique(__first, __last); } + { _M_t._M_insert_unique(__first, __last); } /** * @brief Builds a %map from a range. @@ -270,36 +279,37 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * distance(__first,__last)). */ template - map(_InputIterator __first, _InputIterator __last, + map(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) - { _M_t._M_insert_unique(__first, __last); } + { _M_t._M_insert_unique(__first, __last); } - // FIXME There is no dtor declared, but we should have something - // generated by Doxygen. I don't know what tags to add to this - // paragraph to make that happen: +#if __cplusplus >= 201103L /** * The dtor only erases the elements, and note that if the elements * themselves are pointers, the pointed-to memory is not touched in any * way. Managing the pointer is the user's responsibility. */ + ~map() = default; +#endif /** * @brief %Map assignment operator. - * @param __x A %map of identical element and allocator types. * - * All the elements of @a __x are copied, but unlike the copy - * constructor, the allocator object is not copied. + * Whether the allocator is copied depends on the allocator traits. */ +#if __cplusplus < 201103L map& operator=(const map& __x) { _M_t = __x._M_t; return *this; } +#else + map& + operator=(const map&) = default; -#if __cplusplus >= 201103L /// Move assignment operator. map& operator=(map&&) = default; @@ -313,7 +323,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %map and * that the resulting %map's size is the same as the number - * of elements assigned. Old data may be lost. + * of elements assigned. */ map& operator=(initializer_list __l) @@ -484,7 +494,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER std::tuple(__k), std::tuple<>()); #else - __i = insert(__i, value_type(__k, mapped_type())); + __i = insert(__i, value_type(__k, mapped_type())); #endif return (*__i).second; } @@ -592,14 +602,187 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER } #endif +#if __cplusplus > 201402L + /// Extract a node. + node_type + extract(const_iterator __pos) + { + __glibcxx_assert(__pos != end()); + return _M_t.extract(__pos); + } + + /// Extract a node. + node_type + extract(const key_type& __x) + { return _M_t.extract(__x); } + + /// Re-insert an extracted node. + insert_return_type + insert(node_type&& __nh) + { return _M_t._M_reinsert_node_unique(std::move(__nh)); } + + /// Re-insert an extracted node. + iterator + insert(const_iterator __hint, node_type&& __nh) + { return _M_t._M_reinsert_node_hint_unique(__hint, std::move(__nh)); } + + template + friend class _Rb_tree_merge_helper; + + template + void + merge(map<_Key, _Tp, _C2, _Alloc>& __source) + { + using _Merge_helper = _Rb_tree_merge_helper; + _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); + } + + template + void + merge(map<_Key, _Tp, _C2, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(multimap<_Key, _Tp, _C2, _Alloc>& __source) + { + using _Merge_helper = _Rb_tree_merge_helper; + _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); + } + + template + void + merge(multimap<_Key, _Tp, _C2, _Alloc>&& __source) + { merge(__source); } +#endif // C++17 + +#if __cplusplus > 201402L +#define __cpp_lib_map_try_emplace 201411 + /** + * @brief Attempts to build and insert a std::pair into the %map. + * + * @param __k Key to use for finding a possibly existing pair in + * the map. + * @param __args Arguments used to generate the .second for a new pair + * instance. + * + * @return A pair, of which the first element is an iterator that points + * to the possibly inserted pair, and the second is a bool that + * is true if the pair was actually inserted. + * + * This function attempts to build and insert a (key, value) %pair into + * the %map. + * A %map relies on unique keys and thus a %pair is only inserted if its + * first element (the key) is not already present in the %map. + * If a %pair is not inserted, this function has no effect. + * + * Insertion requires logarithmic time. + */ + template + pair + try_emplace(const key_type& __k, _Args&&... __args) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + { + __i = emplace_hint(__i, std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple( + std::forward<_Args>(__args)...)); + return {__i, true}; + } + return {__i, false}; + } + + // move-capable overload + template + pair + try_emplace(key_type&& __k, _Args&&... __args) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + { + __i = emplace_hint(__i, std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple( + std::forward<_Args>(__args)...)); + return {__i, true}; + } + return {__i, false}; + } + + /** + * @brief Attempts to build and insert a std::pair into the %map. + * + * @param __hint An iterator that serves as a hint as to where the + * pair should be inserted. + * @param __k Key to use for finding a possibly existing pair in + * the map. + * @param __args Arguments used to generate the .second for a new pair + * instance. + * @return An iterator that points to the element with key of the + * std::pair built from @a __args (may or may not be that + * std::pair). + * + * This function is not concerned about whether the insertion took place, + * and thus does not return a boolean like the single-argument + * try_emplace() does. However, if insertion did not take place, + * this function has no effect. + * Note that the first parameter is only a hint and can potentially + * improve the performance of the insertion process. A bad hint would + * cause no gains in efficiency. + * + * See + * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints + * for more on @a hinting. + * + * Insertion requires logarithmic time (if the hint is not taken). + */ + template + iterator + try_emplace(const_iterator __hint, const key_type& __k, + _Args&&... __args) + { + iterator __i; + auto __true_hint = _M_t._M_get_insert_hint_unique_pos(__hint, __k); + if (__true_hint.second) + __i = emplace_hint(iterator(__true_hint.second), + std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple( + std::forward<_Args>(__args)...)); + else + __i = iterator(__true_hint.first); + return __i; + } + + // move-capable overload + template + iterator + try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args) + { + iterator __i; + auto __true_hint = _M_t._M_get_insert_hint_unique_pos(__hint, __k); + if (__true_hint.second) + __i = emplace_hint(iterator(__true_hint.second), + std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple( + std::forward<_Args>(__args)...)); + else + __i = iterator(__true_hint.first); + return __i; + } +#endif + /** * @brief Attempts to insert a std::pair into the %map. * @param __x Pair to be inserted (see std::make_pair for easy * creation of pairs). * - * @return A pair, of which the first element is an iterator that - * points to the possibly inserted pair, and the second is + * @return A pair, of which the first element is an iterator that + * points to the possibly inserted pair, and the second is * a bool that is true if the pair was actually inserted. * * This function attempts to insert a (key, value) %pair into the %map. @@ -616,9 +799,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template::value>::type> - std::pair - insert(_Pair&& __x) - { return _M_t._M_insert_unique(std::forward<_Pair>(__x)); } + std::pair + insert(_Pair&& __x) + { return _M_t._M_insert_unique(std::forward<_Pair>(__x)); } #endif #if __cplusplus >= 201103L @@ -669,9 +852,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template::value>::type> - iterator - insert(const_iterator __position, _Pair&& __x) - { return _M_t._M_insert_unique_(__position, + iterator + insert(const_iterator __position, _Pair&& __x) + { return _M_t._M_insert_unique_(__position, std::forward<_Pair>(__x)); } #endif @@ -684,9 +867,126 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * Complexity similar to that of the range constructor. */ template - void - insert(_InputIterator __first, _InputIterator __last) - { _M_t._M_insert_unique(__first, __last); } + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } + +#if __cplusplus > 201402L +#define __cpp_lib_map_insertion 201411 + /** + * @brief Attempts to insert or assign a std::pair into the %map. + * @param __k Key to use for finding a possibly existing pair in + * the map. + * @param __obj Argument used to generate the .second for a pair + * instance. + * + * @return A pair, of which the first element is an iterator that + * points to the possibly inserted pair, and the second is + * a bool that is true if the pair was actually inserted. + * + * This function attempts to insert a (key, value) %pair into the %map. + * A %map relies on unique keys and thus a %pair is only inserted if its + * first element (the key) is not already present in the %map. + * If the %pair was already in the %map, the .second of the %pair + * is assigned from __obj. + * + * Insertion requires logarithmic time. + */ + template + pair + insert_or_assign(const key_type& __k, _Obj&& __obj) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + { + __i = emplace_hint(__i, std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple( + std::forward<_Obj>(__obj))); + return {__i, true}; + } + (*__i).second = std::forward<_Obj>(__obj); + return {__i, false}; + } + + // move-capable overload + template + pair + insert_or_assign(key_type&& __k, _Obj&& __obj) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + { + __i = emplace_hint(__i, std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple( + std::forward<_Obj>(__obj))); + return {__i, true}; + } + (*__i).second = std::forward<_Obj>(__obj); + return {__i, false}; + } + + /** + * @brief Attempts to insert or assign a std::pair into the %map. + * @param __hint An iterator that serves as a hint as to where the + * pair should be inserted. + * @param __k Key to use for finding a possibly existing pair in + * the map. + * @param __obj Argument used to generate the .second for a pair + * instance. + * + * @return An iterator that points to the element with key of + * @a __x (may or may not be the %pair passed in). + * + * This function attempts to insert a (key, value) %pair into the %map. + * A %map relies on unique keys and thus a %pair is only inserted if its + * first element (the key) is not already present in the %map. + * If the %pair was already in the %map, the .second of the %pair + * is assigned from __obj. + * + * Insertion requires logarithmic time. + */ + template + iterator + insert_or_assign(const_iterator __hint, + const key_type& __k, _Obj&& __obj) + { + iterator __i; + auto __true_hint = _M_t._M_get_insert_hint_unique_pos(__hint, __k); + if (__true_hint.second) + { + return emplace_hint(iterator(__true_hint.second), + std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple( + std::forward<_Obj>(__obj))); + } + __i = iterator(__true_hint.first); + (*__i).second = std::forward<_Obj>(__obj); + return __i; + } + + // move-capable overload + template + iterator + insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj) + { + iterator __i; + auto __true_hint = _M_t._M_get_insert_hint_unique_pos(__hint, __k); + if (__true_hint.second) + { + return emplace_hint(iterator(__true_hint.second), + std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple( + std::forward<_Obj>(__obj))); + } + __i = iterator(__true_hint.first); + (*__i).second = std::forward<_Obj>(__obj); + return __i; + } +#endif #if __cplusplus >= 201103L // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -695,7 +995,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief Erases an element from a %map. * @param __position An iterator pointing to the element to be erased. * @return An iterator pointing to the element immediately following - * @a position prior to the element being erased. If no such + * @a position prior to the element being erased. If no such * element exists, end() is returned. * * This function erases an element, pointed to by the given @@ -703,6 +1003,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * the element, and that if the element is itself a pointer, * the pointed-to memory is not touched in any way. Managing * the pointer is the user's responsibility. + * + * @{ */ iterator erase(const_iterator __position) @@ -713,6 +1015,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER iterator erase(iterator __position) { return _M_t.erase(__position); } + // @} #else /** * @brief Erases an element from a %map. @@ -791,12 +1094,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * stateless and empty), so it should be quite fast.) Note * that the global std::swap() function is specialized such * that std::swap(m1,m2) will feed to this function. + * + * Whether the allocators are swapped depends on the allocator traits. */ void swap(map& __x) -#if __cplusplus >= 201103L - noexcept(_Alloc_traits::_S_nothrow_swap()) -#endif + _GLIBCXX_NOEXCEPT_IF(__is_nothrow_swappable<_Compare>::value) { _M_t.swap(__x._M_t); } /** @@ -895,7 +1198,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x)) - { return _M_t._M_find_tr(__x) == _M_t.end() ? 0 : 1; } + { return _M_t._M_count_tr(__x); } #endif //@} @@ -919,8 +1222,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto lower_bound(const _Kt& __x) - -> decltype(_M_t._M_lower_bound_tr(__x)) - { return _M_t._M_lower_bound_tr(__x); } + -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) + { return iterator(_M_t._M_lower_bound_tr(__x)); } #endif //@} @@ -944,8 +1247,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto lower_bound(const _Kt& __x) const - -> decltype(_M_t._M_lower_bound_tr(__x)) - { return _M_t._M_lower_bound_tr(__x); } + -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x))) + { return const_iterator(_M_t._M_lower_bound_tr(__x)); } #endif //@} @@ -964,8 +1267,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto upper_bound(const _Kt& __x) - -> decltype(_M_t._M_upper_bound_tr(__x)) - { return _M_t._M_upper_bound_tr(__x); } + -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) + { return iterator(_M_t._M_upper_bound_tr(__x)); } #endif //@} @@ -984,8 +1287,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto upper_bound(const _Kt& __x) const - -> decltype(_M_t._M_upper_bound_tr(__x)) - { return _M_t._M_upper_bound_tr(__x); } + -> decltype(const_iterator(_M_t._M_upper_bound_tr(__x))) + { return const_iterator(_M_t._M_upper_bound_tr(__x)); } #endif //@} @@ -1013,8 +1316,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto equal_range(const _Kt& __x) - -> decltype(_M_t._M_equal_range_tr(__x)) - { return _M_t._M_equal_range_tr(__x); } + -> decltype(pair(_M_t._M_equal_range_tr(__x))) + { return pair(_M_t._M_equal_range_tr(__x)); } #endif //@} @@ -1042,19 +1345,23 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto equal_range(const _Kt& __x) const - -> decltype(_M_t._M_equal_range_tr(__x)) - { return _M_t._M_equal_range_tr(__x); } + -> decltype(pair( + _M_t._M_equal_range_tr(__x))) + { + return pair( + _M_t._M_equal_range_tr(__x)); + } #endif //@} template - friend bool - operator==(const map<_K1, _T1, _C1, _A1>&, + friend bool + operator==(const map<_K1, _T1, _C1, _A1>&, const map<_K1, _T1, _C1, _A1>&); template - friend bool - operator<(const map<_K1, _T1, _C1, _A1>&, + friend bool + operator<(const map<_K1, _T1, _C1, _A1>&, const map<_K1, _T1, _C1, _A1>&); }; @@ -1071,7 +1378,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template inline bool operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, - const map<_Key, _Tp, _Compare, _Alloc>& __y) + const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } /** @@ -1088,35 +1395,35 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template inline bool operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, - const map<_Key, _Tp, _Compare, _Alloc>& __y) + const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t < __y._M_t; } /// Based on operator== template inline bool operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, - const map<_Key, _Tp, _Compare, _Alloc>& __y) + const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x == __y); } /// Based on operator< template inline bool operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, - const map<_Key, _Tp, _Compare, _Alloc>& __y) + const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __y < __x; } /// Based on operator< template inline bool operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, - const map<_Key, _Tp, _Compare, _Alloc>& __y) + const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__y < __x); } /// Based on operator< template inline bool operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, - const map<_Key, _Tp, _Compare, _Alloc>& __y) + const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x < __y); } /// See std::map::swap(). @@ -1124,9 +1431,34 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER inline void swap(map<_Key, _Tp, _Compare, _Alloc>& __x, map<_Key, _Tp, _Compare, _Alloc>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { __x.swap(__y); } _GLIBCXX_END_NAMESPACE_CONTAINER + +#if __cplusplus > 201402L +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Allow std::map access to internals of compatible maps. + template + struct + _Rb_tree_merge_helper<_GLIBCXX_STD_C::map<_Key, _Val, _Cmp1, _Alloc>, + _Cmp2> + { + private: + friend class _GLIBCXX_STD_C::map<_Key, _Val, _Cmp1, _Alloc>; + + static auto& + _S_get_tree(_GLIBCXX_STD_C::map<_Key, _Val, _Cmp2, _Alloc>& __map) + { return __map._M_t; } + + static auto& + _S_get_tree(_GLIBCXX_STD_C::multimap<_Key, _Val, _Cmp2, _Alloc>& __map) + { return __map._M_t; } + }; +_GLIBCXX_END_NAMESPACE_VERSION +#endif // C++17 + } // namespace std #endif /* _STL_MAP_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_multimap.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_multimap.h similarity index 84% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_multimap.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_multimap.h index 10ac0fade..7dc22a96a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_multimap.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_multimap.h @@ -1,6 +1,6 @@ // Multimap implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -65,6 +65,9 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_CONTAINER + template + class map; + /** * @brief A standard container made up of (key,value) pairs, which can be * retrieved based on a key, in logarithmic time. @@ -74,7 +77,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @tparam _Key Type of key objects. * @tparam _Tp Type of mapped objects. * @tparam _Compare Comparison function object type, defaults to less<_Key>. - * @tparam _Alloc Allocator type, defaults to + * @tparam _Alloc Allocator type, defaults to * allocator. * * Meets the requirements of a container, a @@ -95,19 +98,23 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER class multimap { public: - typedef _Key key_type; - typedef _Tp mapped_type; - typedef std::pair value_type; - typedef _Compare key_compare; - typedef _Alloc allocator_type; + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; private: +#ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements - typedef typename _Alloc::value_type _Alloc_value_type; + typedef typename _Alloc::value_type _Alloc_value_type; +# if __cplusplus < 201103L __glibcxx_class_requires(_Tp, _SGIAssignableConcept) +# endif __glibcxx_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept) __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept) +#endif public: class value_compare @@ -140,28 +147,32 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER public: // many of these are specified differently in ISO, but the following are // "functionally equivalent" - typedef typename _Alloc_traits::pointer pointer; - typedef typename _Alloc_traits::const_pointer const_pointer; - typedef typename _Alloc_traits::reference reference; - typedef typename _Alloc_traits::const_reference const_reference; - typedef typename _Rep_type::iterator iterator; - typedef typename _Rep_type::const_iterator const_iterator; - typedef typename _Rep_type::size_type size_type; - typedef typename _Rep_type::difference_type difference_type; - typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Alloc_traits::pointer pointer; + typedef typename _Alloc_traits::const_pointer const_pointer; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; +#if __cplusplus > 201402L + using node_type = typename _Rep_type::node_type; +#endif + // [23.3.2] construct/copy/destroy // (get_allocator() is also listed in this section) /** * @brief Default constructor creates no elements. */ - multimap() -#if __cplusplus >= 201103L - noexcept(is_nothrow_default_constructible::value) +#if __cplusplus < 201103L + multimap() : _M_t() { } +#else + multimap() = default; #endif - : _M_t() { } /** * @brief Creates a %multimap with no elements. @@ -175,25 +186,23 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief %Multimap copy constructor. - * @param __x A %multimap of identical element and allocator types. * - * The newly-created %multimap uses a copy of the allocation object - * used by @a __x. + * Whether the allocator is copied depends on the allocator traits. */ +#if __cplusplus < 201103L multimap(const multimap& __x) : _M_t(__x._M_t) { } +#else + multimap(const multimap&) = default; -#if __cplusplus >= 201103L /** * @brief %Multimap move constructor. - * @param __x A %multimap of identical element and allocator types. * - * The newly-created %multimap contains the exact contents of @a __x. - * The contents of @a __x are a valid, but unspecified %multimap. + * The newly-created %multimap contains the exact contents of the + * moved instance. The moved instance is a valid, but unspecified + * %multimap. */ - multimap(multimap&& __x) - noexcept(is_nothrow_copy_constructible<_Compare>::value) - : _M_t(std::move(__x._M_t)) { } + multimap(multimap&&) = default; /** * @brief Builds a %multimap from an initializer_list. @@ -233,10 +242,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /// Allocator-extended range constructor. template - multimap(_InputIterator __first, _InputIterator __last, + multimap(_InputIterator __first, _InputIterator __last, const allocator_type& __a) : _M_t(_Compare(), _Pair_alloc_type(__a)) - { _M_t._M_insert_equal(__first, __last); } + { _M_t._M_insert_equal(__first, __last); } #endif /** @@ -249,9 +258,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * and NlogN otherwise (where N is distance(__first,__last)). */ template - multimap(_InputIterator __first, _InputIterator __last) + multimap(_InputIterator __first, _InputIterator __last) : _M_t() - { _M_t._M_insert_equal(__first, __last); } + { _M_t._M_insert_equal(__first, __last); } /** * @brief Builds a %multimap from a range. @@ -265,36 +274,37 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * and NlogN otherwise (where N is distance(__first,__last)). */ template - multimap(_InputIterator __first, _InputIterator __last, + multimap(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) - { _M_t._M_insert_equal(__first, __last); } + { _M_t._M_insert_equal(__first, __last); } - // FIXME There is no dtor declared, but we should have something generated - // by Doxygen. I don't know what tags to add to this paragraph to make - // that happen: +#if __cplusplus >= 201103L /** * The dtor only erases the elements, and note that if the elements * themselves are pointers, the pointed-to memory is not touched in any - * way. Managing the pointer is the user's responsibility. + * way. Managing the pointer is the user's responsibility. */ + ~multimap() = default; +#endif /** * @brief %Multimap assignment operator. - * @param __x A %multimap of identical element and allocator types. * - * All the elements of @a __x are copied, but unlike the copy - * constructor, the allocator object is not copied. + * Whether the allocator is copied depends on the allocator traits. */ +#if __cplusplus < 201103L multimap& operator=(const multimap& __x) { _M_t = __x._M_t; return *this; } +#else + multimap& + operator=(const multimap&) = default; -#if __cplusplus >= 201103L /// Move assignment operator. multimap& operator=(multimap&&) = default; @@ -308,7 +318,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %multimap and * that the resulting %multimap's size is the same as the number - * of elements assigned. Old data may be lost. + * of elements assigned. */ multimap& operator=(initializer_list __l) @@ -320,7 +330,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /// Get a copy of the memory allocation object. allocator_type - get_allocator() const _GLIBCXX_NOEXCEPT + get_allocator() const _GLIBCXX_NOEXCEPT { return allocator_type(_M_t.get_allocator()); } // iterators @@ -524,9 +534,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template::value>::type> - iterator - insert(_Pair&& __x) - { return _M_t._M_insert_equal(std::forward<_Pair>(__x)); } + iterator + insert(_Pair&& __x) + { return _M_t._M_insert_equal(std::forward<_Pair>(__x)); } #endif /** @@ -561,9 +571,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template::value>::type> - iterator - insert(const_iterator __position, _Pair&& __x) - { return _M_t._M_insert_equal_(__position, + iterator + insert(const_iterator __position, _Pair&& __x) + { return _M_t._M_insert_equal_(__position, std::forward<_Pair>(__x)); } #endif @@ -577,9 +587,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * Complexity similar to that of the range constructor. */ template - void - insert(_InputIterator __first, _InputIterator __last) - { _M_t._M_insert_equal(__first, __last); } + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } #if __cplusplus >= 201103L /** @@ -594,6 +604,60 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { this->insert(__l.begin(), __l.end()); } #endif +#if __cplusplus > 201402L + /// Extract a node. + node_type + extract(const_iterator __pos) + { + __glibcxx_assert(__pos != end()); + return _M_t.extract(__pos); + } + + /// Extract a node. + node_type + extract(const key_type& __x) + { return _M_t.extract(__x); } + + /// Re-insert an extracted node. + iterator + insert(node_type&& __nh) + { return _M_t._M_reinsert_node_equal(std::move(__nh)); } + + /// Re-insert an extracted node. + iterator + insert(const_iterator __hint, node_type&& __nh) + { return _M_t._M_reinsert_node_hint_equal(__hint, std::move(__nh)); } + + template + friend class _Rb_tree_merge_helper; + + template + void + merge(multimap<_Key, _Tp, _C2, _Alloc>& __source) + { + using _Merge_helper = _Rb_tree_merge_helper; + _M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source)); + } + + template + void + merge(multimap<_Key, _Tp, _C2, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(map<_Key, _Tp, _C2, _Alloc>& __source) + { + using _Merge_helper = _Rb_tree_merge_helper; + _M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source)); + } + + template + void + merge(map<_Key, _Tp, _C2, _Alloc>&& __source) + { merge(__source); } +#endif // C++17 + #if __cplusplus >= 201103L // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 130. Associative erase should return an iterator. @@ -601,7 +665,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief Erases an element from a %multimap. * @param __position An iterator pointing to the element to be erased. * @return An iterator pointing to the element immediately following - * @a position prior to the element being erased. If no such + * @a position prior to the element being erased. If no such * element exists, end() is returned. * * This function erases an element, pointed to by the given iterator, @@ -609,6 +673,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * and that if the element is itself a pointer, the pointed-to memory is * not touched in any way. Managing the pointer is the user's * responsibility. + * + * @{ */ iterator erase(const_iterator __position) @@ -619,6 +685,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER iterator erase(iterator __position) { return _M_t.erase(__position); } + // @} #else /** * @brief Erases an element from a %multimap. @@ -701,12 +768,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * should be quite fast.) * Note that the global std::swap() function is specialized such that * std::swap(m1,m2) will feed to this function. + * + * Whether the allocators are swapped depends on the allocator traits. */ void swap(multimap& __x) -#if __cplusplus >= 201103L - noexcept(_Alloc_traits::_S_nothrow_swap()) -#endif + _GLIBCXX_NOEXCEPT_IF(__is_nothrow_swappable<_Compare>::value) { _M_t.swap(__x._M_t); } /** @@ -824,8 +891,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto lower_bound(const _Kt& __x) - -> decltype(_M_t._M_lower_bound_tr(__x)) - { return _M_t._M_lower_bound_tr(__x); } + -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) + { return iterator(_M_t._M_lower_bound_tr(__x)); } #endif //@} @@ -849,8 +916,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto lower_bound(const _Kt& __x) const - -> decltype(_M_t._M_lower_bound_tr(__x)) - { return _M_t._M_lower_bound_tr(__x); } + -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x))) + { return const_iterator(_M_t._M_lower_bound_tr(__x)); } #endif //@} @@ -869,8 +936,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto upper_bound(const _Kt& __x) - -> decltype(_M_t._M_upper_bound_tr(__x)) - { return _M_t._M_upper_bound_tr(__x); } + -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) + { return iterator(_M_t._M_upper_bound_tr(__x)); } #endif //@} @@ -889,8 +956,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto upper_bound(const _Kt& __x) const - -> decltype(_M_t._M_upper_bound_tr(__x)) - { return _M_t._M_upper_bound_tr(__x); } + -> decltype(const_iterator(_M_t._M_upper_bound_tr(__x))) + { return const_iterator(_M_t._M_upper_bound_tr(__x)); } #endif //@} @@ -916,8 +983,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto equal_range(const _Kt& __x) - -> decltype(_M_t._M_equal_range_tr(__x)) - { return _M_t._M_equal_range_tr(__x); } + -> decltype(pair(_M_t._M_equal_range_tr(__x))) + { return pair(_M_t._M_equal_range_tr(__x)); } #endif //@} @@ -943,19 +1010,23 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto equal_range(const _Kt& __x) const - -> decltype(_M_t._M_equal_range_tr(__x)) - { return _M_t._M_equal_range_tr(__x); } + -> decltype(pair( + _M_t._M_equal_range_tr(__x))) + { + return pair( + _M_t._M_equal_range_tr(__x)); + } #endif //@} template - friend bool - operator==(const multimap<_K1, _T1, _C1, _A1>&, + friend bool + operator==(const multimap<_K1, _T1, _C1, _A1>&, const multimap<_K1, _T1, _C1, _A1>&); template - friend bool - operator<(const multimap<_K1, _T1, _C1, _A1>&, + friend bool + operator<(const multimap<_K1, _T1, _C1, _A1>&, const multimap<_K1, _T1, _C1, _A1>&); }; @@ -972,7 +1043,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template inline bool operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, - const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } /** @@ -989,45 +1060,70 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template inline bool operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, - const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t < __y._M_t; } /// Based on operator== template inline bool operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, - const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x == __y); } /// Based on operator< template inline bool operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, - const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __y < __x; } /// Based on operator< template inline bool operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, - const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__y < __x); } /// Based on operator< template inline bool operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, - const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x < __y); } /// See std::multimap::swap(). template inline void swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, - multimap<_Key, _Tp, _Compare, _Alloc>& __y) + multimap<_Key, _Tp, _Compare, _Alloc>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { __x.swap(__y); } _GLIBCXX_END_NAMESPACE_CONTAINER + +#if __cplusplus > 201402L +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Allow std::multimap access to internals of compatible maps. + template + struct + _Rb_tree_merge_helper<_GLIBCXX_STD_C::multimap<_Key, _Val, _Cmp1, _Alloc>, + _Cmp2> + { + private: + friend class _GLIBCXX_STD_C::multimap<_Key, _Val, _Cmp1, _Alloc>; + + static auto& + _S_get_tree(_GLIBCXX_STD_C::map<_Key, _Val, _Cmp2, _Alloc>& __map) + { return __map._M_t; } + + static auto& + _S_get_tree(_GLIBCXX_STD_C::multimap<_Key, _Val, _Cmp2, _Alloc>& __map) + { return __map._M_t; } + }; +_GLIBCXX_END_NAMESPACE_VERSION +#endif // C++17 + } // namespace std #endif /* _STL_MULTIMAP_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_multiset.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_multiset.h similarity index 84% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_multiset.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_multiset.h index ffe15ae31..60a3db844 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_multiset.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_multiset.h @@ -1,6 +1,6 @@ // Multiset implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -65,6 +65,9 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_CONTAINER + template + class set; + /** * @brief A standard container made up of elements, which can be retrieved * in logarithmic time. @@ -91,12 +94,16 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typename _Alloc = std::allocator<_Key> > class multiset { +#ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements - typedef typename _Alloc::value_type _Alloc_value_type; + typedef typename _Alloc::value_type _Alloc_value_type; +# if __cplusplus < 201103L __glibcxx_class_requires(_Key, _SGIAssignableConcept) +# endif __glibcxx_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept) - __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept) + __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept) +#endif public: // typedefs: @@ -119,29 +126,33 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef __gnu_cxx::__alloc_traits<_Key_alloc_type> _Alloc_traits; public: - typedef typename _Alloc_traits::pointer pointer; - typedef typename _Alloc_traits::const_pointer const_pointer; - typedef typename _Alloc_traits::reference reference; - typedef typename _Alloc_traits::const_reference const_reference; + typedef typename _Alloc_traits::pointer pointer; + typedef typename _Alloc_traits::const_pointer const_pointer; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 103. set::iterator is required to be modifiable, // but this allows modification of keys. - typedef typename _Rep_type::const_iterator iterator; - typedef typename _Rep_type::const_iterator const_iterator; - typedef typename _Rep_type::const_reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::const_reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; - typedef typename _Rep_type::size_type size_type; - typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + +#if __cplusplus > 201402L + using node_type = typename _Rep_type::node_type; +#endif // allocation/deallocation /** * @brief Default constructor creates no elements. */ - multiset() -#if __cplusplus >= 201103L - noexcept(is_nothrow_default_constructible::value) +#if __cplusplus < 201103L + multiset() : _M_t() { } +#else + multiset() = default; #endif - : _M_t() { } /** * @brief Creates a %multiset with no elements. @@ -163,9 +174,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * and NlogN otherwise (where N is distance(__first,__last)). */ template - multiset(_InputIterator __first, _InputIterator __last) + multiset(_InputIterator __first, _InputIterator __last) : _M_t() - { _M_t._M_insert_equal(__first, __last); } + { _M_t._M_insert_equal(__first, __last); } /** * @brief Builds a %multiset from a range. @@ -179,33 +190,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * and NlogN otherwise (where N is distance(__first,__last)). */ template - multiset(_InputIterator __first, _InputIterator __last, + multiset(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Key_alloc_type(__a)) - { _M_t._M_insert_equal(__first, __last); } + { _M_t._M_insert_equal(__first, __last); } /** * @brief %Multiset copy constructor. - * @param __x A %multiset of identical element and allocator types. * - * The newly-created %multiset uses a copy of the allocation object used - * by @a __x. + * Whether the allocator is copied depends on the allocator traits. */ +#if __cplusplus < 201103L multiset(const multiset& __x) : _M_t(__x._M_t) { } +#else + multiset(const multiset&) = default; -#if __cplusplus >= 201103L /** * @brief %Multiset move constructor. - * @param __x A %multiset of identical element and allocator types. * - * The newly-created %multiset contains the exact contents of @a __x. - * The contents of @a __x are a valid, but unspecified %multiset. + * The newly-created %multiset contains the exact contents of the + * moved instance. The moved instance is a valid, but unspecified + * %multiset. */ - multiset(multiset&& __x) - noexcept(is_nothrow_copy_constructible<_Compare>::value) - : _M_t(std::move(__x._M_t)) { } + multiset(multiset&&) = default; /** * @brief Builds a %multiset from an initializer_list. @@ -245,27 +254,35 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /// Allocator-extended range constructor. template - multiset(_InputIterator __first, _InputIterator __last, + multiset(_InputIterator __first, _InputIterator __last, const allocator_type& __a) : _M_t(_Compare(), _Key_alloc_type(__a)) - { _M_t._M_insert_equal(__first, __last); } + { _M_t._M_insert_equal(__first, __last); } + + /** + * The dtor only erases the elements, and note that if the elements + * themselves are pointers, the pointed-to memory is not touched in any + * way. Managing the pointer is the user's responsibility. + */ + ~multiset() = default; #endif /** * @brief %Multiset assignment operator. - * @param __x A %multiset of identical element and allocator types. * - * All the elements of @a __x are copied, but unlike the copy - * constructor, the allocator object is not copied. + * Whether the allocator is copied depends on the allocator traits. */ +#if __cplusplus < 201103L multiset& operator=(const multiset& __x) { _M_t = __x._M_t; return *this; } +#else + multiset& + operator=(const multiset&) = default; -#if __cplusplus >= 201103L /// Move assignment operator. multiset& operator=(multiset&&) = default; @@ -279,7 +296,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %multiset and * that the resulting %multiset's size is the same as the number - * of elements assigned. Old data may be lost. + * of elements assigned. */ multiset& operator=(initializer_list __l) @@ -403,12 +420,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * be quite fast.) * Note that the global std::swap() function is specialized such that * std::swap(s1,s2) will feed to this function. + * + * Whether the allocators are swapped depends on the allocator traits. */ void swap(multiset& __x) -#if __cplusplus >= 201103L - noexcept(_Alloc_traits::_S_nothrow_swap()) -#endif + _GLIBCXX_NOEXCEPT_IF(__is_nothrow_swappable<_Compare>::value) { _M_t.swap(__x._M_t); } // insert/erase @@ -520,9 +537,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * Complexity similar to that of the range constructor. */ template - void - insert(_InputIterator __first, _InputIterator __last) - { _M_t._M_insert_equal(__first, __last); } + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } #if __cplusplus >= 201103L /** @@ -537,6 +554,60 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { this->insert(__l.begin(), __l.end()); } #endif +#if __cplusplus > 201402L + /// Extract a node. + node_type + extract(const_iterator __pos) + { + __glibcxx_assert(__pos != end()); + return _M_t.extract(__pos); + } + + /// Extract a node. + node_type + extract(const key_type& __x) + { return _M_t.extract(__x); } + + /// Re-insert an extracted node. + iterator + insert(node_type&& __nh) + { return _M_t._M_reinsert_node_equal(std::move(__nh)); } + + /// Re-insert an extracted node. + iterator + insert(const_iterator __hint, node_type&& __nh) + { return _M_t._M_reinsert_node_hint_equal(__hint, std::move(__nh)); } + + template + friend class _Rb_tree_merge_helper; + + template + void + merge(multiset<_Key, _Compare1, _Alloc>& __source) + { + using _Merge_helper = _Rb_tree_merge_helper; + _M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source)); + } + + template + void + merge(multiset<_Key, _Compare1, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(set<_Key, _Compare1, _Alloc>& __source) + { + using _Merge_helper = _Rb_tree_merge_helper; + _M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source)); + } + + template + void + merge(set<_Key, _Compare1, _Alloc>&& __source) + { merge(__source); } +#endif // C++17 + #if __cplusplus >= 201103L // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 130. Associative erase should return an iterator. @@ -544,7 +615,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief Erases an element from a %multiset. * @param __position An iterator pointing to the element to be erased. * @return An iterator pointing to the element immediately following - * @a position prior to the element being erased. If no such + * @a position prior to the element being erased. If no such * element exists, end() is returned. * * This function erases an element, pointed to by the given iterator, @@ -718,14 +789,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto lower_bound(const _Kt& __x) - -> decltype(_M_t._M_lower_bound_tr(__x)) - { return _M_t._M_lower_bound_tr(__x); } + -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) + { return iterator(_M_t._M_lower_bound_tr(__x)); } template auto lower_bound(const _Kt& __x) const - -> decltype(_M_t._M_lower_bound_tr(__x)) - { return _M_t._M_lower_bound_tr(__x); } + -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) + { return iterator(_M_t._M_lower_bound_tr(__x)); } #endif //@} @@ -748,14 +819,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto upper_bound(const _Kt& __x) - -> decltype(_M_t._M_upper_bound_tr(__x)) - { return _M_t._M_upper_bound_tr(__x); } + -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) + { return iterator(_M_t._M_upper_bound_tr(__x)); } template auto upper_bound(const _Kt& __x) const - -> decltype(_M_t._M_upper_bound_tr(__x)) - { return _M_t._M_upper_bound_tr(__x); } + -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) + { return iterator(_M_t._M_upper_bound_tr(__x)); } #endif //@} @@ -787,25 +858,25 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto equal_range(const _Kt& __x) - -> decltype(_M_t._M_equal_range_tr(__x)) - { return _M_t._M_equal_range_tr(__x); } + -> decltype(pair(_M_t._M_equal_range_tr(__x))) + { return pair(_M_t._M_equal_range_tr(__x)); } template auto equal_range(const _Kt& __x) const - -> decltype(_M_t._M_equal_range_tr(__x)) - { return _M_t._M_equal_range_tr(__x); } + -> decltype(pair(_M_t._M_equal_range_tr(__x))) + { return pair(_M_t._M_equal_range_tr(__x)); } #endif //@} template - friend bool - operator==(const multiset<_K1, _C1, _A1>&, + friend bool + operator==(const multiset<_K1, _C1, _A1>&, const multiset<_K1, _C1, _A1>&); template - friend bool - operator< (const multiset<_K1, _C1, _A1>&, + friend bool + operator< (const multiset<_K1, _C1, _A1>&, const multiset<_K1, _C1, _A1>&); }; @@ -876,9 +947,33 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER inline void swap(multiset<_Key, _Compare, _Alloc>& __x, multiset<_Key, _Compare, _Alloc>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { __x.swap(__y); } _GLIBCXX_END_NAMESPACE_CONTAINER + +#if __cplusplus > 201402L +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Allow std::multiset access to internals of compatible sets. + template + struct + _Rb_tree_merge_helper<_GLIBCXX_STD_C::multiset<_Val, _Cmp1, _Alloc>, + _Cmp2> + { + private: + friend class _GLIBCXX_STD_C::multiset<_Val, _Cmp1, _Alloc>; + + static auto& + _S_get_tree(_GLIBCXX_STD_C::set<_Val, _Cmp2, _Alloc>& __set) + { return __set._M_t; } + + static auto& + _S_get_tree(_GLIBCXX_STD_C::multiset<_Val, _Cmp2, _Alloc>& __set) + { return __set._M_t; } + }; +_GLIBCXX_END_NAMESPACE_VERSION +#endif // C++17 + } // namespace std #endif /* _STL_MULTISET_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_numeric.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_numeric.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_numeric.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_numeric.h index 8ad78fb46..9f9816428 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_numeric.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_numeric.h @@ -1,6 +1,6 @@ // Numeric functions implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -179,7 +179,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>) __glibcxx_requires_valid_range(__first1, __last1); - for (; __first1 != __last1; ++__first1, ++__first2) + for (; __first1 != __last1; ++__first1, (void)++__first2) __init = __init + (*__first1 * *__first2); return __init; } @@ -213,7 +213,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>) __glibcxx_requires_valid_range(__first1, __last1); - for (; __first1 != __last1; ++__first1, ++__first2) + for (; __first1 != __last1; ++__first1, (void)++__first2) __init = __binary_op1(__init, __binary_op2(*__first1, *__first2)); return __init; } diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_pair.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_pair.h new file mode 100644 index 000000000..b6245b65c --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_pair.h @@ -0,0 +1,538 @@ +// Pair implementation -*- C++ -*- + +// Copyright (C) 2001-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/** @file bits/stl_pair.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{utility} + */ + +#ifndef _STL_PAIR_H +#define _STL_PAIR_H 1 + +#include // for std::move / std::forward, and std::swap + +#if __cplusplus >= 201103L +#include // for std::__decay_and_strip too +#endif + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @addtogroup utilities + * @{ + */ + +#if __cplusplus >= 201103L + /// piecewise_construct_t + struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; + + /// piecewise_construct + _GLIBCXX17_INLINE constexpr piecewise_construct_t piecewise_construct = + piecewise_construct_t(); + + // Forward declarations. + template + class tuple; + + template + struct _Index_tuple; + + // Concept utility functions, reused in conditionally-explicit + // constructors. + // See PR 70437, don't look at is_constructible or + // is_convertible if the types are the same to + // avoid querying those properties for incomplete types. + template + struct _PCC + { + template + static constexpr bool _ConstructiblePair() + { + return __and_, + is_constructible<_T2, const _U2&>>::value; + } + + template + static constexpr bool _ImplicitlyConvertiblePair() + { + return __and_, + is_convertible>::value; + } + + template + static constexpr bool _MoveConstructiblePair() + { + return __and_, + is_constructible<_T2, _U2&&>>::value; + } + + template + static constexpr bool _ImplicitlyMoveConvertiblePair() + { + return __and_, + is_convertible<_U2&&, _T2>>::value; + } + + template + static constexpr bool _CopyMovePair() + { + using __do_converts = __and_, + is_convertible<_U2&&, _T2>>; + using __converts = typename conditional<__implicit, + __do_converts, + __not_<__do_converts>>::type; + return __and_, + is_constructible<_T2, _U2&&>, + __converts + >::value; + } + + template + static constexpr bool _MoveCopyPair() + { + using __do_converts = __and_, + is_convertible>; + using __converts = typename conditional<__implicit, + __do_converts, + __not_<__do_converts>>::type; + return __and_, + is_constructible<_T2, const _U2&&>, + __converts + >::value; + } + }; + + template + struct _PCC + { + template + static constexpr bool _ConstructiblePair() + { + return false; + } + + template + static constexpr bool _ImplicitlyConvertiblePair() + { + return false; + } + + template + static constexpr bool _MoveConstructiblePair() + { + return false; + } + + template + static constexpr bool _ImplicitlyMoveConvertiblePair() + { + return false; + } + }; + + // PR libstdc++/79141, a utility type for preventing + // initialization of an argument of a disabled assignment + // operator from a pair of empty braces. + struct __nonesuch_no_braces : std::__nonesuch { + explicit __nonesuch_no_braces(const __nonesuch&) = delete; + }; + +#endif + + /** + * @brief Struct holding two objects of arbitrary type. + * + * @tparam _T1 Type of first object. + * @tparam _T2 Type of second object. + */ + template + struct pair + { + typedef _T1 first_type; /// @c first_type is the first bound type + typedef _T2 second_type; /// @c second_type is the second bound type + + _T1 first; /// @c first is a copy of the first object + _T2 second; /// @c second is a copy of the second object + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 265. std::pair::pair() effects overly restrictive + /** The default constructor creates @c first and @c second using their + * respective default constructors. */ +#if __cplusplus >= 201103L + template , + __is_implicitly_default_constructible<_U2>> + ::value, bool>::type = true> +#endif + _GLIBCXX_CONSTEXPR pair() + : first(), second() { } + +#if __cplusplus >= 201103L + template , + is_default_constructible<_U2>, + __not_< + __and_<__is_implicitly_default_constructible<_U1>, + __is_implicitly_default_constructible<_U2>>>> + ::value, bool>::type = false> + explicit constexpr pair() + : first(), second() { } +#endif + + /** Two objects may be passed to a @c pair constructor to be copied. */ +#if __cplusplus < 201103L + pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } +#else + // Shortcut for constraining the templates that don't take pairs. + using _PCCP = _PCC; + + template() + && _PCCP::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } + + template() + && !_PCCP::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } +#endif + + /** There is also a templated copy ctor for the @c pair class itself. */ +#if __cplusplus < 201103L + template + pair(const pair<_U1, _U2>& __p) + : first(__p.first), second(__p.second) { } +#else + // Shortcut for constraining the templates that take pairs. + template + using _PCCFP = _PCC::value + || !is_same<_T2, _U2>::value, + _T1, _T2>; + + template::template + _ConstructiblePair<_U1, _U2>() + && _PCCFP<_U1, _U2>::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(const pair<_U1, _U2>& __p) + : first(__p.first), second(__p.second) { } + + template::template + _ConstructiblePair<_U1, _U2>() + && !_PCCFP<_U1, _U2>::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(const pair<_U1, _U2>& __p) + : first(__p.first), second(__p.second) { } + + constexpr pair(const pair&) = default; + constexpr pair(pair&&) = default; + + // DR 811. + template(), + bool>::type=true> + constexpr pair(_U1&& __x, const _T2& __y) + : first(std::forward<_U1>(__x)), second(__y) { } + + template(), + bool>::type=false> + explicit constexpr pair(_U1&& __x, const _T2& __y) + : first(std::forward<_U1>(__x)), second(__y) { } + + template(), + bool>::type=true> + constexpr pair(const _T1& __x, _U2&& __y) + : first(__x), second(std::forward<_U2>(__y)) { } + + template(), + bool>::type=false> + explicit pair(const _T1& __x, _U2&& __y) + : first(__x), second(std::forward<_U2>(__y)) { } + + template() + && _PCCP::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(_U1&& __x, _U2&& __y) + : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } + + template() + && !_PCCP::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(_U1&& __x, _U2&& __y) + : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } + + + template::template + _MoveConstructiblePair<_U1, _U2>() + && _PCCFP<_U1, _U2>::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(pair<_U1, _U2>&& __p) + : first(std::forward<_U1>(__p.first)), + second(std::forward<_U2>(__p.second)) { } + + template::template + _MoveConstructiblePair<_U1, _U2>() + && !_PCCFP<_U1, _U2>::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(pair<_U1, _U2>&& __p) + : first(std::forward<_U1>(__p.first)), + second(std::forward<_U2>(__p.second)) { } + + template + pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); + + pair& + operator=(typename conditional< + __and_, + is_copy_assignable<_T2>>::value, + const pair&, const __nonesuch_no_braces&>::type __p) + { + first = __p.first; + second = __p.second; + return *this; + } + + pair& + operator=(typename conditional< + __not_<__and_, + is_copy_assignable<_T2>>>::value, + const pair&, const __nonesuch_no_braces&>::type __p) = delete; + + pair& + operator=(typename conditional< + __and_, + is_move_assignable<_T2>>::value, + pair&&, __nonesuch_no_braces&&>::type __p) + noexcept(__and_, + is_nothrow_move_assignable<_T2>>::value) + { + first = std::forward(__p.first); + second = std::forward(__p.second); + return *this; + } + + template + typename enable_if<__and_, + is_assignable<_T2&, const _U2&>>::value, + pair&>::type + operator=(const pair<_U1, _U2>& __p) + { + first = __p.first; + second = __p.second; + return *this; + } + + template + typename enable_if<__and_, + is_assignable<_T2&, _U2&&>>::value, + pair&>::type + operator=(pair<_U1, _U2>&& __p) + { + first = std::forward<_U1>(__p.first); + second = std::forward<_U2>(__p.second); + return *this; + } + + void + swap(pair& __p) + noexcept(__and_<__is_nothrow_swappable<_T1>, + __is_nothrow_swappable<_T2>>::value) + { + using std::swap; + swap(first, __p.first); + swap(second, __p.second); + } + + private: + template + pair(tuple<_Args1...>&, tuple<_Args2...>&, + _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); +#endif + }; + +#if __cpp_deduction_guides >= 201606 + template pair(_T1, _T2) -> pair<_T1, _T2>; +#endif + + /// Two pairs of the same type are equal iff their members are equal. + template + inline _GLIBCXX_CONSTEXPR bool + operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first == __y.first && __x.second == __y.second; } + + /// + template + inline _GLIBCXX_CONSTEXPR bool + operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first < __y.first + || (!(__y.first < __x.first) && __x.second < __y.second); } + + /// Uses @c operator== to find the result. + template + inline _GLIBCXX_CONSTEXPR bool + operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x == __y); } + + /// Uses @c operator< to find the result. + template + inline _GLIBCXX_CONSTEXPR bool + operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __y < __x; } + + /// Uses @c operator< to find the result. + template + inline _GLIBCXX_CONSTEXPR bool + operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__y < __x); } + + /// Uses @c operator< to find the result. + template + inline _GLIBCXX_CONSTEXPR bool + operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x < __y); } + +#if __cplusplus >= 201103L + /// See std::pair::swap(). + // Note: no std::swap overloads in C++03 mode, this has performance + // implications, see, eg, libstdc++/38466. + template + inline +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + // Constrained free swap overload, see p0185r1 + typename enable_if<__and_<__is_swappable<_T1>, + __is_swappable<_T2>>::value>::type +#else + void +#endif + swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + template + typename enable_if, + __is_swappable<_T2>>::value>::type + swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete; +#endif +#endif // __cplusplus >= 201103L + + /** + * @brief A convenience wrapper for creating a pair from two objects. + * @param __x The first object. + * @param __y The second object. + * @return A newly-constructed pair<> object of the appropriate type. + * + * The standard requires that the objects be passed by reference-to-const, + * but LWG issue #181 says they should be passed by const value. We follow + * the LWG by default. + */ + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 181. make_pair() unintended behavior +#if __cplusplus >= 201103L + // NB: DR 706. + template + constexpr pair::__type, + typename __decay_and_strip<_T2>::__type> + make_pair(_T1&& __x, _T2&& __y) + { + typedef typename __decay_and_strip<_T1>::__type __ds_type1; + typedef typename __decay_and_strip<_T2>::__type __ds_type2; + typedef pair<__ds_type1, __ds_type2> __pair_type; + return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); + } +#else + template + inline pair<_T1, _T2> + make_pair(_T1 __x, _T2 __y) + { return pair<_T1, _T2>(__x, __y); } +#endif + + /// @} + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif /* _STL_PAIR_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_queue.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_queue.h similarity index 75% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_queue.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_queue.h index 48e1ee79c..c49f371fb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_queue.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_queue.h @@ -1,6 +1,6 @@ // Queue implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -95,37 +95,47 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template > class queue { +#ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements typedef typename _Sequence::value_type _Sequence_value_type; +# if __cplusplus < 201103L __glibcxx_class_requires(_Tp, _SGIAssignableConcept) +# endif __glibcxx_class_requires(_Sequence, _FrontInsertionSequenceConcept) __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept) __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept) +#endif template - friend bool - operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); + friend bool + operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); template - friend bool - operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); + friend bool + operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); + +#if __cplusplus >= 201103L + template + using _Uses = typename + enable_if::value>::type; +#endif public: - typedef typename _Sequence::value_type value_type; - typedef typename _Sequence::reference reference; - typedef typename _Sequence::const_reference const_reference; - typedef typename _Sequence::size_type size_type; - typedef _Sequence container_type; + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; protected: - /** - * 'c' is the underlying container. Maintainers wondering why - * this isn't uglified as per style guidelines should note that - * this name is specified in the standard, [23.2.3.1]. (Why? - * Presumably for the same reason that it's protected instead + /* Maintainers wondering why this isn't uglified as per style + * guidelines should note that this name is specified in the standard, + * C++98 [23.2.3.1]. + * (Why? Presumably for the same reason that it's protected instead * of private: to allow derivation. But none of the other * containers allow for derivation. Odd.) */ + /// @c c is the underlying container. _Sequence c; public: @@ -137,13 +147,39 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION queue(const _Sequence& __c = _Sequence()) : c(__c) { } #else + template::value>::type> + queue() + : c() { } + explicit queue(const _Sequence& __c) : c(__c) { } explicit - queue(_Sequence&& __c = _Sequence()) + queue(_Sequence&& __c) : c(std::move(__c)) { } + + template> + explicit + queue(const _Alloc& __a) + : c(__a) { } + + template> + queue(const _Sequence& __c, const _Alloc& __a) + : c(__c, __a) { } + + template> + queue(_Sequence&& __c, const _Alloc& __a) + : c(std::move(__c), __a) { } + + template> + queue(const queue& __q, const _Alloc& __a) + : c(__q.c, __a) { } + + template> + queue(queue&& __q, const _Alloc& __a) + : c(std::move(__q.c), __a) { } #endif /** @@ -220,10 +256,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION push(value_type&& __x) { c.push_back(std::move(__x)); } +#if __cplusplus > 201402L template - void - emplace(_Args&&... __args) + decltype(auto) + emplace(_Args&&... __args) + { return c.emplace_back(std::forward<_Args>(__args)...); } +#else + template + void + emplace(_Args&&... __args) { c.emplace_back(std::forward<_Args>(__args)...); } +#endif #endif /** @@ -247,12 +290,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L void swap(queue& __q) - noexcept(noexcept(swap(c, __q.c))) +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + noexcept(__is_nothrow_swappable<_Sequence>::value) +#else + noexcept(__is_nothrow_swappable<_Tp>::value) +#endif { using std::swap; swap(c, __q.c); } -#endif +#endif // __cplusplus >= 201103L }; /** @@ -315,7 +362,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L template - inline void + inline +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + // Constrained free swap overload, see p0185r1 + typename enable_if<__is_swappable<_Seq>::value>::type +#else + void +#endif swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } @@ -323,7 +376,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct uses_allocator, _Alloc> : public uses_allocator<_Seq, _Alloc>::type { }; -#endif +#endif // __cplusplus >= 201103L /** * @brief A standard container automatically sorting its contents. @@ -332,12 +385,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * @tparam _Tp Type of element. * @tparam _Sequence Type of underlying sequence, defaults to vector<_Tp>. - * @tparam _Compare Comparison function object type, defaults to + * @tparam _Compare Comparison function object type, defaults to * less<_Sequence::value_type>. * * This is not a true container, but an @e adaptor. It holds * another container, and provides a wrapper interface to that - * container. The wrapper is what enforces priority-based sorting + * container. The wrapper is what enforces priority-based sorting * and %queue behavior. Very few of the standard container/sequence * interface requirements are met (e.g., iterators). * @@ -369,21 +422,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _Compare = less > class priority_queue { +#ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements typedef typename _Sequence::value_type _Sequence_value_type; +# if __cplusplus < 201103L __glibcxx_class_requires(_Tp, _SGIAssignableConcept) +# endif __glibcxx_class_requires(_Sequence, _SequenceConcept) __glibcxx_class_requires(_Sequence, _RandomAccessContainerConcept) __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept) __glibcxx_class_requires4(_Compare, bool, _Tp, _Tp, _BinaryFunctionConcept) +#endif + +#if __cplusplus >= 201103L + template + using _Uses = typename + enable_if::value>::type; +#endif public: - typedef typename _Sequence::value_type value_type; - typedef typename _Sequence::reference reference; - typedef typename _Sequence::const_reference const_reference; - typedef typename _Sequence::size_type size_type; - typedef _Sequence container_type; + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // DR 2684. priority_queue lacking comparator typedef + typedef _Compare value_compare; protected: // See queue::c for notes on these names. @@ -401,17 +467,47 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : c(__s), comp(__x) { std::make_heap(c.begin(), c.end(), comp); } #else + template, + is_default_constructible<_Seq>>::value>::type> + priority_queue() + : c(), comp() { } + explicit - priority_queue(const _Compare& __x, - const _Sequence& __s) + priority_queue(const _Compare& __x, const _Sequence& __s) : c(__s), comp(__x) { std::make_heap(c.begin(), c.end(), comp); } explicit - priority_queue(const _Compare& __x = _Compare(), - _Sequence&& __s = _Sequence()) + priority_queue(const _Compare& __x, _Sequence&& __s = _Sequence()) : c(std::move(__s)), comp(__x) { std::make_heap(c.begin(), c.end(), comp); } + + template> + explicit + priority_queue(const _Alloc& __a) + : c(__a), comp() { } + + template> + priority_queue(const _Compare& __x, const _Alloc& __a) + : c(__a), comp(__x) { } + + template> + priority_queue(const _Compare& __x, const _Sequence& __c, + const _Alloc& __a) + : c(__c, __a), comp(__x) { } + + template> + priority_queue(const _Compare& __x, _Sequence&& __c, const _Alloc& __a) + : c(std::move(__c), __a), comp(__x) { } + + template> + priority_queue(const priority_queue& __q, const _Alloc& __a) + : c(__q.c, __a), comp(__q.comp) { } + + template> + priority_queue(priority_queue&& __q, const _Alloc& __a) + : c(std::move(__q.c), __a), comp(std::move(__q.comp)) { } #endif /** @@ -431,33 +527,33 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ #if __cplusplus < 201103L template - priority_queue(_InputIterator __first, _InputIterator __last, + priority_queue(_InputIterator __first, _InputIterator __last, const _Compare& __x = _Compare(), const _Sequence& __s = _Sequence()) : c(__s), comp(__x) - { + { __glibcxx_requires_valid_range(__first, __last); c.insert(c.end(), __first, __last); std::make_heap(c.begin(), c.end(), comp); } #else template - priority_queue(_InputIterator __first, _InputIterator __last, + priority_queue(_InputIterator __first, _InputIterator __last, const _Compare& __x, const _Sequence& __s) : c(__s), comp(__x) - { + { __glibcxx_requires_valid_range(__first, __last); c.insert(c.end(), __first, __last); std::make_heap(c.begin(), c.end(), comp); } template - priority_queue(_InputIterator __first, _InputIterator __last, + priority_queue(_InputIterator __first, _InputIterator __last, const _Compare& __x = _Compare(), _Sequence&& __s = _Sequence()) : c(std::move(__s)), comp(__x) - { + { __glibcxx_requires_valid_range(__first, __last); c.insert(c.end(), __first, __last); std::make_heap(c.begin(), c.end(), comp); @@ -511,8 +607,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - void - emplace(_Args&&... __args) + void + emplace(_Args&&... __args) { c.emplace_back(std::forward<_Args>(__args)...); std::push_heap(c.begin(), c.end(), comp); @@ -541,20 +637,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L void swap(priority_queue& __pq) - noexcept(noexcept(swap(c, __pq.c)) && noexcept(swap(comp, __pq.comp))) + noexcept(__and_< +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + __is_nothrow_swappable<_Sequence>, +#else + __is_nothrow_swappable<_Tp>, +#endif + __is_nothrow_swappable<_Compare> + >::value) { using std::swap; swap(c, __pq.c); swap(comp, __pq.comp); } -#endif +#endif // __cplusplus >= 201103L }; // No equality/comparison operators are provided for priority_queue. #if __cplusplus >= 201103L template - inline void + inline +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + // Constrained free swap overload, see p0185r1 + typename enable_if<__and_<__is_swappable<_Sequence>, + __is_swappable<_Compare>>::value>::type +#else + void +#endif swap(priority_queue<_Tp, _Sequence, _Compare>& __x, priority_queue<_Tp, _Sequence, _Compare>& __y) noexcept(noexcept(__x.swap(__y))) @@ -564,7 +674,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _Alloc> struct uses_allocator, _Alloc> : public uses_allocator<_Sequence, _Alloc>::type { }; -#endif +#endif // __cplusplus >= 201103L _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_raw_storage_iter.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_raw_storage_iter.h similarity index 84% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_raw_storage_iter.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_raw_storage_iter.h index 2ce83ff0e..4ad9a9137 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_raw_storage_iter.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_raw_storage_iter.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -86,20 +86,35 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } - raw_storage_iterator<_OutputIterator, _Tp>& +#if __cplusplus >= 201103L + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2127. Move-construction with raw_storage_iterator + raw_storage_iterator& + operator=(_Tp&& __element) + { + std::_Construct(std::__addressof(*_M_iter), std::move(__element)); + return *this; + } +#endif + + raw_storage_iterator& operator++() { ++_M_iter; return *this; } - raw_storage_iterator<_OutputIterator, _Tp> + raw_storage_iterator operator++(int) { - raw_storage_iterator<_OutputIterator, _Tp> __tmp = *this; + raw_storage_iterator __tmp = *this; ++_M_iter; return __tmp; } + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2454. Add raw_storage_iterator::base() member + _OutputIterator base() const { return _M_iter; } }; _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_relops.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_relops.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_relops.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_relops.h index b09694ff7..a2614bd30 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_relops.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_relops.h @@ -1,6 +1,6 @@ // std::rel_ops implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_set.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_set.h similarity index 85% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_set.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_set.h index 35cdf7170..817bc2d87 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_set.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_set.h @@ -1,6 +1,6 @@ // Set implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -65,6 +65,9 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_CONTAINER + template + class multiset; + /** * @brief A standard container made up of unique keys, which can be * retrieved in logarithmic time. @@ -89,12 +92,16 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typename _Alloc = std::allocator<_Key> > class set { +#ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements - typedef typename _Alloc::value_type _Alloc_value_type; + typedef typename _Alloc::value_type _Alloc_value_type; +# if __cplusplus < 201103L __glibcxx_class_requires(_Key, _SGIAssignableConcept) +# endif __glibcxx_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept) __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept) +#endif public: // typedefs: @@ -120,30 +127,35 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER public: //@{ /// Iterator-related typedefs. - typedef typename _Alloc_traits::pointer pointer; - typedef typename _Alloc_traits::const_pointer const_pointer; - typedef typename _Alloc_traits::reference reference; - typedef typename _Alloc_traits::const_reference const_reference; + typedef typename _Alloc_traits::pointer pointer; + typedef typename _Alloc_traits::const_pointer const_pointer; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 103. set::iterator is required to be modifiable, // but this allows modification of keys. - typedef typename _Rep_type::const_iterator iterator; - typedef typename _Rep_type::const_iterator const_iterator; - typedef typename _Rep_type::const_reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::const_reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; - typedef typename _Rep_type::size_type size_type; - typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; //@} +#if __cplusplus > 201402L + using node_type = typename _Rep_type::node_type; + using insert_return_type = typename _Rep_type::insert_return_type; +#endif + // allocation/deallocation /** * @brief Default constructor creates no elements. */ - set() -#if __cplusplus >= 201103L - noexcept(is_nothrow_default_constructible::value) +#if __cplusplus < 201103L + set() : _M_t() { } +#else + set() = default; #endif - : _M_t() { } /** * @brief Creates a %set with no elements. @@ -187,29 +199,26 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Key_alloc_type(__a)) - { _M_t._M_insert_unique(__first, __last); } + { _M_t._M_insert_unique(__first, __last); } /** * @brief %Set copy constructor. - * @param __x A %set of identical element and allocator types. * - * The newly-created %set uses a copy of the allocation object used - * by @a __x. + * Whether the allocator is copied depends on the allocator traits. */ +#if __cplusplus < 201103L set(const set& __x) : _M_t(__x._M_t) { } +#else + set(const set&) = default; -#if __cplusplus >= 201103L /** * @brief %Set move constructor - * @param __x A %set of identical element and allocator types. * - * The newly-created %set contains the exact contents of @a x. - * The contents of @a x are a valid, but unspecified %set. + * The newly-created %set contains the exact contents of the moved + * instance. The moved instance is a valid, but unspecified, %set. */ - set(set&& __x) - noexcept(is_nothrow_copy_constructible<_Compare>::value) - : _M_t(std::move(__x._M_t)) { } + set(set&&) = default; /** * @brief Builds a %set from an initializer_list. @@ -249,27 +258,35 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /// Allocator-extended range constructor. template - set(_InputIterator __first, _InputIterator __last, + set(_InputIterator __first, _InputIterator __last, const allocator_type& __a) : _M_t(_Compare(), _Key_alloc_type(__a)) - { _M_t._M_insert_unique(__first, __last); } + { _M_t._M_insert_unique(__first, __last); } + + /** + * The dtor only erases the elements, and note that if the elements + * themselves are pointers, the pointed-to memory is not touched in any + * way. Managing the pointer is the user's responsibility. + */ + ~set() = default; #endif /** * @brief %Set assignment operator. - * @param __x A %set of identical element and allocator types. * - * All the elements of @a __x are copied, but unlike the copy - * constructor, the allocator object is not copied. + * Whether the allocator is copied depends on the allocator traits. */ +#if __cplusplus < 201103L set& operator=(const set& __x) { _M_t = __x._M_t; return *this; } +#else + set& + operator=(const set&) = default; -#if __cplusplus >= 201103L /// Move assignment operator. set& operator=(set&&) = default; @@ -283,7 +300,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %set and * that the resulting %set's size is the same as the number - * of elements assigned. Old data may be lost. + * of elements assigned. */ set& operator=(initializer_list __l) @@ -407,12 +424,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * stateless and empty), so it should be quite fast.) Note * that the global std::swap() function is specialized such * that std::swap(s1,s2) will feed to this function. + * + * Whether the allocators are swapped depends on the allocator traits. */ void swap(set& __x) -#if __cplusplus >= 201103L - noexcept(_Alloc_traits::_S_nothrow_swap()) -#endif + _GLIBCXX_NOEXCEPT_IF(__is_nothrow_swappable<_Compare>::value) { _M_t.swap(__x._M_t); } // insert/erase @@ -552,6 +569,60 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { this->insert(__l.begin(), __l.end()); } #endif +#if __cplusplus > 201402L + /// Extract a node. + node_type + extract(const_iterator __pos) + { + __glibcxx_assert(__pos != end()); + return _M_t.extract(__pos); + } + + /// Extract a node. + node_type + extract(const key_type& __x) + { return _M_t.extract(__x); } + + /// Re-insert an extracted node. + insert_return_type + insert(node_type&& __nh) + { return _M_t._M_reinsert_node_unique(std::move(__nh)); } + + /// Re-insert an extracted node. + iterator + insert(const_iterator __hint, node_type&& __nh) + { return _M_t._M_reinsert_node_hint_unique(__hint, std::move(__nh)); } + + template + friend class _Rb_tree_merge_helper; + + template + void + merge(set<_Key, _Compare1, _Alloc>& __source) + { + using _Merge_helper = _Rb_tree_merge_helper; + _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); + } + + template + void + merge(set<_Key, _Compare1, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(multiset<_Key, _Compare1, _Alloc>& __source) + { + using _Merge_helper = _Rb_tree_merge_helper; + _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); + } + + template + void + merge(multiset<_Key, _Compare1, _Alloc>&& __source) + { merge(__source); } +#endif // C++17 + #if __cplusplus >= 201103L // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 130. Associative erase should return an iterator. @@ -672,7 +743,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER auto count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x)) - { return _M_t._M_find_tr(__x) == _M_t.end() ? 0 : 1; } + { return _M_t._M_count_tr(__x); } #endif //@} @@ -737,14 +808,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto lower_bound(const _Kt& __x) - -> decltype(_M_t._M_lower_bound_tr(__x)) - { return _M_t._M_lower_bound_tr(__x); } + -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) + { return iterator(_M_t._M_lower_bound_tr(__x)); } template auto lower_bound(const _Kt& __x) const - -> decltype(_M_t._M_lower_bound_tr(__x)) - { return _M_t._M_lower_bound_tr(__x); } + -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x))) + { return const_iterator(_M_t._M_lower_bound_tr(__x)); } #endif //@} @@ -767,14 +838,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto upper_bound(const _Kt& __x) - -> decltype(_M_t._M_upper_bound_tr(__x)) - { return _M_t._M_upper_bound_tr(__x); } + -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) + { return iterator(_M_t._M_upper_bound_tr(__x)); } template auto upper_bound(const _Kt& __x) const - -> decltype(_M_t._M_upper_bound_tr(__x)) - { return _M_t._M_upper_bound_tr(__x); } + -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) + { return const_iterator(_M_t._M_upper_bound_tr(__x)); } #endif //@} @@ -806,14 +877,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template auto equal_range(const _Kt& __x) - -> decltype(_M_t._M_equal_range_tr(__x)) - { return _M_t._M_equal_range_tr(__x); } + -> decltype(pair(_M_t._M_equal_range_tr(__x))) + { return pair(_M_t._M_equal_range_tr(__x)); } template auto equal_range(const _Kt& __x) const - -> decltype(_M_t._M_equal_range_tr(__x)) - { return _M_t._M_equal_range_tr(__x); } + -> decltype(pair(_M_t._M_equal_range_tr(__x))) + { return pair(_M_t._M_equal_range_tr(__x)); } #endif //@} @@ -892,8 +963,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template inline void swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { __x.swap(__y); } _GLIBCXX_END_NAMESPACE_CONTAINER + +#if __cplusplus > 201402L +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Allow std::set access to internals of compatible sets. + template + struct + _Rb_tree_merge_helper<_GLIBCXX_STD_C::set<_Val, _Cmp1, _Alloc>, _Cmp2> + { + private: + friend class _GLIBCXX_STD_C::set<_Val, _Cmp1, _Alloc>; + + static auto& + _S_get_tree(_GLIBCXX_STD_C::set<_Val, _Cmp2, _Alloc>& __set) + { return __set._M_t; } + + static auto& + _S_get_tree(_GLIBCXX_STD_C::multiset<_Val, _Cmp2, _Alloc>& __set) + { return __set._M_t; } + }; +_GLIBCXX_END_NAMESPACE_VERSION +#endif // C++17 + } //namespace std #endif /* _STL_SET_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_stack.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_stack.h similarity index 80% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_stack.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_stack.h index 3ff307ff6..ac59ec715 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_stack.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_stack.h @@ -1,6 +1,6 @@ // Stack implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -98,26 +98,36 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template > class stack { +#ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements typedef typename _Sequence::value_type _Sequence_value_type; +# if __cplusplus < 201103L __glibcxx_class_requires(_Tp, _SGIAssignableConcept) __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept) +# endif __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept) +#endif template - friend bool - operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); + friend bool + operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); template - friend bool - operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); + friend bool + operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); + +#if __cplusplus >= 201103L + template + using _Uses = typename + enable_if::value>::type; +#endif public: - typedef typename _Sequence::value_type value_type; - typedef typename _Sequence::reference reference; - typedef typename _Sequence::const_reference const_reference; - typedef typename _Sequence::size_type size_type; - typedef _Sequence container_type; + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; protected: // See queue::c for notes on this name. @@ -133,13 +143,39 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION stack(const _Sequence& __c = _Sequence()) : c(__c) { } #else + template::value>::type> + stack() + : c() { } + explicit stack(const _Sequence& __c) : c(__c) { } explicit - stack(_Sequence&& __c = _Sequence()) + stack(_Sequence&& __c) : c(std::move(__c)) { } + + template> + explicit + stack(const _Alloc& __a) + : c(__a) { } + + template> + stack(const _Sequence& __c, const _Alloc& __a) + : c(__c, __a) { } + + template> + stack(_Sequence&& __c, const _Alloc& __a) + : c(std::move(__c), __a) { } + + template> + stack(const stack& __q, const _Alloc& __a) + : c(__q.c, __a) { } + + template> + stack(stack&& __q, const _Alloc& __a) + : c(std::move(__q.c), __a) { } #endif /** @@ -194,10 +230,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION push(value_type&& __x) { c.push_back(std::move(__x)); } +#if __cplusplus > 201402L template - void - emplace(_Args&&... __args) + decltype(auto) + emplace(_Args&&... __args) + { return c.emplace_back(std::forward<_Args>(__args)...); } +#else + template + void + emplace(_Args&&... __args) { c.emplace_back(std::forward<_Args>(__args)...); } +#endif #endif /** @@ -221,12 +264,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L void swap(stack& __s) - noexcept(noexcept(swap(c, __s.c))) +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + noexcept(__is_nothrow_swappable<_Sequence>::value) +#else + noexcept(__is_nothrow_swappable<_Tp>::value) +#endif { using std::swap; swap(c, __s.c); } -#endif +#endif // __cplusplus >= 201103L }; /** @@ -290,7 +337,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L template - inline void + inline +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + // Constrained free swap overload, see p0185r1 + typename enable_if<__is_swappable<_Seq>::value>::type +#else + void +#endif swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } @@ -298,7 +351,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct uses_allocator, _Alloc> : public uses_allocator<_Seq, _Alloc>::type { }; -#endif +#endif // __cplusplus >= 201103L _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_tempbuf.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_tempbuf.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_tempbuf.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_tempbuf.h index af170916a..03b4cd29f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_tempbuf.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_tempbuf.h @@ -1,6 +1,6 @@ // Temporary buffer implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_tree.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_tree.h similarity index 81% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_tree.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_tree.h index d39042f1a..ce7ecdaa8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_tree.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_tree.h @@ -1,6 +1,6 @@ // RB tree implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -66,13 +66,20 @@ #include #include #if __cplusplus >= 201103L -#include +# include +#endif +#if __cplusplus > 201402L +# include #endif namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION +#if __cplusplus > 201103L +# define __cpp_lib_generic_associative_lookup 201304 +#endif + // Red-black tree class, designed for use in implementing STL // associative containers (set, multiset, map, and multimap). The // insertion and deletion algorithms are based on those in Cormen, @@ -130,6 +137,81 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } }; + // Helper type offering value initialization guarantee on the compare functor. + template + struct _Rb_tree_key_compare + { + _Key_compare _M_key_compare; + + _Rb_tree_key_compare() + _GLIBCXX_NOEXCEPT_IF( + is_nothrow_default_constructible<_Key_compare>::value) + : _M_key_compare() + { } + + _Rb_tree_key_compare(const _Key_compare& __comp) + : _M_key_compare(__comp) + { } + +#if __cplusplus >= 201103L + // Copy constructor added for consistency with C++98 mode. + _Rb_tree_key_compare(const _Rb_tree_key_compare&) = default; + + _Rb_tree_key_compare(_Rb_tree_key_compare&& __x) + noexcept(is_nothrow_copy_constructible<_Key_compare>::value) + : _M_key_compare(__x._M_key_compare) + { } +#endif + }; + + // Helper type to manage default initialization of node count and header. + struct _Rb_tree_header + { + _Rb_tree_node_base _M_header; + size_t _M_node_count; // Keeps track of size of tree. + + _Rb_tree_header() _GLIBCXX_NOEXCEPT + { + _M_header._M_color = _S_red; + _M_reset(); + } + +#if __cplusplus >= 201103L + _Rb_tree_header(_Rb_tree_header&& __x) noexcept + { + if (__x._M_header._M_parent != nullptr) + _M_move_data(__x); + else + { + _M_header._M_color = _S_red; + _M_reset(); + } + } +#endif + + void + _M_move_data(_Rb_tree_header& __from) + { + _M_header._M_color = __from._M_header._M_color; + _M_header._M_parent = __from._M_header._M_parent; + _M_header._M_left = __from._M_header._M_left; + _M_header._M_right = __from._M_header._M_right; + _M_header._M_parent->_M_parent = &_M_header; + _M_node_count = __from._M_node_count; + + __from._M_reset(); + } + + void + _M_reset() + { + _M_header._M_parent = 0; + _M_header._M_left = &_M_header; + _M_header._M_right = &_M_header; + _M_node_count = 0; + } + }; + template struct _Rb_tree_node : public _Rb_tree_node_base { @@ -341,6 +423,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, _Rb_tree_node_base& __header) throw (); +#if __cplusplus > 201103L + template> + struct __has_is_transparent + { }; + + template + struct __has_is_transparent<_Cmp, _SfinaeType, + __void_t> + { typedef void type; }; +#endif + +#if __cplusplus > 201402L + template + struct _Rb_tree_merge_helper { }; +#endif template > @@ -577,47 +674,35 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Unused _Is_pod_comparator is kept as it is part of mangled name. template - struct _Rb_tree_impl : public _Node_allocator + struct _Rb_tree_impl + : public _Node_allocator + , public _Rb_tree_key_compare<_Key_compare> + , public _Rb_tree_header { - _Key_compare _M_key_compare; - _Rb_tree_node_base _M_header; - size_type _M_node_count; // Keeps track of size of tree. + typedef _Rb_tree_key_compare<_Key_compare> _Base_key_compare; +#if __cplusplus < 201103L _Rb_tree_impl() - : _Node_allocator(), _M_key_compare(), _M_header(), - _M_node_count(0) - { _M_initialize(); } - - _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) - : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), - _M_node_count(0) - { _M_initialize(); } - -#if __cplusplus >= 201103L - _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a) - : _Node_allocator(std::move(__a)), _M_key_compare(__comp), - _M_header(), _M_node_count(0) - { _M_initialize(); } + { } +#else + _Rb_tree_impl() = default; + _Rb_tree_impl(_Rb_tree_impl&&) = default; #endif - void - _M_reset() - { - this->_M_header._M_parent = 0; - this->_M_header._M_left = &this->_M_header; - this->_M_header._M_right = &this->_M_header; - this->_M_node_count = 0; - } + _Rb_tree_impl(const _Rb_tree_impl& __x) + : _Node_allocator(_Alloc_traits::_S_select_on_copy(__x)) + , _Base_key_compare(__x._M_key_compare) + { } - private: - void - _M_initialize() - { - this->_M_header._M_color = _S_red; - this->_M_header._M_parent = 0; - this->_M_header._M_left = &this->_M_header; - this->_M_header._M_right = &this->_M_header; - } +#if __cplusplus < 201103L + _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) + : _Node_allocator(__a), _Base_key_compare(__comp) + { } +#else + _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a) + : _Node_allocator(std::move(__a)), _Base_key_compare(__comp) + { } +#endif }; _Rb_tree_impl<_Compare> _M_impl; @@ -658,13 +743,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION (this->_M_impl._M_header._M_parent); } - _Link_type + _Base_ptr _M_end() _GLIBCXX_NOEXCEPT - { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); } + { return &this->_M_impl._M_header; } - _Const_Link_type + _Const_Base_ptr _M_end() const _GLIBCXX_NOEXCEPT - { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); } + { return &this->_M_impl._M_header; } static const_reference _S_value(_Const_Link_type __x) @@ -721,7 +806,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; - private: +#if __cplusplus > 201402L + using node_type = _Node_handle<_Key, _Val, _Node_allocator>; + using insert_return_type = _Node_insert_return; +#endif + pair<_Base_ptr, _Base_ptr> _M_get_insert_unique_pos(const key_type& __k); @@ -736,6 +825,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_get_insert_hint_equal_pos(const_iterator __pos, const key_type& __k); + private: #if __cplusplus >= 201103L template iterator @@ -774,53 +864,62 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template _Link_type - _M_copy(_Const_Link_type __x, _Link_type __p, _NodeGen&); + _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen&); + + template + _Link_type + _M_copy(const _Rb_tree& __x, _NodeGen& __gen) + { + _Link_type __root = _M_copy(__x._M_begin(), _M_end(), __gen); + _M_leftmost() = _S_minimum(__root); + _M_rightmost() = _S_maximum(__root); + _M_impl._M_node_count = __x._M_impl._M_node_count; + return __root; + } _Link_type - _M_copy(_Const_Link_type __x, _Link_type __p) + _M_copy(const _Rb_tree& __x) { _Alloc_node __an(*this); - return _M_copy(__x, __p, __an); + return _M_copy(__x, __an); } void _M_erase(_Link_type __x); iterator - _M_lower_bound(_Link_type __x, _Link_type __y, + _M_lower_bound(_Link_type __x, _Base_ptr __y, const _Key& __k); const_iterator - _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, const _Key& __k) const; iterator - _M_upper_bound(_Link_type __x, _Link_type __y, + _M_upper_bound(_Link_type __x, _Base_ptr __y, const _Key& __k); const_iterator - _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, const _Key& __k) const; public: // allocation/deallocation +#if __cplusplus < 201103L _Rb_tree() { } +#else + _Rb_tree() = default; +#endif _Rb_tree(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_impl(__comp, _Node_allocator(__a)) { } _Rb_tree(const _Rb_tree& __x) - : _M_impl(__x._M_impl._M_key_compare, - _Alloc_traits::_S_select_on_copy(__x._M_get_Node_allocator())) + : _M_impl(__x._M_impl) { if (__x._M_root() != 0) - { - _M_root() = _M_copy(__x._M_begin(), _M_end()); - _M_leftmost() = _S_minimum(_M_root()); - _M_rightmost() = _S_maximum(_M_root()); - _M_impl._M_node_count = __x._M_impl._M_node_count; - } + _M_root() = _M_copy(__x); } #if __cplusplus >= 201103L @@ -832,20 +931,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_impl(__x._M_impl._M_key_compare, _Node_allocator(__a)) { if (__x._M_root() != nullptr) - { - _M_root() = _M_copy(__x._M_begin(), _M_end()); - _M_leftmost() = _S_minimum(_M_root()); - _M_rightmost() = _S_maximum(_M_root()); - _M_impl._M_node_count = __x._M_impl._M_node_count; - } + _M_root() = _M_copy(__x); } - _Rb_tree(_Rb_tree&& __x) - : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator()) - { - if (__x._M_root() != 0) - _M_move_data(__x, std::true_type()); - } + _Rb_tree(_Rb_tree&&) = default; _Rb_tree(_Rb_tree&& __x, const allocator_type& __a) : _Rb_tree(std::move(__x), _Node_allocator(__a)) @@ -910,11 +999,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return _Alloc_traits::max_size(_M_get_Node_allocator()); } void -#if __cplusplus >= 201103L - swap(_Rb_tree& __t) noexcept(_Alloc_traits::_S_nothrow_swap()); -#else - swap(_Rb_tree& __t); -#endif + swap(_Rb_tree& __t) + _GLIBCXX_NOEXCEPT_IF(__is_nothrow_swappable<_Compare>::value); // Insert/erase. #if __cplusplus >= 201103L @@ -1019,6 +1105,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION iterator erase(const_iterator __position) { + __glibcxx_assert(__position != end()); const_iterator __result = __position; ++__result; _M_erase_aux(__position); @@ -1030,6 +1117,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION iterator erase(iterator __position) { + __glibcxx_assert(__position != end()); iterator __result = __position; ++__result; _M_erase_aux(__position); @@ -1038,11 +1126,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #else void erase(iterator __position) - { _M_erase_aux(__position); } + { + __glibcxx_assert(__position != end()); + _M_erase_aux(__position); + } void erase(const_iterator __position) - { _M_erase_aux(__position); } + { + __glibcxx_assert(__position != end()); + _M_erase_aux(__position); + } #endif size_type erase(const key_type& __x); @@ -1109,66 +1203,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION equal_range(const key_type& __k) const; #if __cplusplus > 201103L - template> - struct __is_transparent { }; - - template - struct - __is_transparent<_Cmp, _Kt, __void_t> - { typedef void type; }; - - static auto _S_iter(_Link_type __x) { return iterator(__x); } - - static auto _S_iter(_Const_Link_type __x) { return const_iterator(__x); } - - template - static auto - _S_lower_bound_tr(_Cmp& __cmp, _Link __x, _Link __y, const _Kt& __k) - { - while (__x != 0) - if (!__cmp(_S_key(__x), __k)) - __y = __x, __x = _S_left(__x); - else - __x = _S_right(__x); - return _S_iter(__y); - } - - template - static auto - _S_upper_bound_tr(_Cmp& __cmp, _Link __x, _Link __y, const _Kt& __k) - { - while (__x != 0) - if (__cmp(__k, _S_key(__x))) - __y = __x, __x = _S_left(__x); - else - __x = _S_right(__x); - return _S_iter(__y); - } - template::type> + typename _Req = + typename __has_is_transparent<_Compare, _Kt>::type> iterator _M_find_tr(const _Kt& __k) { - auto& __cmp = _M_impl._M_key_compare; - auto __j = _S_lower_bound_tr(__cmp, _M_begin(), _M_end(), __k); - return (__j == end() || __cmp(__k, _S_key(__j._M_node))) - ? end() : __j; + const _Rb_tree* __const_this = this; + return __const_this->_M_find_tr(__k)._M_const_cast(); } template::type> + typename _Req = + typename __has_is_transparent<_Compare, _Kt>::type> const_iterator _M_find_tr(const _Kt& __k) const { - auto& __cmp = _M_impl._M_key_compare; - auto __j = _S_lower_bound_tr(__cmp, _M_begin(), _M_end(), __k); - return (__j == end() || __cmp(__k, _S_key(__j._M_node))) - ? end() : __j; + auto __j = _M_lower_bound_tr(__k); + if (__j != end() && _M_impl._M_key_compare(__k, _S_key(__j._M_node))) + __j = end(); + return __j; } template::type> + typename _Req = + typename __has_is_transparent<_Compare, _Kt>::type> size_type _M_count_tr(const _Kt& __k) const { @@ -1177,56 +1236,77 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template::type> + typename _Req = + typename __has_is_transparent<_Compare, _Kt>::type> iterator _M_lower_bound_tr(const _Kt& __k) { - auto& __cmp = _M_impl._M_key_compare; - return _S_lower_bound_tr(__cmp, _M_begin(), _M_end(), __k); + const _Rb_tree* __const_this = this; + return __const_this->_M_lower_bound_tr(__k)._M_const_cast(); } template::type> + typename _Req = + typename __has_is_transparent<_Compare, _Kt>::type> const_iterator _M_lower_bound_tr(const _Kt& __k) const { - auto& __cmp = _M_impl._M_key_compare; - return _S_lower_bound_tr(__cmp, _M_begin(), _M_end(), __k); + auto __x = _M_begin(); + auto __y = _M_end(); + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + { + __y = __x; + __x = _S_left(__x); + } + else + __x = _S_right(__x); + return const_iterator(__y); } template::type> + typename _Req = + typename __has_is_transparent<_Compare, _Kt>::type> iterator _M_upper_bound_tr(const _Kt& __k) { - auto& __cmp = _M_impl._M_key_compare; - return _S_upper_bound_tr(__cmp, _M_begin(), _M_end(), __k); + const _Rb_tree* __const_this = this; + return __const_this->_M_upper_bound_tr(__k)._M_const_cast(); } template::type> + typename _Req = + typename __has_is_transparent<_Compare, _Kt>::type> const_iterator _M_upper_bound_tr(const _Kt& __k) const { - auto& __cmp = _M_impl._M_key_compare; - return _S_upper_bound_tr(__cmp, _M_begin(), _M_end(), __k); + auto __x = _M_begin(); + auto __y = _M_end(); + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + { + __y = __x; + __x = _S_left(__x); + } + else + __x = _S_right(__x); + return const_iterator(__y); } template::type> + typename _Req = + typename __has_is_transparent<_Compare, _Kt>::type> pair _M_equal_range_tr(const _Kt& __k) { - auto __low = _M_lower_bound_tr(__k); - auto __high = __low; - auto& __cmp = _M_impl._M_key_compare; - while (__high != end() && !__cmp(__k, _S_key(__high._M_node))) - ++__high; - return { __low, __high }; + const _Rb_tree* __const_this = this; + auto __ret = __const_this->_M_equal_range_tr(__k); + return { __ret.first._M_const_cast(), __ret.second._M_const_cast() }; } template::type> + typename _Req = + typename __has_is_transparent<_Compare, _Kt>::type> pair _M_equal_range_tr(const _Kt& __k) const { @@ -1245,7 +1325,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L _Rb_tree& - operator=(_Rb_tree&&) noexcept(_Alloc_traits::_S_nothrow_move()); + operator=(_Rb_tree&&) + noexcept(_Alloc_traits::_S_nothrow_move() + && is_nothrow_move_assignable<_Compare>::value); template void @@ -1258,13 +1340,189 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION private: // Move elements from container with equal allocator. void - _M_move_data(_Rb_tree&, std::true_type); + _M_move_data(_Rb_tree& __x, std::true_type) + { _M_impl._M_move_data(__x._M_impl); } // Move elements from container with possibly non-equal allocator, // which might result in a copy not a move. void _M_move_data(_Rb_tree&, std::false_type); + + // Move assignment from container with equal allocator. + void + _M_move_assign(_Rb_tree&, std::true_type); + + // Move assignment from container with possibly non-equal allocator, + // which might result in a copy not a move. + void + _M_move_assign(_Rb_tree&, std::false_type); #endif + +#if __cplusplus > 201402L + public: + /// Re-insert an extracted node. + insert_return_type + _M_reinsert_node_unique(node_type&& __nh) + { + insert_return_type __ret; + if (__nh.empty()) + __ret.position = end(); + else + { + __glibcxx_assert(_M_get_Node_allocator() == *__nh._M_alloc); + + auto __res = _M_get_insert_unique_pos(__nh._M_key()); + if (__res.second) + { + __ret.position + = _M_insert_node(__res.first, __res.second, __nh._M_ptr); + __nh._M_ptr = nullptr; + __ret.inserted = true; + } + else + { + __ret.node = std::move(__nh); + __ret.position = iterator(__res.first); + __ret.inserted = false; + } + } + return __ret; + } + + /// Re-insert an extracted node. + iterator + _M_reinsert_node_equal(node_type&& __nh) + { + iterator __ret; + if (__nh.empty()) + __ret = end(); + else + { + __glibcxx_assert(_M_get_Node_allocator() == *__nh._M_alloc); + auto __res = _M_get_insert_equal_pos(__nh._M_key()); + if (__res.second) + __ret = _M_insert_node(__res.first, __res.second, __nh._M_ptr); + else + __ret = _M_insert_equal_lower_node(__nh._M_ptr); + __nh._M_ptr = nullptr; + } + return __ret; + } + + /// Re-insert an extracted node. + iterator + _M_reinsert_node_hint_unique(const_iterator __hint, node_type&& __nh) + { + iterator __ret; + if (__nh.empty()) + __ret = end(); + else + { + __glibcxx_assert(_M_get_Node_allocator() == *__nh._M_alloc); + auto __res = _M_get_insert_hint_unique_pos(__hint, __nh._M_key()); + if (__res.second) + { + __ret = _M_insert_node(__res.first, __res.second, __nh._M_ptr); + __nh._M_ptr = nullptr; + } + else + __ret = iterator(__res.first); + } + return __ret; + } + + /// Re-insert an extracted node. + iterator + _M_reinsert_node_hint_equal(const_iterator __hint, node_type&& __nh) + { + iterator __ret; + if (__nh.empty()) + __ret = end(); + else + { + __glibcxx_assert(_M_get_Node_allocator() == *__nh._M_alloc); + auto __res = _M_get_insert_hint_equal_pos(__hint, __nh._M_key()); + if (__res.second) + __ret = _M_insert_node(__res.first, __res.second, __nh._M_ptr); + else + __ret = _M_insert_equal_lower_node(__nh._M_ptr); + __nh._M_ptr = nullptr; + } + return __ret; + } + + /// Extract a node. + node_type + extract(const_iterator __pos) + { + auto __ptr = _Rb_tree_rebalance_for_erase( + __pos._M_const_cast()._M_node, _M_impl._M_header); + --_M_impl._M_node_count; + return { static_cast<_Link_type>(__ptr), _M_get_Node_allocator() }; + } + + /// Extract a node. + node_type + extract(const key_type& __k) + { + node_type __nh; + auto __pos = find(__k); + if (__pos != end()) + __nh = extract(const_iterator(__pos)); + return __nh; + } + + template + using _Compatible_tree + = _Rb_tree<_Key, _Val, _KeyOfValue, _Compare2, _Alloc>; + + template + friend class _Rb_tree_merge_helper; + + /// Merge from a compatible container into one with unique keys. + template + void + _M_merge_unique(_Compatible_tree<_Compare2>& __src) noexcept + { + using _Merge_helper = _Rb_tree_merge_helper<_Rb_tree, _Compare2>; + for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) + { + auto __pos = __i++; + auto __res = _M_get_insert_unique_pos(_KeyOfValue()(*__pos)); + if (__res.second) + { + auto& __src_impl = _Merge_helper::_S_get_impl(__src); + auto __ptr = _Rb_tree_rebalance_for_erase( + __pos._M_node, __src_impl._M_header); + --__src_impl._M_node_count; + _M_insert_node(__res.first, __res.second, + static_cast<_Link_type>(__ptr)); + } + } + } + + /// Merge from a compatible container into one with equivalent keys. + template + void + _M_merge_equal(_Compatible_tree<_Compare2>& __src) noexcept + { + using _Merge_helper = _Rb_tree_merge_helper<_Rb_tree, _Compare2>; + for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) + { + auto __pos = __i++; + auto __res = _M_get_insert_equal_pos(_KeyOfValue()(*__pos)); + if (__res.second) + { + auto& __src_impl = _Merge_helper::_S_get_impl(__src); + auto __ptr = _Rb_tree_rebalance_for_erase( + __pos._M_node, __src_impl._M_header); + --__src_impl._M_node_count; + _M_insert_node(__res.first, __res.second, + static_cast<_Link_type>(__ptr)); + } + } + } +#endif // C++17 }; template; + using __eq = typename _Alloc_traits::is_always_equal; if (__x._M_root() != nullptr) _M_move_data(__x, __eq()); } - template - void - _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_move_data(_Rb_tree& __x, std::true_type) - { - _M_root() = __x._M_root(); - _M_leftmost() = __x._M_leftmost(); - _M_rightmost() = __x._M_rightmost(); - _M_root()->_M_parent = _M_end(); - - __x._M_root() = 0; - __x._M_leftmost() = __x._M_end(); - __x._M_rightmost() = __x._M_end(); - - this->_M_impl._M_node_count = __x._M_impl._M_node_count; - __x._M_impl._M_node_count = 0; - } - template void @@ -1360,7 +1599,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_move_data(_Rb_tree& __x, std::false_type) { if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) - _M_move_data(__x, std::true_type()); + _M_move_data(__x, std::true_type()); else { _Alloc_node __an(*this); @@ -1370,32 +1609,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION auto& __val = const_cast(__cval); return __an(std::move_if_noexcept(__val)); }; - _M_root() = _M_copy(__x._M_begin(), _M_end(), __lbd); - _M_leftmost() = _S_minimum(_M_root()); - _M_rightmost() = _S_maximum(_M_root()); - _M_impl._M_node_count = __x._M_impl._M_node_count; + _M_root() = _M_copy(__x, __lbd); } } template - _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& + inline void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - operator=(_Rb_tree&& __x) - noexcept(_Alloc_traits::_S_nothrow_move()) + _M_move_assign(_Rb_tree& __x, true_type) { - _M_impl._M_key_compare = __x._M_impl._M_key_compare; - if (_Alloc_traits::_S_propagate_on_move_assign() - || _Alloc_traits::_S_always_equal() - || _M_get_Node_allocator() == __x._M_get_Node_allocator()) - { - clear(); - if (__x._M_root() != nullptr) - _M_move_data(__x, std::true_type()); - std::__alloc_on_move(_M_get_Node_allocator(), - __x._M_get_Node_allocator()); - return *this; - } + clear(); + if (__x._M_root() != nullptr) + _M_move_data(__x, std::true_type()); + std::__alloc_on_move(_M_get_Node_allocator(), + __x._M_get_Node_allocator()); + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_move_assign(_Rb_tree& __x, false_type) + { + if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) + return _M_move_assign(__x, true_type{}); // Try to move each node reusing existing nodes and copying __x nodes // structure. @@ -1409,12 +1647,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION auto& __val = const_cast(__cval); return __roan(std::move_if_noexcept(__val)); }; - _M_root() = _M_copy(__x._M_begin(), _M_end(), __lbd); - _M_leftmost() = _S_minimum(_M_root()); - _M_rightmost() = _S_maximum(_M_root()); - _M_impl._M_node_count = __x._M_impl._M_node_count; + _M_root() = _M_copy(__x, __lbd); __x.clear(); } + } + + template + inline _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + operator=(_Rb_tree&& __x) + noexcept(_Alloc_traits::_S_nothrow_move() + && is_nothrow_move_assignable<_Compare>::value) + { + _M_impl._M_key_compare = std::move(__x._M_impl._M_key_compare); + _M_move_assign(__x, __bool_constant<_Alloc_traits::_S_nothrow_move()>()); return *this; } @@ -1474,12 +1721,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_impl._M_reset(); _M_impl._M_key_compare = __x._M_impl._M_key_compare; if (__x._M_root() != 0) - { - _M_root() = _M_copy(__x._M_begin(), _M_end(), __roan); - _M_leftmost() = _S_minimum(_M_root()); - _M_rightmost() = _S_maximum(_M_root()); - _M_impl._M_node_count = __x._M_impl._M_node_count; - } + _M_root() = _M_copy(__x, __roan); } return *this; @@ -1553,7 +1795,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif { _Link_type __x = _M_begin(); - _Link_type __y = _M_end(); + _Base_ptr __y = _M_end(); while (__x != 0) { __y = __x; @@ -1568,7 +1810,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: - _M_copy(_Const_Link_type __x, _Link_type __p, _NodeGen& __node_gen) + _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen& __node_gen) { // Structural copy. __x and __p must be non-null. _Link_type __top = _M_clone_node(__x, __node_gen); @@ -1621,7 +1863,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_lower_bound(_Link_type __x, _Link_type __y, + _M_lower_bound(_Link_type __x, _Base_ptr __y, const _Key& __k) { while (__x != 0) @@ -1637,7 +1879,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, const _Key& __k) const { while (__x != 0) @@ -1653,7 +1895,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_upper_bound(_Link_type __x, _Link_type __y, + _M_upper_bound(_Link_type __x, _Base_ptr __y, const _Key& __k) { while (__x != 0) @@ -1669,7 +1911,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, const _Key& __k) const { while (__x != 0) @@ -1690,7 +1932,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION equal_range(const _Key& __k) { _Link_type __x = _M_begin(); - _Link_type __y = _M_end(); + _Base_ptr __y = _M_end(); while (__x != 0) { if (_M_impl._M_key_compare(_S_key(__x), __k)) @@ -1699,7 +1941,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __y = __x, __x = _S_left(__x); else { - _Link_type __xu(__x), __yu(__y); + _Link_type __xu(__x); + _Base_ptr __yu(__y); __y = __x, __x = _S_left(__x); __xu = _S_right(__xu); return pair void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) -#if __cplusplus >= 201103L - noexcept(_Alloc_traits::_S_nothrow_swap()) -#endif + swap(_Rb_tree& __t) + _GLIBCXX_NOEXCEPT_IF(__is_nothrow_swappable<_Compare>::value) { if (_M_root() == 0) { if (__t._M_root() != 0) - { - _M_root() = __t._M_root(); - _M_leftmost() = __t._M_leftmost(); - _M_rightmost() = __t._M_rightmost(); - _M_root()->_M_parent = _M_end(); - _M_impl._M_node_count = __t._M_impl._M_node_count; - - __t._M_impl._M_reset(); - } + _M_impl._M_move_data(__t._M_impl); } else if (__t._M_root() == 0) - { - __t._M_root() = _M_root(); - __t._M_leftmost() = _M_leftmost(); - __t._M_rightmost() = _M_rightmost(); - __t._M_root()->_M_parent = __t._M_end(); - __t._M_impl._M_node_count = _M_impl._M_node_count; - - _M_impl._M_reset(); - } + __t._M_impl._M_move_data(_M_impl); else { std::swap(_M_root(),__t._M_root()); @@ -1802,7 +2028,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { typedef pair<_Base_ptr, _Base_ptr> _Res; _Link_type __x = _M_begin(); - _Link_type __y = _M_end(); + _Base_ptr __y = _M_end(); bool __comp = true; while (__x != 0) { @@ -1834,7 +2060,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { typedef pair<_Base_ptr, _Base_ptr> _Res; _Link_type __x = _M_begin(); - _Link_type __y = _M_end(); + _Base_ptr __y = _M_end(); while (__x != 0) { __y = __x; @@ -1870,7 +2096,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION true); } - return _Res(iterator(static_cast<_Link_type>(__res.first)), false); + return _Res(iterator(__res.first), false); } template(__res.first)); + return iterator(__res.first); } template(__res.first)), false); + return _Res(iterator(__res.first), false); } __catch(...) { @@ -2177,7 +2403,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return _M_insert_node(__res.first, __res.second, __z); _M_drop_node(__z); - return iterator(static_cast<_Link_type>(__res.first)); + return iterator(__res.first); } __catch(...) { @@ -2260,7 +2486,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION clear(); else while (__first != __last) - erase(__first++); + _M_erase_aux(__first++); } template __p = equal_range(__x); const size_type __old_size = size(); - erase(__p.first, __p.second); + _M_erase_aux(__p.first, __p.second); return __old_size - size(); } @@ -2364,6 +2590,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return true; } +#if __cplusplus > 201402L + // Allow access to internals of compatible _Rb_tree specializations. + template + struct _Rb_tree_merge_helper<_Rb_tree<_Key, _Val, _Sel, _Cmp1, _Alloc>, + _Cmp2> + { + private: + friend class _Rb_tree<_Key, _Val, _Sel, _Cmp1, _Alloc>; + + static auto& + _S_get_impl(_Rb_tree<_Key, _Val, _Sel, _Cmp2, _Alloc>& __tree) + { return __tree._M_impl; } + }; +#endif // C++17 + _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_uninitialized.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_uninitialized.h similarity index 77% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_uninitialized.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_uninitialized.h index 61a15618f..d0e2b2d33 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_uninitialized.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_uninitialized.h @@ -1,6 +1,6 @@ // Raw memory manipulators -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -56,6 +56,14 @@ #ifndef _STL_UNINITIALIZED_H #define _STL_UNINITIALIZED_H 1 +#if __cplusplus > 201402L +#include +#endif + +#if __cplusplus >= 201103L +#include +#endif + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -71,7 +79,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _ForwardIterator __cur = __result; __try { - for (; __first != __last; ++__first, ++__cur) + for (; __first != __last; ++__first, (void)++__cur) std::_Construct(std::__addressof(*__cur), *__first); return __cur; } @@ -263,7 +271,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; - for (; __first != __last; ++__first, ++__cur) + for (; __first != __last; ++__first, (void)++__cur) __traits::construct(__alloc, std::__addressof(*__cur), *__first); return __cur; } @@ -636,6 +644,99 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION allocator<_Tp>&) { return std::__uninitialized_default_n(__first, __n); } + template + struct __uninitialized_default_novalue_1 + { + template + static void + __uninit_default_novalue(_ForwardIterator __first, + _ForwardIterator __last) + { + _ForwardIterator __cur = __first; + __try + { + for (; __cur != __last; ++__cur) + std::_Construct_novalue(std::__addressof(*__cur)); + } + __catch(...) + { + std::_Destroy(__first, __cur); + __throw_exception_again; + } + } + }; + + template<> + struct __uninitialized_default_novalue_1 + { + template + static void + __uninit_default_novalue(_ForwardIterator __first, + _ForwardIterator __last) + { + } + }; + + template + struct __uninitialized_default_novalue_n_1 + { + template + static _ForwardIterator + __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) + { + _ForwardIterator __cur = __first; + __try + { + for (; __n > 0; --__n, ++__cur) + std::_Construct_novalue(std::__addressof(*__cur)); + return __cur; + } + __catch(...) + { + std::_Destroy(__first, __cur); + __throw_exception_again; + } + } + }; + + template<> + struct __uninitialized_default_novalue_n_1 + { + template + static _ForwardIterator + __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) + { return std::next(__first, __n); } + }; + + // __uninitialized_default_novalue + // Fills [first, last) with std::distance(first, last) default-initialized + // value_types(s). + template + inline void + __uninitialized_default_novalue(_ForwardIterator __first, + _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_default_novalue_1< + is_trivially_default_constructible<_ValueType>::value>:: + __uninit_default_novalue(__first, __last); + } + + // __uninitialized_default_n + // Fills [first, first + n) with n default-initialized value_type(s). + template + inline _ForwardIterator + __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + return __uninitialized_default_novalue_n_1< + is_trivially_default_constructible<_ValueType>::value>:: + __uninit_default_novalue_n(__first, __n); + } template @@ -665,6 +766,38 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION random_access_iterator_tag) { return std::uninitialized_copy(__first, __first + __n, __result); } + template + pair<_InputIterator, _ForwardIterator> + __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, + _ForwardIterator __result, input_iterator_tag) + { + _ForwardIterator __cur = __result; + __try + { + for (; __n > 0; --__n, ++__first, ++__cur) + std::_Construct(std::__addressof(*__cur), *__first); + return {__first, __cur}; + } + __catch(...) + { + std::_Destroy(__result, __cur); + __throw_exception_again; + } + } + + template + inline pair<_RandomAccessIterator, _ForwardIterator> + __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, + _ForwardIterator __result, + random_access_iterator_tag) + { + auto __second_res = uninitialized_copy(__first, __first + __n, __result); + auto __first_res = std::next(__first, __n); + return {__first_res, __second_res}; + } + /** * @brief Copies the range [first,first+n) into result. * @param __first An input iterator. @@ -680,8 +813,95 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _ForwardIterator __result) { return std::__uninitialized_copy_n(__first, __n, __result, std::__iterator_category(__first)); } + + template + inline pair<_InputIterator, _ForwardIterator> + __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, + _ForwardIterator __result) + { + return + std::__uninitialized_copy_n_pair(__first, __n, __result, + std::__iterator_category(__first)); + } + #endif +#if __cplusplus > 201402L + template + inline void + uninitialized_default_construct(_ForwardIterator __first, + _ForwardIterator __last) + { + __uninitialized_default_novalue(__first, __last); + } + + template + inline _ForwardIterator + uninitialized_default_construct_n(_ForwardIterator __first, _Size __count) + { + return __uninitialized_default_novalue_n(__first, __count); + } + + template + inline void + uninitialized_value_construct(_ForwardIterator __first, + _ForwardIterator __last) + { + return __uninitialized_default(__first, __last); + } + + template + inline _ForwardIterator + uninitialized_value_construct_n(_ForwardIterator __first, _Size __count) + { + return __uninitialized_default_n(__first, __count); + } + + template + inline _ForwardIterator + uninitialized_move(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + return std::uninitialized_copy + (_GLIBCXX_MAKE_MOVE_ITERATOR(__first), + _GLIBCXX_MAKE_MOVE_ITERATOR(__last), __result); + } + + template + inline pair<_InputIterator, _ForwardIterator> + uninitialized_move_n(_InputIterator __first, _Size __count, + _ForwardIterator __result) + { + auto __res = std::__uninitialized_copy_n_pair + (_GLIBCXX_MAKE_MOVE_ITERATOR(__first), + __count, __result); + return {__res.first.base(), __res.second}; + } + + template + inline void + destroy_at(_Tp* __location) + { + std::_Destroy(__location); + } + + template + inline void + destroy(_ForwardIterator __first, _ForwardIterator __last) + { + std::_Destroy(__first, __last); + } + + template + inline _ForwardIterator + destroy_n(_ForwardIterator __first, _Size __count) + { + return std::_Destroy_n(__first, __count); + } + +#endif + + _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_vector.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_vector.h similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_vector.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_vector.h index b00f7704f..fb882126c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stl_vector.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stl_vector.h @@ -1,6 +1,6 @@ // Vector implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -63,6 +63,8 @@ #include #endif +#include + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_CONTAINER @@ -72,11 +74,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER struct _Vector_base { typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template - rebind<_Tp>::other _Tp_alloc_type; + rebind<_Tp>::other _Tp_alloc_type; typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer pointer; - struct _Vector_impl + struct _Vector_impl : public _Tp_alloc_type { pointer _M_start; @@ -105,7 +107,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER std::swap(_M_end_of_storage, __x._M_end_of_storage); } }; - + public: typedef _Alloc allocator_type; @@ -213,29 +215,33 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template > class vector : protected _Vector_base<_Tp, _Alloc> { +#ifdef _GLIBCXX_CONCEPT_CHECKS // Concept requirements. - typedef typename _Alloc::value_type _Alloc_value_type; + typedef typename _Alloc::value_type _Alloc_value_type; +# if __cplusplus < 201103L __glibcxx_class_requires(_Tp, _SGIAssignableConcept) +# endif __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept) - - typedef _Vector_base<_Tp, _Alloc> _Base; - typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; - typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; +#endif + + typedef _Vector_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; public: - typedef _Tp value_type; - typedef typename _Base::pointer pointer; - typedef typename _Alloc_traits::const_pointer const_pointer; - typedef typename _Alloc_traits::reference reference; - typedef typename _Alloc_traits::const_reference const_reference; + typedef _Tp value_type; + typedef typename _Base::pointer pointer; + typedef typename _Alloc_traits::const_pointer const_pointer; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Alloc allocator_type; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; protected: using _Base::_M_allocate; @@ -310,15 +316,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief %Vector copy constructor. * @param __x A %vector of identical element and allocator types. * - * The newly-created %vector uses a copy of the allocation - * object used by @a __x. All the elements of @a __x are copied, - * but any extra memory in - * @a __x (for fast expansion) will not be copied. + * All the elements of @a __x are copied, but any unused capacity in + * @a __x will not be copied + * (i.e. capacity() == size() in the new %vector). + * + * The newly-created %vector uses a copy of the allocator object used + * by @a __x (unless the allocator traits dictate a different object). */ vector(const vector& __x) : _Base(__x.size(), - _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) - { this->_M_impl._M_finish = + _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) + { + this->_M_impl._M_finish = std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); @@ -338,7 +347,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /// Copy constructor with alternative allocator vector(const vector& __x, const allocator_type& __a) : _Base(__x.size(), __a) - { this->_M_impl._M_finish = + { + this->_M_impl._M_finish = std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); @@ -398,16 +408,16 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #if __cplusplus >= 201103L template> - vector(_InputIterator __first, _InputIterator __last, + vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) - { _M_initialize_dispatch(__first, __last, __false_type()); } + { _M_initialize_dispatch(__first, __last, __false_type()); } #else template - vector(_InputIterator __first, _InputIterator __last, + vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) - { + { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); @@ -428,9 +438,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief %Vector assignment operator. * @param __x A %vector of identical element and allocator types. * - * All the elements of @a __x are copied, but any extra memory in - * @a __x (for fast expansion) will not be copied. Unlike the - * copy constructor, the allocator object is not copied. + * All the elements of @a __x are copied, but any unused capacity in + * @a __x will not be copied. + * + * Whether the allocator is copied depends on the allocator traits. */ vector& operator=(const vector& __x); @@ -442,16 +453,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * The contents of @a __x are moved into this %vector (without copying, * if the allocators permit it). - * @a __x is a valid, but unspecified %vector. + * Afterwards @a __x is a valid, but unspecified %vector. + * + * Whether the allocator is moved depends on the allocator traits. */ vector& operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) { - constexpr bool __move_storage = - _Alloc_traits::_S_propagate_on_move_assign() - || _Alloc_traits::_S_always_equal(); - _M_move_assign(std::move(__x), - integral_constant()); + constexpr bool __move_storage = + _Alloc_traits::_S_propagate_on_move_assign() + || _Alloc_traits::_S_always_equal(); + _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); return *this; } @@ -464,12 +476,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %vector and * that the resulting %vector's size is the same as the number - * of elements assigned. Old data may be lost. + * of elements assigned. */ vector& operator=(initializer_list __l) { - this->assign(__l.begin(), __l.end()); + this->_M_assign_aux(__l.begin(), __l.end(), + random_access_iterator_tag()); return *this; } #endif @@ -482,7 +495,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * This function fills a %vector with @a __n copies of the given * value. Note that the assignment completely changes the * %vector and that the resulting %vector's size is the same as - * the number of elements assigned. Old data may be lost. + * the number of elements assigned. */ void assign(size_type __n, const value_type& __val) @@ -498,19 +511,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %vector and * that the resulting %vector's size is the same as the number - * of elements assigned. Old data may be lost. + * of elements assigned. */ #if __cplusplus >= 201103L template> - void - assign(_InputIterator __first, _InputIterator __last) - { _M_assign_dispatch(__first, __last, __false_type()); } + void + assign(_InputIterator __first, _InputIterator __last) + { _M_assign_dispatch(__first, __last, __false_type()); } #else template - void - assign(_InputIterator __first, _InputIterator __last) - { + void + assign(_InputIterator __first, _InputIterator __last) + { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); @@ -527,11 +540,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %vector and * that the resulting %vector's size is the same as the number - * of elements assigned. Old data may be lost. + * of elements assigned. */ void assign(initializer_list __l) - { this->assign(__l.begin(), __l.end()); } + { + this->_M_assign_aux(__l.begin(), __l.end(), + random_access_iterator_tag()); + } #endif /// Get a copy of the memory allocation object. @@ -693,7 +709,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER resize(size_type __new_size, const value_type& __x) { if (__new_size > size()) - insert(end(), __new_size - size(), __x); + _M_fill_insert(end(), __new_size - size(), __x); else if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); } @@ -713,7 +729,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER resize(size_type __new_size, value_type __x = value_type()) { if (__new_size > size()) - insert(end(), __new_size - size(), __x); + _M_fill_insert(end(), __new_size - size(), __x); else if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); } @@ -777,7 +793,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ reference operator[](size_type __n) _GLIBCXX_NOEXCEPT - { return *(this->_M_impl._M_start + __n); } + { + __glibcxx_requires_subscript(__n); + return *(this->_M_impl._M_start + __n); + } /** * @brief Subscript access to the data contained in the %vector. @@ -792,7 +811,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ const_reference operator[](size_type __n) const _GLIBCXX_NOEXCEPT - { return *(this->_M_impl._M_start + __n); } + { + __glibcxx_requires_subscript(__n); + return *(this->_M_impl._M_start + __n); + } protected: /// Safety check used only from at(). @@ -822,7 +844,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER at(size_type __n) { _M_range_check(__n); - return (*this)[__n]; + return (*this)[__n]; } /** @@ -849,7 +871,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ reference front() _GLIBCXX_NOEXCEPT - { return *begin(); } + { + __glibcxx_requires_nonempty(); + return *begin(); + } /** * Returns a read-only (constant) reference to the data at the first @@ -857,7 +882,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ const_reference front() const _GLIBCXX_NOEXCEPT - { return *begin(); } + { + __glibcxx_requires_nonempty(); + return *begin(); + } /** * Returns a read/write reference to the data at the last @@ -865,15 +893,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ reference back() _GLIBCXX_NOEXCEPT - { return *(end() - 1); } - + { + __glibcxx_requires_nonempty(); + return *(end() - 1); + } + /** * Returns a read-only (constant) reference to the data at the * last element of the %vector. */ const_reference back() const _GLIBCXX_NOEXCEPT - { return *(end() - 1); } + { + __glibcxx_requires_nonempty(); + return *(end() - 1); + } // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 464. Suggestion for new member functions in standard containers. @@ -882,19 +916,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * Returns a pointer such that [data(), data() + size()) is a valid * range. For a non-empty %vector, data() == &front(). */ -#if __cplusplus >= 201103L _Tp* -#else - pointer -#endif data() _GLIBCXX_NOEXCEPT { return _M_data_ptr(this->_M_impl._M_start); } -#if __cplusplus >= 201103L const _Tp* -#else - const_pointer -#endif data() const _GLIBCXX_NOEXCEPT { return _M_data_ptr(this->_M_impl._M_start); } @@ -915,15 +941,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, - __x); + __x); ++this->_M_impl._M_finish; } else -#if __cplusplus >= 201103L - _M_emplace_back_aux(__x); -#else - _M_insert_aux(end(), __x); -#endif + _M_realloc_insert(end(), __x); } #if __cplusplus >= 201103L @@ -932,8 +954,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { emplace_back(std::move(__x)); } template - void - emplace_back(_Args&&... __args); +#if __cplusplus > 201402L + reference +#else + void +#endif + emplace_back(_Args&&... __args); #endif /** @@ -948,6 +974,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER void pop_back() _GLIBCXX_NOEXCEPT { + __glibcxx_requires_nonempty(); --this->_M_impl._M_finish; _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); } @@ -966,8 +993,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * std::list. */ template - iterator - emplace(const_iterator __position, _Args&&... __args); + iterator + emplace(const_iterator __position, _Args&&... __args) + { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); } /** * @brief Inserts given value into %vector before specified iterator. @@ -1012,14 +1040,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ iterator insert(const_iterator __position, value_type&& __x) - { return emplace(__position, std::move(__x)); } + { return _M_insert_rval(__position, std::move(__x)); } /** * @brief Inserts an initializer_list into the %vector. * @param __position An iterator into the %vector. * @param __l An initializer_list. * - * This function will insert copies of the data in the + * This function will insert copies of the data in the * initializer_list @a l into the %vector before the location * specified by @a position. * @@ -1029,7 +1057,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ iterator insert(const_iterator __position, initializer_list __l) - { return this->insert(__position, __l.begin(), __l.end()); } + { + auto __offset = __position - cbegin(); + _M_range_insert(begin() + __offset, __l.begin(), __l.end(), + std::random_access_iterator_tag()); + return begin() + __offset; + } #endif #if __cplusplus >= 201103L @@ -1091,10 +1124,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER */ template> - iterator - insert(const_iterator __position, _InputIterator __first, + iterator + insert(const_iterator __position, _InputIterator __first, _InputIterator __last) - { + { difference_type __offset = __position - cbegin(); _M_insert_dispatch(begin() + __offset, __first, __last, __false_type()); @@ -1116,10 +1149,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * consider using std::list. */ template - void - insert(iterator __position, _InputIterator __first, + void + insert(iterator __position, _InputIterator __first, _InputIterator __last) - { + { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); @@ -1189,16 +1222,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * (Three pointers, so it should be quite fast.) * Note that the global std::swap() function is specialized such that * std::swap(v1,v2) will feed to this function. + * + * Whether the allocators are swapped depends on the allocator traits. */ void - swap(vector& __x) -#if __cplusplus >= 201103L - noexcept(_Alloc_traits::_S_nothrow_swap()) -#endif + swap(vector& __x) _GLIBCXX_NOEXCEPT { +#if __cplusplus >= 201103L + __glibcxx_assert(_Alloc_traits::propagate_on_container_swap::value + || _M_get_Tp_allocator() == __x._M_get_Tp_allocator()); +#endif this->_M_impl._M_swap_data(__x._M_impl); _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), - __x._M_get_Tp_allocator()); + __x._M_get_Tp_allocator()); } /** @@ -1217,10 +1253,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * obtain @a n bytes of memory, and then copies [first,last) into it. */ template - pointer - _M_allocate_and_copy(size_type __n, + pointer + _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last) - { + { pointer __result = this->_M_allocate(__n); __try { @@ -1243,9 +1279,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template - void - _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) - { + void + _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) + { this->_M_impl._M_start = _M_allocate(static_cast(__n)); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + static_cast(__n); @@ -1254,10 +1290,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // Called by the range constructor to implement [23.1.1]/9 template - void - _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) - { + { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_initialize(__first, __last, _IterCategory()); @@ -1265,10 +1301,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // Called by the second initialize_dispatch above template - void - _M_range_initialize(_InputIterator __first, + void + _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) - { + { for (; __first != __last; ++__first) #if __cplusplus >= 201103L emplace_back(*__first); @@ -1279,10 +1315,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // Called by the second initialize_dispatch above template - void - _M_range_initialize(_ForwardIterator __first, + void + _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) - { + { const size_type __n = std::distance(__first, __last); this->_M_impl._M_start = this->_M_allocate(__n); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; @@ -1321,31 +1357,27 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template - void - _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) - { _M_fill_assign(__n, __val); } + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } // Called by the range assign to implement [23.1.1]/9 template - void - _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) - { - typedef typename std::iterator_traits<_InputIterator>:: - iterator_category _IterCategory; - _M_assign_aux(__first, __last, _IterCategory()); - } + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } // Called by the second assign_dispatch above template - void - _M_assign_aux(_InputIterator __first, _InputIterator __last, + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); // Called by the second assign_dispatch above template - void - _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); // Called by assign(n,t), and the range assign when it turns out @@ -1353,7 +1385,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER void _M_fill_assign(size_type __n, const value_type& __val); - // Internal insert functions follow. // Called by the range insert to implement [23.1.1]/9 @@ -1361,32 +1392,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template - void - _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, __true_type) - { _M_fill_insert(__pos, __n, __val); } + { _M_fill_insert(__pos, __n, __val); } // Called by the range insert to implement [23.1.1]/9 template - void - _M_insert_dispatch(iterator __pos, _InputIterator __first, + void + _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) - { - typedef typename std::iterator_traits<_InputIterator>:: - iterator_category _IterCategory; - _M_range_insert(__pos, __first, __last, _IterCategory()); + { + _M_range_insert(__pos, __first, __last, + std::__iterator_category(__first)); } // Called by the second insert_dispatch above template - void - _M_range_insert(iterator __pos, _InputIterator __first, + void + _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); // Called by the second insert_dispatch above template - void - _M_range_insert(iterator __pos, _ForwardIterator __first, + void + _M_range_insert(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); // Called by insert(p,n,x), and the range insert when it turns out to be @@ -1403,21 +1433,66 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _M_shrink_to_fit(); #endif - // Called by insert(p,x) #if __cplusplus < 201103L + // Called by insert(p,x) void _M_insert_aux(iterator __position, const value_type& __x); + + void + _M_realloc_insert(iterator __position, const value_type& __x); #else - template - void - _M_insert_aux(iterator __position, _Args&&... __args); + // A value_type object constructed with _Alloc_traits::construct() + // and destroyed with _Alloc_traits::destroy(). + struct _Temporary_value + { + template + explicit + _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec) + { + _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), + std::forward<_Args>(__args)...); + } + + ~_Temporary_value() + { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } + + value_type& + _M_val() { return *reinterpret_cast<_Tp*>(&__buf); } + + private: + pointer + _M_ptr() { return pointer_traits::pointer_to(_M_val()); } + + vector* _M_this; + typename aligned_storage::type __buf; + }; + + // Called by insert(p,x) and other functions when insertion needs to + // reallocate or move existing elements. _Arg is either _Tp& or _Tp. + template + void + _M_insert_aux(iterator __position, _Arg&& __arg); template - void - _M_emplace_back_aux(_Args&&... __args); + void + _M_realloc_insert(iterator __position, _Args&&... __args); + + // Either move-construct at the end, or forward to _M_insert_aux. + iterator + _M_insert_rval(const_iterator __position, value_type&& __v); + + // Try to emplace at the end, otherwise forward to _M_insert_aux. + template + iterator + _M_emplace_aux(const_iterator __position, _Args&&... __args); + + // Emplacing an rvalue of the correct type can use _M_insert_rval. + iterator + _M_emplace_aux(const_iterator __position, value_type&& __v) + { return _M_insert_rval(__position, std::move(__v)); } #endif - // Called by the latter. + // Called by _M_fill_insert, _M_insert_aux etc. size_type _M_check_len(size_type __n, const char* __s) const { @@ -1477,21 +1552,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER } #endif -#if __cplusplus >= 201103L template _Up* - _M_data_ptr(_Up* __ptr) const + _M_data_ptr(_Up* __ptr) const _GLIBCXX_NOEXCEPT { return __ptr; } +#if __cplusplus >= 201103L template typename std::pointer_traits<_Ptr>::element_type* _M_data_ptr(_Ptr __ptr) const { return empty() ? nullptr : std::__addressof(*__ptr); } #else - template - _Ptr - _M_data_ptr(_Ptr __ptr) const + template + _Up* + _M_data_ptr(_Up* __ptr) _GLIBCXX_NOEXCEPT { return __ptr; } + + template + value_type* + _M_data_ptr(_Ptr __ptr) + { return __ptr.operator->(); } + + template + const value_type* + _M_data_ptr(_Ptr __ptr) const + { return __ptr.operator->(); } #endif }; @@ -1557,6 +1642,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template inline void swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { __x.swap(__y); } _GLIBCXX_END_NAMESPACE_CONTAINER diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stream_iterator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stream_iterator.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stream_iterator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stream_iterator.h index 270b01b7c..552ed36d8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stream_iterator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stream_iterator.h @@ -1,6 +1,6 @@ // Stream iterators -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -66,7 +66,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Construct start of input stream iterator. istream_iterator(istream_type& __s) - : _M_stream(&__s) + : _M_stream(std::__addressof(__s)) { _M_read(); } istream_iterator(const istream_iterator& __obj) @@ -84,7 +84,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } const _Tp* - operator->() const { return &(operator*()); } + operator->() const { return std::__addressof((operator*())); } istream_iterator& operator++() @@ -168,7 +168,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /// Construct from an ostream. - ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} + ostream_iterator(ostream_type& __s) + : _M_stream(std::__addressof(__s)), _M_string(0) {} /** * Construct from an ostream. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/streambuf.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/streambuf.tcc similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/streambuf.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/streambuf.tcc index 76f851343..a8ac056c2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/streambuf.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/streambuf.tcc @@ -1,6 +1,6 @@ // Stream buffer classes -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/streambuf_iterator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/streambuf_iterator.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/streambuf_iterator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/streambuf_iterator.h index 372b2322f..f0451b12c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/streambuf_iterator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/streambuf_iterator.h @@ -1,6 +1,6 @@ // Streambuf iterators -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/string_view.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/string_view.tcc new file mode 100644 index 000000000..ffdcc30ca --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/string_view.tcc @@ -0,0 +1,227 @@ +// Components for manipulating non-owning sequences of characters -*- C++ -*- + +// Copyright (C) 2013-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/string_view.tcc + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{string_view} + */ + +// +// N3762 basic_string_view library +// + +#ifndef _GLIBCXX_STRING_VIEW_TCC +#define _GLIBCXX_STRING_VIEW_TCC 1 + +#pragma GCC system_header + +#if __cplusplus <= 201402L +# include +#else + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find(const _CharT* __str, size_type __pos, size_type __n) const noexcept + { + __glibcxx_requires_string_len(__str, __n); + + if (__n == 0) + return __pos <= this->_M_len ? __pos : npos; + + if (__n <= this->_M_len) + { + for (; __pos <= this->_M_len - __n; ++__pos) + if (traits_type::eq(this->_M_str[__pos], __str[0]) + && traits_type::compare(this->_M_str + __pos + 1, + __str + 1, __n - 1) == 0) + return __pos; + } + return npos; + } + + template + typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find(_CharT __c, size_type __pos) const noexcept + { + size_type __ret = npos; + if (__pos < this->_M_len) + { + const size_type __n = this->_M_len - __pos; + const _CharT* __p = traits_type::find(this->_M_str + __pos, __n, __c); + if (__p) + __ret = __p - this->_M_str; + } + return __ret; + } + + template + typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + rfind(const _CharT* __str, size_type __pos, size_type __n) const noexcept + { + __glibcxx_requires_string_len(__str, __n); + + if (__n <= this->_M_len) + { + __pos = std::min(size_type(this->_M_len - __n), __pos); + do + { + if (traits_type::compare(this->_M_str + __pos, __str, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + + template + typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + rfind(_CharT __c, size_type __pos) const noexcept + { + size_type __size = this->_M_len; + if (__size > 0) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(this->_M_str[__size], __c)) + return __size; + } + return npos; + } + + template + typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_first_of(const _CharT* __str, size_type __pos, size_type __n) const + { + __glibcxx_requires_string_len(__str, __n); + for (; __n && __pos < this->_M_len; ++__pos) + { + const _CharT* __p = traits_type::find(__str, __n, + this->_M_str[__pos]); + if (__p) + return __pos; + } + return npos; + } + + template + typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_last_of(const _CharT* __str, size_type __pos, size_type __n) const + { + __glibcxx_requires_string_len(__str, __n); + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__str, __n, this->_M_str[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + + template + typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_first_not_of(const _CharT* __str, size_type __pos, size_type __n) const + { + __glibcxx_requires_string_len(__str, __n); + for (; __pos < this->_M_len; ++__pos) + if (!traits_type::find(__str, __n, this->_M_str[__pos])) + return __pos; + return npos; + } + + template + typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_first_not_of(_CharT __c, size_type __pos) const noexcept + { + for (; __pos < this->_M_len; ++__pos) + if (!traits_type::eq(this->_M_str[__pos], __c)) + return __pos; + return npos; + } + + template + typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_last_not_of(const _CharT* __str, size_type __pos, size_type __n) const + { + __glibcxx_requires_string_len(__str, __n); + size_type __size = this->_M_len; + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__str, __n, this->_M_str[__size])) + return __size; + } + while (__size--); + } + return npos; + } + + template + typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_last_not_of(_CharT __c, size_type __pos) const noexcept + { + size_type __size = this->_M_len; + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(this->_M_str[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // __cplusplus <= 201402L + +#endif // _GLIBCXX_STRING_VIEW_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stringfwd.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stringfwd.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stringfwd.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stringfwd.h index f1a5e87d9..15db187f9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/stringfwd.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/stringfwd.h @@ -1,6 +1,6 @@ // Forward declarations -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/uniform_int_dist.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/uniform_int_dist.h new file mode 100644 index 000000000..af7ac14bc --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/uniform_int_dist.h @@ -0,0 +1,375 @@ +// Class template uniform_int_distribution -*- C++ -*- + +// Copyright (C) 2009-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** + * @file bits/uniform_int_dist.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{random} + */ + +#ifndef _GLIBCXX_BITS_UNIFORM_INT_DIST_H +#define _GLIBCXX_BITS_UNIFORM_INT_DIST_H + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ + + namespace __detail + { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /* Determine whether number is a power of 2. */ + template + inline bool + _Power_of_2(_Tp __x) + { + return ((__x - 1) & __x) == 0; + }; +_GLIBCXX_END_NAMESPACE_VERSION + } + +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @brief Uniform discrete distribution for random numbers. + * A discrete random distribution on the range @f$[min, max]@f$ with equal + * probability throughout the range. + */ + template + class uniform_int_distribution + { + static_assert(std::is_integral<_IntType>::value, + "template argument must be an integral type"); + + public: + /** The type of the range of the distribution. */ + typedef _IntType result_type; + /** Parameter type. */ + struct param_type + { + typedef uniform_int_distribution<_IntType> distribution_type; + + explicit + param_type(_IntType __a = 0, + _IntType __b = std::numeric_limits<_IntType>::max()) + : _M_a(__a), _M_b(__b) + { + __glibcxx_assert(_M_a <= _M_b); + } + + result_type + a() const + { return _M_a; } + + result_type + b() const + { return _M_b; } + + friend bool + operator==(const param_type& __p1, const param_type& __p2) + { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + + private: + _IntType _M_a; + _IntType _M_b; + }; + + public: + /** + * @brief Constructs a uniform distribution object. + */ + explicit + uniform_int_distribution(_IntType __a = 0, + _IntType __b = std::numeric_limits<_IntType>::max()) + : _M_param(__a, __b) + { } + + explicit + uniform_int_distribution(const param_type& __p) + : _M_param(__p) + { } + + /** + * @brief Resets the distribution state. + * + * Does nothing for the uniform integer distribution. + */ + void + reset() { } + + result_type + a() const + { return _M_param.a(); } + + result_type + b() const + { return _M_param.b(); } + + /** + * @brief Returns the parameter set of the distribution. + */ + param_type + param() const + { return _M_param; } + + /** + * @brief Sets the parameter set of the distribution. + * @param __param The new parameter set of the distribution. + */ + void + param(const param_type& __param) + { _M_param = __param; } + + /** + * @brief Returns the inclusive lower bound of the distribution range. + */ + result_type + min() const + { return this->a(); } + + /** + * @brief Returns the inclusive upper bound of the distribution range. + */ + result_type + max() const + { return this->b(); } + + /** + * @brief Generating functions. + */ + template + result_type + operator()(_UniformRandomNumberGenerator& __urng) + { return this->operator()(__urng, _M_param); } + + template + result_type + operator()(_UniformRandomNumberGenerator& __urng, + const param_type& __p); + + template + void + __generate(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomNumberGenerator& __urng) + { this->__generate(__f, __t, __urng, _M_param); } + + template + void + __generate(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __p) + { this->__generate_impl(__f, __t, __urng, __p); } + + template + void + __generate(result_type* __f, result_type* __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __p) + { this->__generate_impl(__f, __t, __urng, __p); } + + /** + * @brief Return true if two uniform integer distributions have + * the same parameters. + */ + friend bool + operator==(const uniform_int_distribution& __d1, + const uniform_int_distribution& __d2) + { return __d1._M_param == __d2._M_param; } + + private: + template + void + __generate_impl(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __p); + + param_type _M_param; + }; + + template + template + typename uniform_int_distribution<_IntType>::result_type + uniform_int_distribution<_IntType>:: + operator()(_UniformRandomNumberGenerator& __urng, + const param_type& __param) + { + typedef typename _UniformRandomNumberGenerator::result_type + _Gresult_type; + typedef typename std::make_unsigned::type __utype; + typedef typename std::common_type<_Gresult_type, __utype>::type + __uctype; + + const __uctype __urngmin = __urng.min(); + const __uctype __urngmax = __urng.max(); + const __uctype __urngrange = __urngmax - __urngmin; + const __uctype __urange + = __uctype(__param.b()) - __uctype(__param.a()); + + __uctype __ret; + + if (__urngrange > __urange) + { + // downscaling + const __uctype __uerange = __urange + 1; // __urange can be zero + const __uctype __scaling = __urngrange / __uerange; + const __uctype __past = __uerange * __scaling; + do + __ret = __uctype(__urng()) - __urngmin; + while (__ret >= __past); + __ret /= __scaling; + } + else if (__urngrange < __urange) + { + // upscaling + /* + Note that every value in [0, urange] + can be written uniquely as + + (urngrange + 1) * high + low + + where + + high in [0, urange / (urngrange + 1)] + + and + + low in [0, urngrange]. + */ + __uctype __tmp; // wraparound control + do + { + const __uctype __uerngrange = __urngrange + 1; + __tmp = (__uerngrange * operator() + (__urng, param_type(0, __urange / __uerngrange))); + __ret = __tmp + (__uctype(__urng()) - __urngmin); + } + while (__ret > __urange || __ret < __tmp); + } + else + __ret = __uctype(__urng()) - __urngmin; + + return __ret + __param.a(); + } + + + template + template + void + uniform_int_distribution<_IntType>:: + __generate_impl(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __param) + { + __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) + typedef typename _UniformRandomNumberGenerator::result_type + _Gresult_type; + typedef typename std::make_unsigned::type __utype; + typedef typename std::common_type<_Gresult_type, __utype>::type + __uctype; + + const __uctype __urngmin = __urng.min(); + const __uctype __urngmax = __urng.max(); + const __uctype __urngrange = __urngmax - __urngmin; + const __uctype __urange + = __uctype(__param.b()) - __uctype(__param.a()); + + __uctype __ret; + + if (__urngrange > __urange) + { + if (__detail::_Power_of_2(__urngrange + 1) + && __detail::_Power_of_2(__urange + 1)) + { + while (__f != __t) + { + __ret = __uctype(__urng()) - __urngmin; + *__f++ = (__ret & __urange) + __param.a(); + } + } + else + { + // downscaling + const __uctype __uerange = __urange + 1; // __urange can be zero + const __uctype __scaling = __urngrange / __uerange; + const __uctype __past = __uerange * __scaling; + while (__f != __t) + { + do + __ret = __uctype(__urng()) - __urngmin; + while (__ret >= __past); + *__f++ = __ret / __scaling + __param.a(); + } + } + } + else if (__urngrange < __urange) + { + // upscaling + /* + Note that every value in [0, urange] + can be written uniquely as + + (urngrange + 1) * high + low + + where + + high in [0, urange / (urngrange + 1)] + + and + + low in [0, urngrange]. + */ + __uctype __tmp; // wraparound control + while (__f != __t) + { + do + { + const __uctype __uerngrange = __urngrange + 1; + __tmp = (__uerngrange * operator() + (__urng, param_type(0, __urange / __uerngrange))); + __ret = __tmp + (__uctype(__urng()) - __urngmin); + } + while (__ret > __urange || __ret < __tmp); + *__f++ = __ret; + } + } + else + while (__f != __t) + *__f++ = __uctype(__urng()) - __urngmin + __param.a(); + } + + // operator!= and operator<< and operator>> are defined in + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/unique_ptr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/unique_ptr.h similarity index 70% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/unique_ptr.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/unique_ptr.h index 59078d795..a31cd67d6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/unique_ptr.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/unique_ptr.h @@ -1,6 +1,6 @@ // unique_ptr implementation -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -31,10 +31,12 @@ #define _UNIQUE_PTR_H 1 #include -#include +#include #include #include #include +#include +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -83,16 +85,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct default_delete<_Tp[]> { - private: - template - using __remove_cv = typename remove_cv<_Up>::type; - - // Like is_base_of<_Tp, _Up> but false if unqualified types are the same - template - using __is_derived_Tp - = __and_< is_base_of<_Tp, _Up>, - __not_, __remove_cv<_Up>>> >; - public: /// Default constructor constexpr default_delete() noexcept = default; @@ -107,57 +99,95 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * pointer to the base type. */ template::value>::type> + enable_if::value>::type> default_delete(const default_delete<_Up[]>&) noexcept { } /// Calls @c delete[] @p __ptr - void - operator()(_Tp* __ptr) const + template + typename enable_if::value>::type + operator()(_Up* __ptr) const { static_assert(sizeof(_Tp)>0, "can't delete pointer to incomplete type"); delete [] __ptr; } + }; - template - typename enable_if<__is_derived_Tp<_Up>::value>::type - operator()(_Up*) const = delete; + template + class __uniq_ptr_impl + { + template + struct _Ptr + { + using type = _Up*; + }; + + template + struct + _Ptr<_Up, _Ep, __void_t::type::pointer>> + { + using type = typename remove_reference<_Ep>::type::pointer; + }; + + public: + using _DeleterConstraint = enable_if< + __and_<__not_>, + is_default_constructible<_Dp>>::value>; + + using pointer = typename _Ptr<_Tp, _Dp>::type; + + __uniq_ptr_impl() = default; + __uniq_ptr_impl(pointer __p) : _M_t() { _M_ptr() = __p; } + + template + __uniq_ptr_impl(pointer __p, _Del&& __d) + : _M_t(__p, std::forward<_Del>(__d)) { } + + pointer& _M_ptr() { return std::get<0>(_M_t); } + pointer _M_ptr() const { return std::get<0>(_M_t); } + _Dp& _M_deleter() { return std::get<1>(_M_t); } + const _Dp& _M_deleter() const { return std::get<1>(_M_t); } + + private: + tuple _M_t; }; /// 20.7.1.2 unique_ptr for single objects. - template > + template > class unique_ptr { - // use SFINAE to determine whether _Del::pointer exists - class _Pointer - { - template - static typename _Up::pointer __test(typename _Up::pointer*); + template + using _DeleterConstraint = + typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; - template - static _Tp* __test(...); - - typedef typename remove_reference<_Dp>::type _Del; - - public: - typedef decltype(__test<_Del>(0)) type; - }; - - typedef std::tuple __tuple_type; - __tuple_type _M_t; + __uniq_ptr_impl<_Tp, _Dp> _M_t; public: - typedef typename _Pointer::type pointer; - typedef _Tp element_type; - typedef _Dp deleter_type; + using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; + using element_type = _Tp; + using deleter_type = _Dp; + + // helper template for detecting a safe conversion from another + // unique_ptr + template + using __safe_conversion_up = __and_< + is_convertible::pointer, pointer>, + __not_>, + __or_<__and_, + is_same>, + __and_<__not_>, + is_convertible<_Ep, deleter_type>> + > + >; // Constructors. /// Default constructor, creates a unique_ptr that owns nothing. - constexpr unique_ptr() noexcept - : _M_t() - { static_assert(!is_pointer::value, - "constructed with null function pointer deleter"); } + template > + constexpr unique_ptr() noexcept + : _M_t() + { } /** Takes ownership of a pointer. * @@ -165,11 +195,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * The deleter will be value-initialized. */ - explicit - unique_ptr(pointer __p) noexcept - : _M_t(__p, deleter_type()) - { static_assert(!is_pointer::value, - "constructed with null function pointer deleter"); } + template > + explicit + unique_ptr(pointer __p) noexcept + : _M_t(__p) + { } /** Takes ownership of a pointer. * @@ -197,7 +228,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION "rvalue deleter bound to reference"); } /// Creates a unique_ptr that owns nothing. - constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } + template > + constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } // Move constructors. @@ -212,8 +245,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * and @p __u has a compatible deleter type. */ template::pointer, pointer>, - __not_>, + __safe_conversion_up<_Up, _Ep>, typename conditional::value, is_same<_Ep, _Dp>, is_convertible<_Ep, _Dp>>::type>> @@ -231,7 +263,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Destructor, invokes the deleter if the stored pointer is not null. ~unique_ptr() noexcept { - auto& __ptr = std::get<0>(_M_t); + auto& __ptr = _M_t._M_ptr(); if (__ptr != nullptr) get_deleter()(__ptr); __ptr = pointer(); @@ -261,11 +293,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Invokes the deleter first if this object owns a pointer. */ template - typename enable_if< __and_< - is_convertible::pointer, pointer>, - __not_> - >::value, - unique_ptr&>::type + typename enable_if< __and_< + __safe_conversion_up<_Up, _Ep>, + is_assignable + >::value, + unique_ptr&>::type operator=(unique_ptr<_Up, _Ep>&& __u) noexcept { reset(__u.release()); @@ -287,7 +319,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename add_lvalue_reference::type operator*() const { - _GLIBCXX_DEBUG_ASSERT(get() != pointer()); + __glibcxx_assert(get() != pointer()); return *get(); } @@ -295,24 +327,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION pointer operator->() const noexcept { - _GLIBCXX_DEBUG_ASSERT(get() != pointer()); + _GLIBCXX_DEBUG_PEDASSERT(get() != pointer()); return get(); } /// Return the stored pointer. pointer get() const noexcept - { return std::get<0>(_M_t); } + { return _M_t._M_ptr(); } /// Return a reference to the stored deleter. deleter_type& get_deleter() noexcept - { return std::get<1>(_M_t); } + { return _M_t._M_deleter(); } /// Return a reference to the stored deleter. const deleter_type& get_deleter() const noexcept - { return std::get<1>(_M_t); } + { return _M_t._M_deleter(); } /// Return @c true if the stored pointer is not null. explicit operator bool() const noexcept @@ -325,7 +357,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION release() noexcept { pointer __p = get(); - std::get<0>(_M_t) = pointer(); + _M_t._M_ptr() = pointer(); return __p; } @@ -339,7 +371,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION reset(pointer __p = pointer()) noexcept { using std::swap; - swap(std::get<0>(_M_t), __p); + swap(_M_t._M_ptr(), __p); if (__p != pointer()) get_deleter()(__p); } @@ -364,23 +396,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template class unique_ptr<_Tp[], _Dp> { - // use SFINAE to determine whether _Del::pointer exists - class _Pointer - { - template - static typename _Up::pointer __test(typename _Up::pointer*); + template + using _DeleterConstraint = + typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; - template - static _Tp* __test(...); - - typedef typename remove_reference<_Dp>::type _Del; - - public: - typedef decltype(__test<_Del>(0)) type; - }; - - typedef std::tuple __tuple_type; - __tuple_type _M_t; + __uniq_ptr_impl<_Tp, _Dp> _M_t; template using __remove_cv = typename remove_cv<_Up>::type; @@ -391,69 +411,94 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION = __and_< is_base_of<_Tp, _Up>, __not_, __remove_cv<_Up>>> >; - template::pointer> - using __safe_conversion = __and_< - is_convertible<_Up_pointer, _Tp_pointer>, - is_array<_Up>, - __or_<__not_>, - __not_>, - __not_<__is_derived_Tp::type>> - > - >; - public: - typedef typename _Pointer::type pointer; - typedef _Tp element_type; - typedef _Dp deleter_type; + using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; + using element_type = _Tp; + using deleter_type = _Dp; + + // helper template for detecting a safe conversion from another + // unique_ptr + template, + typename _Up_element_type = typename _Up_up::element_type> + using __safe_conversion_up = __and_< + is_array<_Up>, + is_same, + is_same, + is_convertible<_Up_element_type(*)[], element_type(*)[]>, + __or_<__and_, is_same>, + __and_<__not_>, + is_convertible<_Ep, deleter_type>>> + >; + + // helper template for detecting a safe conversion from a raw pointer + template + using __safe_conversion_raw = __and_< + __or_<__or_, + is_same<_Up, nullptr_t>>, + __and_, + is_same, + is_convertible< + typename remove_pointer<_Up>::type(*)[], + element_type(*)[]> + > + > + >; // Constructors. /// Default constructor, creates a unique_ptr that owns nothing. - constexpr unique_ptr() noexcept - : _M_t() - { static_assert(!std::is_pointer::value, - "constructed with null function pointer deleter"); } + template > + constexpr unique_ptr() noexcept + : _M_t() + { } /** Takes ownership of a pointer. * - * @param __p A pointer to an array of @c element_type + * @param __p A pointer to an array of a type safely convertible + * to an array of @c element_type * * The deleter will be value-initialized. */ - explicit - unique_ptr(pointer __p) noexcept - : _M_t(__p, deleter_type()) - { static_assert(!is_pointer::value, - "constructed with null function pointer deleter"); } - - // Disable construction from convertible pointer types. - template, - is_convertible<_Up*, pointer>, __is_derived_Tp<_Up>>> + template, + typename = typename enable_if< + __safe_conversion_raw<_Up>::value, bool>::type> explicit - unique_ptr(_Up* __p) = delete; + unique_ptr(_Up __p) noexcept + : _M_t(__p) + { } /** Takes ownership of a pointer. * - * @param __p A pointer to an array of @c element_type + * @param __p A pointer to an array of a type safely convertible + * to an array of @c element_type * @param __d A reference to a deleter. * * The deleter will be initialized with @p __d */ - unique_ptr(pointer __p, - typename conditional::value, - deleter_type, const deleter_type&>::type __d) noexcept + template::value, bool>::type> + unique_ptr(_Up __p, + typename conditional::value, + deleter_type, const deleter_type&>::type __d) noexcept : _M_t(__p, __d) { } /** Takes ownership of a pointer. * - * @param __p A pointer to an array of @c element_type + * @param __p A pointer to an array of a type safely convertible + * to an array of @c element_type * @param __d A reference to a deleter. * * The deleter will be initialized with @p std::move(__d) */ - unique_ptr(pointer __p, typename + template::value, bool>::type> + unique_ptr(_Up __p, typename remove_reference::type&& __d) noexcept : _M_t(std::move(__p), std::move(__d)) { static_assert(!is_reference::value, @@ -464,14 +509,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_t(__u.release(), std::forward(__u.get_deleter())) { } /// Creates a unique_ptr that owns nothing. - constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } + template > + constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } template, - typename conditional::value, - is_same<_Ep, _Dp>, - is_convertible<_Ep, _Dp>>::type - >> + typename = _Require<__safe_conversion_up<_Up, _Ep>>> unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) { } @@ -479,7 +522,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Destructor, invokes the deleter if the stored pointer is not null. ~unique_ptr() { - auto& __ptr = std::get<0>(_M_t); + auto& __ptr = _M_t._M_ptr(); if (__ptr != nullptr) get_deleter()(__ptr); __ptr = pointer(); @@ -510,7 +553,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ template typename - enable_if<__safe_conversion<_Up, _Ep>::value, unique_ptr&>::type + enable_if<__and_<__safe_conversion_up<_Up, _Ep>, + is_assignable + >::value, + unique_ptr&>::type operator=(unique_ptr<_Up, _Ep>&& __u) noexcept { reset(__u.release()); @@ -532,24 +578,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename std::add_lvalue_reference::type operator[](size_t __i) const { - _GLIBCXX_DEBUG_ASSERT(get() != pointer()); + __glibcxx_assert(get() != pointer()); return get()[__i]; } /// Return the stored pointer. pointer get() const noexcept - { return std::get<0>(_M_t); } + { return _M_t._M_ptr(); } /// Return a reference to the stored deleter. deleter_type& get_deleter() noexcept - { return std::get<1>(_M_t); } + { return _M_t._M_deleter(); } /// Return a reference to the stored deleter. const deleter_type& get_deleter() const noexcept - { return std::get<1>(_M_t); } + { return _M_t._M_deleter(); } /// Return @c true if the stored pointer is not null. explicit operator bool() const noexcept @@ -562,7 +608,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION release() noexcept { pointer __p = get(); - std::get<0>(_M_t) = pointer(); + _M_t._M_ptr() = pointer(); return __p; } @@ -572,19 +618,32 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * The deleter will be invoked if a pointer is already owned. */ + template , + __and_, + is_pointer<_Up>, + is_convertible< + typename remove_pointer<_Up>::type(*)[], + element_type(*)[] + > + > + > + >> void - reset(pointer __p = pointer()) noexcept + reset(_Up __p) noexcept { + pointer __ptr = __p; using std::swap; - swap(std::get<0>(_M_t), __p); - if (__p != nullptr) - get_deleter()(__p); + swap(_M_t._M_ptr(), __ptr); + if (__ptr != nullptr) + get_deleter()(__ptr); } - // Disable resetting from convertible pointer types. - template, - is_convertible<_Up*, pointer>, __is_derived_Tp<_Up>>> - void reset(_Up*) = delete; + void reset(nullptr_t = nullptr) noexcept + { + reset(pointer()); + } /// Exchange the pointer and deleter with another object. void @@ -597,27 +656,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Disable copy from lvalue. unique_ptr(const unique_ptr&) = delete; unique_ptr& operator=(const unique_ptr&) = delete; - - // Disable construction from convertible pointer types. - template, - is_convertible<_Up*, pointer>, __is_derived_Tp<_Up>>> - unique_ptr(_Up*, typename - conditional::value, - deleter_type, const deleter_type&>::type) = delete; - - // Disable construction from convertible pointer types. - template, - is_convertible<_Up*, pointer>, __is_derived_Tp<_Up>>> - unique_ptr(_Up*, typename - remove_reference::type&&) = delete; }; template - inline void + inline +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + // Constrained free swap overload, see p0185r1 + typename enable_if<__is_swappable<_Dp>::value>::type +#else + void +#endif swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) noexcept { __x.swap(__y); } +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + template + typename enable_if::value>::type + swap(unique_ptr<_Tp, _Dp>&, + unique_ptr<_Tp, _Dp>&) = delete; +#endif + template inline bool @@ -732,7 +791,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// std::hash specialization for unique_ptr. template struct hash> - : public __hash_base> + : public __hash_base>, + private __poison_hash::pointer> { size_t operator()(const unique_ptr<_Tp, _Dp>& __u) const noexcept diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/unordered_map.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/unordered_map.h similarity index 77% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/unordered_map.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/unordered_map.h index 3c434abb6..4ef30cccc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/unordered_map.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/unordered_map.h @@ -1,6 +1,6 @@ // unordered_map implementation -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -68,6 +68,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr>; + template + class unordered_multimap; + /** * @brief A standard container composed of unique keys (containing * at most one of each key value) that associates values of another type @@ -126,6 +129,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef typename _Hashtable::difference_type difference_type; //@} +#if __cplusplus > 201402L + using node_type = typename _Hashtable::node_type; + using insert_return_type = typename _Hashtable::insert_return_type; +#endif + //construct/destroy/copy /// Default constructor. @@ -274,7 +282,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %unordered_map and * that the resulting %unordered_map's size is the same as the number - * of elements assigned. Old data may be lost. + * of elements assigned. */ unordered_map& operator=(initializer_list __l) @@ -283,8 +291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER return *this; } - /// Returns the allocator object with which the %unordered_map was - /// constructed. + /// Returns the allocator object used by the %unordered_map. allocator_type get_allocator() const noexcept { return _M_h.get_allocator(); } @@ -410,6 +417,145 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER emplace_hint(const_iterator __pos, _Args&&... __args) { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } +#if __cplusplus > 201402L + /// Extract a node. + node_type + extract(const_iterator __pos) + { + __glibcxx_assert(__pos != end()); + return _M_h.extract(__pos); + } + + /// Extract a node. + node_type + extract(const key_type& __key) + { return _M_h.extract(__key); } + + /// Re-insert an extracted node. + insert_return_type + insert(node_type&& __nh) + { return _M_h._M_reinsert_node(std::move(__nh)); } + + /// Re-insert an extracted node. + iterator + insert(const_iterator, node_type&& __nh) + { return _M_h._M_reinsert_node(std::move(__nh)).position; } + +#define __cpp_lib_unordered_map_try_emplace 201411 + /** + * @brief Attempts to build and insert a std::pair into the + * %unordered_map. + * + * @param __k Key to use for finding a possibly existing pair in + * the unordered_map. + * @param __args Arguments used to generate the .second for a + * new pair instance. + * + * @return A pair, of which the first element is an iterator that points + * to the possibly inserted pair, and the second is a bool that + * is true if the pair was actually inserted. + * + * This function attempts to build and insert a (key, value) %pair into + * the %unordered_map. + * An %unordered_map relies on unique keys and thus a %pair is only + * inserted if its first element (the key) is not already present in the + * %unordered_map. + * If a %pair is not inserted, this function has no effect. + * + * Insertion requires amortized constant time. + */ + template + pair + try_emplace(const key_type& __k, _Args&&... __args) + { + iterator __i = find(__k); + if (__i == end()) + { + __i = emplace(std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple( + std::forward<_Args>(__args)...)) + .first; + return {__i, true}; + } + return {__i, false}; + } + + // move-capable overload + template + pair + try_emplace(key_type&& __k, _Args&&... __args) + { + iterator __i = find(__k); + if (__i == end()) + { + __i = emplace(std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple( + std::forward<_Args>(__args)...)) + .first; + return {__i, true}; + } + return {__i, false}; + } + + /** + * @brief Attempts to build and insert a std::pair into the + * %unordered_map. + * + * @param __hint An iterator that serves as a hint as to where the pair + * should be inserted. + * @param __k Key to use for finding a possibly existing pair in + * the unordered_map. + * @param __args Arguments used to generate the .second for a + * new pair instance. + * @return An iterator that points to the element with key of the + * std::pair built from @a __args (may or may not be that + * std::pair). + * + * This function is not concerned about whether the insertion took place, + * and thus does not return a boolean like the single-argument emplace() + * does. However, if insertion did not take place, + * this function has no effect. + * Note that the first parameter is only a hint and can potentially + * improve the performance of the insertion process. A bad hint would + * cause no gains in efficiency. + * + * See + * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints + * for more on @a hinting. + * + * Insertion requires amortized constant time. + */ + template + iterator + try_emplace(const_iterator __hint, const key_type& __k, + _Args&&... __args) + { + iterator __i = find(__k); + if (__i == end()) + __i = emplace_hint(__hint, std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple( + std::forward<_Args>(__args)...)); + return __i; + } + + // move-capable overload + template + iterator + try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args) + { + iterator __i = find(__k); + if (__i == end()) + __i = emplace_hint(__hint, std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple( + std::forward<_Args>(__args)...)); + return __i; + } +#endif // C++17 + //@{ /** * @brief Attempts to insert a std::pair into the %unordered_map. @@ -499,6 +645,125 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER insert(initializer_list __l) { _M_h.insert(__l); } + +#if __cplusplus > 201402L +#define __cpp_lib_unordered_map_insertion 201411 + /** + * @brief Attempts to insert a std::pair into the %unordered_map. + * @param __k Key to use for finding a possibly existing pair in + * the map. + * @param __obj Argument used to generate the .second for a pair + * instance. + * + * @return A pair, of which the first element is an iterator that + * points to the possibly inserted pair, and the second is + * a bool that is true if the pair was actually inserted. + * + * This function attempts to insert a (key, value) %pair into the + * %unordered_map. An %unordered_map relies on unique keys and thus a + * %pair is only inserted if its first element (the key) is not already + * present in the %unordered_map. + * If the %pair was already in the %unordered_map, the .second of + * the %pair is assigned from __obj. + * + * Insertion requires amortized constant time. + */ + template + pair + insert_or_assign(const key_type& __k, _Obj&& __obj) + { + iterator __i = find(__k); + if (__i == end()) + { + __i = emplace(std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple(std::forward<_Obj>(__obj))) + .first; + return {__i, true}; + } + (*__i).second = std::forward<_Obj>(__obj); + return {__i, false}; + } + + // move-capable overload + template + pair + insert_or_assign(key_type&& __k, _Obj&& __obj) + { + iterator __i = find(__k); + if (__i == end()) + { + __i = emplace(std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple(std::forward<_Obj>(__obj))) + .first; + return {__i, true}; + } + (*__i).second = std::forward<_Obj>(__obj); + return {__i, false}; + } + + /** + * @brief Attempts to insert a std::pair into the %unordered_map. + * @param __hint An iterator that serves as a hint as to where the + * pair should be inserted. + * @param __k Key to use for finding a possibly existing pair in + * the unordered_map. + * @param __obj Argument used to generate the .second for a pair + * instance. + * @return An iterator that points to the element with key of + * @a __x (may or may not be the %pair passed in). + * + * This function is not concerned about whether the insertion took place, + * and thus does not return a boolean like the single-argument insert() + * does. + * If the %pair was already in the %unordered map, the .second of + * the %pair is assigned from __obj. + * Note that the first parameter is only a hint and can + * potentially improve the performance of the insertion process. A bad + * hint would cause no gains in efficiency. + * + * See + * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints + * for more on @a hinting. + * + * Insertion requires amortized constant time. + */ + template + iterator + insert_or_assign(const_iterator __hint, const key_type& __k, + _Obj&& __obj) + { + iterator __i = find(__k); + if (__i == end()) + { + return emplace_hint(__hint, std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple( + std::forward<_Obj>(__obj))); + } + (*__i).second = std::forward<_Obj>(__obj); + return __i; + } + + // move-capable overload + template + iterator + insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj) + { + iterator __i = find(__k); + if (__i == end()) + { + return emplace_hint(__hint, std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple( + std::forward<_Obj>(__obj))); + } + (*__i).second = std::forward<_Obj>(__obj); + return __i; + } +#endif + //@{ /** * @brief Erases an element from an %unordered_map. @@ -582,6 +847,37 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER noexcept( noexcept(_M_h.swap(__x._M_h)) ) { _M_h.swap(__x._M_h); } +#if __cplusplus > 201402L + template + friend class _Hash_merge_helper; + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper = _Hash_merge_helper; + _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper = _Hash_merge_helper; + _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } +#endif // C++17 + // observers. /// Returns the hash functor object with which the %unordered_map was @@ -817,8 +1113,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template friend bool - operator==(const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, - const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&); + operator==(const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, + const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&); }; /** @@ -879,6 +1175,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef typename _Hashtable::difference_type difference_type; //@} +#if __cplusplus > 201402L + using node_type = typename _Hashtable::node_type; +#endif + //construct/destroy/copy /// Default constructor. @@ -1022,12 +1322,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief %Unordered_multimap list assignment operator. * @param __l An initializer_list. * - * This function fills an %unordered_multimap with copies of the elements - * in the initializer list @a __l. + * This function fills an %unordered_multimap with copies of the + * elements in the initializer list @a __l. * * Note that the assignment completely changes the %unordered_multimap * and that the resulting %unordered_multimap's size is the same as the - * number of elements assigned. Old data may be lost. + * number of elements assigned. */ unordered_multimap& operator=(initializer_list __l) @@ -1036,8 +1336,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER return *this; } - /// Returns the allocator object with which the %unordered_multimap was - /// constructed. + /// Returns the allocator object used by the %unordered_multimap. allocator_type get_allocator() const noexcept { return _M_h.get_allocator(); } @@ -1234,6 +1533,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER insert(initializer_list __l) { _M_h.insert(__l); } +#if __cplusplus > 201402L + /// Extract a node. + node_type + extract(const_iterator __pos) + { + __glibcxx_assert(__pos != end()); + return _M_h.extract(__pos); + } + + /// Extract a node. + node_type + extract(const key_type& __key) + { return _M_h.extract(__key); } + + /// Re-insert an extracted node. + iterator + insert(node_type&& __nh) + { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); } + + /// Re-insert an extracted node. + iterator + insert(const_iterator __hint, node_type&& __nh) + { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); } +#endif // C++17 + //@{ /** * @brief Erases an element from an %unordered_multimap. @@ -1317,6 +1641,39 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER noexcept( noexcept(_M_h.swap(__x._M_h)) ) { _M_h.swap(__x._M_h); } +#if __cplusplus > 201402L + template + friend class _Hash_merge_helper; + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper + = _Hash_merge_helper; + _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper + = _Hash_merge_helper; + _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } +#endif // C++17 + // observers. /// Returns the hash functor object with which the %unordered_multimap @@ -1517,12 +1874,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER inline void swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template inline void swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template @@ -1550,6 +1909,59 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { return !(__x == __y); } _GLIBCXX_END_NAMESPACE_CONTAINER + +#if __cplusplus > 201402L +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Allow std::unordered_map access to internals of compatible maps. + template + struct _Hash_merge_helper< + _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>, + _Hash2, _Eq2> + { + private: + template + using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; + template + using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; + + friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>; + + static auto& + _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + + static auto& + _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + }; + + // Allow std::unordered_multimap access to internals of compatible maps. + template + struct _Hash_merge_helper< + _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>, + _Hash2, _Eq2> + { + private: + template + using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; + template + using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; + + friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>; + + static auto& + _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + + static auto& + _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + }; +_GLIBCXX_END_NAMESPACE_VERSION +#endif // C++17 + } // namespace std #endif /* _UNORDERED_MAP_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/unordered_set.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/unordered_set.h similarity index 89% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/unordered_set.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/unordered_set.h index 664d97ef2..85c2562f8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/unordered_set.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/unordered_set.h @@ -1,6 +1,6 @@ // unordered_set implementation -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -65,6 +65,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr>; + template + class unordered_multiset; + /** * @brief A standard container composed of unique keys (containing * at most one of each key value) in which the elements' keys are @@ -120,6 +123,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef typename _Hashtable::difference_type difference_type; //@} +#if __cplusplus > 201402L + using node_type = typename _Hashtable::node_type; + using insert_return_type = typename _Hashtable::insert_return_type; +#endif + // construct/destroy/copy /// Default constructor. @@ -268,7 +276,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %unordered_set and * that the resulting %unordered_set's size is the same as the number - * of elements assigned. Old data may be lost. + * of elements assigned. */ unordered_set& operator=(initializer_list __l) @@ -277,8 +285,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER return *this; } - /// Returns the allocator object with which the %unordered_set was - /// constructed. + /// Returns the allocator object used by the %unordered_set. allocator_type get_allocator() const noexcept { return _M_h.get_allocator(); } @@ -471,6 +478,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER insert(initializer_list __l) { _M_h.insert(__l); } +#if __cplusplus > 201402L + /// Extract a node. + node_type + extract(const_iterator __pos) + { + __glibcxx_assert(__pos != end()); + return _M_h.extract(__pos); + } + + /// Extract a node. + node_type + extract(const key_type& __key) + { return _M_h.extract(__key); } + + /// Re-insert an extracted node. + insert_return_type + insert(node_type&& __nh) + { return _M_h._M_reinsert_node(std::move(__nh)); } + + /// Re-insert an extracted node. + iterator + insert(const_iterator, node_type&& __nh) + { return _M_h._M_reinsert_node(std::move(__nh)).position; } +#endif // C++17 + //@{ /** * @brief Erases an element from an %unordered_set. @@ -553,6 +585,37 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER noexcept( noexcept(_M_h.swap(__x._M_h)) ) { _M_h.swap(__x._M_h); } +#if __cplusplus > 201402L + template + friend class _Hash_merge_helper; + + template + void + merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper = _Hash_merge_helper; + _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper = _Hash_merge_helper; + _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) + { merge(__source); } +#endif // C++17 + // observers. /// Returns the hash functor object with which the %unordered_set was @@ -794,6 +857,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef typename _Hashtable::difference_type difference_type; //@} +#if __cplusplus > 201402L + using node_type = typename _Hashtable::node_type; +#endif + // construct/destroy/copy /// Default constructor. @@ -942,7 +1009,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * Note that the assignment completely changes the %unordered_multiset * and that the resulting %unordered_multiset's size is the same as the - * number of elements assigned. Old data may be lost. + * number of elements assigned. */ unordered_multiset& operator=(initializer_list __l) @@ -951,8 +1018,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER return *this; } - /// Returns the allocator object with which the %unordered_multiset was - /// constructed. + /// Returns the allocator object used by the %unordered_multiset. allocator_type get_allocator() const noexcept { return _M_h.get_allocator(); } @@ -1123,6 +1189,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER insert(initializer_list __l) { _M_h.insert(__l); } +#if __cplusplus > 201402L + /// Extract a node. + node_type + extract(const_iterator __pos) + { + __glibcxx_assert(__pos != end()); + return _M_h.extract(__pos); + } + + /// Extract a node. + node_type + extract(const key_type& __key) + { return _M_h.extract(__key); } + + /// Re-insert an extracted node. + iterator + insert(node_type&& __nh) + { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); } + + /// Re-insert an extracted node. + iterator + insert(const_iterator __hint, node_type&& __nh) + { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); } +#endif // C++17 + //@{ /** * @brief Erases an element from an %unordered_multiset. @@ -1210,6 +1301,39 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER noexcept( noexcept(_M_h.swap(__x._M_h)) ) { _M_h.swap(__x._M_h); } +#if __cplusplus > 201402L + template + friend class _Hash_merge_helper; + + template + void + merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper + = _Hash_merge_helper; + _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper + = _Hash_merge_helper; + _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) + { merge(__source); } +#endif // C++17 + // observers. /// Returns the hash functor object with which the %unordered_multiset @@ -1396,12 +1520,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER inline void swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template inline void swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template @@ -1429,6 +1555,58 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { return !(__x == __y); } _GLIBCXX_END_NAMESPACE_CONTAINER + +#if __cplusplus > 201402L +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Allow std::unordered_set access to internals of compatible sets. + template + struct _Hash_merge_helper< + _GLIBCXX_STD_C::unordered_set<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2> + { + private: + template + using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>; + template + using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>; + + friend unordered_set<_Val, _Hash1, _Eq1, _Alloc>; + + static auto& + _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) + { return __set._M_h; } + + static auto& + _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) + { return __set._M_h; } + }; + + // Allow std::unordered_multiset access to internals of compatible sets. + template + struct _Hash_merge_helper< + _GLIBCXX_STD_C::unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>, + _Hash2, _Eq2> + { + private: + template + using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>; + template + using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>; + + friend unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>; + + static auto& + _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) + { return __set._M_h; } + + static auto& + _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) + { return __set._M_h; } + }; +_GLIBCXX_END_NAMESPACE_VERSION +#endif // C++17 + } // namespace std #endif /* _UNORDERED_SET_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/uses_allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/uses_allocator.h new file mode 100644 index 000000000..89d4e4356 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/uses_allocator.h @@ -0,0 +1,181 @@ +// Uses-allocator Construction -*- C++ -*- + +// Copyright (C) 2010-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +#ifndef _USES_ALLOCATOR_H +#define _USES_ALLOCATOR_H 1 + +#if __cplusplus < 201103L +# include +#else + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + struct __erased_type { }; + + template + using __is_erased_or_convertible + = __or_, is_convertible<_Alloc, _Tp>>; + + /// [allocator.tag] + struct allocator_arg_t { explicit allocator_arg_t() = default; }; + + _GLIBCXX17_INLINE constexpr allocator_arg_t allocator_arg = + allocator_arg_t(); + + template> + struct __uses_allocator_helper + : false_type { }; + + template + struct __uses_allocator_helper<_Tp, _Alloc, + __void_t> + : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type + { }; + + /// [allocator.uses.trait] + template + struct uses_allocator + : __uses_allocator_helper<_Tp, _Alloc>::type + { }; + + struct __uses_alloc_base { }; + + struct __uses_alloc0 : __uses_alloc_base + { + struct _Sink { void operator=(const void*) { } } _M_a; + }; + + template + struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; + + template + struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; + + template + struct __uses_alloc; + + template + struct __uses_alloc + : conditional< + is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value, + __uses_alloc1<_Alloc>, + __uses_alloc2<_Alloc>>::type + { + static_assert(__or_< + is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>, + is_constructible<_Tp, _Args..., _Alloc>>::value, "construction with" + " an allocator must be possible if uses_allocator is true"); + }; + + template + struct __uses_alloc + : __uses_alloc0 { }; + + template + using __uses_alloc_t = + __uses_alloc::value, _Tp, _Alloc, _Args...>; + + template + inline __uses_alloc_t<_Tp, _Alloc, _Args...> + __use_alloc(const _Alloc& __a) + { + __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; + __ret._M_a = std::__addressof(__a); + return __ret; + } +#if __cplusplus > 201402L + template + inline constexpr bool uses_allocator_v = + uses_allocator<_Tp, _Alloc>::value; +#endif // C++17 + + template class _Predicate, + typename _Tp, typename _Alloc, typename... _Args> + struct __is_uses_allocator_predicate + : conditional::value, + __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, + _Predicate<_Tp, _Args..., _Alloc>>, + _Predicate<_Tp, _Args...>>::type { }; + + template + struct __is_uses_allocator_constructible + : __is_uses_allocator_predicate + { }; + +#if __cplusplus >= 201402L + template + _GLIBCXX17_INLINE constexpr bool __is_uses_allocator_constructible_v = + __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; +#endif // C++14 + + template + struct __is_nothrow_uses_allocator_constructible + : __is_uses_allocator_predicate + { }; + + +#if __cplusplus >= 201402L + template + _GLIBCXX17_INLINE constexpr bool + __is_nothrow_uses_allocator_constructible_v = + __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; +#endif // C++14 + + template + void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr, + _Args&&... __args) + { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); } + + template + void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, + _Args&&... __args) + { + ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a, + std::forward<_Args>(__args)...); + } + + template + void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, + _Args&&... __args) + { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)..., *__a._M_a); } + + template + void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, + _Args&&... __args) + { + __uses_allocator_construct_impl(__use_alloc<_Tp, _Alloc, _Args...>(__a), + __ptr, std::forward<_Args>(__args)...); + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_after.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_after.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_after.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_after.h index 0c02ed156..54ba7fed6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_after.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_after.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- internal _Meta class. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_array.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_array.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_array.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_array.h index 307dbf834..f169edd97 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_array.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_array.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- internal _Array helper class. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_array.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_array.tcc similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_array.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_array.tcc index 7a2d285e2..9879c5281 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_array.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_array.tcc @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- internal _Array helper class. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_before.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_before.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_before.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_before.h index 6cc95747f..67603e109 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/valarray_before.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/valarray_before.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- internal _Meta class. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -331,14 +331,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return pow(__x, __y); } }; + template + struct __fun_with_valarray + { + typedef _Tp result_type; + }; + + template + struct __fun_with_valarray<_Tp, false> + { + // No result type defined for invalid value types. + }; // We need these bits in order to recover the return type of // some functions/operators now that we're no longer using // function templates. template - struct __fun + struct __fun : __fun_with_valarray<_Tp> { - typedef _Tp result_type; }; // several specializations for relational operators. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/vector.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/vector.tcc similarity index 81% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bits/vector.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bits/vector.tcc index 34118a456..8d688661c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bits/vector.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bits/vector.tcc @@ -1,6 +1,6 @@ // Vector implementation (out of line) -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -87,7 +87,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #if __cplusplus >= 201103L template template +#if __cplusplus > 201402L + typename vector<_Tp, _Alloc>::reference +#else void +#endif vector<_Tp, _Alloc>:: emplace_back(_Args&&... __args) { @@ -98,7 +102,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ++this->_M_impl._M_finish; } else - _M_emplace_back_aux(std::forward<_Args>(__args)...); + _M_realloc_insert(end(), std::forward<_Args>(__args)...); +#if __cplusplus > 201402L + return back(); +#endif } #endif @@ -112,27 +119,32 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #endif { const size_type __n = __position - begin(); - if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage - && __position == end()) - { - _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, __x); - ++this->_M_impl._M_finish; - } - else - { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + if (__position == end()) + { + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + __x); + ++this->_M_impl._M_finish; + } + else + { #if __cplusplus >= 201103L - const auto __pos = begin() + (__position - cbegin()); - if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) - { - _Tp __x_copy = __x; - _M_insert_aux(__pos, std::move(__x_copy)); - } - else - _M_insert_aux(__pos, __x); + const auto __pos = begin() + (__position - cbegin()); + // __x could be an existing element of this vector, so make a + // copy of it before _M_insert_aux moves elements around. + _Temporary_value __x_copy(this, __x); + _M_insert_aux(__pos, std::move(__x_copy._M_val())); #else _M_insert_aux(__position, __x); #endif - } + } + else +#if __cplusplus >= 201103L + _M_realloc_insert(begin() + (__position - cbegin()), __x); +#else + _M_realloc_insert(__position, __x); +#endif + return iterator(this->_M_impl._M_start + __n); } @@ -256,7 +268,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER if (__first == __last) _M_erase_at_end(__cur); else - insert(end(), __first, __last); + _M_range_insert(end(), __first, __last, + std::__iterator_category(__first)); } template @@ -296,30 +309,60 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #if __cplusplus >= 201103L template - template - typename vector<_Tp, _Alloc>::iterator - vector<_Tp, _Alloc>:: - emplace(const_iterator __position, _Args&&... __args) - { - const size_type __n = __position - begin(); - if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage - && __position == end()) + auto + vector<_Tp, _Alloc>:: + _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator + { + const auto __n = __position - cbegin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + if (__position == cend()) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, - std::forward<_Args>(__args)...); + std::move(__v)); ++this->_M_impl._M_finish; } else - _M_insert_aux(begin() + (__position - cbegin()), - std::forward<_Args>(__args)...); + _M_insert_aux(begin() + __n, std::move(__v)); + else + _M_realloc_insert(begin() + __n, std::move(__v)); + + return iterator(this->_M_impl._M_start + __n); + } + + template + template + auto + vector<_Tp, _Alloc>:: + _M_emplace_aux(const_iterator __position, _Args&&... __args) + -> iterator + { + const auto __n = __position - cbegin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + if (__position == cend()) + { + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + std::forward<_Args>(__args)...); + ++this->_M_impl._M_finish; + } + else + { + // We need to construct a temporary because something in __args... + // could alias one of the elements of the container and so we + // need to use it before _M_insert_aux moves elements around. + _Temporary_value __tmp(this, std::forward<_Args>(__args)...); + _M_insert_aux(begin() + __n, std::move(__tmp._M_val())); + } + else + _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...); + return iterator(this->_M_impl._M_start + __n); } template - template + template void vector<_Tp, _Alloc>:: - _M_insert_aux(iterator __position, _Args&&... __args) + _M_insert_aux(iterator __position, _Arg&& __arg) #else template void @@ -327,77 +370,21 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _M_insert_aux(iterator __position, const _Tp& __x) #endif { - if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) - { - _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, - _GLIBCXX_MOVE(*(this->_M_impl._M_finish - - 1))); - ++this->_M_impl._M_finish; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + _GLIBCXX_MOVE(*(this->_M_impl._M_finish + - 1))); + ++this->_M_impl._M_finish; #if __cplusplus < 201103L - _Tp __x_copy = __x; + _Tp __x_copy = __x; #endif - _GLIBCXX_MOVE_BACKWARD3(__position.base(), - this->_M_impl._M_finish - 2, - this->_M_impl._M_finish - 1); + _GLIBCXX_MOVE_BACKWARD3(__position.base(), + this->_M_impl._M_finish - 2, + this->_M_impl._M_finish - 1); #if __cplusplus < 201103L - *__position = __x_copy; + *__position = __x_copy; #else - *__position = _Tp(std::forward<_Args>(__args)...); + *__position = std::forward<_Arg>(__arg); #endif - } - else - { - const size_type __len = - _M_check_len(size_type(1), "vector::_M_insert_aux"); - const size_type __elems_before = __position - begin(); - pointer __new_start(this->_M_allocate(__len)); - pointer __new_finish(__new_start); - __try - { - // The order of the three operations is dictated by the C++0x - // case, where the moves could alter a new element belonging - // to the existing vector. This is an issue only for callers - // taking the element by const lvalue ref (see 23.1/13). - _Alloc_traits::construct(this->_M_impl, - __new_start + __elems_before, -#if __cplusplus >= 201103L - std::forward<_Args>(__args)...); -#else - __x); -#endif - __new_finish = pointer(); - - __new_finish - = std::__uninitialized_move_if_noexcept_a - (this->_M_impl._M_start, __position.base(), - __new_start, _M_get_Tp_allocator()); - - ++__new_finish; - - __new_finish - = std::__uninitialized_move_if_noexcept_a - (__position.base(), this->_M_impl._M_finish, - __new_finish, _M_get_Tp_allocator()); - } - __catch(...) - { - if (!__new_finish) - _Alloc_traits::destroy(this->_M_impl, - __new_start + __elems_before); - else - std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); - _M_deallocate(__new_start, __len); - __throw_exception_again; - } - std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, - _M_get_Tp_allocator()); - _M_deallocate(this->_M_impl._M_start, - this->_M_impl._M_end_of_storage - - this->_M_impl._M_start); - this->_M_impl._M_start = __new_start; - this->_M_impl._M_finish = __new_finish; - this->_M_impl._M_end_of_storage = __new_start + __len; - } } #if __cplusplus >= 201103L @@ -405,44 +392,66 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template void vector<_Tp, _Alloc>:: - _M_emplace_back_aux(_Args&&... __args) - { - const size_type __len = - _M_check_len(size_type(1), "vector::_M_emplace_back_aux"); - pointer __new_start(this->_M_allocate(__len)); - pointer __new_finish(__new_start); - __try - { - _Alloc_traits::construct(this->_M_impl, __new_start + size(), - std::forward<_Args>(__args)...); - __new_finish = pointer(); - - __new_finish - = std::__uninitialized_move_if_noexcept_a - (this->_M_impl._M_start, this->_M_impl._M_finish, - __new_start, _M_get_Tp_allocator()); - - ++__new_finish; - } - __catch(...) - { - if (!__new_finish) - _Alloc_traits::destroy(this->_M_impl, __new_start + size()); - else - std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); - _M_deallocate(__new_start, __len); - __throw_exception_again; - } - std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, - _M_get_Tp_allocator()); - _M_deallocate(this->_M_impl._M_start, - this->_M_impl._M_end_of_storage - - this->_M_impl._M_start); - this->_M_impl._M_start = __new_start; - this->_M_impl._M_finish = __new_finish; - this->_M_impl._M_end_of_storage = __new_start + __len; - } + _M_realloc_insert(iterator __position, _Args&&... __args) +#else + template + void + vector<_Tp, _Alloc>:: + _M_realloc_insert(iterator __position, const _Tp& __x) #endif + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_realloc_insert"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + __try + { + // The order of the three operations is dictated by the C++11 + // case, where the moves could alter a new element belonging + // to the existing vector. This is an issue only for callers + // taking the element by lvalue ref (see last bullet of C++11 + // [res.on.arguments]). + _Alloc_traits::construct(this->_M_impl, + __new_start + __elems_before, +#if __cplusplus >= 201103L + std::forward<_Args>(__args)...); +#else + __x); +#endif + __new_finish = pointer(); + + __new_finish + = std::__uninitialized_move_if_noexcept_a + (this->_M_impl._M_start, __position.base(), + __new_start, _M_get_Tp_allocator()); + + ++__new_finish; + + __new_finish + = std::__uninitialized_move_if_noexcept_a + (__position.base(), this->_M_impl._M_finish, + __new_finish, _M_get_Tp_allocator()); + } + __catch(...) + { + if (!__new_finish) + _Alloc_traits::destroy(this->_M_impl, + __new_start + __elems_before); + else + std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + __throw_exception_again; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } template void @@ -454,7 +463,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { +#if __cplusplus < 201103L value_type __x_copy = __x; +#else + _Temporary_value __tmp(this, __x); + value_type& __x_copy = __tmp._M_val(); +#endif const size_type __elems_after = end() - __position; pointer __old_finish(this->_M_impl._M_finish); if (__elems_after > __n) @@ -492,7 +506,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER pointer __new_finish(__new_start); __try { - // See _M_insert_aux above. + // See _M_realloc_insert above. std::__uninitialized_fill_n_a(__new_start + __elems_before, __n, __x, _M_get_Tp_allocator()); @@ -701,9 +715,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { _Bit_pointer __q = this->_M_allocate(__n); iterator __start(std::__addressof(*__q), 0); - this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), __start); + iterator __finish(_M_copy_aligned(begin(), end(), __start)); this->_M_deallocate(); this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; this->_M_impl._M_end_of_storage = __q + _S_nword(__n); } @@ -729,11 +744,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER iterator __start(std::__addressof(*__q), 0); iterator __i = _M_copy_aligned(begin(), __position, __start); std::fill(__i, __i + difference_type(__n), __x); - this->_M_impl._M_finish = std::copy(__position, end(), - __i + difference_type(__n)); + iterator __finish = std::copy(__position, end(), + __i + difference_type(__n)); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; } } @@ -763,10 +779,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER iterator __start(std::__addressof(*__q), 0); iterator __i = _M_copy_aligned(begin(), __position, __start); __i = std::copy(__first, __last, __i); - this->_M_impl._M_finish = std::copy(__position, end(), __i); + iterator __finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; } } } @@ -791,10 +808,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER iterator __start(std::__addressof(*__q), 0); iterator __i = _M_copy_aligned(begin(), __position, __start); *__i++ = __x; - this->_M_impl._M_finish = std::copy(__position, end(), __i); + iterator __finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; } } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/bitset b/devkitARM/arm-none-eabi/include/c++/7.1.0/bitset similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/bitset rename to devkitARM/arm-none-eabi/include/c++/7.1.0/bitset index d6be839bd..382886ca2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/bitset +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/bitset @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -245,7 +245,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _M_w[__n] = _M_w[__n - __wshift]; else { - const size_t __sub_offset = (_GLIBCXX_BITSET_BITS_PER_WORD + const size_t __sub_offset = (_GLIBCXX_BITSET_BITS_PER_WORD - __offset); for (size_t __n = _Nw - 1; __n > __wshift; --__n) _M_w[__n] = ((_M_w[__n - __wshift] << __offset) @@ -279,7 +279,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER | (_M_w[__n + __wshift + 1] << __sub_offset)); _M_w[__limit] = _M_w[_Nw-1] >> __offset; } - + std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0)); } } @@ -556,7 +556,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _WordT& _M_getword(size_t) _GLIBCXX_NOEXCEPT { - __throw_out_of_range(__N("_Base_bitset::_M_getword")); + __throw_out_of_range(__N("_Base_bitset::_M_getword")); return *new _WordT; } @@ -659,11 +659,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef unsigned long _WordT; static void - _S_do_sanitize(_WordT) _GLIBCXX_NOEXCEPT { } + _S_do_sanitize(_WordT) _GLIBCXX_NOEXCEPT { } }; #if __cplusplus >= 201103L - template + template struct _Sanitize_val { static constexpr unsigned long long @@ -681,8 +681,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #endif /** - * @class bitset - * * @brief The %bitset class represents a @e fixed-size sequence of bits. * @ingroup utilities * @@ -775,7 +773,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER void _M_do_sanitize() _GLIBCXX_NOEXCEPT - { + { typedef _Sanitize<_Nb % _GLIBCXX_BITSET_BITS_PER_WORD> __sanitize_type; __sanitize_type::_S_do_sanitize(this->_M_hiword()); } @@ -803,10 +801,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _WordT* _M_wp; size_t _M_bpos; - + // left undefined reference(); - + public: reference(bitset& __b, size_t __pos) _GLIBCXX_NOEXCEPT { @@ -983,7 +981,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER return *this; } //@} - + //@{ /** * Operations on bitsets. @@ -1017,7 +1015,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER return *this; } //@} - + //@{ /** * These versions of single-bit set, reset, flip, and test are @@ -1060,7 +1058,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos)) != static_cast<_WordT>(0)); } //@} - + // Set, reset, and flip. /** * @brief Sets every bit to true. @@ -1109,7 +1107,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER this->_M_check(__position, __N("bitset::reset")); return _Unchecked_reset(__position); } - + /** * @brief Toggles every bit to its opposite value. */ @@ -1132,7 +1130,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER this->_M_check(__position, __N("bitset::flip")); return _Unchecked_flip(__position); } - + /// See the no-argument flip(). bitset<_Nb> operator~() const _GLIBCXX_NOEXCEPT @@ -1161,7 +1159,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER operator[](size_t __position) const { return _Unchecked_test(__position); } //@} - + /** * @brief Returns a numerical interpretation of the %bitset. * @return The integral equivalent of the bits. @@ -1304,7 +1302,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER operator!=(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT { return !this->_M_is_equal(__rhs); } //@} - + /** * @brief Tests the value of a bit. * @param __position The index of a bit. @@ -1354,7 +1352,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER operator>>(size_t __position) const _GLIBCXX_NOEXCEPT { return bitset<_Nb>(*this) >>= __position; } //@} - + /** * @brief Finds the index of the first "on" bit. * @return The index of the first bit set, or size() if not found. @@ -1484,7 +1482,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER for (size_t __i = _Nb; __i > 0; --__i) { static typename _Traits::int_type __eof = _Traits::eof(); - + typename _Traits::int_type __c1 = __is.rdbuf()->sbumpc(); if (_Traits::eq_int_type(__c1, __eof)) { @@ -1510,7 +1508,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER } __catch(__cxxabiv1::__forced_unwind&) { - __is._M_setstate(__ios_base::badbit); + __is._M_setstate(__ios_base::badbit); __throw_exception_again; } __catch(...) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cassert b/devkitARM/arm-none-eabi/include/c++/7.1.0/cassert similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cassert rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cassert index e555a3857..4b40751f3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cassert +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cassert @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -40,4 +40,5 @@ #pragma GCC system_header +#include #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ccomplex b/devkitARM/arm-none-eabi/include/c++/7.1.0/ccomplex similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ccomplex rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ccomplex index bb164dfc2..515c02c12 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ccomplex +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ccomplex @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -35,6 +35,8 @@ # include #endif +extern "C++" { #include +} #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cctype b/devkitARM/arm-none-eabi/include/c++/7.1.0/cctype similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cctype rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cctype index f7a1e5f50..6710ca940 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cctype +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cctype @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cerrno b/devkitARM/arm-none-eabi/include/c++/7.1.0/cerrno similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cerrno rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cerrno index 7060b1e1e..deee423e1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cerrno +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cerrno @@ -1,6 +1,6 @@ // The -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -38,6 +38,7 @@ #pragma GCC system_header +#include #include #ifndef _GLIBCXX_CERRNO diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cfenv b/devkitARM/arm-none-eabi/include/c++/7.1.0/cfenv similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cfenv rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cfenv index 5b6213168..e121f9faa 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cfenv +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cfenv @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cfloat b/devkitARM/arm-none-eabi/include/c++/7.1.0/cfloat similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cfloat rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cfloat index 2c4ae284c..903142c4d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cfloat +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cfloat @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -38,6 +38,7 @@ #pragma GCC system_header +#include #include #ifndef _GLIBCXX_CFLOAT diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/chrono b/devkitARM/arm-none-eabi/include/c++/7.1.0/chrono similarity index 88% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/chrono rename to devkitARM/arm-none-eabi/include/c++/7.1.0/chrono index 50a2bbfca..c3a6ba8f8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/chrono +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/chrono @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -72,7 +72,7 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION // 20.11.4.3 specialization of common_type (for duration, sfinae-friendly) - + template struct __duration_common_type_wrapper { @@ -98,7 +98,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { }; // 20.11.4.3 specialization of common_type (for time_point, sfinae-friendly) - + template struct __timepoint_common_type_wrapper { @@ -209,6 +209,68 @@ _GLIBCXX_END_NAMESPACE_VERSION : is_floating_point<_Rep> { }; +#if __cplusplus > 201402L + template + inline constexpr bool treat_as_floating_point_v = + treat_as_floating_point<_Rep>::value; +#endif // C++17 + +#if __cplusplus > 201402L +# define __cpp_lib_chrono 201510 + + template + constexpr enable_if_t<__is_duration<_ToDur>::value, _ToDur> + floor(const duration<_Rep, _Period>& __d) + { + auto __to = chrono::duration_cast<_ToDur>(__d); + if (__to > __d) + return __to - _ToDur{1}; + return __to; + } + + template + constexpr enable_if_t<__is_duration<_ToDur>::value, _ToDur> + ceil(const duration<_Rep, _Period>& __d) + { + auto __to = chrono::duration_cast<_ToDur>(__d); + if (__to < __d) + return __to + _ToDur{1}; + return __to; + } + + template + constexpr enable_if_t< + __and_<__is_duration<_ToDur>, + __not_>>::value, + _ToDur> + round(const duration<_Rep, _Period>& __d) + { + _ToDur __t0 = chrono::floor<_ToDur>(__d); + _ToDur __t1 = __t0 + _ToDur{1}; + auto __diff0 = __d - __t0; + auto __diff1 = __t1 - __d; + if (__diff0 == __diff1) + { + if (__t0.count() & 1) + return __t1; + return __t0; + } + else if (__diff0 < __diff1) + return __t0; + return __t1; + } + + template + constexpr + enable_if_t::is_signed, duration<_Rep, _Period>> + abs(duration<_Rep, _Period> __d) + { + if (__d >= __d.zero()) + return __d; + return -__d; + } +#endif // C++17 + /// duration_values template struct duration_values @@ -287,50 +349,50 @@ _GLIBCXX_END_NAMESPACE_VERSION operator-() const { return duration(-__r); } - duration& + _GLIBCXX17_CONSTEXPR duration& operator++() { ++__r; return *this; } - duration + _GLIBCXX17_CONSTEXPR duration operator++(int) { return duration(__r++); } - duration& + _GLIBCXX17_CONSTEXPR duration& operator--() { --__r; return *this; } - duration + _GLIBCXX17_CONSTEXPR duration operator--(int) { return duration(__r--); } - duration& + _GLIBCXX17_CONSTEXPR duration& operator+=(const duration& __d) { __r += __d.count(); return *this; } - duration& + _GLIBCXX17_CONSTEXPR duration& operator-=(const duration& __d) { __r -= __d.count(); return *this; } - duration& + _GLIBCXX17_CONSTEXPR duration& operator*=(const rep& __rhs) { __r *= __rhs; return *this; } - duration& + _GLIBCXX17_CONSTEXPR duration& operator/=(const rep& __rhs) { __r /= __rhs; @@ -339,6 +401,7 @@ _GLIBCXX_END_NAMESPACE_VERSION // DR 934. template + _GLIBCXX17_CONSTEXPR typename enable_if::value, duration&>::type operator%=(const rep& __rhs) @@ -348,6 +411,7 @@ _GLIBCXX_END_NAMESPACE_VERSION } template + _GLIBCXX17_CONSTEXPR typename enable_if::value, duration&>::type operator%=(const duration& __d) @@ -569,14 +633,14 @@ _GLIBCXX_END_NAMESPACE_VERSION { return __d; } // arithmetic - time_point& + _GLIBCXX17_CONSTEXPR time_point& operator+=(const duration& __dur) { __d += __dur; return *this; } - time_point& + _GLIBCXX17_CONSTEXPR time_point& operator-=(const duration& __dur) { __d -= __dur; @@ -606,6 +670,37 @@ _GLIBCXX_END_NAMESPACE_VERSION return __time_point(duration_cast<_ToDur>(__t.time_since_epoch())); } +#if __cplusplus > 201402L + template + constexpr + enable_if_t<__is_duration<_ToDur>::value, time_point<_Clock, _ToDur>> + floor(const time_point<_Clock, _Dur>& __tp) + { + return time_point<_Clock, _ToDur>{ + chrono::floor<_ToDur>(__tp.time_since_epoch())}; + } + + template + constexpr + enable_if_t<__is_duration<_ToDur>::value, time_point<_Clock, _ToDur>> + ceil(const time_point<_Clock, _Dur>& __tp) + { + return time_point<_Clock, _ToDur>{ + chrono::ceil<_ToDur>(__tp.time_since_epoch())}; + } + + template + constexpr enable_if_t< + __and_<__is_duration<_ToDur>, + __not_>>::value, + time_point<_Clock, _ToDur>> + round(const time_point<_Clock, _Dur>& __tp) + { + return time_point<_Clock, _ToDur>{ + chrono::round<_ToDur>(__tp.time_since_epoch())}; + } +#endif // C++17 + template constexpr time_point<_Clock, @@ -625,11 +720,11 @@ _GLIBCXX_END_NAMESPACE_VERSION typename common_type, _Dur2>::type> operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Dur2>& __rhs) - { + { typedef duration<_Rep1, _Period1> __dur1; typedef typename common_type<__dur1,_Dur2>::type __ct; typedef time_point<_Clock, __ct> __time_point; - return __time_point(__rhs.time_since_epoch() + __lhs); + return __time_point(__rhs.time_since_epoch() + __lhs); } template>::type> operator-(const time_point<_Clock, _Dur1>& __lhs, const duration<_Rep2, _Period2>& __rhs) - { + { typedef duration<_Rep2, _Period2> __dur2; typedef typename common_type<_Dur1,__dur2>::type __ct; typedef time_point<_Clock, __ct> __time_point; - return __time_point(__lhs.time_since_epoch() -__rhs); + return __time_point(__lhs.time_since_epoch() -__rhs); } template @@ -688,10 +783,10 @@ _GLIBCXX_END_NAMESPACE_VERSION { return !(__lhs < __rhs); } - // Clocks. + // Clocks. - // Why nanosecond resolution as the default? - // Why have std::system_clock always count in the higest + // Why nanosecond resolution as the default? + // Why have std::system_clock always count in the highest // resolution (ie nanoseconds), even if on some OSes the low 3 // or 9 decimal digits will be always zero? This allows later // implementations to change the system_clock::now() @@ -788,6 +883,7 @@ _GLIBCXX_END_NAMESPACE_VERSION { inline namespace chrono_literals { + _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct _Checked_integral_constant @@ -863,6 +959,7 @@ _GLIBCXX_END_NAMESPACE_VERSION operator""ns() { return __check_overflow(); } + _GLIBCXX_END_NAMESPACE_VERSION } // inline namespace chrono_literals } // inline namespace literals diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cinttypes b/devkitARM/arm-none-eabi/include/c++/7.1.0/cinttypes similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cinttypes rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cinttypes index 5a72a5c82..4e5e80423 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cinttypes +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cinttypes @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ciso646 b/devkitARM/arm-none-eabi/include/c++/7.1.0/ciso646 similarity index 84% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ciso646 rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ciso646 index 818db67db..f603f59de 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ciso646 +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ciso646 @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -27,7 +27,12 @@ * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c iso646.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std (except for names which are defined - * as macros in C). + * which is empty in C++. */ +#ifndef _GLIBCXX_CISO646 +#define _GLIBCXX_CISO646 + +#pragma GCC system_header + +#include +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/climits b/devkitARM/arm-none-eabi/include/c++/7.1.0/climits similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/climits rename to devkitARM/arm-none-eabi/include/c++/7.1.0/climits index e3da66ce1..d92a1d860 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/climits +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/climits @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -38,6 +38,7 @@ #pragma GCC system_header +#include #include #ifndef _GLIBCXX_CLIMITS diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/clocale b/devkitARM/arm-none-eabi/include/c++/7.1.0/clocale similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/clocale rename to devkitARM/arm-none-eabi/include/c++/7.1.0/clocale index 95d17d273..a9d7445e8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/clocale +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/clocale @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cmath b/devkitARM/arm-none-eabi/include/c++/7.1.0/cmath similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cmath rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cmath index 4cafe5f7f..6e7508f69 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cmath +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cmath @@ -1,6 +1,6 @@ // -*- C++ -*- C forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -41,13 +41,15 @@ #include #include #include -#include +#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS +#include_next +#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS +#include #ifndef _GLIBCXX_CMATH #define _GLIBCXX_CMATH 1 // Get rid of those macros defined in in lieu of real functions. -#undef abs #undef div #undef acos #undef asin @@ -72,33 +74,12 @@ #undef tan #undef tanh +extern "C++" +{ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION -#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO - inline _GLIBCXX_CONSTEXPR double - abs(double __x) - { return __builtin_fabs(__x); } -#endif - -#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO - inline _GLIBCXX_CONSTEXPR float - abs(float __x) - { return __builtin_fabsf(__x); } - - inline _GLIBCXX_CONSTEXPR long double - abs(long double __x) - { return __builtin_fabsl(__x); } -#endif - - template - inline _GLIBCXX_CONSTEXPR - typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, - double>::__type - abs(_Tp __x) - { return __builtin_fabs(__x); } - using ::acos; #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO @@ -558,7 +539,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr int fpclassify(float __x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, @@ -575,13 +556,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION FP_SUBNORMAL, FP_ZERO, __x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, int>::__type fpclassify(_Tp __x) { return __x != 0 ? FP_NORMAL : FP_ZERO; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isfinite(float __x) { return __builtin_isfinite(__x); } @@ -595,53 +578,69 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isfinite(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isfinite(_Tp __x) { return true; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isinf(float __x) { return __builtin_isinf(__x); } +#if _GLIBCXX_HAVE_OBSOLETE_ISINF \ + && !_GLIBCXX_NO_OBSOLETE_ISINF_ISNAN_DYNAMIC + using ::isinf; +#else constexpr bool isinf(double __x) { return __builtin_isinf(__x); } +#endif constexpr bool isinf(long double __x) { return __builtin_isinf(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isinf(_Tp __x) { return false; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isnan(float __x) { return __builtin_isnan(__x); } +#if _GLIBCXX_HAVE_OBSOLETE_ISNAN \ + && !_GLIBCXX_NO_OBSOLETE_ISINF_ISNAN_DYNAMIC + using ::isnan; +#else constexpr bool isnan(double __x) { return __builtin_isnan(__x); } +#endif constexpr bool isnan(long double __x) { return __builtin_isnan(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isnan(_Tp __x) { return false; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isnormal(float __x) { return __builtin_isnormal(__x); } @@ -655,17 +654,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isnormal(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isnormal(_Tp __x) { return __x != 0 ? true : false; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO - // The front-end doesn't provide a type generic builtin (libstdc++/58625). +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP + // Note: middle-end/36757 is fixed, __builtin_signbit is type-generic. constexpr bool signbit(float __x) - { return __builtin_signbitf(__x); } + { return __builtin_signbit(__x); } constexpr bool signbit(double __x) @@ -673,16 +674,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr bool signbit(long double __x) - { return __builtin_signbitl(__x); } + { return __builtin_signbit(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type signbit(_Tp __x) { return __x < 0 ? true : false; } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isgreater(float __x, float __y) { return __builtin_isgreater(__x, __y); } @@ -696,6 +699,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isgreater(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -705,8 +709,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isgreater(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isgreaterequal(float __x, float __y) { return __builtin_isgreaterequal(__x, __y); } @@ -720,6 +725,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isgreaterequal(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -729,8 +735,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isgreaterequal(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isless(float __x, float __y) { return __builtin_isless(__x, __y); } @@ -744,6 +751,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isless(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -753,8 +761,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isless(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool islessequal(float __x, float __y) { return __builtin_islessequal(__x, __y); } @@ -768,6 +777,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_islessequal(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -777,8 +787,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_islessequal(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool islessgreater(float __x, float __y) { return __builtin_islessgreater(__x, __y); } @@ -792,6 +803,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_islessgreater(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -801,8 +813,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_islessgreater(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr bool isunordered(float __x, float __y) { return __builtin_isunordered(__x, __y); } @@ -816,6 +829,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_isunordered(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value @@ -825,6 +839,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isunordered(__type(__x), __type(__y)); } +#endif #else @@ -997,12 +1012,14 @@ _GLIBCXX_END_NAMESPACE_VERSION #undef lgamma #undef lgammaf #undef lgammal +#ifndef _GLIBCXX_NO_C99_ROUNDING_FUNCS #undef llrint #undef llrintf #undef llrintl #undef llround #undef llroundf #undef llroundl +#endif #undef log1p #undef log1pf #undef log1pl @@ -1128,6 +1145,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::lgammaf; using ::lgammal; +#ifndef _GLIBCXX_NO_C99_ROUNDING_FUNCS using ::llrint; using ::llrintf; using ::llrintl; @@ -1135,6 +1153,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::llround; using ::llroundf; using ::llroundl; +#endif using ::log1p; using ::log1pf; @@ -1205,7 +1224,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::truncl; /// Additional overloads. -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float acosh(float __x) { return __builtin_acoshf(__x); } @@ -1215,13 +1234,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_acoshl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type acosh(_Tp __x) { return __builtin_acosh(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float asinh(float __x) { return __builtin_asinhf(__x); } @@ -1231,13 +1252,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_asinhl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type asinh(_Tp __x) { return __builtin_asinh(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float atanh(float __x) { return __builtin_atanhf(__x); } @@ -1247,13 +1270,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_atanhl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type atanh(_Tp __x) { return __builtin_atanh(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float cbrt(float __x) { return __builtin_cbrtf(__x); } @@ -1263,13 +1288,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_cbrtl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cbrt(_Tp __x) { return __builtin_cbrt(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float copysign(float __x, float __y) { return __builtin_copysignf(__x, __y); } @@ -1279,6 +1306,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_copysignl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type copysign(_Tp __x, _Up __y) @@ -1286,8 +1314,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return copysign(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float erf(float __x) { return __builtin_erff(__x); } @@ -1297,13 +1326,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_erfl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type erf(_Tp __x) { return __builtin_erf(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float erfc(float __x) { return __builtin_erfcf(__x); } @@ -1313,13 +1344,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_erfcl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type erfc(_Tp __x) { return __builtin_erfc(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float exp2(float __x) { return __builtin_exp2f(__x); } @@ -1329,13 +1362,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_exp2l(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type exp2(_Tp __x) { return __builtin_exp2(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float expm1(float __x) { return __builtin_expm1f(__x); } @@ -1345,13 +1380,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_expm1l(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type expm1(_Tp __x) { return __builtin_expm1(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float fdim(float __x, float __y) { return __builtin_fdimf(__x, __y); } @@ -1361,6 +1398,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_fdiml(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fdim(_Tp __x, _Up __y) @@ -1368,8 +1406,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fdim(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float fma(float __x, float __y, float __z) { return __builtin_fmaf(__x, __y, __z); } @@ -1379,6 +1418,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_fmal(__x, __y, __z); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type fma(_Tp __x, _Up __y, _Vp __z) @@ -1386,8 +1426,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; return fma(__type(__x), __type(__y), __type(__z)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float fmax(float __x, float __y) { return __builtin_fmaxf(__x, __y); } @@ -1397,6 +1438,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_fmaxl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fmax(_Tp __x, _Up __y) @@ -1404,8 +1446,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fmax(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float fmin(float __x, float __y) { return __builtin_fminf(__x, __y); } @@ -1415,6 +1458,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_fminl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fmin(_Tp __x, _Up __y) @@ -1422,8 +1466,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fmin(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float hypot(float __x, float __y) { return __builtin_hypotf(__x, __y); } @@ -1433,6 +1478,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_hypotl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type hypot(_Tp __x, _Up __y) @@ -1440,8 +1486,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return hypot(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr int ilogb(float __x) { return __builtin_ilogbf(__x); } @@ -1451,14 +1498,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_ilogbl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, int>::__type ilogb(_Tp __x) { return __builtin_ilogb(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float lgamma(float __x) { return __builtin_lgammaf(__x); } @@ -1468,13 +1517,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_lgammal(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type lgamma(_Tp __x) { return __builtin_lgamma(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr long long llrint(float __x) { return __builtin_llrintf(__x); } @@ -1484,13 +1535,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_llrintl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long long>::__type llrint(_Tp __x) { return __builtin_llrint(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr long long llround(float __x) { return __builtin_llroundf(__x); } @@ -1500,13 +1553,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_llroundl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long long>::__type llround(_Tp __x) { return __builtin_llround(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float log1p(float __x) { return __builtin_log1pf(__x); } @@ -1516,13 +1571,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_log1pl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log1p(_Tp __x) { return __builtin_log1p(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP // DR 568. constexpr float log2(float __x) @@ -1533,13 +1590,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_log2l(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log2(_Tp __x) { return __builtin_log2(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float logb(float __x) { return __builtin_logbf(__x); } @@ -1549,13 +1608,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_logbl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type logb(_Tp __x) { return __builtin_logb(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr long lrint(float __x) { return __builtin_lrintf(__x); } @@ -1565,13 +1626,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_lrintl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long>::__type lrint(_Tp __x) { return __builtin_lrint(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr long lround(float __x) { return __builtin_lroundf(__x); } @@ -1581,13 +1644,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_lroundl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long>::__type lround(_Tp __x) { return __builtin_lround(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float nearbyint(float __x) { return __builtin_nearbyintf(__x); } @@ -1597,13 +1662,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_nearbyintl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type nearbyint(_Tp __x) { return __builtin_nearbyint(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float nextafter(float __x, float __y) { return __builtin_nextafterf(__x, __y); } @@ -1613,6 +1680,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_nextafterl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type nextafter(_Tp __x, _Up __y) @@ -1620,8 +1688,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return nextafter(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float nexttoward(float __x, long double __y) { return __builtin_nexttowardf(__x, __y); } @@ -1631,13 +1700,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_nexttowardl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type nexttoward(_Tp __x, long double __y) { return __builtin_nexttoward(__x, __y); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float remainder(float __x, float __y) { return __builtin_remainderf(__x, __y); } @@ -1647,6 +1718,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_remainderl(__x, __y); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type remainder(_Tp __x, _Up __y) @@ -1654,8 +1726,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return remainder(__type(__x), __type(__y)); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float remquo(float __x, float __y, int* __pquo) { return __builtin_remquof(__x, __y, __pquo); } @@ -1665,6 +1738,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_remquol(__x, __y, __pquo); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type remquo(_Tp __x, _Up __y, int* __pquo) @@ -1672,8 +1746,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return remquo(__type(__x), __type(__y), __pquo); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float rint(float __x) { return __builtin_rintf(__x); } @@ -1683,13 +1758,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_rintl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type rint(_Tp __x) { return __builtin_rint(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float round(float __x) { return __builtin_roundf(__x); } @@ -1699,13 +1776,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_roundl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type round(_Tp __x) { return __builtin_round(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float scalbln(float __x, long __ex) { return __builtin_scalblnf(__x, __ex); } @@ -1715,13 +1794,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_scalblnl(__x, __ex); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type scalbln(_Tp __x, long __ex) { return __builtin_scalbln(__x, __ex); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float scalbn(float __x, int __ex) { return __builtin_scalbnf(__x, __ex); } @@ -1731,13 +1812,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_scalbnl(__x, __ex); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type scalbn(_Tp __x, int __ex) { return __builtin_scalbn(__x, __ex); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float tgamma(float __x) { return __builtin_tgammaf(__x); } @@ -1747,13 +1830,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_tgammal(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tgamma(_Tp __x) { return __builtin_tgamma(__x); } +#endif -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP constexpr float trunc(float __x) { return __builtin_truncf(__x); } @@ -1763,11 +1848,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_truncl(__x); } #endif +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type trunc(_Tp __x) { return __builtin_trunc(__x); } +#endif _GLIBCXX_END_NAMESPACE_VERSION } // namespace @@ -1776,4 +1863,57 @@ _GLIBCXX_END_NAMESPACE_VERSION #endif // C++11 +#if __cplusplus > 201402L +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // [c.math.hypot3], three-dimensional hypotenuse +#define __cpp_lib_hypot 201603 + + template + inline _Tp + __hypot3(_Tp __x, _Tp __y, _Tp __z) + { + __x = std::abs(__x); + __y = std::abs(__y); + __z = std::abs(__z); + if (_Tp __a = __x < __y ? __y < __z ? __z : __y : __x < __z ? __z : __x) + return __a * std::sqrt((__x / __a) * (__x / __a) + + (__y / __a) * (__y / __a) + + (__z / __a) * (__z / __a)); + else + return {}; + } + + inline float + hypot(float __x, float __y, float __z) + { return std::__hypot3(__x, __y, __z); } + + inline double + hypot(double __x, double __y, double __z) + { return std::__hypot3(__x, __y, __z); } + + inline long double + hypot(long double __x, long double __y, long double __z) + { return std::__hypot3(__x, __y, __z); } + + template + typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type + hypot(_Tp __x, _Up __y, _Vp __z) + { + using __type = typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type; + return std::__hypot3<__type>(__x, __y, __z); + } +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace +#endif // C++17 + + +#if _GLIBCXX_USE_STD_SPEC_FUNCS +# include +#endif + +} // extern "C++" + #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/codecvt b/devkitARM/arm-none-eabi/include/c++/7.1.0/codecvt similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/codecvt rename to devkitARM/arm-none-eabi/include/c++/7.1.0/codecvt index e4a7d5bbb..67e358fd0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/codecvt +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/codecvt @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2015 Free Software Foundation, Inc. +// Copyright (C) 2015-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/complex b/devkitARM/arm-none-eabi/include/c++/7.1.0/complex similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/complex rename to devkitARM/arm-none-eabi/include/c++/7.1.0/complex index 585683c6f..6342c98e8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/complex +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/complex @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- complex number classes. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -93,7 +93,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Return @a x to the @a y'th power. template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); /// Return @a x to the @a y'th power. - template complex<_Tp> pow(const complex<_Tp>&, + template complex<_Tp> pow(const complex<_Tp>&, const complex<_Tp>&); /// Return @a x to the @a y'th power. template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); @@ -107,8 +107,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template complex<_Tp> tan(const complex<_Tp>&); /// Return complex hyperbolic tangent of @a z. template complex<_Tp> tanh(const complex<_Tp>&); - - + + // 26.2.2 Primary template class complex /** * Template to represent complex numbers. @@ -123,7 +123,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { /// Value typedef. typedef _Tp value_type; - + /// Default constructor. First parameter is x, second parameter is y. /// Unspecified parameters default to 0. _GLIBCXX_CONSTEXPR complex(const _Tp& __r = _Tp(), const _Tp& __i = _Tp()) @@ -143,41 +143,41 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. _GLIBCXX_ABI_TAG_CXX11 - constexpr _Tp + constexpr _Tp real() const { return _M_real; } _GLIBCXX_ABI_TAG_CXX11 - constexpr _Tp + constexpr _Tp imag() const { return _M_imag; } #else /// Return real part of complex number. - _Tp& + _Tp& real() { return _M_real; } /// Return real part of complex number. - const _Tp& + const _Tp& real() const { return _M_real; } /// Return imaginary part of complex number. - _Tp& + _Tp& imag() { return _M_imag; } /// Return imaginary part of complex number. - const _Tp& + const _Tp& imag() const { return _M_imag; } #endif // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. - void + void real(_Tp __val) { _M_real = __val; } - void + void imag(_Tp __val) { _M_imag = __val; } /// Assign a scalar to this complex number. complex<_Tp>& operator=(const _Tp&); - + /// Add a scalar to this complex number. // 26.2.5/1 complex<_Tp>& @@ -237,7 +237,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_real = __t; _M_imag = _Tp(); return *this; - } + } // 26.2.5/5 template @@ -317,7 +317,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_real = __r / __n; return *this; } - + // Operators: //@{ /// Return new complex value @a x plus @a y. @@ -359,7 +359,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __r -= __y; return __r; } - + template inline complex<_Tp> operator-(const complex<_Tp>& __x, const _Tp& __y) @@ -419,7 +419,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __r /= __y; return __r; } - + template inline complex<_Tp> operator/(const complex<_Tp>& __x, const _Tp& __y) @@ -495,23 +495,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Tp __re_x, __im_x; _CharT __ch; __is >> __ch; - if (__ch == '(') + if (__ch == '(') { __is >> __re_x >> __ch; - if (__ch == ',') + if (__ch == ',') { __is >> __im_x >> __ch; - if (__ch == ')') + if (__ch == ')') __x = complex<_Tp>(__re_x, __im_x); else __is.setstate(ios_base::failbit); } - else if (__ch == ')') + else if (__ch == ')') __x = __re_x; else __is.setstate(ios_base::failbit); } - else + else { __is.putback(__ch); __is >> __re_x; @@ -549,17 +549,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline _Tp& real(complex<_Tp>& __z) { return __z.real(); } - + template inline const _Tp& real(const complex<_Tp>& __z) { return __z.real(); } - + template inline _Tp& imag(complex<_Tp>& __z) { return __z.imag(); } - + template inline const _Tp& imag(const complex<_Tp>& __z) @@ -576,7 +576,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const _Tp __s = std::max(abs(__x), abs(__y)); if (__s == _Tp()) // well ... return __s; - __x /= __s; + __x /= __s; __y /= __s; return __s * sqrt(__x * __x + __y * __y); } @@ -599,7 +599,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline _Tp abs(const complex<_Tp>& __z) { return __complex_abs(__z); } -#endif +#endif // 26.2.7/4: arg(__z): Returns the phase angle of __z. @@ -655,25 +655,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __res * __res; } }; - + template inline _Tp norm(const complex<_Tp>& __z) { - return _Norm_helper<__is_floating<_Tp>::__value + return _Norm_helper<__is_floating<_Tp>::__value && !_GLIBCXX_FAST_MATH>::_S_do_it(__z); } template inline complex<_Tp> polar(const _Tp& __rho, const _Tp& __theta) - { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); } + { + __glibcxx_assert( __rho >= 0 ); + return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); + } template inline complex<_Tp> conj(const complex<_Tp>& __z) { return complex<_Tp>(__z.real(), -__z.imag()); } - + // Transcendentals // 26.2.8/1 cos(__z): Returns the cosine of __z. @@ -801,7 +804,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); - return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); + return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); } #if _GLIBCXX_USE_C99_COMPLEX @@ -836,14 +839,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if _GLIBCXX_USE_C99_COMPLEX inline __complex__ float - __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); } + __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); } inline __complex__ double - __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); } + __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); } inline __complex__ long double __complex_sinh(const __complex__ long double& __z) - { return __builtin_csinhl(__z); } + { return __builtin_csinhl(__z); } template inline complex<_Tp> @@ -899,7 +902,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // 26.2.8/14 tan(__z): Return the complex tangent of __z. - + template inline complex<_Tp> __complex_tan(const complex<_Tp>& __z) @@ -927,7 +930,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // 26.2.8/15 tanh(__z): Returns the hyperbolic tangent of __z. - + template inline complex<_Tp> __complex_tanh(const complex<_Tp>& __z) @@ -992,7 +995,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION complex<_Tp> pow(const complex<_Tp>& __x, const _Tp& __y) { -#ifndef _GLIBCXX_USE_C99_COMPLEX +#if ! _GLIBCXX_USE_C99_COMPLEX if (__x == _Tp()) return _Tp(); #endif @@ -1063,38 +1066,38 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif explicit _GLIBCXX_CONSTEXPR complex(const complex&); - explicit _GLIBCXX_CONSTEXPR complex(const complex&); + explicit _GLIBCXX_CONSTEXPR complex(const complex&); #if __cplusplus >= 201103L // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. __attribute ((__abi_tag__ ("cxx11"))) - constexpr float + constexpr float real() const { return __real__ _M_value; } __attribute ((__abi_tag__ ("cxx11"))) - constexpr float + constexpr float imag() const { return __imag__ _M_value; } #else - float& + float& real() { return __real__ _M_value; } - const float& - real() const { return __real__ _M_value; } + const float& + real() const { return __real__ _M_value; } - float& + float& imag() { return __imag__ _M_value; } - const float& + const float& imag() const { return __imag__ _M_value; } #endif // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. - void + void real(float __val) { __real__ _M_value = __val; } - void + void imag(float __val) { __imag__ _M_value = __val; } complex& @@ -1214,38 +1217,38 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_CONSTEXPR complex(const complex& __z) : _M_value(__z.__rep()) { } - explicit _GLIBCXX_CONSTEXPR complex(const complex&); + explicit _GLIBCXX_CONSTEXPR complex(const complex&); #if __cplusplus >= 201103L // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. __attribute ((__abi_tag__ ("cxx11"))) - constexpr double + constexpr double real() const { return __real__ _M_value; } __attribute ((__abi_tag__ ("cxx11"))) - constexpr double + constexpr double imag() const { return __imag__ _M_value; } #else - double& + double& real() { return __real__ _M_value; } - const double& + const double& real() const { return __real__ _M_value; } - double& + double& imag() { return __imag__ _M_value; } - const double& + const double& imag() const { return __imag__ _M_value; } #endif // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. - void + void real(double __val) { __real__ _M_value = __val; } - void + void imag(double __val) { __imag__ _M_value = __val; } complex& @@ -1261,7 +1264,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_value += __d; return *this; } - + complex& operator-=(double __d) { @@ -1351,7 +1354,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_CONSTEXPR complex(_ComplexT __z) : _M_value(__z) { } - _GLIBCXX_CONSTEXPR complex(long double __r = 0.0L, + _GLIBCXX_CONSTEXPR complex(long double __r = 0.0L, long double __i = 0.0L) #if __cplusplus >= 201103L : _M_value{ __r, __i } { } @@ -1372,32 +1375,32 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. __attribute ((__abi_tag__ ("cxx11"))) - constexpr long double + constexpr long double real() const { return __real__ _M_value; } __attribute ((__abi_tag__ ("cxx11"))) - constexpr long double + constexpr long double imag() const { return __imag__ _M_value; } #else - long double& + long double& real() { return __real__ _M_value; } - const long double& + const long double& real() const { return __real__ _M_value; } - long double& + long double& imag() { return __imag__ _M_value; } - const long double& + const long double& imag() const { return __imag__ _M_value; } #endif // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 387. std::complex over-encapsulated. - void + void real(long double __val) { __real__ _M_value = __val; } - void + void imag(long double __val) { __imag__ _M_value = __val; } complex& @@ -1551,7 +1554,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: typedef std::complex::__type> __type; }; - + template struct __promote_2, std::complex<_Up> > { @@ -1650,7 +1653,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION asin(const std::complex<_Tp>& __z) { return __complex_asin(__z); } #endif - + template std::complex<_Tp> __complex_atan(const std::complex<_Tp>& __z) @@ -1828,7 +1831,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION arg(_Tp __x) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; -#if (_GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) +#if (_GLIBCXX11_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) return std::signbit(__x) ? __type(3.1415926535897932384626433832795029L) : __type(); #else @@ -1837,7 +1840,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - inline typename __gnu_cxx::__promote<_Tp>::__type + _GLIBCXX_CONSTEXPR inline typename __gnu_cxx::__promote<_Tp>::__type imag(_Tp) { return _Tp(); } @@ -1850,7 +1853,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - inline typename __gnu_cxx::__promote<_Tp>::__type + _GLIBCXX_CONSTEXPR inline typename __gnu_cxx::__promote<_Tp>::__type real(_Tp __x) { return __x; } @@ -1918,21 +1921,29 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __complex_proj(__z); } #endif - // DR 1137. template - inline typename __gnu_cxx::__promote<_Tp>::__type + inline std::complex::__type> proj(_Tp __x) - { return __x; } + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return std::proj(std::complex<__type>(__x)); + } template - inline typename __gnu_cxx::__promote<_Tp>::__type + inline std::complex::__type> conj(_Tp __x) - { return __x; } + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return std::complex<__type>(__x, -__type()); + } + +_GLIBCXX_END_NAMESPACE_VERSION #if __cplusplus > 201103L inline namespace literals { inline namespace complex_literals { +_GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_complex_udls 201309 @@ -1960,12 +1971,12 @@ inline namespace complex_literals { operator""il(unsigned long long __num) { return std::complex{0.0L, static_cast(__num)}; } +_GLIBCXX_END_NAMESPACE_VERSION } // inline namespace complex_literals } // inline namespace literals #endif // C++14 -_GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif // C++11 diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/complex.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/complex.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/complex.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/complex.h index b38307524..b9af84725 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/complex.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/complex.h @@ -1,6 +1,6 @@ // -*- C++ -*- compatibility header. -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/condition_variable b/devkitARM/arm-none-eabi/include/c++/7.1.0/condition_variable similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/condition_variable rename to devkitARM/arm-none-eabi/include/c++/7.1.0/condition_variable index f7da017aa..1d8f057ce 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/condition_variable +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/condition_variable @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,12 +36,13 @@ #else #include -#include +#include #include #include #include #include #include +#include #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) @@ -59,7 +60,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// cv_status enum class cv_status { no_timeout, timeout }; - + /// condition_variable class condition_variable { @@ -88,7 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION notify_all() noexcept; void - wait(unique_lock& __lock); + wait(unique_lock& __lock) noexcept; template void @@ -249,7 +250,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION unique_lock __my_lock2(std::move(__my_lock)); _M_cond.wait(__my_lock2); } - + template void diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/csetjmp b/devkitARM/arm-none-eabi/include/c++/7.1.0/csetjmp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/csetjmp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/csetjmp index baadeee8c..48b89ae0e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/csetjmp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/csetjmp @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/csignal b/devkitARM/arm-none-eabi/include/c++/7.1.0/csignal similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/csignal rename to devkitARM/arm-none-eabi/include/c++/7.1.0/csignal index 95d5dfedb..ab5de6b4c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/csignal +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/csignal @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdalign b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdalign similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cstdalign rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cstdalign index 27dff9b3f..3fbc3412e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdalign +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdalign @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2011-2015 Free Software Foundation, Inc. +// Copyright (C) 2011-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdarg b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdarg similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cstdarg rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cstdarg index 6dde251a5..148d53217 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdarg +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdarg @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -38,6 +38,7 @@ #pragma GCC system_header +#undef __need___va_list #include #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdbool b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdbool similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cstdbool rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cstdbool index 3d0df32b4..b6ded0790 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdbool +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdbool @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/cstddef b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstddef new file mode 100644 index 000000000..09754ee45 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstddef @@ -0,0 +1,189 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file cstddef + * This is a Standard C++ Library file. You should @c \#include this file + * in your programs, rather than any of the @a *.h implementation files. + * + * This is the C++ version of the Standard C Library header @c stddef.h, + * and its contents are (mostly) the same as that header, but are all + * contained in the namespace @c std (except for names which are defined + * as macros in C). + */ + +// +// ISO C++ 14882: 18.1 Types +// + +#ifndef _GLIBCXX_CSTDDEF +#define _GLIBCXX_CSTDDEF 1 + +#pragma GCC system_header + +#undef __need_wchar_t +#undef __need_ptrdiff_t +#undef __need_size_t +#undef __need_NULL +#undef __need_wint_t +#include +#include + +#if __cplusplus >= 201103L +namespace std +{ + // We handle size_t, ptrdiff_t, and nullptr_t in c++config.h. + using ::max_align_t; +} +#endif + +#if __cplusplus > 201402L +namespace std +{ + /// std::byte + enum class byte : unsigned char {}; + + template struct __byte_operand; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; +#ifdef _GLIBCXX_USE_WCHAR_T + template<> struct __byte_operand { using __type = byte; }; +#endif + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; + template<> struct __byte_operand { using __type = byte; }; +#if defined(__GLIBCXX_TYPE_INT_N_0) + template<> struct __byte_operand<__GLIBCXX_TYPE_INT_N_0> + { using __type = byte; }; + template<> struct __byte_operand + { using __type = byte; }; +#endif +#if defined(__GLIBCXX_TYPE_INT_N_1) + template<> struct __byte_operand<__GLIBCXX_TYPE_INT_N_1> + { using __type = byte; }; + template<> struct __byte_operand + { using __type = byte; }; +#endif +#if defined(__GLIBCXX_TYPE_INT_N_2) + template<> struct __byte_operand<__GLIBCXX_TYPE_INT_N_2> + { using __type = byte; }; + template<> struct __byte_operand + { using __type = byte; }; +#endif + template + struct __byte_operand + : __byte_operand<_IntegerType> { }; + template + struct __byte_operand + : __byte_operand<_IntegerType> { }; + template + struct __byte_operand + : __byte_operand<_IntegerType> { }; + + template + using __byte_op_t = typename __byte_operand<_IntegerType>::__type; + + template + constexpr __byte_op_t<_IntegerType>& + operator<<=(byte& __b, _IntegerType __shift) noexcept + { return __b = byte(static_cast(__b) << __shift); } + + template + constexpr __byte_op_t<_IntegerType> + operator<<(byte __b, _IntegerType __shift) noexcept + { return byte(static_cast(__b) << __shift); } + + template + constexpr __byte_op_t<_IntegerType>& + operator>>=(byte& __b, _IntegerType __shift) noexcept + { return __b = byte(static_cast(__b) >> __shift); } + + template + constexpr __byte_op_t<_IntegerType> + operator>>(byte __b, _IntegerType __shift) noexcept + { return byte(static_cast(__b) >> __shift); } + + constexpr byte& + operator|=(byte& __l, byte __r) noexcept + { + return __l = + byte(static_cast(__l) | static_cast(__r)); + } + + constexpr byte + operator|(byte __l, byte __r) noexcept + { + return + byte(static_cast(__l) | static_cast(__r)); + } + + constexpr byte& + operator&=(byte& __l, byte __r) noexcept + { + return __l = + byte(static_cast(__l) & static_cast(__r)); + } + + constexpr byte + operator&(byte __l, byte __r) noexcept + { + return + byte(static_cast(__l) & static_cast(__r)); + } + + constexpr byte& + operator^=(byte& __l, byte __r) noexcept + { + return __l = + byte(static_cast(__l) ^ static_cast(__r)); + } + + constexpr byte + operator^(byte __l, byte __r) noexcept + { + return + byte(static_cast(__l) ^ static_cast(__r)); + } + + constexpr byte + operator~(byte __b) noexcept + { return byte(~static_cast(__b)); } + + template + constexpr _IntegerType + to_integer(__byte_op_t<_IntegerType> __b) noexcept + { return _IntegerType(__b); } + +} // namespace std +#endif + +#endif // _GLIBCXX_CSTDDEF diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdint b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdint similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cstdint rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cstdint index 4e226a10b..33f8193d9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdint +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdint @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdio b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdio similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cstdio rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cstdio index d1c958b63..6f3132fc2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdio +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdio @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -44,7 +44,7 @@ #ifndef _GLIBCXX_CSTDIO #define _GLIBCXX_CSTDIO 1 -#ifndef _GLIBCXX_HAVE_GETS +#if __cplusplus <= 201103L && !defined(_GLIBCXX_HAVE_GETS) extern "C" char* gets (char* __s) __attribute__((__deprecated__)); #endif @@ -146,7 +146,7 @@ namespace std using ::vsprintf; } // namespace -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO #undef snprintf #undef vfscanf @@ -189,6 +189,6 @@ namespace std using ::__gnu_cxx::vsscanf; } // namespace std -#endif // _GLIBCXX_USE_C99 +#endif // _GLIBCXX_USE_C99_STDIO #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdlib b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdlib similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cstdlib rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cstdlib index 7e9bb30f0..006ac6897 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstdlib +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstdlib @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -69,11 +69,15 @@ namespace std #else -#include +// Need to ensure this finds the C library's not a libstdc++ +// wrapper that might already be installed later in the include search path. +#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS +#include_next +#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS +#include // Get rid of those macros defined in in lieu of real functions. #undef abort -#undef abs #undef atexit #if __cplusplus >= 201103L # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT @@ -111,6 +115,8 @@ namespace std #undef wcstombs #undef wctomb +extern "C++" +{ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -119,7 +125,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::ldiv_t; using ::abort; - using ::abs; using ::atexit; #if __cplusplus >= 201103L # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT @@ -162,40 +167,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // _GLIBCXX_USE_WCHAR_T #ifndef __CORRECT_ISO_CPP_STDLIB_H_PROTO - inline long - abs(long __i) { return __builtin_labs(__i); } - inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } #endif -#ifdef _GLIBCXX_USE_LONG_LONG - inline long long - abs(long long __x) { return __builtin_llabs (__x); } -#endif - -#if defined(__GLIBCXX_TYPE_INT_N_0) - inline __GLIBCXX_TYPE_INT_N_0 - abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; } -#endif -#if defined(__GLIBCXX_TYPE_INT_N_1) - inline __GLIBCXX_TYPE_INT_N_1 - abs(__GLIBCXX_TYPE_INT_N_1 __x) { return __x >= 0 ? __x : -__x; } -#endif -#if defined(__GLIBCXX_TYPE_INT_N_2) - inline __GLIBCXX_TYPE_INT_N_2 - abs(__GLIBCXX_TYPE_INT_N_2 __x) { return __x >= 0 ? __x : -__x; } -#endif -#if defined(__GLIBCXX_TYPE_INT_N_3) - inline __GLIBCXX_TYPE_INT_N_3 - abs(__GLIBCXX_TYPE_INT_N_3 __x) { return __x >= 0 ? __x : -__x; } -#endif - _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDLIB #undef _Exit #undef llabs @@ -266,7 +246,9 @@ namespace std using ::__gnu_cxx::strtold; } // namespace std -#endif // _GLIBCXX_USE_C99 +#endif // _GLIBCXX_USE_C99_STDLIB + +} // extern "C++" #endif // !_GLIBCXX_HOSTED diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstring b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstring similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cstring rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cstring index cd6fe5abd..173b537e8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstring +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cstring @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ctgmath b/devkitARM/arm-none-eabi/include/c++/7.1.0/ctgmath similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ctgmath rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ctgmath index e89d1fcda..e1fc09bf3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ctgmath +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ctgmath @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -35,7 +35,9 @@ # include #else # include +extern "C++" { # include +} #endif #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ctime b/devkitARM/arm-none-eabi/include/c++/7.1.0/ctime similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ctime rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ctime index bc5b0dbb8..5b1f1d06f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ctime +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ctime @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstddef b/devkitARM/arm-none-eabi/include/c++/7.1.0/cuchar similarity index 66% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cstddef rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cuchar index 33f4f8f76..a752c99f8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cstddef +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cuchar @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 2015-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -22,34 +22,56 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file cstddef +/** @file include/cuchar * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * - * This is the C++ version of the Standard C Library header @c stddef.h, + * This is the C++ version of the Standard C Library header @c uchar.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ // -// ISO C++ 14882: 18.1 Types +// ISO C++ 14882:2011 21.8 // -#ifndef _GLIBCXX_CSTDDEF -#define _GLIBCXX_CSTDDEF 1 +#ifndef _GLIBCXX_CUCHAR +#define _GLIBCXX_CUCHAR 1 #pragma GCC system_header +#if __cplusplus < 201103L +# include +#else + #include -#include +#include -#if __cplusplus >= 201103L -namespace std +#if _GLIBCXX_USE_C11_UCHAR_CXX11 + +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef mbrtoc16 +#undef c16rtomb +#undef mbrtoc32 +#undef c32rtomb + +namespace std _GLIBCXX_VISIBILITY(default) { - // We handle size_t, ptrdiff_t, and nullptr_t in c++config.h. - using ::max_align_t; -} -#endif +_GLIBCXX_BEGIN_NAMESPACE_VERSION -#endif // _GLIBCXX_CSTDDEF + using ::mbrtoc16; + using ::c16rtomb; + using ::mbrtoc32; + using ::c32rtomb; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // _GLIBCXX_USE_C11_UCHAR_CXX11 + +#endif // C++11 + +#endif // _GLIBCXX_CUCHAR diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cwchar b/devkitARM/arm-none-eabi/include/c++/7.1.0/cwchar similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cwchar rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cwchar index dddb4092b..39f88b396 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cwchar +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cwchar @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -232,7 +232,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_WCHAR #undef wcstold #undef wcstoll @@ -289,7 +289,7 @@ namespace std using std::vwscanf; #endif -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_WCHAR using std::wcstold; using std::wcstoll; using std::wcstoull; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cwctype b/devkitARM/arm-none-eabi/include/c++/7.1.0/cwctype similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cwctype rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cwctype index 444bc121e..1180f4e2f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cwctype +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cwctype @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/cxxabi.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/cxxabi.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/cxxabi.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/cxxabi.h index 571e42e9a..b66d6d194 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/cxxabi.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/cxxabi.h @@ -1,6 +1,6 @@ // ABI Support -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -49,10 +49,7 @@ #include #include #include - -#ifndef _GLIBCXX_CDTOR_CALLABI -#define _GLIBCXX_CDTOR_CALLABI -#endif +#include #ifdef __cplusplus namespace __cxxabiv1 @@ -281,7 +278,9 @@ namespace __cxxabiv1 __volatile_mask = 0x2, __restrict_mask = 0x4, __incomplete_mask = 0x8, - __incomplete_class_mask = 0x10 + __incomplete_class_mask = 0x10, + __transaction_safe_mask = 0x20, + __noexcept_mask = 0x40 }; protected: @@ -607,10 +606,6 @@ namespace __cxxabiv1 __cxa_eh_globals* __cxa_get_globals_fast() _GLIBCXX_NOTHROW __attribute__ ((__const__)); - // Allocate memory for the primary exception plus the thrown object. - void* - __cxa_allocate_exception(size_t) _GLIBCXX_NOTHROW; - // Free the space allocated for the primary exception. void __cxa_free_exception(void*) _GLIBCXX_NOTHROW; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/array b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/array similarity index 79% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/array rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/array index 411e816d3..9c2792210 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/array +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/array @@ -1,6 +1,6 @@ // Debugging array implementation -*- C++ -*- -// Copyright (C) 2012-2015 Free Software Foundation, Inc. +// Copyright (C) 2012-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -31,7 +31,10 @@ #pragma GCC system_header -#include +#include + +#include +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -83,70 +86,70 @@ namespace __debug void swap(array& __other) - noexcept(noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))) + noexcept(_AT_Type::_Is_nothrow_swappable::value) { std::swap_ranges(begin(), end(), __other.begin()); } // Iterators. - iterator + _GLIBCXX17_CONSTEXPR iterator begin() noexcept { return iterator(data()); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator begin() const noexcept { return const_iterator(data()); } - iterator + _GLIBCXX17_CONSTEXPR iterator end() noexcept { return iterator(data() + _Nm); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator end() const noexcept { return const_iterator(data() + _Nm); } - reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } - reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator rend() noexcept { return reverse_iterator(begin()); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator cbegin() const noexcept { return const_iterator(data()); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator cend() const noexcept { return const_iterator(data() + _Nm); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } // Capacity. - constexpr size_type + constexpr size_type size() const noexcept { return _Nm; } - constexpr size_type + constexpr size_type max_size() const noexcept { return _Nm; } - constexpr bool + constexpr bool empty() const noexcept { return size() == 0; } // Element access. - reference + _GLIBCXX17_CONSTEXPR reference operator[](size_type __n) noexcept { __glibcxx_check_subscript(__n); @@ -161,13 +164,12 @@ namespace __debug _AT_Type::_S_ref(_M_elems, 0)); } - reference + _GLIBCXX17_CONSTEXPR reference at(size_type __n) { if (__n >= _Nm) - std::__throw_out_of_range_fmt(__N("array::at: __n " - "(which is %zu) >= _Nm " - "(which is %zu)"), + std::__throw_out_of_range_fmt(__N("array::at: __n (which is %zu) " + ">= _Nm (which is %zu)"), __n, _Nm); return _AT_Type::_S_ref(_M_elems, __n); } @@ -184,14 +186,14 @@ namespace __debug _AT_Type::_S_ref(_M_elems, 0)); } - reference + _GLIBCXX17_CONSTEXPR reference front() noexcept { __glibcxx_check_nonempty(); return *begin(); } - constexpr const_reference + constexpr const_reference front() const noexcept { return _Nm ? _AT_Type::_S_ref(_M_elems, 0) @@ -199,14 +201,14 @@ namespace __debug _AT_Type::_S_ref(_M_elems, 0)); } - reference + _GLIBCXX17_CONSTEXPR reference back() noexcept { __glibcxx_check_nonempty(); return _Nm ? *(end() - 1) : *end(); } - constexpr const_reference + constexpr const_reference back() const noexcept { return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) @@ -214,18 +216,25 @@ namespace __debug _AT_Type::_S_ref(_M_elems, 0)); } - pointer + _GLIBCXX17_CONSTEXPR pointer data() noexcept { return _AT_Type::_S_ptr(_M_elems); } - const_pointer + _GLIBCXX17_CONSTEXPR const_pointer data() const noexcept { return _AT_Type::_S_ptr(_M_elems); } }; +#if __cpp_deduction_guides >= 201606 + template + array(_Tp, _Up...) + -> array && ...), _Tp>, + 1 + sizeof...(_Up)>; +#endif + // Array comparisons. template - inline bool + inline bool operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return std::equal(__one.begin(), __one.end(), __two.begin()); } @@ -237,9 +246,9 @@ namespace __debug template inline bool operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) - { + { return std::lexicographical_compare(__a.begin(), __a.end(), - __b.begin(), __b.end()); + __b.begin(), __b.end()); } template @@ -258,6 +267,14 @@ namespace __debug { return !(__one < __two); } // Specialized algorithms. + +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + template + typename enable_if< + !_GLIBCXX_STD_C::__array_traits<_Tp, _Nm>::_Is_swappable::value>::type + swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete; +#endif + template inline void swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) @@ -291,20 +308,27 @@ namespace __debug } } // namespace __debug +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Tuple interface to class template array. /// tuple_size template - struct tuple_size<__debug::array<_Tp, _Nm>> + struct tuple_size> : public integral_constant { }; /// tuple_element template - struct tuple_element<_Int, __debug::array<_Tp, _Nm>> + struct tuple_element<_Int, std::__debug::array<_Tp, _Nm>> { static_assert(_Int < _Nm, "index is out of bounds"); typedef _Tp type; }; + + template + struct __is_tuple_like_impl> : true_type + { }; + +_GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // _GLIBCXX_DEBUG_ARRAY diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/assertions.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/assertions.h new file mode 100644 index 000000000..6b37d4bc7 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/assertions.h @@ -0,0 +1,68 @@ +// Debugging support implementation -*- C++ -*- + +// Copyright (C) 2003-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file debug/assertions.h + * This file is a GNU debug extension to the Standard C++ Library. + */ + +#ifndef _GLIBCXX_DEBUG_ASSERTIONS_H +#define _GLIBCXX_DEBUG_ASSERTIONS_H 1 + +#ifndef _GLIBCXX_DEBUG + +# define _GLIBCXX_DEBUG_ASSERT(_Condition) +# define _GLIBCXX_DEBUG_PEDASSERT(_Condition) +# define _GLIBCXX_DEBUG_ONLY(_Statement) + +#endif + +#ifndef _GLIBCXX_ASSERTIONS +# define __glibcxx_requires_non_empty_range(_First,_Last) +# define __glibcxx_requires_nonempty() +# define __glibcxx_requires_subscript(_N) +#else + +// Verify that [_First, _Last) forms a non-empty iterator range. +# define __glibcxx_requires_non_empty_range(_First,_Last) \ + __glibcxx_assert(__builtin_expect(_First != _Last, true)) +# define __glibcxx_requires_subscript(_N) \ + __glibcxx_assert(__builtin_expect(_N < this->size(), true)) +// Verify that the container is nonempty +# define __glibcxx_requires_nonempty() \ + __glibcxx_assert(__builtin_expect(!this->empty(), true)) +#endif + +#ifdef _GLIBCXX_DEBUG +# define _GLIBCXX_DEBUG_ASSERT(_Condition) __glibcxx_assert(_Condition) + +# ifdef _GLIBCXX_DEBUG_PEDANTIC +# define _GLIBCXX_DEBUG_PEDASSERT(_Condition) _GLIBCXX_DEBUG_ASSERT(_Condition) +# else +# define _GLIBCXX_DEBUG_PEDASSERT(_Condition) +# endif + +# define _GLIBCXX_DEBUG_ONLY(_Statement) _Statement +#endif + +#endif // _GLIBCXX_DEBUG_ASSERTIONS diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/bitset b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/bitset similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/bitset rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/bitset index 9cbf45710..95bf21758 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/bitset +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/bitset @@ -1,6 +1,6 @@ // Debugging bitset implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,6 +29,8 @@ #ifndef _GLIBCXX_DEBUG_BITSET #define _GLIBCXX_DEBUG_BITSET +#pragma GCC system_header + #include #include #include @@ -48,7 +50,7 @@ namespace __debug typedef _GLIBCXX_STD_C::bitset<_Nb> _Base; public: - // In C++0x we rely on normal reference type to preserve the property + // In C++11 we rely on normal reference type to preserve the property // of bitset to be use as a literal. // TODO: Find another solution. #if __cplusplus >= 201103L @@ -64,8 +66,7 @@ namespace __debug friend class bitset; reference(); - reference(const _Base_ref& __base, - bitset* __seq __attribute__((__unused__))) _GLIBCXX_NOEXCEPT + reference(const _Base_ref& __base, bitset* __seq) _GLIBCXX_NOEXCEPT : _Base_ref(__base) , _Safe_iterator_base(__seq, false) { } @@ -79,7 +80,7 @@ namespace __debug reference& operator=(bool __x) _GLIBCXX_NOEXCEPT { - _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(), + _GLIBCXX_DEBUG_VERIFY(!this->_M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_write) ._M_iterator(*this)); *static_cast<_Base_ref*>(this) = __x; @@ -89,10 +90,10 @@ namespace __debug reference& operator=(const reference& __x) _GLIBCXX_NOEXCEPT { - _GLIBCXX_DEBUG_VERIFY(! __x._M_singular(), + _GLIBCXX_DEBUG_VERIFY(!__x._M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_read) ._M_iterator(__x)); - _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(), + _GLIBCXX_DEBUG_VERIFY(!this->_M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_write) ._M_iterator(*this)); *static_cast<_Base_ref*>(this) = __x; @@ -102,7 +103,7 @@ namespace __debug bool operator~() const _GLIBCXX_NOEXCEPT { - _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(), + _GLIBCXX_DEBUG_VERIFY(!this->_M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_read) ._M_iterator(*this)); return ~(*static_cast(this)); @@ -110,7 +111,7 @@ namespace __debug operator bool() const _GLIBCXX_NOEXCEPT { - _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(), + _GLIBCXX_DEBUG_VERIFY(!this->_M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_read) ._M_iterator(*this)); return *static_cast(this); @@ -119,7 +120,7 @@ namespace __debug reference& flip() _GLIBCXX_NOEXCEPT { - _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(), + _GLIBCXX_DEBUG_VERIFY(!this->_M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_flip) ._M_iterator(*this)); _Base_ref::flip(); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/debug.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/debug.h similarity index 64% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/debug.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/debug.h index 161108de0..d59d3c653 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/debug.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/debug.h @@ -1,6 +1,6 @@ // Debugging support implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -37,6 +37,8 @@ * the standard library algorithms. */ +#include + // Debug mode namespaces. /** @@ -58,12 +60,8 @@ namespace __gnu_debug #ifndef _GLIBCXX_DEBUG -# define _GLIBCXX_DEBUG_ASSERT(_Condition) -# define _GLIBCXX_DEBUG_PEDASSERT(_Condition) -# define _GLIBCXX_DEBUG_ONLY(_Statement) ; # define __glibcxx_requires_cond(_Cond,_Msg) # define __glibcxx_requires_valid_range(_First,_Last) -# define __glibcxx_requires_non_empty_range(_First,_Last) # define __glibcxx_requires_sorted(_First,_Last) # define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) # define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) @@ -74,55 +72,51 @@ namespace __gnu_debug # define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred) # define __glibcxx_requires_heap(_First,_Last) # define __glibcxx_requires_heap_pred(_First,_Last,_Pred) -# define __glibcxx_requires_nonempty() # define __glibcxx_requires_string(_String) # define __glibcxx_requires_string_len(_String,_Len) -# define __glibcxx_requires_subscript(_N) +# define __glibcxx_requires_irreflexive(_First,_Last) +# define __glibcxx_requires_irreflexive2(_First,_Last) +# define __glibcxx_requires_irreflexive_pred(_First,_Last,_Pred) +# define __glibcxx_requires_irreflexive_pred2(_First,_Last,_Pred) #else # include -#define _GLIBCXX_DEBUG_ASSERT(_Condition) __glibcxx_assert(_Condition) - -#ifdef _GLIBCXX_DEBUG_PEDANTIC -# define _GLIBCXX_DEBUG_PEDASSERT(_Condition) _GLIBCXX_DEBUG_ASSERT(_Condition) -#else -# define _GLIBCXX_DEBUG_PEDASSERT(_Condition) -#endif - -# define _GLIBCXX_DEBUG_ONLY(_Statement) _Statement - # define __glibcxx_requires_cond(_Cond,_Msg) _GLIBCXX_DEBUG_VERIFY(_Cond,_Msg) -# define __glibcxx_requires_valid_range(_First,_Last) \ - __glibcxx_check_valid_range(_First,_Last) -# define __glibcxx_requires_non_empty_range(_First,_Last) \ - __glibcxx_check_non_empty_range(_First,_Last) -# define __glibcxx_requires_sorted(_First,_Last) \ - __glibcxx_check_sorted(_First,_Last) -# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) \ - __glibcxx_check_sorted_pred(_First,_Last,_Pred) -# define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) \ - __glibcxx_check_sorted_set(_First1,_Last1,_First2) +# define __glibcxx_requires_valid_range(_First,_Last) \ + __glibcxx_check_valid_range(_First,_Last) +# define __glibcxx_requires_sorted(_First,_Last) \ + __glibcxx_check_sorted(_First,_Last) +# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) \ + __glibcxx_check_sorted_pred(_First,_Last,_Pred) +# define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) \ + __glibcxx_check_sorted_set(_First1,_Last1,_First2) # define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred) \ - __glibcxx_check_sorted_set_pred(_First1,_Last1,_First2,_Pred) + __glibcxx_check_sorted_set_pred(_First1,_Last1,_First2,_Pred) # define __glibcxx_requires_partitioned_lower(_First,_Last,_Value) \ - __glibcxx_check_partitioned_lower(_First,_Last,_Value) + __glibcxx_check_partitioned_lower(_First,_Last,_Value) # define __glibcxx_requires_partitioned_upper(_First,_Last,_Value) \ - __glibcxx_check_partitioned_upper(_First,_Last,_Value) + __glibcxx_check_partitioned_upper(_First,_Last,_Value) # define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred) \ - __glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred) + __glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred) # define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred) \ - __glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred) -# define __glibcxx_requires_heap(_First,_Last) \ - __glibcxx_check_heap(_First,_Last) -# define __glibcxx_requires_heap_pred(_First,_Last,_Pred) \ - __glibcxx_check_heap_pred(_First,_Last,_Pred) -# define __glibcxx_requires_nonempty() __glibcxx_check_nonempty() + __glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred) +# define __glibcxx_requires_heap(_First,_Last) \ + __glibcxx_check_heap(_First,_Last) +# define __glibcxx_requires_heap_pred(_First,_Last,_Pred) \ + __glibcxx_check_heap_pred(_First,_Last,_Pred) # define __glibcxx_requires_string(_String) __glibcxx_check_string(_String) # define __glibcxx_requires_string_len(_String,_Len) \ - __glibcxx_check_string_len(_String,_Len) -# define __glibcxx_requires_subscript(_N) __glibcxx_check_subscript(_N) + __glibcxx_check_string_len(_String,_Len) +# define __glibcxx_requires_irreflexive(_First,_Last) \ + __glibcxx_check_irreflexive(_First,_Last) +# define __glibcxx_requires_irreflexive2(_First,_Last) \ + __glibcxx_check_irreflexive2(_First,_Last) +# define __glibcxx_requires_irreflexive_pred(_First,_Last,_Pred) \ + __glibcxx_check_irreflexive_pred(_First,_Last,_Pred) +# define __glibcxx_requires_irreflexive_pred2(_First,_Last,_Pred) \ + __glibcxx_check_irreflexive_pred2(_First,_Last,_Pred) # include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/deque b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/deque similarity index 91% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/deque rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/deque index fffc5e4ab..7e3c193c1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/deque +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/deque @@ -1,6 +1,6 @@ // Debugging deque implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,6 +29,8 @@ #ifndef _GLIBCXX_DEBUG_DEQUE #define _GLIBCXX_DEBUG_DEQUE 1 +#pragma GCC system_header + #include #include #include @@ -169,9 +171,14 @@ namespace __debug void assign(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); - _Base::assign(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::assign(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::assign(__first, __last); + this->_M_invalidate_all(); } @@ -379,19 +386,33 @@ namespace __debug { emplace_back(std::move(__x)); } template +#if __cplusplus > 201402L + reference +#else void +#endif emplace_front(_Args&&... __args) { _Base::emplace_front(std::forward<_Args>(__args)...); this->_M_invalidate_all(); +#if __cplusplus > 201402L + return front(); +#endif } template +#if __cplusplus > 201402L + reference +#else void +#endif emplace_back(_Args&&... __args) { _Base::emplace_back(std::forward<_Args>(__args)...); this->_M_invalidate_all(); +#if __cplusplus > 201402L + return back(); +#endif } template @@ -460,10 +481,16 @@ namespace __debug insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { - __glibcxx_check_insert_range(__position, __first, __last); - _Base_iterator __res = _Base::insert(__position.base(), - __gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_insert_range(__position, __first, __last, __dist); + _Base_iterator __res; + if (__dist.second >= __gnu_debug::__dp_sign) + __res = _Base::insert(__position.base(), + __gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + __res = _Base::insert(__position.base(), __first, __last); + this->_M_invalidate_all(); return iterator(__res, this); } @@ -473,9 +500,16 @@ namespace __debug insert(iterator __position, _InputIterator __first, _InputIterator __last) { - __glibcxx_check_insert_range(__position, __first, __last); - _Base::insert(__position.base(), __gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_insert_range(__position, __first, __last, __dist); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__position.base(), + __gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__position.base(), __first, __last); + this->_M_invalidate_all(); } #endif @@ -570,9 +604,7 @@ namespace __debug void swap(deque& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -631,6 +663,7 @@ namespace __debug template inline void swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } } // namespace __debug diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/formatter.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/formatter.h similarity index 58% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/formatter.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/formatter.h index 6767cd926..985e3597d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/formatter.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/formatter.h @@ -1,6 +1,6 @@ // Debug-mode error formatting implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -31,7 +31,17 @@ #include #include -#include + +#if __cpp_rtti +# include +# define _GLIBCXX_TYPEID(_Type) &typeid(_Type) +#else +namespace std +{ + class type_info; +} +# define _GLIBCXX_TYPEID(_Type) 0 +#endif namespace __gnu_debug { @@ -116,11 +126,19 @@ namespace __gnu_debug __msg_valid_load_factor, // others __msg_equal_allocs, - __msg_insert_range_from_self + __msg_insert_range_from_self, + __msg_irreflexive_ordering }; class _Error_formatter { + // Tags denoting the type of parameter for construction + struct _Is_iterator { }; + struct _Is_iterator_value_type { }; + struct _Is_sequence { }; + struct _Is_instance { }; + + public: /// Whether an iterator is constant, mutable, or unknown enum _Constness { @@ -134,18 +152,14 @@ namespace __gnu_debug enum _Iterator_state { __unknown_state, - __singular, // singular, may still be attached to a sequence - __begin, // dereferenceable, and at the beginning - __middle, // dereferenceable, not at the beginning - __end, // past-the-end, may be at beginning if sequence empty - __before_begin, // before begin + __singular, // singular, may still be attached to a sequence + __begin, // dereferenceable, and at the beginning + __middle, // dereferenceable, not at the beginning + __end, // past-the-end, may be at beginning if sequence empty + __before_begin, // before begin __last_state }; - // Tags denoting the type of parameter for construction - struct _Is_iterator { }; - struct _Is_sequence { }; - // A parameter that may be referenced by an error message struct _Parameter { @@ -155,56 +169,67 @@ namespace __gnu_debug __iterator, __sequence, __integer, - __string + __string, + __instance, + __iterator_value_type } _M_kind; + struct _Type + { + const char* _M_name; + const type_info* _M_type; + }; + + struct _Instance : _Type + { + const void* _M_address; + }; + union { // When _M_kind == __iterator - struct + struct : _Instance { - const char* _M_name; - const void* _M_address; - const type_info* _M_type; - _Constness _M_constness; - _Iterator_state _M_state; - const void* _M_sequence; - const type_info* _M_seq_type; + _Constness _M_constness; + _Iterator_state _M_state; + const void* _M_sequence; + const type_info* _M_seq_type; } _M_iterator; // When _M_kind == __sequence - struct - { - const char* _M_name; - const void* _M_address; - const type_info* _M_type; - } _M_sequence; + _Instance _M_sequence; // When _M_kind == __integer struct { - const char* _M_name; - long _M_value; + const char* _M_name; + long _M_value; } _M_integer; // When _M_kind == __string struct { - const char* _M_name; - const char* _M_value; + const char* _M_name; + const char* _M_value; } _M_string; + + // When _M_kind == __instance + _Instance _M_instance; + + // When _M_kind == __iterator_value_type + _Type _M_iterator_value_type; } _M_variant; _Parameter() : _M_kind(__unused_param), _M_variant() { } - _Parameter(long __value, const char* __name) + _Parameter(long __value, const char* __name) : _M_kind(__integer), _M_variant() { _M_variant._M_integer._M_name = __name; _M_variant._M_integer._M_value = __value; } - _Parameter(const char* __value, const char* __name) + _Parameter(const char* __value, const char* __name) : _M_kind(__string), _M_variant() { _M_variant._M_string._M_name = __name; @@ -212,27 +237,19 @@ namespace __gnu_debug } template - _Parameter(const _Safe_iterator<_Iterator, _Sequence>& __it, + _Parameter(_Safe_iterator<_Iterator, _Sequence> const& __it, const char* __name, _Is_iterator) : _M_kind(__iterator), _M_variant() - { + { _M_variant._M_iterator._M_name = __name; - _M_variant._M_iterator._M_address = &__it; -#if __cpp_rtti - _M_variant._M_iterator._M_type = &typeid(__it); -#else - _M_variant._M_iterator._M_type = 0; -#endif + _M_variant._M_iterator._M_address = std::__addressof(__it); + _M_variant._M_iterator._M_type = _GLIBCXX_TYPEID(__it); _M_variant._M_iterator._M_constness = std::__are_same<_Safe_iterator<_Iterator, _Sequence>, - typename _Sequence::iterator>:: + typename _Sequence::iterator>:: __value ? __mutable_iterator : __const_iterator; _M_variant._M_iterator._M_sequence = __it._M_get_sequence(); -#if __cpp_rtti - _M_variant._M_iterator._M_seq_type = &typeid(_Sequence); -#else - _M_variant._M_iterator._M_seq_type = 0; -#endif + _M_variant._M_iterator._M_seq_type = _GLIBCXX_TYPEID(_Sequence); if (__it._M_singular()) _M_variant._M_iterator._M_state = __singular; @@ -250,27 +267,19 @@ namespace __gnu_debug } template - _Parameter(const _Safe_local_iterator<_Iterator, _Sequence>& __it, + _Parameter(_Safe_local_iterator<_Iterator, _Sequence> const& __it, const char* __name, _Is_iterator) : _M_kind(__iterator), _M_variant() { _M_variant._M_iterator._M_name = __name; - _M_variant._M_iterator._M_address = &__it; -#if __cpp_rtti - _M_variant._M_iterator._M_type = &typeid(__it); -#else - _M_variant._M_iterator._M_type = 0; -#endif + _M_variant._M_iterator._M_address = std::__addressof(__it); + _M_variant._M_iterator._M_type = _GLIBCXX_TYPEID(__it); _M_variant._M_iterator._M_constness = std::__are_same<_Safe_local_iterator<_Iterator, _Sequence>, - typename _Sequence::local_iterator>:: + typename _Sequence::local_iterator>:: __value ? __mutable_iterator : __const_iterator; _M_variant._M_iterator._M_sequence = __it._M_get_sequence(); -#if __cpp_rtti - _M_variant._M_iterator._M_seq_type = &typeid(_Sequence); -#else - _M_variant._M_iterator._M_seq_type = 0; -#endif + _M_variant._M_iterator._M_seq_type = _GLIBCXX_TYPEID(_Sequence); if (__it._M_singular()) _M_variant._M_iterator._M_state = __singular; @@ -286,99 +295,96 @@ namespace __gnu_debug } template - _Parameter(const _Type*& __it, const char* __name, _Is_iterator) - : _M_kind(__iterator), _M_variant() - { + _Parameter(const _Type* const& __it, const char* __name, _Is_iterator) + : _M_kind(__iterator), _M_variant() + { _M_variant._M_iterator._M_name = __name; - _M_variant._M_iterator._M_address = &__it; -#if __cpp_rtti - _M_variant._M_iterator._M_type = &typeid(__it); -#else - _M_variant._M_iterator._M_type = 0; -#endif - _M_variant._M_iterator._M_constness = __mutable_iterator; - _M_variant._M_iterator._M_state = __it? __unknown_state : __singular; + _M_variant._M_iterator._M_address = std::__addressof(__it); + _M_variant._M_iterator._M_type = _GLIBCXX_TYPEID(__it); + _M_variant._M_iterator._M_constness = __const_iterator; + _M_variant._M_iterator._M_state = __it ? __unknown_state : __singular; _M_variant._M_iterator._M_sequence = 0; _M_variant._M_iterator._M_seq_type = 0; } template - _Parameter(_Type*& __it, const char* __name, _Is_iterator) - : _M_kind(__iterator), _M_variant() - { + _Parameter(_Type* const& __it, const char* __name, _Is_iterator) + : _M_kind(__iterator), _M_variant() + { _M_variant._M_iterator._M_name = __name; - _M_variant._M_iterator._M_address = &__it; -#if __cpp_rtti - _M_variant._M_iterator._M_type = &typeid(__it); -#else - _M_variant._M_iterator._M_type = 0; -#endif - _M_variant._M_iterator._M_constness = __const_iterator; - _M_variant._M_iterator._M_state = __it? __unknown_state : __singular; + _M_variant._M_iterator._M_address = std::__addressof(__it); + _M_variant._M_iterator._M_type = _GLIBCXX_TYPEID(__it); + _M_variant._M_iterator._M_constness = __mutable_iterator; + _M_variant._M_iterator._M_state = __it ? __unknown_state : __singular; _M_variant._M_iterator._M_sequence = 0; _M_variant._M_iterator._M_seq_type = 0; } template - _Parameter(const _Iterator& __it, const char* __name, _Is_iterator) - : _M_kind(__iterator), _M_variant() - { + _Parameter(_Iterator const& __it, const char* __name, _Is_iterator) + : _M_kind(__iterator), _M_variant() + { _M_variant._M_iterator._M_name = __name; - _M_variant._M_iterator._M_address = &__it; -#if __cpp_rtti - _M_variant._M_iterator._M_type = &typeid(__it); -#else - _M_variant._M_iterator._M_type = 0; -#endif + _M_variant._M_iterator._M_address = std::__addressof(__it); + _M_variant._M_iterator._M_type = _GLIBCXX_TYPEID(__it); _M_variant._M_iterator._M_constness = __unknown_constness; _M_variant._M_iterator._M_state = - __gnu_debug::__check_singular(__it)? __singular : __unknown_state; + __gnu_debug::__check_singular(__it) ? __singular : __unknown_state; _M_variant._M_iterator._M_sequence = 0; _M_variant._M_iterator._M_seq_type = 0; } template - _Parameter(const _Safe_sequence<_Sequence>& __seq, + _Parameter(const _Safe_sequence<_Sequence>& __seq, const char* __name, _Is_sequence) - : _M_kind(__sequence), _M_variant() - { + : _M_kind(__sequence), _M_variant() + { _M_variant._M_sequence._M_name = __name; _M_variant._M_sequence._M_address = - static_cast(&__seq); -#if __cpp_rtti - _M_variant._M_sequence._M_type = &typeid(_Sequence); -#else - _M_variant._M_sequence._M_type = 0; -#endif + static_cast(std::__addressof(__seq)); + _M_variant._M_sequence._M_type = _GLIBCXX_TYPEID(_Sequence); } template - _Parameter(const _Sequence& __seq, const char* __name, _Is_sequence) - : _M_kind(__sequence), _M_variant() - { + _Parameter(const _Sequence& __seq, const char* __name, _Is_sequence) + : _M_kind(__sequence), _M_variant() + { _M_variant._M_sequence._M_name = __name; - _M_variant._M_sequence._M_address = &__seq; -#if __cpp_rtti - _M_variant._M_sequence._M_type = &typeid(_Sequence); -#else - _M_variant._M_sequence._M_type = 0; -#endif + _M_variant._M_sequence._M_address = std::__addressof(__seq); + _M_variant._M_sequence._M_type = _GLIBCXX_TYPEID(_Sequence); + } + + template + _Parameter(const _Iterator& __it, const char* __name, + _Is_iterator_value_type) + : _M_kind(__iterator_value_type), _M_variant() + { + _M_variant._M_iterator_value_type._M_name = __name; + _M_variant._M_iterator_value_type._M_type = + _GLIBCXX_TYPEID(typename std::iterator_traits<_Iterator>::value_type); + } + + template + _Parameter(const _Type& __inst, const char* __name, _Is_instance) + : _M_kind(__instance), _M_variant() + { + _M_variant._M_instance._M_name = __name; + _M_variant._M_instance._M_address = &__inst; + _M_variant._M_instance._M_type = _GLIBCXX_TYPEID(_Type); } void _M_print_field(const _Error_formatter* __formatter, - const char* __name) const; + const char* __name) const _GLIBCXX_DEPRECATED; void - _M_print_description(const _Error_formatter* __formatter) const; + _M_print_description(const _Error_formatter* __formatter) + const _GLIBCXX_DEPRECATED; }; - friend struct _Parameter; - - public: template - const _Error_formatter& - _M_iterator(const _Iterator& __it, const char* __name = 0) const + _Error_formatter& + _M_iterator(const _Iterator& __it, const char* __name = 0) { if (_M_num_parameters < std::size_t(__max_parameters)) _M_parameters[_M_num_parameters++] = _Parameter(__it, __name, @@ -386,79 +392,102 @@ namespace __gnu_debug return *this; } - const _Error_formatter& - _M_integer(long __value, const char* __name = 0) const + template + _Error_formatter& + _M_iterator_value_type(const _Iterator& __it, + const char* __name = 0) + { + if (_M_num_parameters < __max_parameters) + _M_parameters[_M_num_parameters++] = + _Parameter(__it, __name, _Is_iterator_value_type()); + return *this; + } + + _Error_formatter& + _M_integer(long __value, const char* __name = 0) { - if (_M_num_parameters < std::size_t(__max_parameters)) + if (_M_num_parameters < __max_parameters) _M_parameters[_M_num_parameters++] = _Parameter(__value, __name); return *this; } - const _Error_formatter& - _M_string(const char* __value, const char* __name = 0) const + _Error_formatter& + _M_string(const char* __value, const char* __name = 0) { - if (_M_num_parameters < std::size_t(__max_parameters)) + if (_M_num_parameters < __max_parameters) _M_parameters[_M_num_parameters++] = _Parameter(__value, __name); return *this; } template - const _Error_formatter& - _M_sequence(const _Sequence& __seq, const char* __name = 0) const + _Error_formatter& + _M_sequence(const _Sequence& __seq, const char* __name = 0) { - if (_M_num_parameters < std::size_t(__max_parameters)) + if (_M_num_parameters < __max_parameters) _M_parameters[_M_num_parameters++] = _Parameter(__seq, __name, _Is_sequence()); return *this; } - const _Error_formatter& - _M_message(const char* __text) const + template + _Error_formatter& + _M_instance(const _Type& __inst, const char* __name = 0) + { + if (_M_num_parameters < __max_parameters) + _M_parameters[_M_num_parameters++] = _Parameter(__inst, __name, + _Is_instance()); + return *this; + } + + _Error_formatter& + _M_message(const char* __text) { _M_text = __text; return *this; } - const _Error_formatter& + // Kept const qualifier for backward compatibility, to keep the same + // exported symbol. + _Error_formatter& _M_message(_Debug_msg_id __id) const throw (); _GLIBCXX_NORETURN void _M_error() const; - private: - _Error_formatter(const char* __file, std::size_t __line) - : _M_file(__file), _M_line(__line), _M_num_parameters(0), _M_text(0), - _M_max_length(78), _M_column(1), _M_first_line(true), _M_wordwrap(false) - { _M_get_max_length(); } - template void - _M_format_word(char*, int, const char*, _Tp) const throw (); + _M_format_word(char*, int, const char*, _Tp) + const throw () _GLIBCXX_DEPRECATED; void - _M_print_word(const char* __word) const; + _M_print_word(const char* __word) const _GLIBCXX_DEPRECATED; void - _M_print_string(const char* __string) const; + _M_print_string(const char* __string) const _GLIBCXX_DEPRECATED; + + private: + _Error_formatter(const char* __file, unsigned int __line) + : _M_file(__file), _M_line(__line), _M_num_parameters(0), _M_text(0) + { } void - _M_get_max_length() const throw (); + _M_get_max_length() const throw () _GLIBCXX_DEPRECATED; enum { __max_parameters = 9 }; - const char* _M_file; - std::size_t _M_line; - mutable _Parameter _M_parameters[__max_parameters]; - mutable std::size_t _M_num_parameters; - mutable const char* _M_text; - mutable std::size_t _M_max_length; - enum { _M_indent = 4 } ; - mutable std::size_t _M_column; - mutable bool _M_first_line; - mutable bool _M_wordwrap; + const char* _M_file; + unsigned int _M_line; + _Parameter _M_parameters[__max_parameters]; + unsigned int _M_num_parameters; + const char* _M_text; public: - static _Error_formatter - _M_at(const char* __file, std::size_t __line) - { return _Error_formatter(__file, __line); } + static _Error_formatter& + _M_at(const char* __file, unsigned int __line) + { + static _Error_formatter __formatter(__file, __line); + return __formatter; + } }; } // namespace __gnu_debug +#undef _GLIBCXX_TYPEID + #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/forward_list b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/forward_list similarity index 90% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/forward_list rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/forward_list index 0f09d23e2..cd343302b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/forward_list +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/forward_list @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,6 +36,13 @@ #include #include +// Special validity check for forward_list ranges. +#define __glibcxx_check_valid_fl_range(_First,_Last,_Dist) \ +_GLIBCXX_DEBUG_VERIFY(_First._M_valid_range(_Last, _Dist, false), \ + _M_message(__gnu_debug::__msg_valid_range) \ + ._M_iterator(_First, #_First) \ + ._M_iterator(_Last, #_Last)) + namespace __gnu_debug { /// Special iterators swap and invalidation for forward_list because of the @@ -105,7 +112,7 @@ namespace __gnu_debug __bbegin_its = __victim_base; } else - __victim_base->_M_sequence = &__lhs; + __victim_base->_M_sequence = std::__addressof(__lhs); } if (__bbegin_its) @@ -204,8 +211,11 @@ namespace __debug typedef typename _Base::const_pointer const_pointer; // 23.2.3.1 construct/copy/destroy: + + forward_list() = default; + explicit - forward_list(const allocator_type& __al = allocator_type()) + forward_list(const allocator_type& __al) noexcept : _Base(__al) { } forward_list(const forward_list& __list, const allocator_type& __al) @@ -266,9 +276,15 @@ namespace __debug void assign(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); - _Base::assign(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::assign(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::assign(__first, __last); + this->_M_invalidate_all(); } @@ -398,11 +414,19 @@ namespace __debug insert_after(const_iterator __pos, _InputIterator __first, _InputIterator __last) { - __glibcxx_check_insert_range_after(__pos, __first, __last); - return iterator(_Base::insert_after(__pos.base(), - __gnu_debug::__base(__first), - __gnu_debug::__base(__last)), - this); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_insert_range_after(__pos, __first, __last, __dist); + + if (__dist.second >= __gnu_debug::__dp_sign) + return + { + _Base::insert_after(__pos.base(), + __gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)), + this + }; + else + return { _Base::insert_after(__pos.base(), __first, __last), this }; } iterator @@ -449,7 +473,7 @@ namespace __debug void swap(forward_list& __list) - noexcept( noexcept(declval<_Base>().swap(__list)) ) + noexcept( noexcept(declval<_Base&>().swap(__list)) ) { _Safe::_M_swap(__list); _Base::swap(__list); @@ -523,7 +547,7 @@ namespace __debug splice_after(const_iterator __pos, forward_list&& __list) { __glibcxx_check_insert_after(__pos); - _GLIBCXX_DEBUG_VERIFY(&__list != this, + _GLIBCXX_DEBUG_VERIFY(std::__addressof(__list) != this, _M_message(__gnu_debug::__msg_self_splice) ._M_sequence(*this, "this")); _GLIBCXX_DEBUG_VERIFY(__list.get_allocator() == this->get_allocator(), @@ -550,7 +574,7 @@ namespace __debug _GLIBCXX_DEBUG_VERIFY(__i._M_before_dereferenceable(), _M_message(__gnu_debug::__msg_splice_bad) ._M_iterator(__i, "__i")); - _GLIBCXX_DEBUG_VERIFY(__i._M_attached_to(&__list), + _GLIBCXX_DEBUG_VERIFY(__i._M_attached_to(std::__addressof(__list)), _M_message(__gnu_debug::__msg_splice_other) ._M_iterator(__i, "__i") ._M_sequence(__list, "__list")); @@ -577,9 +601,11 @@ namespace __debug splice_after(const_iterator __pos, forward_list&& __list, const_iterator __before, const_iterator __last) { + typename __gnu_debug::_Distance_traits::__type __dist; + auto __listptr = std::__addressof(__list); __glibcxx_check_insert_after(__pos); - __glibcxx_check_valid_range(__before, __last); - _GLIBCXX_DEBUG_VERIFY(__before._M_attached_to(&__list), + __glibcxx_check_valid_fl_range(__before, __last, __dist); + _GLIBCXX_DEBUG_VERIFY(__before._M_attached_to(__listptr), _M_message(__gnu_debug::__msg_splice_other) ._M_sequence(__list, "list") ._M_iterator(__before, "before")); @@ -607,7 +633,7 @@ namespace __debug ._M_sequence(__list, "list") ._M_iterator(__before, "before") ._M_iterator(__last, "last")); - _GLIBCXX_DEBUG_VERIFY(&__list != this || __tmp != __pos.base(), + _GLIBCXX_DEBUG_VERIFY(__listptr != this || __tmp != __pos.base(), _M_message(__gnu_debug::__msg_splice_overlap) ._M_iterator(__tmp, "position") ._M_iterator(__before, "before") @@ -694,7 +720,7 @@ namespace __debug void merge(forward_list&& __list) { - if (this != &__list) + if (this != std::__addressof(__list)) { __glibcxx_check_sorted(_Base::begin(), _Base::end()); __glibcxx_check_sorted(__list._M_base().begin(), @@ -716,7 +742,7 @@ namespace __debug void merge(forward_list&& __list, _Comp __comp) { - if (this != &__list) + if (this != std::__addressof(__list)) { __glibcxx_check_sorted_pred(_Base::begin(), _Base::end(), __comp); __glibcxx_check_sorted_pred(__list._M_base().begin(), @@ -788,8 +814,8 @@ namespace __debug /// See std::forward_list::swap(). template inline void - swap(forward_list<_Tp, _Alloc>& __lx, - forward_list<_Tp, _Alloc>& __ly) + swap(forward_list<_Tp, _Alloc>& __lx, forward_list<_Tp, _Alloc>& __ly) + noexcept(noexcept(__lx.swap(__ly))) { __lx.swap(__ly); } } // namespace __debug @@ -797,7 +823,7 @@ namespace __debug namespace __gnu_debug { - template + template struct _BeforeBeginHelper > { typedef std::__debug::forward_list<_Tp, _Alloc> _Sequence; @@ -816,6 +842,19 @@ namespace __gnu_debug { return _S_Is(__it); } }; + template + struct _Sequence_traits > + { + typedef typename std::__debug::forward_list<_Tp, _Alloc>::iterator _It; + + static typename _Distance_traits<_It>::__type + _S_size(const std::__debug::forward_list<_Tp, _Alloc>& __seq) + { + return __seq.empty() + ? std::make_pair(0, __dp_exact) : std::make_pair(1, __dp_equality); + } + }; + #ifndef _GLIBCXX_DEBUG_PEDANTIC template struct _Insert_range_from_self_is_safe< diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/functions.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/functions.h similarity index 75% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/functions.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/functions.h index 3bbbd133b..be8b5a56f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/functions.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/functions.h @@ -1,6 +1,6 @@ // Debugging support implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,15 +29,13 @@ #ifndef _GLIBCXX_DEBUG_FUNCTIONS_H #define _GLIBCXX_DEBUG_FUNCTIONS_H 1 -#include -#include // for iterator_traits, categories and - // _Iter_base -#include // for __is_integer -#include // for __addressof and addressof -#include // for less +#include // for __addressof +#include // for less #if __cplusplus >= 201103L -# include // for is_lvalue_reference and __and_ +# include // for is_lvalue_reference and conditional. #endif + +#include #include namespace __gnu_debug @@ -45,9 +43,6 @@ namespace __gnu_debug template class _Safe_iterator; - template - class _Safe_local_iterator; - template struct _Insert_range_from_self_is_safe { enum { __value = 0 }; }; @@ -64,7 +59,7 @@ namespace __gnu_debug template inline bool __check_singular(const _Iterator& __x) - { return __check_singular_aux(&__x); } + { return __check_singular_aux(std::__addressof(__x)); } /** Non-NULL pointers are nonsingular. */ template @@ -85,85 +80,6 @@ namespace __gnu_debug __check_dereferenceable(const _Tp* __ptr) { return __ptr; } - /** Safe iterators know if they are dereferenceable. */ - template - inline bool - __check_dereferenceable(const _Safe_iterator<_Iterator, _Sequence>& __x) - { return __x._M_dereferenceable(); } - - /** Safe local iterators know if they are dereferenceable. */ - template - inline bool - __check_dereferenceable(const _Safe_local_iterator<_Iterator, - _Sequence>& __x) - { return __x._M_dereferenceable(); } - - /** If the distance between two random access iterators is - * nonnegative, assume the range is valid. - */ - template - inline bool - __valid_range_aux2(const _RandomAccessIterator& __first, - const _RandomAccessIterator& __last, - std::random_access_iterator_tag) - { return __last - __first >= 0; } - - /** Can't test for a valid range with input iterators, because - * iteration may be destructive. So we just assume that the range - * is valid. - */ - template - inline bool - __valid_range_aux2(const _InputIterator&, const _InputIterator&, - std::input_iterator_tag) - { return true; } - - /** We say that integral types for a valid range, and defer to other - * routines to realize what to do with integral types instead of - * iterators. - */ - template - inline bool - __valid_range_aux(const _Integral&, const _Integral&, std::__true_type) - { return true; } - - /** We have iterators, so figure out what kind of iterators that are - * to see if we can check the range ahead of time. - */ - template - inline bool - __valid_range_aux(const _InputIterator& __first, - const _InputIterator& __last, std::__false_type) - { return __valid_range_aux2(__first, __last, - std::__iterator_category(__first)); } - - /** Don't know what these iterators are, or if they are even - * iterators (we may get an integral type for InputIterator), so - * see if they are integral and pass them on to the next phase - * otherwise. - */ - template - inline bool - __valid_range(const _InputIterator& __first, const _InputIterator& __last) - { - typedef typename std::__is_integer<_InputIterator>::__type _Integral; - return __valid_range_aux(__first, __last, _Integral()); - } - - /** Safe iterators know how to check if they form a valid range. */ - template - inline bool - __valid_range(const _Safe_iterator<_Iterator, _Sequence>& __first, - const _Safe_iterator<_Iterator, _Sequence>& __last) - { return __first._M_valid_range(__last); } - - /** Safe local iterators know how to check if they form a valid range. */ - template - inline bool - __valid_range(const _Safe_local_iterator<_Iterator, _Sequence>& __first, - const _Safe_local_iterator<_Iterator, _Sequence>& __last) - { return __first._M_valid_range(__last); } - /* Checks that [first, last) is a valid range, and then returns * __first. This routine is useful when we can't use a separate * assertion statement because, e.g., we are in a constructor. @@ -281,7 +197,8 @@ namespace __gnu_debug std::__false_type) { return _Insert_range_from_self_is_safe<_Sequence>::__value - || __foreign_iterator_aux2(__it, __other, __other_end); + || __foreign_iterator_aux2(__it, std::__miter_base(__other), + std::__miter_base(__other_end)); } template - struct __is_safe_random_iterator - { - enum { __value = 0 }; - typedef std::__false_type __type; - }; +#if __cplusplus >= 201103L + struct _Irreflexive_checker + { + template + static typename std::iterator_traits<_It>::reference + __deref(); - template - struct __is_safe_random_iterator<_Safe_iterator<_Iterator, _Sequence> > - : std::__are_same:: - iterator_category> - { }; + template() < __deref<_It>())> + static bool + _S_is_valid(_It __it) + { return !(*__it < *__it); } + + // Fallback method if operator doesn't exist. + template + static bool + _S_is_valid(_Args...) + { return true; } + + template()(__deref<_It>(), __deref<_It>()))> + static bool + _S_is_valid_pred(_It __it, _Pred __pred) + { return !__pred(*__it, *__it); } + + // Fallback method if predicate can't be invoked. + template + static bool + _S_is_valid_pred(_Args...) + { return true; } + }; template - struct _Siter_base - : std::_Iter_base<_Iterator, __is_safe_random_iterator<_Iterator>::__value> - { }; + inline bool + __is_irreflexive(_Iterator __it) + { return _Irreflexive_checker::_S_is_valid(__it); } + + template + inline bool + __is_irreflexive_pred(_Iterator __it, _Pred __pred) + { return _Irreflexive_checker::_S_is_valid_pred(__it, __pred); } +#endif - /** Helper function to extract base iterator of random access safe iterator - in order to reduce performance impact of debug mode. Limited to random - access iterator because it is the only category for which it is possible - to check for correct iterators order in the __valid_range function - thanks to the < operator. - */ - template - inline typename _Siter_base<_Iterator>::iterator_type - __base(_Iterator __it) - { return _Siter_base<_Iterator>::_S_base(__it); } } // namespace __gnu_debug #endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/helper_functions.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/helper_functions.h new file mode 100644 index 000000000..80e0e80c6 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/helper_functions.h @@ -0,0 +1,211 @@ +// Debugging support implementation -*- C++ -*- + +// Copyright (C) 2003-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file debug/helper_functions.h + * This file is a GNU debug extension to the Standard C++ Library. + */ + +#ifndef _GLIBCXX_DEBUG_HELPER_FUNCTIONS_H +#define _GLIBCXX_DEBUG_HELPER_FUNCTIONS_H 1 + +#include // for iterator_traits, + // categories and _Iter_base +#include // for __is_integer + +#include // for pair + +namespace __gnu_debug +{ + /** The precision to which we can calculate the distance between + * two iterators. + */ + enum _Distance_precision + { + __dp_none, // Not even an iterator type + __dp_equality, //< Can compare iterator equality, only + __dp_sign, //< Can determine equality and ordering + __dp_exact //< Can determine distance precisely + }; + + template::__type> + struct _Distance_traits + { + private: + typedef + typename std::iterator_traits<_Iterator>::difference_type _ItDiffType; + + template::__type> + struct _DiffTraits + { typedef _DiffType __type; }; + + template + struct _DiffTraits<_DiffType, std::__true_type> + { typedef std::ptrdiff_t __type; }; + + typedef typename _DiffTraits<_ItDiffType>::__type _DiffType; + + public: + typedef std::pair<_DiffType, _Distance_precision> __type; + }; + + template + struct _Distance_traits<_Integral, std::__true_type> + { typedef std::pair __type; }; + + /** Determine the distance between two iterators with some known + * precision. + */ + template + inline typename _Distance_traits<_Iterator>::__type + __get_distance(const _Iterator& __lhs, const _Iterator& __rhs, + std::random_access_iterator_tag) + { return std::make_pair(__rhs - __lhs, __dp_exact); } + + template + inline typename _Distance_traits<_Iterator>::__type + __get_distance(const _Iterator& __lhs, const _Iterator& __rhs, + std::input_iterator_tag) + { + if (__lhs == __rhs) + return std::make_pair(0, __dp_exact); + + return std::make_pair(1, __dp_equality); + } + + template + inline typename _Distance_traits<_Iterator>::__type + __get_distance(const _Iterator& __lhs, const _Iterator& __rhs) + { return __get_distance(__lhs, __rhs, std::__iterator_category(__lhs)); } + + /** We say that integral types for a valid range, and defer to other + * routines to realize what to do with integral types instead of + * iterators. + */ + template + inline bool + __valid_range_aux(const _Integral&, const _Integral&, + typename _Distance_traits<_Integral>::__type& __dist, + std::__true_type) + { + __dist = std::make_pair(0, __dp_none); + return true; + } + + /** We have iterators, so figure out what kind of iterators that are + * to see if we can check the range ahead of time. + */ + template + inline bool + __valid_range_aux(const _InputIterator& __first, + const _InputIterator& __last, + typename _Distance_traits<_InputIterator>::__type& __dist, + std::__false_type) + { + __dist = __get_distance(__first, __last); + switch (__dist.second) + { + case __dp_none: + break; + case __dp_equality: + if (__dist.first == 0) + return true; + break; + case __dp_sign: + case __dp_exact: + return __dist.first >= 0; + } + + // Can't tell so assume it is fine. + return true; + } + + /** Don't know what these iterators are, or if they are even + * iterators (we may get an integral type for InputIterator), so + * see if they are integral and pass them on to the next phase + * otherwise. + */ + template + inline bool + __valid_range(const _InputIterator& __first, const _InputIterator& __last, + typename _Distance_traits<_InputIterator>::__type& __dist) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + return __valid_range_aux(__first, __last, __dist, _Integral()); + } + + template + inline bool + __valid_range(const _InputIterator& __first, const _InputIterator& __last) + { + typename _Distance_traits<_InputIterator>::__type __dist; + return __valid_range(__first, __last, __dist); + } + +#if __cplusplus < 201103L + // Helper struct to detect random access safe iterators. + template + struct __is_safe_random_iterator + { + enum { __value = 0 }; + typedef std::__false_type __type; + }; + + template + struct _Siter_base + : std::_Iter_base<_Iterator, __is_safe_random_iterator<_Iterator>::__value> + { }; + + /** Helper function to extract base iterator of random access safe iterator + in order to reduce performance impact of debug mode. Limited to random + access iterator because it is the only category for which it is possible + to check for correct iterators order in the __valid_range function + thanks to the < operator. + */ + template + inline typename _Siter_base<_Iterator>::iterator_type + __base(_Iterator __it) + { return _Siter_base<_Iterator>::_S_base(__it); } +#else + template + inline _Iterator + __base(_Iterator __it) + { return __it; } +#endif + +#if __cplusplus < 201103L + template + struct _Unsafe_type + { typedef _Iterator _Type; }; +#endif + + /* Remove debug mode safe iterator layer, if any. */ + template + inline _Iterator + __unsafe(_Iterator __it) + { return __it; } +} + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/list b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/list similarity index 88% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/list rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/list index 41ed7f5ff..a45ece244 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/list +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/list @@ -1,6 +1,6 @@ // Debugging list implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,6 +29,8 @@ #ifndef _GLIBCXX_DEBUG_LIST #define _GLIBCXX_DEBUG_LIST 1 +#pragma GCC system_header + #include #include #include @@ -43,12 +45,12 @@ namespace __debug class list : public __gnu_debug::_Safe_container< list<_Tp, _Allocator>, _Allocator, - __gnu_debug::_Safe_node_sequence, false>, + __gnu_debug::_Safe_node_sequence>, public _GLIBCXX_STD_C::list<_Tp, _Allocator> { - typedef _GLIBCXX_STD_C::list<_Tp, _Allocator> _Base; + typedef _GLIBCXX_STD_C::list<_Tp, _Allocator> _Base; typedef __gnu_debug::_Safe_container< - list, _Allocator, __gnu_debug::_Safe_node_sequence, false> _Safe; + list, _Allocator, __gnu_debug::_Safe_node_sequence> _Safe; typedef typename _Base::iterator _Base_iterator; typedef typename _Base::const_iterator _Base_const_iterator; @@ -94,6 +96,12 @@ namespace __debug : _Base(__l, __a) { } ~list() = default; + + list(const list& __x, const allocator_type& __a) + : _Base(__x, __a) { } + + list(list&& __x, const allocator_type& __a) + : _Base(std::move(__x), __a) { } #endif explicit @@ -102,8 +110,8 @@ namespace __debug #if __cplusplus >= 201103L explicit - list(size_type __n) - : _Base(__n) { } + list(size_type __n, const allocator_type& __a = allocator_type()) + : _Base(__n, __a) { } list(size_type __n, const _Tp& __value, const _Allocator& __a = _Allocator()) @@ -171,9 +179,15 @@ namespace __debug void assign(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); - _Base::assign(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::assign(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::assign(__first, __last); + this->_M_invalidate_all(); } @@ -435,11 +449,18 @@ namespace __debug insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { - __glibcxx_check_insert_range(__position, __first, __last); - return iterator(_Base::insert(__position.base(), - __gnu_debug::__base(__first), - __gnu_debug::__base(__last)), - this); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_insert_range(__position, __first, __last, __dist); + if (__dist.second >= __gnu_debug::__dp_sign) + return + { + _Base::insert(__position.base(), + __gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)), + this + }; + else + return { _Base::insert(__position.base(), __first, __last), this }; } #else template @@ -447,9 +468,14 @@ namespace __debug insert(iterator __position, _InputIterator __first, _InputIterator __last) { - __glibcxx_check_insert_range(__position, __first, __last); - _Base::insert(__position.base(), __gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_insert_range(__position, __first, __last, __dist); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__position.base(), __gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__position.base(), __first, __last); } #endif @@ -501,9 +527,7 @@ namespace __debug void swap(list& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -524,7 +548,7 @@ namespace __debug splice(iterator __position, list& __x) #endif { - _GLIBCXX_DEBUG_VERIFY(&__x != this, + _GLIBCXX_DEBUG_VERIFY(std::__addressof(__x) != this, _M_message(__gnu_debug::__msg_self_splice) ._M_sequence(*this, "this")); this->_M_transfer_from_if(__x, _Not_equal(__x._M_base().end())); @@ -552,7 +576,7 @@ namespace __debug _GLIBCXX_DEBUG_VERIFY(__i._M_dereferenceable(), _M_message(__gnu_debug::__msg_splice_bad) ._M_iterator(__i, "__i")); - _GLIBCXX_DEBUG_VERIFY(__i._M_attached_to(&__x), + _GLIBCXX_DEBUG_VERIFY(__i._M_attached_to(std::__addressof(__x)), _M_message(__gnu_debug::__msg_splice_other) ._M_iterator(__i, "__i")._M_sequence(__x, "__x")); @@ -580,7 +604,7 @@ namespace __debug { __glibcxx_check_insert(__position); __glibcxx_check_valid_range(__first, __last); - _GLIBCXX_DEBUG_VERIFY(__first._M_attached_to(&__x), + _GLIBCXX_DEBUG_VERIFY(__first._M_attached_to(std::__addressof(__x)), _M_message(__gnu_debug::__msg_splice_other) ._M_sequence(__x, "x") ._M_iterator(__first, "first")); @@ -595,7 +619,8 @@ namespace __debug _M_message(__gnu_debug::__msg_valid_range) ._M_iterator(__first, "first") ._M_iterator(__last, "last")); - _GLIBCXX_DEBUG_VERIFY(&__x != this || __tmp != __position.base(), + _GLIBCXX_DEBUG_VERIFY(std::__addressof(__x) != this + || __tmp != __position.base(), _M_message(__gnu_debug::__msg_splice_overlap) ._M_iterator(__tmp, "position") ._M_iterator(__first, "first") @@ -685,7 +710,7 @@ namespace __debug { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 300. list::merge() specification incomplete - if (this != &__x) + if (this != std::__addressof(__x)) { __glibcxx_check_sorted(_Base::begin(), _Base::end()); __glibcxx_check_sorted(__x.begin().base(), __x.end().base()); @@ -710,7 +735,7 @@ namespace __debug { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 300. list::merge() specification incomplete - if (this != &__x) + if (this != std::__addressof(__x)) { __glibcxx_check_sorted_pred(_Base::begin(), _Base::end(), __comp); @@ -783,18 +808,35 @@ namespace __debug template inline void swap(list<_Tp, _Alloc>& __lhs, list<_Tp, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } } // namespace __debug } // namespace std -#ifndef _GLIBCXX_DEBUG_PEDANTIC namespace __gnu_debug { +#ifndef _GLIBCXX_USE_CXX11_ABI + // If not using C++11 list::size() is not in O(1) so we do not use it. + template + struct _Sequence_traits > + { + typedef typename std::__debug::list<_Tp, _Alloc>::iterator _It; + + static typename _Distance_traits<_It>::__type + _S_size(const std::__debug::list<_Tp, _Alloc>& __seq) + { + return __seq.empty() + ? std::make_pair(0, __dp_exact) : std::make_pair(1, __dp_equality); + } + }; +#endif + +#ifndef _GLIBCXX_DEBUG_PEDANTIC template struct _Insert_range_from_self_is_safe > { enum { __value = 1 }; }; -} #endif +} #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/macros.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/macros.h similarity index 88% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/macros.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/macros.h index f796e7187..2ecba5534 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/macros.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/macros.h @@ -1,6 +1,6 @@ // Debugging support implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -56,6 +56,12 @@ _GLIBCXX_DEBUG_VERIFY(__gnu_debug::__valid_range(_First, _Last), \ ._M_iterator(_First, #_First) \ ._M_iterator(_Last, #_Last)) +#define __glibcxx_check_valid_range2(_First,_Last,_Dist) \ +_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__valid_range(_First, _Last, _Dist), \ + _M_message(__gnu_debug::__msg_valid_range) \ + ._M_iterator(_First, #_First) \ + ._M_iterator(_Last, #_Last)) + // Verify that [_First, _Last) forms a non-empty iterator range. #define __glibcxx_check_non_empty_range(_First,_Last) \ _GLIBCXX_DEBUG_VERIFY(_First != _Last, \ @@ -104,8 +110,8 @@ _GLIBCXX_DEBUG_VERIFY(!_Position._M_is_end(), \ * Note that this macro is only valid when the container is a * _Safe_sequence and the _Position iterator is a _Safe_iterator. */ -#define __glibcxx_check_insert_range(_Position,_First,_Last) \ -__glibcxx_check_valid_range(_First,_Last); \ +#define __glibcxx_check_insert_range(_Position,_First,_Last,_Dist) \ +__glibcxx_check_valid_range2(_First,_Last,_Dist); \ __glibcxx_check_insert(_Position); \ _GLIBCXX_DEBUG_VERIFY(__gnu_debug::__foreign_iterator(_Position,_First,_Last),\ _M_message(__gnu_debug::__msg_insert_range_from_self)\ @@ -123,8 +129,8 @@ _GLIBCXX_DEBUG_VERIFY(__gnu_debug::__foreign_iterator(_Position,_First,_Last),\ * Note that this macro is only valid when the container is a * _Safe_sequence and the _Position iterator is a _Safe_iterator. */ -#define __glibcxx_check_insert_range_after(_Position,_First,_Last) \ -__glibcxx_check_valid_range(_First,_Last); \ +#define __glibcxx_check_insert_range_after(_Position,_First,_Last,_Dist)\ + __glibcxx_check_valid_range2(_First,_Last,_Dist); \ __glibcxx_check_insert_after(_Position); \ _GLIBCXX_DEBUG_VERIFY(__gnu_debug::__foreign_iterator(_Position,_First,_Last),\ _M_message(__gnu_debug::__msg_insert_range_from_self)\ @@ -352,13 +358,41 @@ _GLIBCXX_DEBUG_VERIFY(_This.get_allocator() == _Other.get_allocator(), \ _M_message(__gnu_debug::__msg_equal_allocs) \ ._M_sequence(_This, "this")) -#ifdef _GLIBCXX_DEBUG_PEDANTIC -# define __glibcxx_check_string(_String) _GLIBCXX_DEBUG_ASSERT(_String != 0) -# define __glibcxx_check_string_len(_String,_Len) \ - _GLIBCXX_DEBUG_ASSERT(_String != 0 || _Len == 0) +#define __glibcxx_check_string(_String) _GLIBCXX_DEBUG_PEDASSERT(_String != 0) +#define __glibcxx_check_string_len(_String,_Len) \ + _GLIBCXX_DEBUG_PEDASSERT(_String != 0 || _Len == 0) + +// Verify that a predicate is irreflexive +#define __glibcxx_check_irreflexive(_First,_Last) \ + _GLIBCXX_DEBUG_VERIFY(_First == _Last || !(*_First < *_First), \ + _M_message(__gnu_debug::__msg_irreflexive_ordering) \ + ._M_iterator_value_type(_First, "< operator type")) + +#if __cplusplus >= 201103L +# define __glibcxx_check_irreflexive2(_First,_Last) \ + _GLIBCXX_DEBUG_VERIFY(_First == _Last \ + || __gnu_debug::__is_irreflexive(_First), \ + _M_message(__gnu_debug::__msg_irreflexive_ordering) \ + ._M_iterator_value_type(_First, "< operator type")) #else -# define __glibcxx_check_string(_String) -# define __glibcxx_check_string_len(_String,_Len) +# define __glibcxx_check_irreflexive2(_First,_Last) +#endif + +#define __glibcxx_check_irreflexive_pred(_First,_Last,_Pred) \ + _GLIBCXX_DEBUG_VERIFY(_First == _Last || !_Pred(*_First, *_First), \ + _M_message(__gnu_debug::__msg_irreflexive_ordering) \ + ._M_instance(_Pred, "functor") \ + ._M_iterator_value_type(_First, "ordered type")) + +#if __cplusplus >= 201103L +# define __glibcxx_check_irreflexive_pred2(_First,_Last,_Pred) \ + _GLIBCXX_DEBUG_VERIFY(_First == _Last \ + ||__gnu_debug::__is_irreflexive_pred(_First, _Pred), \ + _M_message(__gnu_debug::__msg_irreflexive_ordering) \ + ._M_instance(_Pred, "functor") \ + ._M_iterator_value_type(_First, "ordered type")) +#else +# define __glibcxx_check_irreflexive_pred2(_First,_Last,_Pred) #endif #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/map b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/map similarity index 93% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/map rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/map index 2593b2b45..eaa560011 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/map +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/map @@ -1,6 +1,6 @@ // Debugging map/multimap implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,6 +29,8 @@ #ifndef _GLIBCXX_DEBUG_MAP #define _GLIBCXX_DEBUG_MAP 1 +#pragma GCC system_header + #include #include #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/map.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/map.h similarity index 71% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/map.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/map.h index 53d8ecc69..c27597905 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/map.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/map.h @@ -1,6 +1,6 @@ // Debugging map implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -307,11 +307,143 @@ namespace __debug void insert(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); - _Base::insert(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__first, __last); } + +#if __cplusplus > 201402L + template + pair + try_emplace(const key_type& __k, _Args&&... __args) + { + auto __res = _Base::try_emplace(__k, + std::forward<_Args>(__args)...); + return { iterator(__res.first, this), __res.second }; + } + + template + pair + try_emplace(key_type&& __k, _Args&&... __args) + { + auto __res = _Base::try_emplace(std::move(__k), + std::forward<_Args>(__args)...); + return { iterator(__res.first, this), __res.second }; + } + + template + iterator + try_emplace(const_iterator __hint, const key_type& __k, + _Args&&... __args) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::try_emplace(__hint.base(), __k, + std::forward<_Args>(__args)...), + this); + } + + template + iterator + try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::try_emplace(__hint.base(), std::move(__k), + std::forward<_Args>(__args)...), + this); + } + + template + std::pair + insert_or_assign(const key_type& __k, _Obj&& __obj) + { + auto __res = _Base::insert_or_assign(__k, + std::forward<_Obj>(__obj)); + return { iterator(__res.first, this), __res.second }; + } + + template + std::pair + insert_or_assign(key_type&& __k, _Obj&& __obj) + { + auto __res = _Base::insert_or_assign(std::move(__k), + std::forward<_Obj>(__obj)); + return { iterator(__res.first, this), __res.second }; + } + + template + iterator + insert_or_assign(const_iterator __hint, + const key_type& __k, _Obj&& __obj) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert_or_assign(__hint.base(), __k, + std::forward<_Obj>(__obj)), + this); + } + + template + iterator + insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert_or_assign(__hint.base(), + std::move(__k), + std::forward<_Obj>(__obj)), + this); + } +#endif // C++17 + +#if __cplusplus > 201402L + using node_type = typename _Base::node_type; + + struct insert_return_type + { + bool inserted; + iterator position; + node_type node; + }; + + node_type + extract(const_iterator __position) + { + __glibcxx_check_erase(__position); + this->_M_invalidate_if(_Equal(__position.base())); + return _Base::extract(__position.base()); + } + + node_type + extract(const key_type& __key) + { + const auto __position = find(__key); + if (__position != end()) + return extract(__position); + return {}; + } + + insert_return_type + insert(node_type&& __nh) + { + auto __ret = _Base::insert(std::move(__nh)); + iterator __pos = iterator(__ret.position, this); + return { __ret.inserted, __pos, std::move(__ret.node) }; + } + + iterator + insert(const_iterator __hint, node_type&& __nh) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert(__hint.base(), std::move(__nh)), this); + } + + using _Base::merge; +#endif // C++17 + #if __cplusplus >= 201103L iterator erase(const_iterator __position) @@ -388,9 +520,7 @@ namespace __debug void swap(map& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -412,28 +542,82 @@ namespace __debug find(const key_type& __x) { return iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + find(const _Kt& __x) + { return { _Base::find(__x), this }; } +#endif + const_iterator find(const key_type& __x) const { return const_iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + find(const _Kt& __x) const + { return { _Base::find(__x), this }; } +#endif + using _Base::count; iterator lower_bound(const key_type& __x) { return iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + lower_bound(const _Kt& __x) + { return { _Base::lower_bound(__x), this }; } +#endif + const_iterator lower_bound(const key_type& __x) const { return const_iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + lower_bound(const _Kt& __x) const + { return { _Base::lower_bound(__x), this }; } +#endif + iterator upper_bound(const key_type& __x) { return iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + upper_bound(const _Kt& __x) + { return { _Base::upper_bound(__x), this }; } +#endif + const_iterator upper_bound(const key_type& __x) const { return const_iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + upper_bound(const _Kt& __x) const + { return { _Base::upper_bound(__x), this }; } +#endif + std::pair equal_range(const key_type& __x) { @@ -443,6 +627,18 @@ namespace __debug iterator(__res.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) + { + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + std::pair equal_range(const key_type& __x) const { @@ -452,6 +648,18 @@ namespace __debug const_iterator(__res.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) const + { + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + _Base& _M_base() _GLIBCXX_NOEXCEPT { return *this; } @@ -506,6 +714,7 @@ namespace __debug inline void swap(map<_Key, _Tp, _Compare, _Allocator>& __lhs, map<_Key, _Tp, _Compare, _Allocator>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } } // namespace __debug diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/multimap.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/multimap.h similarity index 81% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/multimap.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/multimap.h index 5c7f2a91e..f971cfa41 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/multimap.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/multimap.h @@ -1,6 +1,6 @@ // Debugging multimap implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -286,11 +286,50 @@ namespace __debug void insert(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); - _Base::insert(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__first, __last); } +#if __cplusplus > 201402L + using node_type = typename _Base::node_type; + + node_type + extract(const_iterator __position) + { + __glibcxx_check_erase(__position); + this->_M_invalidate_if(_Equal(__position.base())); + return _Base::extract(__position.base()); + } + + node_type + extract(const key_type& __key) + { + const auto __position = find(__key); + if (__position != end()) + return extract(__position); + return {}; + } + + iterator + insert(node_type&& __nh) + { return iterator(_Base::insert(std::move(__nh)), this); } + + iterator + insert(const_iterator __hint, node_type&& __nh) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert(__hint.base(), std::move(__nh)), this); + } + + using _Base::merge; +#endif // C++17 + #if __cplusplus >= 201103L iterator erase(const_iterator __position) @@ -369,9 +408,7 @@ namespace __debug void swap(multimap& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -393,28 +430,82 @@ namespace __debug find(const key_type& __x) { return iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + find(const _Kt& __x) + { return { _Base::find(__x), this }; } +#endif + const_iterator find(const key_type& __x) const { return const_iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + find(const _Kt& __x) const + { return { _Base::find(__x), this }; } +#endif + using _Base::count; iterator lower_bound(const key_type& __x) { return iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + lower_bound(const _Kt& __x) + { return { _Base::lower_bound(__x), this }; } +#endif + const_iterator lower_bound(const key_type& __x) const { return const_iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + lower_bound(const _Kt& __x) const + { return { _Base::lower_bound(__x), this }; } +#endif + iterator upper_bound(const key_type& __x) { return iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + upper_bound(const _Kt& __x) + { return { _Base::upper_bound(__x), this }; } +#endif + const_iterator upper_bound(const key_type& __x) const { return const_iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + upper_bound(const _Kt& __x) const + { return { _Base::upper_bound(__x), this }; } +#endif + std::pair equal_range(const key_type& __x) { @@ -424,6 +515,18 @@ namespace __debug iterator(__res.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) + { + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + std::pair equal_range(const key_type& __x) const { @@ -433,6 +536,18 @@ namespace __debug const_iterator(__res.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) const + { + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + _Base& _M_base() _GLIBCXX_NOEXCEPT { return *this; } @@ -487,6 +602,7 @@ namespace __debug inline void swap(multimap<_Key, _Tp, _Compare, _Allocator>& __lhs, multimap<_Key, _Tp, _Compare, _Allocator>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } } // namespace __debug diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/multiset.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/multiset.h similarity index 81% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/multiset.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/multiset.h index 8dec44e73..97c7b843f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/multiset.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/multiset.h @@ -1,6 +1,6 @@ // Debugging multiset implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -271,9 +271,14 @@ namespace __debug void insert(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); - _Base::insert(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__first, __last); } #if __cplusplus >= 201103L @@ -282,6 +287,40 @@ namespace __debug { _Base::insert(__l); } #endif +#if __cplusplus > 201402L + using node_type = typename _Base::node_type; + + node_type + extract(const_iterator __position) + { + __glibcxx_check_erase(__position); + this->_M_invalidate_if(_Equal(__position.base())); + return _Base::extract(__position.base()); + } + + node_type + extract(const key_type& __key) + { + const auto __position = find(__key); + if (__position != end()) + return extract(__position); + return {}; + } + + iterator + insert(node_type&& __nh) + { return iterator(_Base::insert(std::move(__nh)), this); } + + iterator + insert(const_iterator __hint, node_type&& __nh) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert(__hint.base(), std::move(__nh)), this); + } + + using _Base::merge; +#endif // C++17 + #if __cplusplus >= 201103L iterator erase(const_iterator __position) @@ -356,9 +395,7 @@ namespace __debug void swap(multiset& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -386,6 +423,22 @@ namespace __debug find(const key_type& __x) const { return const_iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + find(const _Kt& __x) + { return { _Base::find(__x), this }; } + + template::type> + const_iterator + find(const _Kt& __x) const + { return { _Base::find(__x), this }; } +#endif + using _Base::count; iterator @@ -398,6 +451,22 @@ namespace __debug lower_bound(const key_type& __x) const { return const_iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + lower_bound(const _Kt& __x) + { return { _Base::lower_bound(__x), this }; } + + template::type> + const_iterator + lower_bound(const _Kt& __x) const + { return { _Base::lower_bound(__x), this }; } +#endif + iterator upper_bound(const key_type& __x) { return iterator(_Base::upper_bound(__x), this); } @@ -408,6 +477,22 @@ namespace __debug upper_bound(const key_type& __x) const { return const_iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + upper_bound(const _Kt& __x) + { return { _Base::upper_bound(__x), this }; } + + template::type> + const_iterator + upper_bound(const _Kt& __x) const + { return { _Base::upper_bound(__x), this }; } +#endif + std::pair equal_range(const key_type& __x) { @@ -428,6 +513,28 @@ namespace __debug const_iterator(__res.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) + { + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } + + template::type> + std::pair + equal_range(const _Kt& __x) const + { + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + _Base& _M_base() _GLIBCXX_NOEXCEPT { return *this; } @@ -475,6 +582,7 @@ namespace __debug void swap(multiset<_Key, _Compare, _Allocator>& __x, multiset<_Key, _Compare, _Allocator>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { return __x.swap(__y); } } // namespace __debug diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_base.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_base.h index c9f32bf2a..3c86e5615 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_base.h @@ -1,6 +1,6 @@ // Safe sequence/iterator base implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -49,6 +49,8 @@ namespace __gnu_debug */ class _Safe_iterator_base { + friend class _Safe_sequence_base; + public: /** The sequence this iterator references; may be NULL to indicate a singular iterator. */ @@ -101,7 +103,6 @@ namespace __gnu_debug __gnu_cxx::__mutex& _M_get_mutex() throw (); - public: /** Attaches this iterator to the given sequence, detaching it * from whatever sequence it was attached to originally. If the * new sequence is the NULL pointer, the iterator is left @@ -120,6 +121,7 @@ namespace __gnu_debug void _M_detach(); + public: /** Likewise, but not thread-safe. */ void _M_detach_single() throw (); @@ -159,6 +161,13 @@ namespace __gnu_debug } }; + /** Iterators that derive from _Safe_iterator_base can be determined singular + * or non-singular. + **/ + inline bool + __check_singular_aux(const _Safe_iterator_base* __x) + { return __x->_M_singular(); } + /** * @brief Base class that supports tracking of iterators that * reference a sequence. @@ -178,6 +187,8 @@ namespace __gnu_debug */ class _Safe_sequence_base { + friend class _Safe_iterator_base; + public: /// The list of mutable iterators that reference this container _Safe_iterator_base* _M_iterators; @@ -197,6 +208,11 @@ namespace __gnu_debug #if __cplusplus >= 201103L _Safe_sequence_base(const _Safe_sequence_base&) noexcept : _Safe_sequence_base() { } + + // Move constructor swap iterators. + _Safe_sequence_base(_Safe_sequence_base&& __seq) noexcept + : _Safe_sequence_base() + { _M_swap(__seq); } #endif /** Notify all iterators that reference this sequence that the @@ -235,12 +251,12 @@ namespace __gnu_debug __gnu_cxx::__mutex& _M_get_mutex() throw (); - public: /** Invalidates all iterators. */ void _M_invalidate_all() const { if (++_M_version == 0) _M_version = 1; } + private: /** Attach an iterator to this sequence. */ void _M_attach(_Safe_iterator_base* __it, bool __constant); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_container.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_container.h similarity index 93% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_container.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_container.h index 00232b799..3d44c15cd 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_container.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_container.h @@ -1,6 +1,6 @@ // Safe container implementation -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -55,12 +55,9 @@ namespace __gnu_debug #if __cplusplus >= 201103L _Safe_container() = default; _Safe_container(const _Safe_container&) = default; - _Safe_container(_Safe_container&& __x) noexcept - : _Safe_container() - { _Base::_M_swap(__x); } + _Safe_container(_Safe_container&&) = default; - _Safe_container(_Safe_container&& __x, - const _Alloc& __a) + _Safe_container(_Safe_container&& __x, const _Alloc& __a) : _Safe_container() { if (__x._M_cont().get_allocator() == __a) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_iterator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_iterator.h similarity index 79% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_iterator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_iterator.h index 1eea238b9..055675793 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_iterator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_iterator.h @@ -1,6 +1,6 @@ // Safe iterator implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,7 +29,7 @@ #ifndef _GLIBCXX_DEBUG_SAFE_ITERATOR_H #define _GLIBCXX_DEBUG_SAFE_ITERATOR_H 1 -#include +#include #include #include #include @@ -41,7 +41,7 @@ namespace __gnu_debug /** Helper struct to deal with sequence offering a before_begin * iterator. **/ - template + template struct _BeforeBeginHelper { template @@ -55,50 +55,17 @@ namespace __gnu_debug { return __it.base() == __it._M_get_sequence()->_M_base().begin(); } }; - /** Iterators that derive from _Safe_iterator_base can be determined singular - * or non-singular. - **/ - inline bool - __check_singular_aux(const _Safe_iterator_base* __x) - { return __x->_M_singular(); } - - /** The precision to which we can calculate the distance between - * two iterators. - */ - enum _Distance_precision + /** Sequence traits giving the size of a container if possible. */ + template + struct _Sequence_traits { - __dp_equality, //< Can compare iterator equality, only - __dp_sign, //< Can determine equality and ordering - __dp_exact //< Can determine distance precisely + typedef _Distance_traits _DistTraits; + + static typename _DistTraits::__type + _S_size(const _Sequence& __seq) + { return std::make_pair(__seq.size(), __dp_exact); } }; - /** Determine the distance between two iterators with some known - * precision. - */ - template - inline std::pair::difference_type, - _Distance_precision> - __get_distance(const _Iterator& __lhs, const _Iterator& __rhs, - std::random_access_iterator_tag) - { return std::make_pair(__rhs - __lhs, __dp_exact); } - - template - inline std::pair::difference_type, - _Distance_precision> - __get_distance(const _Iterator& __lhs, const _Iterator& __rhs, - std::forward_iterator_tag) - { return std::make_pair(__lhs == __rhs? 0 : 1, __dp_equality); } - - template - inline std::pair::difference_type, - _Distance_precision> - __get_distance(const _Iterator& __lhs, const _Iterator& __rhs) - { - typedef typename std::iterator_traits<_Iterator>::iterator_category - _Category; - return __get_distance(__lhs, __rhs, _Category()); - } - /** \brief Safe iterator wrapper. * * The class template %_Safe_iterator is a wrapper around an @@ -307,7 +274,6 @@ namespace __gnu_debug /** * @brief Iterator dereference. * @pre iterator is dereferenceable - * @todo Make this correct w.r.t. iterators that return proxies */ pointer operator->() const _GLIBCXX_NOEXCEPT @@ -315,7 +281,7 @@ namespace __gnu_debug _GLIBCXX_DEBUG_VERIFY(this->_M_dereferenceable(), _M_message(__msg_bad_deref) ._M_iterator(*this, "this")); - return std::__addressof(*base()); + return base().operator->(); } // ------ Input iterator requirements ------ @@ -329,7 +295,7 @@ namespace __gnu_debug _GLIBCXX_DEBUG_VERIFY(this->_M_incrementable(), _M_message(__msg_bad_inc) ._M_iterator(*this, "this")); - __gnu_cxx::__scoped_lock(this->_M_get_mutex()); + __gnu_cxx::__scoped_lock __l(this->_M_get_mutex()); ++base(); return *this; } @@ -487,7 +453,9 @@ namespace __gnu_debug // Is the iterator range [*this, __rhs) valid? bool - _M_valid_range(const _Safe_iterator& __rhs) const; + _M_valid_range(const _Safe_iterator& __rhs, + std::pair& __dist, + bool __check_dereferenceable = true) const; // The sequence this iterator references. typename @@ -768,6 +736,169 @@ namespace __gnu_debug operator+(typename _Safe_iterator<_Iterator,_Sequence>::difference_type __n, const _Safe_iterator<_Iterator, _Sequence>& __i) _GLIBCXX_NOEXCEPT { return __i + __n; } + + /** Safe iterators know if they are dereferenceable. */ + template + inline bool + __check_dereferenceable(const _Safe_iterator<_Iterator, _Sequence>& __x) + { return __x._M_dereferenceable(); } + + /** Safe iterators know how to check if they form a valid range. */ + template + inline bool + __valid_range(const _Safe_iterator<_Iterator, _Sequence>& __first, + const _Safe_iterator<_Iterator, _Sequence>& __last, + typename _Distance_traits<_Iterator>::__type& __dist) + { return __first._M_valid_range(__last, __dist); } + + /** Safe iterators can help to get better distance knowledge. */ + template + inline typename _Distance_traits<_Iterator>::__type + __get_distance(const _Safe_iterator<_Iterator, _Sequence>& __first, + const _Safe_iterator<_Iterator, _Sequence>& __last, + std::random_access_iterator_tag) + { return std::make_pair(__last.base() - __first.base(), __dp_exact); } + + template + inline typename _Distance_traits<_Iterator>::__type + __get_distance(const _Safe_iterator<_Iterator, _Sequence>& __first, + const _Safe_iterator<_Iterator, _Sequence>& __last, + std::input_iterator_tag) + { + typedef typename _Distance_traits<_Iterator>::__type _Diff; + typedef _Sequence_traits<_Sequence> _SeqTraits; + + if (__first.base() == __last.base()) + return std::make_pair(0, __dp_exact); + + if (__first._M_is_before_begin()) + { + if (__last._M_is_begin()) + return std::make_pair(1, __dp_exact); + + return std::make_pair(1, __dp_sign); + } + + if (__first._M_is_begin()) + { + if (__last._M_is_before_begin()) + return std::make_pair(-1, __dp_exact); + + if (__last._M_is_end()) + return _SeqTraits::_S_size(*__first._M_get_sequence()); + + return std::make_pair(1, __dp_sign); + } + + if (__first._M_is_end()) + { + if (__last._M_is_before_begin()) + return std::make_pair(-1, __dp_exact); + + if (__last._M_is_begin()) + { + _Diff __diff = _SeqTraits::_S_size(*__first._M_get_sequence()); + return std::make_pair(-__diff.first, __diff.second); + } + + return std::make_pair(-1, __dp_sign); + } + + if (__last._M_is_before_begin() || __last._M_is_begin()) + return std::make_pair(-1, __dp_sign); + + if (__last._M_is_end()) + return std::make_pair(1, __dp_sign); + + return std::make_pair(1, __dp_equality); + } + + // Get distance from sequence begin to specified iterator. + template + inline typename _Distance_traits<_Iterator>::__type + __get_distance_from_begin(const _Safe_iterator<_Iterator, _Sequence>& __it) + { + typedef _Sequence_traits<_Sequence> _SeqTraits; + + // No need to consider before_begin as this function is only used in + // _M_can_advance which won't be used for forward_list iterators. + if (__it._M_is_begin()) + return std::make_pair(0, __dp_exact); + + if (__it._M_is_end()) + return _SeqTraits::_S_size(*__it._M_get_sequence()); + + typename _Distance_traits<_Iterator>::__type __res + = __get_distance(__it._M_get_sequence()->_M_base().begin(), __it.base()); + + if (__res.second == __dp_equality) + return std::make_pair(1, __dp_sign); + + return __res; + } + + // Get distance from specified iterator to sequence end. + template + inline typename _Distance_traits<_Iterator>::__type + __get_distance_to_end(const _Safe_iterator<_Iterator, _Sequence>& __it) + { + typedef _Sequence_traits<_Sequence> _SeqTraits; + + // No need to consider before_begin as this function is only used in + // _M_can_advance which won't be used for forward_list iterators. + if (__it._M_is_begin()) + return _SeqTraits::_S_size(*__it._M_get_sequence()); + + if (__it._M_is_end()) + return std::make_pair(0, __dp_exact); + + typename _Distance_traits<_Iterator>::__type __res + = __get_distance(__it.base(), __it._M_get_sequence()->_M_base().end()); + + if (__res.second == __dp_equality) + return std::make_pair(1, __dp_sign); + + return __res; + } + +#if __cplusplus < 201103L + template + struct __is_safe_random_iterator<_Safe_iterator<_Iterator, _Sequence> > + : std::__are_same:: + iterator_category> + { }; +#else + template + _Iterator + __base(const _Safe_iterator<_Iterator, _Sequence>& __it, + std::random_access_iterator_tag) + { return __it.base(); } + + template + const _Safe_iterator<_Iterator, _Sequence>& + __base(const _Safe_iterator<_Iterator, _Sequence>& __it, + std::input_iterator_tag) + { return __it; } + + template + auto + __base(const _Safe_iterator<_Iterator, _Sequence>& __it) + -> decltype(__base(__it, std::__iterator_category(__it))) + { return __base(__it, std::__iterator_category(__it)); } +#endif + +#if __cplusplus < 201103L + template + struct _Unsafe_type<_Safe_iterator<_Iterator, _Sequence> > + { typedef _Iterator _Type; }; +#endif + + template + inline _Iterator + __unsafe(const _Safe_iterator<_Iterator, _Sequence>& __it) + { return __it.base(); } + } // namespace __gnu_debug #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_iterator.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_iterator.tcc similarity index 68% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_iterator.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_iterator.tcc index 47b6f2f1d..43d7e992c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_iterator.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_iterator.tcc @@ -1,6 +1,6 @@ // Debugging iterator implementation (out of line) -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -38,12 +38,14 @@ namespace __gnu_debug { if (this->_M_singular()) return false; + if (__n == 0) return true; + if (__n < 0) { std::pair __dist = - __get_distance(_M_get_sequence()->_M_base().begin(), base()); + __get_distance_from_begin(*this); bool __ok = ((__dist.second == __dp_exact && __dist.first >= -__n) || (__dist.second != __dp_exact && __dist.first > 0)); return __ok; @@ -51,7 +53,7 @@ namespace __gnu_debug else { std::pair __dist = - __get_distance(base(), _M_get_sequence()->_M_base().end()); + __get_distance_to_end(*this); bool __ok = ((__dist.second == __dp_exact && __dist.first >= __n) || (__dist.second != __dp_exact && __dist.first > 0)); return __ok; @@ -61,40 +63,33 @@ namespace __gnu_debug template bool _Safe_iterator<_Iterator, _Sequence>:: - _M_valid_range(const _Safe_iterator& __rhs) const + _M_valid_range(const _Safe_iterator& __rhs, + std::pair& __dist, + bool __check_dereferenceable) const { if (!_M_can_compare(__rhs)) return false; - /* Determine if we can order the iterators without the help of - the container */ - std::pair __dist = - __get_distance(base(), __rhs.base()); - switch (__dist.second) { - case __dp_equality: - if (__dist.first == 0) - return true; - break; + /* Determine iterators order */ + __dist = __get_distance(*this, __rhs); + switch (__dist.second) + { + case __dp_equality: + if (__dist.first == 0) + return true; + break; - case __dp_sign: - case __dp_exact: - return __dist.first >= 0; - } + case __dp_sign: + case __dp_exact: + // If range is not empty first iterator must be dereferenceable. + if (__dist.first > 0) + return !__check_dereferenceable || _M_dereferenceable(); + return __dist.first == 0; + } - /* We can only test for equality, but check if one of the - iterators is at an extreme. */ - /* Optim for classic [begin, it) or [it, end) ranges, limit checks - * when code is valid. Note, for the special case of forward_list, - * before_begin replaces the role of begin. */ - if (_M_is_beginnest() || __rhs._M_is_end()) - return true; - if (_M_is_end() || __rhs._M_is_beginnest()) - return false; - - // Assume that this is a valid range; we can't check anything else + // Assume that this is a valid range; we can't check anything else. return true; } } // namespace __gnu_debug #endif - diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_local_iterator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_local_iterator.h similarity index 85% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_local_iterator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_local_iterator.h index 066e10bd2..c46aa1392 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_local_iterator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_local_iterator.h @@ -1,6 +1,6 @@ // Safe iterator implementation -*- C++ -*- -// Copyright (C) 2011-2015 Free Software Foundation, Inc. +// Copyright (C) 2011-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,11 +29,7 @@ #ifndef _GLIBCXX_DEBUG_SAFE_LOCAL_ITERATOR_H #define _GLIBCXX_DEBUG_SAFE_LOCAL_ITERATOR_H 1 -#include -#include -#include #include -#include namespace __gnu_debug { @@ -240,7 +236,6 @@ namespace __gnu_debug /** * @brief Iterator dereference. * @pre iterator is dereferenceable - * @todo Make this correct w.r.t. iterators that return proxies */ pointer operator->() const @@ -248,7 +243,7 @@ namespace __gnu_debug _GLIBCXX_DEBUG_VERIFY(this->_M_dereferenceable(), _M_message(__msg_bad_deref) ._M_iterator(*this, "this")); - return std::__addressof(*base()); + return base().operator->(); } // ------ Input iterator requirements ------ @@ -326,7 +321,9 @@ namespace __gnu_debug // Is the iterator range [*this, __rhs) valid? bool - _M_valid_range(const _Safe_local_iterator& __rhs) const; + _M_valid_range(const _Safe_local_iterator& __rhs, + std::pair& __dist_info) const; // The sequence this iterator references. typename @@ -432,6 +429,78 @@ namespace __gnu_debug ._M_iterator(__rhs, "rhs")); return __lhs.base() != __rhs.base(); } + + /** Safe local iterators know if they are dereferenceable. */ + template + inline bool + __check_dereferenceable(const _Safe_local_iterator<_Iterator, + _Sequence>& __x) + { return __x._M_dereferenceable(); } + + /** Safe local iterators know how to check if they form a valid range. */ + template + inline bool + __valid_range(const _Safe_local_iterator<_Iterator, _Sequence>& __first, + const _Safe_local_iterator<_Iterator, _Sequence>& __last, + typename _Distance_traits<_Iterator>::__type& __dist_info) + { return __first._M_valid_range(__last, __dist_info); } + + /** Safe local iterators need a special method to get distance between each + other. */ + template + inline std::pair::difference_type, + _Distance_precision> + __get_distance(const _Safe_local_iterator<_Iterator, _Sequence>& __first, + const _Safe_local_iterator<_Iterator, _Sequence>& __last, + std::input_iterator_tag) + { + if (__first.base() == __last.base()) + return { 0, __dp_exact }; + + if (__first._M_is_begin()) + { + if (__last._M_is_end()) + return + { + __first._M_get_sequence()->bucket_size(__first.bucket()), + __dp_exact + }; + + return { 1, __dp_sign }; + } + + if (__first._M_is_end()) + { + if (__last._M_is_begin()) + return + { + -__first._M_get_sequence()->bucket_size(__first.bucket()), + __dp_exact + }; + + return { -1, __dp_sign }; + } + + if (__last._M_is_begin()) + return { -1, __dp_sign }; + + if (__last._M_is_end()) + return { 1, __dp_sign }; + + return { 1, __dp_equality }; + } + +#if __cplusplus < 201103L + template + struct _Unsafe_type<_Safe_local_iterator<_Iterator, _Sequence> > + { typedef _Iterator _Type; }; +#endif + + template + inline _Iterator + __unsafe(const _Safe_local_iterator<_Iterator, _Sequence>& __it) + { return __it.base(); } + } // namespace __gnu_debug #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_local_iterator.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_local_iterator.tcc similarity index 77% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_local_iterator.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_local_iterator.tcc index 455e4cd5d..55157ed16 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_local_iterator.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_local_iterator.tcc @@ -1,6 +1,6 @@ // Debugging iterator implementation (out of line) -*- C++ -*- -// Copyright (C) 2011-2015 Free Software Foundation, Inc. +// Copyright (C) 2011-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -34,17 +34,18 @@ namespace __gnu_debug template bool _Safe_local_iterator<_Iterator, _Sequence>:: - _M_valid_range(const _Safe_local_iterator& __rhs) const + _M_valid_range(const _Safe_local_iterator& __rhs, + std::pair& __dist) const { if (!_M_can_compare(__rhs)) return false; + if (bucket() != __rhs.bucket()) return false; /* Determine if we can order the iterators without the help of the container */ - std::pair __dist = - __get_distance(base(), __rhs.base()); + __dist = __get_distance(*this, __rhs); switch (__dist.second) { case __dp_equality: @@ -57,15 +58,6 @@ namespace __gnu_debug return __dist.first >= 0; } - /* We can only test for equality, but check if one of the - iterators is at an extreme. */ - /* Optim for classic [begin, it) or [it, end) ranges, limit checks - * when code is valid. */ - if (_M_is_begin() || __rhs._M_is_end()) - return true; - if (_M_is_end() || __rhs._M_is_begin()) - return false; - // Assume that this is a valid range; we can't check anything else return true; } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_sequence.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_sequence.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_sequence.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_sequence.h index abb0c296b..907b1c8d8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_sequence.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_sequence.h @@ -1,6 +1,6 @@ // Safe sequence implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,16 +29,13 @@ #ifndef _GLIBCXX_DEBUG_SAFE_SEQUENCE_H #define _GLIBCXX_DEBUG_SAFE_SEQUENCE_H 1 -#include +#include #include #include #include namespace __gnu_debug { - template - class _Safe_iterator; - /** A simple function object that returns true if the passed-in * value is not equal to the stored value. It saves typing over * using both bind1st and not_equal. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_sequence.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_sequence.tcc similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_sequence.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_sequence.tcc index d05b59c90..3b792abba 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_sequence.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_sequence.tcc @@ -1,6 +1,6 @@ // Safe sequence implementation -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_unordered_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_unordered_base.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_unordered_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_unordered_base.h index 8dec59d63..ca5ef3b8c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_unordered_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_unordered_base.h @@ -1,6 +1,6 @@ // Safe container/iterator base implementation -*- C++ -*- -// Copyright (C) 2011-2015 Free Software Foundation, Inc. +// Copyright (C) 2011-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -76,24 +76,27 @@ namespace __gnu_debug _Safe_unordered_container_base* _M_get_container() const noexcept; - public: /** Attaches this iterator to the given container, detaching it * from whatever container it was attached to originally. If the * new container is the NULL pointer, the iterator is left * unattached. */ - void _M_attach(_Safe_sequence_base* __seq, bool __constant); + void + _M_attach(_Safe_sequence_base* __seq, bool __constant); /** Likewise, but not thread-safe. */ - void _M_attach_single(_Safe_sequence_base* __seq, bool __constant) throw (); + void + _M_attach_single(_Safe_sequence_base* __seq, bool __constant) throw (); /** Detach the iterator for whatever container it is attached to, * if any. */ - void _M_detach(); + void + _M_detach(); /** Likewise, but not thread-safe. */ - void _M_detach_single() throw (); + void + _M_detach_single() throw (); }; /** @@ -116,7 +119,9 @@ namespace __gnu_debug */ class _Safe_unordered_container_base : public _Safe_sequence_base { + friend class _Safe_local_iterator_base; typedef _Safe_sequence_base _Base; + public: /// The list of mutable local iterators that reference this container _Safe_iterator_base* _M_local_iterators; @@ -158,7 +163,7 @@ namespace __gnu_debug void _M_swap(_Safe_unordered_container_base& __x) noexcept; - public: + private: /** Attach an iterator to this container. */ void _M_attach_local(_Safe_iterator_base* __it, bool __constant); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_unordered_container.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_unordered_container.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_unordered_container.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_unordered_container.h index 05d08b7db..3f7629012 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_unordered_container.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_unordered_container.h @@ -1,6 +1,6 @@ // Safe container implementation -*- C++ -*- -// Copyright (C) 2011-2015 Free Software Foundation, Inc. +// Copyright (C) 2011-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,7 +29,7 @@ #ifndef _GLIBCXX_DEBUG_SAFE_UNORDERED_CONTAINER_H #define _GLIBCXX_DEBUG_SAFE_UNORDERED_CONTAINER_H 1 -#include +#include #include #include #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_unordered_container.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_unordered_container.tcc similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_unordered_container.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_unordered_container.tcc index e517d0df9..862c54dc4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/safe_unordered_container.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/safe_unordered_container.tcc @@ -1,6 +1,6 @@ // Safe container implementation -*- C++ -*- -// Copyright (C) 2011-2015 Free Software Foundation, Inc. +// Copyright (C) 2011-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/set b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/set similarity index 93% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/set rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/set index b45f486fd..6dc489350 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/set +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/set @@ -1,6 +1,6 @@ // Debugging set/multiset implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,6 +29,8 @@ #ifndef _GLIBCXX_DEBUG_SET #define _GLIBCXX_DEBUG_SET 1 +#pragma GCC system_header + #include #include #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/set.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/set.h similarity index 79% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/set.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/set.h index 00d539fa2..07032865b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/set.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/set.h @@ -1,6 +1,6 @@ // Debugging set implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -280,9 +280,14 @@ namespace __debug void insert(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); - _Base::insert(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__first, __last); } #if __cplusplus >= 201103L @@ -291,6 +296,51 @@ namespace __debug { _Base::insert(__l); } #endif +#if __cplusplus > 201402L + using node_type = typename _Base::node_type; + + struct insert_return_type + { + bool inserted; + iterator position; + node_type node; + }; + + node_type + extract(const_iterator __position) + { + __glibcxx_check_erase(__position); + this->_M_invalidate_if(_Equal(__position.base())); + return _Base::extract(__position.base()); + } + + node_type + extract(const key_type& __key) + { + const auto __position = find(__key); + if (__position != end()) + return extract(__position); + return {}; + } + + insert_return_type + insert(node_type&& __nh) + { + auto __ret = _Base::insert(std::move(__nh)); + iterator __pos = iterator(__ret.position, this); + return { __ret.inserted, __pos, std::move(__ret.node) }; + } + + iterator + insert(const_iterator __hint, node_type&& __nh) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert(__hint.base(), std::move(__nh)), this); + } + + using _Base::merge; +#endif // C++17 + #if __cplusplus >= 201103L iterator erase(const_iterator __position) @@ -363,9 +413,7 @@ namespace __debug void swap(set& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -393,6 +441,22 @@ namespace __debug find(const key_type& __x) const { return const_iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + find(const _Kt& __x) + { return { _Base::find(__x), this }; } + + template::type> + const_iterator + find(const _Kt& __x) const + { return { _Base::find(__x), this }; } +#endif + using _Base::count; iterator @@ -405,6 +469,22 @@ namespace __debug lower_bound(const key_type& __x) const { return const_iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + lower_bound(const _Kt& __x) + { return { _Base::lower_bound(__x), this }; } + + template::type> + const_iterator + lower_bound(const _Kt& __x) const + { return { _Base::lower_bound(__x), this }; } +#endif + iterator upper_bound(const key_type& __x) { return iterator(_Base::upper_bound(__x), this); } @@ -415,7 +495,23 @@ namespace __debug upper_bound(const key_type& __x) const { return const_iterator(_Base::upper_bound(__x), this); } - std::pair +#if __cplusplus > 201103L + template::type> + iterator + upper_bound(const _Kt& __x) + { return { _Base::upper_bound(__x), this }; } + + template::type> + const_iterator + upper_bound(const _Kt& __x) const + { return { _Base::upper_bound(__x), this }; } +#endif + + std::pair equal_range(const key_type& __x) { std::pair<_Base_iterator, _Base_iterator> __res = @@ -426,15 +522,37 @@ namespace __debug // _GLIBCXX_RESOLVE_LIB_DEFECTS // 214. set::find() missing const overload - std::pair + std::pair equal_range(const key_type& __x) const { - std::pair<_Base_iterator, _Base_iterator> __res = + std::pair<_Base_const_iterator, _Base_const_iterator> __res = _Base::equal_range(__x); return std::make_pair(const_iterator(__res.first, this), const_iterator(__res.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) + { + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } + + template::type> + std::pair + equal_range(const _Kt& __x) const + { + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + _Base& _M_base() _GLIBCXX_NOEXCEPT { return *this; } @@ -482,6 +600,7 @@ namespace __debug void swap(set<_Key, _Compare, _Allocator>& __x, set<_Key, _Compare, _Allocator>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { return __x.swap(__y); } } // namespace __debug diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/stl_iterator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/stl_iterator.h new file mode 100644 index 000000000..8012ee716 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/stl_iterator.h @@ -0,0 +1,113 @@ +// Debugging support implementation -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file debug/stl_iterator.h + * This file is a GNU debug extension to the Standard C++ Library. + */ + +#ifndef _GLIBCXX_DEBUG_STL_ITERATOR_H +#define _GLIBCXX_DEBUG_STL_ITERATOR_H 1 + +#include + +namespace __gnu_debug +{ + // Help Debug mode to see through reverse_iterator. + template + inline bool + __valid_range(const std::reverse_iterator<_Iterator>& __first, + const std::reverse_iterator<_Iterator>& __last, + typename _Distance_traits<_Iterator>::__type& __dist) + { return __valid_range(__last.base(), __first.base(), __dist); } + + template + inline typename _Distance_traits<_Iterator>::__type + __get_distance(const std::reverse_iterator<_Iterator>& __first, + const std::reverse_iterator<_Iterator>& __last) + { return __get_distance(__last.base(), __first.base()); } + +#if __cplusplus < 201103L + template + struct __is_safe_random_iterator > + : __is_safe_random_iterator<_Iterator> + { }; + + template + struct _Unsafe_type > + { + typedef typename _Unsafe_type<_Iterator>::_Type _UnsafeType; + typedef std::reverse_iterator<_UnsafeType> _Type; + }; + + template + inline std::reverse_iterator::_Type> + __unsafe(const std::reverse_iterator<_Iterator>& __it) + { + typedef typename _Unsafe_type<_Iterator>::_Type _UnsafeType; + return std::reverse_iterator<_UnsafeType>(__unsafe(__it.base())); + } +#else + template + inline auto + __base(const std::reverse_iterator<_Iterator>& __it) + -> decltype(std::__make_reverse_iterator(__base(__it.base()))) + { return std::__make_reverse_iterator(__base(__it.base())); } + + template + inline auto + __unsafe(const std::reverse_iterator<_Iterator>& __it) + -> decltype(std::__make_reverse_iterator(__unsafe(__it.base()))) + { return std::__make_reverse_iterator(__unsafe(__it.base())); } +#endif + +#if __cplusplus >= 201103L + // Help Debug mode to see through move_iterator. + template + inline bool + __valid_range(const std::move_iterator<_Iterator>& __first, + const std::move_iterator<_Iterator>& __last, + typename _Distance_traits<_Iterator>::__type& __dist) + { return __valid_range(__first.base(), __last.base(), __dist); } + + template + inline typename _Distance_traits<_Iterator>::__type + __get_distance(const std::move_iterator<_Iterator>& __first, + const std::move_iterator<_Iterator>& __last) + { return __get_distance(__first.base(), __last.base()); } + + template + inline auto + __unsafe(const std::move_iterator<_Iterator>& __it) + -> decltype(std::make_move_iterator(__unsafe(__it.base()))) + { return std::make_move_iterator(__unsafe(__it.base())); } + + template + inline auto + __base(const std::move_iterator<_Iterator>& __it) + -> decltype(std::make_move_iterator(__base(__it.base()))) + { return std::make_move_iterator(__base(__it.base())); } +#endif +} + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/string b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/string similarity index 91% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/string rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/string index 3793a3586..9d4057b7d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/string +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/string @@ -1,6 +1,6 @@ // Debugging string implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,6 +29,8 @@ #ifndef _GLIBCXX_DEBUG_STRING #define _GLIBCXX_DEBUG_STRING 1 +#pragma GCC system_header + #include #include #include @@ -36,18 +38,19 @@ namespace __gnu_debug { - /// Class std::basic_string with safety/checking/debug instrumentation. - template, - typename _Allocator = std::allocator<_CharT> > - class basic_string - : public __gnu_debug::_Safe_container< - basic_string<_CharT, _Traits, _Allocator>, - _Allocator, _Safe_sequence, false>, - public std::basic_string<_CharT, _Traits, _Allocator> - { - typedef std::basic_string<_CharT, _Traits, _Allocator> _Base; - typedef __gnu_debug::_Safe_container< - basic_string, _Allocator, _Safe_sequence, false> _Safe; +/// Class std::basic_string with safety/checking/debug instrumentation. +template, + typename _Allocator = std::allocator<_CharT> > + class basic_string + : public __gnu_debug::_Safe_container< + basic_string<_CharT, _Traits, _Allocator>, + _Allocator, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)>, + public std::basic_string<_CharT, _Traits, _Allocator> + { + typedef std::basic_string<_CharT, _Traits, _Allocator> _Base; + typedef __gnu_debug::_Safe_container< + basic_string, _Allocator, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)> + _Safe; public: // types: @@ -71,9 +74,13 @@ namespace __gnu_debug using _Base::npos; + basic_string() + _GLIBCXX_NOEXCEPT_IF(std::is_nothrow_default_constructible<_Base>::value) + : _Base() { } + // 21.3.1 construct/copy/destroy: - explicit basic_string(const _Allocator& __a = _Allocator()) - // _GLIBCXX_NOEXCEPT + explicit + basic_string(const _Allocator& __a) _GLIBCXX_NOEXCEPT : _Base(__a) { } #if __cplusplus < 201103L @@ -90,7 +97,19 @@ namespace __gnu_debug : _Base(__l, __a) { } +#if _GLIBCXX_USE_CXX11_ABI + basic_string(const basic_string& __s, const _Allocator& __a) + : _Base(__s, __a) { } + + basic_string(basic_string&& __s, const _Allocator& __a) + : _Base(std::move(__s), __a) { } +#endif + ~basic_string() = default; + + // Provides conversion from a normal-mode string to a debug-mode string + basic_string(_Base&& __base) noexcept + : _Base(std::move(__base)) { } #endif // C++11 // Provides conversion from a normal-mode string to a debug-mode string @@ -277,7 +296,7 @@ namespace __gnu_debug reference operator[](size_type __pos) // _GLIBCXX_NOEXCEPT { -#ifdef _GLIBCXX_DEBUG_PEDANTIC +#if __cplusplus < 201103L && defined(_GLIBCXX_DEBUG_PEDANTIC) __glibcxx_check_subscript(__pos); #else // as an extension v3 allows s[s.size()] when s is non-const. @@ -379,9 +398,15 @@ namespace __gnu_debug basic_string& append(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); - _Base::append(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); + + if (__dist.second >= __dp_sign) + _Base::append(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::append(__first, __last); + this->_M_invalidate_all(); return *this; } @@ -406,6 +431,7 @@ namespace __gnu_debug #if __cplusplus >= 201103L basic_string& assign(basic_string&& __x) + noexcept(noexcept(std::declval<_Base&>().assign(std::move(__x)))) { _Base::assign(std::move(__x)); this->_M_invalidate_all(); @@ -451,9 +477,15 @@ namespace __gnu_debug basic_string& assign(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); - _Base::assign(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); + + if (__dist.second >= __dp_sign) + _Base::assign(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::assign(__first, __last); + this->_M_invalidate_all(); return *this; } @@ -532,9 +564,15 @@ namespace __gnu_debug void insert(iterator __p, _InputIterator __first, _InputIterator __last) { - __glibcxx_check_insert_range(__p, __first, __last); - _Base::insert(__p.base(), __gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_insert_range2(__p, __first, __last, __dist); + + if (__dist.second >= __dp_sign) + _Base::insert(__p.base(), __gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__p.base(), __first, __last); + this->_M_invalidate_all(); } @@ -675,8 +713,17 @@ namespace __gnu_debug _InputIterator __j1, _InputIterator __j2) { __glibcxx_check_erase_range(__i1, __i2); - __glibcxx_check_valid_range(__j1, __j2); - _Base::replace(__i1.base(), __i2.base(), __j1, __j2); + + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__j1, __j2, __dist); + + if (__dist.second >= __dp_sign) + _Base::replace(__i1.base(), __i2.base(), + __gnu_debug::__unsafe(__j1), + __gnu_debug::__unsafe(__j2)); + else + _Base::replace(__i1.base(), __i2.base(), __j1, __j2); + this->_M_invalidate_all(); return *this; } @@ -701,6 +748,7 @@ namespace __gnu_debug void swap(basic_string& __x) + _GLIBCXX_NOEXCEPT_IF(std::__is_nothrow_swappable<_Base>::value) { _Safe::_M_swap(__x); _Base::swap(__x); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/unordered_map b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/unordered_map similarity index 83% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/unordered_map rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/unordered_map index 3f46641d6..51a55ae21 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/unordered_map +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/unordered_map @@ -1,6 +1,6 @@ // Debugging unordered_map/unordered_multimap implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,6 +29,8 @@ #ifndef _GLIBCXX_DEBUG_UNORDERED_MAP #define _GLIBCXX_DEBUG_UNORDERED_MAP 1 +#pragma GCC system_header + #if __cplusplus < 201103L # include #else @@ -185,7 +187,7 @@ namespace __debug void swap(unordered_map& __x) - noexcept( noexcept(declval<_Base>().swap(__x)) ) + noexcept( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -364,13 +366,152 @@ namespace __debug void insert(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); size_type __bucket_count = this->bucket_count(); - _Base::insert(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__first, __last); + _M_check_rehashed(__bucket_count); } +#if __cplusplus > 201402L + template + pair + try_emplace(const key_type& __k, _Args&&... __args) + { + auto __res = _Base::try_emplace(__k, + std::forward<_Args>(__args)...); + return { iterator(__res.first, this), __res.second }; + } + + template + pair + try_emplace(key_type&& __k, _Args&&... __args) + { + auto __res = _Base::try_emplace(std::move(__k), + std::forward<_Args>(__args)...); + return { iterator(__res.first, this), __res.second }; + } + + template + iterator + try_emplace(const_iterator __hint, const key_type& __k, + _Args&&... __args) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::try_emplace(__hint.base(), __k, + std::forward<_Args>(__args)...), + this); + } + + template + iterator + try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::try_emplace(__hint.base(), std::move(__k), + std::forward<_Args>(__args)...), + this); + } + + template + pair + insert_or_assign(const key_type& __k, _Obj&& __obj) + { + auto __res = _Base::insert_or_assign(__k, + std::forward<_Obj>(__obj)); + return { iterator(__res.first, this), __res.second }; + } + + template + pair + insert_or_assign(key_type&& __k, _Obj&& __obj) + { + auto __res = _Base::insert_or_assign(std::move(__k), + std::forward<_Obj>(__obj)); + return { iterator(__res.first, this), __res.second }; + } + + template + iterator + insert_or_assign(const_iterator __hint, const key_type& __k, + _Obj&& __obj) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert_or_assign(__hint.base(), __k, + std::forward<_Obj>(__obj)), + this); + } + + template + iterator + insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert_or_assign(__hint.base(), + std::move(__k), + std::forward<_Obj>(__obj)), + this); + } +#endif // C++17 + +#if __cplusplus > 201402L + using node_type = typename _Base::node_type; + + struct insert_return_type + { + bool inserted; + iterator position; + node_type node; + }; + + node_type + extract(const_iterator __position) + { + __glibcxx_check_erase(__position); + _Base_const_iterator __victim = __position.base(); + this->_M_invalidate_if( + [__victim](_Base_const_iterator __it) { return __it == __victim; } + ); + this->_M_invalidate_local_if( + [__victim](_Base_const_local_iterator __it) { + return __it._M_curr() == __victim._M_cur; + }); + return _Base::extract(__position.base()); + } + + node_type + extract(const key_type& __key) + { + const auto __position = find(__key); + if (__position != end()) + return extract(__position); + return {}; + } + + insert_return_type + insert(node_type&& __nh) + { + auto __ret = _Base::insert(std::move(__nh)); + iterator __pos = iterator(__ret.position, this); + return { __ret.inserted, __pos, std::move(__ret.node) }; + } + + iterator + insert(const_iterator __hint, node_type&& __nh) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert(__hint.base(), std::move(__nh)), this); + } + + using _Base::merge; +#endif // C++17 + iterator find(const key_type& __key) { return iterator(_Base::find(__key), this); } @@ -480,6 +621,7 @@ namespace __debug inline void swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template().swap(__x)) ) + noexcept( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -809,13 +951,60 @@ namespace __debug void insert(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); size_type __bucket_count = this->bucket_count(); - _Base::insert(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__first, __last); + _M_check_rehashed(__bucket_count); } +#if __cplusplus > 201402L + using node_type = typename _Base::node_type; + + node_type + extract(const_iterator __position) + { + __glibcxx_check_erase(__position); + _Base_const_iterator __victim = __position.base(); + this->_M_invalidate_if( + [__victim](_Base_const_iterator __it) { return __it == __victim; } + ); + this->_M_invalidate_local_if( + [__victim](_Base_const_local_iterator __it) { + return __it._M_curr() == __victim._M_cur; + }); + return _Base::extract(__position.base()); + } + + node_type + extract(const key_type& __key) + { + const auto __position = find(__key); + if (__position != end()) + return extract(__position); + return {}; + } + + iterator + insert(node_type&& __nh) + { return iterator(_Base::insert(std::move(__nh)), this); } + + iterator + insert(const_iterator __hint, node_type&& __nh) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert(__hint.base(), std::move(__nh)), this); + } + + using _Base::merge; +#endif // C++17 + iterator find(const key_type& __key) { return iterator(_Base::find(__key), this); } @@ -926,6 +1115,7 @@ namespace __debug inline void swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template #else @@ -182,7 +184,7 @@ namespace __debug void swap(unordered_set& __x) - noexcept( noexcept(declval<_Base>().swap(__x)) ) + noexcept( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -355,13 +357,71 @@ namespace __debug void insert(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); size_type __bucket_count = this->bucket_count(); - _Base::insert(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__first, __last); + _M_check_rehashed(__bucket_count); } +#if __cplusplus > 201402L + using node_type = typename _Base::node_type; + + struct insert_return_type + { + bool inserted; + iterator position; + node_type node; + }; + + node_type + extract(const_iterator __position) + { + __glibcxx_check_erase(__position); + _Base_const_iterator __victim = __position.base(); + this->_M_invalidate_if( + [__victim](_Base_const_iterator __it) { return __it == __victim; } + ); + this->_M_invalidate_local_if( + [__victim](_Base_const_local_iterator __it) { + return __it._M_curr() == __victim._M_cur; + }); + return _Base::extract(__position.base()); + } + + node_type + extract(const key_type& __key) + { + const auto __position = find(__key); + if (__position != end()) + return extract(__position); + return {}; + } + + insert_return_type + insert(node_type&& __nh) + { + auto __ret = _Base::insert(std::move(__nh)); + iterator __pos = iterator(__ret.position, this); + return { __ret.inserted, __pos, std::move(__ret.node) }; + } + + iterator + insert(const_iterator __hint, node_type&& __nh) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert(__hint.base(), std::move(__nh)), this); + } + + using _Base::merge; +#endif // C++17 + iterator find(const key_type& __key) { return iterator(_Base::find(__key), this); } @@ -474,6 +534,7 @@ namespace __debug inline void swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template @@ -628,7 +689,7 @@ namespace __debug void swap(unordered_multiset& __x) - noexcept( noexcept(declval<_Base>().swap(__x)) ) + noexcept( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -799,13 +860,60 @@ namespace __debug void insert(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); size_type __bucket_count = this->bucket_count(); - _Base::insert(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__first, __last); + _M_check_rehashed(__bucket_count); } +#if __cplusplus > 201402L + using node_type = typename _Base::node_type; + + node_type + extract(const_iterator __position) + { + __glibcxx_check_erase(__position); + _Base_const_iterator __victim = __position.base(); + this->_M_invalidate_if( + [__victim](_Base_const_iterator __it) { return __it == __victim; } + ); + this->_M_invalidate_local_if( + [__victim](_Base_const_local_iterator __it) { + return __it._M_curr() == __victim._M_cur; + }); + return _Base::extract(__position.base()); + } + + node_type + extract(const key_type& __key) + { + const auto __position = find(__key); + if (__position != end()) + return extract(__position); + return {}; + } + + iterator + insert(node_type&& __nh) + { return iterator(_Base::insert(std::move(__nh)), this); } + + iterator + insert(const_iterator __hint, node_type&& __nh) + { + __glibcxx_check_insert(__hint); + return iterator(_Base::insert(__hint.base(), std::move(__nh)), this); + } + + using _Base::merge; +#endif // C++17 + iterator find(const key_type& __key) { return iterator(_Base::find(__key), this); } @@ -908,6 +1016,7 @@ namespace __debug inline void swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/vector b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/vector similarity index 92% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/debug/vector rename to devkitARM/arm-none-eabi/include/c++/7.1.0/debug/vector index bf0a88eb0..a6d18d945 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/debug/vector +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/debug/vector @@ -1,6 +1,6 @@ // Debugging vector implementation -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -29,6 +29,8 @@ #ifndef _GLIBCXX_DEBUG_VECTOR #define _GLIBCXX_DEBUG_VECTOR 1 +#pragma GCC system_header + #include #include #include @@ -37,9 +39,12 @@ namespace __gnu_debug { - /// Special vector safe base class to add a guaranteed capacity information - /// useful to detect code relying on the libstdc++ reallocation management - /// implementation detail. + /** @brief Base class for Debug Mode vector. + * + * Adds information about the guaranteed capacity, which is useful for + * detecting code which relies on non-portable implementation details of + * the libstdc++ reallocation policy. + */ template class _Safe_vector @@ -244,9 +249,15 @@ namespace __debug void assign(_InputIterator __first, _InputIterator __last) { - __glibcxx_check_valid_range(__first, __last); - _Base::assign(__gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_valid_range2(__first, __last, __dist); + + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::assign(__gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::assign(__first, __last); + this->_M_invalidate_all(); this->_M_update_guaranteed_capacity(); } @@ -467,7 +478,11 @@ namespace __debug { emplace_back(std::move(__x)); } template +#if __cplusplus > 201402L + reference +#else void +#endif emplace_back(_Args&&... __args) { bool __realloc = this->_M_requires_reallocation(this->size() + 1); @@ -475,6 +490,9 @@ namespace __debug if (__realloc) this->_M_invalidate_all(); this->_M_update_guaranteed_capacity(); +#if __cplusplus > 201402L + return back(); +#endif } #endif @@ -574,16 +592,21 @@ namespace __debug insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { - __glibcxx_check_insert_range(__position, __first, __last); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_insert_range(__position, __first, __last, __dist); /* Hard to guess if invalidation will occur, because __last - __first can't be calculated in all cases, so we just punt here by checking if it did occur. */ _Base_iterator __old_begin = _M_base().begin(); difference_type __offset = __position.base() - _Base::cbegin(); - _Base_iterator __res = _Base::insert(__position.base(), - __gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + _Base_iterator __res; + if (__dist.second >= __gnu_debug::__dp_sign) + __res = _Base::insert(__position.base(), + __gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + __res = _Base::insert(__position.base(), __first, __last); if (_M_base().begin() != __old_begin) this->_M_invalidate_all(); @@ -598,15 +621,19 @@ namespace __debug insert(iterator __position, _InputIterator __first, _InputIterator __last) { - __glibcxx_check_insert_range(__position, __first, __last); + typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist; + __glibcxx_check_insert_range(__position, __first, __last, __dist); /* Hard to guess if invalidation will occur, because __last - __first can't be calculated in all cases, so we just punt here by checking if it did occur. */ _Base_iterator __old_begin = _M_base().begin(); difference_type __offset = __position.base() - _Base::begin(); - _Base::insert(__position.base(), __gnu_debug::__base(__first), - __gnu_debug::__base(__last)); + if (__dist.second >= __gnu_debug::__dp_sign) + _Base::insert(__position.base(), __gnu_debug::__unsafe(__first), + __gnu_debug::__unsafe(__last)); + else + _Base::insert(__position.base(), __first, __last); if (_M_base().begin() != __old_begin) this->_M_invalidate_all(); @@ -659,9 +686,7 @@ namespace __debug void swap(vector& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Safe::_M_swap(__x); _Base::swap(__x); @@ -729,6 +754,7 @@ namespace __debug template inline void swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } } // namespace __debug @@ -742,8 +768,7 @@ namespace __debug { size_t operator()(const __debug::vector& __b) const noexcept - { return std::hash<_GLIBCXX_STD_C::vector>() - (__b._M_base()); } + { return std::hash<_GLIBCXX_STD_C::vector>()(__b); } }; #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/decimal/decimal b/devkitARM/arm-none-eabi/include/c++/7.1.0/decimal/decimal similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/decimal/decimal rename to devkitARM/arm-none-eabi/include/c++/7.1.0/decimal/decimal index 31b6c3d63..b167a7ac7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/decimal/decimal +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/decimal/decimal @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/decimal/decimal.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/decimal/decimal.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/decimal/decimal.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/decimal/decimal.h index da2c01e9b..ede6e57c9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/decimal/decimal.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/decimal/decimal.h @@ -1,6 +1,6 @@ // decimal classes -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/deque b/devkitARM/arm-none-eabi/include/c++/7.1.0/deque similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/deque rename to devkitARM/arm-none-eabi/include/c++/7.1.0/deque index 171e9705e..f4fb2b026 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/deque +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/deque @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/exception b/devkitARM/arm-none-eabi/include/c++/7.1.0/exception similarity index 79% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/exception rename to devkitARM/arm-none-eabi/include/c++/7.1.0/exception index d6c18553b..e51d31c93 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/exception +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/exception @@ -1,6 +1,6 @@ // Exception Handling support header for -*- C++ -*- -// Copyright (C) 1995-2015 Free Software Foundation, Inc. +// Copyright (C) 1995-2017 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -35,39 +35,12 @@ #pragma GCC visibility push(default) #include -#include +#include extern "C++" { namespace std { - /** - * @defgroup exceptions Exceptions - * @ingroup diagnostics - * - * Classes and functions for reporting errors via exception classes. - * @{ - */ - - /** - * @brief Base class for all library exceptions. - * - * This is the base class for all exceptions thrown by the standard - * library, and by certain language expressions. You are free to derive - * your own %exception classes, or use a different hierarchy, or to - * throw non-class data (e.g., fundamental types). - */ - class exception - { - public: - exception() _GLIBCXX_USE_NOEXCEPT { } - virtual ~exception() _GLIBCXX_USE_NOEXCEPT; - - /** Returns a C-style character string describing the general cause - * of the current error. */ - virtual const char* what() const _GLIBCXX_USE_NOEXCEPT; - }; - /** If an %exception is thrown which is not listed in a function's * %exception specification, one of these may be thrown. */ class bad_exception : public exception @@ -77,10 +50,11 @@ namespace std // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 - virtual ~bad_exception() _GLIBCXX_USE_NOEXCEPT; + virtual ~bad_exception() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT; // See comment in eh_exception.cc. - virtual const char* what() const _GLIBCXX_USE_NOEXCEPT; + virtual const char* + what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT; }; /// If you write a replacement %terminate handler, it must be of this type. @@ -126,6 +100,12 @@ namespace std */ bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++98 +#define __cpp_lib_uncaught_exceptions 201411 + /// The number of uncaught exceptions. + int uncaught_exceptions() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); +#endif + // @} group exceptions } // namespace std @@ -158,7 +138,7 @@ _GLIBCXX_END_NAMESPACE_VERSION #pragma GCC visibility pop -#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1) +#if (__cplusplus >= 201103L) #include #include #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/algorithm b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/algorithm similarity index 58% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/algorithm rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/algorithm index 4281b42e2..a7ab0e84c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/algorithm +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/algorithm @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,7 +36,7 @@ #else #include -#include +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -54,52 +54,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_experimental_sample 201402 - /// Reservoir sampling algorithm. - template - _RandomAccessIterator - __sample(_InputIterator __first, _InputIterator __last, input_iterator_tag, - _RandomAccessIterator __out, random_access_iterator_tag, - _Size __n, _UniformRandomNumberGenerator&& __g) - { - using __distrib_type = std::uniform_int_distribution<_Size>; - using __param_type = typename __distrib_type::param_type; - __distrib_type __d{}; - _Size __sample_sz = 0; - while (__first != __last && __sample_sz != __n) - __out[__sample_sz++] = *__first++; - for (auto __pop_sz = __sample_sz; __first != __last; - ++__first, ++__pop_sz) - { - const auto __k = __d(__g, __param_type{0, __pop_sz}); - if (__k < __n) - __out[__k] = *__first; - } - return __out + __sample_sz; - } - - /// Selection sampling algorithm. - template - _OutputIterator - __sample(_ForwardIterator __first, _ForwardIterator __last, - forward_iterator_tag, - _OutputIterator __out, _Cat, - _Size __n, _UniformRandomNumberGenerator&& __g) - { - using __distrib_type = std::uniform_int_distribution<_Size>; - using __param_type = typename __distrib_type::param_type; - __distrib_type __d{}; - _Size __unsampled_sz = std::distance(__first, __last); - for (__n = std::min(__n, __unsampled_sz); __n != 0; ++__first) - if (__d(__g, __param_type{0, --__unsampled_sz}) < __n) - { - *__out++ = *__first; - --__n; - } - return __out; - } - /// Take a random sample from a population. template @@ -122,9 +76,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static_assert(is_integral<_Distance>::value, "sample size must be an integer type"); - return std::experimental::__sample( - __first, __last, __pop_cat{}, __out, __samp_cat{}, - __n, std::forward<_UniformRandomNumberGenerator>(__g)); + typename iterator_traits<_PopulationIterator>::difference_type __d = __n; + return std::__sample(__first, __last, __pop_cat{}, __out, __samp_cat{}, + __d, + std::forward<_UniformRandomNumberGenerator>(__g)); } _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/any b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/any similarity index 67% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/any rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/any index 487ba0167..36c0680c2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/any +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/any @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,6 +39,7 @@ #include #include #include +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -90,12 +91,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Holds either pointer to a heap object or the contained object itself. union _Storage { + // This constructor intentionally doesn't initialize anything. + _Storage() = default; + + // Prevent trivial copies of this type, buffer might hold a non-POD. + _Storage(const _Storage&) = delete; + _Storage& operator=(const _Storage&) = delete; + void* _M_ptr; - std::aligned_storage::type _M_buffer; + aligned_storage::type _M_buffer; }; - template, - bool _Fits = (sizeof(_Tp) <= sizeof(_Storage))> + template, + bool _Fits = (sizeof(_Tp) <= sizeof(_Storage)) + && (alignof(_Tp) <= alignof(_Storage))> using _Internal = std::integral_constant; template @@ -119,33 +128,57 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION any() noexcept : _M_manager(nullptr) { } /// Copy constructor, copies the state of @p __other - any(const any& __other) : _M_manager(__other._M_manager) + any(const any& __other) { - if (!__other.empty()) + if (__other.empty()) + _M_manager = nullptr; + else { _Arg __arg; __arg._M_any = this; - _M_manager(_Op_clone, &__other, &__arg); + __other._M_manager(_Op_clone, &__other, &__arg); } } /** * @brief Move constructor, transfer the state from @p __other * - * @post @c __other.empty() (not guaranteed for other implementations) + * @post @c __other.empty() (this postcondition is a GNU extension) */ any(any&& __other) noexcept - : _M_manager(__other._M_manager), - _M_storage(__other._M_storage) - { __other._M_manager = nullptr; } + { + if (__other.empty()) + _M_manager = nullptr; + else + { + _Arg __arg; + __arg._M_any = this; + __other._M_manager(_Op_xfer, &__other, &__arg); + } + } /// Construct with a copy of @p __value as the contained object. template , - typename _Mgr = _Manager<_Tp>> + typename _Mgr = _Manager<_Tp>, + typename enable_if::value, + bool>::type = true> any(_ValueType&& __value) - : _M_manager(&_Mgr::_S_manage), - _M_storage(_Mgr::_S_create(std::forward<_ValueType>(__value))) + : _M_manager(&_Mgr::_S_manage) { + _Mgr::_S_create(_M_storage, std::forward<_ValueType>(__value)); + static_assert(is_copy_constructible<_Tp>::value, + "The contained object must be CopyConstructible"); + } + + /// Construct with a copy of @p __value as the contained object. + template , + typename _Mgr = _Manager<_Tp>, + typename enable_if::value, + bool>::type = false> + any(_ValueType&& __value) + : _M_manager(&_Mgr::_S_manage) + { + _Mgr::_S_create(_M_storage, __value); static_assert(is_copy_constructible<_Tp>::value, "The contained object must be CopyConstructible"); } @@ -155,10 +188,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // assignments - /// Copy the state of + /// Copy the state of another object. any& operator=(const any& __rhs) { - any(__rhs).swap(*this); + *this = any(__rhs); return *this; } @@ -169,15 +202,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ any& operator=(any&& __rhs) noexcept { - any(std::move(__rhs)).swap(*this); + if (__rhs.empty()) + clear(); + else if (this != &__rhs) + { + clear(); + _Arg __arg; + __arg._M_any = this; + __rhs._M_manager(_Op_xfer, &__rhs, &__arg); + } return *this; } /// Store a copy of @p __rhs as the contained object. template - any& operator=(_ValueType&& __rhs) + enable_if_t>::value, any&> + operator=(_ValueType&& __rhs) { - any(std::forward<_ValueType>(__rhs)).swap(*this); + *this = any(std::forward<_ValueType>(__rhs)); return *this; } @@ -196,8 +238,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Exchange state with another object. void swap(any& __rhs) noexcept { - std::swap(_M_manager, __rhs._M_manager); - std::swap(_M_storage, __rhs._M_storage); + if (empty() && __rhs.empty()) + return; + + if (!empty() && !__rhs.empty()) + { + if (this == &__rhs) + return; + + any __tmp; + _Arg __arg; + __arg._M_any = &__tmp; + __rhs._M_manager(_Op_xfer, &__rhs, &__arg); + __arg._M_any = &__rhs; + _M_manager(_Op_xfer, this, &__arg); + __arg._M_any = this; + __tmp._M_manager(_Op_xfer, &__tmp, &__arg); + } + else + { + any* __empty = empty() ? this : &__rhs; + any* __full = empty() ? &__rhs : this; + _Arg __arg; + __arg._M_any = __empty; + __full->_M_manager(_Op_xfer, __full, &__arg); + } } // observers @@ -222,7 +287,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __or_, is_copy_constructible<_Tp>>::value; } private: - enum _Op { _Op_access, _Op_get_type_info, _Op_clone, _Op_destroy }; + enum _Op { + _Op_access, _Op_get_type_info, _Op_clone, _Op_destroy, _Op_xfer + }; union _Arg { @@ -235,14 +302,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Storage _M_storage; template - friend void* __any_caster(const any* __any) - { - if (__any->_M_manager != &_Manager>::_S_manage) - return nullptr; - _Arg __arg; - __any->_M_manager(_Op_access, __any, &__arg); - return __arg._M_obj; - } + friend void* __any_caster(const any* __any); // Manage in-place contained object. template @@ -252,20 +312,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _S_manage(_Op __which, const any* __anyp, _Arg* __arg); template - static _Storage - _S_create(_Up&& __value) + static void + _S_create(_Storage& __storage, _Up&& __value) { - _Storage __storage; void* __addr = &__storage._M_buffer; ::new (__addr) _Tp(std::forward<_Up>(__value)); - return __storage; - } - - template - static _Storage - _S_alloc(const _Alloc&, _Up&& __value) - { - return _S_create(std::forward<_Up>(__value)); } }; @@ -277,12 +328,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _S_manage(_Op __which, const any* __anyp, _Arg* __arg); template - static _Storage - _S_create(_Up&& __value) + static void + _S_create(_Storage& __storage, _Up&& __value) { - _Storage __storage; __storage._M_ptr = new _Tp(std::forward<_Up>(__value)); - return __storage; } }; }; @@ -334,7 +383,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __throw_bad_any_cast(); } - template + template::value + || is_lvalue_reference<_ValueType>::value, + bool>::type = true> inline _ValueType any_cast(any&& __any) { static_assert(any::__is_valid_cast<_ValueType>(), @@ -344,8 +396,35 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *__p; __throw_bad_any_cast(); } + + template::value + && !is_lvalue_reference<_ValueType>::value, + bool>::type = false> + inline _ValueType any_cast(any&& __any) + { + static_assert(any::__is_valid_cast<_ValueType>(), + "Template argument must be a reference or CopyConstructible type"); + auto __p = any_cast>(&__any); + if (__p) + return std::move(*__p); + __throw_bad_any_cast(); + } // @} + template + void* __any_caster(const any* __any) + { + struct _None { }; + using _Up = decay_t<_Tp>; + using _Vp = conditional_t::value, _Up, _None>; + if (__any->_M_manager != &any::_Manager<_Vp>::_S_manage) + return nullptr; + any::_Arg __arg; + __any->_M_manager(any::_Op_access, __any, &__arg); + return __arg._M_obj; + } + /** * @brief Access the contained object. * @@ -393,10 +472,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION break; case _Op_clone: ::new(&__arg->_M_any->_M_storage._M_buffer) _Tp(*__ptr); + __arg->_M_any->_M_manager = __any->_M_manager; break; case _Op_destroy: __ptr->~_Tp(); break; + case _Op_xfer: + ::new(&__arg->_M_any->_M_storage._M_buffer) _Tp + (std::move(*const_cast<_Tp*>(__ptr))); + __ptr->~_Tp(); + __arg->_M_any->_M_manager = __any->_M_manager; + const_cast(__any)->_M_manager = nullptr; + break; } } @@ -419,10 +506,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION break; case _Op_clone: __arg->_M_any->_M_storage._M_ptr = new _Tp(*__ptr); + __arg->_M_any->_M_manager = __any->_M_manager; break; case _Op_destroy: delete __ptr; break; + case _Op_xfer: + __arg->_M_any->_M_storage._M_ptr = __any->_M_storage._M_ptr; + __arg->_M_any->_M_manager = __any->_M_manager; + const_cast(__any)->_M_manager = nullptr; + break; } } diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/array b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/array new file mode 100644 index 000000000..11cb924e0 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/array @@ -0,0 +1,115 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/array + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_ARRAY +#define _GLIBCXX_EXPERIMENTAL_ARRAY 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#define __cpp_lib_experimental_make_array 201505 + /** + * @defgroup make_array Array creation functions + * @ingroup experimental + * + * Array creation functions as described in N4529, + * Working Draft, C++ Extensions for Library Fundamentals, Version 2 + * + * @{ + */ + +template + struct __make_array_elem + { + using type = _Dest; + }; + +template + struct __make_array_elem + : common_type<_Types...> + { + template + struct __is_reference_wrapper : false_type + {}; + + template + struct __is_reference_wrapper> : true_type + {}; + + static_assert(!__or_<__is_reference_wrapper>...>::value, + "make_array must be used with an explicit target type when" + "any of the arguments is a reference_wrapper"); + }; + +template + constexpr + array::type, sizeof...(_Types)> + make_array(_Types&&... __t) + { + return {{ std::forward<_Types>(__t)... }}; + } + +template + constexpr array, _Nm> + __to_array(_Tp (&__a)[_Nm], index_sequence<_Idx...>) + { + return {{__a[_Idx]...}}; + } + +template + constexpr array, _Nm> + to_array(_Tp (&__a)[_Nm]) + noexcept(is_nothrow_constructible, _Tp&>::value) + { + return __to_array(__a, make_index_sequence<_Nm>{}); + } + + // @} group make_array + _GLIBCXX_END_NAMESPACE_VERSION +} // namespace fundamentals_v2 +} // namespace experimental + +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_ARRAY diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/erase_if.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/erase_if.h new file mode 100644 index 000000000..7dc47dbb3 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/erase_if.h @@ -0,0 +1,70 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/bits/erase_if.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_ERASE_IF_H +#define _GLIBCXX_EXPERIMENTAL_ERASE_IF_H 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else +#include + +namespace std +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ + namespace __detail + { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + template + void + __erase_nodes_if(_Container& __cont, _Predicate __pred) + { + for (auto __iter = __cont.begin(), __last = __cont.end(); + __iter != __last;) + { + if (__pred(*__iter)) + __iter = __cont.erase(__iter); + else + ++__iter; + } + } +_GLIBCXX_END_NAMESPACE_VERSION + } // namespace __detail +} // inline namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_ERASE_IF_H diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/lfts_config.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/lfts_config.h new file mode 100644 index 000000000..a9faa47a8 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/lfts_config.h @@ -0,0 +1,64 @@ +// Namespace declarations for Library Fundamentals TS -*- C++ -*- + +// Copyright (C) 2016-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/bits/lfts_config.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. + */ + +#if __cplusplus <= 201103L +# include +#else +#include + +#if _GLIBCXX_INLINE_VERSION +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace chrono +{ +namespace experimental +{ +inline namespace fundamentals_v1 { inline namespace __7 { } } +inline namespace fundamentals_v2 { inline namespace __7 { } } +} // namespace experimental +} // namespace chrono + +namespace experimental +{ +inline namespace fundamentals_v1 { + inline namespace __7 { } + namespace __detail { inline namespace __7 { } } +} +inline namespace fundamentals_v2 { + inline namespace __7 { } + namespace pmr { inline namespace __7 { } } + namespace __detail { inline namespace __7 { } } +} // namespace fundamentals_v2 +inline namespace literals { inline namespace string_view_literals { + inline namespace __7 { } +} } // namespace literals::string_view_literals +} // namespace experimental +} // namespace std +#endif +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/shared_ptr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/shared_ptr.h new file mode 100644 index 000000000..27f22d236 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/shared_ptr.h @@ -0,0 +1,684 @@ +// Experimental shared_ptr with array support -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/bits/shared_ptr.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{experimental/memory} + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_SHARED_PTR_H +#define _GLIBCXX_EXPERIMENTAL_SHARED_PTR_H 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // 8.2.1 + + template class shared_ptr; + template class weak_ptr; + template class enable_shared_from_this; + + template + constexpr bool __sp_compatible_v + = std::__sp_compatible_with<_Yp*, _Tp*>::value; + + template + constexpr bool __sp_is_constructible_v + = std::__sp_is_constructible<_Tp, _Yp>::value; + + template + class shared_ptr : public __shared_ptr<_Tp> + { + using _Base_type = __shared_ptr<_Tp>; + + public: + using element_type = typename _Base_type::element_type; + + private: + // Constraint for construction from a pointer of type _Yp*: + template + using _SafeConv = enable_if_t<__sp_is_constructible_v<_Tp, _Yp>>; + + template + using _Compatible + = enable_if_t<__sp_compatible_v<_Tp1, _Tp>, _Res>; + + template::pointer, + typename _Res = void> + using _UniqCompatible = enable_if_t< + __sp_compatible_v<_Tp1, _Tp> + && experimental::is_convertible_v<_Ptr, element_type*>, + _Res>; + + public: + + // 8.2.1.1, shared_ptr constructors + constexpr shared_ptr() noexcept = default; + + template> + explicit + shared_ptr(_Tp1* __p) : _Base_type(__p) + { _M_enable_shared_from_this_with(__p); } + + template> + shared_ptr(_Tp1* __p, _Deleter __d) + : _Base_type(__p, __d) + { _M_enable_shared_from_this_with(__p); } + + template> + shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a) + : _Base_type(__p, __d, __a) + { _M_enable_shared_from_this_with(__p); } + + template + shared_ptr(nullptr_t __p, _Deleter __d) + : _Base_type(__p, __d) { } + + template + shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) + : _Base_type(__p, __d, __a) { } + + template + shared_ptr(const shared_ptr<_Tp1>& __r, element_type* __p) noexcept + : _Base_type(__r, __p) { } + + shared_ptr(const shared_ptr& __r) noexcept + : _Base_type(__r) { } + + template> + shared_ptr(const shared_ptr<_Tp1>& __r) noexcept + : _Base_type(__r) { } + + shared_ptr(shared_ptr&& __r) noexcept + : _Base_type(std::move(__r)) { } + + template> + shared_ptr(shared_ptr<_Tp1>&& __r) noexcept + : _Base_type(std::move(__r)) { } + + template> + explicit + shared_ptr(const weak_ptr<_Tp1>& __r) + : _Base_type(__r) { } + +#if _GLIBCXX_USE_DEPRECATED + template> + shared_ptr(std::auto_ptr<_Tp1>&& __r) + : _Base_type(std::move(__r)) + { _M_enable_shared_from_this_with(static_cast<_Tp1*>(this->get())); } +#endif + + template> + shared_ptr(unique_ptr<_Tp1, _Del>&& __r) + : _Base_type(std::move(__r)) + { + // XXX assume conversion from __r.get() to this->get() to __elem_t* + // is a round trip, which might not be true in all cases. + using __elem_t = typename unique_ptr<_Tp1, _Del>::element_type; + _M_enable_shared_from_this_with(static_cast<__elem_t*>(this->get())); + } + + constexpr shared_ptr(nullptr_t __p) + : _Base_type(__p) { } + + // C++14 §20.8.2.2 + ~shared_ptr() = default; + + // C++14 §20.8.2.3 + shared_ptr& operator=(const shared_ptr&) noexcept = default; + + template + _Compatible<_Tp1, shared_ptr&> + operator=(const shared_ptr<_Tp1>& __r) noexcept + { + _Base_type::operator=(__r); + return *this; + } + + shared_ptr& + operator=(shared_ptr&& __r) noexcept + { + _Base_type::operator=(std::move(__r)); + return *this; + } + + template + _Compatible<_Tp1, shared_ptr&> + operator=(shared_ptr<_Tp1>&& __r) noexcept + { + _Base_type::operator=(std::move(__r)); + return *this; + } + +#if _GLIBCXX_USE_DEPRECATED + template + _Compatible<_Tp1, shared_ptr&> + operator=(std::auto_ptr<_Tp1>&& __r) + { + __shared_ptr<_Tp>::operator=(std::move(__r)); + return *this; + } +#endif + + template + _UniqCompatible<_Tp1, _Del, shared_ptr&> + operator=(unique_ptr<_Tp1, _Del>&& __r) + { + _Base_type::operator=(std::move(__r)); + return *this; + } + + // C++14 §20.8.2.2.4 + // swap & reset + // 8.2.1.2 shared_ptr observers + // in __shared_ptr + + private: + template + shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a, + _Args&&... __args) + : _Base_type(__tag, __a, std::forward<_Args>(__args)...) + { _M_enable_shared_from_this_with(this->get()); } + + template + friend shared_ptr<_Tp1> + allocate_shared(const _Alloc& __a, _Args&&... __args); + + shared_ptr(const weak_ptr<_Tp>& __r, std::nothrow_t) + : _Base_type(__r, std::nothrow) { } + + friend class weak_ptr<_Tp>; + + template + using __esft_base_t = + decltype(__expt_enable_shared_from_this_base(std::declval<_Yp*>())); + + // Detect an accessible and unambiguous enable_shared_from_this base. + template + struct __has_esft_base + : false_type { }; + + template + struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>> + : __bool_constant> { }; // ignore base for arrays + + template + typename enable_if<__has_esft_base<_Yp>::value>::type + _M_enable_shared_from_this_with(const _Yp* __p) noexcept + { + if (auto __base = __expt_enable_shared_from_this_base(__p)) + { + __base->_M_weak_this + = shared_ptr<_Yp>(*this, const_cast<_Yp*>(__p)); + } + } + + template + typename enable_if::value>::type + _M_enable_shared_from_this_with(const _Yp*) noexcept + { } + }; + + // C++14 §20.8.2.2.7 //DOING + template + bool operator==(const shared_ptr<_Tp1>& __a, + const shared_ptr<_Tp2>& __b) noexcept + { return __a.get() == __b.get(); } + + template + inline bool + operator==(const shared_ptr<_Tp>& __a, nullptr_t) noexcept + { return !__a; } + + template + inline bool + operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept + { return !__a; } + + template + inline bool + operator!=(const shared_ptr<_Tp1>& __a, + const shared_ptr<_Tp2>& __b) noexcept + { return __a.get() != __b.get(); } + + template + inline bool + operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept + { return (bool)__a; } + + template + inline bool + operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept + { return (bool)__a; } + + template + inline bool + operator<(const shared_ptr<_Tp1>& __a, + const shared_ptr<_Tp2>& __b) noexcept + { + using __elem_t1 = typename shared_ptr<_Tp1>::element_type; + using __elem_t2 = typename shared_ptr<_Tp2>::element_type; + using _CT = common_type_t<__elem_t1*, __elem_t2*>; + return std::less<_CT>()(__a.get(), __b.get()); + } + + template + inline bool + operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept + { + using __elem_t = typename shared_ptr<_Tp>::element_type; + return std::less<__elem_t*>()(__a.get(), nullptr); + } + + template + inline bool + operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept + { + using __elem_t = typename shared_ptr<_Tp>::element_type; + return std::less<__elem_t*>()(nullptr, __a.get()); + } + + template + inline bool + operator<=(const shared_ptr<_Tp1>& __a, + const shared_ptr<_Tp2>& __b) noexcept + { return !(__b < __a); } + + template + inline bool + operator<=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept + { return !(nullptr < __a); } + + template + inline bool + operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept + { return !(__a < nullptr); } + + template + inline bool + operator>(const shared_ptr<_Tp1>& __a, + const shared_ptr<_Tp2>& __b) noexcept + { return (__b < __a); } + + template + inline bool + operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept + { + using __elem_t = typename shared_ptr<_Tp>::element_type; + return std::less<__elem_t*>()(nullptr, __a.get()); + } + + template + inline bool + operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept + { + using __elem_t = typename shared_ptr<_Tp>::element_type; + return std::less<__elem_t*>()(__a.get(), nullptr); + } + + template + inline bool + operator>=(const shared_ptr<_Tp1>& __a, + const shared_ptr<_Tp2>& __b) noexcept + { return !(__a < __b); } + + template + inline bool + operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept + { return !(__a < nullptr); } + + template + inline bool + operator>=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept + { return !(nullptr < __a); } + + // C++14 §20.8.2.2.8 + template + inline void + swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept + { __a.swap(__b); } + + // 8.2.1.3, shared_ptr casts + template + inline shared_ptr<_Tp> + static_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept + { + using __elem_t = typename shared_ptr<_Tp>::element_type; + return shared_ptr<_Tp>(__r, static_cast<__elem_t*>(__r.get())); + } + + template + inline shared_ptr<_Tp> + dynamic_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept + { + using __elem_t = typename shared_ptr<_Tp>::element_type; + if (_Tp* __p = dynamic_cast<__elem_t*>(__r.get())) + return shared_ptr<_Tp>(__r, __p); + return shared_ptr<_Tp>(); + } + + template + inline shared_ptr<_Tp> + const_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept + { + using __elem_t = typename shared_ptr<_Tp>::element_type; + return shared_ptr<_Tp>(__r, const_cast<__elem_t*>(__r.get())); + } + + template + inline shared_ptr<_Tp> + reinterpret_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept + { + using __elem_t = typename shared_ptr<_Tp>::element_type; + return shared_ptr<_Tp>(__r, reinterpret_cast<__elem_t*>(__r.get())); + } + + // C++14 §20.8.2.3 + template + class weak_ptr : public __weak_ptr<_Tp> + { + template + using _Compatible = enable_if_t<__sp_compatible_v<_Tp1, _Tp>, _Res>; + + using _Base_type = __weak_ptr<_Tp>; + + public: + constexpr weak_ptr() noexcept = default; + + template> + weak_ptr(const shared_ptr<_Tp1>& __r) noexcept + : _Base_type(__r) { } + + weak_ptr(const weak_ptr&) noexcept = default; + + template> + weak_ptr(const weak_ptr<_Tp1>& __r) noexcept + : _Base_type(__r) { } + + weak_ptr(weak_ptr&&) noexcept = default; + + template> + weak_ptr(weak_ptr<_Tp1>&& __r) noexcept + : _Base_type(std::move(__r)) { } + + weak_ptr& + operator=(const weak_ptr& __r) noexcept = default; + + template + _Compatible<_Tp1, weak_ptr&> + operator=(const weak_ptr<_Tp1>& __r) noexcept + { + this->_Base_type::operator=(__r); + return *this; + } + + template + _Compatible<_Tp1, weak_ptr&> + operator=(const shared_ptr<_Tp1>& __r) noexcept + { + this->_Base_type::operator=(__r); + return *this; + } + + weak_ptr& + operator=(weak_ptr&& __r) noexcept = default; + + template + _Compatible<_Tp1, weak_ptr&> + operator=(weak_ptr<_Tp1>&& __r) noexcept + { + this->_Base_type::operator=(std::move(__r)); + return *this; + } + + shared_ptr<_Tp> + lock() const noexcept + { return shared_ptr<_Tp>(*this, std::nothrow); } + + friend class enable_shared_from_this<_Tp>; + }; + + // C++14 §20.8.2.3.6 + template + inline void + swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept + { __a.swap(__b); } + + /// C++14 §20.8.2.2.10 + template + inline _Del* + get_deleter(const shared_ptr<_Tp>& __p) noexcept + { return std::get_deleter<_Del>(__p); } + + // C++14 §20.8.2.2.11 + template + inline std::basic_ostream<_Ch, _Tr>& + operator<<(std::basic_ostream<_Ch, _Tr>& __os, const shared_ptr<_Tp>& __p) + { + __os << __p.get(); + return __os; + } + + // C++14 §20.8.2.4 + template class owner_less; + + /// Partial specialization of owner_less for shared_ptr. + template + struct owner_less> + : public _Sp_owner_less, weak_ptr<_Tp>> + { }; + + /// Partial specialization of owner_less for weak_ptr. + template + struct owner_less> + : public _Sp_owner_less, shared_ptr<_Tp>> + { }; + + template<> + class owner_less + { + template + bool + operator()(shared_ptr<_Tp> const& __lhs, + shared_ptr<_Up> const& __rhs) const + { return __lhs.owner_before(__rhs); } + + template + bool + operator()(shared_ptr<_Tp> const& __lhs, + weak_ptr<_Up> const& __rhs) const + { return __lhs.owner_before(__rhs); } + + template + bool + operator()(weak_ptr<_Tp> const& __lhs, + shared_ptr<_Up> const& __rhs) const + { return __lhs.owner_before(__rhs); } + + template + bool + operator()(weak_ptr<_Tp> const& __lhs, + weak_ptr<_Up> const& __rhs) const + { return __lhs.owner_before(__rhs); } + + typedef void is_transparent; + }; + + // C++14 §20.8.2.6 + template + inline bool + atomic_is_lock_free(const shared_ptr<_Tp>* __p) + { return std::atomic_is_lock_free<_Tp, __default_lock_policy>(__p); } + + template + shared_ptr<_Tp> atomic_load(const shared_ptr<_Tp>* __p) + { return std::atomic_load<_Tp>(__p); } + + template + shared_ptr<_Tp> + atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order __mo) + { return std::atomic_load_explicit<_Tp>(__p, __mo); } + + template + void atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) + { return std::atomic_store<_Tp>(__p, __r); } + + template + shared_ptr<_Tp> + atomic_store_explicit(const shared_ptr<_Tp>* __p, + shared_ptr<_Tp> __r, + memory_order __mo) + { return std::atomic_store_explicit<_Tp>(__p, __r, __mo); } + + template + void atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) + { return std::atomic_exchange<_Tp>(__p, __r); } + + template + shared_ptr<_Tp> + atomic_exchange_explicit(const shared_ptr<_Tp>* __p, + shared_ptr<_Tp> __r, + memory_order __mo) + { return std::atomic_exchange_explicit<_Tp>(__p, __r, __mo); } + + template + bool atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, + shared_ptr<_Tp>* __v, + shared_ptr<_Tp> __w) + { return std::atomic_compare_exchange_weak<_Tp>(__p, __v, __w); } + + template + bool atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, + shared_ptr<_Tp>* __v, + shared_ptr<_Tp> __w) + { return std::atomic_compare_exchange_strong<_Tp>(__p, __v, __w); } + + template + bool atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, + shared_ptr<_Tp>* __v, + shared_ptr<_Tp> __w, + memory_order __success, + memory_order __failure) + { return std::atomic_compare_exchange_weak_explicit<_Tp>(__p, __v, __w, + __success, + __failure); } + + template + bool atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, + shared_ptr<_Tp>* __v, + shared_ptr<_Tp> __w, + memory_order __success, + memory_order __failure) + { return std::atomic_compare_exchange_strong_explicit<_Tp>(__p, __v, __w, + __success, + __failure); } + + //enable_shared_from_this + template + class enable_shared_from_this + { + protected: + constexpr enable_shared_from_this() noexcept { } + + enable_shared_from_this(const enable_shared_from_this&) noexcept { } + + enable_shared_from_this& + operator=(const enable_shared_from_this&) noexcept + { return *this; } + + ~enable_shared_from_this() { } + + public: + shared_ptr<_Tp> + shared_from_this() + { return shared_ptr<_Tp>(this->_M_weak_this); } + + shared_ptr + shared_from_this() const + { return shared_ptr(this->_M_weak_this); } + + weak_ptr<_Tp> + weak_from_this() noexcept + { return _M_weak_this; } + + weak_ptr + weak_from_this() const noexcept + { return _M_weak_this; } + + private: + template + void + _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept + { _M_weak_this._M_assign(__p, __n); } + + // Found by ADL when this is an associated class. + friend const enable_shared_from_this* + __expt_enable_shared_from_this_base(const enable_shared_from_this* __p) + { return __p; } + + template + friend class shared_ptr; + + mutable weak_ptr<_Tp> _M_weak_this; + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace fundamentals_v2 +} // namespace experimental + +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /// std::hash specialization for shared_ptr. + template + struct hash> + : public __hash_base> + { + size_t + operator()(const experimental::shared_ptr<_Tp>& __s) const noexcept + { return std::hash<_Tp*>()(__s.get()); } + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // __cplusplus <= 201103L + +#endif // _GLIBCXX_EXPERIMENTAL_SHARED_PTR_H diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/string_view.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/string_view.tcc similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/string_view.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/string_view.tcc index 75a34f90b..03863d0a9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/string_view.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/bits/string_view.tcc @@ -1,6 +1,6 @@ // Components for manipulating non-owning sequences of characters -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -22,9 +22,9 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file experimental/string_view.tcc +/** @file experimental/bits/string_view.tcc * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{string_view} + * Do not attempt to use it directly. @headername{experimental/string_view} */ // @@ -44,6 +44,8 @@ namespace std _GLIBCXX_VISIBILITY(default) { namespace experimental { +inline namespace fundamentals_v1 +{ _GLIBCXX_BEGIN_NAMESPACE_VERSION template @@ -222,6 +224,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } _GLIBCXX_END_NAMESPACE_VERSION +} // namespace fundamentals_v1 } // namespace experimental } // namespace std diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/chrono b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/chrono similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/chrono rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/chrono index 0631fa5b1..4247c9df7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/chrono +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/chrono @@ -1,6 +1,6 @@ // Variable Templates For chrono -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -40,7 +40,7 @@ #else #include - +#include namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/deque b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/deque new file mode 100644 index 000000000..c92476f91 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/deque @@ -0,0 +1,83 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/deque + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_DEQUE +#define _GLIBCXX_EXPERIMENTAL_DEQUE 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + void + erase_if(deque<_Tp, _Alloc>& __cont, _Predicate __pred) + { + __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred), + __cont.end()); + } + + template + void + erase(deque<_Tp, _Alloc>& __cont, const _Up& __value) + { + __cont.erase(std::remove(__cont.begin(), __cont.end(), __value), + __cont.end()); + } + +_GLIBCXX_END_NAMESPACE_VERSION + +namespace pmr { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + using deque = std::deque<_Tp, polymorphic_allocator<_Tp>>; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr + +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_DEQUE diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/forward_list b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/forward_list new file mode 100644 index 000000000..1c835aca0 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/forward_list @@ -0,0 +1,79 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/forward_list + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_FORWARD_LIST +#define _GLIBCXX_EXPERIMENTAL_FORWARD_LIST 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + inline void + erase_if(forward_list<_Tp, _Alloc>& __cont, _Predicate __pred) + { __cont.remove_if(__pred); } + + template + inline void + erase(forward_list<_Tp, _Alloc>& __cont, const _Up& __value) + { + using __elem_type = typename forward_list<_Tp, _Alloc>::value_type; + erase_if(__cont, [&](__elem_type& __elem) { return __elem == __value; }); + } + +_GLIBCXX_END_NAMESPACE_VERSION + +namespace pmr { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + using forward_list = std::forward_list<_Tp, polymorphic_allocator<_Tp>>; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr + +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_FORWARD_LIST diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/functional b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/functional similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/functional rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/functional index 40d3bd44d..4639e6f6c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/functional +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/functional @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -42,6 +42,10 @@ #include #include #include +#ifdef _GLIBCXX_PARALLEL +# include // For std::__parallel::search +#endif +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -115,7 +119,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Pred _M_pred() const { return _M_bad_char.key_eq(); } - std::unordered_map<_Key, _Tp, _Hash, _Pred> _M_bad_char; + _GLIBCXX_STD_C::unordered_map<_Key, _Tp, _Hash, _Pred> _M_bad_char; }; template @@ -124,7 +128,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template __boyer_moore_array_base(_RAIter __pat, size_t __patlen, _Unused&&, _Pred&& __pred) - : _M_bad_char{ {}, std::move(__pred) } + : _M_bad_char{ _GLIBCXX_STD_C::array<_Tp, _Len>{}, std::move(__pred) } { std::get<0>(_M_bad_char).fill(__patlen); if (__patlen > 0) @@ -152,7 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const _Pred& _M_pred() const { return std::get<1>(_M_bad_char); } - std::tuple, _Pred> _M_bad_char; + std::tuple<_GLIBCXX_STD_C::array<_Tp, _Len>, _Pred> _M_bad_char; }; template @@ -225,7 +229,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RAIter _M_pat; _RAIter _M_pat_end; - std::vector<__diff_type> _M_good_suffix; + _GLIBCXX_STD_C::vector<__diff_type> _M_good_suffix; }; template - class _Not_fn - { - _Fn _M_fn; - - public: - template - explicit - _Not_fn(_Fn2&& __fn) : _M_fn(std::forward<_Fn2>(__fn)) { } - - _Not_fn(const _Not_fn& __fn) = default; - _Not_fn(_Not_fn&& __fn) = default; - _Not_fn& operator=(const _Not_fn& __fn) = default; - _Not_fn& operator=(_Not_fn&& __fn) = default; - ~_Not_fn() = default; - - template - auto - operator()(_Args&&... __args) - noexcept(noexcept(!_M_fn(std::forward<_Args>(__args)...))) - -> decltype(!_M_fn(std::forward<_Args>(__args)...)) - { return !_M_fn(std::forward<_Args>(__args)...); } - - template - auto - operator()(_Args&&... __args) const - noexcept(noexcept(!_M_fn(std::forward<_Args>(__args)...))) - -> decltype(!_M_fn(std::forward<_Args>(__args)...)) - { return !_M_fn(std::forward<_Args>(__args)...); } - - template - auto - operator()(_Args&&... __args) volatile - noexcept(noexcept(!_M_fn(std::forward<_Args>(__args)...))) - -> decltype(!_M_fn(std::forward<_Args>(__args)...)) - { return !_M_fn(std::forward<_Args>(__args)...); } - - template - auto - operator()(_Args&&... __args) const volatile - noexcept(noexcept(!_M_fn(std::forward<_Args>(__args)...))) - -> decltype(!_M_fn(std::forward<_Args>(__args)...)) - { return !_M_fn(std::forward<_Args>(__args)...); } - }; - /// [func.not_fn] Function template not_fn template inline auto not_fn(_Fn&& __fn) noexcept(std::is_nothrow_constructible, _Fn&&>::value) { - using __maybe_type = _Maybe_wrap_member_pointer>; - return _Not_fn{std::forward<_Fn>(__fn)}; + return std::_Not_fn>{std::forward<_Fn>(__fn), 0}; } _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/iterator b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/iterator new file mode 100644 index 000000000..8a8395da7 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/iterator @@ -0,0 +1,116 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/iterator + * This is a TS C++ Library header. + */ + +// +// N4336 Working Draft, C++ Extensions for Library Fundamentals, Version 2 +// + +#ifndef _GLIBCXX_EXPERIMENTAL_ITERATOR +#define _GLIBCXX_EXPERIMENTAL_ITERATOR 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#define __cpp_lib_experimental_ostream_joiner 201411 + + /// Output iterator that inserts a delimiter between elements. + template> + class ostream_joiner + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + ostream_joiner(ostream_type& __os, const _DelimT& __delimiter) + noexcept(is_nothrow_copy_constructible_v<_DelimT>) + : _M_out(std::__addressof(__os)), _M_delim(__delimiter) + { } + + ostream_joiner(ostream_type& __os, _DelimT&& __delimiter) + noexcept(is_nothrow_move_constructible_v<_DelimT>) + : _M_out(std::__addressof(__os)), _M_delim(std::move(__delimiter)) + { } + + template + ostream_joiner& + operator=(const _Tp& __value) + { + if (!_M_first) + *_M_out << _M_delim; + _M_first = false; + *_M_out << __value; + return *this; + } + + ostream_joiner& operator*() noexcept { return *this; } + ostream_joiner& operator++() noexcept { return *this; } + ostream_joiner& operator++(int) noexcept { return *this; } + + private: + ostream_type* _M_out; + _DelimT _M_delim; + bool _M_first = true; + }; + + /// Object generator for ostream_joiner. + template + inline ostream_joiner, _CharT, _Traits> + make_ostream_joiner(basic_ostream<_CharT, _Traits>& __os, + _DelimT&& __delimiter) + { return { __os, std::forward<_DelimT>(__delimiter) }; } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // __cplusplus <= 201103L + +#endif // _GLIBCXX_EXPERIMENTAL_ITERATOR diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/list b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/list new file mode 100644 index 000000000..9409431c4 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/list @@ -0,0 +1,79 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/list + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_LIST +#define _GLIBCXX_EXPERIMENTAL_LIST 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + inline void + erase_if(list<_Tp, _Alloc>& __cont, _Predicate __pred) + { __cont.remove_if(__pred); } + + template + inline void + erase(list<_Tp, _Alloc>& __cont, const _Up& __value) + { + using __elem_type = typename list<_Tp, _Alloc>::value_type; + erase_if(__cont, [&](__elem_type& __elem) { return __elem == __value; }); + } + +_GLIBCXX_END_NAMESPACE_VERSION + +namespace pmr { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + using list = std::list<_Tp, polymorphic_allocator<_Tp>>; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr + +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_LIST diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/map b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/map new file mode 100644 index 000000000..2bbc1bd5a --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/map @@ -0,0 +1,86 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/map + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_MAP +#define _GLIBCXX_EXPERIMENTAL_MAP 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + inline void + erase_if(map<_Key, _Tp, _Compare, _Alloc>& __cont, _Predicate __pred) + { __detail::__erase_nodes_if(__cont, __pred); } + + template + inline void + erase_if(multimap<_Key, _Tp, _Compare, _Alloc>& __cont, _Predicate __pred) + { __detail::__erase_nodes_if(__cont, __pred); } + +_GLIBCXX_END_NAMESPACE_VERSION + +namespace pmr { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template> + using map + = std::map<_Key, _Tp, _Compare, + polymorphic_allocator>>; + + template> + using multimap + = std::multimap<_Key, _Tp, _Compare, + polymorphic_allocator>>; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr + +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_MAP diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/memory b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/memory new file mode 100644 index 000000000..7467674db --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/memory @@ -0,0 +1,257 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/memory + * This is a TS C++ Library header. + */ + +// +// N4336 Working Draft, C++ Extensions for Library Fundamentals, Version 2 +// + +#ifndef _GLIBCXX_EXPERIMENTAL_MEMORY +#define _GLIBCXX_EXPERIMENTAL_MEMORY 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#define __cpp_lib_experimental_observer_ptr 201411 + + template + class observer_ptr + { + public: + // publish our template parameter and variations thereof + using element_type = _Tp; + using __pointer = add_pointer_t<_Tp>; // exposition-only + using __reference = add_lvalue_reference_t<_Tp>; // exposition-only + + // 3.2.2, observer_ptr constructors + // default c’tor + constexpr observer_ptr() noexcept + : __t() + { } + + // pointer-accepting c’tors + constexpr observer_ptr(nullptr_t) noexcept + : __t() + { } + + constexpr explicit observer_ptr(__pointer __p) noexcept + : __t(__p) + { } + + // copying c’tors (in addition to compiler-generated copy c’tor) + template ::type, __pointer + >::value + >::type> + constexpr observer_ptr(observer_ptr<_Up> __p) noexcept + : __t(__p.get()) + { + } + + // 3.2.3, observer_ptr observers + constexpr __pointer + get() const noexcept + { + return __t; + } + + constexpr __reference + operator*() const + { + return *get(); + } + + constexpr __pointer + operator->() const noexcept + { + return get(); + } + + constexpr explicit operator bool() const noexcept + { + return get() != nullptr; + } + + // 3.2.4, observer_ptr conversions + constexpr explicit operator __pointer() const noexcept + { + return get(); + } + + // 3.2.5, observer_ptr modifiers + constexpr __pointer + release() noexcept + { + __pointer __tmp = get(); + reset(); + return __tmp; + } + + constexpr void + reset(__pointer __p = nullptr) noexcept + { + __t = __p; + } + + constexpr void + swap(observer_ptr& __p) noexcept + { + std::swap(__t, __p.__t); + } + + private: + __pointer __t; + }; // observer_ptr<> + + template + void + swap(observer_ptr<_Tp>& __p1, observer_ptr<_Tp>& __p2) noexcept + { + __p1.swap(__p2); + } + + template + observer_ptr<_Tp> + make_observer(_Tp* __p) noexcept + { + return observer_ptr<_Tp>(__p); + } + + template + bool + operator==(observer_ptr<_Tp> __p1, observer_ptr<_Up> __p2) + { + return __p1.get() == __p2.get(); + } + + template + bool + operator!=(observer_ptr<_Tp> __p1, observer_ptr<_Up> __p2) + { + return !(__p1 == __p2); + } + + template + bool + operator==(observer_ptr<_Tp> __p, nullptr_t) noexcept + { + return !__p; + } + + template + bool + operator==(nullptr_t, observer_ptr<_Tp> __p) noexcept + { + return !__p; + } + + template + bool + operator!=(observer_ptr<_Tp> __p, nullptr_t) noexcept + { + return bool(__p); + } + + template + bool + operator!=(nullptr_t, observer_ptr<_Tp> __p) noexcept + { + return bool(__p); + } + + template + bool + operator<(observer_ptr<_Tp> __p1, observer_ptr<_Up> __p2) + { + return std::less::type, + typename add_pointer<_Up>::type + >::type + >{}(__p1.get(), __p2.get()); + } + + template + bool + operator>(observer_ptr<_Tp> __p1, observer_ptr<_Up> __p2) + { + return __p2 < __p1; + } + + template + bool + operator<=(observer_ptr<_Tp> __p1, observer_ptr<_Up> __p2) + { + return !(__p2 < __p1); + } + + template + bool + operator>=(observer_ptr<_Tp> __p1, observer_ptr<_Up> __p2) + { + return !(__p1 < __p2); + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace fundamentals_v2 +} // namespace experimental + +template + struct hash> + { + using result_type = size_t; + using argument_type = experimental::observer_ptr<_Tp>; + + size_t + operator()(const experimental::observer_ptr<_Tp>& __t) const + noexcept(noexcept(hash::type> {}(__t.get()))) + { + return hash::type> {}(__t.get()); + } + }; + +} // namespace std + +#endif // __cplusplus <= 201103L + +#endif // _GLIBCXX_EXPERIMENTAL_MEMORY diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/memory_resource b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/memory_resource new file mode 100644 index 000000000..653189c10 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/memory_resource @@ -0,0 +1,387 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/memory_resource + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_MEMORY_RESOURCE +#define _GLIBCXX_EXPERIMENTAL_MEMORY_RESOURCE 1 + +#include +#include +#include +#include +#include +#include + +namespace std { +namespace experimental { +inline namespace fundamentals_v2 { +namespace pmr { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#define __cpp_lib_experimental_memory_resources 201402L + + class memory_resource; + + template + class polymorphic_allocator; + + template + class __resource_adaptor_imp; + + template + using resource_adaptor = __resource_adaptor_imp< + typename allocator_traits<_Alloc>::template rebind_alloc>; + + template + struct __uses_allocator_construction_helper; + + // Global memory resources + memory_resource* new_delete_resource() noexcept; + memory_resource* null_memory_resource() noexcept; + + // The default memory resource + memory_resource* get_default_resource() noexcept; + memory_resource* set_default_resource(memory_resource* __r) noexcept; + + // Standard memory resources + + // 8.5 Class memory_resource + class memory_resource + { + protected: + static constexpr size_t _S_max_align = alignof(max_align_t); + + public: + virtual ~memory_resource() { } + + void* + allocate(size_t __bytes, size_t __alignment = _S_max_align) + { return do_allocate(__bytes, __alignment); } + + void + deallocate(void* __p, size_t __bytes, size_t __alignment = _S_max_align) + { return do_deallocate(__p, __bytes, __alignment); } + + bool + is_equal(const memory_resource& __other) const noexcept + { return do_is_equal(__other); } + + protected: + virtual void* + do_allocate(size_t __bytes, size_t __alignment) = 0; + + virtual void + do_deallocate(void* __p, size_t __bytes, size_t __alignment) = 0; + + virtual bool + do_is_equal(const memory_resource& __other) const noexcept = 0; + }; + + inline bool + operator==(const memory_resource& __a, + const memory_resource& __b) noexcept + { return &__a == &__b || __a.is_equal(__b); } + + inline bool + operator!=(const memory_resource& __a, + const memory_resource& __b) noexcept + { return !(__a == __b); } + + + // 8.6 Class template polymorphic_allocator + template + class polymorphic_allocator + { + using __uses_alloc1_ = __uses_alloc1; + using __uses_alloc2_ = __uses_alloc2; + + template + void + _M_construct(__uses_alloc0, _Tp1* __p, _Args&&... __args) + { ::new(__p) _Tp1(std::forward<_Args>(__args)...); } + + template + void + _M_construct(__uses_alloc1_, _Tp1* __p, _Args&&... __args) + { ::new(__p) _Tp1(allocator_arg, this->resource(), + std::forward<_Args>(__args)...); } + + template + void + _M_construct(__uses_alloc2_, _Tp1* __p, _Args&&... __args) + { ::new(__p) _Tp1(std::forward<_Args>(__args)..., + this->resource()); } + + public: + using value_type = _Tp; + + polymorphic_allocator() noexcept + : _M_resource(get_default_resource()) + { } + + polymorphic_allocator(memory_resource* __r) + : _M_resource(__r) + { _GLIBCXX_DEBUG_ASSERT(__r); } + + polymorphic_allocator(const polymorphic_allocator& __other) = default; + + template + polymorphic_allocator(const polymorphic_allocator<_Up>& + __other) noexcept + : _M_resource(__other.resource()) + { } + + polymorphic_allocator& + operator=(const polymorphic_allocator& __rhs) = default; + + _Tp* allocate(size_t __n) + { return static_cast<_Tp*>(_M_resource->allocate(__n * sizeof(_Tp), + alignof(_Tp))); } + + void deallocate(_Tp* __p, size_t __n) + { _M_resource->deallocate(__p, __n * sizeof(_Tp), alignof(_Tp)); } + + template //used here + void construct(_Tp1* __p, _Args&&... __args) + { + auto __use_tag = __use_alloc<_Tp1, memory_resource*, + _Args...>(this->resource()); + _M_construct(__use_tag, __p, std::forward<_Args>(__args)...); + } + + // Specializations for pair using piecewise construction + template + void construct(pair<_Tp1, _Tp2>* __p, piecewise_construct_t, + tuple<_Args1...> __x, + tuple<_Args2...> __y) + { + auto __x_use_tag = + __use_alloc<_Tp1, memory_resource*, _Args1...>(this->resource()); + auto __y_use_tag = + __use_alloc<_Tp2, memory_resource*, _Args2...>(this->resource()); + + ::new(__p) std::pair<_Tp1, _Tp2>(piecewise_construct, + _M_construct_p(__x_use_tag, __x), + _M_construct_p(__y_use_tag, __y)); + } + + template + void construct(pair<_Tp1,_Tp2>* __p) + { this->construct(__p, piecewise_construct, tuple<>(), tuple<>()); } + + template + void construct(pair<_Tp1,_Tp2>* __p, _Up&& __x, _Vp&& __y) + { this->construct(__p, piecewise_construct, + forward_as_tuple(std::forward<_Up>(__x)), + forward_as_tuple(std::forward<_Vp>(__y))); } + + template + void construct(pair<_Tp1,_Tp2>* __p, const std::pair<_Up, _Vp>& __pr) + { this->construct(__p, piecewise_construct, forward_as_tuple(__pr.first), + forward_as_tuple(__pr.second)); } + + template + void construct(pair<_Tp1,_Tp2>* __p, pair<_Up, _Vp>&& __pr) + { this->construct(__p, piecewise_construct, + forward_as_tuple(std::forward<_Up>(__pr.first)), + forward_as_tuple(std::forward<_Vp>(__pr.second))); } + + template + void destroy(_Up* __p) + { __p->~_Up(); } + + // Return a default-constructed allocator (no allocator propagation) + polymorphic_allocator select_on_container_copy_construction() const + { return polymorphic_allocator(); } + + memory_resource* resource() const + { return _M_resource; } + + private: + template + _Tuple&& + _M_construct_p(__uses_alloc0, _Tuple& __t) + { return std::move(__t); } + + template + decltype(auto) + _M_construct_p(__uses_alloc1_ __ua, tuple<_Args...>& __t) + { return tuple_cat(make_tuple(allocator_arg, *(__ua._M_a)), + std::move(__t)); } + + template + decltype(auto) + _M_construct_p(__uses_alloc2_ __ua, tuple<_Args...>& __t) + { return tuple_cat(std::move(__t), make_tuple(*(__ua._M_a))); } + + memory_resource* _M_resource; + }; + + template + bool operator==(const polymorphic_allocator<_Tp1>& __a, + const polymorphic_allocator<_Tp2>& __b) noexcept + { return *__a.resource() == *__b.resource(); } + + template + bool operator!=(const polymorphic_allocator<_Tp1>& __a, + const polymorphic_allocator<_Tp2>& __b) noexcept + { return !(__a == __b); } + + // 8.7.1 __resource_adaptor_imp + template + class __resource_adaptor_imp : public memory_resource + { + public: + using allocator_type = _Alloc; + + __resource_adaptor_imp() = default; + __resource_adaptor_imp(const __resource_adaptor_imp&) = default; + __resource_adaptor_imp(__resource_adaptor_imp&&) = default; + + explicit __resource_adaptor_imp(const _Alloc& __a2) + : _M_alloc(__a2) + { } + + explicit __resource_adaptor_imp(_Alloc&& __a2) + : _M_alloc(std::move(__a2)) + { } + + __resource_adaptor_imp& + operator=(const __resource_adaptor_imp&) = default; + + allocator_type get_allocator() const { return _M_alloc; } + + protected: + virtual void* + do_allocate(size_t __bytes, size_t __alignment) + { + using _Aligned_alloc = std::__alloc_rebind<_Alloc, char>; + size_t __new_size = _S_aligned_size(__bytes, + _S_supported(__alignment) ? + __alignment : _S_max_align); + return _Aligned_alloc(_M_alloc).allocate(__new_size); + } + + virtual void + do_deallocate(void* __p, size_t __bytes, size_t __alignment) + { + using _Aligned_alloc = std::__alloc_rebind<_Alloc, char>; + size_t __new_size = _S_aligned_size(__bytes, + _S_supported(__alignment) ? + __alignment : _S_max_align); + using _Ptr = typename allocator_traits<_Aligned_alloc>::pointer; + _Aligned_alloc(_M_alloc).deallocate(static_cast<_Ptr>(__p), + __new_size); + } + + virtual bool + do_is_equal(const memory_resource& __other) const noexcept + { + auto __p = dynamic_cast(&__other); + return __p ? (_M_alloc == __p->_M_alloc) : false; + } + + private: + // Calculate Aligned Size + // Returns a size that is larger than or equal to __size and divisible + // by __alignment, where __alignment is required to be the power of 2. + static size_t + _S_aligned_size(size_t __size, size_t __alignment) + { return ((__size - 1)|(__alignment - 1)) + 1; } + + // Determine whether alignment meets one of those preconditions: + // 1. Equals to Zero + // 2. Is power of two + static bool + _S_supported (size_t __x) + { return ((__x != 0) && !(__x & (__x - 1))); } + + _Alloc _M_alloc; + }; + + // Global memory resources + inline std::atomic& + __get_default_resource() + { + static atomic _S_default_resource(new_delete_resource()); + return _S_default_resource; + } + + inline memory_resource* + new_delete_resource() noexcept + { + static resource_adaptor> __r; + return static_cast(&__r); + } + + template + class __null_memory_resource : private memory_resource + { + protected: + void* + do_allocate(size_t, size_t) + { std::__throw_bad_alloc(); } + + void + do_deallocate(void*, size_t, size_t) noexcept + { } + + bool + do_is_equal(const memory_resource& __other) const noexcept + { return this == &__other; } + + friend memory_resource* null_memory_resource() noexcept; + }; + + inline memory_resource* + null_memory_resource() noexcept + { + static __null_memory_resource __r; + return static_cast(&__r); + } + + // The default memory resource + inline memory_resource* + get_default_resource() noexcept + { return __get_default_resource().load(); } + + inline memory_resource* + set_default_resource(memory_resource* __r) noexcept + { + if (__r == nullptr) + __r = new_delete_resource(); + return __get_default_resource().exchange(__r); + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/numeric b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/numeric new file mode 100644 index 000000000..b7b820706 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/numeric @@ -0,0 +1,86 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/numeric + * This is a TS C++ Library header. + */ + +// +// N4336 Working Draft, C++ Extensions for Library Fundamentals, Version 2 +// + +#ifndef _GLIBCXX_EXPERIMENTAL_NUMERIC +#define _GLIBCXX_EXPERIMENTAL_NUMERIC 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#define __cpp_lib_experimental_gcd_lcm 201411 + + /// Greatest common divisor + template + constexpr common_type_t<_Mn, _Nn> + gcd(_Mn __m, _Nn __n) + { + static_assert(is_integral<_Mn>::value, "gcd arguments are integers"); + static_assert(is_integral<_Nn>::value, "gcd arguments are integers"); + static_assert(!is_same<_Mn, bool>::value, "gcd arguments are not bools"); + static_assert(!is_same<_Nn, bool>::value, "gcd arguments are not bools"); + return std::__detail::__gcd(__m, __n); + } + + /// Least common multiple + template + constexpr common_type_t<_Mn, _Nn> + lcm(_Mn __m, _Nn __n) + { + static_assert(is_integral<_Mn>::value, "lcm arguments are integers"); + static_assert(is_integral<_Nn>::value, "lcm arguments are integers"); + static_assert(!is_same<_Mn, bool>::value, "lcm arguments are not bools"); + static_assert(!is_same<_Nn, bool>::value, "lcm arguments are not bools"); + return std::__detail::__lcm(__m, __n); + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // __cplusplus <= 201103L + +#endif // _GLIBCXX_EXPERIMENTAL_NUMERIC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/optional b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/optional similarity index 80% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/optional rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/optional index 811235bfc..197a1fc76 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/optional +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/optional @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -33,6 +33,12 @@ * @defgroup experimental Experimental * * Components specified by various Technical Specifications. + * + * As indicated by the std::experimental namespace and the header paths, + * the contents of these Technical Specifications are experimental and not + * part of the C++ standard. As such the interfaces and implementations may + * change in the future, and there is no guarantee of compatibility + * between different GCC releases for these features. */ #if __cplusplus <= 201103L @@ -47,6 +53,7 @@ #include #include #include +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -127,6 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __throw_bad_optional_access(const char* __s) { _GLIBCXX_THROW_OR_ABORT(bad_optional_access(__s)); } +#ifndef __cpp_lib_addressof_constexpr template struct _Has_addressof_mem : std::false_type { }; @@ -149,8 +157,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @brief Trait that detects the presence of an overloaded unary operator&. * * Practically speaking this detects the presence of such an operator when - * called on a const-qualified lvalue (i.e. - * declval<_Tp * const&>().operator&()). + * called on a const-qualified lvalue (e.g. + * declval().operator&()). */ template struct _Has_addressof @@ -163,16 +171,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * overloaded addressof operator (unary operator&), in which case the call * will not be a constant expression. */ - template::value, int>...> - constexpr _Tp* __constexpr_addressof(_Tp& __t) + template + constexpr + enable_if_t::value, _Tp*> + __constexpr_addressof(_Tp& __t) { return &__t; } /** * @brief Fallback overload that defers to __addressof. */ - template::value, int>...> - inline _Tp* __constexpr_addressof(_Tp& __t) + template + inline + enable_if_t<_Has_addressof<_Tp>::value, _Tp*> + __constexpr_addressof(_Tp& __t) { return std::__addressof(__t); } +#endif // __cpp_lib_addressof_constexpr /** * @brief Class template that holds the necessary state for @ref optional @@ -207,12 +220,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _Optional_base{} { } // Constructors for engaged optionals. - constexpr _Optional_base(const _Tp& __t) - : _M_payload(__t), _M_engaged(true) { } - - constexpr _Optional_base(_Tp&& __t) - : _M_payload(std::move(__t)), _M_engaged(true) { } - template constexpr explicit _Optional_base(in_place_t, _Args&&... __args) : _M_payload(std::forward<_Args>(__args)...), _M_engaged(true) { } @@ -349,12 +356,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr _Optional_base(nullopt_t) noexcept : _Optional_base{} { } - constexpr _Optional_base(const _Tp& __t) - : _M_payload(__t), _M_engaged(true) { } - - constexpr _Optional_base(_Tp&& __t) - : _M_payload(std::move(__t)), _M_engaged(true) { } - template constexpr explicit _Optional_base(in_place_t, _Args&&... __args) : _M_payload(std::forward<_Args>(__args)...), _M_engaged(true) { } @@ -464,6 +465,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool _M_engaged = false; }; + template + class optional; + + template + using __converts_from_optional = + __or_&>, + is_constructible<_Tp, optional<_Up>&>, + is_constructible<_Tp, const optional<_Up>&&>, + is_constructible<_Tp, optional<_Up>&&>, + is_convertible&, _Tp>, + is_convertible&, _Tp>, + is_convertible&&, _Tp>, + is_convertible&&, _Tp>>; + + template + using __assigns_from_optional = + __or_&>, + is_assignable<_Tp&, optional<_Up>&>, + is_assignable<_Tp&, const optional<_Up>&&>, + is_assignable<_Tp&, optional<_Up>&&>>; + /** * @brief Class template for optional values. */ @@ -496,6 +518,78 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _Optional_base has the responsibility for construction. using _Base::_Base; + constexpr optional() = default; + // Converting constructors for engaged optionals. + template , decay_t<_Up>>>, + is_constructible<_Tp, _Up&&>, + is_convertible<_Up&&, _Tp> + >::value, bool> = true> + constexpr optional(_Up&& __t) + : _Base(in_place, std::forward<_Up>(__t)) { } + + template , decay_t<_Up>>>, + is_constructible<_Tp, _Up&&>, + __not_> + >::value, bool> = false> + explicit constexpr optional(_Up&& __t) + : _Base(in_place, std::forward<_Up>(__t)) { } + + template >, + is_constructible<_Tp, const _Up&>, + is_convertible, + __not_<__converts_from_optional<_Tp, _Up>> + >::value, bool> = true> + constexpr optional(const optional<_Up>& __t) + { + if (__t) + emplace(*__t); + } + + template >, + is_constructible<_Tp, const _Up&>, + __not_>, + __not_<__converts_from_optional<_Tp, _Up>> + >::value, bool> = false> + explicit constexpr optional(const optional<_Up>& __t) + { + if (__t) + emplace(*__t); + } + + template >, + is_constructible<_Tp, _Up&&>, + is_convertible<_Up&&, _Tp>, + __not_<__converts_from_optional<_Tp, _Up>> + >::value, bool> = true> + constexpr optional(optional<_Up>&& __t) + { + if (__t) + emplace(std::move(*__t)); + } + + template >, + is_constructible<_Tp, _Up&&>, + __not_>, + __not_<__converts_from_optional<_Tp, _Up>> + >::value, bool> = false> + explicit constexpr optional(optional<_Up>&& __t) + { + if (__t) + emplace(std::move(*__t)); + } + // [X.Y.4.3] (partly) Assignment. optional& operator=(nullopt_t) noexcept @@ -504,14 +598,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } - template - enable_if_t>::value, optional&> + template + enable_if_t<__and_< + __not_, decay_t<_Up>>>, + is_constructible<_Tp, _Up>, + __not_<__and_, + is_same<_Tp, decay_t<_Up>>>>, + is_assignable<_Tp&, _Up>>::value, + optional&> operator=(_Up&& __u) { - static_assert(__and_, - is_assignable<_Tp&, _Up>>(), - "Cannot assign to value type from argument"); - if (this->_M_is_engaged()) this->_M_get() = std::forward<_Up>(__u); else @@ -520,19 +616,67 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } + template + enable_if_t<__and_< + __not_>, + is_constructible<_Tp, const _Up&>, + is_assignable<_Tp&, _Up>, + __not_<__converts_from_optional<_Tp, _Up>>, + __not_<__assigns_from_optional<_Tp, _Up>> + >::value, + optional&> + operator=(const optional<_Up>& __u) + { + if (__u) + { + if (this->_M_is_engaged()) + this->_M_get() = *__u; + else + this->_M_construct(*__u); + } + else + { + this->_M_reset(); + } + return *this; + } + + template + enable_if_t<__and_< + __not_>, + is_constructible<_Tp, _Up>, + is_assignable<_Tp&, _Up>, + __not_<__converts_from_optional<_Tp, _Up>>, + __not_<__assigns_from_optional<_Tp, _Up>> + >::value, + optional&> + operator=(optional<_Up>&& __u) + { + if (__u) + { + if (this->_M_is_engaged()) + this->_M_get() = std::move(*__u); + else + this->_M_construct(std::move(*__u)); + } + else + { + this->_M_reset(); + } + + return *this; + } + template - void + enable_if_t::value> emplace(_Args&&... __args) { - static_assert(is_constructible<_Tp, _Args&&...>(), - "Cannot emplace value type from arguments"); - this->_M_reset(); this->_M_construct(std::forward<_Args>(__args)...); } template - enable_if_t&, + enable_if_t&, _Args&&...>::value> emplace(initializer_list<_Up> __il, _Args&&... __args) { @@ -567,7 +711,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // [X.Y.4.5] Observers. constexpr const _Tp* operator->() const - { return __constexpr_addressof(this->_M_get()); } + { +#ifndef __cpp_lib_addressof_constexpr + return __constexpr_addressof(this->_M_get()); +#else + return std::__addressof(this->_M_get()); +#endif + } _Tp* operator->() diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/propagate_const b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/propagate_const new file mode 100644 index 000000000..719e17aa3 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/propagate_const @@ -0,0 +1,540 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/propagate_const + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_PROPAGATE_CONST +#define _GLIBCXX_EXPERIMENTAL_PROPAGATE_CONST 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @defgroup propagate_const Const-propagating wrapper + * @ingroup experimental + * + * A const-propagating wrapper that propagates const to pointer-like members, + * as described in n4388 "A Proposal to Add a Const-Propagating Wrapper + * to the Standard Library". + * + * @{ + */ + +/// Const-propagating wrapper. + template + class propagate_const + { + public: + typedef remove_reference_t())> element_type; + + private: + template + struct __is_propagate_const : false_type + { }; + + template + struct __is_propagate_const> : true_type + { }; + + template + friend constexpr const _Up& + get_underlying(const propagate_const<_Up>& __pt) noexcept; + template + friend constexpr _Up& + get_underlying(propagate_const<_Up>& __pt) noexcept; + + template + static constexpr element_type* + __to_raw_pointer(_Up* __u) + { return __u; } + + template + static constexpr element_type* + __to_raw_pointer(_Up& __u) + { return __u.get(); } + + template + static constexpr const element_type* + __to_raw_pointer(const _Up* __u) + { return __u; } + + template + static constexpr const element_type* + __to_raw_pointer(const _Up& __u) + { return __u.get(); } + + public: + static_assert(__and_::type>, + __not_>, + __or_, is_pointer<_Tp>>>::value, + "propagate_const requires a class or a pointer to an" + " object type"); + + // [propagate_const.ctor], constructors + constexpr propagate_const() = default; + propagate_const(const propagate_const& __p) = delete; + constexpr propagate_const(propagate_const&& __p) = default; + template , + is_convertible<_Up&&, _Tp>>::value, bool + >::type=true> + constexpr propagate_const(propagate_const<_Up>&& __pu) + : _M_t(std::move(get_underlying(__pu))) + {} + template , + __not_>>::value, + bool>::type=false> + constexpr explicit propagate_const(propagate_const<_Up>&& __pu) + : _M_t(std::move(get_underlying(__pu))) + {} + template , + is_convertible<_Up&&, _Tp>, + __not_<__is_propagate_const< + typename decay<_Up>::type>> + >::value, bool>::type=true> + constexpr propagate_const(_Up&& __u) + : _M_t(std::forward<_Up>(__u)) + {} + template , + __not_>, + __not_<__is_propagate_const< + typename decay<_Up>::type>> + >::value, bool>::type=false> + constexpr explicit propagate_const(_Up&& __u) + : _M_t(std::forward<_Up>(__u)) + {} + + // [propagate_const.assignment], assignment + propagate_const& operator=(const propagate_const& __p) = delete; + constexpr propagate_const& operator=(propagate_const&& __p) = default; + + template ::value>::type> + constexpr propagate_const& operator=(propagate_const<_Up>&& __pu) + { + _M_t = std::move(get_underlying(__pu)); + return *this; + } + + template , + __not_<__is_propagate_const< + typename decay<_Up>::type>> + >::value>::type> + constexpr propagate_const& operator=(_Up&& __u) + { + _M_t = std::forward<_Up>(__u); + return *this; + } + + // [propagate_const.const_observers], const observers + explicit constexpr operator bool() const + { + return bool(_M_t); + } + + constexpr const element_type* operator->() const + { + return get(); + } + + template , + is_convertible<_Up, + const element_type*> + >::value, bool>::type = true> + constexpr operator const element_type*() const + { + return get(); + } + + constexpr const element_type& operator*() const + { + return *get(); + } + + constexpr const element_type* get() const + { + return __to_raw_pointer(_M_t); + } + + // [propagate_const.non_const_observers], non-const observers + constexpr element_type* operator->() + { + return get(); + } + + template , + is_convertible<_Up, + const element_type*> + >::value, bool>::type = true> + constexpr operator element_type*() + { + return get(); + } + + constexpr element_type& operator*() + { + return *get(); + } + + constexpr element_type* get() + { + return __to_raw_pointer(_M_t); + } + + // [propagate_const.modifiers], modifiers + constexpr void + swap(propagate_const& __pt) noexcept(__is_nothrow_swappable<_Tp>::value) + { + using std::swap; + swap(_M_t, get_underlying(__pt)); + } + + private: + _Tp _M_t; + }; + + // [propagate_const.relational], relational operators + template + constexpr bool + operator==(const propagate_const<_Tp>& __pt, nullptr_t) + { + return get_underlying(__pt) == nullptr; + } + + template + constexpr bool + operator==(nullptr_t, const propagate_const<_Tp>& __pu) + { + return nullptr == get_underlying(__pu); + } + + template + constexpr bool + operator!=(const propagate_const<_Tp>& __pt, nullptr_t) + { + return get_underlying(__pt) != nullptr; + } + + template + constexpr bool operator!=(nullptr_t, const propagate_const<_Tp>& __pu) + { + return nullptr != get_underlying(__pu); + } + + template + constexpr bool + operator==(const propagate_const<_Tp>& __pt, + const propagate_const<_Up>& __pu) + { + return get_underlying(__pt) == get_underlying(__pu); + } + + template + constexpr bool + operator!=(const propagate_const<_Tp>& __pt, + const propagate_const<_Up>& __pu) + { + return get_underlying(__pt) != get_underlying(__pu); + } + + template + constexpr bool + operator<(const propagate_const<_Tp>& __pt, + const propagate_const<_Up>& __pu) + { + return get_underlying(__pt) < get_underlying(__pu); + } + + template + constexpr bool + operator>(const propagate_const<_Tp>& __pt, + const propagate_const<_Up>& __pu) + { + return get_underlying(__pt) > get_underlying(__pu); + } + + template + constexpr bool + operator<=(const propagate_const<_Tp>& __pt, + const propagate_const<_Up>& __pu) + { + return get_underlying(__pt) <= get_underlying(__pu); + } + + template + constexpr bool + operator>=(const propagate_const<_Tp>& __pt, + const propagate_const<_Up>& __pu) + { + return get_underlying(__pt) >= get_underlying(__pu); + } + + template + constexpr bool + operator==(const propagate_const<_Tp>& __pt, const _Up& __u) + { + return get_underlying(__pt) == __u; + } + + template + constexpr bool + operator!=(const propagate_const<_Tp>& __pt, const _Up& __u) + { + return get_underlying(__pt) != __u; + } + + template + constexpr bool + operator<(const propagate_const<_Tp>& __pt, const _Up& __u) + { + return get_underlying(__pt) < __u; + } + + template + constexpr bool + operator>(const propagate_const<_Tp>& __pt, const _Up& __u) + { + return get_underlying(__pt) > __u; + } + + template + constexpr bool + operator<=(const propagate_const<_Tp>& __pt, const _Up& __u) + { + return get_underlying(__pt) <= __u; + } + + template + constexpr bool + operator>=(const propagate_const<_Tp>& __pt, const _Up& __u) + { + return get_underlying(__pt) >= __u; + } + + template + constexpr bool + operator==(const _Tp& __t, const propagate_const<_Up>& __pu) + { + return __t == get_underlying(__pu); + } + + template + constexpr bool + operator!=(const _Tp& __t, const propagate_const<_Up>& __pu) + { + return __t != get_underlying(__pu); + } + + template + constexpr bool + operator<(const _Tp& __t, const propagate_const<_Up>& __pu) + { + return __t < get_underlying(__pu); + } + + template + constexpr bool + operator>(const _Tp& __t, const propagate_const<_Up>& __pu) + { + return __t > get_underlying(__pu); + } + + template + constexpr bool + operator<=(const _Tp& __t, const propagate_const<_Up>& __pu) + { + return __t <= get_underlying(__pu); + } + + template + constexpr bool + operator>=(const _Tp& __t, const propagate_const<_Up>& __pu) + { + return __t >= get_underlying(__pu); + } + + // [propagate_const.algorithms], specialized algorithms + template + constexpr void + swap(propagate_const<_Tp>& __pt, propagate_const<_Tp>& __pt2) + noexcept(__is_nothrow_swappable<_Tp>::value) + { + __pt.swap(__pt2); + } + + // [propagate_const.underlying], underlying pointer access + template + constexpr const _Tp& + get_underlying(const propagate_const<_Tp>& __pt) noexcept + { + return __pt._M_t; + } + + template + constexpr _Tp& + get_underlying(propagate_const<_Tp>& __pt) noexcept + { + return __pt._M_t; + } + + // @} group propagate_const + _GLIBCXX_END_NAMESPACE_VERSION +} // namespace fundamentals_v2 +} // namespace experimental + +// [propagate_const.hash], hash support + template + struct hash> + { + using result_type = size_t; + using argument_type = experimental::propagate_const<_Tp>; + + size_t + operator()(const experimental::propagate_const<_Tp>& __t) const + noexcept(noexcept(hash<_Tp>{}(get_underlying(__t)))) + { + return hash<_Tp>{}(get_underlying(__t)); + } + }; + + // [propagate_const.comparison_function_objects], comparison function objects + template + struct equal_to> + { + constexpr bool + operator()(const experimental::propagate_const<_Tp>& __x, + const experimental::propagate_const<_Tp>& __y) const + { + return equal_to<_Tp>{}(get_underlying(__x), get_underlying(__y)); + } + + typedef experimental::propagate_const<_Tp> first_argument_type; + typedef experimental::propagate_const<_Tp> second_argument_type; + typedef bool result_type; + }; + + template + struct not_equal_to> + { + constexpr bool + operator()(const experimental::propagate_const<_Tp>& __x, + const experimental::propagate_const<_Tp>& __y) const + { + return not_equal_to<_Tp>{}(get_underlying(__x), get_underlying(__y)); + } + + typedef experimental::propagate_const<_Tp> first_argument_type; + typedef experimental::propagate_const<_Tp> second_argument_type; + typedef bool result_type; + }; + + template + struct less> + { + constexpr bool + operator()(const experimental::propagate_const<_Tp>& __x, + const experimental::propagate_const<_Tp>& __y) const + { + return less<_Tp>{}(get_underlying(__x), get_underlying(__y)); + } + + typedef experimental::propagate_const<_Tp> first_argument_type; + typedef experimental::propagate_const<_Tp> second_argument_type; + typedef bool result_type; + }; + + template + struct greater> + { + constexpr bool + operator()(const experimental::propagate_const<_Tp>& __x, + const experimental::propagate_const<_Tp>& __y) const + { + return greater<_Tp>{}(get_underlying(__x), get_underlying(__y)); + } + + typedef experimental::propagate_const<_Tp> first_argument_type; + typedef experimental::propagate_const<_Tp> second_argument_type; + typedef bool result_type; + }; + + template + struct less_equal> + { + constexpr bool + operator()(const experimental::propagate_const<_Tp>& __x, + const experimental::propagate_const<_Tp>& __y) const + { + return less_equal<_Tp>{}(get_underlying(__x), get_underlying(__y)); + } + + typedef experimental::propagate_const<_Tp> first_argument_type; + typedef experimental::propagate_const<_Tp> second_argument_type; + typedef bool result_type; + }; + + template + struct greater_equal> + { + constexpr bool + operator()(const experimental::propagate_const<_Tp>& __x, + const experimental::propagate_const<_Tp>& __y) const + { + return greater_equal<_Tp>{}(get_underlying(__x), get_underlying(__y)); + } + + typedef experimental::propagate_const<_Tp> first_argument_type; + typedef experimental::propagate_const<_Tp> second_argument_type; + typedef bool result_type; + }; +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_PROPAGATE_CONST diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/random b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/random new file mode 100644 index 000000000..e28df5df7 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/random @@ -0,0 +1,80 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/random + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_RANDOM +#define _GLIBCXX_EXPERIMENTAL_RANDOM 1 + +#include +#include + +namespace std { +namespace experimental { +inline namespace fundamentals_v2 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#define __cpp_lib_experimental_randint 201511 + + inline std::default_random_engine& + _S_randint_engine() + { + static thread_local default_random_engine __eng{random_device{}()}; + return __eng; + } + + // 13.2.2.1, Function template randint + template + inline _IntType + randint(_IntType __a, _IntType __b) + { + static_assert(is_integral<_IntType>::value && sizeof(_IntType) > 1, + "argument must be an integer type"); + using _Dist = std::uniform_int_distribution<_IntType>; + // This relies on the fact our uniform_int_distribution is stateless, + // otherwise we'd need a static thread_local _Dist and pass it + // _Dist::param_type{__a, __b}. + return _Dist(__a, __b)(_S_randint_engine()); + } + + inline void + reseed() + { + _S_randint_engine().seed(random_device{}()); + } + + inline void + reseed(default_random_engine::result_type __value) + { + _S_randint_engine().seed(__value); + } + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/ratio b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/ratio similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/ratio rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/ratio index a009dea6f..ffbae76ca 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/ratio +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/ratio @@ -1,6 +1,6 @@ // Variable Templates For ratio -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -40,7 +40,7 @@ #else #include - +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -49,6 +49,7 @@ namespace experimental inline namespace fundamentals_v1 { _GLIBCXX_BEGIN_NAMESPACE_VERSION + // See C++14 §20.11.5, ratio comparison template constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value; diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/regex b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/regex new file mode 100644 index 000000000..9b5679fc7 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/regex @@ -0,0 +1,72 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/regex + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_REGEX +#define _GLIBCXX_EXPERIMENTAL_REGEX 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +namespace pmr +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION +_GLIBCXX_BEGIN_NAMESPACE_CXX11 + + template + using match_results + = std::match_results<_BidirectionalIterator, polymorphic_allocator< + sub_match<_BidirectionalIterator>>>; + + typedef match_results cmatch; + typedef match_results wcmatch; + typedef match_results smatch; + typedef match_results wsmatch; + +_GLIBCXX_END_NAMESPACE_CXX11 +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr + +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_REGEX diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/set b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/set new file mode 100644 index 000000000..a10617bb2 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/set @@ -0,0 +1,83 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/set + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_SET +#define _GLIBCXX_EXPERIMENTAL_SET 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + inline void + erase_if(set<_Key, _Compare, _Alloc>& __cont, _Predicate __pred) + { __detail::__erase_nodes_if(__cont, __pred); } + + template + inline void + erase_if(multiset<_Key, _Compare, _Alloc>& __cont, _Predicate __pred) + { __detail::__erase_nodes_if(__cont, __pred); } + +_GLIBCXX_END_NAMESPACE_VERSION + +namespace pmr { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template> + using set = std::set<_Key, _Compare, polymorphic_allocator<_Key>>; + + template> + using multiset = std::multiset<_Key, _Compare, + polymorphic_allocator<_Key>>; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr + +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_SET diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/string b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/string new file mode 100644 index 000000000..534799195 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/string @@ -0,0 +1,95 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/string + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_STRING +#define _GLIBCXX_EXPERIMENTAL_STRING 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + inline void + erase_if(basic_string<_CharT, _Traits, _Alloc>& __cont, _Predicate __pred) + { + __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred), + __cont.end()); + } + + template + inline void + erase(basic_string<_CharT, _Traits, _Alloc>& __cont, const _Up& __value) + { + __cont.erase(std::remove(__cont.begin(), __cont.end(), __value), + __cont.end()); + } + +_GLIBCXX_END_NAMESPACE_VERSION + +namespace pmr { +_GLIBCXX_BEGIN_NAMESPACE_VERSION +_GLIBCXX_BEGIN_NAMESPACE_CXX11 + + // basic_string using polymorphic allocator in namespace pmr + template> + using basic_string = + std::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>; + + // basic_string typedef names using polymorphic allocator in namespace + // std::experimental::pmr + typedef basic_string string; + typedef basic_string u16string; + typedef basic_string u32string; + typedef basic_string wstring; + +_GLIBCXX_END_NAMESPACE_CXX11 +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr + +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_STRING diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/string_view b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/string_view similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/string_view rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/string_view index 9c2b77357..bd212ac37 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/string_view +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/string_view @@ -1,6 +1,6 @@ // Components for manipulating non-owning sequences of characters -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -23,7 +23,7 @@ // . /** @file experimental/string_view - * This is a Standard C++ Library header. + * This is a TS C++ Library header. */ // @@ -41,6 +41,7 @@ #include #include +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -180,7 +181,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator[](size_type __pos) const { // TODO: Assert to restore in a way compatible with the constexpr. - // _GLIBCXX_DEBUG_ASSERT(__pos < this->_M_len); + // __glibcxx_assert(__pos < this->_M_len); return *(this->_M_str + __pos); } @@ -200,7 +201,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION front() const { // TODO: Assert to restore in a way compatible with the constexpr. - // _GLIBCXX_DEBUG_ASSERT(this->_M_len > 0); + // __glibcxx_assert(this->_M_len > 0); return *this->_M_str; } @@ -208,7 +209,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION back() const { // TODO: Assert to restore in a way compatible with the constexpr. - // _GLIBCXX_DEBUG_ASSERT(this->_M_len > 0); + // __glibcxx_assert(this->_M_len > 0); return *(this->_M_str + this->_M_len - 1); } @@ -221,7 +222,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void remove_prefix(size_type __n) { - _GLIBCXX_DEBUG_ASSERT(this->_M_len >= __n); + __glibcxx_assert(this->_M_len >= __n); this->_M_str += __n; this->_M_len -= __n; } @@ -419,7 +420,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION private: - static constexpr const int + static constexpr int _S_compare(size_type __n1, size_type __n2) noexcept { return difference_type{__n1 - __n2} > std::numeric_limits::max() @@ -433,41 +434,40 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const _CharT* _M_str; }; +_GLIBCXX_END_NAMESPACE_VERSION // [string.view.comparison], non-member basic_string_view comparison functions namespace __detail { - // Identity transform to make ADL work with just one argument. - // See n3766.html. - template - struct __identity - { typedef _Tp type; }; - - template<> - struct __identity; - +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Identity transform to create a non-deduced context, so that only one + // argument participates in template argument deduction and the other + // argument gets implicitly converted to the deduced type. See n3766.html. template - using __idt = typename __identity<_Tp>::type; + using __idt = common_type_t<_Tp>; +_GLIBCXX_END_NAMESPACE_VERSION } +_GLIBCXX_BEGIN_NAMESPACE_VERSION + template inline bool operator==(basic_string_view<_CharT, _Traits> __x, basic_string_view<_CharT, _Traits> __y) noexcept - { return __x.compare(__y) == 0; } + { return __x.size() == __y.size() && __x.compare(__y) == 0; } template inline bool operator==(basic_string_view<_CharT, _Traits> __x, __detail::__idt> __y) noexcept - { return __x.compare(__y) == 0; } + { return __x.size() == __y.size() && __x.compare(__y) == 0; } template inline bool operator==(__detail::__idt> __x, basic_string_view<_CharT, _Traits> __y) noexcept - { return __x.compare(__y) == 0; } + { return __x.size() == __y.size() && __x.compare(__y) == 0; } template inline bool @@ -651,13 +651,12 @@ _GLIBCXX_END_NAMESPACE_VERSION namespace experimental { -_GLIBCXX_BEGIN_NAMESPACE_VERSION - // I added these EMSR. inline namespace literals { inline namespace string_view_literals { + _GLIBCXX_BEGIN_NAMESPACE_VERSION inline constexpr basic_string_view operator""sv(const char* __str, size_t __len) @@ -679,14 +678,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return basic_string_view{__str, __len}; } #endif - } - } - -_GLIBCXX_END_NAMESPACE_VERSION + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace string_literals + } // namespace literals } // namespace experimental } // namespace std -#include +#include #endif // __cplusplus <= 201103L diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/system_error b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/system_error similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/system_error rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/system_error index ba3f8befd..2b4855dba 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/system_error +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/system_error @@ -1,6 +1,6 @@ // Variable Templates For system_error -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -40,7 +40,7 @@ #else #include - +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -49,12 +49,14 @@ namespace experimental inline namespace fundamentals_v1 { _GLIBCXX_BEGIN_NAMESPACE_VERSION + // See C++14 §19.5, System error support template constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value; template constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; + _GLIBCXX_END_NAMESPACE_VERSION } // namespace fundamentals_v1 } // namespace experimental diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/tuple b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/tuple similarity index 78% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/tuple rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/tuple index 4baede4af..879636eec 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/tuple +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/tuple @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,6 +36,8 @@ #else #include +#include +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -53,17 +55,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template constexpr decltype(auto) - __apply_impl(_Fn&& f, _Tuple&& t, std::index_sequence<_Idx...>) - { return std::forward<_Fn>(f)(get<_Idx>(forward<_Tuple>(t))...); } + __apply_impl(_Fn&& __f, _Tuple&& __t, std::index_sequence<_Idx...>) + { + return std::__invoke(std::forward<_Fn>(__f), + std::get<_Idx>(std::forward<_Tuple>(__t))...); + } template constexpr decltype(auto) - apply(_Fn&& f, _Tuple&& t) + apply(_Fn&& __f, _Tuple&& __t) { using _Indices = - std::make_index_sequence>::value>; - return __apply_impl(std::forward<_Fn>(f), std::forward<_Tuple>(t), - _Indices{}); + std::make_index_sequence>>; + return experimental::__apply_impl(std::forward<_Fn>(__f), + std::forward<_Tuple>(__t), + _Indices{}); } _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/type_traits b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/type_traits similarity index 78% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/type_traits rename to devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/type_traits index db78eec9e..7ec06308b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/experimental/type_traits +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/type_traits @@ -1,6 +1,6 @@ // Variable Templates For Type Traits -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -40,7 +40,7 @@ #else #include - +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -220,6 +220,88 @@ template // raw_invocation_type_t (still unimplemented) _GLIBCXX_END_NAMESPACE_VERSION } // namespace fundamentals_v1 + +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#define __cpp_lib_experimental_detect 201505 + +// [meta.detect] + +template using void_t = void; + +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + void operator=(nonesuch const&) = delete; +}; + +template class _Op, typename... _Args> + using is_detected + = typename std::__detector::value_t; + +template class _Op, typename... _Args> + constexpr bool is_detected_v = is_detected<_Op, _Args...>::value; + +template class _Op, typename... _Args> + using detected_t + = typename std::__detector::type; + +template class _Op, typename... _Args> + using detected_or = std::__detected_or<_Default, _Op, _Args...>; + +template class _Op, typename... _Args> + using detected_or_t = typename detected_or<_Default, _Op, _Args...>::type; + +template class _Op, typename... _Args> + using is_detected_exact = is_same>; + +template class _Op, typename... _Args> + constexpr bool is_detected_exact_v + = is_detected_exact::value; + +template class _Op, typename... _Args> + using is_detected_convertible + = is_convertible, _To>; + +template class _Op, typename... _Args> + constexpr bool is_detected_convertible_v + = is_detected_convertible<_To, _Op, _Args...>::value; + +#define __cpp_lib_experimental_logical_traits 201511 + +template + struct conjunction + : __and_<_Bn...> + { }; + +template + struct disjunction + : __or_<_Bn...> + { }; + +template + struct negation + : __not_<_Pp> + { }; + +template + constexpr bool conjunction_v + = conjunction<_Bn...>::value; + +template + constexpr bool disjunction_v + = disjunction<_Bn...>::value; + +template + constexpr bool negation_v + = negation<_Pp>::value; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace fundamentals_v2 } // namespace experimental } // namespace std diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/unordered_map b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/unordered_map new file mode 100644 index 000000000..fbc44b267 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/unordered_map @@ -0,0 +1,90 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/unordered_map + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_UNORDERED_MAP +#define _GLIBCXX_EXPERIMENTAL_UNORDERED_MAP 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + inline void + erase_if(unordered_map<_Key, _Tp, _Hash, _CPred, _Alloc>& __cont, + _Predicate __pred) + { __detail::__erase_nodes_if(__cont, __pred); } + + template + inline void + erase_if(unordered_multimap<_Key, _Tp, _Hash, _CPred, _Alloc>& __cont, + _Predicate __pred) + { __detail::__erase_nodes_if(__cont, __pred); } + +_GLIBCXX_END_NAMESPACE_VERSION + +namespace pmr { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template, + typename _Pred = equal_to<_Key>> + using unordered_map + = std::unordered_map<_Key, _Tp, _Hash, _Pred, + polymorphic_allocator>>; + + template, + typename _Pred = equal_to<_Key>> + using unordered_multimap + = std::unordered_multimap<_Key, _Tp, _Hash, _Pred, + polymorphic_allocator>>; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr + +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_UNORDERED_MAP diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/unordered_set b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/unordered_set new file mode 100644 index 000000000..3c8fe2552 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/unordered_set @@ -0,0 +1,89 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/unordered_set + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_UNORDERED_SET +#define _GLIBCXX_EXPERIMENTAL_UNORDERED_SET 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + inline void + erase_if(unordered_set<_Key, _Hash, _CPred, _Alloc>& __cont, + _Predicate __pred) + { __detail::__erase_nodes_if(__cont, __pred); } + + template + inline void + erase_if(unordered_multiset<_Key, _Hash, _CPred, _Alloc>& __cont, + _Predicate __pred) + { __detail::__erase_nodes_if(__cont, __pred); } + +_GLIBCXX_END_NAMESPACE_VERSION + +namespace pmr { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template, + typename _Pred = equal_to<_Key>> + using unordered_set + = std::unordered_set<_Key, _Hash, _Pred, polymorphic_allocator<_Key>>; + + template, + typename _Pred = equal_to<_Key>> + using unordered_multiset + = std::unordered_multiset<_Key, _Hash, _Pred, + polymorphic_allocator<_Key>>; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr + +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_UNORDERED_SET diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/utility b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/utility new file mode 100644 index 000000000..db85c5cc6 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/utility @@ -0,0 +1,49 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/utility + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_UTILITY +#define _GLIBCXX_EXPERIMENTAL_UTILITY 1 + +#include +#include +#include + +namespace std { +namespace experimental { +inline namespace fundamentals_v2 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // 3.1.2, erased-type placeholder + using erased_type = std::__erased_type; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/vector b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/vector new file mode 100644 index 000000000..b75a3bc7c --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/experimental/vector @@ -0,0 +1,85 @@ +// -*- C++ -*- + +// Copyright (C) 2015-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file experimental/vector + * This is a TS C++ Library header. + */ + +#ifndef _GLIBCXX_EXPERIMENTAL_VECTOR +#define _GLIBCXX_EXPERIMENTAL_VECTOR 1 + +#pragma GCC system_header + +#if __cplusplus <= 201103L +# include +#else + +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace experimental +{ +inline namespace fundamentals_v2 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#define __cpp_lib_experimental_erase_if 201411 + + template + inline void + erase_if(vector<_Tp, _Alloc>& __cont, _Predicate __pred) + { + __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred), + __cont.end()); + } + + template + inline void + erase(vector<_Tp, _Alloc>& __cont, const _Up& __value) + { + __cont.erase(std::remove(__cont.begin(), __cont.end(), __value), + __cont.end()); + } + +_GLIBCXX_END_NAMESPACE_VERSION + +namespace pmr { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace pmr + +} // namespace fundamentals_v2 +} // namespace experimental +} // namespace std + +#endif // C++14 + +#endif // _GLIBCXX_EXPERIMENTAL_VECTOR diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/algorithm b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/algorithm similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/algorithm rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/algorithm index 4b68eff70..823456cf6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/algorithm +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/algorithm @@ -1,6 +1,6 @@ // Algorithm extensions -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/aligned_buffer.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/aligned_buffer.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/aligned_buffer.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/aligned_buffer.h index d023bc189..789a0c8a1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/aligned_buffer.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/aligned_buffer.h @@ -1,6 +1,6 @@ // Aligned memory buffer -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/alloc_traits.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/alloc_traits.h similarity index 76% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/alloc_traits.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/alloc_traits.h index 06bc70a4c..f4435ce00 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/alloc_traits.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/alloc_traits.h @@ -1,6 +1,6 @@ // Allocator traits -*- C++ -*- -// Copyright (C) 2011-2015 Free Software Foundation, Inc. +// Copyright (C) 2011-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -42,53 +42,8 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION -#if __cplusplus >= 201103L - template - struct __allocator_always_compares_equal : std::false_type { }; - - template - struct __allocator_always_compares_equal> - : std::true_type { }; - - template struct array_allocator; - - template - struct __allocator_always_compares_equal> - : std::true_type { }; - - template struct bitmap_allocator; - - template - struct __allocator_always_compares_equal> - : std::true_type { }; - - template struct malloc_allocator; - - template - struct __allocator_always_compares_equal> - : std::true_type { }; - - template struct mt_allocator; - - template - struct __allocator_always_compares_equal> - : std::true_type { }; - - template struct new_allocator; - - template - struct __allocator_always_compares_equal> - : std::true_type { }; - - template struct pool_allocator; - - template - struct __allocator_always_compares_equal> - : std::true_type { }; -#endif - /** - * @brief Uniform interface to C++98 and C++0x allocators. + * @brief Uniform interface to C++98 and C++11 allocators. * @ingroup allocators */ template @@ -152,18 +107,11 @@ template { return _Base_type::propagate_on_container_swap::value; } static constexpr bool _S_always_equal() - { return __allocator_always_compares_equal<_Alloc>::value; } + { return _Base_type::is_always_equal::value; } static constexpr bool _S_nothrow_move() { return _S_propagate_on_move_assign() || _S_always_equal(); } - static constexpr bool _S_nothrow_swap() - { - using std::swap; - return !_S_propagate_on_swap() - || noexcept(swap(std::declval<_Alloc&>(), std::declval<_Alloc&>())); - } - template struct rebind { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/array_allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/array_allocator.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/array_allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/array_allocator.h index d909ceab9..a2948e4c9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/array_allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/array_allocator.h @@ -1,6 +1,6 @@ // array allocator -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -123,6 +123,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2103. std::allocator propagate_on_container_move_assignment typedef std::true_type propagate_on_container_move_assignment; + + typedef std::true_type is_always_equal; #endif private: diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/atomicity.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/atomicity.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/atomicity.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/atomicity.h index aff33f843..e6043fd65 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/atomicity.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/atomicity.h @@ -1,6 +1,6 @@ // Support for atomic operations -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -108,10 +108,10 @@ _GLIBCXX_END_NAMESPACE_VERSION // that the compiler doesn't reorder memory accesses across the // barriers. #ifndef _GLIBCXX_READ_MEM_BARRIER -#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory") +#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE) #endif #ifndef _GLIBCXX_WRITE_MEM_BARRIER -#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory") +#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE) #endif #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/bitmap_allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/bitmap_allocator.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/bitmap_allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/bitmap_allocator.h index ff55866d5..3e3126985 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/bitmap_allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/bitmap_allocator.h @@ -1,6 +1,6 @@ // Bitmap Allocator. -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -648,7 +648,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * equal to that requested. */ size_t* - _M_get(size_t __sz) throw(std::bad_alloc); + _M_get(size_t __sz) _GLIBCXX_THROW(std::bad_alloc); /** @brief This function just clears the internal Free List, and * gives back all the memory to the OS. @@ -766,7 +766,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the newly acquired block. Having a tight bound. */ void - _S_refill_pool() throw(std::bad_alloc) + _S_refill_pool() _GLIBCXX_THROW(std::bad_alloc) { #if defined _GLIBCXX_DEBUG _S_check_for_free_blocks(); @@ -824,7 +824,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Amortized Constant time. */ pointer - _M_allocate_single_object() throw(std::bad_alloc) + _M_allocate_single_object() _GLIBCXX_THROW(std::bad_alloc) { #if defined __GTHREADS __scoped_lock __bit_lock(_S_mut); @@ -1018,6 +1018,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__n > this->max_size()) std::__throw_bad_alloc(); +#if __cpp_aligned_new + if (alignof(value_type) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) + { + const size_type __b = __n * sizeof(value_type); + std::align_val_t __al = std::align_val_t(alignof(value_type)); + return static_cast(::operator new(__b, __al)); + } +#endif + if (__builtin_expect(__n == 1, true)) return this->_M_allocate_single_object(); else @@ -1036,6 +1045,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { if (__builtin_expect(__p != 0, true)) { +#if __cpp_aligned_new + // Types with extended alignment are handled by operator delete. + if (alignof(value_type) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) + { + ::operator delete(__p, std::align_val_t(alignof(value_type))); + return; + } +#endif + if (__builtin_expect(__n == 1, true)) this->_M_deallocate_single_object(__p); else diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/cast.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/cast.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/cast.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/cast.h index 64611aaa4..95b011312 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/cast.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/cast.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/cmath b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/cmath similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/cmath rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/cmath index 49e1bcba4..3236a8a67 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/cmath +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/cmath @@ -1,6 +1,6 @@ // Math extensions -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/codecvt_specializations.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/codecvt_specializations.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/codecvt_specializations.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/codecvt_specializations.h index 34e90bdf3..1f0452f4f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/codecvt_specializations.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/codecvt_specializations.h @@ -1,6 +1,6 @@ // Locale support (codecvt) -*- C++ -*- -// Copyright (C) 2000-2015 Free Software Foundation, Inc. +// Copyright (C) 2000-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/concurrence.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/concurrence.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/concurrence.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/concurrence.h index 10e570086..3b017da04 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/concurrence.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/concurrence.h @@ -1,6 +1,6 @@ // Support for concurrent programing -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/debug_allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/debug_allocator.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/debug_allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/debug_allocator.h index 161576b3b..f3f2d7b73 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/debug_allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/debug_allocator.h @@ -1,6 +1,6 @@ // Allocators -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/enc_filebuf.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/enc_filebuf.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/enc_filebuf.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/enc_filebuf.h index 1b93405bc..acc5ed2f8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/enc_filebuf.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/enc_filebuf.h @@ -1,6 +1,6 @@ // filebuf with encoding state type -*- C++ -*- -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/extptr_allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/extptr_allocator.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/extptr_allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/extptr_allocator.h index 15915c746..2004992ad 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/extptr_allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/extptr_allocator.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/functional b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/functional similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/functional rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/functional index ef32f1b53..ce7d868dd 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/functional +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/functional @@ -1,6 +1,6 @@ // Functional extensions -*- C++ -*- -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/hash_map b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/hash_map similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/hash_map rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/hash_map index a9dc9cf77..dcd0b71cc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/hash_map +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/hash_map @@ -1,6 +1,6 @@ // Hashing map implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/hash_set b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/hash_set similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/hash_set rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/hash_set index 3c9ec7017..242cca194 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/hash_set +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/hash_set @@ -1,6 +1,6 @@ // Hashing set implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/iterator b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/iterator similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/iterator rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/iterator index f33082959..e00cc4495 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/iterator +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/iterator @@ -1,6 +1,6 @@ // HP/SGI iterator extensions -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/malloc_allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/malloc_allocator.h similarity index 85% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/malloc_allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/malloc_allocator.h index 033b3fe27..88e0c7b58 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/malloc_allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/malloc_allocator.h @@ -1,6 +1,6 @@ // Allocator that wraps "C" malloc -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -30,6 +30,7 @@ #define _MALLOC_ALLOCATOR_H 1 #include +#include #include #include #include @@ -100,9 +101,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__n > this->max_size()) std::__throw_bad_alloc(); - pointer __ret = static_cast<_Tp*>(std::malloc(__n * sizeof(_Tp))); + pointer __ret = 0; +#if __cpp_aligned_new +#if __cplusplus > 201402L && _GLIBCXX_HAVE_ALIGNED_ALLOC + if (alignof(_Tp) > alignof(std::max_align_t)) + { + __ret = static_cast<_Tp*>(::aligned_alloc(alignof(_Tp), + __n * sizeof(_Tp))); + } +#else +# define _GLIBCXX_CHECK_MALLOC_RESULT +#endif +#endif + if (!__ret) + __ret = static_cast<_Tp*>(std::malloc(__n * sizeof(_Tp))); if (!__ret) std::__throw_bad_alloc(); +#ifdef _GLIBCXX_CHECK_MALLOC_RESULT +#undef _GLIBCXX_CHECK_MALLOC_RESULT + if (reinterpret_cast(__ret) % alignof(_Tp)) + { + // Memory returned by malloc is not suitably aligned for _Tp. + deallocate(__ret, __n); + std::__throw_bad_alloc(); + } +#endif return __ret; } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/memory b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/memory similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/memory rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/memory index ed82af436..fd3c18bd9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/memory +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/memory @@ -1,6 +1,6 @@ // Memory extensions -*- C++ -*- -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/mt_allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/mt_allocator.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/mt_allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/mt_allocator.h index 923d0e691..effb13b7d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/mt_allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/mt_allocator.h @@ -1,6 +1,6 @@ // MT-optimized allocator -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -691,6 +691,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__n > this->max_size()) std::__throw_bad_alloc(); +#if __cpp_aligned_new + // Types with extended alignment are handled by operator new/delete. + if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) + { + std::align_val_t __al = std::align_val_t(alignof(_Tp)); + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp), __al)); + } +#endif + __policy_type::_S_initialize_once(); // Requests larger than _M_max_bytes are handled by operator @@ -737,6 +746,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { if (__builtin_expect(__p != 0, true)) { +#if __cpp_aligned_new + // Types with extended alignment are handled by operator new/delete. + if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) + { + ::operator delete(__p, std::align_val_t(alignof(_Tp))); + return; + } +#endif + // Requests larger than _M_max_bytes are handled by // operators new/delete directly. __pool_type& __pool = __policy_type::_S_get_pool(); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/new_allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/new_allocator.h similarity index 83% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/new_allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/new_allocator.h index 83e3a0b0a..ee64b9c64 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/new_allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/new_allocator.h @@ -1,6 +1,6 @@ // Allocator that wraps operator new -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @brief An allocator that uses global new, as per [20.4]. * @ingroup allocators * - * This is precisely the allocator defined in the C++ Standard. + * This is precisely the allocator defined in the C++ Standard. * - all allocation calls operator new * - all deallocation calls operator delete * @@ -67,8 +67,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef _Tp value_type; template - struct rebind - { typedef new_allocator<_Tp1> other; }; + struct rebind + { typedef new_allocator<_Tp1> other; }; #if __cplusplus >= 201103L // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -81,7 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION new_allocator(const new_allocator&) _GLIBCXX_USE_NOEXCEPT { } template - new_allocator(const new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { } + new_allocator(const new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { } ~new_allocator() _GLIBCXX_USE_NOEXCEPT { } @@ -97,17 +97,33 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // about what the return value is when __n == 0. pointer allocate(size_type __n, const void* = 0) - { + { if (__n > this->max_size()) std::__throw_bad_alloc(); +#if __cpp_aligned_new + if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) + { + std::align_val_t __al = std::align_val_t(alignof(_Tp)); + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp), __al)); + } +#endif return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); } // __p is not permitted to be a null pointer. void deallocate(pointer __p, size_type) - { ::operator delete(__p); } + { +#if __cpp_aligned_new + if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) + { + ::operator delete(__p, std::align_val_t(alignof(_Tp))); + return; + } +#endif + ::operator delete(__p); + } size_type max_size() const _GLIBCXX_USE_NOEXCEPT @@ -115,21 +131,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L template - void - construct(_Up* __p, _Args&&... __args) + void + construct(_Up* __p, _Args&&... __args) { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } template - void - destroy(_Up* __p) { __p->~_Up(); } + void + destroy(_Up* __p) { __p->~_Up(); } #else // _GLIBCXX_RESOLVE_LIB_DEFECTS // 402. wrong new expression in [some_] allocator::construct - void - construct(pointer __p, const _Tp& __val) + void + construct(pointer __p, const _Tp& __val) { ::new((void *)__p) _Tp(__val); } - void + void destroy(pointer __p) { __p->~_Tp(); } #endif }; @@ -138,7 +154,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline bool operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return true; } - + template inline bool operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/numeric b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/numeric similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/numeric rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/numeric index 1adb69ab9..e8e8f86ae 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/numeric +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/numeric @@ -1,6 +1,6 @@ // Numeric extensions -*- C++ -*- -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/numeric_traits.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/numeric_traits.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/numeric_traits.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/numeric_traits.h index 5ffff7869..805f17138 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/numeric_traits.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/numeric_traits.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/assoc_container.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/assoc_container.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/assoc_container.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/assoc_container.hpp index 645a1e3fe..a1ec57c57 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/assoc_container.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/assoc_container.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp index 204c06336..058f1fe99 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp index d0b5cd021..8f9a0e2fb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp index d09b0ba67..d3c433e67 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp index b2425c7ea..7063e6318 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp index bb536f6d4..71962935d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp index 06798d045..c71a94105 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp index 5ad82e176..9d9a64406 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp index d6c350387..485f088b7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp index 9d5f7d7a8..c5c7dffc6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp index 101a28975..6a2142369 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp index 6d8fcd401..e721ae996 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp index 067e2f538..414ee23d9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp index 95c385edb..66848f6ba 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp index 7696f21aa..0fc22a6c5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/traits.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/traits.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/traits.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/traits.hpp index da01e1a2d..b54c543cc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/bin_search_tree_/traits.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/bin_search_tree_/traits.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -166,13 +166,8 @@ namespace __gnu_pbds class Node_Update, class Node, typename _Alloc> - struct bin_search_tree_traits< - Key, - null_type, - Cmp_Fn, - Node_Update, - Node, - _Alloc> + struct + bin_search_tree_traits { private: typedef types_traits type_traits; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp index 813fcdc14..f653a1e4b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -266,20 +266,14 @@ namespace __gnu_pbds const entry_cmp& m_cmp = static_cast(*this); entry_pointer end = m_a_entries + m_size; std::make_heap(m_a_entries, end, m_cmp); - _GLIBCXX_DEBUG_ASSERT(is_heap()); } void push_heap() { - if (!is_heap()) - make_heap(); - else - { - const entry_cmp& m_cmp = static_cast(*this); - entry_pointer end = m_a_entries + m_size; - std::push_heap(m_a_entries, end, m_cmp); - } + const entry_cmp& m_cmp = static_cast(*this); + entry_pointer end = m_a_entries + m_size; + std::push_heap(m_a_entries, end, m_cmp); } void @@ -290,15 +284,6 @@ namespace __gnu_pbds std::pop_heap(m_a_entries, end, m_cmp); } - bool - is_heap() - { - const entry_cmp& m_cmp = static_cast(*this); - entry_pointer end = m_a_entries + m_size; - bool p = std::__is_heap(m_a_entries, end, m_cmp); - return p; - } - #ifdef _GLIBCXX_DEBUG void assert_valid(const char*, int) const; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/const_iterator.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/const_iterator.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/const_iterator.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/const_iterator.hpp index eba555954..d2013fba4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/const_iterator.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/const_iterator.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp index c57968285..e6c17553e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp index e66353411..719b2e151 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp index 0511575db..84e995df0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/entry_pred.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/entry_pred.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/entry_pred.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/entry_pred.hpp index aa2714b6b..367fb32fd 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/entry_pred.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/entry_pred.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp index fe10de90a..3f11de810 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp index 60b7cff0b..b4a954045 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp index 9af3b1c3b..158c4f87c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp index 97ccbedce..d21fe3c30 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -103,7 +103,6 @@ modify(point_iterator it, const_reference r_new_val) swap_value_imp(it.m_p_e, r_new_val, s_no_throw_copies_ind); fix(it.m_p_e); PB_DS_ASSERT_VALID((*this)) - _GLIBCXX_DEBUG_ASSERT(is_heap()); } PB_DS_CLASS_T_DEC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp index a6da563e2..62dfcf663 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp index 321560ccf..2bb96aada 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp index df1c8ef4c..f9b73b20a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/resize_policy.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/resize_policy.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/resize_policy.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/resize_policy.hpp index 9b1fc523a..b8299a33b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/resize_policy.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/resize_policy.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp index e77d3c25f..492a2b7a2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp index 47c257eb0..db7d3a114 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp index bd582c647..bfa350b93 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp index b3f647384..6f10a87de 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp index d9259bd07..69a794b46 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp index 41319bf3d..f249c5c6f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp index fe81b30ae..3e96b78b9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp index ee8791f54..f350d52d2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp index 0b35b9e2c..88a305dda 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp index 6dced8953..02d1733fc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp index 51b4c6e00..baa31b373 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp index 44c55a2fb..25e02c795 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/branch_policy/branch_policy.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/branch_policy/branch_policy.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/branch_policy/branch_policy.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/branch_policy/branch_policy.hpp index 1c364bcd4..bcb0915e0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/branch_policy/branch_policy.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/branch_policy/branch_policy.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/branch_policy/null_node_metadata.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/branch_policy/null_node_metadata.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/branch_policy/null_node_metadata.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/branch_policy/null_node_metadata.hpp index 4e8bceeaf..9123fff0d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/branch_policy/null_node_metadata.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/branch_policy/null_node_metadata.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/branch_policy/traits.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/branch_policy/traits.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/branch_policy/traits.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/branch_policy/traits.hpp index 592e7f74d..6bbb3c106 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/branch_policy/traits.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/branch_policy/traits.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp index 8e5713b55..21fd88ea7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp index 6cc4aaf9f..047a6b069 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp index 5b8b804e6..4df970040 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp index 74a8f2154..a64887d3d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp index 77f9b517b..2616bd0ca 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp index babec1a1d..ebe262465 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp index 7ccbfbe3f..07d0266df 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp index 3b1e5b881..39072fb0e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp index 875fed0d7..a6b39a737 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp index 44acfce7b..88b19cf37 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp index cbfe9c433..9e27692d8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp index 2caf0c56b..09891abac 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp index 92a3903ac..97034c8c0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp index f82bf541b..218f40eef 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp index 047926771..569533ec5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp index f7a4888fa..7a22e5d3e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp index 4eba5a8a5..0d624e34d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp index 33b4fa71f..389cde82c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp index 713135c5f..bd70bcd82 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp index b4c78787e..697b0a6c0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp index adf17380b..97f6bf88a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp index fffb67d24..1d038a644 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp index 897464b3d..88c1a83df 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp index c252d4955..7f344f59c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp index cd2eeb613..20c81bc06 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp index a61c8a2e7..d20f67720 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cond_dealtor.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cond_dealtor.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cond_dealtor.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cond_dealtor.hpp index 5db9784a7..558dd9887 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/cond_dealtor.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/cond_dealtor.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/container_base_dispatch.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/container_base_dispatch.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/container_base_dispatch.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/container_base_dispatch.hpp index dc7f9a735..6f4824a4c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/container_base_dispatch.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/container_base_dispatch.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/debug_map_base.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/debug_map_base.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/debug_map_base.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/debug_map_base.hpp index 1dfdb247b..976cf877c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/debug_map_base.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/debug_map_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/eq_fn/eq_by_less.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/eq_fn/eq_by_less.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/eq_fn/eq_by_less.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/eq_fn/eq_by_less.hpp index bb33e8dde..11e649770 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/eq_fn/eq_by_less.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/eq_fn/eq_by_less.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp index 1717eff99..87387e29f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp index fbd23d29a..955af0c12 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp index 73aae642a..74b6576c6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp index dedc30a0d..12ef330e3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp index 2d0f55815..be4a96c4a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp index 5975d0fcf..ecbda2b9b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp index 111a3b7f1..55134eb4a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp index 16ce7c1d5..2f99b0de9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp index e5622acce..57d20fc02 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp index 2f5a8cc07..e7ad710b8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp index 1558c63f7..8fdb7bffc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp index d22c10771..17e28cbf6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp index 809da5563..03089eedf 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp index a402bef3a..328fc7d75 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp index 3f104bfd7..0c2577c61 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp index 3d3a84f28..84ca7e013 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp index 9253fb832..aa5b70472 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp index ddc0a1fb5..f54ac2ad6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp index c3960842a..77ff8fde2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp index 7edb484c3..436182822 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp index 32feefe57..00a71063c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp index 08e6a7e24..c63be3252 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp index 5c4e9dbc3..4b0b0729b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp index 74774bc0d..98a992465 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp index 0f3c79dae..2c19539c0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp index bd4bb6944..75a743f69 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp index 1e8b1155d..06a9f7bea 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp index 08edb790c..4a106972b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp index 7b9667c07..5eaa0b239 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp index 228cb925a..a772753c6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp index 7550a87af..f1edc75dc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp index ff4252913..3fd9f3c9d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp index ec69396d7..c4363690a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp index ac8677770..a492eb381 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp index cf90ff641..aa8670ed5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp index b9063efeb..eab52eb5c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp index 1ffaaddcf..ec87e304d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp index fee80f14c..89f1018d9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp index 5e3bfcdb9..ac028e2c1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp index 2ed6aeedd..6d93b511d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp index 0361d1a4d..496483dda 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp index be958077c..24e0c713d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp index d100b9711..68a3fb4b6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp index 74f8bcc6e..de9d67b3c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp index 874abc55c..76a572653 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp index 92fafb807..adb4a79f0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/point_const_iterator.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/point_const_iterator.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/point_const_iterator.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/point_const_iterator.hpp index ce74bdc05..012871856 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/point_const_iterator.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/point_const_iterator.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp index b027167fd..4561bcaa4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp index 43299fbfb..f7daaece7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp index 486e99aa0..fbfc88ad7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp index 9a7b1df4c..7c4fddc16 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp index 8792b0b7a..cb70c5067 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp index 7fe05d54b..7050442be 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp index 5df5bf326..0fc2bacfb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp index 4652686e3..66a15b51c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp index dce7f73e8..979aaf62a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp index a5373eaf2..91fef5159 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/lu_map_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/lu_map_.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/lu_map_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/lu_map_.hpp index 18269c321..e33febb55 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/lu_map_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/lu_map_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp index f58cae813..e1d3966ed 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_policy/lu_counter_metadata.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_policy/lu_counter_metadata.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_policy/lu_counter_metadata.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_policy/lu_counter_metadata.hpp index afe2f3956..a911e9791 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_policy/lu_counter_metadata.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_policy/lu_counter_metadata.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp index 275646aea..1efbef9a1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp index dfd312b94..270938ce4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp index 3acdb9f9d..dc934f5a5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp index bebbdc68f..1664ed8fe 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp index 5a14ac276..286f1673a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp index d2d3a865f..49ddc58e9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp index 8148b27c6..19e6a8243 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp index cab573cad..ee8d26544 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp index d076af0d2..41a596377 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp index 55cf072bf..17f25995f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp index dacfb7336..d2afb8e49 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/traits.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/traits.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/traits.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/traits.hpp index 861a7ed30..29eb2501b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/ov_tree_map_/traits.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/ov_tree_map_/traits.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp index d33e60c02..3eb5555f2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp index 44784035c..cc290e4a3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp index 00ce84df1..8320316b8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp index 11a79e3c2..7196913a7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp index 20684604f..4fd645f67 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp index 3bbfef3af..bc150c106 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp index 7e1b91aae..19a4f5806 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp index 865132fc8..996cdbfa9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp index 7afded0ba..65b2e22a3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp index 620710ecb..ad5060474 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp index a22d30ce4..0fa4c3d3e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp index 24342ad8e..df61f07d2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp index 56eaf95a3..13ac2734e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp index 8e5f09d55..c58ac6704 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp index e8671a932..ad384e838 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp index a67ea3418..0ff46f9e9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp index dbcbd3f0c..d0352db98 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp index a091ee8af..483807802 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp index 858a29ac5..35c02e86c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp index 512b6d336..27fcef97f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/synth_access_traits.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/synth_access_traits.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/synth_access_traits.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/synth_access_traits.hpp index 9c0d1f539..8baad33c8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/synth_access_traits.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/synth_access_traits.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp index 4ed740a6c..db20d7eed 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/traits.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/traits.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/traits.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/traits.hpp index 613bf1ee5..8c7c99705 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/traits.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/traits.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp index 03d90057c..24e6744d6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/priority_queue_base_dispatch.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/priority_queue_base_dispatch.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/priority_queue_base_dispatch.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/priority_queue_base_dispatch.hpp index e8ee8eb39..7e51117ee 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/priority_queue_base_dispatch.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/priority_queue_base_dispatch.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp index 32bfd14e0..bfffdf01e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp index cb4c0d668..149b95aa4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp index 218f5b11f..d2c3e1e46 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp index c5dd26cba..136dbf783 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp index ef50fbef2..118b127ad 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp index 21118f3ba..1d7d34f9c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/node.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/node.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/node.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/node.hpp index 0380d996f..45e0a1e06 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/node.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/node.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp index 0d3726723..52a357da8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp index f355369b6..11408a7cc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/traits.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/traits.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/traits.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/traits.hpp index 550157773..64ed43f0a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rb_tree_map_/traits.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rb_tree_map_/traits.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp index 36533d6bd..808d6711a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp index 0f40b2495..a32c2401d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp index f86df75a6..86745ecad 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp index b244d6a93..7099e3ecf 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp index 264608011..d649abc32 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp index 6d4c5d5a6..4440018a1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp index 8818a2ff9..96afe433c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp index 89257eefc..0f0c89ffc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp index 93e86100c..fc4802d97 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp index 95c785f54..55d89b452 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp index 1cda673a0..978a08ba5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp index 41177624d..ba36758bf 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp index a4c6b4106..71047bc9a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp index af3097d6b..f8a619b7f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp index d68145a98..97f4ba711 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp index 1bacc5118..764aeec41 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp index ea1549b9c..07085fca7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp index 02a24673f..916fdd109 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp index f1691bf08..f6ff1e2e5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp index 5b9916d7c..bfd64a1bd 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp index 94f1e400d..9d185c60d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp index 972dca7e2..50cb86f3c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp index 3a1af7460..d6563598f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/node.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/node.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/node.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/node.hpp index f87d1e324..ac3f33392 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/node.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/node.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp index 602607a46..345cf31b6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp index 899268622..8c6df3a80 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp index c8d369569..487b44414 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/traits.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/traits.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/traits.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/traits.hpp index 05f1f67ed..7b1afeb04 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/splay_tree_/traits.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/splay_tree_/traits.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/standard_policies.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/standard_policies.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/standard_policies.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/standard_policies.hpp index 531d6cbed..bcaecec64 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/standard_policies.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/standard_policies.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp index 9ea563e2f..d8fc50bb7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp index ed36f2551..4bc4202ea 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp index d9a574c61..7199beb95 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp index 51ba28cbf..4b0f08470 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp index 3248bb22d..cc836457d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp index 4992908eb..296c06ef3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp index b03d7a3a0..33dca6eb2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -270,18 +270,24 @@ namespace __gnu_pbds /* 21 */ 15126ul, /* 22 */ 24476ul, /* 23 */ 39602ul, - /* 24 */ 64079ul, + /* 24 */ 64079ul +#if __SIZE_MAX__ > 0xfffful + , /* 25 */ 103681ul, /* 26 */ 167761ul, /* 27 */ 271442ul, /* 28 */ 439204ul, - /* 29 */ 710646ul, + /* 29 */ 710646ul +#if __SIZE_MAX__ > 0xffffful + , /* 30 */ 1149851ul, /* 31 */ 1860497ul, /* 32 */ 3010349ul, /* 33 */ 4870846ul, /* 34 */ 7881196ul, - /* 35 */ 12752042ul, + /* 35 */ 12752042ul +#if __SIZE_MAX__ > 0xfffffful + , /* 36 */ 20633239ul, /* 37 */ 33385282ul, /* 38 */ 54018521ul, @@ -294,6 +300,9 @@ namespace __gnu_pbds /* 45 */ 1568397607ul, /* 46 */ 2537720636ul, /* 47 */ 4106118243ul +#endif +#endif +#endif /* Pot's good, let's play */ }; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp index c73310dee..f7d583bef 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp index 0268e3899..8fd16352a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp index a35c5194d..de8c690cb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp index 23bfe7c66..f8c6bb4c5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_trace_base.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_trace_base.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_trace_base.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_trace_base.hpp index 46bc7a17e..c0498bee6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/tree_trace_base.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/tree_trace_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp index 2b803a15d..ec50fa041 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp index fdc1ae222..5b21c7604 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp index eb0b2d4e9..65fa90573 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp index f7d59350b..7576a84b5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp index e3bde5673..d2cd9eef2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp index 215be5dcc..0d5803bac 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/trie_string_access_traits_imp.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/trie_string_access_traits_imp.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/trie_string_access_traits_imp.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/trie_string_access_traits_imp.hpp index 48998aa18..c3573b880 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/trie_policy/trie_string_access_traits_imp.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/trie_policy/trie_string_access_traits_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/type_utils.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/type_utils.hpp similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/type_utils.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/type_utils.hpp index 14343795c..5b67f2c81 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/type_utils.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/type_utils.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -131,7 +131,7 @@ namespace __gnu_pbds }; }; - // Use C++0x's static_assert if possible. + // Use C++11's static_assert if possible. #if __cplusplus >= 201103L #define PB_DS_STATIC_ASSERT(UNIQUE, E) static_assert(E, #UNIQUE) #else diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/types_traits.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/types_traits.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/types_traits.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/types_traits.hpp index f90fa42cc..c9c1eb234 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/types_traits.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/types_traits.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp index 1867f4e11..050de3e8a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/iterator.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/iterator.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/iterator.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/iterator.hpp index 29f40c99e..2d8f9bb66 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/iterator.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/iterator.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp index 74330ed6a..d0861cb49 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp index 682f9540f..402314194 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/exception.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/exception.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/exception.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/exception.hpp index 79d14fd67..c5138a5ec 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/exception.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/exception.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/hash_policy.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/hash_policy.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/hash_policy.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/hash_policy.hpp index bda268f58..4bc63513b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/hash_policy.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/hash_policy.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/list_update_policy.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/list_update_policy.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/list_update_policy.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/list_update_policy.hpp index 15c634c5c..0e22a3b60 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/list_update_policy.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/list_update_policy.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/priority_queue.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/priority_queue.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/priority_queue.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/priority_queue.hpp index ee6f4c40a..aa6053ea4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/priority_queue.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/priority_queue.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/tag_and_trait.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/tag_and_trait.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/tag_and_trait.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/tag_and_trait.hpp index 6389ce177..79a6a6783 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/tag_and_trait.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/tag_and_trait.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/tree_policy.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/tree_policy.hpp similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/tree_policy.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/tree_policy.hpp index 6dac3f8f6..dd1c1b280 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/tree_policy.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/tree_policy.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/trie_policy.hpp b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/trie_policy.hpp similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/trie_policy.hpp rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/trie_policy.hpp index f0151f15e..73c14b0e1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pb_ds/trie_policy.hpp +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pb_ds/trie_policy.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pod_char_traits.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pod_char_traits.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pod_char_traits.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pod_char_traits.h index 38a84c80d..9f3bee806 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pod_char_traits.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pod_char_traits.h @@ -1,6 +1,6 @@ // POD character, std::char_traits specialization -*- C++ -*- -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pointer.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pointer.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pointer.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pointer.h index fdd076855..8432da0d2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pointer.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pointer.h @@ -1,6 +1,6 @@ // Custom pointer adapter and sample storage policies -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -449,9 +449,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline _Pointer_adapter operator++(int) { - _Pointer_adapter tmp(*this); + _Pointer_adapter __tmp(*this); _Storage_policy::set(_Storage_policy::get() + 1); - return tmp; + return __tmp; } inline _Pointer_adapter& @@ -464,9 +464,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline _Pointer_adapter operator--(int) { - _Pointer_adapter tmp(*this); + _Pointer_adapter __tmp(*this); _Storage_policy::set(_Storage_policy::get() - 1); - return tmp; + return __tmp; } }; // class _Pointer_adapter diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pool_allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pool_allocator.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pool_allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pool_allocator.h index 5fe6bed7f..3e59fabf2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/pool_allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/pool_allocator.h @@ -1,6 +1,6 @@ // Allocators -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -219,6 +219,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__n > this->max_size()) std::__throw_bad_alloc(); + const size_t __bytes = __n * sizeof(_Tp); + +#if __cpp_aligned_new + if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) + { + std::align_val_t __al = std::align_val_t(alignof(_Tp)); + return static_cast<_Tp*>(::operator new(__bytes, __al)); + } +#endif + // If there is a race through here, assume answer from getenv // will resolve in same direction. Inspired by techniques // to efficiently support threading found in basic_string.h. @@ -230,7 +240,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __atomic_add_dispatch(&_S_force_new, -1); } - const size_t __bytes = __n * sizeof(_Tp); if (__bytes > size_t(_S_max_bytes) || _S_force_new > 0) __ret = static_cast<_Tp*>(::operator new(__bytes)); else @@ -259,6 +268,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { if (__builtin_expect(__n != 0 && __p != 0, true)) { +#if __cpp_aligned_new + if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) + { + ::operator delete(__p, std::align_val_t(alignof(_Tp))); + return; + } +#endif const size_t __bytes = __n * sizeof(_Tp); if (__bytes > static_cast(_S_max_bytes) || _S_force_new > 0) ::operator delete(__p); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/random b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/random similarity index 91% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/random rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/random index 37bc732a7..d93757b08 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/random +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/random @@ -1,6 +1,6 @@ // Random number extensions -*- C++ -*- -// Copyright (C) 2012-2015 Free Software Foundation, Inc. +// Copyright (C) 2012-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -40,10 +40,10 @@ #include #include #ifdef __SSE2__ -# include +# include #endif -#ifdef _GLIBCXX_USE_C99_STDINT_TR1 +#if defined(_GLIBCXX_USE_C99_STDINT_TR1) && defined(UINT32_C) namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { @@ -404,6 +404,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -415,8 +416,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RealType __beta_val = _RealType(1)) : _M_alpha(__alpha_val), _M_beta(__beta_val) { - _GLIBCXX_DEBUG_ASSERT(_M_alpha > _RealType(0)); - _GLIBCXX_DEBUG_ASSERT(_M_beta > _RealType(0)); + __glibcxx_assert(_M_alpha > _RealType(0)); + __glibcxx_assert(_M_beta > _RealType(0)); } _RealType @@ -432,6 +433,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return (__p1._M_alpha == __p2._M_alpha && __p1._M_beta == __p2._M_beta); } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: void _M_initialize(); @@ -669,8 +674,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else if (__dist == _Dimen * (_Dimen + 1) / 2) _M_init_lower(__meanbegin, __meanend, __varcovbegin, __varcovend); else - _M_init_diagonal(__meanbegin, __meanend, - __varcovbegin, __varcovend); + { + __glibcxx_assert(__dist == _Dimen); + _M_init_diagonal(__meanbegin, __meanend, + __varcovbegin, __varcovend); + } } param_type(std::initializer_list<_RealType> __mean, @@ -688,8 +696,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_init_lower(__mean.begin(), __mean.end(), __varcov.begin(), __varcov.end()); else - _M_init_diagonal(__mean.begin(), __mean.end(), - __varcov.begin(), __varcov.end()); + { + __glibcxx_assert(__varcov.size() == _Dimen); + _M_init_diagonal(__mean.begin(), __mean.end(), + __varcov.begin(), __varcov.end()); + } } std::array<_RealType, _Dimen> @@ -704,6 +715,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_mean == __p2._M_mean && __p1._M_t == __p2._M_t; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: template void _M_init_full(_InputIterator1 __meanbegin, @@ -936,6 +951,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -945,8 +961,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION result_type __sigma_val = result_type(1)) : _M_nu(__nu_val), _M_sigma(__sigma_val) { - _GLIBCXX_DEBUG_ASSERT(_M_nu >= result_type(0)); - _GLIBCXX_DEBUG_ASSERT(_M_sigma > result_type(0)); + __glibcxx_assert(_M_nu >= result_type(0)); + __glibcxx_assert(_M_sigma > result_type(0)); } result_type @@ -959,8 +975,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend bool operator==(const param_type& __p1, const param_type& __p2) - { return __p1._M_nu == __p2._M_nu - && __p1._M_sigma == __p2._M_sigma; } + { return __p1._M_nu == __p2._M_nu && __p1._M_sigma == __p2._M_sigma; } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } private: void _M_initialize(); @@ -1178,6 +1197,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -1187,8 +1207,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION result_type __omega_val = result_type(1)) : _M_mu(__mu_val), _M_omega(__omega_val) { - _GLIBCXX_DEBUG_ASSERT(_M_mu >= result_type(0.5L)); - _GLIBCXX_DEBUG_ASSERT(_M_omega > result_type(0)); + __glibcxx_assert(_M_mu >= result_type(0.5L)); + __glibcxx_assert(_M_omega > result_type(0)); } result_type @@ -1201,8 +1221,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend bool operator==(const param_type& __p1, const param_type& __p2) - { return __p1._M_mu == __p2._M_mu - && __p1._M_omega == __p2._M_omega; } + { return __p1._M_mu == __p2._M_mu && __p1._M_omega == __p2._M_omega; } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } private: void _M_initialize(); @@ -1411,6 +1434,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -1420,8 +1444,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION result_type __mu_val = result_type(1)) : _M_alpha(__alpha_val), _M_mu(__mu_val) { - _GLIBCXX_DEBUG_ASSERT(_M_alpha > result_type(0)); - _GLIBCXX_DEBUG_ASSERT(_M_mu > result_type(0)); + __glibcxx_assert(_M_alpha > result_type(0)); + __glibcxx_assert(_M_mu > result_type(0)); } result_type @@ -1436,6 +1460,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_alpha == __p2._M_alpha && __p1._M_mu == __p2._M_mu; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: void _M_initialize(); @@ -1645,6 +1673,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -1655,9 +1684,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION result_type __nu_val = result_type(1)) : _M_lambda(__lambda_val), _M_mu(__mu_val), _M_nu(__nu_val) { - _GLIBCXX_DEBUG_ASSERT(_M_lambda > result_type(0)); - _GLIBCXX_DEBUG_ASSERT(_M_mu > result_type(0)); - _GLIBCXX_DEBUG_ASSERT(_M_nu > result_type(0)); + __glibcxx_assert(_M_lambda > result_type(0)); + __glibcxx_assert(_M_mu > result_type(0)); + __glibcxx_assert(_M_nu > result_type(0)); } result_type @@ -1674,9 +1703,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend bool operator==(const param_type& __p1, const param_type& __p2) - { return __p1._M_lambda == __p2._M_lambda + { + return __p1._M_lambda == __p2._M_lambda && __p1._M_mu == __p2._M_mu - && __p1._M_nu == __p2._M_nu; } + && __p1._M_nu == __p2._M_nu; + } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } private: void _M_initialize(); @@ -1884,6 +1919,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -1893,7 +1929,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION result_type __b = result_type(1)) : _M_a(__a), _M_b(__b) { - _GLIBCXX_DEBUG_ASSERT(_M_a <= _M_b); + __glibcxx_assert(_M_a <= _M_b); } result_type @@ -1908,6 +1944,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: void _M_initialize(); @@ -2120,6 +2160,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -2129,8 +2170,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION result_type __omega = result_type(1)) : _M_q(__q), _M_omega(__omega) { - _GLIBCXX_DEBUG_ASSERT(_M_q > result_type(0)); - _GLIBCXX_DEBUG_ASSERT(_M_q < result_type(1)); + __glibcxx_assert(_M_q > result_type(0)); + __glibcxx_assert(_M_q < result_type(1)); } result_type @@ -2143,8 +2184,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend bool operator==(const param_type& __p1, const param_type& __p2) - { return __p1._M_q == __p2._M_q - && __p1._M_omega == __p2._M_omega; } + { return __p1._M_q == __p2._M_q && __p1._M_omega == __p2._M_omega; } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } private: void _M_initialize(); @@ -2353,6 +2397,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -2364,9 +2409,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RealType __c = _RealType(1)) : _M_a(__a), _M_b(__b), _M_c(__c) { - _GLIBCXX_DEBUG_ASSERT(_M_a <= _M_b); - _GLIBCXX_DEBUG_ASSERT(_M_b <= _M_c); - _GLIBCXX_DEBUG_ASSERT(_M_a < _M_c); + __glibcxx_assert(_M_a <= _M_b); + __glibcxx_assert(_M_b <= _M_c); + __glibcxx_assert(_M_a < _M_c); _M_r_ab = (_M_b - _M_a) / (_M_c - _M_a); _M_f_ab_ac = (_M_b - _M_a) * (_M_c - _M_a); @@ -2387,8 +2432,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend bool operator==(const param_type& __p1, const param_type& __p2) - { return (__p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b - && __p1._M_c == __p2._M_c); } + { + return (__p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b + && __p1._M_c == __p2._M_c); + } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } private: @@ -2620,8 +2671,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_mu(__mu), _M_kappa(__kappa) { const _RealType __pi = __gnu_cxx::__math_constants<_RealType>::__pi; - _GLIBCXX_DEBUG_ASSERT(_M_mu >= -__pi && _M_mu <= __pi); - _GLIBCXX_DEBUG_ASSERT(_M_kappa >= _RealType(0)); + __glibcxx_assert(_M_mu >= -__pi && _M_mu <= __pi); + __glibcxx_assert(_M_kappa >= _RealType(0)); auto __tau = std::sqrt(_RealType(4) * _M_kappa * _M_kappa + _RealType(1)) + _RealType(1); @@ -2640,8 +2691,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend bool operator==(const param_type& __p1, const param_type& __p2) - { return (__p1._M_mu == __p2._M_mu - && __p1._M_kappa == __p2._M_kappa); } + { return __p1._M_mu == __p2._M_mu && __p1._M_kappa == __p2._M_kappa; } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } private: _RealType _M_mu; @@ -2857,8 +2911,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION result_type __n = 1) : _M_N{__N}, _M_K{__K}, _M_n{__n} { - _GLIBCXX_DEBUG_ASSERT(_M_N >= _M_K); - _GLIBCXX_DEBUG_ASSERT(_M_N >= _M_n); + __glibcxx_assert(_M_N >= _M_K); + __glibcxx_assert(_M_N >= _M_n); } result_type @@ -2883,6 +2937,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION && (__p1._M_K == __p2._M_K) && (__p1._M_n == __p2._M_n); } + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + private: result_type _M_N; @@ -3105,6 +3163,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef _RealType result_type; + /** Parameter type. */ struct param_type { @@ -3114,7 +3173,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION result_type __b = result_type(1)) : _M_a(__a), _M_b(__b) { - _GLIBCXX_DEBUG_ASSERT(_M_b > result_type(0)); + __glibcxx_assert(_M_b > result_type(0)); } result_type @@ -3127,8 +3186,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend bool operator==(const param_type& __p1, const param_type& __p2) - { return __p1._M_a == __p2._M_a - && __p1._M_b == __p2._M_b; } + { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } private: void _M_initialize(); @@ -3311,6 +3373,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: /** The type of the range of the distribution. */ typedef std::array<_RealType, _Dimen> result_type; + /** Parameter type. */ struct param_type { @@ -3319,8 +3382,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { } friend bool - operator==(const param_type& __p1, const param_type& __p2) + operator==(const param_type&, const param_type&) { return true; } + + friend bool + operator!=(const param_type&, const param_type&) + { return false; } }; /** @@ -3487,13 +3554,229 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _RealType>& __d2) { return !(__d1 == __d2); } + + /** + * @brief A distribution for random coordinates inside a unit sphere. + */ + template + class uniform_inside_sphere_distribution + { + static_assert(std::is_floating_point<_RealType>::value, + "template argument not a floating point type"); + static_assert(_Dimen != 0, "dimension is zero"); + + public: + /** The type of the range of the distribution. */ + using result_type = std::array<_RealType, _Dimen>; + + /** Parameter type. */ + struct param_type + { + using distribution_type + = uniform_inside_sphere_distribution<_Dimen, _RealType>; + friend class uniform_inside_sphere_distribution<_Dimen, _RealType>; + + explicit + param_type(_RealType __radius = _RealType(1)) + : _M_radius(__radius) + { + __glibcxx_assert(_M_radius > _RealType(0)); + } + + _RealType + radius() const + { return _M_radius; } + + friend bool + operator==(const param_type& __p1, const param_type& __p2) + { return __p1._M_radius == __p2._M_radius; } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + + private: + _RealType _M_radius; + }; + + /** + * @brief Constructors. + */ + explicit + uniform_inside_sphere_distribution(_RealType __radius = _RealType(1)) + : _M_param(__radius), _M_uosd() + { } + + explicit + uniform_inside_sphere_distribution(const param_type& __p) + : _M_param(__p), _M_uosd() + { } + + /** + * @brief Resets the distribution state. + */ + void + reset() + { _M_uosd.reset(); } + + /** + * @brief Returns the @f$radius@f$ of the distribution. + */ + _RealType + radius() const + { return _M_param.radius(); } + + /** + * @brief Returns the parameter set of the distribution. + */ + param_type + param() const + { return _M_param; } + + /** + * @brief Sets the parameter set of the distribution. + * @param __param The new parameter set of the distribution. + */ + void + param(const param_type& __param) + { _M_param = __param; } + + /** + * @brief Returns the greatest lower bound value of the distribution. + * This function makes no sense for this distribution. + */ + result_type + min() const + { + result_type __res; + __res.fill(0); + return __res; + } + + /** + * @brief Returns the least upper bound value of the distribution. + * This function makes no sense for this distribution. + */ + result_type + max() const + { + result_type __res; + __res.fill(0); + return __res; + } + + /** + * @brief Generating functions. + */ + template + result_type + operator()(_UniformRandomNumberGenerator& __urng) + { return this->operator()(__urng, _M_param); } + + template + result_type + operator()(_UniformRandomNumberGenerator& __urng, + const param_type& __p); + + template + void + __generate(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomNumberGenerator& __urng) + { this->__generate(__f, __t, __urng, this->param()); } + + template + void + __generate(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __p) + { this->__generate_impl(__f, __t, __urng, __p); } + + template + void + __generate(result_type* __f, result_type* __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __p) + { this->__generate_impl(__f, __t, __urng, __p); } + + /** + * @brief Return true if two uniform on sphere distributions have + * the same parameters and the sequences that would be + * generated are equal. + */ + friend bool + operator==(const uniform_inside_sphere_distribution& __d1, + const uniform_inside_sphere_distribution& __d2) + { return __d1._M_param == __d2._M_param && __d1._M_uosd == __d2._M_uosd; } + + /** + * @brief Inserts a %uniform_inside_sphere_distribution random number + * distribution @p __x into the output stream @p __os. + * + * @param __os An output stream. + * @param __x A %uniform_inside_sphere_distribution random number + * distribution. + * + * @returns The output stream with the state of @p __x inserted or in + * an error state. + */ + template + friend std::basic_ostream<_CharT, _Traits>& + operator<<(std::basic_ostream<_CharT, _Traits>& __os, + const __gnu_cxx::uniform_inside_sphere_distribution<_Dimen1, + _RealType1>& + ); + + /** + * @brief Extracts a %uniform_inside_sphere_distribution random number + * distribution + * @p __x from the input stream @p __is. + * + * @param __is An input stream. + * @param __x A %uniform_inside_sphere_distribution random number + * generator engine. + * + * @returns The input stream with @p __x extracted or in an error state. + */ + template + friend std::basic_istream<_CharT, _Traits>& + operator>>(std::basic_istream<_CharT, _Traits>& __is, + __gnu_cxx::uniform_inside_sphere_distribution<_Dimen1, + _RealType1>&); + + private: + template + void + __generate_impl(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __p); + + param_type _M_param; + uniform_on_sphere_distribution<_Dimen, _RealType> _M_uosd; + }; + + /** + * @brief Return true if two uniform on sphere distributions are different. + */ + template + inline bool + operator!=(const __gnu_cxx::uniform_inside_sphere_distribution<_Dimen, + _RealType>& __d1, + const __gnu_cxx::uniform_inside_sphere_distribution<_Dimen, + _RealType>& __d2) + { return !(__d1 == __d2); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace __gnu_cxx #include "ext/opt_random.h" #include "random.tcc" -#endif // _GLIBCXX_USE_C99_STDINT_TR1 +#endif // _GLIBCXX_USE_C99_STDINT_TR1 && UINT32_C #endif // C++11 diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/random.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/random.tcc similarity index 90% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/random.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/random.tcc index 1f3aed922..5aa443fd8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/random.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/random.tcc @@ -1,6 +1,6 @@ // Random number extensions -*- C++ -*- -// Copyright (C) 2012-2015 Free Software Foundation, Inc. +// Copyright (C) 2012-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -440,7 +440,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) std::__detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); @@ -725,7 +726,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) { @@ -799,7 +801,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) typename std::gamma_distribution::param_type __pg(__p.mu(), __p.omega() / __p.mu()); @@ -863,7 +866,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) result_type __mu_val = __p.mu(); result_type __malphinv = -result_type(1) / __p.alpha(); @@ -953,7 +957,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) typename std::gamma_distribution::param_type __p1(__p.lambda(), result_type(1) / __p.lambda()), @@ -1024,7 +1029,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) result_type __dif = __p.b() - __p.a(); result_type __sum = __p.a() + __p.b(); @@ -1121,7 +1127,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) result_type __2q = result_type(2) * __p.q(); result_type __q2 = __p.q() * __p.q(); @@ -1196,7 +1203,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) *__f++ = this->operator()(__urng, __param); @@ -1297,7 +1305,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) *__f++ = this->operator()(__urng, __param); @@ -1403,7 +1412,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) *__f++ = this->operator()(__urng); @@ -1481,7 +1491,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __p) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) + std::__detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); @@ -1570,7 +1582,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __t; }); __norm = std::sqrt(__sum); } - while (__norm == _RealType(0) || ! std::isfinite(__norm)); + while (__norm == _RealType(0) || ! __builtin_isfinite(__norm)); std::transform(__ret.begin(), __ret.end(), __ret.begin(), [__norm](_RealType __val){ return __val / __norm; }); @@ -1643,7 +1655,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _UniformRandomNumberGenerator& __urng, const param_type& __param) { - __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator>) + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) while (__f != __t) *__f++ = this->operator()(__urng, __param); @@ -1669,8 +1682,169 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __is >> __x._M_nd; } + + namespace { + + // Helper class for the uniform_inside_sphere_distribution generation + // function. + template + class uniform_inside_sphere_helper; + + template + class uniform_inside_sphere_helper<_Dimen, false, _RealType> + { + using result_type + = typename uniform_inside_sphere_distribution<_Dimen, _RealType>:: + result_type; + + public: + template + result_type + operator()(_UniformOnSphereDistribution& __uosd, + _UniformRandomNumberGenerator& __urng, + _RealType __radius) + { + std::__detail::_Adaptor<_UniformRandomNumberGenerator, + _RealType> __aurng(__urng); + + _RealType __pow = 1 / _RealType(_Dimen); + _RealType __urt = __radius * std::pow(__aurng(), __pow); + result_type __ret = __uosd(__aurng); + + std::transform(__ret.begin(), __ret.end(), __ret.begin(), + [__urt](_RealType __val) + { return __val * __urt; }); + + return __ret; + } + }; + + // Helper class for the uniform_inside_sphere_distribution generation + // function specialized for small dimensions. + template + class uniform_inside_sphere_helper<_Dimen, true, _RealType> + { + using result_type + = typename uniform_inside_sphere_distribution<_Dimen, _RealType>:: + result_type; + + public: + template + result_type + operator()(_UniformOnSphereDistribution&, + _UniformRandomNumberGenerator& __urng, + _RealType __radius) + { + result_type __ret; + _RealType __sq; + _RealType __radsq = __radius * __radius; + std::__detail::_Adaptor<_UniformRandomNumberGenerator, + _RealType> __aurng(__urng); + + do + { + __sq = _RealType(0); + for (int i = 0; i < _Dimen; ++i) + { + __ret[i] = _RealType(2) * __aurng() - _RealType(1); + __sq += __ret[i] * __ret[i]; + } + } + while (__sq > _RealType(1)); + + for (int i = 0; i < _Dimen; ++i) + __ret[i] *= __radius; + + return __ret; + } + }; + } // namespace + + // + // Experiments have shown that rejection is more efficient than transform + // for dimensions less than 8. + // + template + template + typename uniform_inside_sphere_distribution<_Dimen, _RealType>::result_type + uniform_inside_sphere_distribution<_Dimen, _RealType>:: + operator()(_UniformRandomNumberGenerator& __urng, + const param_type& __p) + { + uniform_inside_sphere_helper<_Dimen, _Dimen < 8, _RealType> __helper; + return __helper(_M_uosd, __urng, __p.radius()); + } + + template + template + void + uniform_inside_sphere_distribution<_Dimen, _RealType>:: + __generate_impl(_OutputIterator __f, _OutputIterator __t, + _UniformRandomNumberGenerator& __urng, + const param_type& __param) + { + __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, + result_type>) + + while (__f != __t) + *__f++ = this->operator()(__urng, __param); + } + + template + std::basic_ostream<_CharT, _Traits>& + operator<<(std::basic_ostream<_CharT, _Traits>& __os, + const __gnu_cxx::uniform_inside_sphere_distribution<_Dimen, + _RealType>& __x) + { + typedef std::basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const typename __ios_base::fmtflags __flags = __os.flags(); + const _CharT __fill = __os.fill(); + const std::streamsize __precision = __os.precision(); + const _CharT __space = __os.widen(' '); + __os.flags(__ios_base::scientific | __ios_base::left); + __os.fill(__space); + __os.precision(std::numeric_limits<_RealType>::max_digits10); + + __os << __x.radius() << __space << __x._M_uosd; + + __os.flags(__flags); + __os.fill(__fill); + __os.precision(__precision); + + return __os; + } + + template + std::basic_istream<_CharT, _Traits>& + operator>>(std::basic_istream<_CharT, _Traits>& __is, + __gnu_cxx::uniform_inside_sphere_distribution<_Dimen, + _RealType>& __x) + { + typedef std::basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::ios_base __ios_base; + + const typename __ios_base::fmtflags __flags = __is.flags(); + __is.flags(__ios_base::dec | __ios_base::skipws); + + _RealType __radius_val; + __is >> __radius_val >> __x._M_uosd; + __x.param(typename uniform_inside_sphere_distribution<_Dimen, _RealType>:: + param_type(__radius_val)); + + __is.flags(__flags); + + return __is; + } + _GLIBCXX_END_NAMESPACE_VERSION -} // namespace +} // namespace __gnu_cxx #endif // _EXT_RANDOM_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/rb_tree b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/rb_tree similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/rb_tree rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/rb_tree index d145c0e11..a114f8f4c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/rb_tree +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/rb_tree @@ -1,6 +1,6 @@ // rb_tree extension -*- C++ -*- -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/rc_string_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/rc_string_base.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/rc_string_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/rc_string_base.h index 8e8a8e52e..60d015be0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/rc_string_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/rc_string_base.h @@ -1,6 +1,6 @@ // Reference-counted versatile string base -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -354,7 +354,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void _M_clear() - { _M_erase(size_type(0), _M_length()); } + { + _M_dispose(); + _M_data(_S_empty_rep._M_refcopy()); + } bool _M_compare(const __rc_string_base&) const diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/rope b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/rope similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/rope rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/rope index b982dc88d..785205cb2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/rope +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/rope @@ -1,6 +1,6 @@ // SGI's rope class -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/ropeimpl.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/ropeimpl.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/ropeimpl.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/ropeimpl.h index ceb8bfcf1..471b13f4f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/ropeimpl.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/ropeimpl.h @@ -1,6 +1,6 @@ // SGI's rope class implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -1117,7 +1117,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION printf("NULL\n"); return; } - if (_S_concat == __r->_M_tag) + if (__detail::_S_concat == __r->_M_tag) { _RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeRep* __left = __c->_M_left; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/slist b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/slist similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/slist rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/slist index cb7b4e4fb..66a0a8825 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/slist +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/slist @@ -1,6 +1,6 @@ // Singly-linked list implementation -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/sso_string_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/sso_string_base.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/sso_string_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/sso_string_base.h index d84cb1265..01673e76d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/sso_string_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/sso_string_base.h @@ -1,6 +1,6 @@ // Short-string-optimized versatile string base -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/stdio_filebuf.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/stdio_filebuf.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/stdio_filebuf.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/stdio_filebuf.h index 2ada0cab4..9a3b8760f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/stdio_filebuf.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/stdio_filebuf.h @@ -1,6 +1,6 @@ // File descriptor layer for filebuf -*- C++ -*- -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/stdio_sync_filebuf.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/stdio_sync_filebuf.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/stdio_sync_filebuf.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/stdio_sync_filebuf.h index 8aec99332..4c9e1aed6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/stdio_sync_filebuf.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/stdio_sync_filebuf.h @@ -1,6 +1,6 @@ // Iostreams wrapper for stdio FILE* -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/string_conversions.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/string_conversions.h similarity index 79% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/string_conversions.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/string_conversions.h index f4648a81c..89cba6185 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/string_conversions.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/string_conversions.h @@ -1,6 +1,6 @@ // String Conversions -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -58,15 +58,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Ret __ret; _CharT* __endptr; - errno = 0; + + struct _Save_errno { + _Save_errno() : _M_errno(errno) { errno = 0; } + ~_Save_errno() { if (errno == 0) errno = _M_errno; } + int _M_errno; + } const __save_errno; + + struct _Range_chk { + static bool + _S_chk(_TRet, std::false_type) { return false; } + + static bool + _S_chk(_TRet __val, std::true_type) // only called when _Ret is int + { + return __val < _TRet(__numeric_traits::__min) + || __val > _TRet(__numeric_traits::__max); + } + }; + const _TRet __tmp = __convf(__str, &__endptr, __base...); if (__endptr == __str) std::__throw_invalid_argument(__name); else if (errno == ERANGE - || (std::__are_same<_Ret, int>::__value - && (__tmp < __numeric_traits::__min - || __tmp > __numeric_traits::__max))) + || _Range_chk::_S_chk(__tmp, std::is_same<_Ret, int>{})) std::__throw_out_of_range(__name); else __ret = __tmp; @@ -84,8 +100,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __builtin_va_list), std::size_t __n, const _CharT* __fmt, ...) { - // XXX Eventually the result will be constructed in place in - // the C++0x string, likely with the help of internal hooks. + // XXX Eventually the result should be constructed in-place in + // the __cxx11 string, likely with the help of internal hooks. _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __n)); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/throw_allocator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/throw_allocator.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/throw_allocator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/throw_allocator.h index df9a9644f..f2b78682d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/throw_allocator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/throw_allocator.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/type_traits.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/type_traits.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/type_traits.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/type_traits.h index 198e92cc1..1efefbcfc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/type_traits.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/type_traits.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -34,6 +34,8 @@ #include #include +extern "C++" { + namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -214,5 +216,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace +} // extern "C++" #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/typelist.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/typelist.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/typelist.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/typelist.h index 7cc74b3ea..46e653b40 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/typelist.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/typelist.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring.h index 63349dde7..4c8606b17 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring.h @@ -1,6 +1,6 @@ // Versatile string -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -536,7 +536,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const_reference operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT { - _GLIBCXX_DEBUG_ASSERT(__pos <= this->size()); + __glibcxx_assert(__pos <= this->size()); return this->_M_data()[__pos]; } @@ -555,7 +555,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { // Allow pos == size() both in C++98 mode, as v3 extension, // and in C++11 mode. - _GLIBCXX_DEBUG_ASSERT(__pos <= this->size()); + __glibcxx_assert(__pos <= this->size()); // In pedantic mode be strict in C++98 mode. _GLIBCXX_DEBUG_PEDASSERT(__cplusplus >= 201103L || __pos < this->size()); @@ -613,7 +613,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element of the %string. */ reference - front() _GLIBCXX_NOEXCEPT + front() noexcept { return operator[](0); } /** @@ -621,7 +621,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element of the %string. */ const_reference - front() const _GLIBCXX_NOEXCEPT + front() const noexcept { return operator[](0); } /** @@ -629,7 +629,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element of the %string. */ reference - back() _GLIBCXX_NOEXCEPT + back() noexcept { return operator[](this->size() - 1); } /** @@ -637,7 +637,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * last element of the %string. */ const_reference - back() const _GLIBCXX_NOEXCEPT + back() const noexcept { return operator[](this->size() - 1); } #endif @@ -2680,7 +2680,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) +#if __cplusplus >= 201103L #include @@ -2688,6 +2688,7 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION +#if _GLIBCXX_USE_C99_STDLIB // 21.4 Numeric Conversions [string.conversions]. inline int stoi(const __vstring& __str, std::size_t* __idx = 0, int __base = 10) @@ -2726,7 +2727,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline long double stold(const __vstring& __str, std::size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } +#endif // _GLIBCXX_USE_C99_STDLIB +#if _GLIBCXX_USE_C99_STDIO // NB: (v)snprintf vs sprintf. // DR 1261. @@ -2789,8 +2792,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, __n, "%Lf", __val); } +#endif // _GLIBCXX_USE_C99_STDIO -#ifdef _GLIBCXX_USE_WCHAR_T +#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_WCHAR inline int stoi(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstol, "stoi", __str.c_str(), @@ -2890,8 +2894,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf, __n, L"%Lf", __val); } -#endif -#endif +#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF +#endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring.tcc similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring.tcc index 58abee5a7..ae5be38cd 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring.tcc @@ -1,6 +1,6 @@ // Versatile string -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring_fwd.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring_fwd.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring_fwd.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring_fwd.h index 097d5efa0..45ae5de59 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring_fwd.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring_fwd.h @@ -1,6 +1,6 @@ // Forward declarations -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring_util.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring_util.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring_util.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring_util.h index d0071e8ec..f9627812f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ext/vstring_util.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ext/vstring_util.h @@ -1,6 +1,6 @@ // Versatile string utility -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/fenv.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/fenv.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/fenv.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/fenv.h index 81fd000f3..f6a74f434 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/fenv.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/fenv.h @@ -1,6 +1,6 @@ // -*- C++ -*- compatibility header. -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/forward_list b/devkitARM/arm-none-eabi/include/c++/7.1.0/forward_list similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/forward_list rename to devkitARM/arm-none-eabi/include/c++/7.1.0/forward_list index 1a268c4eb..28b7c0520 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/forward_list +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/forward_list @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/fstream b/devkitARM/arm-none-eabi/include/c++/7.1.0/fstream similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/fstream rename to devkitARM/arm-none-eabi/include/c++/7.1.0/fstream index fdb2b3afe..52830945f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/fstream +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/fstream @@ -1,6 +1,6 @@ // File based streams -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -386,7 +386,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Common code for seekoff, seekpos, and overflow pos_type _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state); - + int _M_get_ext_pos(__state_type &__state); diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/functional b/devkitARM/arm-none-eabi/include/c++/7.1.0/functional new file mode 100644 index 000000000..e4a82ee34 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/functional @@ -0,0 +1,1243 @@ +// -*- C++ -*- + +// Copyright (C) 2001-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +/** @file include/functional + * This is a Standard C++ Library header. + */ + +#ifndef _GLIBCXX_FUNCTIONAL +#define _GLIBCXX_FUNCTIONAL 1 + +#pragma GCC system_header + +#include +#include + +#if __cplusplus >= 201103L + +#include +#include +#include +#include +#include +#include +#if __cplusplus > 201402L +# include +# include +# include +# include +# include +#endif + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#if __cplusplus > 201402L +# define __cpp_lib_invoke 201411 + + /// Invoke a callable object. + template + inline invoke_result_t<_Callable, _Args...> + invoke(_Callable&& __fn, _Args&&... __args) + noexcept(is_nothrow_invocable_v<_Callable, _Args...>) + { + return std::__invoke(std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); + } +#endif + + template + struct _Pack : integral_constant + { }; + + template + struct _AllConvertible : false_type + { }; + + template + struct _AllConvertible<_Pack<_From...>, _Pack<_To...>, true> + : __and_...> + { }; + + template + using _NotSame = __not_::type, + typename std::decay<_Tp2>::type>>; + + template + struct _Mem_fn_traits; + + template + struct _Mem_fn_traits_base + { + using __result_type = _Res; + using __maybe_type + = _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>; + using __arity = integral_constant; + }; + +#define _GLIBCXX_MEM_FN_TRAITS2(_CV, _REF, _LVAL, _RVAL) \ + template \ + struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) _CV _REF> \ + : _Mem_fn_traits_base<_Res, _CV _Class, _ArgTypes...> \ + { \ + using __vararg = false_type; \ + }; \ + template \ + struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) _CV _REF> \ + : _Mem_fn_traits_base<_Res, _CV _Class, _ArgTypes...> \ + { \ + using __vararg = true_type; \ + }; + +#define _GLIBCXX_MEM_FN_TRAITS(_REF, _LVAL, _RVAL) \ + _GLIBCXX_MEM_FN_TRAITS2( , _REF, _LVAL, _RVAL) \ + _GLIBCXX_MEM_FN_TRAITS2(const , _REF, _LVAL, _RVAL) \ + _GLIBCXX_MEM_FN_TRAITS2(volatile , _REF, _LVAL, _RVAL) \ + _GLIBCXX_MEM_FN_TRAITS2(const volatile, _REF, _LVAL, _RVAL) + +_GLIBCXX_MEM_FN_TRAITS( , true_type, true_type) +_GLIBCXX_MEM_FN_TRAITS(&, true_type, false_type) +_GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type) + +#undef _GLIBCXX_MEM_FN_TRAITS +#undef _GLIBCXX_MEM_FN_TRAITS2 + + template::value> + class _Mem_fn_base + : public _Mem_fn_traits<_MemFunPtr>::__maybe_type + { + using _Traits = _Mem_fn_traits<_MemFunPtr>; + + using _Arity = typename _Traits::__arity; + using _Varargs = typename _Traits::__vararg; + + template + friend struct _Bind_check_arity; + + _MemFunPtr _M_pmf; + + public: + + using result_type = typename _Traits::__result_type; + + explicit constexpr + _Mem_fn_base(_MemFunPtr __pmf) noexcept : _M_pmf(__pmf) { } + + template + auto + operator()(_Args&&... __args) const + noexcept(noexcept( + std::__invoke(_M_pmf, std::forward<_Args>(__args)...))) + -> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...)) + { return std::__invoke(_M_pmf, std::forward<_Args>(__args)...); } + }; + + // Partial specialization for member object pointers. + template + class _Mem_fn_base<_MemObjPtr, false> + { + using _Arity = integral_constant; + using _Varargs = false_type; + + template + friend struct _Bind_check_arity; + + _MemObjPtr _M_pm; + + public: + explicit constexpr + _Mem_fn_base(_MemObjPtr __pm) noexcept : _M_pm(__pm) { } + + template + auto + operator()(_Tp&& __obj) const + noexcept(noexcept(std::__invoke(_M_pm, std::forward<_Tp>(__obj)))) + -> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj))) + { return std::__invoke(_M_pm, std::forward<_Tp>(__obj)); } + }; + + template + struct _Mem_fn; // undefined + + template + struct _Mem_fn<_Res _Class::*> + : _Mem_fn_base<_Res _Class::*> + { + using _Mem_fn_base<_Res _Class::*>::_Mem_fn_base; + }; + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2048. Unnecessary mem_fn overloads + /** + * @brief Returns a function object that forwards to the member + * pointer @a pm. + * @ingroup functors + */ + template + inline _Mem_fn<_Tp _Class::*> + mem_fn(_Tp _Class::* __pm) noexcept + { + return _Mem_fn<_Tp _Class::*>(__pm); + } + + /** + * @brief Determines if the given type _Tp is a function object that + * should be treated as a subexpression when evaluating calls to + * function objects returned by bind(). + * + * C++11 [func.bind.isbind]. + * @ingroup binders + */ + template + struct is_bind_expression + : public false_type { }; + + /** + * @brief Determines if the given type _Tp is a placeholder in a + * bind() expression and, if so, which placeholder it is. + * + * C++11 [func.bind.isplace]. + * @ingroup binders + */ + template + struct is_placeholder + : public integral_constant + { }; + +#if __cplusplus > 201402L + template inline constexpr bool is_bind_expression_v + = is_bind_expression<_Tp>::value; + template inline constexpr int is_placeholder_v + = is_placeholder<_Tp>::value; +#endif // C++17 + + /** @brief The type of placeholder objects defined by libstdc++. + * @ingroup binders + */ + template struct _Placeholder { }; + + _GLIBCXX_END_NAMESPACE_VERSION + + /** @namespace std::placeholders + * @brief ISO C++11 entities sub-namespace for functional. + * @ingroup binders + */ + namespace placeholders + { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + /* Define a large number of placeholders. There is no way to + * simplify this with variadic templates, because we're introducing + * unique names for each. + */ + extern const _Placeholder<1> _1; + extern const _Placeholder<2> _2; + extern const _Placeholder<3> _3; + extern const _Placeholder<4> _4; + extern const _Placeholder<5> _5; + extern const _Placeholder<6> _6; + extern const _Placeholder<7> _7; + extern const _Placeholder<8> _8; + extern const _Placeholder<9> _9; + extern const _Placeholder<10> _10; + extern const _Placeholder<11> _11; + extern const _Placeholder<12> _12; + extern const _Placeholder<13> _13; + extern const _Placeholder<14> _14; + extern const _Placeholder<15> _15; + extern const _Placeholder<16> _16; + extern const _Placeholder<17> _17; + extern const _Placeholder<18> _18; + extern const _Placeholder<19> _19; + extern const _Placeholder<20> _20; + extern const _Placeholder<21> _21; + extern const _Placeholder<22> _22; + extern const _Placeholder<23> _23; + extern const _Placeholder<24> _24; + extern const _Placeholder<25> _25; + extern const _Placeholder<26> _26; + extern const _Placeholder<27> _27; + extern const _Placeholder<28> _28; + extern const _Placeholder<29> _29; + _GLIBCXX_END_NAMESPACE_VERSION + } + + _GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * Partial specialization of is_placeholder that provides the placeholder + * number for the placeholder objects defined by libstdc++. + * @ingroup binders + */ + template + struct is_placeholder<_Placeholder<_Num> > + : public integral_constant + { }; + + template + struct is_placeholder > + : public integral_constant + { }; + + + // Like tuple_element_t but SFINAE-friendly. + template + using _Safe_tuple_element_t + = typename enable_if<(__i < tuple_size<_Tuple>::value), + tuple_element<__i, _Tuple>>::type::type; + + /** + * Maps an argument to bind() into an actual argument to the bound + * function object [func.bind.bind]/10. Only the first parameter should + * be specified: the rest are used to determine among the various + * implementations. Note that, although this class is a function + * object, it isn't entirely normal because it takes only two + * parameters regardless of the number of parameters passed to the + * bind expression. The first parameter is the bound argument and + * the second parameter is a tuple containing references to the + * rest of the arguments. + */ + template::value, + bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> + class _Mu; + + /** + * If the argument is reference_wrapper<_Tp>, returns the + * underlying reference. + * C++11 [func.bind.bind] p10 bullet 1. + */ + template + class _Mu, false, false> + { + public: + /* Note: This won't actually work for const volatile + * reference_wrappers, because reference_wrapper::get() is const + * but not volatile-qualified. This might be a defect in the TR. + */ + template + _Tp& + operator()(_CVRef& __arg, _Tuple&) const volatile + { return __arg.get(); } + }; + + /** + * If the argument is a bind expression, we invoke the underlying + * function object with the same cv-qualifiers as we are given and + * pass along all of our arguments (unwrapped). + * C++11 [func.bind.bind] p10 bullet 2. + */ + template + class _Mu<_Arg, true, false> + { + public: + template + auto + operator()(_CVArg& __arg, + tuple<_Args...>& __tuple) const volatile + -> decltype(__arg(declval<_Args>()...)) + { + // Construct an index tuple and forward to __call + typedef typename _Build_index_tuple::__type + _Indexes; + return this->__call(__arg, __tuple, _Indexes()); + } + + private: + // Invokes the underlying function object __arg by unpacking all + // of the arguments in the tuple. + template + auto + __call(_CVArg& __arg, tuple<_Args...>& __tuple, + const _Index_tuple<_Indexes...>&) const volatile + -> decltype(__arg(declval<_Args>()...)) + { + return __arg(std::get<_Indexes>(std::move(__tuple))...); + } + }; + + /** + * If the argument is a placeholder for the Nth argument, returns + * a reference to the Nth argument to the bind function object. + * C++11 [func.bind.bind] p10 bullet 3. + */ + template + class _Mu<_Arg, false, true> + { + public: + template + _Safe_tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>&& + operator()(const volatile _Arg&, _Tuple& __tuple) const volatile + { + return + ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple)); + } + }; + + /** + * If the argument is just a value, returns a reference to that + * value. The cv-qualifiers on the reference are determined by the caller. + * C++11 [func.bind.bind] p10 bullet 4. + */ + template + class _Mu<_Arg, false, false> + { + public: + template + _CVArg&& + operator()(_CVArg&& __arg, _Tuple&) const volatile + { return std::forward<_CVArg>(__arg); } + }; + + // std::get for volatile-qualified tuples + template + inline auto + __volget(volatile tuple<_Tp...>& __tuple) + -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile& + { return std::get<_Ind>(const_cast&>(__tuple)); } + + // std::get for const-volatile-qualified tuples + template + inline auto + __volget(const volatile tuple<_Tp...>& __tuple) + -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile& + { return std::get<_Ind>(const_cast&>(__tuple)); } + + /// Type of the function object returned from bind(). + template + struct _Bind; + + template + class _Bind<_Functor(_Bound_args...)> + : public _Weak_result_type<_Functor> + { + typedef typename _Build_index_tuple::__type + _Bound_indexes; + + _Functor _M_f; + tuple<_Bound_args...> _M_bound_args; + + // Call unqualified + template + _Result + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... + ); + } + + // Call as const + template + _Result + __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... + ); + } + + // Call as volatile + template + _Result + __call_v(tuple<_Args...>&& __args, + _Index_tuple<_Indexes...>) volatile + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... + ); + } + + // Call as const volatile + template + _Result + __call_c_v(tuple<_Args...>&& __args, + _Index_tuple<_Indexes...>) const volatile + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... + ); + } + + template + using _Mu_type = decltype( + _Mu::type>()( + std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) ); + + template + using _Res_type_impl + = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type; + + template + using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>; + + template + using __dependent = typename + enable_if::value+1), _Functor>::type; + + template class __cv_quals> + using _Res_type_cv = _Res_type_impl< + typename __cv_quals<__dependent<_CallArgs>>::type, + _CallArgs, + typename __cv_quals<_Bound_args>::type...>; + + public: + template + explicit _Bind(const _Functor& __f, _Args&&... __args) + : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) + { } + + template + explicit _Bind(_Functor&& __f, _Args&&... __args) + : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) + { } + + _Bind(const _Bind&) = default; + + _Bind(_Bind&& __b) + : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) + { } + + // Call unqualified + template>> + _Result + operator()(_Args&&... __args) + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + // Call as const + template, add_const>> + _Result + operator()(_Args&&... __args) const + { + return this->__call_c<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + +#if __cplusplus > 201402L +# define _GLIBCXX_DEPR_BIND \ + [[deprecated("std::bind does not support volatile in C++17")]] +#else +# define _GLIBCXX_DEPR_BIND +#endif + // Call as volatile + template, add_volatile>> + _GLIBCXX_DEPR_BIND + _Result + operator()(_Args&&... __args) volatile + { + return this->__call_v<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + // Call as const volatile + template, add_cv>> + _GLIBCXX_DEPR_BIND + _Result + operator()(_Args&&... __args) const volatile + { + return this->__call_c_v<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + }; + + /// Type of the function object returned from bind(). + template + struct _Bind_result; + + template + class _Bind_result<_Result, _Functor(_Bound_args...)> + { + typedef typename _Build_index_tuple::__type + _Bound_indexes; + + _Functor _M_f; + tuple<_Bound_args...> _M_bound_args; + + // sfinae types + template + using __enable_if_void + = typename enable_if{}>::type; + + template + using __disable_if_void + = typename enable_if{}, _Result>::type; + + // Call unqualified + template + __disable_if_void<_Res> + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) + { + return std::__invoke(_M_f, _Mu<_Bound_args>() + (std::get<_Indexes>(_M_bound_args), __args)...); + } + + // Call unqualified, return void + template + __enable_if_void<_Res> + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) + { + std::__invoke(_M_f, _Mu<_Bound_args>() + (std::get<_Indexes>(_M_bound_args), __args)...); + } + + // Call as const + template + __disable_if_void<_Res> + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const + { + return std::__invoke(_M_f, _Mu<_Bound_args>() + (std::get<_Indexes>(_M_bound_args), __args)...); + } + + // Call as const, return void + template + __enable_if_void<_Res> + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const + { + std::__invoke(_M_f, _Mu<_Bound_args>() + (std::get<_Indexes>(_M_bound_args), __args)...); + } + + // Call as volatile + template + __disable_if_void<_Res> + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile + { + return std::__invoke(_M_f, _Mu<_Bound_args>() + (__volget<_Indexes>(_M_bound_args), __args)...); + } + + // Call as volatile, return void + template + __enable_if_void<_Res> + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile + { + std::__invoke(_M_f, _Mu<_Bound_args>() + (__volget<_Indexes>(_M_bound_args), __args)...); + } + + // Call as const volatile + template + __disable_if_void<_Res> + __call(tuple<_Args...>&& __args, + _Index_tuple<_Indexes...>) const volatile + { + return std::__invoke(_M_f, _Mu<_Bound_args>() + (__volget<_Indexes>(_M_bound_args), __args)...); + } + + // Call as const volatile, return void + template + __enable_if_void<_Res> + __call(tuple<_Args...>&& __args, + _Index_tuple<_Indexes...>) const volatile + { + std::__invoke(_M_f, _Mu<_Bound_args>() + (__volget<_Indexes>(_M_bound_args), __args)...); + } + + public: + typedef _Result result_type; + + template + explicit _Bind_result(const _Functor& __f, _Args&&... __args) + : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) + { } + + template + explicit _Bind_result(_Functor&& __f, _Args&&... __args) + : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) + { } + + _Bind_result(const _Bind_result&) = default; + + _Bind_result(_Bind_result&& __b) + : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) + { } + + // Call unqualified + template + result_type + operator()(_Args&&... __args) + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + // Call as const + template + result_type + operator()(_Args&&... __args) const + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + // Call as volatile + template + _GLIBCXX_DEPR_BIND + result_type + operator()(_Args&&... __args) volatile + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + // Call as const volatile + template + _GLIBCXX_DEPR_BIND + result_type + operator()(_Args&&... __args) const volatile + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + }; +#undef _GLIBCXX_DEPR_BIND + + /** + * @brief Class template _Bind is always a bind expression. + * @ingroup binders + */ + template + struct is_bind_expression<_Bind<_Signature> > + : public true_type { }; + + /** + * @brief Class template _Bind is always a bind expression. + * @ingroup binders + */ + template + struct is_bind_expression > + : public true_type { }; + + /** + * @brief Class template _Bind is always a bind expression. + * @ingroup binders + */ + template + struct is_bind_expression > + : public true_type { }; + + /** + * @brief Class template _Bind is always a bind expression. + * @ingroup binders + */ + template + struct is_bind_expression> + : public true_type { }; + + /** + * @brief Class template _Bind_result is always a bind expression. + * @ingroup binders + */ + template + struct is_bind_expression<_Bind_result<_Result, _Signature>> + : public true_type { }; + + /** + * @brief Class template _Bind_result is always a bind expression. + * @ingroup binders + */ + template + struct is_bind_expression> + : public true_type { }; + + /** + * @brief Class template _Bind_result is always a bind expression. + * @ingroup binders + */ + template + struct is_bind_expression> + : public true_type { }; + + /** + * @brief Class template _Bind_result is always a bind expression. + * @ingroup binders + */ + template + struct is_bind_expression> + : public true_type { }; + + template + struct _Bind_check_arity { }; + + template + struct _Bind_check_arity<_Ret (*)(_Args...), _BoundArgs...> + { + static_assert(sizeof...(_BoundArgs) == sizeof...(_Args), + "Wrong number of arguments for function"); + }; + + template + struct _Bind_check_arity<_Ret (*)(_Args......), _BoundArgs...> + { + static_assert(sizeof...(_BoundArgs) >= sizeof...(_Args), + "Wrong number of arguments for function"); + }; + + template + struct _Bind_check_arity<_Tp _Class::*, _BoundArgs...> + { + using _Arity = typename _Mem_fn<_Tp _Class::*>::_Arity; + using _Varargs = typename _Mem_fn<_Tp _Class::*>::_Varargs; + static_assert(_Varargs::value + ? sizeof...(_BoundArgs) >= _Arity::value + 1 + : sizeof...(_BoundArgs) == _Arity::value + 1, + "Wrong number of arguments for pointer-to-member"); + }; + + // Trait type used to remove std::bind() from overload set via SFINAE + // when first argument has integer type, so that std::bind() will + // not be a better match than ::bind() from the BSD Sockets API. + template::type> + using __is_socketlike = __or_, is_enum<_Tp2>>; + + template + struct _Bind_helper + : _Bind_check_arity::type, _BoundArgs...> + { + typedef typename decay<_Func>::type __func_type; + typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type; + }; + + // Partial specialization for is_socketlike == true, does not define + // nested type so std::bind() will not participate in overload resolution + // when the first argument might be a socket file descriptor. + template + struct _Bind_helper + { }; + + /** + * @brief Function template for std::bind. + * @ingroup binders + */ + template + inline typename + _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type + bind(_Func&& __f, _BoundArgs&&... __args) + { + typedef _Bind_helper __helper_type; + return typename __helper_type::type(std::forward<_Func>(__f), + std::forward<_BoundArgs>(__args)...); + } + + template + struct _Bindres_helper + : _Bind_check_arity::type, _BoundArgs...> + { + typedef typename decay<_Func>::type __functor_type; + typedef _Bind_result<_Result, + __functor_type(typename decay<_BoundArgs>::type...)> + type; + }; + + /** + * @brief Function template for std::bind. + * @ingroup binders + */ + template + inline + typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type + bind(_Func&& __f, _BoundArgs&&... __args) + { + typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type; + return typename __helper_type::type(std::forward<_Func>(__f), + std::forward<_BoundArgs>(__args)...); + } + +#if __cplusplus >= 201402L + /// Generalized negator. + template + class _Not_fn + { + template + using __inv_res_t = typename __invoke_result<_Fn2, _Args...>::type; + + template + static decltype(!std::declval<_Tp>()) + _S_not() noexcept(noexcept(!std::declval<_Tp>())); + + public: + template + _Not_fn(_Fn2&& __fn, int) + : _M_fn(std::forward<_Fn2>(__fn)) { } + + _Not_fn(const _Not_fn& __fn) = default; + _Not_fn(_Not_fn&& __fn) = default; + ~_Not_fn() = default; + + // Macro to define operator() with given cv-qualifiers ref-qualifiers, + // forwarding _M_fn and the function arguments with the same qualifiers, + // and deducing the return type and exception-specification. +#define _GLIBCXX_NOT_FN_CALL_OP( _QUALS ) \ + template \ + decltype(_S_not<__inv_res_t<_Fn _QUALS, _Args...>>()) \ + operator()(_Args&&... __args) _QUALS \ + noexcept(noexcept(_S_not<__inv_res_t<_Fn _QUALS, _Args...>>())) \ + { \ + return !std::__invoke(std::forward< _Fn _QUALS >(_M_fn), \ + std::forward<_Args>(__args)...); \ + } + _GLIBCXX_NOT_FN_CALL_OP( & ) + _GLIBCXX_NOT_FN_CALL_OP( const & ) + _GLIBCXX_NOT_FN_CALL_OP( && ) + _GLIBCXX_NOT_FN_CALL_OP( const && ) +#undef _GLIBCXX_NOT_FN_CALL + + private: + _Fn _M_fn; + }; + +#if __cplusplus > 201402L +#define __cpp_lib_not_fn 201603 + /// [func.not_fn] Function template not_fn + template + inline auto + not_fn(_Fn&& __fn) + noexcept(std::is_nothrow_constructible, _Fn&&>::value) + { + return _Not_fn>{std::forward<_Fn>(__fn), 0}; + } + + // Searchers +#define __cpp_lib_boyer_moore_searcher 201603 + + template> + class default_searcher + { + public: + default_searcher(_ForwardIterator1 __pat_first, + _ForwardIterator1 __pat_last, + _BinaryPredicate __pred = _BinaryPredicate()) + : _M_m(__pat_first, __pat_last, std::move(__pred)) + { } + + template + pair<_ForwardIterator2, _ForwardIterator2> + operator()(_ForwardIterator2 __first, _ForwardIterator2 __last) const + { + _ForwardIterator2 __first_ret = + std::search(__first, __last, std::get<0>(_M_m), std::get<1>(_M_m), + std::get<2>(_M_m)); + auto __ret = std::make_pair(__first_ret, __first_ret); + if (__ret.first != __last) + std::advance(__ret.second, std::distance(std::get<0>(_M_m), + std::get<1>(_M_m))); + return __ret; + } + + private: + tuple<_ForwardIterator1, _ForwardIterator1, _BinaryPredicate> _M_m; + }; + + template + struct __boyer_moore_map_base + { + template + __boyer_moore_map_base(_RAIter __pat, size_t __patlen, + _Hash&& __hf, _Pred&& __pred) + : _M_bad_char{ __patlen, std::move(__hf), std::move(__pred) } + { + if (__patlen > 0) + for (__diff_type __i = 0; __i < __patlen - 1; ++__i) + _M_bad_char[__pat[__i]] = __patlen - 1 - __i; + } + + using __diff_type = _Tp; + + __diff_type + _M_lookup(_Key __key, __diff_type __not_found) const + { + auto __iter = _M_bad_char.find(__key); + if (__iter == _M_bad_char.end()) + return __not_found; + return __iter->second; + } + + _Pred + _M_pred() const { return _M_bad_char.key_eq(); } + + _GLIBCXX_STD_C::unordered_map<_Key, _Tp, _Hash, _Pred> _M_bad_char; + }; + + template + struct __boyer_moore_array_base + { + template + __boyer_moore_array_base(_RAIter __pat, size_t __patlen, + _Unused&&, _Pred&& __pred) + : _M_bad_char{ _GLIBCXX_STD_C::array<_Tp, _Len>{}, std::move(__pred) } + { + std::get<0>(_M_bad_char).fill(__patlen); + if (__patlen > 0) + for (__diff_type __i = 0; __i < __patlen - 1; ++__i) + { + auto __ch = __pat[__i]; + using _UCh = make_unsigned_t; + auto __uch = static_cast<_UCh>(__ch); + std::get<0>(_M_bad_char)[__uch] = __patlen - 1 - __i; + } + } + + using __diff_type = _Tp; + + template + __diff_type + _M_lookup(_Key __key, __diff_type __not_found) const + { + auto __ukey = static_cast>(__key); + if (__ukey >= _Len) + return __not_found; + return std::get<0>(_M_bad_char)[__ukey]; + } + + const _Pred& + _M_pred() const { return std::get<1>(_M_bad_char); } + + tuple<_GLIBCXX_STD_C::array<_Tp, _Len>, _Pred> _M_bad_char; + }; + + template + struct __is_std_equal_to : false_type { }; + + template<> + struct __is_std_equal_to> : true_type { }; + + // Use __boyer_moore_array_base when pattern consists of narrow characters + // and uses std::equal_to as the predicate. + template::value_type, + typename _Diff = typename iterator_traits<_RAIter>::difference_type> + using __boyer_moore_base_t + = conditional_t::value + && __is_std_equal_to<_Pred>::value, + __boyer_moore_array_base<_Diff, 256, _Pred>, + __boyer_moore_map_base<_Val, _Diff, _Hash, _Pred>>; + + template::value_type>, + typename _BinaryPredicate = equal_to<>> + class boyer_moore_searcher + : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate> + { + using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>; + using typename _Base::__diff_type; + + public: + boyer_moore_searcher(_RAIter __pat_first, _RAIter __pat_last, + _Hash __hf = _Hash(), + _BinaryPredicate __pred = _BinaryPredicate()); + + template + pair<_RandomAccessIterator2, _RandomAccessIterator2> + operator()(_RandomAccessIterator2 __first, + _RandomAccessIterator2 __last) const; + + private: + bool + _M_is_prefix(_RAIter __word, __diff_type __len, + __diff_type __pos) + { + const auto& __pred = this->_M_pred(); + __diff_type __suffixlen = __len - __pos; + for (__diff_type __i = 0; __i < __suffixlen; ++__i) + if (!__pred(__word[__i], __word[__pos + __i])) + return false; + return true; + } + + __diff_type + _M_suffix_length(_RAIter __word, __diff_type __len, + __diff_type __pos) + { + const auto& __pred = this->_M_pred(); + __diff_type __i = 0; + while (__pred(__word[__pos - __i], __word[__len - 1 - __i]) + && __i < __pos) + { + ++__i; + } + return __i; + } + + template + __diff_type + _M_bad_char_shift(_Tp __c) const + { return this->_M_lookup(__c, _M_pat_end - _M_pat); } + + _RAIter _M_pat; + _RAIter _M_pat_end; + _GLIBCXX_STD_C::vector<__diff_type> _M_good_suffix; + }; + + template::value_type>, + typename _BinaryPredicate = equal_to<>> + class boyer_moore_horspool_searcher + : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate> + { + using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>; + using typename _Base::__diff_type; + + public: + boyer_moore_horspool_searcher(_RAIter __pat, + _RAIter __pat_end, + _Hash __hf = _Hash(), + _BinaryPredicate __pred + = _BinaryPredicate()) + : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)), + _M_pat(__pat), _M_pat_end(__pat_end) + { } + + template + pair<_RandomAccessIterator2, _RandomAccessIterator2> + operator()(_RandomAccessIterator2 __first, + _RandomAccessIterator2 __last) const + { + const auto& __pred = this->_M_pred(); + auto __patlen = _M_pat_end - _M_pat; + if (__patlen == 0) + return std::make_pair(__first, __first); + auto __len = __last - __first; + while (__len >= __patlen) + { + for (auto __scan = __patlen - 1; + __pred(__first[__scan], _M_pat[__scan]); --__scan) + if (__scan == 0) + return std::make_pair(__first, __first + __patlen); + auto __shift = _M_bad_char_shift(__first[__patlen - 1]); + __len -= __shift; + __first += __shift; + } + return std::make_pair(__last, __last); + } + + private: + template + __diff_type + _M_bad_char_shift(_Tp __c) const + { return this->_M_lookup(__c, _M_pat_end - _M_pat); } + + _RAIter _M_pat; + _RAIter _M_pat_end; + }; + + template + boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>:: + boyer_moore_searcher(_RAIter __pat, _RAIter __pat_end, + _Hash __hf, _BinaryPredicate __pred) + : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)), + _M_pat(__pat), _M_pat_end(__pat_end), _M_good_suffix(__pat_end - __pat) + { + auto __patlen = __pat_end - __pat; + if (__patlen == 0) + return; + __diff_type __last_prefix = __patlen - 1; + for (__diff_type __p = __patlen - 1; __p >= 0; --__p) + { + if (_M_is_prefix(__pat, __patlen, __p + 1)) + __last_prefix = __p + 1; + _M_good_suffix[__p] = __last_prefix + (__patlen - 1 - __p); + } + for (__diff_type __p = 0; __p < __patlen - 1; ++__p) + { + auto __slen = _M_suffix_length(__pat, __patlen, __p); + auto __pos = __patlen - 1 - __slen; + if (!__pred(__pat[__p - __slen], __pat[__pos])) + _M_good_suffix[__pos] = __patlen - 1 - __p + __slen; + } + } + + template + template + pair<_RandomAccessIterator2, _RandomAccessIterator2> + boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>:: + operator()(_RandomAccessIterator2 __first, + _RandomAccessIterator2 __last) const + { + auto __patlen = _M_pat_end - _M_pat; + if (__patlen == 0) + return std::make_pair(__first, __first); + const auto& __pred = this->_M_pred(); + __diff_type __i = __patlen - 1; + auto __stringlen = __last - __first; + while (__i < __stringlen) + { + __diff_type __j = __patlen - 1; + while (__j >= 0 && __pred(__first[__i], _M_pat[__j])) + { + --__i; + --__j; + } + if (__j < 0) + { + const auto __match = __first + __i + 1; + return std::make_pair(__match, __match + __patlen); + } + __i += std::max(_M_bad_char_shift(__first[__i]), + _M_good_suffix[__j]); + } + return std::make_pair(__last, __last); + } + +#endif // C++17 +#endif // C++14 + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // C++11 + +#endif // _GLIBCXX_FUNCTIONAL diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/future b/devkitARM/arm-none-eabi/include/c++/7.1.0/future similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/future rename to devkitARM/arm-none-eabi/include/c++/7.1.0/future index fc3f8162a..cb5356147 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/future +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/future @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -35,7 +35,6 @@ # include #else -#include #include #include #include @@ -43,8 +42,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -94,11 +95,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ class future_error : public logic_error { - error_code _M_code; - public: - explicit future_error(error_code __ec) - : logic_error("std::future_error: " + __ec.message()), _M_code(__ec) + explicit + future_error(future_errc __errc) + : future_error(std::make_error_code(__errc)) { } virtual ~future_error() noexcept; @@ -108,6 +108,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const error_code& code() const noexcept { return _M_code; } + + private: + explicit + future_error(error_code __ec) + : logic_error("std::future_error: " + __ec.message()), _M_code(__ec) + { } + + friend void __throw_future_error(int); + + error_code _M_code; }; // Forward declarations. @@ -168,16 +178,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION deferred }; + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2021. Further incorrect usages of result_of template - future::type> + using __async_result_of = typename result_of< + typename decay<_Fn>::type(typename decay<_Args>::type...)>::type; + + template + future<__async_result_of<_Fn, _Args...>> async(launch __policy, _Fn&& __fn, _Args&&... __args); template - future::type> + future<__async_result_of<_Fn, _Args...>> async(_Fn&& __fn, _Args&&... __args); -#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \ - && (ATOMIC_INT_LOCK_FREE > 1) +#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) /// Base class and enclosing scope. struct __future_base @@ -219,7 +234,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef _Res result_type; _Result() noexcept : _M_initialized() { } - + ~_Result() { if (_M_initialized) @@ -257,7 +272,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION explicit _Result_alloc(const _Alloc& __a) : _Result<_Res>(), _Alloc(__a) { } - + private: void _M_destroy() { @@ -419,8 +434,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { if (static_cast(__res)) { - error_code __ec(make_error_code(future_errc::broken_promise)); - __res->_M_error = make_exception_ptr(future_error(__ec)); + __res->_M_error = + make_exception_ptr(future_error(future_errc::broken_promise)); // This function is only called when the last asynchronous result // provider is abandoning this shared state, so noone can be // trying to make the shared state ready at the same time, and @@ -501,7 +516,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _Setter<_Res, _Arg&&> __setter(promise<_Res>* __prom, _Arg&& __arg) { - return _Setter<_Res, _Arg&&>{ __prom, &__arg }; + return _Setter<_Res, _Arg&&>{ __prom, std::__addressof(__arg) }; } template @@ -554,10 +569,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class _Async_state_commonV2; #endif - template + template()())> class _Deferred_state; - template + template()())> class _Async_state_impl; template @@ -727,7 +744,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class promise<_Res>; template friend class packaged_task; template - friend future::type> + friend future<__async_result_of<_Fn, _Args...>> async(launch, _Fn&&, _Args&&...); typedef __basic_future<_Res> _Base_type; @@ -760,7 +777,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return std::move(this->_M_get_result()._M_value()); } - shared_future<_Res> share(); + shared_future<_Res> share() noexcept; }; /// Partial specialization for future @@ -770,7 +787,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class promise<_Res&>; template friend class packaged_task; template - friend future::type> + friend future<__async_result_of<_Fn, _Args...>> async(launch, _Fn&&, _Args&&...); typedef __basic_future<_Res&> _Base_type; @@ -803,7 +820,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return this->_M_get_result()._M_get(); } - shared_future<_Res&> share(); + shared_future<_Res&> share() noexcept; }; /// Explicit specialization for future @@ -813,7 +830,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class promise; template friend class packaged_task; template - friend future::type> + friend future<__async_result_of<_Fn, _Args...>> async(launch, _Fn&&, _Args&&...); typedef __basic_future _Base_type; @@ -846,7 +863,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION this->_M_get_result(); } - shared_future share(); + shared_future share() noexcept; }; @@ -986,18 +1003,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_state(std::move(__uf._M_state)) { } + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2556. Wide contract for future::share() template inline shared_future<_Res> - future<_Res>::share() + future<_Res>::share() noexcept { return shared_future<_Res>(std::move(*this)); } template inline shared_future<_Res&> - future<_Res&>::share() + future<_Res&>::share() noexcept { return shared_future<_Res&>(std::move(*this)); } inline shared_future - future::share() + future::share() noexcept { return shared_future(std::move(*this)); } /// Primary template for promise @@ -1397,18 +1416,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION virtual void _M_run(_Args&&... __args) { - // bound arguments decay so wrap lvalue references - auto __boundfn = std::__bind_simple(std::ref(_M_impl._M_fn), - _S_maybe_wrap_ref(std::forward<_Args>(__args))...); + auto __boundfn = [&] () -> typename result_of<_Fn&(_Args&&...)>::type { + return std::__invoke(_M_impl._M_fn, std::forward<_Args>(__args)...); + }; this->_M_set_result(_S_task_setter(this->_M_result, __boundfn)); } virtual void _M_run_delayed(_Args&&... __args, weak_ptr<_State_base> __self) { - // bound arguments decay so wrap lvalue references - auto __boundfn = std::__bind_simple(std::ref(_M_impl._M_fn), - _S_maybe_wrap_ref(std::forward<_Args>(__args))...); + auto __boundfn = [&] () -> typename result_of<_Fn&(_Args&&...)>::type { + return std::__invoke(_M_impl._M_fn, std::forward<_Args>(__args)...); + }; this->_M_set_delayed_result(_S_task_setter(this->_M_result, __boundfn), std::move(__self)); } @@ -1416,17 +1435,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION virtual shared_ptr<_Task_state_base<_Res(_Args...)>> _M_reset(); - template - static reference_wrapper<_Tp> - _S_maybe_wrap_ref(_Tp& __t) - { return std::ref(__t); } - - template - static - typename enable_if::value, _Tp>::type&& - _S_maybe_wrap_ref(_Tp&& __t) - { return std::forward<_Tp>(__t); } - struct _Impl : _Alloc { template @@ -1489,9 +1497,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2097. packaged_task constructors should be constrained + // 2407. [this constructor should not be] explicit template::__type> - explicit packaged_task(allocator_arg_t, const _Alloc& __a, _Fn&& __fn) : _M_state(__create_task_state<_Res(_ArgTypes...)>( std::forward<_Fn>(__fn), __a)) @@ -1635,7 +1643,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // the shared state, whichever happens first. virtual void _M_complete_async() { _M_join(); } - void _M_join() { std::call_once(_M_once, &thread::join, ref(_M_thread)); } + void _M_join() { std::call_once(_M_once, &thread::join, &_M_thread); } thread _M_thread; once_flag _M_once; @@ -1699,36 +1707,49 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// async template - future::type> + future<__async_result_of<_Fn, _Args...>> async(launch __policy, _Fn&& __fn, _Args&&... __args) { - typedef typename result_of<_Fn(_Args...)>::type result_type; std::shared_ptr<__future_base::_State_base> __state; - if ((__policy & (launch::async|launch::deferred)) == launch::async) + if ((__policy & launch::async) == launch::async) { - __state = __future_base::_S_make_async_state(std::__bind_simple( - std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)); + __try + { + __state = __future_base::_S_make_async_state( + std::thread::__make_invoker(std::forward<_Fn>(__fn), + std::forward<_Args>(__args)...) + ); + } +#if __cpp_exceptions + catch(const system_error& __e) + { + if (__e.code() != errc::resource_unavailable_try_again + || (__policy & launch::deferred) != launch::deferred) + throw; + } +#endif } - else + if (!__state) { - __state = __future_base::_S_make_deferred_state(std::__bind_simple( - std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)); + __state = __future_base::_S_make_deferred_state( + std::thread::__make_invoker(std::forward<_Fn>(__fn), + std::forward<_Args>(__args)...)); } - return future(__state); + return future<__async_result_of<_Fn, _Args...>>(__state); } /// async, potential overload template - inline future::type> + inline future<__async_result_of<_Fn, _Args...>> async(_Fn&& __fn, _Args&&... __args) { - return async(launch::async|launch::deferred, std::forward<_Fn>(__fn), - std::forward<_Args>(__args)...); + return std::async(launch::async|launch::deferred, + std::forward<_Fn>(__fn), + std::forward<_Args>(__args)...); } #endif // _GLIBCXX_ASYNC_ABI_COMPAT #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 - // && ATOMIC_INT_LOCK_FREE // @} group futures _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/initializer_list b/devkitARM/arm-none-eabi/include/c++/7.1.0/initializer_list similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/initializer_list rename to devkitARM/arm-none-eabi/include/c++/7.1.0/initializer_list index e818151ea..6279e0de5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/initializer_list +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/initializer_list @@ -1,6 +1,6 @@ // std::initializer_list support -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of GCC. // diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/iomanip b/devkitARM/arm-none-eabi/include/c++/7.1.0/iomanip similarity index 89% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/iomanip rename to devkitARM/arm-none-eabi/include/c++/7.1.0/iomanip index 38f8c9d82..073fb9b3e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/iomanip +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/iomanip @@ -1,6 +1,6 @@ // Standard stream manipulators -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -62,24 +62,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Sent to a stream object, this manipulator resets the specified flags, * via @e stream.setf(0,__mask). */ - inline _Resetiosflags + inline _Resetiosflags resetiosflags(ios_base::fmtflags __mask) { return { __mask }; } template - inline basic_istream<_CharT, _Traits>& + inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) - { - __is.setf(ios_base::fmtflags(0), __f._M_mask); - return __is; + { + __is.setf(ios_base::fmtflags(0), __f._M_mask); + return __is; } template - inline basic_ostream<_CharT, _Traits>& + inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f) - { - __os.setf(ios_base::fmtflags(0), __f._M_mask); - return __os; + { + __os.setf(ios_base::fmtflags(0), __f._M_mask); + return __os; } @@ -92,24 +92,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Sent to a stream object, this manipulator sets the format flags * to @a __mask. */ - inline _Setiosflags + inline _Setiosflags setiosflags(ios_base::fmtflags __mask) { return { __mask }; } template - inline basic_istream<_CharT, _Traits>& + inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) - { - __is.setf(__f._M_mask); - return __is; + { + __is.setf(__f._M_mask); + return __is; } template - inline basic_ostream<_CharT, _Traits>& + inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f) - { - __os.setf(__f._M_mask); - return __os; + { + __os.setf(__f._M_mask); + return __os; } @@ -123,32 +123,32 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @c ios_base::basefield flags to @c oct, @c dec, or @c hex when @a base * is 8, 10, or 16, accordingly, and to 0 if @a __base is any other value. */ - inline _Setbase + inline _Setbase setbase(int __base) { return { __base }; } template - inline basic_istream<_CharT, _Traits>& + inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) { - __is.setf(__f._M_base == 8 ? ios_base::oct : - __f._M_base == 10 ? ios_base::dec : - __f._M_base == 16 ? ios_base::hex : + __is.setf(__f._M_base == 8 ? ios_base::oct : + __f._M_base == 10 ? ios_base::dec : + __f._M_base == 16 ? ios_base::hex : ios_base::fmtflags(0), ios_base::basefield); - return __is; + return __is; } - + template - inline basic_ostream<_CharT, _Traits>& + inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f) { - __os.setf(__f._M_base == 8 ? ios_base::oct : - __f._M_base == 10 ? ios_base::dec : - __f._M_base == 16 ? ios_base::hex : + __os.setf(__f._M_base == 8 ? ios_base::oct : + __f._M_base == 10 ? ios_base::dec : + __f._M_base == 16 ? ios_base::hex : ios_base::fmtflags(0), ios_base::basefield); - return __os; + return __os; } - + template struct _Setfill { _CharT _M_c; }; @@ -166,19 +166,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return { __c }; } template - inline basic_istream<_CharT, _Traits>& + inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) - { - __is.fill(__f._M_c); - return __is; + { + __is.fill(__f._M_c); + return __is; } template - inline basic_ostream<_CharT, _Traits>& + inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f) - { - __os.fill(__f._M_c); - return __os; + { + __os.fill(__f._M_c); + return __os; } @@ -191,24 +191,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Sent to a stream object, this manipulator calls @c precision(__n) for * that object. */ - inline _Setprecision + inline _Setprecision setprecision(int __n) { return { __n }; } template - inline basic_istream<_CharT, _Traits>& + inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) - { - __is.precision(__f._M_n); - return __is; + { + __is.precision(__f._M_n); + return __is; } template - inline basic_ostream<_CharT, _Traits>& + inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f) - { - __os.precision(__f._M_n); - return __os; + { + __os.precision(__f._M_n); + return __os; } @@ -221,35 +221,35 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Sent to a stream object, this manipulator calls @c width(__n) for * that object. */ - inline _Setw + inline _Setw setw(int __n) { return { __n }; } template - inline basic_istream<_CharT, _Traits>& + inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f) { __is.width(__f._M_n); - return __is; + return __is; } template - inline basic_ostream<_CharT, _Traits>& + inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f) { __os.width(__f._M_n); - return __os; + return __os; } #if __cplusplus >= 201103L - + template struct _Get_money { _MoneyT& _M_mon; bool _M_intl; }; /** * @brief Extended manipulator for extracting money. * @param __mon Either long double or a specialization of @c basic_string. - * @param __intl A bool indicating whether international format + * @param __intl A bool indicating whether international format * is to be used. * * Sent to a stream object, this manipulator extracts @a __mon. @@ -286,7 +286,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__err) __is.setstate(__err); } - return __is; + return __is; } @@ -296,7 +296,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Extended manipulator for inserting money. * @param __mon Either long double or a specialization of @c basic_string. - * @param __intl A bool indicating whether international format + * @param __intl A bool indicating whether international format * is to be used. * * Sent to a stream object, this manipulator inserts @a __mon. @@ -307,7 +307,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return { __mon, __intl }; } template - basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f) { typename basic_ostream<_CharT, _Traits>::sentry __cerb(__os); @@ -334,7 +334,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__err) __os.setstate(__err); } - return __os; + return __os; } template @@ -490,7 +490,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // __cplusplus >= 201103L // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. + // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE extern template ostream& operator<<(ostream&, _Setfill); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ios b/devkitARM/arm-none-eabi/include/c++/7.1.0/ios similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ios rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ios index 7fce3d245..cd0fbacce 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ios +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ios @@ -1,6 +1,6 @@ // Iostreams base classes -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/iosfwd b/devkitARM/arm-none-eabi/include/c++/7.1.0/iosfwd similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/iosfwd rename to devkitARM/arm-none-eabi/include/c++/7.1.0/iosfwd index f77a7a724..04b8b479b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/iosfwd +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/iosfwd @@ -1,6 +1,6 @@ // Forward declarations -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -129,7 +129,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 /// Base class for @c char streams. - typedef basic_ios ios; + typedef basic_ios ios; /// Base class for @c char buffers. typedef basic_streambuf streambuf; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/iostream b/devkitARM/arm-none-eabi/include/c++/7.1.0/iostream similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/iostream rename to devkitARM/arm-none-eabi/include/c++/7.1.0/iostream index dad75d01a..1d28a0088 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/iostream +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/iostream @@ -1,6 +1,6 @@ // Standard iostream objects -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/istream b/devkitARM/arm-none-eabi/include/c++/7.1.0/istream similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/istream rename to devkitARM/arm-none-eabi/include/c++/7.1.0/istream index 74c0d81e0..85c0a5a2f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/istream +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/istream @@ -1,6 +1,6 @@ // Input streams -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -908,7 +908,33 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ws(basic_istream<_CharT, _Traits>& __is); #if __cplusplus >= 201103L + + template + struct __is_convertible_to_basic_istream + { + template + static basic_istream<_Ch, _Up>& __check(basic_istream<_Ch, _Up>*); + + static void __check(...); + public: + using istream_type = + decltype(__check(declval::type*>())); + using type = __not_>; + constexpr static bool value = type::value; + }; + + template + struct __is_extractable : false_type {}; + + template + struct __is_extractable<_Istream, _Tp, + __void_t() + >> declval<_Tp>())>> + : true_type {}; + // [27.7.1.6] Rvalue stream extraction + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2328. Rvalue stream extraction should use perfect forwarding /** * @brief Generic extractor for rvalue stream * @param __is An input stream. @@ -919,11 +945,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * rvalue streams since they won't bind to the extractor functions * that take an lvalue reference. */ - template - inline basic_istream<_CharT, _Traits>& - operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) - { - __is >> __x; + template + inline + typename enable_if<__and_<__not_>, + __is_convertible_to_basic_istream<_Istream>, + __is_extractable<_Istream&, _Tp&&>>::value, + typename __is_convertible_to_basic_istream< + _Istream>::istream_type>::type + operator>>(_Istream&& __is, _Tp&& __x) + { + __is >> std::forward<_Tp>(__x); return __is; } #endif // C++11 diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/iterator b/devkitARM/arm-none-eabi/include/c++/7.1.0/iterator similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/iterator rename to devkitARM/arm-none-eabi/include/c++/7.1.0/iterator index fa8bf582c..06f1469b4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/iterator +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/iterator @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/limits b/devkitARM/arm-none-eabi/include/c++/7.1.0/limits similarity index 88% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/limits rename to devkitARM/arm-none-eabi/include/c++/7.1.0/limits index 793683f52..fb7d183ff 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/limits +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/limits @@ -1,6 +1,6 @@ // The template and inlines for the numeric_limits classes. -*- C++ -*- -// Copyright (C) 1999-2015 Free Software Foundation, Inc. +// Copyright (C) 1999-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -296,7 +296,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** See std::float_round_style for more information. This is only meaningful for floating types; integer types will all be round_toward_zero. */ - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -307,9 +307,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * representation of a fundamental type on a given platform. For * non-fundamental types, the functions will return 0 and the data * members will all be @c false. - * - * _GLIBCXX_RESOLVE_LIB_DEFECTS: DRs 201 and 184 (hi Gaby!) are - * noted, but not incorporated in this documented (yet). */ template struct numeric_limits : public __numeric_limits_base @@ -360,7 +357,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION denorm_min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } }; -#if __cplusplus >= 201103L + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 559. numeric_limits + template struct numeric_limits : public numeric_limits<_Tp> { }; @@ -372,10 +371,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct numeric_limits : public numeric_limits<_Tp> { }; -#endif // Now there follow 16 explicit specializations. Yes, 16. Make sure - // you get the count right. (18 in c++0x mode) + // you get the count right. (18 in C++11 mode, with char16_t and char32_t.) + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 184. numeric_limits wording problems /// numeric_limits specialization. template<> @@ -383,10 +384,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR bool + static _GLIBCXX_CONSTEXPR bool min() _GLIBCXX_USE_NOEXCEPT { return false; } - static _GLIBCXX_CONSTEXPR bool + static _GLIBCXX_CONSTEXPR bool max() _GLIBCXX_USE_NOEXCEPT { return true; } #if __cplusplus >= 201103L @@ -403,10 +404,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR bool + static _GLIBCXX_CONSTEXPR bool epsilon() _GLIBCXX_USE_NOEXCEPT { return false; } - static _GLIBCXX_CONSTEXPR bool + static _GLIBCXX_CONSTEXPR bool round_error() _GLIBCXX_USE_NOEXCEPT { return false; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -417,20 +418,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR bool + static _GLIBCXX_CONSTEXPR bool infinity() _GLIBCXX_USE_NOEXCEPT { return false; } - static _GLIBCXX_CONSTEXPR bool + static _GLIBCXX_CONSTEXPR bool quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return false; } - static _GLIBCXX_CONSTEXPR bool + static _GLIBCXX_CONSTEXPR bool signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return false; } - static _GLIBCXX_CONSTEXPR bool + static _GLIBCXX_CONSTEXPR bool denorm_min() _GLIBCXX_USE_NOEXCEPT { return false; } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; @@ -442,7 +443,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // promotion semantics. static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -452,14 +453,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR char + static _GLIBCXX_CONSTEXPR char min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); } - static _GLIBCXX_CONSTEXPR char + static _GLIBCXX_CONSTEXPR char max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); } #if __cplusplus >= 201103L - static constexpr char + static constexpr char lowest() noexcept { return min(); } #endif @@ -473,10 +474,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR char + static _GLIBCXX_CONSTEXPR char epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR char + static _GLIBCXX_CONSTEXPR char round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -487,20 +488,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR + static _GLIBCXX_CONSTEXPR char infinity() _GLIBCXX_USE_NOEXCEPT { return char(); } - static _GLIBCXX_CONSTEXPR char + static _GLIBCXX_CONSTEXPR char quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); } - static _GLIBCXX_CONSTEXPR char + static _GLIBCXX_CONSTEXPR char signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); } - static _GLIBCXX_CONSTEXPR char + static _GLIBCXX_CONSTEXPR char denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; @@ -509,7 +510,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -519,19 +520,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR signed char + static _GLIBCXX_CONSTEXPR signed char min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; } - static _GLIBCXX_CONSTEXPR signed char + static _GLIBCXX_CONSTEXPR signed char max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; } #if __cplusplus >= 201103L - static constexpr signed char + static constexpr signed char lowest() noexcept { return min(); } #endif static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (signed char); - static _GLIBCXX_USE_CONSTEXPR int digits10 + static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (signed char); #if __cplusplus >= 201103L static constexpr int max_digits10 = 0; @@ -541,10 +542,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR signed char + static _GLIBCXX_CONSTEXPR signed char epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR signed char + static _GLIBCXX_CONSTEXPR signed char round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -555,21 +556,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR signed char + static _GLIBCXX_CONSTEXPR signed char infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR signed char + static _GLIBCXX_CONSTEXPR signed char quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR signed char + static _GLIBCXX_CONSTEXPR signed char signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR signed char + static _GLIBCXX_CONSTEXPR signed char denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } @@ -579,7 +580,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -589,20 +590,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR unsigned char + static _GLIBCXX_CONSTEXPR unsigned char min() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR unsigned char + static _GLIBCXX_CONSTEXPR unsigned char max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; } #if __cplusplus >= 201103L - static constexpr unsigned char + static constexpr unsigned char lowest() noexcept { return min(); } #endif - static _GLIBCXX_USE_CONSTEXPR int digits + static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (unsigned char); - static _GLIBCXX_USE_CONSTEXPR int digits10 + static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (unsigned char); #if __cplusplus >= 201103L static constexpr int max_digits10 = 0; @@ -612,10 +613,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR unsigned char + static _GLIBCXX_CONSTEXPR unsigned char epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR unsigned char + static _GLIBCXX_CONSTEXPR unsigned char round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -626,23 +627,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR unsigned char + static _GLIBCXX_CONSTEXPR unsigned char infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned char + static _GLIBCXX_CONSTEXPR unsigned char quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned char + static _GLIBCXX_CONSTEXPR unsigned char signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned char + static _GLIBCXX_CONSTEXPR unsigned char denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } @@ -652,7 +653,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -662,10 +663,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR wchar_t + static _GLIBCXX_CONSTEXPR wchar_t min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); } - static _GLIBCXX_CONSTEXPR wchar_t + static _GLIBCXX_CONSTEXPR wchar_t max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); } #if __cplusplus >= 201103L @@ -674,7 +675,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (wchar_t); - static _GLIBCXX_USE_CONSTEXPR int digits10 + static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (wchar_t); #if __cplusplus >= 201103L static constexpr int max_digits10 = 0; @@ -684,10 +685,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR wchar_t + static _GLIBCXX_CONSTEXPR wchar_t epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR wchar_t + static _GLIBCXX_CONSTEXPR wchar_t round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -698,20 +699,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR wchar_t + static _GLIBCXX_CONSTEXPR wchar_t infinity() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } - static _GLIBCXX_CONSTEXPR wchar_t + static _GLIBCXX_CONSTEXPR wchar_t quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } - static _GLIBCXX_CONSTEXPR wchar_t + static _GLIBCXX_CONSTEXPR wchar_t signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } - static _GLIBCXX_CONSTEXPR wchar_t + static _GLIBCXX_CONSTEXPR wchar_t denorm_min() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; @@ -720,7 +721,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -731,13 +732,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static constexpr bool is_specialized = true; - static constexpr char16_t + static constexpr char16_t min() noexcept { return __glibcxx_min (char16_t); } - static constexpr char16_t + static constexpr char16_t max() noexcept { return __glibcxx_max (char16_t); } - static constexpr char16_t + static constexpr char16_t lowest() noexcept { return min(); } static constexpr int digits = __glibcxx_digits (char16_t); @@ -748,10 +749,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static constexpr bool is_exact = true; static constexpr int radix = 2; - static constexpr char16_t + static constexpr char16_t epsilon() noexcept { return 0; } - static constexpr char16_t + static constexpr char16_t round_error() noexcept { return 0; } static constexpr int min_exponent = 0; @@ -765,16 +766,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; - static constexpr char16_t + static constexpr char16_t infinity() noexcept { return char16_t(); } - static constexpr char16_t + static constexpr char16_t quiet_NaN() noexcept { return char16_t(); } - static constexpr char16_t + static constexpr char16_t signaling_NaN() noexcept { return char16_t(); } - static constexpr char16_t + static constexpr char16_t denorm_min() noexcept { return char16_t(); } static constexpr bool is_iec559 = false; @@ -792,13 +793,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static constexpr bool is_specialized = true; - static constexpr char32_t + static constexpr char32_t min() noexcept { return __glibcxx_min (char32_t); } - static constexpr char32_t + static constexpr char32_t max() noexcept { return __glibcxx_max (char32_t); } - static constexpr char32_t + static constexpr char32_t lowest() noexcept { return min(); } static constexpr int digits = __glibcxx_digits (char32_t); @@ -809,10 +810,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static constexpr bool is_exact = true; static constexpr int radix = 2; - static constexpr char32_t + static constexpr char32_t epsilon() noexcept { return 0; } - static constexpr char32_t + static constexpr char32_t round_error() noexcept { return 0; } static constexpr int min_exponent = 0; @@ -826,16 +827,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; - static constexpr char32_t + static constexpr char32_t infinity() noexcept { return char32_t(); } - static constexpr char32_t + static constexpr char32_t quiet_NaN() noexcept { return char32_t(); } - static constexpr char32_t + static constexpr char32_t signaling_NaN() noexcept { return char32_t(); } - static constexpr char32_t + static constexpr char32_t denorm_min() noexcept { return char32_t(); } static constexpr bool is_iec559 = false; @@ -854,14 +855,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR short + static _GLIBCXX_CONSTEXPR short min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; } - static _GLIBCXX_CONSTEXPR short + static _GLIBCXX_CONSTEXPR short max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; } #if __cplusplus >= 201103L - static constexpr short + static constexpr short lowest() noexcept { return min(); } #endif @@ -875,10 +876,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR short + static _GLIBCXX_CONSTEXPR short epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR short + static _GLIBCXX_CONSTEXPR short round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -889,20 +890,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR short + static _GLIBCXX_CONSTEXPR short infinity() _GLIBCXX_USE_NOEXCEPT { return short(); } - static _GLIBCXX_CONSTEXPR short + static _GLIBCXX_CONSTEXPR short quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); } - static _GLIBCXX_CONSTEXPR short + static _GLIBCXX_CONSTEXPR short signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); } - static _GLIBCXX_CONSTEXPR short + static _GLIBCXX_CONSTEXPR short denorm_min() _GLIBCXX_USE_NOEXCEPT { return short(); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; @@ -911,7 +912,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -921,20 +922,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR unsigned short + static _GLIBCXX_CONSTEXPR unsigned short min() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR unsigned short + static _GLIBCXX_CONSTEXPR unsigned short max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; } #if __cplusplus >= 201103L - static constexpr unsigned short + static constexpr unsigned short lowest() noexcept { return min(); } #endif - static _GLIBCXX_USE_CONSTEXPR int digits + static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (unsigned short); - static _GLIBCXX_USE_CONSTEXPR int digits10 + static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (unsigned short); #if __cplusplus >= 201103L static constexpr int max_digits10 = 0; @@ -944,10 +945,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR unsigned short + static _GLIBCXX_CONSTEXPR unsigned short epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR unsigned short + static _GLIBCXX_CONSTEXPR unsigned short round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -958,23 +959,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR unsigned short + static _GLIBCXX_CONSTEXPR unsigned short infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned short + static _GLIBCXX_CONSTEXPR unsigned short quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned short + static _GLIBCXX_CONSTEXPR unsigned short signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned short + static _GLIBCXX_CONSTEXPR unsigned short denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } @@ -984,7 +985,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -994,14 +995,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR int + static _GLIBCXX_CONSTEXPR int min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; } - static _GLIBCXX_CONSTEXPR int + static _GLIBCXX_CONSTEXPR int max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; } #if __cplusplus >= 201103L - static constexpr int + static constexpr int lowest() noexcept { return min(); } #endif @@ -1015,10 +1016,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR int + static _GLIBCXX_CONSTEXPR int epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR int + static _GLIBCXX_CONSTEXPR int round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -1029,20 +1030,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR int + static _GLIBCXX_CONSTEXPR int infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR int + static _GLIBCXX_CONSTEXPR int quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR int + static _GLIBCXX_CONSTEXPR int signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR int + static _GLIBCXX_CONSTEXPR int denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; @@ -1051,7 +1052,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -1061,20 +1062,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR unsigned int + static _GLIBCXX_CONSTEXPR unsigned int min() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR unsigned int + static _GLIBCXX_CONSTEXPR unsigned int max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; } #if __cplusplus >= 201103L - static constexpr unsigned int + static constexpr unsigned int lowest() noexcept { return min(); } #endif - static _GLIBCXX_USE_CONSTEXPR int digits + static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (unsigned int); - static _GLIBCXX_USE_CONSTEXPR int digits10 + static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (unsigned int); #if __cplusplus >= 201103L static constexpr int max_digits10 = 0; @@ -1084,10 +1085,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR unsigned int + static _GLIBCXX_CONSTEXPR unsigned int epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR unsigned int + static _GLIBCXX_CONSTEXPR unsigned int round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -1098,22 +1099,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR unsigned int + static _GLIBCXX_CONSTEXPR unsigned int infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned int + static _GLIBCXX_CONSTEXPR unsigned int quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned int + static _GLIBCXX_CONSTEXPR unsigned int signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned int + static _GLIBCXX_CONSTEXPR unsigned int denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } @@ -1123,7 +1124,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -1136,11 +1137,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_CONSTEXPR long min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; } - static _GLIBCXX_CONSTEXPR long + static _GLIBCXX_CONSTEXPR long max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; } #if __cplusplus >= 201103L - static constexpr long + static constexpr long lowest() noexcept { return min(); } #endif @@ -1154,10 +1155,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR long + static _GLIBCXX_CONSTEXPR long epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR long + static _GLIBCXX_CONSTEXPR long round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -1168,20 +1169,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR long + static _GLIBCXX_CONSTEXPR long infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR long + static _GLIBCXX_CONSTEXPR long quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR long + static _GLIBCXX_CONSTEXPR long signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR long + static _GLIBCXX_CONSTEXPR long denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; @@ -1190,7 +1191,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -1200,20 +1201,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR unsigned long + static _GLIBCXX_CONSTEXPR unsigned long min() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR unsigned long + static _GLIBCXX_CONSTEXPR unsigned long max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; } #if __cplusplus >= 201103L - static constexpr unsigned long + static constexpr unsigned long lowest() noexcept { return min(); } #endif - static _GLIBCXX_USE_CONSTEXPR int digits + static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (unsigned long); - static _GLIBCXX_USE_CONSTEXPR int digits10 + static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (unsigned long); #if __cplusplus >= 201103L static constexpr int max_digits10 = 0; @@ -1223,10 +1224,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR unsigned long + static _GLIBCXX_CONSTEXPR unsigned long epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR unsigned long + static _GLIBCXX_CONSTEXPR unsigned long round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -1237,23 +1238,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR unsigned long + static _GLIBCXX_CONSTEXPR unsigned long infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned long + static _GLIBCXX_CONSTEXPR unsigned long quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned long + static _GLIBCXX_CONSTEXPR unsigned long signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned long + static _GLIBCXX_CONSTEXPR unsigned long denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } @@ -1263,7 +1264,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -1273,20 +1274,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR long long + static _GLIBCXX_CONSTEXPR long long min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; } - static _GLIBCXX_CONSTEXPR long long + static _GLIBCXX_CONSTEXPR long long max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; } #if __cplusplus >= 201103L - static constexpr long long + static constexpr long long lowest() noexcept { return min(); } #endif - static _GLIBCXX_USE_CONSTEXPR int digits + static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long long); - static _GLIBCXX_USE_CONSTEXPR int digits10 + static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (long long); #if __cplusplus >= 201103L static constexpr int max_digits10 = 0; @@ -1296,10 +1297,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR long long + static _GLIBCXX_CONSTEXPR long long epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR long long + static _GLIBCXX_CONSTEXPR long long round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -1310,21 +1311,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR long long + static _GLIBCXX_CONSTEXPR long long infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR long long + static _GLIBCXX_CONSTEXPR long long quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR long long + static _GLIBCXX_CONSTEXPR long long signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR long long + static _GLIBCXX_CONSTEXPR long long denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; @@ -1333,7 +1334,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -1343,20 +1344,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR unsigned long long + static _GLIBCXX_CONSTEXPR unsigned long long min() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR unsigned long long + static _GLIBCXX_CONSTEXPR unsigned long long max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; } #if __cplusplus >= 201103L - static constexpr unsigned long long + static constexpr unsigned long long lowest() noexcept { return min(); } #endif - static _GLIBCXX_USE_CONSTEXPR int digits + static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (unsigned long long); - static _GLIBCXX_USE_CONSTEXPR int digits10 + static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (unsigned long long); #if __cplusplus >= 201103L static constexpr int max_digits10 = 0; @@ -1366,10 +1367,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; - static _GLIBCXX_CONSTEXPR unsigned long long + static _GLIBCXX_CONSTEXPR unsigned long long epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } - static _GLIBCXX_CONSTEXPR unsigned long long + static _GLIBCXX_CONSTEXPR unsigned long long round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; @@ -1380,23 +1381,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; - static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm + static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; - static _GLIBCXX_CONSTEXPR unsigned long long + static _GLIBCXX_CONSTEXPR unsigned long long infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned long long + static _GLIBCXX_CONSTEXPR unsigned long long quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned long long + static _GLIBCXX_CONSTEXPR unsigned long long signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } - static _GLIBCXX_CONSTEXPR unsigned long long + static _GLIBCXX_CONSTEXPR unsigned long long denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast(0); } @@ -1406,7 +1407,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; @@ -1594,14 +1595,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR float + static _GLIBCXX_CONSTEXPR float min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; } - static _GLIBCXX_CONSTEXPR float + static _GLIBCXX_CONSTEXPR float max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; } #if __cplusplus >= 201103L - static constexpr float + static constexpr float lowest() noexcept { return -__FLT_MAX__; } #endif @@ -1616,10 +1617,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__; - static _GLIBCXX_CONSTEXPR float + static _GLIBCXX_CONSTEXPR float epsilon() _GLIBCXX_USE_NOEXCEPT { return __FLT_EPSILON__; } - static _GLIBCXX_CONSTEXPR float + static _GLIBCXX_CONSTEXPR float round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5F; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = __FLT_MIN_EXP__; @@ -1632,19 +1633,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = bool(__FLT_HAS_DENORM__) ? denorm_present : denorm_absent; - static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss + static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = __glibcxx_float_has_denorm_loss; - static _GLIBCXX_CONSTEXPR float + static _GLIBCXX_CONSTEXPR float infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_valf(); } - static _GLIBCXX_CONSTEXPR float + static _GLIBCXX_CONSTEXPR float quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanf(""); } - static _GLIBCXX_CONSTEXPR float + static _GLIBCXX_CONSTEXPR float signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansf(""); } - static _GLIBCXX_CONSTEXPR float + static _GLIBCXX_CONSTEXPR float denorm_min() _GLIBCXX_USE_NOEXCEPT { return __FLT_DENORM_MIN__; } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 @@ -1653,9 +1654,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_float_traps; - static _GLIBCXX_USE_CONSTEXPR bool tinyness_before + static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = __glibcxx_float_tinyness_before; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_to_nearest; }; @@ -1669,14 +1670,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR double + static _GLIBCXX_CONSTEXPR double min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; } - static _GLIBCXX_CONSTEXPR double + static _GLIBCXX_CONSTEXPR double max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; } #if __cplusplus >= 201103L - static constexpr double + static constexpr double lowest() noexcept { return -__DBL_MAX__; } #endif @@ -1691,10 +1692,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__; - static _GLIBCXX_CONSTEXPR double + static _GLIBCXX_CONSTEXPR double epsilon() _GLIBCXX_USE_NOEXCEPT { return __DBL_EPSILON__; } - static _GLIBCXX_CONSTEXPR double + static _GLIBCXX_CONSTEXPR double round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = __DBL_MIN_EXP__; @@ -1707,19 +1708,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = bool(__DBL_HAS_DENORM__) ? denorm_present : denorm_absent; - static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss + static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = __glibcxx_double_has_denorm_loss; - static _GLIBCXX_CONSTEXPR double + static _GLIBCXX_CONSTEXPR double infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_val(); } - static _GLIBCXX_CONSTEXPR double + static _GLIBCXX_CONSTEXPR double quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nan(""); } - static _GLIBCXX_CONSTEXPR double + static _GLIBCXX_CONSTEXPR double signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nans(""); } - static _GLIBCXX_CONSTEXPR double + static _GLIBCXX_CONSTEXPR double denorm_min() _GLIBCXX_USE_NOEXCEPT { return __DBL_DENORM_MIN__; } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 @@ -1728,9 +1729,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_double_traps; - static _GLIBCXX_USE_CONSTEXPR bool tinyness_before + static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = __glibcxx_double_tinyness_before; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_to_nearest; }; @@ -1744,14 +1745,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; - static _GLIBCXX_CONSTEXPR long double + static _GLIBCXX_CONSTEXPR long double min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; } - static _GLIBCXX_CONSTEXPR long double + static _GLIBCXX_CONSTEXPR long double max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; } #if __cplusplus >= 201103L - static constexpr long double + static constexpr long double lowest() noexcept { return -__LDBL_MAX__; } #endif @@ -1766,10 +1767,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__; - static _GLIBCXX_CONSTEXPR long double + static _GLIBCXX_CONSTEXPR long double epsilon() _GLIBCXX_USE_NOEXCEPT { return __LDBL_EPSILON__; } - static _GLIBCXX_CONSTEXPR long double + static _GLIBCXX_CONSTEXPR long double round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5L; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = __LDBL_MIN_EXP__; @@ -1785,16 +1786,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = __glibcxx_long_double_has_denorm_loss; - static _GLIBCXX_CONSTEXPR long double + static _GLIBCXX_CONSTEXPR long double infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_vall(); } - static _GLIBCXX_CONSTEXPR long double + static _GLIBCXX_CONSTEXPR long double quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanl(""); } - static _GLIBCXX_CONSTEXPR long double + static _GLIBCXX_CONSTEXPR long double signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansl(""); } - static _GLIBCXX_CONSTEXPR long double + static _GLIBCXX_CONSTEXPR long double denorm_min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_DENORM_MIN__; } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 @@ -1803,9 +1804,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_long_double_traps; - static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = + static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = __glibcxx_long_double_tinyness_before; - static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = + static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_to_nearest; }; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/list b/devkitARM/arm-none-eabi/include/c++/7.1.0/list similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/list rename to devkitARM/arm-none-eabi/include/c++/7.1.0/list index feb21054a..54e3cf86f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/list +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/list @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/locale b/devkitARM/arm-none-eabi/include/c++/7.1.0/locale similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/locale rename to devkitARM/arm-none-eabi/include/c++/7.1.0/locale index 102004fc3..78e5673aa 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/locale +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/locale @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/map b/devkitARM/arm-none-eabi/include/c++/7.1.0/map similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/map rename to devkitARM/arm-none-eabi/include/c++/7.1.0/map index 3ce9c4ee8..e974135ae 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/map +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/map @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/math.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/math.h new file mode 100644 index 000000000..84755c8c3 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/math.h @@ -0,0 +1,181 @@ +// -*- C++ -*- compatibility header. + +// Copyright (C) 2002-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file math.h + * This is a Standard C++ Library header. + */ + +#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS +# include_next +#else + +#ifndef _GLIBCXX_MATH_H +#define _GLIBCXX_MATH_H 1 + +# include + +using std::abs; +using std::acos; +using std::asin; +using std::atan; +using std::atan2; +using std::cos; +using std::sin; +using std::tan; +using std::cosh; +using std::sinh; +using std::tanh; +using std::exp; +using std::frexp; +using std::ldexp; +using std::log; +using std::log10; +using std::modf; +using std::pow; +using std::sqrt; +using std::ceil; +using std::fabs; +using std::floor; +using std::fmod; + +#if _GLIBCXX_USE_C99_MATH +using std::fpclassify; +using std::isfinite; +using std::isinf; +using std::isnan; +using std::isnormal; +using std::signbit; +using std::isgreater; +using std::isgreaterequal; +using std::isless; +using std::islessequal; +using std::islessgreater; +using std::isunordered; +#endif + +#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_MATH_TR1) +using std::acosh; +using std::asinh; +using std::atanh; +using std::cbrt; +using std::copysign; +using std::erf; +using std::erfc; +using std::exp2; +using std::expm1; +using std::fdim; +using std::fma; +using std::fmax; +using std::fmin; +using std::hypot; +using std::ilogb; +using std::lgamma; +using std::llrint; +using std::llround; +using std::log1p; +using std::log2; +using std::logb; +using std::lrint; +using std::lround; +using std::nearbyint; +using std::nextafter; +using std::nexttoward; +using std::remainder; +using std::remquo; +using std::rint; +using std::round; +using std::scalbln; +using std::scalbn; +using std::tgamma; +using std::trunc; +#endif // C++11 && _GLIBCXX_USE_C99_MATH_TR1 + +#if __STDCPP_WANT_MATH_SPEC_FUNCS__ == 1 +using std::assoc_laguerref; +using std::assoc_laguerrel; +using std::assoc_laguerre; +using std::assoc_legendref; +using std::assoc_legendrel; +using std::assoc_legendre; +using std::betaf; +using std::betal; +using std::beta; +using std::comp_ellint_1f; +using std::comp_ellint_1l; +using std::comp_ellint_1; +using std::comp_ellint_2f; +using std::comp_ellint_2l; +using std::comp_ellint_2; +using std::comp_ellint_3f; +using std::comp_ellint_3l; +using std::comp_ellint_3; +using std::cyl_bessel_if; +using std::cyl_bessel_il; +using std::cyl_bessel_i; +using std::cyl_bessel_jf; +using std::cyl_bessel_jl; +using std::cyl_bessel_j; +using std::cyl_bessel_kf; +using std::cyl_bessel_kl; +using std::cyl_bessel_k; +using std::cyl_neumannf; +using std::cyl_neumannl; +using std::cyl_neumann; +using std::ellint_1f; +using std::ellint_1l; +using std::ellint_1; +using std::ellint_2f; +using std::ellint_2l; +using std::ellint_2; +using std::ellint_3f; +using std::ellint_3l; +using std::ellint_3; +using std::expintf; +using std::expintl; +using std::expint; +using std::hermitef; +using std::hermitel; +using std::hermite; +using std::laguerref; +using std::laguerrel; +using std::laguerre; +using std::legendref; +using std::legendrel; +using std::legendre; +using std::riemann_zetaf; +using std::riemann_zetal; +using std::riemann_zeta; +using std::sph_besself; +using std::sph_bessell; +using std::sph_bessel; +using std::sph_legendref; +using std::sph_legendrel; +using std::sph_legendre; +using std::sph_neumannf; +using std::sph_neumannl; +using std::sph_neumann; +#endif // __STDCPP_WANT_MATH_SPEC_FUNCS__ + +#endif // _GLIBCXX_MATH_H +#endif // __cplusplus diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/memory b/devkitARM/arm-none-eabi/include/c++/7.1.0/memory similarity index 89% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/memory rename to devkitARM/arm-none-eabi/include/c++/7.1.0/memory index 4257394a0..2d2d6fa90 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/memory +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/memory @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -76,7 +76,6 @@ # include // std::less # include # include -# include # include # include # include @@ -126,6 +125,26 @@ align(size_t __align, size_t __size, void*& __ptr, size_t& __space) noexcept } } +// 20.7.4 [util.dynamic.safety], pointer safety + +enum class pointer_safety { relaxed, preferred, strict }; + +inline void +declare_reachable(void*) { } + +template + inline _Tp* + undeclare_reachable(_Tp* __p) { return __p; } + +inline void +declare_no_pointers(char*, size_t) { } + +inline void +undeclare_no_pointers(char*, size_t) { } + +inline pointer_safety +get_pointer_safety() noexcept { return pointer_safety::relaxed; } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif // _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/mutex b/devkitARM/arm-none-eabi/include/c++/7.1.0/mutex similarity index 62% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/mutex rename to devkitARM/arm-none-eabi/include/c++/7.1.0/mutex index deb85dfef..6c3f92022 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/mutex +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/mutex @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2003-2015 Free Software Foundation, Inc. +// Copyright (C) 2003-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,12 +39,15 @@ #include #include #include -#include #include -#include -#include -#include // for std::swap -#include +#include +#if ! _GTHREAD_USE_MUTEX_TIMEDLOCK +# include +# include +#endif +#ifndef _GLIBCXX_HAVE_TLS +# include +#endif #ifdef _GLIBCXX_USE_C99_STDINT_TR1 @@ -52,32 +55,12 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION + /** + * @ingroup mutexes + * @{ + */ + #ifdef _GLIBCXX_HAS_GTHREADS - // Common base class for std::mutex and std::timed_mutex - class __mutex_base - { - protected: - typedef __gthread_mutex_t __native_type; - -#ifdef __GTHREAD_MUTEX_INIT - __native_type _M_mutex = __GTHREAD_MUTEX_INIT; - - constexpr __mutex_base() noexcept = default; -#else - __native_type _M_mutex; - - __mutex_base() noexcept - { - // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may) - __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex); - } - - ~__mutex_base() noexcept { __gthread_mutex_destroy(&_M_mutex); } -#endif - - __mutex_base(const __mutex_base&) = delete; - __mutex_base& operator=(const __mutex_base&) = delete; - }; // Common base class for std::recursive_mutex and std::recursive_timed_mutex class __recursive_mutex_base @@ -106,59 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif }; - /** - * @defgroup mutexes Mutexes - * @ingroup concurrency - * - * Classes for mutex support. - * @{ - */ - - /// mutex - class mutex : private __mutex_base - { - public: - typedef __native_type* native_handle_type; - -#ifdef __GTHREAD_MUTEX_INIT - constexpr -#endif - mutex() noexcept = default; - ~mutex() = default; - - mutex(const mutex&) = delete; - mutex& operator=(const mutex&) = delete; - - void - lock() - { - int __e = __gthread_mutex_lock(&_M_mutex); - - // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may) - if (__e) - __throw_system_error(__e); - } - - bool - try_lock() noexcept - { - // XXX EINVAL, EAGAIN, EBUSY - return !__gthread_mutex_trylock(&_M_mutex); - } - - void - unlock() - { - // XXX EINVAL, EAGAIN, EPERM - __gthread_mutex_unlock(&_M_mutex); - } - - native_handle_type - native_handle() - { return &_M_mutex; } - }; - - /// recursive_mutex + /// The standard recursive mutex type. class recursive_mutex : private __recursive_mutex_base { public: @@ -195,7 +126,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } native_handle_type - native_handle() + native_handle() noexcept { return &_M_mutex; } }; @@ -230,8 +161,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static_cast(__ns.count()) }; - auto __mutex = static_cast<_Derived*>(this)->native_handle(); - return !__gthread_mutex_timedlock(__mutex, &__ts); + return static_cast<_Derived*>(this)->_M_timedlock(__ts); } template @@ -243,7 +173,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } }; - /// timed_mutex + /// The standard timed mutex type. class timed_mutex : private __mutex_base, public __timed_mutex_impl { @@ -291,8 +221,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } native_handle_type - native_handle() + native_handle() noexcept { return &_M_mutex; } + + private: + friend class __timed_mutex_impl; + + bool + _M_timedlock(const __gthread_time_t& __ts) + { return !__gthread_mutex_timedlock(&_M_mutex, &__ts); } }; /// recursive_timed_mutex @@ -344,234 +281,189 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } native_handle_type - native_handle() + native_handle() noexcept { return &_M_mutex; } + + private: + friend class __timed_mutex_impl; + + bool + _M_timedlock(const __gthread_time_t& __ts) + { return !__gthread_recursive_mutex_timedlock(&_M_mutex, &__ts); } }; + +#else // !_GTHREAD_USE_MUTEX_TIMEDLOCK + + /// timed_mutex + class timed_mutex + { + mutex _M_mut; + condition_variable _M_cv; + bool _M_locked = false; + + public: + + timed_mutex() = default; + ~timed_mutex() { __glibcxx_assert( !_M_locked ); } + + timed_mutex(const timed_mutex&) = delete; + timed_mutex& operator=(const timed_mutex&) = delete; + + void + lock() + { + unique_lock __lk(_M_mut); + _M_cv.wait(__lk, [&]{ return !_M_locked; }); + _M_locked = true; + } + + bool + try_lock() + { + lock_guard __lk(_M_mut); + if (_M_locked) + return false; + _M_locked = true; + return true; + } + + template + bool + try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { + unique_lock __lk(_M_mut); + if (!_M_cv.wait_for(__lk, __rtime, [&]{ return !_M_locked; })) + return false; + _M_locked = true; + return true; + } + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { + unique_lock __lk(_M_mut); + if (!_M_cv.wait_until(__lk, __atime, [&]{ return !_M_locked; })) + return false; + _M_locked = true; + return true; + } + + void + unlock() + { + lock_guard __lk(_M_mut); + __glibcxx_assert( _M_locked ); + _M_locked = false; + _M_cv.notify_one(); + } + }; + + /// recursive_timed_mutex + class recursive_timed_mutex + { + mutex _M_mut; + condition_variable _M_cv; + thread::id _M_owner; + unsigned _M_count = 0; + + // Predicate type that tests whether the current thread can lock a mutex. + struct _Can_lock + { + // Returns true if the mutex is unlocked or is locked by _M_caller. + bool + operator()() const noexcept + { return _M_mx->_M_count == 0 || _M_mx->_M_owner == _M_caller; } + + const recursive_timed_mutex* _M_mx; + thread::id _M_caller; + }; + + public: + + recursive_timed_mutex() = default; + ~recursive_timed_mutex() { __glibcxx_assert( _M_count == 0 ); } + + recursive_timed_mutex(const recursive_timed_mutex&) = delete; + recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete; + + void + lock() + { + auto __id = this_thread::get_id(); + _Can_lock __can_lock{this, __id}; + unique_lock __lk(_M_mut); + _M_cv.wait(__lk, __can_lock); + if (_M_count == -1u) + __throw_system_error(EAGAIN); // [thread.timedmutex.recursive]/3 + _M_owner = __id; + ++_M_count; + } + + bool + try_lock() + { + auto __id = this_thread::get_id(); + _Can_lock __can_lock{this, __id}; + lock_guard __lk(_M_mut); + if (!__can_lock()) + return false; + if (_M_count == -1u) + return false; + _M_owner = __id; + ++_M_count; + return true; + } + + template + bool + try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { + auto __id = this_thread::get_id(); + _Can_lock __can_lock{this, __id}; + unique_lock __lk(_M_mut); + if (!_M_cv.wait_for(__lk, __rtime, __can_lock)) + return false; + if (_M_count == -1u) + return false; + _M_owner = __id; + ++_M_count; + return true; + } + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { + auto __id = this_thread::get_id(); + _Can_lock __can_lock{this, __id}; + unique_lock __lk(_M_mut); + if (!_M_cv.wait_until(__lk, __atime, __can_lock)) + return false; + if (_M_count == -1u) + return false; + _M_owner = __id; + ++_M_count; + return true; + } + + void + unlock() + { + lock_guard __lk(_M_mut); + __glibcxx_assert( _M_owner == this_thread::get_id() ); + __glibcxx_assert( _M_count > 0 ); + if (--_M_count == 0) + { + _M_owner = {}; + _M_cv.notify_one(); + } + } + }; + #endif #endif // _GLIBCXX_HAS_GTHREADS - /// Do not acquire ownership of the mutex. - struct defer_lock_t { }; - - /// Try to acquire ownership of the mutex without blocking. - struct try_to_lock_t { }; - - /// Assume the calling thread has already obtained mutex ownership - /// and manage it. - struct adopt_lock_t { }; - - constexpr defer_lock_t defer_lock { }; - constexpr try_to_lock_t try_to_lock { }; - constexpr adopt_lock_t adopt_lock { }; - - /// @brief Scoped lock idiom. - // Acquire the mutex here with a constructor call, then release with - // the destructor call in accordance with RAII style. - template - class lock_guard - { - public: - typedef _Mutex mutex_type; - - explicit lock_guard(mutex_type& __m) : _M_device(__m) - { _M_device.lock(); } - - lock_guard(mutex_type& __m, adopt_lock_t) : _M_device(__m) - { } // calling thread owns mutex - - ~lock_guard() - { _M_device.unlock(); } - - lock_guard(const lock_guard&) = delete; - lock_guard& operator=(const lock_guard&) = delete; - - private: - mutex_type& _M_device; - }; - - /// unique_lock - template - class unique_lock - { - public: - typedef _Mutex mutex_type; - - unique_lock() noexcept - : _M_device(0), _M_owns(false) - { } - - explicit unique_lock(mutex_type& __m) - : _M_device(std::__addressof(__m)), _M_owns(false) - { - lock(); - _M_owns = true; - } - - unique_lock(mutex_type& __m, defer_lock_t) noexcept - : _M_device(std::__addressof(__m)), _M_owns(false) - { } - - unique_lock(mutex_type& __m, try_to_lock_t) - : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock()) - { } - - unique_lock(mutex_type& __m, adopt_lock_t) - : _M_device(std::__addressof(__m)), _M_owns(true) - { - // XXX calling thread owns mutex - } - - template - unique_lock(mutex_type& __m, - const chrono::time_point<_Clock, _Duration>& __atime) - : _M_device(std::__addressof(__m)), - _M_owns(_M_device->try_lock_until(__atime)) - { } - - template - unique_lock(mutex_type& __m, - const chrono::duration<_Rep, _Period>& __rtime) - : _M_device(std::__addressof(__m)), - _M_owns(_M_device->try_lock_for(__rtime)) - { } - - ~unique_lock() - { - if (_M_owns) - unlock(); - } - - unique_lock(const unique_lock&) = delete; - unique_lock& operator=(const unique_lock&) = delete; - - unique_lock(unique_lock&& __u) noexcept - : _M_device(__u._M_device), _M_owns(__u._M_owns) - { - __u._M_device = 0; - __u._M_owns = false; - } - - unique_lock& operator=(unique_lock&& __u) noexcept - { - if(_M_owns) - unlock(); - - unique_lock(std::move(__u)).swap(*this); - - __u._M_device = 0; - __u._M_owns = false; - - return *this; - } - - void - lock() - { - if (!_M_device) - __throw_system_error(int(errc::operation_not_permitted)); - else if (_M_owns) - __throw_system_error(int(errc::resource_deadlock_would_occur)); - else - { - _M_device->lock(); - _M_owns = true; - } - } - - bool - try_lock() - { - if (!_M_device) - __throw_system_error(int(errc::operation_not_permitted)); - else if (_M_owns) - __throw_system_error(int(errc::resource_deadlock_would_occur)); - else - { - _M_owns = _M_device->try_lock(); - return _M_owns; - } - } - - template - bool - try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) - { - if (!_M_device) - __throw_system_error(int(errc::operation_not_permitted)); - else if (_M_owns) - __throw_system_error(int(errc::resource_deadlock_would_occur)); - else - { - _M_owns = _M_device->try_lock_until(__atime); - return _M_owns; - } - } - - template - bool - try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) - { - if (!_M_device) - __throw_system_error(int(errc::operation_not_permitted)); - else if (_M_owns) - __throw_system_error(int(errc::resource_deadlock_would_occur)); - else - { - _M_owns = _M_device->try_lock_for(__rtime); - return _M_owns; - } - } - - void - unlock() - { - if (!_M_owns) - __throw_system_error(int(errc::operation_not_permitted)); - else if (_M_device) - { - _M_device->unlock(); - _M_owns = false; - } - } - - void - swap(unique_lock& __u) noexcept - { - std::swap(_M_device, __u._M_device); - std::swap(_M_owns, __u._M_owns); - } - - mutex_type* - release() noexcept - { - mutex_type* __ret = _M_device; - _M_device = 0; - _M_owns = false; - return __ret; - } - - bool - owns_lock() const noexcept - { return _M_owns; } - - explicit operator bool() const noexcept - { return owns_lock(); } - - mutex_type* - mutex() const noexcept - { return _M_device; } - - private: - mutex_type* _M_device; - bool _M_owns; // XXX use atomic_bool - }; - - /// Swap overload for unique_lock objects. - template - inline void - swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept - { __x.swap(__y); } - template inline unique_lock<_Lock> __try_to_lock(_Lock& __l) @@ -664,6 +556,74 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } +#if __cplusplus > 201402L +#define __cpp_lib_scoped_lock 201703 + /** @brief A scoped lock type for multiple lockable objects. + * + * A scoped_lock controls mutex ownership within a scope, releasing + * ownership in the destructor. + */ + template + class scoped_lock + { + public: + explicit scoped_lock(_MutexTypes&... __m) : _M_devices(std::tie(__m...)) + { std::lock(__m...); } + + explicit scoped_lock(_MutexTypes&... __m, adopt_lock_t) noexcept + : _M_devices(std::tie(__m...)) + { } // calling thread owns mutex + + ~scoped_lock() + { + std::apply([](_MutexTypes&... __m) { + char __i[] __attribute__((__unused__)) = { (__m.unlock(), 0)... }; + }, _M_devices); + } + + scoped_lock(const scoped_lock&) = delete; + scoped_lock& operator=(const scoped_lock&) = delete; + + private: + tuple<_MutexTypes&...> _M_devices; + }; + + template<> + class scoped_lock<> + { + public: + explicit scoped_lock() = default; + explicit scoped_lock(adopt_lock_t) noexcept { } + ~scoped_lock() = default; + + scoped_lock(const scoped_lock&) = delete; + scoped_lock& operator=(const scoped_lock&) = delete; + }; + + template + class scoped_lock<_Mutex> + { + public: + using mutex_type = _Mutex; + + explicit scoped_lock(mutex_type& __m) : _M_device(__m) + { _M_device.lock(); } + + explicit scoped_lock(mutex_type& __m, adopt_lock_t) noexcept + : _M_device(__m) + { } // calling thread owns mutex + + ~scoped_lock() + { _M_device.unlock(); } + + scoped_lock(const scoped_lock&) = delete; + scoped_lock& operator=(const scoped_lock&) = delete; + + private: + mutex_type& _M_device; + }; +#endif // C++17 + #ifdef _GLIBCXX_HAS_GTHREADS /// once_flag struct once_flag @@ -689,13 +649,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef _GLIBCXX_HAVE_TLS extern __thread void* __once_callable; extern __thread void (*__once_call)(); - - template - inline void - __once_call_impl() - { - (*(_Callable*)__once_callable)(); - } #else extern function __once_functor; @@ -713,16 +666,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void call_once(once_flag& __once, _Callable&& __f, _Args&&... __args) { + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2442. call_once() shouldn't DECAY_COPY() + auto __callable = [&] { + std::__invoke(std::forward<_Callable>(__f), + std::forward<_Args>(__args)...); + }; #ifdef _GLIBCXX_HAVE_TLS - auto __bound_functor = std::__bind_simple(std::forward<_Callable>(__f), - std::forward<_Args>(__args)...); - __once_callable = std::__addressof(__bound_functor); - __once_call = &__once_call_impl; + __once_callable = std::__addressof(__callable); + __once_call = []{ (*(decltype(__callable)*)__once_callable)(); }; #else unique_lock __functor_lock(__get_once_mutex()); - auto __callable = std::__bind_simple(std::forward<_Callable>(__f), - std::forward<_Args>(__args)...); - __once_functor = [&]() { __callable(); }; + __once_functor = __callable; __set_once_functor_lock_ptr(&__functor_lock); #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/new b/devkitARM/arm-none-eabi/include/c++/7.1.0/new similarity index 61% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/new rename to devkitARM/arm-none-eabi/include/c++/7.1.0/new index bd50b6c84..04f172ceb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/new +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/new @@ -1,6 +1,6 @@ // The -*- C++ -*- dynamic memory management header. -// Copyright (C) 1994-2015 Free Software Foundation, Inc. +// Copyright (C) 1994-2017 Free Software Foundation, Inc. // This file is part of GCC. // @@ -79,7 +79,16 @@ namespace std }; #endif - struct nothrow_t { }; +#if __cpp_aligned_new + enum class align_val_t: size_t {}; +#endif + + struct nothrow_t + { +#if __cplusplus >= 201103L + explicit nothrow_t() = default; +#endif + }; extern const nothrow_t nothrow; @@ -116,6 +125,12 @@ void operator delete(void*) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); +#if __cpp_sized_deallocation +void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT + __attribute__((__externally_visible__)); +void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT + __attribute__((__externally_visible__)); +#endif void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT @@ -124,6 +139,30 @@ void operator delete(void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); +#if __cpp_aligned_new +void* operator new(std::size_t, std::align_val_t) + __attribute__((__externally_visible__)); +void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) + _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); +void operator delete(void*, std::align_val_t) + _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); +void operator delete(void*, std::align_val_t, const std::nothrow_t&) + _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); +void* operator new[](std::size_t, std::align_val_t) + __attribute__((__externally_visible__)); +void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) + _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); +void operator delete[](void*, std::align_val_t) + _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); +void operator delete[](void*, std::align_val_t, const std::nothrow_t&) + _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); +#if __cpp_sized_deallocation +void operator delete(void*, std::size_t, std::align_val_t) + _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); +void operator delete[](void*, std::size_t, std::align_val_t) + _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); +#endif // __cpp_sized_deallocation +#endif // __cpp_aligned_new // Default placement versions of operator new. inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT @@ -137,6 +176,43 @@ inline void operator delete[](void*, void*) _GLIBCXX_USE_NOEXCEPT { } //@} } // extern "C++" +#if __cplusplus > 201402L +#if __GNUC__ >= 7 +# define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1 +#elif defined __has_builtin +// For non-GNU compilers: +# if __has_builtin(__builtin_launder) +# define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1 +# endif +#endif + +#ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER +namespace std +{ +#define __cpp_lib_launder 201606 + /// Pointer optimization barrier [ptr.launder] + template + constexpr _Tp* + launder(_Tp* __p) noexcept + { return __builtin_launder(__p); } + + // The program is ill-formed if T is a function type or + // (possibly cv-qualified) void. + + template + void launder(_Ret (*)(_Args...) _GLIBCXX_NOEXCEPT_QUAL) = delete; + template + void launder(_Ret (*)(_Args......) _GLIBCXX_NOEXCEPT_QUAL) = delete; + + void launder(void*) = delete; + void launder(const void*) = delete; + void launder(volatile void*) = delete; + void launder(const volatile void*) = delete; +} +#endif // _GLIBCXX_HAVE_BUILTIN_LAUNDER +#undef _GLIBCXX_HAVE_BUILTIN_LAUNDER +#endif // C++17 + #pragma GCC visibility pop #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/numeric b/devkitARM/arm-none-eabi/include/c++/7.1.0/numeric similarity index 52% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/numeric rename to devkitARM/arm-none-eabi/include/c++/7.1.0/numeric index 0daab74f6..c7abbc1b6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/numeric +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/numeric @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -74,4 +74,89 @@ * math functions. */ +#if __cplusplus >= 201402L +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace __detail +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // std::abs is not constexpr and doesn't support unsigned integers. + template + constexpr + enable_if_t<__and_, is_signed<_Tp>>::value, _Tp> + __abs_integral(_Tp __val) + { return __val < 0 ? -__val : __val; } + + template + constexpr + enable_if_t<__and_, is_unsigned<_Tp>>::value, _Tp> + __abs_integral(_Tp __val) + { return __val; } + + void __abs_integral(bool) = delete; + + template + constexpr common_type_t<_Mn, _Nn> + __gcd(_Mn __m, _Nn __n) + { + return __m == 0 ? __detail::__abs_integral(__n) + : __n == 0 ? __detail::__abs_integral(__m) + : __detail::__gcd(__n, __m % __n); + } + + /// Least common multiple + template + constexpr common_type_t<_Mn, _Nn> + __lcm(_Mn __m, _Nn __n) + { + return (__m != 0 && __n != 0) + ? (__detail::__abs_integral(__m) / __detail::__gcd(__m, __n)) + * __detail::__abs_integral(__n) + : 0; + } + +_GLIBCXX_END_NAMESPACE_VERSION +} + +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#if __cplusplus > 201402L + +#define __cpp_lib_gcd 201606 + /// Greatest common divisor + template + constexpr common_type_t<_Mn, _Nn> + gcd(_Mn __m, _Nn __n) + { + static_assert(is_integral<_Mn>::value, "gcd arguments are integers"); + static_assert(is_integral<_Nn>::value, "gcd arguments are integers"); + static_assert(!is_same<_Mn, bool>::value, "gcd arguments are not bools"); + static_assert(!is_same<_Nn, bool>::value, "gcd arguments are not bools"); + return __detail::__gcd(__m, __n); + } + +#define __cpp_lib_lcm 201606 + /// Least common multiple + template + constexpr common_type_t<_Mn, _Nn> + lcm(_Mn __m, _Nn __n) + { + static_assert(is_integral<_Mn>::value, "lcm arguments are integers"); + static_assert(is_integral<_Nn>::value, "lcm arguments are integers"); + static_assert(!is_same<_Mn, bool>::value, "lcm arguments are not bools"); + static_assert(!is_same<_Nn, bool>::value, "lcm arguments are not bools"); + return __detail::__lcm(__m, __n); + } + +#endif // C++17 + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // C++14 + + #endif /* _GLIBCXX_NUMERIC */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/optional b/devkitARM/arm-none-eabi/include/c++/7.1.0/optional new file mode 100644 index 000000000..17241204a --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/optional @@ -0,0 +1,1039 @@ +// -*- C++ -*- + +// Copyright (C) 2013-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file include/optional + * This is a Standard C++ Library header. + */ + +#ifndef _GLIBCXX_OPTIONAL +#define _GLIBCXX_OPTIONAL 1 + +#if __cplusplus <= 201402L +# include +#else + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @addtogroup utilities + * @{ + */ + + template + class optional; + + /// Tag type to disengage optional objects. + struct nullopt_t + { + // Do not user-declare default constructor at all for + // optional_value = {} syntax to work. + // nullopt_t() = delete; + + // Used for constructing nullopt. + enum class _Construct { _Token }; + + // Must be constexpr for nullopt_t to be literal. + explicit constexpr nullopt_t(_Construct) { } + }; + + /// Tag to disengage optional objects. + inline constexpr nullopt_t nullopt { nullopt_t::_Construct::_Token }; + + /** + * @brief Exception class thrown when a disengaged optional object is + * dereferenced. + * @ingroup exceptions + */ + class bad_optional_access : public exception + { + public: + bad_optional_access() { } + virtual const char* what() const noexcept override + {return "bad optional access";} + + virtual ~bad_optional_access() noexcept = default; + }; + + void + __throw_bad_optional_access() + __attribute__((__noreturn__)); + + // XXX Does not belong here. + inline void + __throw_bad_optional_access() + { _GLIBCXX_THROW_OR_ABORT(bad_optional_access()); } + + + // Payload for constexpr optionals. + template ::value + && is_trivially_move_constructible<_Tp>::value, + bool /*_ShouldProvideDestructor*/ = + is_trivially_destructible<_Tp>::value> + struct _Optional_payload + { + constexpr _Optional_payload() + : _M_empty() {} + + template + constexpr _Optional_payload(in_place_t, _Args&&... __args) + : _M_payload(std::forward<_Args>(__args)...), + _M_engaged(true) + {} + + template + constexpr _Optional_payload(std::initializer_list<_Up> __il, + _Args&&... __args) + : _M_payload(__il, std::forward<_Args>(__args)...), + _M_engaged(true) {} + + template struct __ctor_tag {}; + + constexpr _Optional_payload(__ctor_tag, + const _Tp& __other) + : _M_payload(__other), + _M_engaged(true) + {} + + constexpr _Optional_payload(__ctor_tag) + : _M_empty() + {} + + constexpr _Optional_payload(__ctor_tag, _Tp&& __other) + : _M_payload(std::move(__other)), + _M_engaged(true) + {} + + constexpr _Optional_payload(bool __engaged, + const _Optional_payload& __other) + : _Optional_payload(__engaged ? + _Optional_payload(__ctor_tag{}, + __other._M_payload) : + _Optional_payload(__ctor_tag{})) + {} + + constexpr _Optional_payload(bool __engaged, + _Optional_payload&& __other) + : _Optional_payload(__engaged + ? _Optional_payload(__ctor_tag{}, + std::move(__other._M_payload)) + : _Optional_payload(__ctor_tag{})) + {} + + using _Stored_type = remove_const_t<_Tp>; + struct _Empty_byte { }; + union { + _Empty_byte _M_empty; + _Stored_type _M_payload; + }; + bool _M_engaged = false; + }; + + // Payload for non-constexpr optionals with non-trivial destructor. + template + struct _Optional_payload<_Tp, false, false> + { + constexpr _Optional_payload() + : _M_empty() {} + + template + constexpr _Optional_payload(in_place_t, _Args&&... __args) + : _M_payload(std::forward<_Args>(__args)...), + _M_engaged(true) {} + + template + constexpr _Optional_payload(std::initializer_list<_Up> __il, + _Args&&... __args) + : _M_payload(__il, std::forward<_Args>(__args)...), + _M_engaged(true) {} + constexpr + _Optional_payload(bool __engaged, const _Optional_payload& __other) + : _Optional_payload(__other) + {} + + constexpr + _Optional_payload(bool __engaged, _Optional_payload&& __other) + : _Optional_payload(std::move(__other)) + {} + + constexpr _Optional_payload(const _Optional_payload& __other) + { + if (__other._M_engaged) + this->_M_construct(__other._M_payload); + } + + constexpr _Optional_payload(_Optional_payload&& __other) + { + if (__other._M_engaged) + this->_M_construct(std::move(__other._M_payload)); + } + + using _Stored_type = remove_const_t<_Tp>; + struct _Empty_byte { }; + union { + _Empty_byte _M_empty; + _Stored_type _M_payload; + }; + bool _M_engaged = false; + + ~_Optional_payload() + { + if (_M_engaged) + _M_payload.~_Stored_type(); + } + + template + void + _M_construct(_Args&&... __args) + noexcept(is_nothrow_constructible<_Stored_type, _Args...>()) + { + ::new ((void *) std::__addressof(this->_M_payload)) + _Stored_type(std::forward<_Args>(__args)...); + this->_M_engaged = true; + } + }; + + // Payload for non-constexpr optionals with trivial destructor. + template + struct _Optional_payload<_Tp, false, true> + { + constexpr _Optional_payload() + : _M_empty() {} + + template + constexpr _Optional_payload(in_place_t, _Args&&... __args) + : _M_payload(std::forward<_Args>(__args)...), + _M_engaged(true) {} + + template + constexpr _Optional_payload(std::initializer_list<_Up> __il, + _Args&&... __args) + : _M_payload(__il, std::forward<_Args>(__args)...), + _M_engaged(true) {} + constexpr + _Optional_payload(bool __engaged, const _Optional_payload& __other) + : _Optional_payload(__other) + {} + + constexpr + _Optional_payload(bool __engaged, _Optional_payload&& __other) + : _Optional_payload(std::move(__other)) + {} + + constexpr _Optional_payload(const _Optional_payload& __other) + { + if (__other._M_engaged) + this->_M_construct(__other._M_payload); + } + + constexpr _Optional_payload(_Optional_payload&& __other) + { + if (__other._M_engaged) + this->_M_construct(std::move(__other._M_payload)); + } + + using _Stored_type = remove_const_t<_Tp>; + struct _Empty_byte { }; + union { + _Empty_byte _M_empty; + _Stored_type _M_payload; + }; + bool _M_engaged = false; + + template + void + _M_construct(_Args&&... __args) + noexcept(is_nothrow_constructible<_Stored_type, _Args...>()) + { + ::new ((void *) std::__addressof(this->_M_payload)) + _Stored_type(std::forward<_Args>(__args)...); + this->_M_engaged = true; + } + }; + + /** + * @brief Class template that holds the necessary state for @ref optional + * and that has the responsibility for construction and the special members. + * + * Such a separate base class template is necessary in order to + * conditionally enable the special members (e.g. copy/move constructors). + * Note that this means that @ref _Optional_base implements the + * functionality for copy and move assignment, but not for converting + * assignment. + * + * @see optional, _Enable_special_members + */ + template + class _Optional_base + { + private: + // Remove const to avoid prohibition of reusing object storage for + // const-qualified types in [3.8/9]. This is strictly internal + // and even optional itself is oblivious to it. + using _Stored_type = remove_const_t<_Tp>; + + public: + + // Constructors for disengaged optionals. + constexpr _Optional_base() noexcept + { } + + constexpr _Optional_base(nullopt_t) noexcept + { } + + // Constructors for engaged optionals. + template, bool> = false> + constexpr explicit _Optional_base(in_place_t, _Args&&... __args) + : _M_payload(in_place, + std::forward<_Args>(__args)...) { } + + template&, + _Args&&...>, bool> = false> + constexpr explicit _Optional_base(in_place_t, + initializer_list<_Up> __il, + _Args&&... __args) + : _M_payload(in_place, + __il, std::forward<_Args>(__args)...) + { } + + // Copy and move constructors. + constexpr _Optional_base(const _Optional_base& __other) + : _M_payload(__other._M_payload._M_engaged, + __other._M_payload) + { } + + constexpr _Optional_base(_Optional_base&& __other) + noexcept(is_nothrow_move_constructible<_Tp>()) + : _M_payload(__other._M_payload._M_engaged, + std::move(__other._M_payload)) + { } + + // Assignment operators. + _Optional_base& + operator=(const _Optional_base& __other) + { + if (this->_M_payload._M_engaged && __other._M_payload._M_engaged) + this->_M_get() = __other._M_get(); + else + { + if (__other._M_payload._M_engaged) + this->_M_construct(__other._M_get()); + else + this->_M_reset(); + } + + return *this; + } + + _Optional_base& + operator=(_Optional_base&& __other) + noexcept(__and_, + is_nothrow_move_assignable<_Tp>>()) + { + if (this->_M_payload._M_engaged && __other._M_payload._M_engaged) + this->_M_get() = std::move(__other._M_get()); + else + { + if (__other._M_payload._M_engaged) + this->_M_construct(std::move(__other._M_get())); + else + this->_M_reset(); + } + return *this; + } + // The following functionality is also needed by optional, hence the + // protected accessibility. + protected: + constexpr bool _M_is_engaged() const noexcept + { return this->_M_payload._M_engaged; } + + // The _M_get operations have _M_engaged as a precondition. + constexpr _Tp& + _M_get() noexcept + { return this->_M_payload._M_payload; } + + constexpr const _Tp& + _M_get() const noexcept + { return this->_M_payload._M_payload; } + + // The _M_construct operation has !_M_engaged as a precondition + // while _M_destruct has _M_engaged as a precondition. + template + void + _M_construct(_Args&&... __args) + noexcept(is_nothrow_constructible<_Stored_type, _Args...>()) + { + ::new (std::__addressof(this->_M_payload._M_payload)) + _Stored_type(std::forward<_Args>(__args)...); + this->_M_payload._M_engaged = true; + } + + void + _M_destruct() + { + this->_M_payload._M_engaged = false; + this->_M_payload._M_payload.~_Stored_type(); + } + + // _M_reset is a 'safe' operation with no precondition. + void + _M_reset() + { + if (this->_M_payload._M_engaged) + this->_M_destruct(); + } + + private: + _Optional_payload<_Tp> _M_payload; + }; + + template + class optional; + + template + using __converts_from_optional = + __or_&>, + is_constructible<_Tp, optional<_Up>&>, + is_constructible<_Tp, const optional<_Up>&&>, + is_constructible<_Tp, optional<_Up>&&>, + is_convertible&, _Tp>, + is_convertible&, _Tp>, + is_convertible&&, _Tp>, + is_convertible&&, _Tp>>; + + template + using __assigns_from_optional = + __or_&>, + is_assignable<_Tp&, optional<_Up>&>, + is_assignable<_Tp&, const optional<_Up>&&>, + is_assignable<_Tp&, optional<_Up>&&>>; + + /** + * @brief Class template for optional values. + */ + template + class optional + : private _Optional_base<_Tp>, + private _Enable_copy_move< + // Copy constructor. + is_copy_constructible<_Tp>::value, + // Copy assignment. + __and_, is_copy_assignable<_Tp>>::value, + // Move constructor. + is_move_constructible<_Tp>::value, + // Move assignment. + __and_, is_move_assignable<_Tp>>::value, + // Unique tag type. + optional<_Tp>> + { + static_assert(__and_<__not_, nullopt_t>>, + __not_, in_place_t>>, + __not_>>(), + "Invalid instantiation of optional"); + + private: + using _Base = _Optional_base<_Tp>; + + public: + using value_type = _Tp; + + constexpr optional() = default; + + constexpr optional(nullopt_t) noexcept + : _Base(nullopt) { } + + // Converting constructors for engaged optionals. + template , decay_t<_Up>>>, + __not_>>, + is_constructible<_Tp, _Up&&>, + is_convertible<_Up&&, _Tp> + >::value, bool> = true> + constexpr optional(_Up&& __t) + : _Base(std::in_place, std::forward<_Up>(__t)) { } + + template , decay_t<_Up>>>, + __not_>>, + is_constructible<_Tp, _Up&&>, + __not_> + >::value, bool> = false> + explicit constexpr optional(_Up&& __t) + : _Base(std::in_place, std::forward<_Up>(__t)) { } + + template >, + is_constructible<_Tp, const _Up&>, + is_convertible, + __not_<__converts_from_optional<_Tp, _Up>> + >::value, bool> = true> + constexpr optional(const optional<_Up>& __t) + { + if (__t) + emplace(*__t); + } + + template >, + is_constructible<_Tp, const _Up&>, + __not_>, + __not_<__converts_from_optional<_Tp, _Up>> + >::value, bool> = false> + explicit constexpr optional(const optional<_Up>& __t) + { + if (__t) + emplace(*__t); + } + + template >, + is_constructible<_Tp, _Up&&>, + is_convertible<_Up&&, _Tp>, + __not_<__converts_from_optional<_Tp, _Up>> + >::value, bool> = true> + constexpr optional(optional<_Up>&& __t) + { + if (__t) + emplace(std::move(*__t)); + } + + template >, + is_constructible<_Tp, _Up&&>, + __not_>, + __not_<__converts_from_optional<_Tp, _Up>> + >::value, bool> = false> + explicit constexpr optional(optional<_Up>&& __t) + { + if (__t) + emplace(std::move(*__t)); + } + + template, bool> = false> + explicit constexpr optional(in_place_t, _Args&&... __args) + : _Base(std::in_place, std::forward<_Args>(__args)...) { } + + template&, + _Args&&...>, bool> = false> + explicit constexpr optional(in_place_t, + initializer_list<_Up> __il, + _Args&&... __args) + : _Base(std::in_place, __il, std::forward<_Args>(__args)...) { } + + // Assignment operators. + optional& + operator=(nullopt_t) noexcept + { + this->_M_reset(); + return *this; + } + + template + enable_if_t<__and_< + __not_, decay_t<_Up>>>, + is_constructible<_Tp, _Up>, + __not_<__and_, + is_same<_Tp, decay_t<_Up>>>>, + is_assignable<_Tp&, _Up>>::value, + optional&> + operator=(_Up&& __u) + { + if (this->_M_is_engaged()) + this->_M_get() = std::forward<_Up>(__u); + else + this->_M_construct(std::forward<_Up>(__u)); + + return *this; + } + + template + enable_if_t<__and_< + __not_>, + is_constructible<_Tp, const _Up&>, + is_assignable<_Tp&, _Up>, + __not_<__converts_from_optional<_Tp, _Up>>, + __not_<__assigns_from_optional<_Tp, _Up>> + >::value, + optional&> + operator=(const optional<_Up>& __u) + { + if (__u) + { + if (this->_M_is_engaged()) + this->_M_get() = *__u; + else + this->_M_construct(*__u); + } + else + { + this->_M_reset(); + } + return *this; + } + + template + enable_if_t<__and_< + __not_>, + is_constructible<_Tp, _Up>, + is_assignable<_Tp&, _Up>, + __not_<__converts_from_optional<_Tp, _Up>>, + __not_<__assigns_from_optional<_Tp, _Up>> + >::value, + optional&> + operator=(optional<_Up>&& __u) + { + if (__u) + { + if (this->_M_is_engaged()) + this->_M_get() = std::move(*__u); + else + this->_M_construct(std::move(*__u)); + } + else + { + this->_M_reset(); + } + + return *this; + } + + template + enable_if_t::value, _Tp&> + emplace(_Args&&... __args) + { + this->_M_reset(); + this->_M_construct(std::forward<_Args>(__args)...); + return this->_M_get(); + } + + template + enable_if_t&, + _Args&&...>::value, _Tp&> + emplace(initializer_list<_Up> __il, _Args&&... __args) + { + this->_M_reset(); + this->_M_construct(__il, std::forward<_Args>(__args)...); + return this->_M_get(); + } + + // Destructor is implicit, implemented in _Optional_base. + + // Swap. + void + swap(optional& __other) + noexcept(is_nothrow_move_constructible<_Tp>() + && is_nothrow_swappable_v<_Tp>) + { + using std::swap; + + if (this->_M_is_engaged() && __other._M_is_engaged()) + swap(this->_M_get(), __other._M_get()); + else if (this->_M_is_engaged()) + { + __other._M_construct(std::move(this->_M_get())); + this->_M_destruct(); + } + else if (__other._M_is_engaged()) + { + this->_M_construct(std::move(__other._M_get())); + __other._M_destruct(); + } + } + + // Observers. + constexpr const _Tp* + operator->() const + { return std::__addressof(this->_M_get()); } + + _Tp* + operator->() + { return std::__addressof(this->_M_get()); } + + constexpr const _Tp& + operator*() const& + { return this->_M_get(); } + + constexpr _Tp& + operator*()& + { return this->_M_get(); } + + constexpr _Tp&& + operator*()&& + { return std::move(this->_M_get()); } + + constexpr const _Tp&& + operator*() const&& + { return std::move(this->_M_get()); } + + constexpr explicit operator bool() const noexcept + { return this->_M_is_engaged(); } + + constexpr bool has_value() const noexcept + { return this->_M_is_engaged(); } + + constexpr const _Tp& + value() const& + { + return this->_M_is_engaged() + ? this->_M_get() + : (__throw_bad_optional_access(), + this->_M_get()); + } + + constexpr _Tp& + value()& + { + return this->_M_is_engaged() + ? this->_M_get() + : (__throw_bad_optional_access(), + this->_M_get()); + } + + constexpr _Tp&& + value()&& + { + return this->_M_is_engaged() + ? std::move(this->_M_get()) + : (__throw_bad_optional_access(), + std::move(this->_M_get())); + } + + constexpr const _Tp&& + value() const&& + { + return this->_M_is_engaged() + ? std::move(this->_M_get()) + : (__throw_bad_optional_access(), + std::move(this->_M_get())); + } + + template + constexpr _Tp + value_or(_Up&& __u) const& + { + static_assert(__and_, + is_convertible<_Up&&, _Tp>>(), + "Cannot return value"); + + return this->_M_is_engaged() + ? this->_M_get() + : static_cast<_Tp>(std::forward<_Up>(__u)); + } + + template + _Tp + value_or(_Up&& __u) && + { + static_assert(__and_, + is_convertible<_Up&&, _Tp>>(), + "Cannot return value" ); + + return this->_M_is_engaged() + ? std::move(this->_M_get()) + : static_cast<_Tp>(std::forward<_Up>(__u)); + } + void reset() noexcept { this->_M_reset(); } + }; + + template + using __optional_relop_t = + enable_if_t::value, bool>; + + // Comparisons between optional values. + template + constexpr auto + operator==(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) + -> __optional_relop_t() == declval<_Up>())> + { + return static_cast(__lhs) == static_cast(__rhs) + && (!__lhs || *__lhs == *__rhs); + } + + template + constexpr auto + operator!=(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) + -> __optional_relop_t() != declval<_Up>())> + { + return static_cast(__lhs) != static_cast(__rhs) + || (static_cast(__lhs) && *__lhs != *__rhs); + } + + template + constexpr auto + operator<(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) + -> __optional_relop_t() < declval<_Up>())> + { + return static_cast(__rhs) && (!__lhs || *__lhs < *__rhs); + } + + template + constexpr auto + operator>(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) + -> __optional_relop_t() > declval<_Up>())> + { + return static_cast(__lhs) && (!__rhs || *__lhs > *__rhs); + } + + template + constexpr auto + operator<=(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) + -> __optional_relop_t() <= declval<_Up>())> + { + return !__lhs || (static_cast(__rhs) && *__lhs <= *__rhs); + } + + template + constexpr auto + operator>=(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) + -> __optional_relop_t() >= declval<_Up>())> + { + return !__rhs || (static_cast(__lhs) && *__lhs >= *__rhs); + } + + // Comparisons with nullopt. + template + constexpr bool + operator==(const optional<_Tp>& __lhs, nullopt_t) noexcept + { return !__lhs; } + + template + constexpr bool + operator==(nullopt_t, const optional<_Tp>& __rhs) noexcept + { return !__rhs; } + + template + constexpr bool + operator!=(const optional<_Tp>& __lhs, nullopt_t) noexcept + { return static_cast(__lhs); } + + template + constexpr bool + operator!=(nullopt_t, const optional<_Tp>& __rhs) noexcept + { return static_cast(__rhs); } + + template + constexpr bool + operator<(const optional<_Tp>& /* __lhs */, nullopt_t) noexcept + { return false; } + + template + constexpr bool + operator<(nullopt_t, const optional<_Tp>& __rhs) noexcept + { return static_cast(__rhs); } + + template + constexpr bool + operator>(const optional<_Tp>& __lhs, nullopt_t) noexcept + { return static_cast(__lhs); } + + template + constexpr bool + operator>(nullopt_t, const optional<_Tp>& /* __rhs */) noexcept + { return false; } + + template + constexpr bool + operator<=(const optional<_Tp>& __lhs, nullopt_t) noexcept + { return !__lhs; } + + template + constexpr bool + operator<=(nullopt_t, const optional<_Tp>& /* __rhs */) noexcept + { return true; } + + template + constexpr bool + operator>=(const optional<_Tp>& /* __lhs */, nullopt_t) noexcept + { return true; } + + template + constexpr bool + operator>=(nullopt_t, const optional<_Tp>& __rhs) noexcept + { return !__rhs; } + + // Comparisons with value type. + template + constexpr auto + operator==(const optional<_Tp>& __lhs, const _Up& __rhs) + -> __optional_relop_t() == declval<_Up>())> + { return __lhs && *__lhs == __rhs; } + + template + constexpr auto + operator==(const _Up& __lhs, const optional<_Tp>& __rhs) + -> __optional_relop_t() == declval<_Tp>())> + { return __rhs && __lhs == *__rhs; } + + template + constexpr auto + operator!=(const optional<_Tp>& __lhs, const _Up& __rhs) + -> __optional_relop_t() != declval<_Up>())> + { return !__lhs || *__lhs != __rhs; } + + template + constexpr auto + operator!=(const _Up& __lhs, const optional<_Tp>& __rhs) + -> __optional_relop_t() != declval<_Tp>())> + { return !__rhs || __lhs != *__rhs; } + + template + constexpr auto + operator<(const optional<_Tp>& __lhs, const _Up& __rhs) + -> __optional_relop_t() < declval<_Up>())> + { return !__lhs || *__lhs < __rhs; } + + template + constexpr auto + operator<(const _Up& __lhs, const optional<_Tp>& __rhs) + -> __optional_relop_t() < declval<_Tp>())> + { return __rhs && __lhs < *__rhs; } + + template + constexpr auto + operator>(const optional<_Tp>& __lhs, const _Up& __rhs) + -> __optional_relop_t() > declval<_Up>())> + { return __lhs && *__lhs > __rhs; } + + template + constexpr auto + operator>(const _Up& __lhs, const optional<_Tp>& __rhs) + -> __optional_relop_t() > declval<_Tp>())> + { return !__rhs || __lhs > *__rhs; } + + template + constexpr auto + operator<=(const optional<_Tp>& __lhs, const _Up& __rhs) + -> __optional_relop_t() <= declval<_Up>())> + { return !__lhs || *__lhs <= __rhs; } + + template + constexpr auto + operator<=(const _Up& __lhs, const optional<_Tp>& __rhs) + -> __optional_relop_t() <= declval<_Tp>())> + { return __rhs && __lhs <= *__rhs; } + + template + constexpr auto + operator>=(const optional<_Tp>& __lhs, const _Up& __rhs) + -> __optional_relop_t() >= declval<_Up>())> + { return __lhs && *__lhs >= __rhs; } + + template + constexpr auto + operator>=(const _Up& __lhs, const optional<_Tp>& __rhs) + -> __optional_relop_t() >= declval<_Tp>())> + { return !__rhs || __lhs >= *__rhs; } + + // Swap and creation functions. + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2748. swappable traits for optionals + template + inline enable_if_t && is_swappable_v<_Tp>> + swap(optional<_Tp>& __lhs, optional<_Tp>& __rhs) + noexcept(noexcept(__lhs.swap(__rhs))) + { __lhs.swap(__rhs); } + + template + enable_if_t && is_swappable_v<_Tp>)> + swap(optional<_Tp>&, optional<_Tp>&) = delete; + + template + constexpr optional> + make_optional(_Tp&& __t) + { return optional> { std::forward<_Tp>(__t) }; } + + template + constexpr optional<_Tp> + make_optional(_Args&&... __args) + { return optional<_Tp> { in_place, std::forward<_Args>(__args)... }; } + + template + constexpr optional<_Tp> + make_optional(initializer_list<_Up> __il, _Args&&... __args) + { return optional<_Tp> { in_place, __il, std::forward<_Args>(__args)... }; } + + // Hash. + + template>::__enable_hash_call> + struct __optional_hash_call_base + { + size_t + operator()(const optional<_Tp>& __t) const + noexcept(noexcept(hash<_Tp> {}(*__t))) + { + // We pick an arbitrary hash for disengaged optionals which hopefully + // usual values of _Tp won't typically hash to. + constexpr size_t __magic_disengaged_hash = static_cast(-3333); + return __t ? hash<_Tp> {}(*__t) : __magic_disengaged_hash; + } + }; + + template + struct __optional_hash_call_base<_Tp, false> {}; + + template + struct hash> + : private __poison_hash>, + public __optional_hash_call_base<_Tp> + { + using result_type = size_t; + using argument_type = optional<_Tp>; + }; + + /// @} + + template optional(_Tp) -> optional<_Tp>; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // C++17 + +#endif // _GLIBCXX_OPTIONAL diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ostream b/devkitARM/arm-none-eabi/include/c++/7.1.0/ostream similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ostream rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ostream index 151c42bed..50b70a508 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ostream +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ostream @@ -1,6 +1,6 @@ // Output streams -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -613,6 +613,29 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __os.flush(); } #if __cplusplus >= 201103L + template + struct __is_convertible_to_basic_ostream + { + template + static basic_ostream<_Ch, _Up>& __check(basic_ostream<_Ch, _Up>*); + + static void __check(...); + public: + using ostream_type = + decltype(__check(declval::type*>())); + using type = __not_>; + constexpr static bool value = type::value; + }; + + template + struct __is_insertable : false_type {}; + + template + struct __is_insertable<_Ostream, _Tp, + __void_t() + << declval())>> + : true_type {}; + /** * @brief Generic inserter for rvalue stream * @param __os An input stream. @@ -623,9 +646,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * rvalue streams since they won't bind to the inserter functions * that take an lvalue reference. */ - template - inline basic_ostream<_CharT, _Traits>& - operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) + template + inline + typename enable_if<__and_<__not_>, + __is_convertible_to_basic_ostream<_Ostream>, + __is_insertable<_Ostream&, const _Tp&>>::value, + typename __is_convertible_to_basic_ostream< + _Ostream>::ostream_type>::type + operator<<(_Ostream&& __os, const _Tp& __x) { __os << __x; return __os; diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algo.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algo.h new file mode 100644 index 000000000..f6d0b2ad3 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algo.h @@ -0,0 +1,2195 @@ +// -*- C++ -*- + +// Copyright (C) 2007-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file parallel/algo.h + * @brief Parallel STL function calls corresponding to the stl_algo.h header. + * + * The functions defined here mainly do case switches and + * call the actual parallelized versions in other files. + * Inlining policy: Functions that basically only contain one function call, + * are declared inline. + * This file is a GNU parallel extension to the Standard C++ Library. + */ + +// Written by Johannes Singler and Felix Putze. + +#ifndef _GLIBCXX_PARALLEL_ALGO_H +#define _GLIBCXX_PARALLEL_ALGO_H 1 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace __parallel +{ + // Sequential fallback + template + inline _Function + for_each(_IIter __begin, _IIter __end, _Function __f, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::for_each(__begin, __end, __f); } + + // Sequential fallback for input iterator case + template + inline _Function + __for_each_switch(_IIter __begin, _IIter __end, _Function __f, + _IteratorTag) + { return for_each(__begin, __end, __f, __gnu_parallel::sequential_tag()); } + + // Parallel algorithm for random access iterators + template + _Function + __for_each_switch(_RAIter __begin, _RAIter __end, + _Function __f, random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().for_each_minimal_n + && __gnu_parallel::__is_parallel(__parallelism_tag))) + { + bool __dummy; + __gnu_parallel::__for_each_selector<_RAIter> __functionality; + + return __gnu_parallel:: + __for_each_template_random_access( + __begin, __end, __f, __functionality, + __gnu_parallel::_DummyReduct(), true, __dummy, -1, + __parallelism_tag); + } + else + return for_each(__begin, __end, __f, __gnu_parallel::sequential_tag()); + } + + // Public interface + template + inline _Function + for_each(_Iterator __begin, _Iterator __end, _Function __f, + __gnu_parallel::_Parallelism __parallelism_tag) + { + return __for_each_switch(__begin, __end, __f, + std::__iterator_category(__begin), + __parallelism_tag); + } + + template + inline _Function + for_each(_Iterator __begin, _Iterator __end, _Function __f) + { + return __for_each_switch(__begin, __end, __f, + std::__iterator_category(__begin)); + } + + // Sequential fallback + template + inline _IIter + find(_IIter __begin, _IIter __end, const _Tp& __val, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::find(__begin, __end, __val); } + + // Sequential fallback for input iterator case + template + inline _IIter + __find_switch(_IIter __begin, _IIter __end, const _Tp& __val, + _IteratorTag) + { return _GLIBCXX_STD_A::find(__begin, __end, __val); } + + // Parallel find for random access iterators + template + _RAIter + __find_switch(_RAIter __begin, _RAIter __end, + const _Tp& __val, random_access_iterator_tag) + { + typedef iterator_traits<_RAIter> _TraitsType; + typedef typename _TraitsType::value_type _ValueType; + + if (_GLIBCXX_PARALLEL_CONDITION(true)) + { + __gnu_parallel::__binder2nd<__gnu_parallel::_EqualTo<_ValueType, + const _Tp&>, + _ValueType, const _Tp&, bool> + __comp(__gnu_parallel::_EqualTo<_ValueType, const _Tp&>(), __val); + return __gnu_parallel::__find_template( + __begin, __end, __begin, __comp, + __gnu_parallel::__find_if_selector()).first; + } + else + return _GLIBCXX_STD_A::find(__begin, __end, __val); + } + + // Public interface + template + inline _IIter + find(_IIter __begin, _IIter __end, const _Tp& __val) + { + return __find_switch(__begin, __end, __val, + std::__iterator_category(__begin)); + } + + // Sequential fallback + template + inline _IIter + find_if(_IIter __begin, _IIter __end, _Predicate __pred, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); } + + // Sequential fallback for input iterator case + template + inline _IIter + __find_if_switch(_IIter __begin, _IIter __end, _Predicate __pred, + _IteratorTag) + { return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); } + + // Parallel find_if for random access iterators + template + _RAIter + __find_if_switch(_RAIter __begin, _RAIter __end, + _Predicate __pred, random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION(true)) + return __gnu_parallel::__find_template(__begin, __end, __begin, __pred, + __gnu_parallel:: + __find_if_selector()).first; + else + return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); + } + + // Public interface + template + inline _IIter + find_if(_IIter __begin, _IIter __end, _Predicate __pred) + { + return __find_if_switch(__begin, __end, __pred, + std::__iterator_category(__begin)); + } + + // Sequential fallback + template + inline _IIter + find_first_of(_IIter __begin1, _IIter __end1, + _FIterator __begin2, _FIterator __end2, + __gnu_parallel::sequential_tag) + { + return _GLIBCXX_STD_A::find_first_of(__begin1, __end1, __begin2, __end2); + } + + // Sequential fallback + template + inline _IIter + find_first_of(_IIter __begin1, _IIter __end1, + _FIterator __begin2, _FIterator __end2, + _BinaryPredicate __comp, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::find_first_of( + __begin1, __end1, __begin2, __end2, __comp); } + + // Sequential fallback for input iterator type + template + inline _IIter + __find_first_of_switch(_IIter __begin1, _IIter __end1, + _FIterator __begin2, _FIterator __end2, + _IteratorTag1, _IteratorTag2) + { return find_first_of(__begin1, __end1, __begin2, __end2, + __gnu_parallel::sequential_tag()); } + + // Parallel algorithm for random access iterators + template + inline _RAIter + __find_first_of_switch(_RAIter __begin1, + _RAIter __end1, + _FIterator __begin2, _FIterator __end2, + _BinaryPredicate __comp, random_access_iterator_tag, + _IteratorTag) + { + return __gnu_parallel:: + __find_template(__begin1, __end1, __begin1, __comp, + __gnu_parallel::__find_first_of_selector + <_FIterator>(__begin2, __end2)).first; + } + + // Sequential fallback for input iterator type + template + inline _IIter + __find_first_of_switch(_IIter __begin1, _IIter __end1, + _FIterator __begin2, _FIterator __end2, + _BinaryPredicate __comp, _IteratorTag1, _IteratorTag2) + { return find_first_of(__begin1, __end1, __begin2, __end2, __comp, + __gnu_parallel::sequential_tag()); } + + // Public interface + template + inline _IIter + find_first_of(_IIter __begin1, _IIter __end1, + _FIterator __begin2, _FIterator __end2, + _BinaryPredicate __comp) + { + return __find_first_of_switch(__begin1, __end1, __begin2, __end2, __comp, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2)); + } + + // Public interface, insert default comparator + template + inline _IIter + find_first_of(_IIter __begin1, _IIter __end1, + _FIterator __begin2, _FIterator __end2) + { + typedef typename std::iterator_traits<_IIter>::value_type _IValueType; + typedef typename std::iterator_traits<_FIterator>::value_type _FValueType; + + return __gnu_parallel::find_first_of(__begin1, __end1, __begin2, __end2, + __gnu_parallel::_EqualTo<_IValueType, _FValueType>()); + } + + // Sequential fallback + template + inline _OutputIterator + unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::unique_copy(__begin1, __end1, __out); } + + // Sequential fallback + template + inline _OutputIterator + unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out, + _Predicate __pred, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::unique_copy(__begin1, __end1, __out, __pred); } + + // Sequential fallback for input iterator case + template + inline _OutputIterator + __unique_copy_switch(_IIter __begin, _IIter __last, + _OutputIterator __out, _Predicate __pred, + _IteratorTag1, _IteratorTag2) + { return _GLIBCXX_STD_A::unique_copy(__begin, __last, __out, __pred); } + + // Parallel unique_copy for random access iterators + template + RandomAccessOutputIterator + __unique_copy_switch(_RAIter __begin, _RAIter __last, + RandomAccessOutputIterator __out, _Predicate __pred, + random_access_iterator_tag, random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__last - __begin) + > __gnu_parallel::_Settings::get().unique_copy_minimal_n)) + return __gnu_parallel::__parallel_unique_copy( + __begin, __last, __out, __pred); + else + return _GLIBCXX_STD_A::unique_copy(__begin, __last, __out, __pred); + } + + // Public interface + template + inline _OutputIterator + unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out) + { + typedef typename std::iterator_traits<_IIter>::value_type _ValueType; + + return __unique_copy_switch( + __begin1, __end1, __out, equal_to<_ValueType>(), + std::__iterator_category(__begin1), + std::__iterator_category(__out)); + } + + // Public interface + template + inline _OutputIterator + unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out, + _Predicate __pred) + { + return __unique_copy_switch( + __begin1, __end1, __out, __pred, + std::__iterator_category(__begin1), + std::__iterator_category(__out)); + } + + // Sequential fallback + template + inline _OutputIterator + set_union(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::set_union( + __begin1, __end1, __begin2, __end2, __out); } + + // Sequential fallback + template + inline _OutputIterator + set_union(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, _Predicate __pred, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::set_union(__begin1, __end1, + __begin2, __end2, __out, __pred); } + + // Sequential fallback for input iterator case + template + inline _OutputIterator + __set_union_switch( + _IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __result, _Predicate __pred, + _IteratorTag1, _IteratorTag2, _IteratorTag3) + { return _GLIBCXX_STD_A::set_union(__begin1, __end1, + __begin2, __end2, __result, __pred); } + + // Parallel set_union for random access iterators + template + _Output_RAIter + __set_union_switch(_RAIter1 __begin1, _RAIter1 __end1, + _RAIter2 __begin2, _RAIter2 __end2, + _Output_RAIter __result, _Predicate __pred, + random_access_iterator_tag, random_access_iterator_tag, + random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) + >= __gnu_parallel::_Settings::get().set_union_minimal_n + || static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2) + >= __gnu_parallel::_Settings::get().set_union_minimal_n)) + return __gnu_parallel::__parallel_set_union( + __begin1, __end1, __begin2, __end2, __result, __pred); + else + return _GLIBCXX_STD_A::set_union(__begin1, __end1, + __begin2, __end2, __result, __pred); + } + + // Public interface + template + inline _OutputIterator + set_union(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, _OutputIterator __out) + { + typedef typename std::iterator_traits<_IIter1>::value_type _ValueType1; + typedef typename std::iterator_traits<_IIter2>::value_type _ValueType2; + + return __set_union_switch( + __begin1, __end1, __begin2, __end2, __out, + __gnu_parallel::_Less<_ValueType1, _ValueType2>(), + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__out)); + } + + // Public interface + template + inline _OutputIterator + set_union(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, _Predicate __pred) + { + return __set_union_switch( + __begin1, __end1, __begin2, __end2, __out, __pred, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__out)); + } + + // Sequential fallback. + template + inline _OutputIterator + set_intersection(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::set_intersection(__begin1, __end1, + __begin2, __end2, __out); } + + // Sequential fallback. + template + inline _OutputIterator + set_intersection(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, _Predicate __pred, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::set_intersection( + __begin1, __end1, __begin2, __end2, __out, __pred); } + + // Sequential fallback for input iterator case + template + inline _OutputIterator + __set_intersection_switch(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __result, _Predicate __pred, + _IteratorTag1, _IteratorTag2, _IteratorTag3) + { return _GLIBCXX_STD_A::set_intersection(__begin1, __end1, __begin2, + __end2, __result, __pred); } + + // Parallel set_intersection for random access iterators + template + _Output_RAIter + __set_intersection_switch(_RAIter1 __begin1, + _RAIter1 __end1, + _RAIter2 __begin2, + _RAIter2 __end2, + _Output_RAIter __result, + _Predicate __pred, + random_access_iterator_tag, + random_access_iterator_tag, + random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) + >= __gnu_parallel::_Settings::get().set_union_minimal_n + || static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2) + >= __gnu_parallel::_Settings::get().set_union_minimal_n)) + return __gnu_parallel::__parallel_set_intersection( + __begin1, __end1, __begin2, __end2, __result, __pred); + else + return _GLIBCXX_STD_A::set_intersection( + __begin1, __end1, __begin2, __end2, __result, __pred); + } + + // Public interface + template + inline _OutputIterator + set_intersection(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out) + { + typedef typename std::iterator_traits<_IIter1>::value_type _ValueType1; + typedef typename std::iterator_traits<_IIter2>::value_type _ValueType2; + + return __set_intersection_switch( + __begin1, __end1, __begin2, __end2, __out, + __gnu_parallel::_Less<_ValueType1, _ValueType2>(), + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__out)); + } + + template + inline _OutputIterator + set_intersection(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, _Predicate __pred) + { + return __set_intersection_switch( + __begin1, __end1, __begin2, __end2, __out, __pred, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__out)); + } + + // Sequential fallback + template + inline _OutputIterator + set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::set_symmetric_difference( + __begin1, __end1, __begin2, __end2, __out); } + + // Sequential fallback + template + inline _OutputIterator + set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, _Predicate __pred, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::set_symmetric_difference( + __begin1, __end1, __begin2, __end2, __out, __pred); } + + // Sequential fallback for input iterator case + template + inline _OutputIterator + __set_symmetric_difference_switch( + _IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __result, _Predicate __pred, + _IteratorTag1, _IteratorTag2, _IteratorTag3) + { return _GLIBCXX_STD_A::set_symmetric_difference( + __begin1, __end1, __begin2, __end2, __result, __pred); } + + // Parallel set_symmetric_difference for random access iterators + template + _Output_RAIter + __set_symmetric_difference_switch(_RAIter1 __begin1, + _RAIter1 __end1, + _RAIter2 __begin2, + _RAIter2 __end2, + _Output_RAIter __result, + _Predicate __pred, + random_access_iterator_tag, + random_access_iterator_tag, + random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) + >= __gnu_parallel::_Settings::get().set_symmetric_difference_minimal_n + || static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2) + >= __gnu_parallel::_Settings::get().set_symmetric_difference_minimal_n)) + return __gnu_parallel::__parallel_set_symmetric_difference( + __begin1, __end1, __begin2, __end2, __result, __pred); + else + return _GLIBCXX_STD_A::set_symmetric_difference( + __begin1, __end1, __begin2, __end2, __result, __pred); + } + + // Public interface. + template + inline _OutputIterator + set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out) + { + typedef typename std::iterator_traits<_IIter1>::value_type _ValueType1; + typedef typename std::iterator_traits<_IIter2>::value_type _ValueType2; + + return __set_symmetric_difference_switch( + __begin1, __end1, __begin2, __end2, __out, + __gnu_parallel::_Less<_ValueType1, _ValueType2>(), + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__out)); + } + + // Public interface. + template + inline _OutputIterator + set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, _Predicate __pred) + { + return __set_symmetric_difference_switch( + __begin1, __end1, __begin2, __end2, __out, __pred, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__out)); + } + + // Sequential fallback. + template + inline _OutputIterator + set_difference(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::set_difference( + __begin1,__end1, __begin2, __end2, __out); } + + // Sequential fallback. + template + inline _OutputIterator + set_difference(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, _Predicate __pred, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::set_difference(__begin1, __end1, + __begin2, __end2, __out, __pred); } + + // Sequential fallback for input iterator case. + template + inline _OutputIterator + __set_difference_switch(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __result, _Predicate __pred, + _IteratorTag1, _IteratorTag2, _IteratorTag3) + { return _GLIBCXX_STD_A::set_difference( + __begin1, __end1, __begin2, __end2, __result, __pred); } + + // Parallel set_difference for random access iterators + template + _Output_RAIter + __set_difference_switch(_RAIter1 __begin1, + _RAIter1 __end1, + _RAIter2 __begin2, + _RAIter2 __end2, + _Output_RAIter __result, _Predicate __pred, + random_access_iterator_tag, + random_access_iterator_tag, + random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) + >= __gnu_parallel::_Settings::get().set_difference_minimal_n + || static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2) + >= __gnu_parallel::_Settings::get().set_difference_minimal_n)) + return __gnu_parallel::__parallel_set_difference( + __begin1, __end1, __begin2, __end2, __result, __pred); + else + return _GLIBCXX_STD_A::set_difference( + __begin1, __end1, __begin2, __end2, __result, __pred); + } + + // Public interface + template + inline _OutputIterator + set_difference(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out) + { + typedef typename std::iterator_traits<_IIter1>::value_type _ValueType1; + typedef typename std::iterator_traits<_IIter2>::value_type _ValueType2; + + return __set_difference_switch( + __begin1, __end1, __begin2, __end2, __out, + __gnu_parallel::_Less<_ValueType1, _ValueType2>(), + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__out)); + } + + // Public interface + template + inline _OutputIterator + set_difference(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __out, _Predicate __pred) + { + return __set_difference_switch( + __begin1, __end1, __begin2, __end2, __out, __pred, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__out)); + } + + // Sequential fallback + template + inline _FIterator + adjacent_find(_FIterator __begin, _FIterator __end, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::adjacent_find(__begin, __end); } + + // Sequential fallback + template + inline _FIterator + adjacent_find(_FIterator __begin, _FIterator __end, + _BinaryPredicate __binary_pred, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::adjacent_find(__begin, __end, __binary_pred); } + + // Parallel algorithm for random access iterators + template + _RAIter + __adjacent_find_switch(_RAIter __begin, _RAIter __end, + random_access_iterator_tag) + { + typedef iterator_traits<_RAIter> _TraitsType; + typedef typename _TraitsType::value_type _ValueType; + + if (_GLIBCXX_PARALLEL_CONDITION(true)) + { + _RAIter __spot = __gnu_parallel:: + __find_template( + __begin, __end - 1, __begin, equal_to<_ValueType>(), + __gnu_parallel::__adjacent_find_selector()) + .first; + if (__spot == (__end - 1)) + return __end; + else + return __spot; + } + else + return adjacent_find(__begin, __end, __gnu_parallel::sequential_tag()); + } + + // Sequential fallback for input iterator case + template + inline _FIterator + __adjacent_find_switch(_FIterator __begin, _FIterator __end, + _IteratorTag) + { return adjacent_find(__begin, __end, __gnu_parallel::sequential_tag()); } + + // Public interface + template + inline _FIterator + adjacent_find(_FIterator __begin, _FIterator __end) + { + return __adjacent_find_switch(__begin, __end, + std::__iterator_category(__begin)); + } + + // Sequential fallback for input iterator case + template + inline _FIterator + __adjacent_find_switch(_FIterator __begin, _FIterator __end, + _BinaryPredicate __pred, _IteratorTag) + { return adjacent_find(__begin, __end, __pred, + __gnu_parallel::sequential_tag()); } + + // Parallel algorithm for random access iterators + template + _RAIter + __adjacent_find_switch(_RAIter __begin, _RAIter __end, + _BinaryPredicate __pred, random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION(true)) + return __gnu_parallel::__find_template(__begin, __end, __begin, __pred, + __gnu_parallel:: + __adjacent_find_selector()).first; + else + return adjacent_find(__begin, __end, __pred, + __gnu_parallel::sequential_tag()); + } + + // Public interface + template + inline _FIterator + adjacent_find(_FIterator __begin, _FIterator __end, + _BinaryPredicate __pred) + { + return __adjacent_find_switch(__begin, __end, __pred, + std::__iterator_category(__begin)); + } + + // Sequential fallback + template + inline typename iterator_traits<_IIter>::difference_type + count(_IIter __begin, _IIter __end, const _Tp& __value, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::count(__begin, __end, __value); } + + // Parallel code for random access iterators + template + typename iterator_traits<_RAIter>::difference_type + __count_switch(_RAIter __begin, _RAIter __end, + const _Tp& __value, random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + typedef iterator_traits<_RAIter> _TraitsType; + typedef typename _TraitsType::value_type _ValueType; + typedef typename _TraitsType::difference_type _DifferenceType; + typedef __gnu_parallel::_SequenceIndex _SequenceIndex; + + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().count_minimal_n + && __gnu_parallel::__is_parallel(__parallelism_tag))) + { + __gnu_parallel::__count_selector<_RAIter, _DifferenceType> + __functionality; + _DifferenceType __res = 0; + __gnu_parallel:: + __for_each_template_random_access( + __begin, __end, __value, __functionality, + std::plus<_SequenceIndex>(), __res, __res, -1, + __parallelism_tag); + return __res; + } + else + return count(__begin, __end, __value, + __gnu_parallel::sequential_tag()); + } + + // Sequential fallback for input iterator case. + template + inline typename iterator_traits<_IIter>::difference_type + __count_switch(_IIter __begin, _IIter __end, const _Tp& __value, + _IteratorTag) + { return count(__begin, __end, __value, __gnu_parallel::sequential_tag()); + } + + // Public interface. + template + inline typename iterator_traits<_IIter>::difference_type + count(_IIter __begin, _IIter __end, const _Tp& __value, + __gnu_parallel::_Parallelism __parallelism_tag) + { + return __count_switch(__begin, __end, __value, + std::__iterator_category(__begin), + __parallelism_tag); + } + + template + inline typename iterator_traits<_IIter>::difference_type + count(_IIter __begin, _IIter __end, const _Tp& __value) + { + return __count_switch(__begin, __end, __value, + std::__iterator_category(__begin)); + } + + + // Sequential fallback. + template + inline typename iterator_traits<_IIter>::difference_type + count_if(_IIter __begin, _IIter __end, _Predicate __pred, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::count_if(__begin, __end, __pred); } + + // Parallel count_if for random access iterators + template + typename iterator_traits<_RAIter>::difference_type + __count_if_switch(_RAIter __begin, _RAIter __end, + _Predicate __pred, random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + typedef iterator_traits<_RAIter> _TraitsType; + typedef typename _TraitsType::value_type _ValueType; + typedef typename _TraitsType::difference_type _DifferenceType; + typedef __gnu_parallel::_SequenceIndex _SequenceIndex; + + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().count_minimal_n + && __gnu_parallel::__is_parallel(__parallelism_tag))) + { + _DifferenceType __res = 0; + __gnu_parallel:: + __count_if_selector<_RAIter, _DifferenceType> + __functionality; + __gnu_parallel:: + __for_each_template_random_access( + __begin, __end, __pred, __functionality, + std::plus<_SequenceIndex>(), __res, __res, -1, + __parallelism_tag); + return __res; + } + else + return count_if(__begin, __end, __pred, + __gnu_parallel::sequential_tag()); + } + + // Sequential fallback for input iterator case. + template + inline typename iterator_traits<_IIter>::difference_type + __count_if_switch(_IIter __begin, _IIter __end, _Predicate __pred, + _IteratorTag) + { return count_if(__begin, __end, __pred, + __gnu_parallel::sequential_tag()); } + + // Public interface. + template + inline typename iterator_traits<_IIter>::difference_type + count_if(_IIter __begin, _IIter __end, _Predicate __pred, + __gnu_parallel::_Parallelism __parallelism_tag) + { + return __count_if_switch(__begin, __end, __pred, + std::__iterator_category(__begin), + __parallelism_tag); + } + + template + inline typename iterator_traits<_IIter>::difference_type + count_if(_IIter __begin, _IIter __end, _Predicate __pred) + { + return __count_if_switch(__begin, __end, __pred, + std::__iterator_category(__begin)); + } + + + // Sequential fallback. + template + inline _FIterator1 + search(_FIterator1 __begin1, _FIterator1 __end1, + _FIterator2 __begin2, _FIterator2 __end2, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::search(__begin1, __end1, __begin2, __end2); } + + // Parallel algorithm for random access iterator + template + _RAIter1 + __search_switch(_RAIter1 __begin1, _RAIter1 __end1, + _RAIter2 __begin2, _RAIter2 __end2, + random_access_iterator_tag, random_access_iterator_tag) + { + typedef typename std::iterator_traits<_RAIter1>::value_type _ValueType1; + typedef typename std::iterator_traits<_RAIter2>::value_type _ValueType2; + + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) + >= __gnu_parallel::_Settings::get().search_minimal_n)) + return __gnu_parallel:: + __search_template( + __begin1, __end1, __begin2, __end2, + __gnu_parallel::_EqualTo<_ValueType1, _ValueType2>()); + else + return search(__begin1, __end1, __begin2, __end2, + __gnu_parallel::sequential_tag()); + } + + // Sequential fallback for input iterator case + template + inline _FIterator1 + __search_switch(_FIterator1 __begin1, _FIterator1 __end1, + _FIterator2 __begin2, _FIterator2 __end2, + _IteratorTag1, _IteratorTag2) + { return search(__begin1, __end1, __begin2, __end2, + __gnu_parallel::sequential_tag()); } + + // Public interface. + template + inline _FIterator1 + search(_FIterator1 __begin1, _FIterator1 __end1, + _FIterator2 __begin2, _FIterator2 __end2) + { + return __search_switch(__begin1, __end1, __begin2, __end2, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2)); + } + + // Public interface. + template + inline _FIterator1 + search(_FIterator1 __begin1, _FIterator1 __end1, + _FIterator2 __begin2, _FIterator2 __end2, + _BinaryPredicate __pred, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::search( + __begin1, __end1, __begin2, __end2, __pred); } + + // Parallel algorithm for random access iterator. + template + _RAIter1 + __search_switch(_RAIter1 __begin1, _RAIter1 __end1, + _RAIter2 __begin2, _RAIter2 __end2, + _BinaryPredicate __pred, + random_access_iterator_tag, random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) + >= __gnu_parallel::_Settings::get().search_minimal_n)) + return __gnu_parallel::__search_template(__begin1, __end1, + __begin2, __end2, __pred); + else + return search(__begin1, __end1, __begin2, __end2, __pred, + __gnu_parallel::sequential_tag()); + } + + // Sequential fallback for input iterator case + template + inline _FIterator1 + __search_switch(_FIterator1 __begin1, _FIterator1 __end1, + _FIterator2 __begin2, _FIterator2 __end2, + _BinaryPredicate __pred, _IteratorTag1, _IteratorTag2) + { return search(__begin1, __end1, __begin2, __end2, __pred, + __gnu_parallel::sequential_tag()); } + + // Public interface + template + inline _FIterator1 + search(_FIterator1 __begin1, _FIterator1 __end1, + _FIterator2 __begin2, _FIterator2 __end2, + _BinaryPredicate __pred) + { + return __search_switch(__begin1, __end1, __begin2, __end2, __pred, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2)); + } + + // Sequential fallback + template + inline _FIterator + search_n(_FIterator __begin, _FIterator __end, _Integer __count, + const _Tp& __val, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::search_n(__begin, __end, __count, __val); } + + // Sequential fallback + template + inline _FIterator + search_n(_FIterator __begin, _FIterator __end, _Integer __count, + const _Tp& __val, _BinaryPredicate __binary_pred, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::search_n( + __begin, __end, __count, __val, __binary_pred); } + + // Public interface. + template + inline _FIterator + search_n(_FIterator __begin, _FIterator __end, _Integer __count, + const _Tp& __val) + { + typedef typename iterator_traits<_FIterator>::value_type _ValueType; + return __gnu_parallel::search_n(__begin, __end, __count, __val, + __gnu_parallel::_EqualTo<_ValueType, _Tp>()); + } + + // Parallel algorithm for random access iterators. + template + _RAIter + __search_n_switch(_RAIter __begin, _RAIter __end, _Integer __count, + const _Tp& __val, _BinaryPredicate __binary_pred, + random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().search_minimal_n)) + { + __gnu_parallel::_PseudoSequence<_Tp, _Integer> __ps(__val, __count); + return __gnu_parallel::__search_template( + __begin, __end, __ps.begin(), __ps.end(), __binary_pred); + } + else + return _GLIBCXX_STD_A::search_n(__begin, __end, __count, __val, + __binary_pred); + } + + // Sequential fallback for input iterator case. + template + inline _FIterator + __search_n_switch(_FIterator __begin, _FIterator __end, _Integer __count, + const _Tp& __val, _BinaryPredicate __binary_pred, + _IteratorTag) + { return _GLIBCXX_STD_A::search_n(__begin, __end, __count, __val, + __binary_pred); } + + // Public interface. + template + inline _FIterator + search_n(_FIterator __begin, _FIterator __end, _Integer __count, + const _Tp& __val, _BinaryPredicate __binary_pred) + { + return __search_n_switch(__begin, __end, __count, __val, __binary_pred, + std::__iterator_category(__begin)); + } + + + // Sequential fallback. + template + inline _OutputIterator + transform(_IIter __begin, _IIter __end, _OutputIterator __result, + _UnaryOperation __unary_op, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::transform(__begin, __end, __result, __unary_op); } + + // Parallel unary transform for random access iterators. + template + _RAIter2 + __transform1_switch(_RAIter1 __begin, _RAIter1 __end, + _RAIter2 __result, _UnaryOperation __unary_op, + random_access_iterator_tag, random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().transform_minimal_n + && __gnu_parallel::__is_parallel(__parallelism_tag))) + { + bool __dummy = true; + typedef __gnu_parallel::_IteratorPair<_RAIter1, + _RAIter2, random_access_iterator_tag> _ItTrip; + _ItTrip __begin_pair(__begin, __result), + __end_pair(__end, __result + (__end - __begin)); + __gnu_parallel::__transform1_selector<_ItTrip> __functionality; + __gnu_parallel:: + __for_each_template_random_access( + __begin_pair, __end_pair, __unary_op, __functionality, + __gnu_parallel::_DummyReduct(), + __dummy, __dummy, -1, __parallelism_tag); + return __functionality._M_finish_iterator; + } + else + return transform(__begin, __end, __result, __unary_op, + __gnu_parallel::sequential_tag()); + } + + // Sequential fallback for input iterator case. + template + inline _RAIter2 + __transform1_switch(_RAIter1 __begin, _RAIter1 __end, + _RAIter2 __result, _UnaryOperation __unary_op, + _IteratorTag1, _IteratorTag2) + { return transform(__begin, __end, __result, __unary_op, + __gnu_parallel::sequential_tag()); } + + // Public interface. + template + inline _OutputIterator + transform(_IIter __begin, _IIter __end, _OutputIterator __result, + _UnaryOperation __unary_op, + __gnu_parallel::_Parallelism __parallelism_tag) + { + return __transform1_switch(__begin, __end, __result, __unary_op, + std::__iterator_category(__begin), + std::__iterator_category(__result), + __parallelism_tag); + } + + template + inline _OutputIterator + transform(_IIter __begin, _IIter __end, _OutputIterator __result, + _UnaryOperation __unary_op) + { + return __transform1_switch(__begin, __end, __result, __unary_op, + std::__iterator_category(__begin), + std::__iterator_category(__result)); + } + + + // Sequential fallback + template + inline _OutputIterator + transform(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _OutputIterator __result, + _BinaryOperation __binary_op, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::transform(__begin1, __end1, + __begin2, __result, __binary_op); } + + // Parallel binary transform for random access iterators. + template + _RAIter3 + __transform2_switch(_RAIter1 __begin1, _RAIter1 __end1, + _RAIter2 __begin2, + _RAIter3 __result, _BinaryOperation __binary_op, + random_access_iterator_tag, random_access_iterator_tag, + random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + (__end1 - __begin1) >= + __gnu_parallel::_Settings::get().transform_minimal_n + && __gnu_parallel::__is_parallel(__parallelism_tag))) + { + bool __dummy = true; + typedef __gnu_parallel::_IteratorTriple<_RAIter1, + _RAIter2, _RAIter3, + random_access_iterator_tag> _ItTrip; + _ItTrip __begin_triple(__begin1, __begin2, __result), + __end_triple(__end1, __begin2 + (__end1 - __begin1), + __result + (__end1 - __begin1)); + __gnu_parallel::__transform2_selector<_ItTrip> __functionality; + __gnu_parallel:: + __for_each_template_random_access(__begin_triple, __end_triple, + __binary_op, __functionality, + __gnu_parallel::_DummyReduct(), + __dummy, __dummy, -1, + __parallelism_tag); + return __functionality._M_finish_iterator; + } + else + return transform(__begin1, __end1, __begin2, __result, __binary_op, + __gnu_parallel::sequential_tag()); + } + + // Sequential fallback for input iterator case. + template + inline _OutputIterator + __transform2_switch(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _OutputIterator __result, + _BinaryOperation __binary_op, _Tag1, _Tag2, _Tag3) + { return transform(__begin1, __end1, __begin2, __result, __binary_op, + __gnu_parallel::sequential_tag()); } + + // Public interface. + template + inline _OutputIterator + transform(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _OutputIterator __result, + _BinaryOperation __binary_op, + __gnu_parallel::_Parallelism __parallelism_tag) + { + return __transform2_switch( + __begin1, __end1, __begin2, __result, __binary_op, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__result), + __parallelism_tag); + } + + template + inline _OutputIterator + transform(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _OutputIterator __result, + _BinaryOperation __binary_op) + { + return __transform2_switch( + __begin1, __end1, __begin2, __result, __binary_op, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__result)); + } + + // Sequential fallback + template + inline void + replace(_FIterator __begin, _FIterator __end, const _Tp& __old_value, + const _Tp& __new_value, __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::replace(__begin, __end, __old_value, __new_value); } + + // Sequential fallback for input iterator case + template + inline void + __replace_switch(_FIterator __begin, _FIterator __end, + const _Tp& __old_value, const _Tp& __new_value, + _IteratorTag) + { replace(__begin, __end, __old_value, __new_value, + __gnu_parallel::sequential_tag()); } + + // Parallel replace for random access iterators + template + inline void + __replace_switch(_RAIter __begin, _RAIter __end, + const _Tp& __old_value, const _Tp& __new_value, + random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + // XXX parallel version is where? + replace(__begin, __end, __old_value, __new_value, + __gnu_parallel::sequential_tag()); + } + + // Public interface + template + inline void + replace(_FIterator __begin, _FIterator __end, const _Tp& __old_value, + const _Tp& __new_value, + __gnu_parallel::_Parallelism __parallelism_tag) + { + __replace_switch(__begin, __end, __old_value, __new_value, + std::__iterator_category(__begin), + __parallelism_tag); + } + + template + inline void + replace(_FIterator __begin, _FIterator __end, const _Tp& __old_value, + const _Tp& __new_value) + { + __replace_switch(__begin, __end, __old_value, __new_value, + std::__iterator_category(__begin)); + } + + + // Sequential fallback + template + inline void + replace_if(_FIterator __begin, _FIterator __end, _Predicate __pred, + const _Tp& __new_value, __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::replace_if(__begin, __end, __pred, __new_value); } + + // Sequential fallback for input iterator case + template + inline void + __replace_if_switch(_FIterator __begin, _FIterator __end, + _Predicate __pred, const _Tp& __new_value, _IteratorTag) + { replace_if(__begin, __end, __pred, __new_value, + __gnu_parallel::sequential_tag()); } + + // Parallel algorithm for random access iterators. + template + void + __replace_if_switch(_RAIter __begin, _RAIter __end, + _Predicate __pred, const _Tp& __new_value, + random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().replace_minimal_n + && __gnu_parallel::__is_parallel(__parallelism_tag))) + { + bool __dummy; + __gnu_parallel:: + __replace_if_selector<_RAIter, _Predicate, _Tp> + __functionality(__new_value); + __gnu_parallel:: + __for_each_template_random_access( + __begin, __end, __pred, __functionality, + __gnu_parallel::_DummyReduct(), + true, __dummy, -1, __parallelism_tag); + } + else + replace_if(__begin, __end, __pred, __new_value, + __gnu_parallel::sequential_tag()); + } + + // Public interface. + template + inline void + replace_if(_FIterator __begin, _FIterator __end, + _Predicate __pred, const _Tp& __new_value, + __gnu_parallel::_Parallelism __parallelism_tag) + { + __replace_if_switch(__begin, __end, __pred, __new_value, + std::__iterator_category(__begin), + __parallelism_tag); + } + + template + inline void + replace_if(_FIterator __begin, _FIterator __end, + _Predicate __pred, const _Tp& __new_value) + { + __replace_if_switch(__begin, __end, __pred, __new_value, + std::__iterator_category(__begin)); + } + + // Sequential fallback + template + inline void + generate(_FIterator __begin, _FIterator __end, _Generator __gen, + __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::generate(__begin, __end, __gen); } + + // Sequential fallback for input iterator case. + template + inline void + __generate_switch(_FIterator __begin, _FIterator __end, _Generator __gen, + _IteratorTag) + { generate(__begin, __end, __gen, __gnu_parallel::sequential_tag()); } + + // Parallel algorithm for random access iterators. + template + void + __generate_switch(_RAIter __begin, _RAIter __end, + _Generator __gen, random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().generate_minimal_n + && __gnu_parallel::__is_parallel(__parallelism_tag))) + { + bool __dummy; + __gnu_parallel::__generate_selector<_RAIter> + __functionality; + __gnu_parallel:: + __for_each_template_random_access( + __begin, __end, __gen, __functionality, + __gnu_parallel::_DummyReduct(), + true, __dummy, -1, __parallelism_tag); + } + else + generate(__begin, __end, __gen, __gnu_parallel::sequential_tag()); + } + + // Public interface. + template + inline void + generate(_FIterator __begin, _FIterator __end, + _Generator __gen, __gnu_parallel::_Parallelism __parallelism_tag) + { + __generate_switch(__begin, __end, __gen, + std::__iterator_category(__begin), + __parallelism_tag); + } + + template + inline void + generate(_FIterator __begin, _FIterator __end, _Generator __gen) + { + __generate_switch(__begin, __end, __gen, + std::__iterator_category(__begin)); + } + + + // Sequential fallback. + template + inline _OutputIterator + generate_n(_OutputIterator __begin, _Size __n, _Generator __gen, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::generate_n(__begin, __n, __gen); } + + // Sequential fallback for input iterator case. + template + inline _OutputIterator + __generate_n_switch(_OutputIterator __begin, _Size __n, _Generator __gen, + _IteratorTag) + { return generate_n(__begin, __n, __gen, + __gnu_parallel::sequential_tag()); } + + // Parallel algorithm for random access iterators. + template + inline _RAIter + __generate_n_switch(_RAIter __begin, _Size __n, _Generator __gen, + random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + // XXX parallel version is where? + return generate_n(__begin, __n, __gen, __gnu_parallel::sequential_tag()); + } + + // Public interface. + template + inline _OutputIterator + generate_n(_OutputIterator __begin, _Size __n, _Generator __gen, + __gnu_parallel::_Parallelism __parallelism_tag) + { + return __generate_n_switch(__begin, __n, __gen, + std::__iterator_category(__begin), + __parallelism_tag); + } + + template + inline _OutputIterator + generate_n(_OutputIterator __begin, _Size __n, _Generator __gen) + { + return __generate_n_switch(__begin, __n, __gen, + std::__iterator_category(__begin)); + } + + + // Sequential fallback. + template + inline void + random_shuffle(_RAIter __begin, _RAIter __end, + __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::random_shuffle(__begin, __end); } + + // Sequential fallback. + template + inline void + random_shuffle(_RAIter __begin, _RAIter __end, + _RandomNumberGenerator& __rand, + __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::random_shuffle(__begin, __end, __rand); } + + + /** @brief Functor wrapper for std::rand(). */ + template + struct _CRandNumber + { + int + operator()(int __limit) + { return rand() % __limit; } + }; + + // Fill in random number generator. + template + inline void + random_shuffle(_RAIter __begin, _RAIter __end) + { + _CRandNumber<> __r; + // Parallelization still possible. + __gnu_parallel::random_shuffle(__begin, __end, __r); + } + + // Parallel algorithm for random access iterators. + template + void + random_shuffle(_RAIter __begin, _RAIter __end, +#if __cplusplus >= 201103L + _RandomNumberGenerator&& __rand) +#else + _RandomNumberGenerator& __rand) +#endif + { + if (__begin == __end) + return; + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().random_shuffle_minimal_n)) + __gnu_parallel::__parallel_random_shuffle(__begin, __end, __rand); + else + __gnu_parallel::__sequential_random_shuffle(__begin, __end, __rand); + } + + // Sequential fallback. + template + inline _FIterator + partition(_FIterator __begin, _FIterator __end, + _Predicate __pred, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::partition(__begin, __end, __pred); } + + // Sequential fallback for input iterator case. + template + inline _FIterator + __partition_switch(_FIterator __begin, _FIterator __end, + _Predicate __pred, _IteratorTag) + { return partition(__begin, __end, __pred, + __gnu_parallel::sequential_tag()); } + + // Parallel algorithm for random access iterators. + template + _RAIter + __partition_switch(_RAIter __begin, _RAIter __end, + _Predicate __pred, random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().partition_minimal_n)) + { + typedef typename std::iterator_traits<_RAIter>:: + difference_type _DifferenceType; + _DifferenceType __middle = __gnu_parallel:: + __parallel_partition(__begin, __end, __pred, + __gnu_parallel::__get_max_threads()); + return __begin + __middle; + } + else + return partition(__begin, __end, __pred, + __gnu_parallel::sequential_tag()); + } + + // Public interface. + template + inline _FIterator + partition(_FIterator __begin, _FIterator __end, _Predicate __pred) + { + return __partition_switch(__begin, __end, __pred, + std::__iterator_category(__begin)); + } + + // sort interface + + // Sequential fallback + template + inline void + sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::sort(__begin, __end); } + + // Sequential fallback + template + inline void + sort(_RAIter __begin, _RAIter __end, _Compare __comp, + __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::sort<_RAIter, _Compare>(__begin, __end, + __comp); } + + // Public interface + template + void + sort(_RAIter __begin, _RAIter __end, _Compare __comp, + _Parallelism __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + + if (__begin != __end) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) >= + __gnu_parallel::_Settings::get().sort_minimal_n)) + __gnu_parallel::__parallel_sort( + __begin, __end, __comp, __parallelism); + else + sort(__begin, __end, __comp, __gnu_parallel::sequential_tag()); + } + } + + // Public interface, insert default comparator + template + inline void + sort(_RAIter __begin, _RAIter __end) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + sort(__begin, __end, std::less<_ValueType>(), + __gnu_parallel::default_parallel_tag()); + } + + // Public interface, insert default comparator + template + inline void + sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::default_parallel_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface, insert default comparator + template + inline void + sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::parallel_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface, insert default comparator + template + inline void + sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::multiway_mergesort_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface, insert default comparator + template + inline void + sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::multiway_mergesort_sampling_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface, insert default comparator + template + inline void + sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::multiway_mergesort_exact_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface, insert default comparator + template + inline void + sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::quicksort_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface, insert default comparator + template + inline void + sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::balanced_quicksort_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface + template + void + sort(_RAIter __begin, _RAIter __end, _Compare __comp) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + sort(__begin, __end, __comp, __gnu_parallel::default_parallel_tag()); + } + + // stable_sort interface + + + // Sequential fallback + template + inline void + stable_sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::stable_sort(__begin, __end); } + + // Sequential fallback + template + inline void + stable_sort(_RAIter __begin, _RAIter __end, + _Compare __comp, __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::stable_sort<_RAIter, _Compare>(__begin, __end, __comp); } + + // Public interface + template + void + stable_sort(_RAIter __begin, _RAIter __end, + _Compare __comp, _Parallelism __parallelism) + { + typedef iterator_traits<_RAIter> _TraitsType; + typedef typename _TraitsType::value_type _ValueType; + + if (__begin != __end) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) >= + __gnu_parallel::_Settings::get().sort_minimal_n)) + __gnu_parallel::__parallel_sort(__begin, __end, + __comp, __parallelism); + else + stable_sort(__begin, __end, __comp, + __gnu_parallel::sequential_tag()); + } + } + + // Public interface, insert default comparator + template + inline void + stable_sort(_RAIter __begin, _RAIter __end) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + stable_sort(__begin, __end, std::less<_ValueType>(), + __gnu_parallel::default_parallel_tag()); + } + + // Public interface, insert default comparator + template + inline void + stable_sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::default_parallel_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface, insert default comparator + template + inline void + stable_sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::parallel_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface, insert default comparator + template + inline void + stable_sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::multiway_mergesort_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface, insert default comparator + template + inline void + stable_sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::quicksort_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface, insert default comparator + template + inline void + stable_sort(_RAIter __begin, _RAIter __end, + __gnu_parallel::balanced_quicksort_tag __parallelism) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism); + } + + // Public interface + template + void + stable_sort(_RAIter __begin, _RAIter __end, _Compare __comp) + { + stable_sort( + __begin, __end, __comp, __gnu_parallel::default_parallel_tag()); + } + + // Sequential fallback + template + inline _OutputIterator + merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + _IIter2 __end2, _OutputIterator __result, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::merge( + __begin1, __end1, __begin2, __end2, __result); } + + // Sequential fallback + template + inline _OutputIterator + merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + _IIter2 __end2, _OutputIterator __result, _Compare __comp, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::merge( + __begin1, __end1, __begin2, __end2, __result, __comp); } + + // Sequential fallback for input iterator case + template + inline _OutputIterator + __merge_switch(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __result, _Compare __comp, + _IteratorTag1, _IteratorTag2, _IteratorTag3) + { return _GLIBCXX_STD_A::merge(__begin1, __end1, __begin2, __end2, + __result, __comp); } + + // Parallel algorithm for random access iterators + template + _OutputIterator + __merge_switch(_IIter1 __begin1, _IIter1 __end1, + _IIter2 __begin2, _IIter2 __end2, + _OutputIterator __result, _Compare __comp, + random_access_iterator_tag, random_access_iterator_tag, + random_access_iterator_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + (static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1) + >= __gnu_parallel::_Settings::get().merge_minimal_n + || static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2) + >= __gnu_parallel::_Settings::get().merge_minimal_n))) + return __gnu_parallel::__parallel_merge_advance( + __begin1, __end1, __begin2, __end2, __result, + (__end1 - __begin1) + (__end2 - __begin2), __comp); + else + return __gnu_parallel::__merge_advance( + __begin1, __end1, __begin2, __end2, __result, + (__end1 - __begin1) + (__end2 - __begin2), __comp); + } + + // Public interface + template + inline _OutputIterator + merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + _IIter2 __end2, _OutputIterator __result, _Compare __comp) + { + return __merge_switch( + __begin1, __end1, __begin2, __end2, __result, __comp, + std::__iterator_category(__begin1), + std::__iterator_category(__begin2), + std::__iterator_category(__result)); + } + + // Public interface, insert default comparator + template + inline _OutputIterator + merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, + _IIter2 __end2, _OutputIterator __result) + { + typedef typename std::iterator_traits<_IIter1>::value_type _ValueType1; + typedef typename std::iterator_traits<_IIter2>::value_type _ValueType2; + + return __gnu_parallel::merge(__begin1, __end1, __begin2, __end2, + __result, __gnu_parallel::_Less<_ValueType1, _ValueType2>()); + } + + // Sequential fallback + template + inline void + nth_element(_RAIter __begin, _RAIter __nth, + _RAIter __end, __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::nth_element(__begin, __nth, __end); } + + // Sequential fallback + template + inline void + nth_element(_RAIter __begin, _RAIter __nth, + _RAIter __end, _Compare __comp, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::nth_element(__begin, __nth, __end, __comp); } + + // Public interface + template + inline void + nth_element(_RAIter __begin, _RAIter __nth, + _RAIter __end, _Compare __comp) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().nth_element_minimal_n)) + __gnu_parallel::__parallel_nth_element(__begin, __nth, __end, __comp); + else + nth_element(__begin, __nth, __end, __comp, + __gnu_parallel::sequential_tag()); + } + + // Public interface, insert default comparator + template + inline void + nth_element(_RAIter __begin, _RAIter __nth, + _RAIter __end) + { + typedef typename iterator_traits<_RAIter>::value_type _ValueType; + __gnu_parallel::nth_element(__begin, __nth, __end, + std::less<_ValueType>()); + } + + // Sequential fallback + template + inline void + partial_sort(_RAIter __begin, _RAIter __middle, + _RAIter __end, _Compare __comp, + __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::partial_sort(__begin, __middle, __end, __comp); } + + // Sequential fallback + template + inline void + partial_sort(_RAIter __begin, _RAIter __middle, + _RAIter __end, __gnu_parallel::sequential_tag) + { _GLIBCXX_STD_A::partial_sort(__begin, __middle, __end); } + + // Public interface, parallel algorithm for random access iterators + template + void + partial_sort(_RAIter __begin, _RAIter __middle, + _RAIter __end, _Compare __comp) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().partial_sort_minimal_n)) + __gnu_parallel:: + __parallel_partial_sort(__begin, __middle, __end, __comp); + else + partial_sort(__begin, __middle, __end, __comp, + __gnu_parallel::sequential_tag()); + } + + // Public interface, insert default comparator + template + inline void + partial_sort(_RAIter __begin, _RAIter __middle, + _RAIter __end) + { + typedef iterator_traits<_RAIter> _TraitsType; + typedef typename _TraitsType::value_type _ValueType; + __gnu_parallel::partial_sort(__begin, __middle, __end, + std::less<_ValueType>()); + } + + // Sequential fallback + template + inline _FIterator + max_element(_FIterator __begin, _FIterator __end, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::max_element(__begin, __end); } + + // Sequential fallback + template + inline _FIterator + max_element(_FIterator __begin, _FIterator __end, _Compare __comp, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::max_element(__begin, __end, __comp); } + + // Sequential fallback for input iterator case + template + inline _FIterator + __max_element_switch(_FIterator __begin, _FIterator __end, + _Compare __comp, _IteratorTag) + { return max_element(__begin, __end, __comp, + __gnu_parallel::sequential_tag()); } + + // Parallel algorithm for random access iterators + template + _RAIter + __max_element_switch(_RAIter __begin, _RAIter __end, + _Compare __comp, random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().max_element_minimal_n + && __gnu_parallel::__is_parallel(__parallelism_tag))) + { + _RAIter __res(__begin); + __gnu_parallel::__identity_selector<_RAIter> + __functionality; + __gnu_parallel:: + __for_each_template_random_access( + __begin, __end, __gnu_parallel::_Nothing(), __functionality, + __gnu_parallel::__max_element_reduct<_Compare, _RAIter>(__comp), + __res, __res, -1, __parallelism_tag); + return __res; + } + else + return max_element(__begin, __end, __comp, + __gnu_parallel::sequential_tag()); + } + + // Public interface, insert default comparator + template + inline _FIterator + max_element(_FIterator __begin, _FIterator __end, + __gnu_parallel::_Parallelism __parallelism_tag) + { + typedef typename iterator_traits<_FIterator>::value_type _ValueType; + return max_element(__begin, __end, std::less<_ValueType>(), + __parallelism_tag); + } + + template + inline _FIterator + max_element(_FIterator __begin, _FIterator __end) + { + typedef typename iterator_traits<_FIterator>::value_type _ValueType; + return __gnu_parallel::max_element(__begin, __end, + std::less<_ValueType>()); + } + + // Public interface + template + inline _FIterator + max_element(_FIterator __begin, _FIterator __end, _Compare __comp, + __gnu_parallel::_Parallelism __parallelism_tag) + { + return __max_element_switch(__begin, __end, __comp, + std::__iterator_category(__begin), + __parallelism_tag); + } + + template + inline _FIterator + max_element(_FIterator __begin, _FIterator __end, _Compare __comp) + { + return __max_element_switch(__begin, __end, __comp, + std::__iterator_category(__begin)); + } + + + // Sequential fallback + template + inline _FIterator + min_element(_FIterator __begin, _FIterator __end, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::min_element(__begin, __end); } + + // Sequential fallback + template + inline _FIterator + min_element(_FIterator __begin, _FIterator __end, _Compare __comp, + __gnu_parallel::sequential_tag) + { return _GLIBCXX_STD_A::min_element(__begin, __end, __comp); } + + // Sequential fallback for input iterator case + template + inline _FIterator + __min_element_switch(_FIterator __begin, _FIterator __end, + _Compare __comp, _IteratorTag) + { return min_element(__begin, __end, __comp, + __gnu_parallel::sequential_tag()); } + + // Parallel algorithm for random access iterators + template + _RAIter + __min_element_switch(_RAIter __begin, _RAIter __end, + _Compare __comp, random_access_iterator_tag, + __gnu_parallel::_Parallelism __parallelism_tag) + { + if (_GLIBCXX_PARALLEL_CONDITION( + static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) + >= __gnu_parallel::_Settings::get().min_element_minimal_n + && __gnu_parallel::__is_parallel(__parallelism_tag))) + { + _RAIter __res(__begin); + __gnu_parallel::__identity_selector<_RAIter> + __functionality; + __gnu_parallel:: + __for_each_template_random_access( + __begin, __end, __gnu_parallel::_Nothing(), __functionality, + __gnu_parallel::__min_element_reduct<_Compare, _RAIter>(__comp), + __res, __res, -1, __parallelism_tag); + return __res; + } + else + return min_element(__begin, __end, __comp, + __gnu_parallel::sequential_tag()); + } + + // Public interface, insert default comparator + template + inline _FIterator + min_element(_FIterator __begin, _FIterator __end, + __gnu_parallel::_Parallelism __parallelism_tag) + { + typedef typename iterator_traits<_FIterator>::value_type _ValueType; + return min_element(__begin, __end, std::less<_ValueType>(), + __parallelism_tag); + } + + template + inline _FIterator + min_element(_FIterator __begin, _FIterator __end) + { + typedef typename iterator_traits<_FIterator>::value_type _ValueType; + return __gnu_parallel::min_element(__begin, __end, + std::less<_ValueType>()); + } + + // Public interface + template + inline _FIterator + min_element(_FIterator __begin, _FIterator __end, _Compare __comp, + __gnu_parallel::_Parallelism __parallelism_tag) + { + return __min_element_switch(__begin, __end, __comp, + std::__iterator_category(__begin), + __parallelism_tag); + } + + template + inline _FIterator + min_element(_FIterator __begin, _FIterator __end, _Compare __comp) + { + return __min_element_switch(__begin, __end, __comp, + std::__iterator_category(__begin)); + } +} // end namespace +} // end namespace + +#endif /* _GLIBCXX_PARALLEL_ALGO_H */ diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algobase.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algobase.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algobase.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algobase.h index 481089ccc..22c92de0d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algobase.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algobase.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algorithm b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algorithm similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algorithm rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algorithm index 1721185a6..9c20c3a3f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algorithm +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algorithm @@ -1,6 +1,6 @@ // Algorithm extensions -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algorithmfwd.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algorithmfwd.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algorithmfwd.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algorithmfwd.h index 727609de2..f45f17681 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/algorithmfwd.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/algorithmfwd.h @@ -1,6 +1,6 @@ // Forward declarations -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/balanced_quicksort.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/balanced_quicksort.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/balanced_quicksort.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/balanced_quicksort.h index 8639cdf62..de1a37ead 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/balanced_quicksort.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/balanced_quicksort.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -51,8 +51,11 @@ #include #include -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS #include +#ifdef _GLIBCXX_HAVE_UNISTD_H +#include +#endif #endif namespace __gnu_parallel @@ -110,7 +113,7 @@ namespace __gnu_parallel __median_of_three_iterators(__begin, __begin + (__end - __begin) / 2, __end - 1, __comp); -#if defined(_GLIBCXX_ASSERTIONS) +#if defined(_GLIBCXX_PARALLEL_ASSERTIONS) // Must be in between somewhere. _DifferenceType __n = __end - __begin; @@ -147,7 +150,7 @@ namespace __gnu_parallel std::iter_swap(__begin + __split_pos, __pivot_pos); __pivot_pos = __begin + __split_pos; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _RAIter __r; for (__r = __begin; __r != __pivot_pos; ++__r) _GLIBCXX_PARALLEL_ASSERT(__comp(*__r, *__pivot_pos)); @@ -194,7 +197,7 @@ namespace __gnu_parallel _DifferenceType __split_pos = __qsb_divide(__begin, __end, __comp, __num_threads); -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT(0 <= __split_pos && __split_pos < (__end - __begin)); #endif @@ -267,7 +270,7 @@ namespace __gnu_parallel _Piece __current = __tl._M_initial; _DifferenceType __elements_done = 0; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _DifferenceType __total_elements_done = 0; #endif @@ -297,7 +300,7 @@ namespace __gnu_parallel __pred); // Left side: < __pivot_pos; __right side: >= __pivot_pos. -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT(__begin <= __split_pos1 && __split_pos1 < __end); #endif @@ -328,7 +331,7 @@ namespace __gnu_parallel // Elements equal to pivot are done. __elements_done += (__split_pos2 - __split_pos1); -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS __total_elements_done += (__split_pos2 - __split_pos1); #endif // Always push larger part onto stack. @@ -359,7 +362,7 @@ namespace __gnu_parallel { __gnu_sequential::sort(__begin, __end, __comp); __elements_done += __n; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS __total_elements_done += __n; #endif @@ -372,7 +375,7 @@ namespace __gnu_parallel __elements_done = 0; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS double __search_start = omp_get_wtime(); #endif @@ -380,7 +383,7 @@ namespace __gnu_parallel bool __successfully_stolen = false; while (__wait && *__tl._M_elements_leftover > 0 && !__successfully_stolen -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // Possible dead-lock. && (omp_get_wtime() < (__search_start + 1.0)) #endif @@ -399,7 +402,7 @@ namespace __gnu_parallel #endif } -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS if (omp_get_wtime() >= (__search_start + 1.0)) { sleep(1); @@ -409,7 +412,7 @@ namespace __gnu_parallel #endif if (!__successfully_stolen) { -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT(*__tl._M_elements_leftover == 0); #endif return; @@ -475,7 +478,7 @@ namespace __gnu_parallel __qsb_conquer(__tls, __begin, __begin + __n, __comp, 0, __num_threads, true); -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // All stack must be empty. _Piece __dummy; for (_ThreadIndex __i = 1; __i < __num_threads; ++__i) diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/base.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/base.h index f88f90b45..3df3af9fb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/base.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -419,7 +419,11 @@ namespace __gnu_parallel } } -#define _GLIBCXX_PARALLEL_ASSERT(_Condition) __glibcxx_assert(_Condition) +#if _GLIBCXX_PARALLEL_ASSERTIONS && defined(__glibcxx_assert_impl) +#define _GLIBCXX_PARALLEL_ASSERT(_Condition) __glibcxx_assert_impl(_Condition) +#else +#define _GLIBCXX_PARALLEL_ASSERT(_Condition) +#endif } //namespace __gnu_parallel diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/basic_iterator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/basic_iterator.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/basic_iterator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/basic_iterator.h index 14ba3cf4e..b239aa085 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/basic_iterator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/basic_iterator.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/checkers.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/checkers.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/checkers.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/checkers.h index 5814fc13f..efc9158f2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/checkers.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/checkers.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/compatibility.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/compatibility.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/compatibility.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/compatibility.h index b8f127d9f..6ea699fda 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/compatibility.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/compatibility.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/compiletime_settings.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/compiletime_settings.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/compiletime_settings.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/compiletime_settings.h index fa83c6ad7..34376fc63 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/compiletime_settings.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/compiletime_settings.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -55,10 +55,10 @@ #define _GLIBCXX_SCALE_DOWN_FPU 0 #endif -#ifndef _GLIBCXX_ASSERTIONS +#ifndef _GLIBCXX_PARALLEL_ASSERTIONS /** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code. * Should be switched on only locally. */ -#define _GLIBCXX_ASSERTIONS 0 +#define _GLIBCXX_PARALLEL_ASSERTIONS (_GLIBCXX_ASSERTIONS+0) #endif #ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1 diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/equally_split.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/equally_split.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/equally_split.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/equally_split.h index db119df67..926403a8f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/equally_split.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/equally_split.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/features.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/features.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/features.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/features.h index 796a218af..071ecacc0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/features.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/features.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/find.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/find.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/find.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/find.h index 6aee8d827..6eaf940b5 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/find.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/find.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/find_selectors.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/find_selectors.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/find_selectors.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/find_selectors.h index 145b10748..e62282fe6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/find_selectors.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/find_selectors.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/for_each.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/for_each.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/for_each.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/for_each.h index 4ba61697f..cab7d1c2c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/for_each.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/for_each.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/for_each_selectors.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/for_each_selectors.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/for_each_selectors.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/for_each_selectors.h index 86222838f..a0b727da6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/for_each_selectors.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/for_each_selectors.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/iterator.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/iterator.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/iterator.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/iterator.h index de5456331..2fd4b2d90 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/iterator.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/iterator.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/list_partition.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/list_partition.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/list_partition.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/list_partition.h index 0ee1f9b4a..6efb45a3f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/list_partition.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/list_partition.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute __it and/or modify __it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/losertree.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/losertree.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/losertree.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/losertree.h index 6526164ca..6e5266dc6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/losertree.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/losertree.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -222,7 +222,7 @@ namespace __gnu_parallel __delete_min_insert(_Tp __key, bool __sup) { using std::swap; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top! _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); #endif @@ -324,7 +324,7 @@ namespace __gnu_parallel __delete_min_insert(_Tp __key, bool __sup) { using std::swap; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top! _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); #endif @@ -451,7 +451,7 @@ namespace __gnu_parallel void __delete_min_insert(const _Tp& __key, bool __sup) { -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top! _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); #endif @@ -533,7 +533,7 @@ namespace __gnu_parallel void __delete_min_insert(const _Tp& __key, bool __sup) { -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top! _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); #endif @@ -620,7 +620,7 @@ namespace __gnu_parallel int __get_min_source() { -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top! _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); #endif @@ -687,7 +687,7 @@ namespace __gnu_parallel { _M_losers[0] = _M_losers[__init_winner(1)]; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top at the beginning // (0 sequences!) _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); @@ -700,7 +700,7 @@ namespace __gnu_parallel __delete_min_insert(_Tp __key, bool) { using std::swap; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top! _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); #endif @@ -755,7 +755,7 @@ namespace __gnu_parallel unsigned int __left = __init_winner(2 * __root); unsigned int __right = __init_winner(2 * __root + 1); -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // If __left one is sentinel then __right one must be, too. if (_M_losers[__left]._M_source == -1) _GLIBCXX_PARALLEL_ASSERT(_M_losers[__right]._M_source == -1); @@ -782,7 +782,7 @@ namespace __gnu_parallel { _M_losers[0] = _M_losers[__init_winner(1)]; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top at the beginning // (0 sequences!) _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); @@ -795,7 +795,7 @@ namespace __gnu_parallel __delete_min_insert(_Tp __key, bool) { using std::swap; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top! _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); #endif @@ -865,7 +865,7 @@ namespace __gnu_parallel int __get_min_source() { -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top! _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); #endif @@ -932,7 +932,7 @@ namespace __gnu_parallel { _M_losers[0] = _M_losers[__init_winner(1)]; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top at the beginning // (0 sequences!) _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); @@ -942,7 +942,7 @@ namespace __gnu_parallel void __delete_min_insert(const _Tp& __key, bool __sup) { -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top! _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); #endif @@ -998,7 +998,7 @@ namespace __gnu_parallel unsigned int __left = __init_winner(2 * __root); unsigned int __right = __init_winner(2 * __root + 1); -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // If __left one is sentinel then __right one must be, too. if (_M_losers[__left]._M_source == -1) _GLIBCXX_PARALLEL_ASSERT(_M_losers[__right]._M_source == -1); @@ -1025,7 +1025,7 @@ namespace __gnu_parallel { _M_losers[0] = _M_losers[__init_winner(1)]; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top at the beginning // (0 sequences!) _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); @@ -1035,7 +1035,7 @@ namespace __gnu_parallel void __delete_min_insert(const _Tp& __key, bool __sup) { -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // no dummy sequence can ever be at the top! _GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1); #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/merge.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/merge.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/merge.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/merge.h index e6124e782..16ed11fcc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/merge.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/merge.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -113,7 +113,7 @@ namespace __gnu_parallel typedef typename std::iterator_traits<_RAIter2>::value_type _ValueType2; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT(__max_length >= 0); #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/multiseq_selection.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/multiseq_selection.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/multiseq_selection.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/multiseq_selection.h index b9bb5ed8f..b5d6941c7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/multiseq_selection.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/multiseq_selection.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/multiway_merge.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/multiway_merge.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/multiway_merge.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/multiway_merge.h index 08255d3ea..ccd8b6e93 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/multiway_merge.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/multiway_merge.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -46,7 +46,7 @@ #include #include #include -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS #include #endif @@ -256,7 +256,7 @@ namespace __gnu_parallel if (__length == 0) return __target; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _DifferenceTp __orig_length = __length; #endif @@ -310,7 +310,7 @@ namespace __gnu_parallel __finish: ; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT( ((_RAIter1)__seq0 - __seqs_begin[0].first) + ((_RAIter1)__seq1 - __seqs_begin[1].first) + @@ -597,7 +597,7 @@ namespace __gnu_parallel for (_SeqNumber __t = 0; __t < __k; ++__t) { -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT(__seqs_begin[__t].first != __seqs_begin[__t].second); #endif @@ -608,7 +608,7 @@ namespace __gnu_parallel _SeqNumber __source; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _DifferenceType __i = 0; #endif @@ -618,7 +618,7 @@ namespace __gnu_parallel // Take out. __source = __lt.__get_min_source(); -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT(0 <= __source && __source < __k); _GLIBCXX_PARALLEL_ASSERT(__i == 0 || !__comp(*(__seqs_begin[__source].first), *(__target - 1))); @@ -627,7 +627,7 @@ namespace __gnu_parallel // Feed. *(__target++) = *(__seqs_begin[__source].first++); -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS ++__i; #endif // Replace from same __source. @@ -690,7 +690,7 @@ namespace __gnu_parallel __target_end = multiway_merge_loser_tree_unguarded (__seqs_begin, __seqs_end, __target, __sentinel, __length, __comp); -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT(__target_end == __target + __length); _GLIBCXX_PARALLEL_ASSERT(__is_sorted(__target, __target_end, __comp)); #endif @@ -936,7 +936,7 @@ namespace __gnu_parallel typedef typename std::iterator_traits<_RAIter1>::value_type _ValueType; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS for (_RAIterIterator __s = __seqs_begin; __s != __seqs_end; ++__s) { _GLIBCXX_PARALLEL_ASSERT(__is_sorted((*__s).first, @@ -990,7 +990,7 @@ namespace __gnu_parallel (__seqs_begin, __seqs_end, __target, __sentinel, __length, __comp); break; } -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT( __is_sorted(__target, __target + __length, __comp)); #endif @@ -1230,7 +1230,7 @@ namespace __gnu_parallel _Compare __comp, _ThreadIndex __num_threads) { -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT(__seqs_end - __seqs_begin > 1); #endif @@ -1318,7 +1318,7 @@ namespace __gnu_parallel delete[] __chunks; } // parallel -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT( __is_sorted(__target, __target + __length, __comp)); #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/multiway_mergesort.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/multiway_mergesort.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/multiway_mergesort.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/multiway_mergesort.h index 01d817d53..0a22d77c4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/multiway_mergesort.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/multiway_mergesort.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/numeric b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/numeric similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/numeric rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/numeric index 23c97eb22..1b8ca722e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/numeric +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/numeric @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/numericfwd.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/numericfwd.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/numericfwd.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/numericfwd.h index c40ba1187..55d64c9a3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/numericfwd.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/numericfwd.h @@ -1,6 +1,6 @@ // Forward declarations -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/omp_loop.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/omp_loop.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/omp_loop.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/omp_loop.h index ef33e9597..d4db5b354 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/omp_loop.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/omp_loop.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/omp_loop_static.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/omp_loop_static.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/omp_loop_static.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/omp_loop_static.h index 2ba4fba81..03b745d74 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/omp_loop_static.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/omp_loop_static.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/par_loop.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/par_loop.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/par_loop.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/par_loop.h index 3426f08e6..1e8f519b9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/par_loop.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/par_loop.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/parallel.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/parallel.h similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/parallel.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/parallel.h index a199edbed..77a23ea6a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/parallel.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/parallel.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/partial_sum.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/partial_sum.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/partial_sum.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/partial_sum.h index c253ffe93..828c40c1f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/partial_sum.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/partial_sum.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/partition.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/partition.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/partition.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/partition.h index b1912e375..42ee40ded 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/partition.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/partition.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -234,7 +234,7 @@ namespace __gnu_parallel break; } -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT(__swapstart != -1); #endif @@ -257,7 +257,7 @@ namespace __gnu_parallel break; } -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS _GLIBCXX_PARALLEL_ASSERT(__swapstart != -1); #endif @@ -265,7 +265,7 @@ namespace __gnu_parallel __begin + __thread_right_border + __chunk_size, __begin + __swapstart); } -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS # pragma omp barrier # pragma omp single diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/queue.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/queue.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/queue.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/queue.h index a20e8e5aa..94da5883b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/queue.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/queue.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -86,7 +86,7 @@ namespace __gnu_parallel int __former_front, __former_back; __decode2(__former_borders, __former_front, __former_back); *(_M_base + __former_front % _M_max_size) = __t; -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS // Otherwise: front - back > _M_max_size eventually. _GLIBCXX_PARALLEL_ASSERT(((__former_front + 1) - __former_back) <= _M_max_size); diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/quicksort.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/quicksort.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/quicksort.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/quicksort.h index 55a795800..761f09e9a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/quicksort.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/quicksort.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/random_number.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/random_number.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/random_number.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/random_number.h index c589682b2..f2f8a57a4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/random_number.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/random_number.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/random_shuffle.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/random_shuffle.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/random_shuffle.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/random_shuffle.h index 2220489ac..36b54cefe 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/random_shuffle.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/random_shuffle.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/search.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/search.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/search.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/search.h index 8d165b2f1..4b7c5403c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/search.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/search.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/set_operations.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/set_operations.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/set_operations.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/set_operations.h index f425290ff..b9a72b926 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/set_operations.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/set_operations.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/settings.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/settings.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/settings.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/settings.h index a34cb3da9..f0a37dc6c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/settings.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/settings.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/sort.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/sort.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/sort.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/sort.h index 87a7e7556..338595286 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/sort.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/sort.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -36,7 +36,7 @@ #include #include -#if _GLIBCXX_ASSERTIONS +#if _GLIBCXX_PARALLEL_ASSERTIONS #include #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/tags.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/tags.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/tags.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/tags.h index a84e11dca..a4f2c5973 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/tags.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/tags.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/types.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/types.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/types.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/types.h index abfb95274..1610d96b6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/types.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/types.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/unique_copy.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/unique_copy.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/unique_copy.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/unique_copy.h index 7abeecb8d..8e7b5a74d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/unique_copy.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/unique_copy.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/workstealing.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/workstealing.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/workstealing.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/workstealing.h index d418d8991..90afcffb3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/parallel/workstealing.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/parallel/workstealing.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/array b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/array similarity index 86% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/array rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/array index 5198bb3af..e419aaaae 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/array +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/array @@ -1,6 +1,6 @@ // Profile array implementation -*- C++ -*- -// Copyright (C) 2012-2015 Free Software Foundation, Inc. +// Copyright (C) 2012-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -31,6 +31,8 @@ #pragma GCC system_header +#include + namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile @@ -63,55 +65,55 @@ namespace __profile void swap(array& __other) - noexcept(noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))) + noexcept(_AT_Type::_Is_nothrow_swappable::value) { std::swap_ranges(begin(), end(), __other.begin()); } // Iterators. - iterator + _GLIBCXX17_CONSTEXPR iterator begin() noexcept { return iterator(data()); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator begin() const noexcept { return const_iterator(data()); } - iterator + _GLIBCXX17_CONSTEXPR iterator end() noexcept { return iterator(data() + _Nm); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator end() const noexcept { return const_iterator(data() + _Nm); } - reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } - reverse_iterator + _GLIBCXX17_CONSTEXPR reverse_iterator rend() noexcept { return reverse_iterator(begin()); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator cbegin() const noexcept { return const_iterator(data()); } - const_iterator + _GLIBCXX17_CONSTEXPR const_iterator cend() const noexcept { return const_iterator(data() + _Nm); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } - const_reverse_iterator + _GLIBCXX17_CONSTEXPR const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } @@ -134,7 +136,7 @@ namespace __profile operator[](size_type __n) const noexcept { return _AT_Type::_S_ref(_M_elems, __n); } - reference + _GLIBCXX17_CONSTEXPR reference at(size_type __n) { if (__n >= _Nm) @@ -157,7 +159,7 @@ namespace __profile _AT_Type::_S_ref(_M_elems, 0)); } - reference + _GLIBCXX17_CONSTEXPR reference front() noexcept { return *begin(); } @@ -165,7 +167,7 @@ namespace __profile front() const noexcept { return _AT_Type::_S_ref(_M_elems, 0); } - reference + _GLIBCXX17_CONSTEXPR reference back() noexcept { return _Nm ? *(end() - 1) : *end(); } @@ -176,11 +178,11 @@ namespace __profile : _AT_Type::_S_ref(_M_elems, 0); } - pointer + _GLIBCXX17_CONSTEXPR pointer data() noexcept { return _AT_Type::_S_ptr(_M_elems); } - const_pointer + _GLIBCXX17_CONSTEXPR const_pointer data() const noexcept { return _AT_Type::_S_ptr(_M_elems); } }; @@ -253,20 +255,27 @@ namespace __profile } } // namespace __profile +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Tuple interface to class template array. /// tuple_size template - struct tuple_size<__profile::array<_Tp, _Nm>> + struct tuple_size> : public integral_constant { }; /// tuple_element template - struct tuple_element<_Int, __profile::array<_Tp, _Nm>> + struct tuple_element<_Int, std::__profile::array<_Tp, _Nm>> { static_assert(_Int < _Nm, "index is out of bounds"); typedef _Tp type; }; + + template + struct __is_tuple_like_impl> : true_type + { }; + +_GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // _GLIBCXX_PROFILE_ARRAY diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/base.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/base.h index 5f408a4f9..7e1a6a866 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/base.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -31,7 +31,6 @@ #ifndef _GLIBCXX_PROFILE_BASE_H #define _GLIBCXX_PROFILE_BASE_H 1 -#include #include // Profiling mode namespaces. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/bitset b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/bitset similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/bitset rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/bitset index 5d5cc3b77..3de9537cf 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/bitset +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/bitset @@ -1,6 +1,6 @@ // Profiling bitset implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/deque b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/deque similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/deque rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/deque index c0c6db2bb..db4274c22 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/deque +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/deque @@ -1,6 +1,6 @@ // Profiling deque implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -130,9 +130,7 @@ namespace __profile void swap(deque& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Base::swap(__x); } _Base& @@ -181,6 +179,7 @@ namespace __profile template inline void swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } } // namespace __profile diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/forward_list b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/forward_list similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/forward_list rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/forward_list index 295c4a5bd..e1e181d03 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/forward_list +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/forward_list @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -51,8 +51,11 @@ namespace __profile typedef typename _Base::const_iterator const_iterator; // 23.2.3.1 construct/copy/destroy: + + forward_list() = default; + explicit - forward_list(const _Alloc& __al = _Alloc()) + forward_list(const _Alloc& __al) noexcept : _Base(__al) { } forward_list(const forward_list& __list, const _Alloc& __al) @@ -105,7 +108,7 @@ namespace __profile void swap(forward_list& __fl) - noexcept( noexcept(declval<_Base>().swap(__fl)) ) + noexcept( noexcept(declval<_Base&>().swap(__fl)) ) { _Base::swap(__fl); } void @@ -205,6 +208,7 @@ namespace __profile inline void swap(forward_list<_Tp, _Alloc>& __lx, forward_list<_Tp, _Alloc>& __ly) + noexcept(noexcept(__lx.swap(__ly))) { __lx.swap(__ly); } } // namespace __profile diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler.h index c705ef8bb..89898ee57 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_algos.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_algos.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_algos.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_algos.h index 6566d1bc2..702c4793f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_algos.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_algos.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_container_size.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_container_size.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_container_size.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_container_size.h index caa9a2cc4..9ea636b01 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_container_size.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_container_size.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_hash_func.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_hash_func.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_hash_func.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_hash_func.h index c40373f6f..02f765e26 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_hash_func.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_hash_func.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_hashtable_size.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_hashtable_size.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_hashtable_size.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_hashtable_size.h index 96f0f6018..a4963df6e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_hashtable_size.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_hashtable_size.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_list_to_slist.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_list_to_slist.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_list_to_slist.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_list_to_slist.h index 874a874c0..d7acc4bbb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_list_to_slist.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_list_to_slist.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_list_to_vector.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_list_to_vector.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_list_to_vector.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_list_to_vector.h index 97995ba68..b3203ac09 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_list_to_vector.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_list_to_vector.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_map_to_unordered_map.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_map_to_unordered_map.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_map_to_unordered_map.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_map_to_unordered_map.h index c6d77b548..180519041 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_map_to_unordered_map.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_map_to_unordered_map.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_node.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_node.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_node.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_node.h index ba97d1850..1d9b9a941 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_node.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_node.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_state.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_state.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_state.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_state.h index 003c3695e..dd760db23 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_state.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_state.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_trace.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_trace.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_trace.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_trace.h index 8ef5d861c..59756fabd 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_trace.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_trace.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_vector_size.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_vector_size.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_vector_size.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_vector_size.h index 7e4469ac4..de09a666b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_vector_size.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_vector_size.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_vector_to_list.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_vector_to_list.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_vector_to_list.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_vector_to_list.h index 534ef0325..06416f348 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/impl/profiler_vector_to_list.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/impl/profiler_vector_to_list.h @@ -1,6 +1,6 @@ // -*- C++ -*- // -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/iterator_tracker.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/iterator_tracker.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/iterator_tracker.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/iterator_tracker.h index eb096a1de..cdb782231 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/iterator_tracker.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/iterator_tracker.h @@ -1,6 +1,6 @@ // Profiling iterator implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/list b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/list similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/list rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/list index e21244c01..7dc63b163 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/list +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/list @@ -1,6 +1,6 @@ // Profiling list implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -145,6 +145,12 @@ namespace __profile list(initializer_list __l, const allocator_type& __a = allocator_type()) : _Base(__l, __a) { } + + list(const list& __x, const allocator_type& __a) + : _Base(__x, __a) { } + + list(list&& __x, const allocator_type& __a) + : _Base(std::move(__x), __a) { } #endif explicit @@ -153,8 +159,8 @@ namespace __profile #if __cplusplus >= 201103L explicit - list(size_type __n) - : _Base(__n) { } + list(size_type __n, const allocator_type& __a = allocator_type()) + : _Base(__n, __a) { } list(size_type __n, const _Tp& __value, const _Allocator& __a = _Allocator()) @@ -405,9 +411,7 @@ namespace __profile void swap(list& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Base::swap(__x); this->_M_swap(__x); @@ -637,6 +641,7 @@ namespace __profile template inline void swap(list<_Tp, _Alloc>& __lhs, list<_Tp, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } } // namespace __profile diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/map b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/map similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/map rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/map index 5cea34d1d..c102f97eb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/map +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/map @@ -1,6 +1,6 @@ // Profiling map/multimap implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/map.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/map.h similarity index 83% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/map.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/map.h index 1549d3dbd..f66401e42 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/map.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/map.h @@ -1,6 +1,6 @@ // Profiling map implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -405,9 +405,7 @@ namespace __profile void swap(map& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Base::swap(__x); this->_M_swap(__x); @@ -429,6 +427,18 @@ namespace __profile return iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + find(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return { _Base::find(__x), this }; + } +#endif + const_iterator find(const key_type& __x) const { @@ -436,6 +446,18 @@ namespace __profile return const_iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + find(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return { _Base::find(__x), this }; + } +#endif + size_type count(const key_type& __x) const { @@ -443,6 +465,18 @@ namespace __profile return _Base::count(__x); } +#if __cplusplus > 201103L + template::type> + size_type + count(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return _Base::count(__x); + } +#endif + iterator lower_bound(const key_type& __x) { @@ -451,6 +485,19 @@ namespace __profile return iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + lower_bound(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::lower_bound(__x), this }; + } +#endif + const_iterator lower_bound(const key_type& __x) const { @@ -459,6 +506,19 @@ namespace __profile return const_iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + lower_bound(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::lower_bound(__x), this }; + } +#endif + iterator upper_bound(const key_type& __x) { @@ -467,6 +527,19 @@ namespace __profile return iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + upper_bound(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::upper_bound(__x), this }; + } +#endif + const_iterator upper_bound(const key_type& __x) const { @@ -475,6 +548,19 @@ namespace __profile return const_iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + upper_bound(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::upper_bound(__x), this }; + } +#endif + std::pair equal_range(const key_type& __x) { @@ -485,6 +571,19 @@ namespace __profile iterator(__base_ret.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + std::pair equal_range(const key_type& __x) const { @@ -495,6 +594,19 @@ namespace __profile const_iterator(__base_ret.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + _Base& _M_base() _GLIBCXX_NOEXCEPT { return *this; } @@ -584,6 +696,7 @@ namespace __profile inline void swap(map<_Key, _Tp, _Compare, _Allocator>& __lhs, map<_Key, _Tp, _Compare, _Allocator>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } } // namespace __profile diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/multimap.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/multimap.h similarity index 83% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/multimap.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/multimap.h index 2ed9fcb13..86d1cf829 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/multimap.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/multimap.h @@ -1,6 +1,6 @@ // Profiling multimap implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -364,9 +364,7 @@ namespace __profile void swap(multimap& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { std::swap(this->_M_map2umap_info, __x._M_map2umap_info); _Base::swap(__x); @@ -388,6 +386,18 @@ namespace __profile return iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + find(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return { _Base::find(__x), this }; + } +#endif + const_iterator find(const key_type& __x) const { @@ -395,6 +405,18 @@ namespace __profile return const_iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + find(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return { _Base::find(__x), this }; + } +#endif + size_type count(const key_type& __x) const { @@ -402,6 +424,18 @@ namespace __profile return _Base::count(__x); } +#if __cplusplus > 201103L + template::type> + size_type + count(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return _Base::count(__x); + } +#endif + iterator lower_bound(const key_type& __x) { @@ -410,6 +444,19 @@ namespace __profile return iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + lower_bound(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::lower_bound(__x), this }; + } +#endif + const_iterator lower_bound(const key_type& __x) const { @@ -418,6 +465,19 @@ namespace __profile return const_iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + lower_bound(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::lower_bound(__x), this }; + } +#endif + iterator upper_bound(const key_type& __x) { @@ -426,6 +486,19 @@ namespace __profile return iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + upper_bound(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::upper_bound(__x), this }; + } +#endif + const_iterator upper_bound(const key_type& __x) const { @@ -434,6 +507,19 @@ namespace __profile return const_iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + const_iterator + upper_bound(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::upper_bound(__x), this }; + } +#endif + std::pair equal_range(const key_type& __x) { @@ -444,6 +530,19 @@ namespace __profile iterator(__base_ret.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + std::pair equal_range(const key_type& __x) const { @@ -454,6 +553,19 @@ namespace __profile const_iterator(__base_ret.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + _Base& _M_base() _GLIBCXX_NOEXCEPT { return *this; } @@ -542,6 +654,7 @@ namespace __profile inline void swap(multimap<_Key, _Tp, _Compare, _Allocator>& __lhs, multimap<_Key, _Tp, _Compare, _Allocator>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } } // namespace __profile diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/multiset.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/multiset.h similarity index 83% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/multiset.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/multiset.h index f2d2f3925..a545b5260 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/multiset.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/multiset.h @@ -1,6 +1,6 @@ // Profiling multiset implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -226,9 +226,7 @@ namespace __profile void swap(multiset& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Base::swap(__x); this->_M_swap(__x); @@ -379,6 +377,18 @@ namespace __profile return _Base::count(__x); } +#if __cplusplus > 201103L + template::type> + size_type + count(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return _Base::count(__x); + } +#endif + // multiset operations: iterator find(const key_type& __x) @@ -396,6 +406,28 @@ namespace __profile return const_iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + find(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return { _Base::find(__x), this }; + } + + template::type> + const_iterator + find(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return { _Base::find(__x), this }; + } +#endif + iterator lower_bound(const key_type& __x) { @@ -413,6 +445,30 @@ namespace __profile return const_iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + lower_bound(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::lower_bound(__x), this }; + } + + template::type> + const_iterator + lower_bound(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::lower_bound(__x), this }; + } +#endif + iterator upper_bound(const key_type& __x) { @@ -431,6 +487,30 @@ namespace __profile return const_iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + upper_bound(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::upper_bound(__x), this }; + } + + template::type> + const_iterator + upper_bound(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::upper_bound(__x), this }; + } +#endif + std::pair equal_range(const key_type& __x) { @@ -453,6 +533,30 @@ namespace __profile const_iterator(__base_ret.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } + + template::type> + std::pair + equal_range(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + _Base& _M_base() _GLIBCXX_NOEXCEPT { return *this; } @@ -534,6 +638,7 @@ namespace __profile void swap(multiset<_Key, _Compare, _Allocator>& __x, multiset<_Key, _Compare, _Allocator>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { return __x.swap(__y); } } // namespace __profile diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/ordered_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/ordered_base.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/ordered_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/ordered_base.h index 7c91bc24d..d35b82f1c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/ordered_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/ordered_base.h @@ -1,6 +1,6 @@ // Profiling unordered containers implementation details -*- C++ -*- -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/set b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/set similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/set rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/set index 9f342bc93..7c88d59a8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/set +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/set @@ -1,6 +1,6 @@ // Profiling set/multiset implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/set.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/set.h similarity index 82% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/set.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/set.h index a05d10b7f..723e7da9c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/set.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/set.h @@ -1,6 +1,6 @@ // Profiling set implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -223,9 +223,7 @@ namespace __profile void swap(set& __x) -#if __cplusplus >= 201103L - noexcept( noexcept(declval<_Base>().swap(__x)) ) -#endif + _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) ) { _Base::swap(__x); this->_M_swap(__x); @@ -369,6 +367,18 @@ namespace __profile return _Base::count(__x); } +#if __cplusplus > 201103L + template::type> + size_type + count(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return _Base::count(__x); + } +#endif + // set operations: iterator find(const key_type& __x) @@ -384,6 +394,28 @@ namespace __profile return const_iterator(_Base::find(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + find(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return { _Base::find(__x), this }; + } + + template::type> + const_iterator + find(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + return { _Base::find(__x), this }; + } +#endif + iterator lower_bound(const key_type& __x) { @@ -400,6 +432,30 @@ namespace __profile return const_iterator(_Base::lower_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + lower_bound(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::lower_bound(__x), this }; + } + + template::type> + const_iterator + lower_bound(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::lower_bound(__x), this }; + } +#endif + iterator upper_bound(const key_type& __x) { @@ -416,6 +472,30 @@ namespace __profile return const_iterator(_Base::upper_bound(__x), this); } +#if __cplusplus > 201103L + template::type> + iterator + upper_bound(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::upper_bound(__x), this }; + } + + template::type> + const_iterator + upper_bound(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + __profcxx_map2umap_invalidate(this->_M_map2umap_info); + return { _Base::upper_bound(__x), this }; + } +#endif + std::pair equal_range(const key_type& __x) { @@ -436,6 +516,30 @@ namespace __profile const_iterator(__base_ret.second, this)); } +#if __cplusplus > 201103L + template::type> + std::pair + equal_range(const _Kt& __x) + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } + + template::type> + std::pair + equal_range(const _Kt& __x) const + { + __profcxx_map2umap_find(this->_M_map2umap_info, this->size()); + auto __res = _Base::equal_range(__x); + return { { __res.first, this }, { __res.second, this } }; + } +#endif + _Base& _M_base() _GLIBCXX_NOEXCEPT { return *this; } @@ -515,6 +619,7 @@ namespace __profile void swap(set<_Key, _Compare, _Allocator>& __x, set<_Key, _Compare, _Allocator>& __y) + _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { return __x.swap(__y); } } // namespace __profile diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/unordered_base.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/unordered_base.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/unordered_base.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/unordered_base.h index bae5b402a..f50111afb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/unordered_base.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/unordered_base.h @@ -1,6 +1,6 @@ // Profiling unordered containers implementation details -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/unordered_map b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/unordered_map similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/unordered_map rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/unordered_map index 480fabad1..32b0464bc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/unordered_map +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/unordered_map @@ -1,6 +1,6 @@ // Profiling unordered_map/unordered_multimap implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -299,6 +299,7 @@ namespace __profile inline void swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template& __x, unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template& __x, unordered_set<_Key, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template @@ -534,6 +535,7 @@ namespace __profile inline void swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/vector b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/vector similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/profile/vector rename to devkitARM/arm-none-eabi/include/c++/7.1.0/profile/vector index fdc73ef58..458f49ee1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/profile/vector +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/profile/vector @@ -1,6 +1,6 @@ // Profiling vector implementation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -547,20 +547,9 @@ namespace __profile template inline void swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>& __rhs) + _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } -#if __cplusplus >= 201103L - template - inline void - swap(vector<_Tp, _Alloc>&& __lhs, vector<_Tp, _Alloc>& __rhs) - { __lhs.swap(__rhs); } - - template - inline void - swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>&& __rhs) - { __lhs.swap(__rhs); } -#endif - } // namespace __profile #if __cplusplus >= 201103L diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/queue b/devkitARM/arm-none-eabi/include/c++/7.1.0/queue similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/queue rename to devkitARM/arm-none-eabi/include/c++/7.1.0/queue index b4fd66243..28e9c4405 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/queue +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/queue @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/random b/devkitARM/arm-none-eabi/include/c++/7.1.0/random similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/random rename to devkitARM/arm-none-eabi/include/c++/7.1.0/random index eecf3f0bf..aa5852e3a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/random +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/random @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/ratio b/devkitARM/arm-none-eabi/include/c++/7.1.0/ratio similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/ratio rename to devkitARM/arm-none-eabi/include/c++/7.1.0/ratio index e5e6f12b0..421f6a874 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/ratio +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/ratio @@ -1,16 +1,16 @@ // ratio -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional @@ -94,11 +94,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static const uintmax_t __b0 = __static_abs<_Qn>::value % __c; static const uintmax_t __b1 = __static_abs<_Qn>::value / __c; - static_assert(__a1 == 0 || __b1 == 0, + static_assert(__a1 == 0 || __b1 == 0, "overflow in multiplication"); - static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1), + static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1), "overflow in multiplication"); - static_assert(__b0 * __a0 <= __INTMAX_MAX__, + static_assert(__b0 * __a0 <= __INTMAX_MAX__, "overflow in multiplication"); static_assert((__a0 * __b1 + __b0 * __a1) * __c <= __INTMAX_MAX__ - __b0 * __a0, @@ -257,7 +257,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * std::ratio<7,-21>::num == -1; * std::ratio<7,-21>::den == 3; * @endcode - * + * */ template struct ratio @@ -340,7 +340,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct ratio_equal : integral_constant { }; - + /// ratio_not_equal template struct ratio_not_equal @@ -354,7 +354,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __ratio_less_impl_1 : integral_constant::value> - { }; + { }; template::type { }; - + /// ratio_less_equal template struct ratio_less_equal : integral_constant::value> { }; - + /// ratio_greater template struct ratio_greater @@ -401,6 +401,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : integral_constant::value> { }; +#if __cplusplus > 201402L + template + inline constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value; + template + inline constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; + template + inline constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value; + template + inline constexpr bool ratio_less_equal_v = + ratio_less_equal<_R1, _R2>::value; + template + inline constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value; + template + inline constexpr bool ratio_greater_equal_v + = ratio_greater_equal<_R1, _R2>::value; +#endif // C++17 + template= 0), bool = (_R2::num >= 0), diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/regex b/devkitARM/arm-none-eabi/include/c++/7.1.0/regex similarity index 93% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/regex rename to devkitARM/arm-none-eabi/include/c++/7.1.0/regex index 3dff372d7..777edd96d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/regex +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/regex @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -37,7 +37,6 @@ #include #include -#include #ifdef _GLIBCXX_DEBUG # include #endif @@ -53,6 +52,8 @@ #include #include +#include +#include #include #include #include diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/scoped_allocator b/devkitARM/arm-none-eabi/include/c++/7.1.0/scoped_allocator similarity index 79% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/scoped_allocator rename to devkitARM/arm-none-eabi/include/c++/7.1.0/scoped_allocator index d163edd10..725f54714 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/scoped_allocator +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/scoped_allocator @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2011-2015 Free Software Foundation, Inc. +// Copyright (C) 2011-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -43,58 +43,46 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION - template class _Pred, typename... _Allocs> - struct __any_of; - - template class _Pred, typename _Alloc, typename... _Allocs> - struct __any_of<_Pred, _Alloc, _Allocs...> - : __or_<_Pred<_Alloc>, __any_of<_Pred, _Allocs...>> - { }; - - template class _Pred, typename _Alloc> - struct __any_of<_Pred, _Alloc> - : _Pred<_Alloc> - { }; - /** * @addtogroup allocators * @{ */ template - struct __propagate_on_copy - : allocator_traits<_Alloc>::propagate_on_container_copy_assignment - { }; - template - struct __propagate_on_move - : allocator_traits<_Alloc>::propagate_on_container_move_assignment - { }; - template - struct __propagate_on_swap - : allocator_traits<_Alloc>::propagate_on_container_swap - { }; + using __outer_allocator_t + = decltype(std::declval<_Alloc>().outer_allocator()); + template + struct __outermost_type + { + using type = _Alloc; + static type& _S_outermost(_Alloc& __a) { return __a; } + }; template - inline auto - __do_outermost(_Alloc& __a, _Alloc*) -> decltype(__a.outer_allocator()) - { return __a.outer_allocator(); } + struct __outermost_type<_Alloc, __void_t<__outer_allocator_t<_Alloc>>> + : __outermost_type< + typename remove_reference<__outer_allocator_t<_Alloc>>::type + > + { + using __base = __outermost_type< + typename remove_reference<__outer_allocator_t<_Alloc>>::type + >; + + static typename __base::type& + _S_outermost(_Alloc& __a) + { return __base::_S_outermost(__a.outer_allocator()); } + }; template - inline _Alloc& - __do_outermost(_Alloc& __a, ...) - { return __a; } - - // TODO: make recursive (see note in 20.12.4/1) - template - inline auto - __outermost(_Alloc& __a) -> decltype(__do_outermost(__a, &__a)) - { return __do_outermost(__a, &__a); } + inline typename __outermost_type<_Alloc>::type& + __outermost(_Alloc& __a) + { return __outermost_type<_Alloc>::_S_outermost(__a); } template class scoped_allocator_adaptor; - template + template struct __inner_type_impl; template @@ -107,25 +95,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __inner_type_impl(__inner_type_impl&&) = default; __inner_type_impl& operator=(const __inner_type_impl&) = default; __inner_type_impl& operator=(__inner_type_impl&&) = default; - + template __inner_type_impl(const __inner_type_impl<_Alloc>& __other) { } - + template __inner_type_impl(__inner_type_impl<_Alloc>&& __other) { } - - __type& + + __type& _M_get(__type* __p) noexcept { return *__p; } - const __type& + const __type& _M_get(const __type* __p) const noexcept { return *__p; } - - tuple<> + + tuple<> _M_tie() const noexcept { return tuple<>(); } - - bool + + bool operator==(const __inner_type_impl&) const noexcept { return true; } }; @@ -134,17 +122,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __inner_type_impl<_Outer, _InnerHead, _InnerTail...> { typedef scoped_allocator_adaptor<_InnerHead, _InnerTail...> __type; - + __inner_type_impl() = default; __inner_type_impl(const __inner_type_impl&) = default; __inner_type_impl(__inner_type_impl&&) = default; __inner_type_impl& operator=(const __inner_type_impl&) = default; __inner_type_impl& operator=(__inner_type_impl&&) = default; - + template __inner_type_impl(const __inner_type_impl<_Allocs...>& __other) : _M_inner(__other._M_inner) { } - + template __inner_type_impl(__inner_type_impl<_Allocs...>&& __other) : _M_inner(std::move(__other._M_inner)) { } @@ -154,24 +142,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __inner_type_impl(_Args&&... __args) : _M_inner(std::forward<_Args>(__args)...) { } - __type& + __type& _M_get(void*) noexcept { return _M_inner; } - - const __type& + + const __type& _M_get(const void*) const noexcept { return _M_inner; } - - tuple + + tuple _M_tie() const noexcept { return _M_inner._M_tie(); } - - bool + + bool operator==(const __inner_type_impl& __other) const noexcept { return _M_inner == __other._M_inner; } - + private: template friend class __inner_type_impl; template friend class scoped_allocator_adaptor; - + __type _M_inner; }; @@ -195,16 +183,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_tie() const noexcept { return std::tuple_cat(std::tie(outer_allocator()), _M_inner._M_tie()); } - template - using __outermost_type = typename - std::decay()))>::type; - template using __outermost_alloc_traits - = allocator_traits<__outermost_type<_Alloc>>; - + = allocator_traits::type>; + template - void + void _M_construct(__uses_alloc0, _Tp* __p, _Args&&... __args) { typedef __outermost_alloc_traits _O_traits; @@ -216,7 +200,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef __uses_alloc2 __uses_alloc2_; template - void + void _M_construct(__uses_alloc1_, _Tp* __p, _Args&&... __args) { typedef __outermost_alloc_traits _O_traits; @@ -226,7 +210,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - void + void _M_construct(__uses_alloc2_, _Tp* __p, _Args&&... __args) { typedef __outermost_alloc_traits _O_traits; @@ -251,6 +235,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_inner(_S_select_on_copy(std::get<_Indices+1>(__refs))...) { } + // Used to constrain constructors to disallow invalid conversions. + template + using _Constructible = typename enable_if< + is_constructible<_OuterAlloc, _Alloc>::value + >::type; + public: typedef _OuterAlloc outer_allocator_type; typedef typename __inner_type::__type inner_allocator_type; @@ -263,15 +253,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename __traits::void_pointer void_pointer; typedef typename __traits::const_void_pointer const_void_pointer; - typedef typename conditional< - __any_of<__propagate_on_copy, _OuterAlloc, _InnerAllocs...>::value, - true_type, false_type>::type propagate_on_container_copy_assignment; - typedef typename conditional< - __any_of<__propagate_on_move, _OuterAlloc, _InnerAllocs...>::value, - true_type, false_type>::type propagate_on_container_move_assignment; - typedef typename conditional< - __any_of<__propagate_on_swap, _OuterAlloc, _InnerAllocs...>::value, - true_type, false_type>::type propagate_on_container_swap; + typedef typename __or_< + typename __traits::propagate_on_container_copy_assignment, + typename allocator_traits<_InnerAllocs>:: + propagate_on_container_copy_assignment...>::type + propagate_on_container_copy_assignment; + + typedef typename __or_< + typename __traits::propagate_on_container_move_assignment, + typename allocator_traits<_InnerAllocs>:: + propagate_on_container_move_assignment...>::type + propagate_on_container_move_assignment; + + typedef typename __or_< + typename __traits::propagate_on_container_swap, + typename allocator_traits<_InnerAllocs>:: + propagate_on_container_swap...>::type + propagate_on_container_swap; + + typedef typename __and_< + typename __traits::is_always_equal, + typename allocator_traits<_InnerAllocs>::is_always_equal...>::type + is_always_equal; template struct rebind @@ -283,7 +286,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION scoped_allocator_adaptor() : _OuterAlloc(), _M_inner() { } - template + template> scoped_allocator_adaptor(_Outer2&& __outer, const _InnerAllocs&... __inner) : _OuterAlloc(std::forward<_Outer2>(__outer)), @@ -300,14 +303,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_inner(std::move(__other._M_inner)) { } - template + template> scoped_allocator_adaptor( const scoped_allocator_adaptor<_Outer2, _InnerAllocs...>& __other) : _OuterAlloc(__other.outer_allocator()), _M_inner(__other._M_inner) { } - template + template> scoped_allocator_adaptor( scoped_allocator_adaptor<_Outer2, _InnerAllocs...>&& __other) : _OuterAlloc(std::move(__other.outer_allocator())), @@ -366,10 +369,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION = __use_alloc<_T1, inner_allocator_type, _Args1...>(__inner); auto __y_use_tag = __use_alloc<_T2, inner_allocator_type, _Args2...>(__inner); + typename _Build_index_tuple::__type __x_indices; + typename _Build_index_tuple::__type __y_indices; typedef __outermost_alloc_traits _O_traits; _O_traits::construct(__outermost(*this), __p, piecewise_construct, - _M_construct_p(__x_use_tag, __x), - _M_construct_p(__y_use_tag, __y)); + _M_construct_p(__x_use_tag, __x_indices, __x), + _M_construct_p(__y_use_tag, __y_indices, __y)); } template @@ -425,26 +430,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const scoped_allocator_adaptor<_OutA2, _InA...>& __b) noexcept; private: - template - _Tuple&& - _M_construct_p(__uses_alloc0, _Tuple& __t) + template + tuple<_Args&&...> + _M_construct_p(__uses_alloc0, _Ind, tuple<_Args...>& __t) { return std::move(__t); } - template - std::tuple - _M_construct_p(__uses_alloc1_, std::tuple<_Args...>& __t) + template + tuple + _M_construct_p(__uses_alloc1_, _Index_tuple<_Ind...>, + tuple<_Args...>& __t) { - typedef std::tuple _Tuple; - return std::tuple_cat(_Tuple(allocator_arg, inner_allocator()), - std::move(__t)); + return { allocator_arg, inner_allocator(), + std::get<_Ind>(std::move(__t))... + }; } - template - std::tuple<_Args..., inner_allocator_type&> - _M_construct_p(__uses_alloc2_, std::tuple<_Args...>& __t) + template + tuple<_Args&&..., inner_allocator_type&> + _M_construct_p(__uses_alloc2_, _Index_tuple<_Ind...>, + tuple<_Args...>& __t) { - typedef std::tuple _Tuple; - return std::tuple_cat(std::move(__t), _Tuple(inner_allocator())); + return { std::get<_Ind>(std::move(__t))..., inner_allocator() }; } }; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/set b/devkitARM/arm-none-eabi/include/c++/7.1.0/set similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/set rename to devkitARM/arm-none-eabi/include/c++/7.1.0/set index 1340c6d7e..3453a6ef6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/set +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/set @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/shared_mutex b/devkitARM/arm-none-eabi/include/c++/7.1.0/shared_mutex similarity index 80% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/shared_mutex rename to devkitARM/arm-none-eabi/include/c++/7.1.0/shared_mutex index 7b216a5fd..ff116c0e3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/shared_mutex +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/shared_mutex @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2013-2015 Free Software Foundation, Inc. +// Copyright (C) 2013-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,7 +36,6 @@ #else #include -#include #include #include @@ -52,25 +51,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef _GLIBCXX_USE_C99_STDINT_TR1 #ifdef _GLIBCXX_HAS_GTHREADS -#define __cpp_lib_shared_timed_mutex 201402 +#if __cplusplus > 201402L +#define __cpp_lib_shared_mutex 201505 + class shared_mutex; +#endif - /// shared_timed_mutex - class shared_timed_mutex +#define __cpp_lib_shared_timed_mutex 201402 + class shared_timed_mutex; + +#if _GLIBCXX_USE_PTHREAD_RWLOCK_T + /// A shared mutex type implemented using pthread_rwlock_t. + class __shared_mutex_pthread { -#if _GLIBCXX_USE_PTHREAD_RWLOCK_T && _GTHREAD_USE_MUTEX_TIMEDLOCK - typedef chrono::system_clock __clock_t; + friend class shared_timed_mutex; #ifdef PTHREAD_RWLOCK_INITIALIZER pthread_rwlock_t _M_rwlock = PTHREAD_RWLOCK_INITIALIZER; public: - shared_timed_mutex() = default; - ~shared_timed_mutex() = default; + __shared_mutex_pthread() = default; + ~__shared_mutex_pthread() = default; #else pthread_rwlock_t _M_rwlock; public: - shared_timed_mutex() + __shared_mutex_pthread() { int __ret = pthread_rwlock_init(&_M_rwlock, NULL); if (__ret == ENOMEM) @@ -80,21 +85,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else if (__ret == EPERM) __throw_system_error(int(errc::operation_not_permitted)); // Errors not handled: EBUSY, EINVAL - _GLIBCXX_DEBUG_ASSERT(__ret == 0); + __glibcxx_assert(__ret == 0); } - ~shared_timed_mutex() + ~__shared_mutex_pthread() { int __ret __attribute((__unused__)) = pthread_rwlock_destroy(&_M_rwlock); // Errors not handled: EBUSY, EINVAL - _GLIBCXX_DEBUG_ASSERT(__ret == 0); + __glibcxx_assert(__ret == 0); } #endif - shared_timed_mutex(const shared_timed_mutex&) = delete; - shared_timed_mutex& operator=(const shared_timed_mutex&) = delete; - - // Exclusive ownership + __shared_mutex_pthread(const __shared_mutex_pthread&) = delete; + __shared_mutex_pthread& operator=(const __shared_mutex_pthread&) = delete; void lock() @@ -103,7 +106,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__ret == EDEADLK) __throw_system_error(int(errc::resource_deadlock_would_occur)); // Errors not handled: EINVAL - _GLIBCXX_DEBUG_ASSERT(__ret == 0); + __glibcxx_assert(__ret == 0); } bool @@ -112,58 +115,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION int __ret = pthread_rwlock_trywrlock(&_M_rwlock); if (__ret == EBUSY) return false; // Errors not handled: EINVAL - _GLIBCXX_DEBUG_ASSERT(__ret == 0); + __glibcxx_assert(__ret == 0); return true; } - template - bool - try_lock_for(const chrono::duration<_Rep, _Period>& __rel_time) - { - return try_lock_until(__clock_t::now() + __rel_time); - } - - template - bool - try_lock_until(const chrono::time_point<__clock_t, _Duration>& __atime) - { - auto __s = chrono::time_point_cast(__atime); - auto __ns = chrono::duration_cast(__atime - __s); - - __gthread_time_t __ts = - { - static_cast(__s.time_since_epoch().count()), - static_cast(__ns.count()) - }; - - int __ret = pthread_rwlock_timedwrlock(&_M_rwlock, &__ts); - // On self-deadlock, we just fail to acquire the lock. Technically, - // the program violated the precondition. - if (__ret == ETIMEDOUT || __ret == EDEADLK) - return false; - // Errors not handled: EINVAL - _GLIBCXX_DEBUG_ASSERT(__ret == 0); - return true; - } - - template - bool - try_lock_until(const chrono::time_point<_Clock, _Duration>& __abs_time) - { - // DR 887 - Sync unknown clock to known clock. - const typename _Clock::time_point __c_entry = _Clock::now(); - const __clock_t::time_point __s_entry = __clock_t::now(); - const auto __delta = __abs_time - __c_entry; - const auto __s_atime = __s_entry + __delta; - return try_lock_until(__s_atime); - } - void unlock() { int __ret __attribute((__unused__)) = pthread_rwlock_unlock(&_M_rwlock); // Errors not handled: EPERM, EBUSY, EINVAL - _GLIBCXX_DEBUG_ASSERT(__ret == 0); + __glibcxx_assert(__ret == 0); } // Shared ownership @@ -182,7 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__ret == EDEADLK) __throw_system_error(int(errc::resource_deadlock_would_occur)); // Errors not handled: EINVAL - _GLIBCXX_DEBUG_ASSERT(__ret == 0); + __glibcxx_assert(__ret == 0); } bool @@ -194,78 +155,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // an exception. if (__ret == EBUSY || __ret == EAGAIN) return false; // Errors not handled: EINVAL - _GLIBCXX_DEBUG_ASSERT(__ret == 0); + __glibcxx_assert(__ret == 0); return true; } - template - bool - try_lock_shared_for(const chrono::duration<_Rep, _Period>& __rel_time) - { - return try_lock_shared_until(__clock_t::now() + __rel_time); - } - - template - bool - try_lock_shared_until(const chrono::time_point<__clock_t, - _Duration>& __atime) - { - auto __s = chrono::time_point_cast(__atime); - auto __ns = chrono::duration_cast(__atime - __s); - - __gthread_time_t __ts = - { - static_cast(__s.time_since_epoch().count()), - static_cast(__ns.count()) - }; - - int __ret; - // Unlike for lock(), we are not allowed to throw an exception so if - // the maximum number of read locks has been exceeded, or we would - // deadlock, we just try to acquire the lock again (and will time out - // eventually). - // In cases where we would exceed the maximum number of read locks - // throughout the whole time until the timeout, we will fail to - // acquire the lock even if it would be logically free; however, this - // is allowed by the standard, and we made a "strong effort" - // (see C++14 30.4.1.4p26). - // For cases where the implementation detects a deadlock we - // intentionally block and timeout so that an early return isn't - // mistaken for a spurious failure, which might help users realise - // there is a deadlock. - do - __ret = pthread_rwlock_timedrdlock(&_M_rwlock, &__ts); - while (__ret == EAGAIN || __ret == EDEADLK); - if (__ret == ETIMEDOUT) - return false; - // Errors not handled: EINVAL - _GLIBCXX_DEBUG_ASSERT(__ret == 0); - return true; - } - - template - bool - try_lock_shared_until(const chrono::time_point<_Clock, - _Duration>& __abs_time) - { - // DR 887 - Sync unknown clock to known clock. - const typename _Clock::time_point __c_entry = _Clock::now(); - const __clock_t::time_point __s_entry = __clock_t::now(); - const auto __delta = __abs_time - __c_entry; - const auto __s_atime = __s_entry + __delta; - return try_lock_shared_until(__s_atime); - } - void unlock_shared() { unlock(); } -#else // ! (_GLIBCXX_USE_PTHREAD_RWLOCK_T && _GTHREAD_USE_MUTEX_TIMEDLOCK) + void* native_handle() { return &_M_rwlock; } + }; +#endif - // Must use the same clock as condition_variable - typedef chrono::system_clock __clock_t; +#if ! (_GLIBCXX_USE_PTHREAD_RWLOCK_T && _GTHREAD_USE_MUTEX_TIMEDLOCK) + /// A shared mutex type implemented using std::condition_variable. + class __shared_mutex_cv + { + friend class shared_timed_mutex; // Based on Howard Hinnant's reference implementation from N2406. @@ -312,15 +220,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION unsigned _M_readers() const { return _M_state & _S_max_readers; } public: - shared_timed_mutex() : _M_state(0) {} + __shared_mutex_cv() : _M_state(0) {} - ~shared_timed_mutex() + ~__shared_mutex_cv() { - _GLIBCXX_DEBUG_ASSERT( _M_state == 0 ); + __glibcxx_assert( _M_state == 0 ); } - shared_timed_mutex(const shared_timed_mutex&) = delete; - shared_timed_mutex& operator=(const shared_timed_mutex&) = delete; + __shared_mutex_cv(const __shared_mutex_cv&) = delete; + __shared_mutex_cv& operator=(const __shared_mutex_cv&) = delete; // Exclusive ownership @@ -347,40 +255,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return false; } - template - bool - try_lock_for(const chrono::duration<_Rep, _Period>& __rel_time) - { - return try_lock_until(__clock_t::now() + __rel_time); - } - - template - bool - try_lock_until(const chrono::time_point<_Clock, _Duration>& __abs_time) - { - unique_lock __lk(_M_mut); - if (!_M_gate1.wait_until(__lk, __abs_time, - [=]{ return !_M_write_entered(); })) - { - return false; - } - _M_state |= _S_write_entered; - if (!_M_gate2.wait_until(__lk, __abs_time, - [=]{ return _M_readers() == 0; })) - { - _M_state ^= _S_write_entered; - // Wake all threads blocked while the write-entered flag was set. - _M_gate1.notify_all(); - return false; - } - return true; - } - void unlock() { lock_guard __lk(_M_mut); - _GLIBCXX_DEBUG_ASSERT( _M_write_entered() ); + __glibcxx_assert( _M_write_entered() ); _M_state = 0; // call notify_all() while mutex is held so that another thread can't // lock and unlock the mutex then destroy *this before we make the call. @@ -411,33 +290,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return false; } - template - bool - try_lock_shared_for(const chrono::duration<_Rep, _Period>& __rel_time) - { - return try_lock_shared_until(__clock_t::now() + __rel_time); - } - - template - bool - try_lock_shared_until(const chrono::time_point<_Clock, - _Duration>& __abs_time) - { - unique_lock __lk(_M_mut); - if (!_M_gate1.wait_until(__lk, __abs_time, - [=]{ return _M_state < _S_max_readers; })) - { - return false; - } - ++_M_state; - return true; - } - void unlock_shared() { lock_guard __lk(_M_mut); - _GLIBCXX_DEBUG_ASSERT( _M_readers() > 0 ); + __glibcxx_assert( _M_readers() > 0 ); auto __prev = _M_state--; if (_M_write_entered()) { @@ -455,6 +312,228 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_gate1.notify_one(); } } + }; +#endif + +#if __cplusplus > 201402L + /// The standard shared mutex type. + class shared_mutex + { + public: + shared_mutex() = default; + ~shared_mutex() = default; + + shared_mutex(const shared_mutex&) = delete; + shared_mutex& operator=(const shared_mutex&) = delete; + + // Exclusive ownership + + void lock() { _M_impl.lock(); } + bool try_lock() { return _M_impl.try_lock(); } + void unlock() { _M_impl.unlock(); } + + // Shared ownership + + void lock_shared() { _M_impl.lock_shared(); } + bool try_lock_shared() { return _M_impl.try_lock_shared(); } + void unlock_shared() { _M_impl.unlock_shared(); } + +#if _GLIBCXX_USE_PTHREAD_RWLOCK_T + typedef void* native_handle_type; + native_handle_type native_handle() { return _M_impl.native_handle(); } + + private: + __shared_mutex_pthread _M_impl; +#else + private: + __shared_mutex_cv _M_impl; +#endif + }; +#endif // C++17 + +#if _GLIBCXX_USE_PTHREAD_RWLOCK_T && _GTHREAD_USE_MUTEX_TIMEDLOCK + using __shared_timed_mutex_base = __shared_mutex_pthread; +#else + using __shared_timed_mutex_base = __shared_mutex_cv; +#endif + + /// The standard shared timed mutex type. + class shared_timed_mutex + : private __shared_timed_mutex_base + { + using _Base = __shared_timed_mutex_base; + + // Must use the same clock as condition_variable for __shared_mutex_cv. + typedef chrono::system_clock __clock_t; + + public: + shared_timed_mutex() = default; + ~shared_timed_mutex() = default; + + shared_timed_mutex(const shared_timed_mutex&) = delete; + shared_timed_mutex& operator=(const shared_timed_mutex&) = delete; + + // Exclusive ownership + + void lock() { _Base::lock(); } + bool try_lock() { return _Base::try_lock(); } + void unlock() { _Base::unlock(); } + + template + bool + try_lock_for(const chrono::duration<_Rep, _Period>& __rel_time) + { + return try_lock_until(__clock_t::now() + __rel_time); + } + + // Shared ownership + + void lock_shared() { _Base::lock_shared(); } + bool try_lock_shared() { return _Base::try_lock_shared(); } + void unlock_shared() { _Base::unlock_shared(); } + + template + bool + try_lock_shared_for(const chrono::duration<_Rep, _Period>& __rel_time) + { + return try_lock_shared_until(__clock_t::now() + __rel_time); + } + +#if _GLIBCXX_USE_PTHREAD_RWLOCK_T && _GTHREAD_USE_MUTEX_TIMEDLOCK + + // Exclusive ownership + + template + bool + try_lock_until(const chrono::time_point<__clock_t, _Duration>& __atime) + { + auto __s = chrono::time_point_cast(__atime); + auto __ns = chrono::duration_cast(__atime - __s); + + __gthread_time_t __ts = + { + static_cast(__s.time_since_epoch().count()), + static_cast(__ns.count()) + }; + + int __ret = pthread_rwlock_timedwrlock(&_M_rwlock, &__ts); + // On self-deadlock, we just fail to acquire the lock. Technically, + // the program violated the precondition. + if (__ret == ETIMEDOUT || __ret == EDEADLK) + return false; + // Errors not handled: EINVAL + __glibcxx_assert(__ret == 0); + return true; + } + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __abs_time) + { + // DR 887 - Sync unknown clock to known clock. + const typename _Clock::time_point __c_entry = _Clock::now(); + const __clock_t::time_point __s_entry = __clock_t::now(); + const auto __delta = __abs_time - __c_entry; + const auto __s_atime = __s_entry + __delta; + return try_lock_until(__s_atime); + } + + // Shared ownership + + template + bool + try_lock_shared_until(const chrono::time_point<__clock_t, + _Duration>& __atime) + { + auto __s = chrono::time_point_cast(__atime); + auto __ns = chrono::duration_cast(__atime - __s); + + __gthread_time_t __ts = + { + static_cast(__s.time_since_epoch().count()), + static_cast(__ns.count()) + }; + + int __ret; + // Unlike for lock(), we are not allowed to throw an exception so if + // the maximum number of read locks has been exceeded, or we would + // deadlock, we just try to acquire the lock again (and will time out + // eventually). + // In cases where we would exceed the maximum number of read locks + // throughout the whole time until the timeout, we will fail to + // acquire the lock even if it would be logically free; however, this + // is allowed by the standard, and we made a "strong effort" + // (see C++14 30.4.1.4p26). + // For cases where the implementation detects a deadlock we + // intentionally block and timeout so that an early return isn't + // mistaken for a spurious failure, which might help users realise + // there is a deadlock. + do + __ret = pthread_rwlock_timedrdlock(&_M_rwlock, &__ts); + while (__ret == EAGAIN || __ret == EDEADLK); + if (__ret == ETIMEDOUT) + return false; + // Errors not handled: EINVAL + __glibcxx_assert(__ret == 0); + return true; + } + + template + bool + try_lock_shared_until(const chrono::time_point<_Clock, + _Duration>& __abs_time) + { + // DR 887 - Sync unknown clock to known clock. + const typename _Clock::time_point __c_entry = _Clock::now(); + const __clock_t::time_point __s_entry = __clock_t::now(); + const auto __delta = __abs_time - __c_entry; + const auto __s_atime = __s_entry + __delta; + return try_lock_shared_until(__s_atime); + } + +#else // ! (_GLIBCXX_USE_PTHREAD_RWLOCK_T && _GTHREAD_USE_MUTEX_TIMEDLOCK) + + // Exclusive ownership + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __abs_time) + { + unique_lock __lk(_M_mut); + if (!_M_gate1.wait_until(__lk, __abs_time, + [=]{ return !_M_write_entered(); })) + { + return false; + } + _M_state |= _S_write_entered; + if (!_M_gate2.wait_until(__lk, __abs_time, + [=]{ return _M_readers() == 0; })) + { + _M_state ^= _S_write_entered; + // Wake all threads blocked while the write-entered flag was set. + _M_gate1.notify_all(); + return false; + } + return true; + } + + // Shared ownership + + template + bool + try_lock_shared_until(const chrono::time_point<_Clock, + _Duration>& __abs_time) + { + unique_lock __lk(_M_mut); + if (!_M_gate1.wait_until(__lk, __abs_time, + [=]{ return _M_state < _S_max_readers; })) + { + return false; + } + ++_M_state; + return true; + } + #endif // _GLIBCXX_USE_PTHREAD_RWLOCK_T && _GTHREAD_USE_MUTEX_TIMEDLOCK }; #endif // _GLIBCXX_HAS_GTHREADS @@ -471,27 +550,30 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION shared_lock() noexcept : _M_pm(nullptr), _M_owns(false) { } explicit - shared_lock(mutex_type& __m) : _M_pm(&__m), _M_owns(true) + shared_lock(mutex_type& __m) + : _M_pm(std::__addressof(__m)), _M_owns(true) { __m.lock_shared(); } shared_lock(mutex_type& __m, defer_lock_t) noexcept - : _M_pm(&__m), _M_owns(false) { } + : _M_pm(std::__addressof(__m)), _M_owns(false) { } shared_lock(mutex_type& __m, try_to_lock_t) - : _M_pm(&__m), _M_owns(__m.try_lock_shared()) { } + : _M_pm(std::__addressof(__m)), _M_owns(__m.try_lock_shared()) { } shared_lock(mutex_type& __m, adopt_lock_t) - : _M_pm(&__m), _M_owns(true) { } + : _M_pm(std::__addressof(__m)), _M_owns(true) { } template shared_lock(mutex_type& __m, const chrono::time_point<_Clock, _Duration>& __abs_time) - : _M_pm(&__m), _M_owns(__m.try_lock_shared_until(__abs_time)) { } + : _M_pm(std::__addressof(__m)), + _M_owns(__m.try_lock_shared_until(__abs_time)) { } template shared_lock(mutex_type& __m, const chrono::duration<_Rep, _Period>& __rel_time) - : _M_pm(&__m), _M_owns(__m.try_lock_shared_for(__rel_time)) { } + : _M_pm(std::__addressof(__m)), + _M_owns(__m.try_lock_shared_for(__rel_time)) { } ~shared_lock() { diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/sstream b/devkitARM/arm-none-eabi/include/c++/7.1.0/sstream similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/sstream rename to devkitARM/arm-none-eabi/include/c++/7.1.0/sstream index aa4a71aa5..2a56d7348 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/sstream +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/sstream @@ -1,6 +1,6 @@ // String based streams -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -209,7 +209,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 virtual streamsize showmanyc() - { + { streamsize __ret = -1; if (_M_mode & ios_base::in) { @@ -248,10 +248,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 // that an external char_type array of length __n exists // and has been pre-allocated. If this is not the case, // things will quickly blow up. - + // Step 1: Destroy the current internal array. _M_string.clear(); - + // Step 2: Use the external array. _M_sync(__s, __n, 0); } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/stack b/devkitARM/arm-none-eabi/include/c++/7.1.0/stack similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/stack rename to devkitARM/arm-none-eabi/include/c++/7.1.0/stack index 2bb24cb8b..465c71f6d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/stack +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/stack @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/stdexcept b/devkitARM/arm-none-eabi/include/c++/7.1.0/stdexcept similarity index 73% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/stdexcept rename to devkitARM/arm-none-eabi/include/c++/7.1.0/stdexcept index 24289194d..2f0fdb9d4 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/stdexcept +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/stdexcept @@ -1,6 +1,6 @@ // Standard exception classes -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -110,18 +110,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * program runs (e.g., violations of class invariants). * @brief One of two subclasses of exception. */ - class logic_error : public exception + class logic_error : public exception { __cow_string _M_msg; public: /** Takes a character string describing the error. */ - explicit - logic_error(const string& __arg); + explicit + logic_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if __cplusplus >= 201103L explicit - logic_error(const char*); + logic_error(const char*) _GLIBCXX_TXN_SAFE; #endif #if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS @@ -129,57 +129,62 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION logic_error& operator=(const logic_error&) _GLIBCXX_USE_NOEXCEPT; #endif - virtual ~logic_error() _GLIBCXX_USE_NOEXCEPT; + virtual ~logic_error() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT; /** Returns a C-style character string describing the general cause of * the current error (the same string passed to the ctor). */ - virtual const char* - what() const _GLIBCXX_USE_NOEXCEPT; + virtual const char* + what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT; + +# ifdef _GLIBCXX_TM_TS_INTERNAL + friend void* + ::_txnal_logic_error_get_msg(void* e); +# endif }; /** Thrown by the library, or by you, to report domain errors (domain in * the mathematical sense). */ - class domain_error : public logic_error + class domain_error : public logic_error { public: - explicit domain_error(const string& __arg); + explicit domain_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if __cplusplus >= 201103L - explicit domain_error(const char*); + explicit domain_error(const char*) _GLIBCXX_TXN_SAFE; #endif virtual ~domain_error() _GLIBCXX_USE_NOEXCEPT; }; /** Thrown to report invalid arguments to functions. */ - class invalid_argument : public logic_error + class invalid_argument : public logic_error { public: - explicit invalid_argument(const string& __arg); + explicit invalid_argument(const string& __arg) _GLIBCXX_TXN_SAFE; #if __cplusplus >= 201103L - explicit invalid_argument(const char*); + explicit invalid_argument(const char*) _GLIBCXX_TXN_SAFE; #endif virtual ~invalid_argument() _GLIBCXX_USE_NOEXCEPT; }; /** Thrown when an object is constructed that would exceed its maximum * permitted size (e.g., a basic_string instance). */ - class length_error : public logic_error + class length_error : public logic_error { public: - explicit length_error(const string& __arg); + explicit length_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if __cplusplus >= 201103L - explicit length_error(const char*); + explicit length_error(const char*) _GLIBCXX_TXN_SAFE; #endif virtual ~length_error() _GLIBCXX_USE_NOEXCEPT; }; /** This represents an argument whose value is not within the expected * range (e.g., boundary checks in basic_string). */ - class out_of_range : public logic_error + class out_of_range : public logic_error { public: - explicit out_of_range(const string& __arg); + explicit out_of_range(const string& __arg) _GLIBCXX_TXN_SAFE; #if __cplusplus >= 201103L - explicit out_of_range(const char*); + explicit out_of_range(const char*) _GLIBCXX_TXN_SAFE; #endif virtual ~out_of_range() _GLIBCXX_USE_NOEXCEPT; }; @@ -189,18 +194,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the program executes. * @brief One of two subclasses of exception. */ - class runtime_error : public exception + class runtime_error : public exception { __cow_string _M_msg; public: /** Takes a character string describing the error. */ - explicit - runtime_error(const string& __arg); + explicit + runtime_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if __cplusplus >= 201103L explicit - runtime_error(const char*); + runtime_error(const char*) _GLIBCXX_TXN_SAFE; #endif #if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS @@ -208,43 +213,48 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION runtime_error& operator=(const runtime_error&) _GLIBCXX_USE_NOEXCEPT; #endif - virtual ~runtime_error() _GLIBCXX_USE_NOEXCEPT; + virtual ~runtime_error() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT; /** Returns a C-style character string describing the general cause of * the current error (the same string passed to the ctor). */ - virtual const char* - what() const _GLIBCXX_USE_NOEXCEPT; + virtual const char* + what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT; + +# ifdef _GLIBCXX_TM_TS_INTERNAL + friend void* + ::_txnal_runtime_error_get_msg(void* e); +# endif }; /** Thrown to indicate range errors in internal computations. */ - class range_error : public runtime_error + class range_error : public runtime_error { public: - explicit range_error(const string& __arg); + explicit range_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if __cplusplus >= 201103L - explicit range_error(const char*); + explicit range_error(const char*) _GLIBCXX_TXN_SAFE; #endif virtual ~range_error() _GLIBCXX_USE_NOEXCEPT; }; /** Thrown to indicate arithmetic overflow. */ - class overflow_error : public runtime_error + class overflow_error : public runtime_error { public: - explicit overflow_error(const string& __arg); + explicit overflow_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if __cplusplus >= 201103L - explicit overflow_error(const char*); + explicit overflow_error(const char*) _GLIBCXX_TXN_SAFE; #endif virtual ~overflow_error() _GLIBCXX_USE_NOEXCEPT; }; /** Thrown to indicate arithmetic underflow. */ - class underflow_error : public runtime_error + class underflow_error : public runtime_error { public: - explicit underflow_error(const string& __arg); + explicit underflow_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if __cplusplus >= 201103L - explicit underflow_error(const char*); + explicit underflow_error(const char*) _GLIBCXX_TXN_SAFE; #endif virtual ~underflow_error() _GLIBCXX_USE_NOEXCEPT; }; diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/stdlib.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/stdlib.h new file mode 100644 index 000000000..272e9bd9a --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/stdlib.h @@ -0,0 +1,86 @@ +// -*- C++ -*- compatibility header. + +// Copyright (C) 2002-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file stdlib.h + * This is a Standard C++ Library header. + */ + +#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS +# include_next +#else + +#ifndef _GLIBCXX_STDLIB_H +#define _GLIBCXX_STDLIB_H 1 + +# include + +using std::abort; +using std::atexit; +using std::exit; +#if __cplusplus >= 201103L +# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT + using std::at_quick_exit; +# endif +# ifdef _GLIBCXX_HAVE_QUICK_EXIT + using std::quick_exit; +# endif +#endif + +#if _GLIBCXX_HOSTED +using std::div_t; +using std::ldiv_t; + +using std::abs; +using std::atof; +using std::atoi; +using std::atol; +using std::bsearch; +using std::calloc; +using std::div; +using std::free; +using std::getenv; +using std::labs; +using std::ldiv; +using std::malloc; +#ifdef _GLIBCXX_HAVE_MBSTATE_T +using std::mblen; +using std::mbstowcs; +using std::mbtowc; +#endif // _GLIBCXX_HAVE_MBSTATE_T +using std::qsort; +using std::rand; +using std::realloc; +using std::srand; +using std::strtod; +using std::strtol; +using std::strtoul; +using std::system; +#ifdef _GLIBCXX_USE_WCHAR_T +using std::wcstombs; +using std::wctomb; +#endif // _GLIBCXX_USE_WCHAR_T +#endif + +#endif // _GLIBCXX_STDLIB_H +#endif // __cplusplus diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/streambuf b/devkitARM/arm-none-eabi/include/c++/7.1.0/streambuf similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/streambuf rename to devkitARM/arm-none-eabi/include/c++/7.1.0/streambuf index fbdf48434..862c4fdbe 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/streambuf +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/streambuf @@ -1,6 +1,6 @@ // Stream buffer classes -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/string b/devkitARM/arm-none-eabi/include/c++/7.1.0/string similarity index 91% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/string rename to devkitARM/arm-none-eabi/include/c++/7.1.0/string index 2ed281dbd..9b25eedeb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/string +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/string @@ -1,6 +1,6 @@ // Components for manipulating sequences of characters -*- C++ -*- -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -46,10 +46,10 @@ #include #include #include // For less -#include -#include +#include +#include #include #include -#include +#include #endif /* _GLIBCXX_STRING */ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/string_view b/devkitARM/arm-none-eabi/include/c++/7.1.0/string_view new file mode 100644 index 000000000..311d6d725 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/string_view @@ -0,0 +1,675 @@ +// Components for manipulating non-owning sequences of characters -*- C++ -*- + +// Copyright (C) 2013-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file string_view + * This is a Standard C++ Library header. + */ + +// +// N3762 basic_string_view library +// + +#ifndef _GLIBCXX_STRING_VIEW +#define _GLIBCXX_STRING_VIEW 1 + +#pragma GCC system_header + +#if __cplusplus <= 201402L +# include +#else + +#include +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @class basic_string_view + * @brief A non-owning reference to a string. + * + * @ingroup strings + * @ingroup sequences + * + * @tparam _CharT Type of character + * @tparam _Traits Traits for character type, defaults to + * char_traits<_CharT>. + * + * A basic_string_view looks like this: + * + * @code + * _CharT* _M_str + * size_t _M_len + * @endcode + */ + template> + class basic_string_view + { + public: + + // types + using traits_type = _Traits; + using value_type = _CharT; + using pointer = const _CharT*; + using const_pointer = const _CharT*; + using reference = const _CharT&; + using const_reference = const _CharT&; + using const_iterator = const _CharT*; + using iterator = const_iterator; + using const_reverse_iterator = std::reverse_iterator; + using reverse_iterator = const_reverse_iterator; + using size_type = size_t; + using difference_type = ptrdiff_t; + static constexpr size_type npos = size_type(-1); + + // [string.view.cons], construct/copy + + constexpr + basic_string_view() noexcept + : _M_len{0}, _M_str{nullptr} + { } + + constexpr basic_string_view(const basic_string_view&) noexcept = default; + + constexpr basic_string_view(const _CharT* __str) + : _M_len{__str == nullptr ? 0 : traits_type::length(__str)}, + _M_str{__str} + { } + + constexpr basic_string_view(const _CharT* __str, size_type __len) + : _M_len{__len}, + _M_str{__str} + { } + + basic_string_view& + operator=(const basic_string_view&) noexcept = default; + + // [string.view.iterators], iterators + + constexpr const_iterator + begin() const noexcept + { return this->_M_str; } + + constexpr const_iterator + end() const noexcept + { return this->_M_str + this->_M_len; } + + constexpr const_iterator + cbegin() const noexcept + { return this->_M_str; } + + constexpr const_iterator + cend() const noexcept + { return this->_M_str + this->_M_len; } + + const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(this->end()); } + + const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(this->begin()); } + + const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(this->end()); } + + const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(this->begin()); } + + // [string.view.capacity], capacity + + constexpr size_type + size() const noexcept + { return this->_M_len; } + + constexpr size_type + length() const noexcept + { return _M_len; } + + constexpr size_type + max_size() const noexcept + { + return (npos - sizeof(size_type) - sizeof(void*)) + / sizeof(value_type) / 4; + } + + constexpr bool + empty() const noexcept + { return this->_M_len == 0; } + + // [string.view.access], element access + + constexpr const _CharT& + operator[](size_type __pos) const noexcept + { + // TODO: Assert to restore in a way compatible with the constexpr. + // __glibcxx_assert(__pos < this->_M_len); + return *(this->_M_str + __pos); + } + + constexpr const _CharT& + at(size_type __pos) const + { + return __pos < this->_M_len + ? *(this->_M_str + __pos) + : (__throw_out_of_range_fmt(__N("basic_string_view::at: __pos " + "(which is %zu) >= this->size() " + "(which is %zu)"), + __pos, this->size()), + *this->_M_str); + } + + constexpr const _CharT& + front() const + { + // TODO: Assert to restore in a way compatible with the constexpr. + // __glibcxx_assert(this->_M_len > 0); + return *this->_M_str; + } + + constexpr const _CharT& + back() const + { + // TODO: Assert to restore in a way compatible with the constexpr. + // __glibcxx_assert(this->_M_len > 0); + return *(this->_M_str + this->_M_len - 1); + } + + constexpr const _CharT* + data() const noexcept + { return this->_M_str; } + + // [string.view.modifiers], modifiers: + + void + remove_prefix(size_type __n) + { + __glibcxx_assert(this->_M_len >= __n); + this->_M_str += __n; + this->_M_len -= __n; + } + + void + remove_suffix(size_type __n) + { this->_M_len -= __n; } + + void + swap(basic_string_view& __sv) noexcept + { + std::swap(this->_M_len, __sv._M_len); + std::swap(this->_M_str, __sv._M_str); + } + + + // [string.view.ops], string operations: + + size_type + copy(_CharT* __str, size_type __n, size_type __pos = 0) const + { + __glibcxx_requires_string_len(__str, __n); + if (__pos > this->_M_len) + __throw_out_of_range_fmt(__N("basic_string_view::copy: __pos " + "(which is %zu) > this->size() " + "(which is %zu)"), + __pos, this->size()); + size_type __rlen{std::min(__n, size_type{this->_M_len - __pos})}; + for (auto __begin = this->_M_str + __pos, + __end = __begin + __rlen; __begin != __end;) + *__str++ = *__begin++; + return __rlen; + } + + + // [string.view.ops], string operations: + + constexpr basic_string_view + substr(size_type __pos, size_type __n=npos) const + { + return __pos <= this->_M_len + ? basic_string_view{this->_M_str + __pos, + std::min(__n, size_type{this->_M_len - __pos})} + : (__throw_out_of_range_fmt(__N("basic_string_view::substr: __pos " + "(which is %zu) > this->size() " + "(which is %zu)"), + __pos, this->size()), basic_string_view{}); + } + + int + compare(basic_string_view __str) const noexcept + { + int __ret = traits_type::compare(this->_M_str, __str._M_str, + std::min(this->_M_len, __str._M_len)); + if (__ret == 0) + __ret = _S_compare(this->_M_len, __str._M_len); + return __ret; + } + + int + compare(size_type __pos1, size_type __n1, basic_string_view __str) const + { return this->substr(__pos1, __n1).compare(__str); } + + int + compare(size_type __pos1, size_type __n1, + basic_string_view __str, size_type __pos2, size_type __n2) const + { return this->substr(__pos1, __n1).compare(__str.substr(__pos2, __n2)); } + + int + compare(const _CharT* __str) const noexcept + { return this->compare(basic_string_view{__str}); } + + int + compare(size_type __pos1, size_type __n1, const _CharT* __str) const + { return this->substr(__pos1, __n1).compare(basic_string_view{__str}); } + + int + compare(size_type __pos1, size_type __n1, + const _CharT* __str, size_type __n2) const + { + return this->substr(__pos1, __n1) + .compare(basic_string_view(__str, __n2)); + } + + size_type + find(basic_string_view __str, size_type __pos = 0) const noexcept + { return this->find(__str._M_str, __pos, __str._M_len); } + + size_type + find(_CharT __c, size_type __pos=0) const noexcept; + + size_type + find(const _CharT* __str, size_type __pos, size_type __n) const noexcept; + + size_type + find(const _CharT* __str, size_type __pos=0) const noexcept + { return this->find(__str, __pos, traits_type::length(__str)); } + + size_type + rfind(basic_string_view __str, size_type __pos = npos) const noexcept + { return this->rfind(__str._M_str, __pos, __str._M_len); } + + size_type + rfind(_CharT __c, size_type __pos = npos) const noexcept; + + size_type + rfind(const _CharT* __str, size_type __pos, size_type __n) const noexcept; + + size_type + rfind(const _CharT* __str, size_type __pos = npos) const noexcept + { return this->rfind(__str, __pos, traits_type::length(__str)); } + + size_type + find_first_of(basic_string_view __str, size_type __pos = 0) const noexcept + { return this->find_first_of(__str._M_str, __pos, __str._M_len); } + + size_type + find_first_of(_CharT __c, size_type __pos = 0) const noexcept + { return this->find(__c, __pos); } + + size_type + find_first_of(const _CharT* __str, size_type __pos, size_type __n) const; + + size_type + find_first_of(const _CharT* __str, size_type __pos = 0) const noexcept + { return this->find_first_of(__str, __pos, traits_type::length(__str)); } + + size_type + find_last_of(basic_string_view __str, + size_type __pos = npos) const noexcept + { return this->find_last_of(__str._M_str, __pos, __str._M_len); } + + size_type + find_last_of(_CharT __c, size_type __pos=npos) const noexcept + { return this->rfind(__c, __pos); } + + size_type + find_last_of(const _CharT* __str, size_type __pos, size_type __n) const; + + size_type + find_last_of(const _CharT* __str, size_type __pos = npos) const noexcept + { return this->find_last_of(__str, __pos, traits_type::length(__str)); } + + size_type + find_first_not_of(basic_string_view __str, + size_type __pos = 0) const noexcept + { return this->find_first_not_of(__str._M_str, __pos, __str._M_len); } + + size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const noexcept; + + size_type + find_first_not_of(const _CharT* __str, + size_type __pos, size_type __n) const; + + size_type + find_first_not_of(const _CharT* __str, size_type __pos = 0) const noexcept + { + return this->find_first_not_of(__str, __pos, + traits_type::length(__str)); + } + + size_type + find_last_not_of(basic_string_view __str, + size_type __pos = npos) const noexcept + { return this->find_last_not_of(__str._M_str, __pos, __str._M_len); } + + size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const noexcept; + + size_type + find_last_not_of(const _CharT* __str, + size_type __pos, size_type __n) const; + + size_type + find_last_not_of(const _CharT* __str, + size_type __pos = npos) const noexcept + { + return this->find_last_not_of(__str, __pos, + traits_type::length(__str)); + } + + size_type + _M_check(size_type __pos, const char* __s) const + { + if (__pos > this->size()) + __throw_out_of_range_fmt(__N("%s: __pos (which is %zu) > " + "this->size() (which is %zu)"), + __s, __pos, this->size()); + return __pos; + } + + // NB: _M_limit doesn't check for a bad __pos value. + size_type + _M_limit(size_type __pos, size_type __off) const _GLIBCXX_NOEXCEPT + { + const bool __testoff = __off < this->size() - __pos; + return __testoff ? __off : this->size() - __pos; + } + + private: + + static constexpr int + _S_compare(size_type __n1, size_type __n2) noexcept + { + return difference_type{__n1 - __n2} > std::numeric_limits::max() + ? std::numeric_limits::max() + : difference_type{__n1 - __n2} < std::numeric_limits::min() + ? std::numeric_limits::min() + : static_cast(difference_type{__n1 - __n2}); + } + + size_t _M_len; + const _CharT* _M_str; + }; +_GLIBCXX_END_NAMESPACE_VERSION + + // [string.view.comparison], non-member basic_string_view comparison function + + namespace __detail + { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Identity transform to create a non-deduced context, so that only one + // argument participates in template argument deduction and the other + // argument gets implicitly converted to the deduced type. See n3766.html. + template + using __idt = common_type_t<_Tp>; +_GLIBCXX_END_NAMESPACE_VERSION + } + +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + inline bool + operator==(basic_string_view<_CharT, _Traits> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.size() == __y.size() && __x.compare(__y) == 0; } + + template + inline bool + operator==(basic_string_view<_CharT, _Traits> __x, + __detail::__idt> __y) noexcept + { return __x.size() == __y.size() && __x.compare(__y) == 0; } + + template + inline bool + operator==(__detail::__idt> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.size() == __y.size() && __x.compare(__y) == 0; } + + template + inline bool + operator!=(basic_string_view<_CharT, _Traits> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return !(__x == __y); } + + template + inline bool + operator!=(basic_string_view<_CharT, _Traits> __x, + __detail::__idt> __y) noexcept + { return !(__x == __y); } + + template + inline bool + operator!=(__detail::__idt> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return !(__x == __y); } + + template + inline bool + operator< (basic_string_view<_CharT, _Traits> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.compare(__y) < 0; } + + template + inline bool + operator< (basic_string_view<_CharT, _Traits> __x, + __detail::__idt> __y) noexcept + { return __x.compare(__y) < 0; } + + template + inline bool + operator< (__detail::__idt> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.compare(__y) < 0; } + + template + inline bool + operator> (basic_string_view<_CharT, _Traits> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.compare(__y) > 0; } + + template + inline bool + operator> (basic_string_view<_CharT, _Traits> __x, + __detail::__idt> __y) noexcept + { return __x.compare(__y) > 0; } + + template + inline bool + operator> (__detail::__idt> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.compare(__y) > 0; } + + template + inline bool + operator<=(basic_string_view<_CharT, _Traits> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.compare(__y) <= 0; } + + template + inline bool + operator<=(basic_string_view<_CharT, _Traits> __x, + __detail::__idt> __y) noexcept + { return __x.compare(__y) <= 0; } + + template + inline bool + operator<=(__detail::__idt> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.compare(__y) <= 0; } + + template + inline bool + operator>=(basic_string_view<_CharT, _Traits> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.compare(__y) >= 0; } + + template + inline bool + operator>=(basic_string_view<_CharT, _Traits> __x, + __detail::__idt> __y) noexcept + { return __x.compare(__y) >= 0; } + + template + inline bool + operator>=(__detail::__idt> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.compare(__y) >= 0; } + + // [string.view.io], Inserters and extractors + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + basic_string_view<_CharT,_Traits> __str) + { return __ostream_insert(__os, __str.data(), __str.size()); } + + + // basic_string_view typedef names + + using string_view = basic_string_view; +#ifdef _GLIBCXX_USE_WCHAR_T + using wstring_view = basic_string_view; +#endif +#ifdef _GLIBCXX_USE_C99_STDINT_TR1 + using u16string_view = basic_string_view; + using u32string_view = basic_string_view; +#endif + + // [string.view.hash], hash support: + + template + struct hash; + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const string_view& __str) const noexcept + { return std::_Hash_impl::hash(__str.data(), __str.length()); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + +#ifdef _GLIBCXX_USE_WCHAR_T + template<> + struct hash + : public __hash_base + { + size_t + operator()(const wstring_view& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(wchar_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; +#endif + +#ifdef _GLIBCXX_USE_C99_STDINT_TR1 + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u16string_view& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char16_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u32string_view& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char32_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; +#endif +_GLIBCXX_END_NAMESPACE_VERSION + + inline namespace literals + { + inline namespace string_view_literals + { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + inline constexpr basic_string_view + operator""sv(const char* __str, size_t __len) + { return basic_string_view{__str, __len}; } + +#ifdef _GLIBCXX_USE_WCHAR_T + inline constexpr basic_string_view + operator""sv(const wchar_t* __str, size_t __len) + { return basic_string_view{__str, __len}; } +#endif + +#ifdef _GLIBCXX_USE_C99_STDINT_TR1 + inline constexpr basic_string_view + operator""sv(const char16_t* __str, size_t __len) + { return basic_string_view{__str, __len}; } + + inline constexpr basic_string_view + operator""sv(const char32_t* __str, size_t __len) + { return basic_string_view{__str, __len}; } +#endif + +_GLIBCXX_END_NAMESPACE_VERSION + } // namespace string_literals + } // namespace literals + +} // namespace std + +#include + +#endif // __cplusplus <= 201402L + +#endif // _GLIBCXX_EXPERIMENTAL_STRING_VIEW diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/system_error b/devkitARM/arm-none-eabi/include/c++/7.1.0/system_error similarity index 90% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/system_error rename to devkitARM/arm-none-eabi/include/c++/7.1.0/system_error index 92f8af97e..ec7d25f25 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/system_error +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/system_error @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -56,10 +56,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct is_error_condition_enum : public false_type { }; - template<> + template<> struct is_error_condition_enum : public true_type { }; +#if __cplusplus > 201402L + template + inline constexpr bool is_error_code_enum_v = + is_error_code_enum<_Tp>::value; + template + inline constexpr bool is_error_condition_enum_v = + is_error_condition_enum<_Tp>::value; +#endif // C++17 inline namespace _V2 { /// error_category @@ -73,7 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION error_category(const error_category&) = delete; error_category& operator=(const error_category&) = delete; - virtual const char* + virtual const char* name() const noexcept = 0; // We need two different virtual functions here, one returning a @@ -91,7 +99,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION virtual string message(int) const = 0; #else - virtual string + virtual string message(int) const = 0; private: @@ -103,21 +111,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION virtual error_condition default_error_condition(int __i) const noexcept; - virtual bool + virtual bool equivalent(int __i, const error_condition& __cond) const noexcept; - virtual bool + virtual bool equivalent(const error_code& __code, int __i) const noexcept; - bool + bool operator<(const error_category& __other) const noexcept { return less()(this, &__other); } - bool + bool operator==(const error_category& __other) const noexcept { return this == &__other; } - bool + bool operator!=(const error_category& __other) const noexcept { return this != &__other; } }; @@ -148,14 +156,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION error_code(_ErrorCodeEnum __e) noexcept { *this = make_error_code(__e); } - void + void assign(int __v, const error_category& __cat) noexcept { _M_value = __v; - _M_cat = &__cat; + _M_cat = &__cat; } - void + void clear() noexcept { assign(0, system_category()); } @@ -168,20 +176,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION int value() const noexcept { return _M_value; } - - const error_category& + + const error_category& category() const noexcept { return *_M_cat; } - error_condition + error_condition default_error_condition() const noexcept; _GLIBCXX_DEFAULT_ABI_TAG - string + string message() const { return category().message(value()); } explicit operator bool() const noexcept - { return _M_value != 0 ? true : false; } + { return _M_value != 0; } // DR 804. private: @@ -198,7 +206,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline bool operator<(const error_code& __lhs, const error_code& __rhs) noexcept - { + { return (__lhs.category() < __rhs.category() || (__lhs.category() == __rhs.category() && __lhs.value() < __rhs.value())); @@ -213,7 +221,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// error_condition // Portable error identification - struct error_condition + struct error_condition { error_condition() noexcept : _M_value(0), _M_cat(&generic_category()) { } @@ -240,7 +248,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator=(_ErrorConditionEnum __e) noexcept { return *this = make_error_condition(__e); } - void + void clear() noexcept { assign(0, generic_category()); } @@ -252,12 +260,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION category() const noexcept { return *_M_cat; } _GLIBCXX_DEFAULT_ABI_TAG - string + string message() const { return category().message(value()); } explicit operator bool() const noexcept - { return _M_value != 0 ? true : false; } + { return _M_value != 0; } // DR 804. private: @@ -270,7 +278,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION make_error_condition(errc __e) noexcept { return error_condition(static_cast(__e), generic_category()); } - inline bool + inline bool operator<(const error_condition& __lhs, const error_condition& __rhs) noexcept { @@ -325,7 +333,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return !(__lhs == __rhs); } - /** + /** * @brief Thrown to indicate error code of underlying system. * * @ingroup exceptions @@ -358,21 +366,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION virtual ~system_error() noexcept; - const error_code& + const error_code& code() const noexcept { return _M_code; } }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#ifndef _GLIBCXX_COMPATIBILITY_CXX0X - #include namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION +#ifndef _GLIBCXX_COMPATIBILITY_CXX0X // DR 1182. /// std::hash specialization for error_code. template<> @@ -386,12 +393,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return std::_Hash_impl::__hash_combine(__e._M_cat, __tmp); } }; +#endif // _GLIBCXX_COMPATIBILITY_CXX0X + +#if __cplusplus > 201402L + // DR 2686. + /// std::hash specialization for error_condition. + template<> + struct hash + : public __hash_base + { + size_t + operator()(const error_condition& __e) const noexcept + { + const size_t __tmp = std::_Hash_impl::hash(__e.value()); + return std::_Hash_impl::__hash_combine(__e.category(), __tmp); + } + }; +#endif _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#endif // _GLIBCXX_COMPATIBILITY_CXX0X - #endif // C++11 #endif // _GLIBCXX_SYSTEM_ERROR diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tgmath.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tgmath.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tgmath.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tgmath.h index 2ce8f1e28..ea6952038 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tgmath.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tgmath.h @@ -1,6 +1,6 @@ // -*- C++ -*- compatibility header. -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/thread b/devkitARM/arm-none-eabi/include/c++/7.1.0/thread similarity index 61% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/thread rename to devkitARM/arm-none-eabi/include/c++/7.1.0/thread index ebbda62fa..8e2cb68e2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/thread +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/thread @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,10 +36,12 @@ #else #include -#include #include +#include +#include #include #include +#include #include #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) @@ -60,9 +62,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class thread { public: + // Abstract base class for types that wrap arbitrary functors to be + // invoked in the new thread of execution. + struct _State + { + virtual ~_State(); + virtual void _M_run() = 0; + }; + using _State_ptr = unique_ptr<_State>; + typedef __gthread_t native_handle_type; - struct _Impl_base; - typedef shared_ptr<_Impl_base> __shared_base_type; /// thread::id class id @@ -80,41 +89,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class hash; friend bool - operator==(thread::id __x, thread::id __y) noexcept - { return __gthread_equal(__x._M_thread, __y._M_thread); } + operator==(thread::id __x, thread::id __y) noexcept; friend bool - operator<(thread::id __x, thread::id __y) noexcept - { return __x._M_thread < __y._M_thread; } + operator<(thread::id __x, thread::id __y) noexcept; template friend basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id); }; - // Simple base type that the templatized, derived class containing - // an arbitrary functor can be converted to and called. - struct _Impl_base - { - __shared_base_type _M_this_ptr; - - inline virtual ~_Impl_base(); - - virtual void _M_run() = 0; - }; - - template - struct _Impl : public _Impl_base - { - _Callable _M_func; - - _Impl(_Callable&& __f) : _M_func(std::forward<_Callable>(__f)) - { } - - void - _M_run() { _M_func(); } - }; - private: id _M_id; @@ -124,25 +108,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // 2097. packaged_task constructors should be constrained thread(thread&) = delete; thread(const thread&) = delete; + thread(const thread&&) = delete; thread(thread&& __t) noexcept { swap(__t); } template - explicit + explicit thread(_Callable&& __f, _Args&&... __args) { #ifdef GTHR_ACTIVE_PROXY - // Create a reference to pthread_create, not just the gthr weak symbol - _M_start_thread(_M_make_routine(std::__bind_simple( - std::forward<_Callable>(__f), - std::forward<_Args>(__args)...)), - reinterpret_cast(&pthread_create)); + // Create a reference to pthread_create, not just the gthr weak symbol. + auto __depend = reinterpret_cast(&pthread_create); #else - _M_start_thread(_M_make_routine(std::__bind_simple( - std::forward<_Callable>(__f), - std::forward<_Args>(__args)...))); + auto __depend = nullptr; #endif + _M_start_thread(_S_make_state( + __make_invoker(std::forward<_Callable>(__f), + std::forward<_Args>(__args)...)), + __depend); } ~thread() @@ -189,32 +173,121 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static unsigned int hardware_concurrency() noexcept; + private: + template + struct _State_impl : public _State + { + _Callable _M_func; + + _State_impl(_Callable&& __f) : _M_func(std::forward<_Callable>(__f)) + { } + + void + _M_run() { _M_func(); } + }; + + void + _M_start_thread(_State_ptr, void (*)()); + + template + static _State_ptr + _S_make_state(_Callable&& __f) + { + using _Impl = _State_impl<_Callable>; + return _State_ptr{new _Impl{std::forward<_Callable>(__f)}}; + } +#if _GLIBCXX_THREAD_ABI_COMPAT + public: + struct _Impl_base; + typedef shared_ptr<_Impl_base> __shared_base_type; + struct _Impl_base + { + __shared_base_type _M_this_ptr; + virtual ~_Impl_base() = default; + virtual void _M_run() = 0; + }; + private: void _M_start_thread(__shared_base_type, void (*)()); void _M_start_thread(__shared_base_type); +#endif - template - shared_ptr<_Impl<_Callable>> - _M_make_routine(_Callable&& __f) + private: + // A call wrapper that does INVOKE(forwarded tuple elements...) + template + struct _Invoker { - // Create and allocate full data structure, not base. - return std::make_shared<_Impl<_Callable>>(std::forward<_Callable>(__f)); + _Tuple _M_t; + + template + static __tuple_element_t<_Index, _Tuple>&& + _S_declval(); + + template + auto + _M_invoke(_Index_tuple<_Ind...>) + noexcept(noexcept(std::__invoke(_S_declval<_Ind>()...))) + -> decltype(std::__invoke(_S_declval<_Ind>()...)) + { return std::__invoke(std::get<_Ind>(std::move(_M_t))...); } + + using _Indices + = typename _Build_index_tuple::value>::__type; + + auto + operator()() + noexcept(noexcept(std::declval<_Invoker&>()._M_invoke(_Indices()))) + -> decltype(std::declval<_Invoker&>()._M_invoke(_Indices())) + { return _M_invoke(_Indices()); } + }; + + // Alias for _Invoker> + template + using __invoker_type + = _Invoker()...))>; + + public: + // Returns a call wrapper that does + // INVOKE(DECAY_COPY(__callable), DECAY_COPY(__args)). + template + static __invoker_type<_Callable, _Args...> + __make_invoker(_Callable&& __callable, _Args&&... __args) + { + return { { + std::make_tuple(std::forward<_Callable>(__callable), + std::forward<_Args>(__args)...) + } }; } }; - inline thread::_Impl_base::~_Impl_base() = default; - inline void swap(thread& __x, thread& __y) noexcept { __x.swap(__y); } + inline bool + operator==(thread::id __x, thread::id __y) noexcept + { + // pthread_equal is undefined if either thread ID is not valid, so we + // can't safely use __gthread_equal on default-constructed values (nor + // the non-zero value returned by this_thread::get_id() for + // single-threaded programs using GNU libc). Assume EqualityComparable. + return __x._M_thread == __y._M_thread; + } + inline bool operator!=(thread::id __x, thread::id __y) noexcept { return !(__x == __y); } + inline bool + operator<(thread::id __x, thread::id __y) noexcept + { + // Pthreads doesn't define any way to do this, so we just have to + // assume native_handle_type is LessThanComparable. + return __x._M_thread < __y._M_thread; + } + inline bool operator<=(thread::id __x, thread::id __y) noexcept { return !(__y < __x); } @@ -260,7 +333,18 @@ _GLIBCXX_END_NAMESPACE_VERSION /// get_id inline thread::id - get_id() noexcept { return thread::id(__gthread_self()); } + get_id() noexcept + { +#ifdef __GLIBC__ + // For the GNU C library pthread_self() is usable without linking to + // libpthread.so but returns 0, so we cannot use it in single-threaded + // programs, because this_thread::get_id() != thread::id{} must be true. + // We know that pthread_t is an integral type in the GNU C library. + if (!__gthread_active_p()) + return thread::id(1); +#endif + return thread::id(__gthread_self()); + } /// yield inline void @@ -289,7 +373,8 @@ _GLIBCXX_END_NAMESPACE_VERSION static_cast(__s.count()), static_cast(__ns.count()) }; - ::nanosleep(&__ts, 0); + while (::nanosleep(&__ts, &__ts) == -1 && errno == EINTR) + { } #else __sleep_for(__s, __ns); #endif @@ -301,8 +386,17 @@ _GLIBCXX_END_NAMESPACE_VERSION sleep_until(const chrono::time_point<_Clock, _Duration>& __atime) { auto __now = _Clock::now(); - if (__now < __atime) - sleep_for(__atime - __now); + if (_Clock::is_steady) + { + if (__now < __atime) + sleep_for(__atime - __now); + return; + } + while (__now < __atime) + { + sleep_for(__atime - __now); + __now = _Clock::now(); + } } _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/array b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/array similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/array rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/array index 86ae0e08a..606d019ad 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/array +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/array @@ -1,6 +1,6 @@ // class template array -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/bessel_function.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/bessel_function.tcc similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/bessel_function.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/bessel_function.tcc index 37f136b91..7ba4c8a7f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/bessel_function.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/bessel_function.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -50,8 +50,15 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +# define _GLIBCXX_MATH_NS ::std +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +# define _GLIBCXX_MATH_NS ::std::tr1 +#else +# error do not include this header directly, use or +#endif // [5.2] Special functions // Implementation-space details. @@ -90,8 +97,8 @@ namespace tr1 _Tp & __gam1, _Tp & __gam2, _Tp & __gampl, _Tp & __gammi) { #if _GLIBCXX_USE_C99_MATH_TR1 - __gampl = _Tp(1) / std::tr1::tgamma(_Tp(1) + __mu); - __gammi = _Tp(1) / std::tr1::tgamma(_Tp(1) - __mu); + __gampl = _Tp(1) / _GLIBCXX_MATH_NS::tgamma(_Tp(1) + __mu); + __gammi = _Tp(1) / _GLIBCXX_MATH_NS::tgamma(_Tp(1) - __mu); #else __gampl = _Tp(1) / __gamma(_Tp(1) + __mu); __gammi = _Tp(1) / __gamma(_Tp(1) - __mu); @@ -306,7 +313,7 @@ namespace tr1 const _Tp __gam = (__p - __f) / __q; __Jmu = std::sqrt(__w / ((__p - __f) * __gam + __q)); #if _GLIBCXX_USE_C99_MATH_TR1 - __Jmu = std::tr1::copysign(__Jmu, __Jnul); + __Jmu = _GLIBCXX_MATH_NS::copysign(__Jmu, __Jnul); #else if (__Jmu * __Jnul < _Tp(0)) __Jmu = -__Jmu; @@ -414,7 +421,7 @@ namespace tr1 const _Tp __x2 = __x / _Tp(2); _Tp __fact = __nu * std::log(__x2); #if _GLIBCXX_USE_C99_MATH_TR1 - __fact -= std::tr1::lgamma(__nu + _Tp(1)); + __fact -= _GLIBCXX_MATH_NS::lgamma(__nu + _Tp(1)); #else __fact -= __log_gamma(__nu + _Tp(1)); #endif @@ -621,8 +628,11 @@ namespace tr1 } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} + } // namespace __detail +#undef _GLIBCXX_MATH_NS +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_BESSEL_FUNCTION_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/beta_function.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/beta_function.tcc similarity index 85% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/beta_function.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/beta_function.tcc index dd1418ed8..2770eef3c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/beta_function.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/beta_function.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -48,8 +48,15 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +# define _GLIBCXX_MATH_NS ::std +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +# define _GLIBCXX_MATH_NS ::std::tr1 +#else +# error do not include this header directly, use or +#endif // [5.2] Special functions // Implementation-space details. @@ -78,15 +85,15 @@ namespace tr1 #if _GLIBCXX_USE_C99_MATH_TR1 if (__x > __y) { - __bet = std::tr1::tgamma(__x) - / std::tr1::tgamma(__x + __y); - __bet *= std::tr1::tgamma(__y); + __bet = _GLIBCXX_MATH_NS::tgamma(__x) + / _GLIBCXX_MATH_NS::tgamma(__x + __y); + __bet *= _GLIBCXX_MATH_NS::tgamma(__y); } else { - __bet = std::tr1::tgamma(__y) - / std::tr1::tgamma(__x + __y); - __bet *= std::tr1::tgamma(__x); + __bet = _GLIBCXX_MATH_NS::tgamma(__y) + / _GLIBCXX_MATH_NS::tgamma(__x + __y); + __bet *= _GLIBCXX_MATH_NS::tgamma(__x); } #else if (__x > __y) @@ -122,9 +129,9 @@ namespace tr1 __beta_lgamma(_Tp __x, _Tp __y) { #if _GLIBCXX_USE_C99_MATH_TR1 - _Tp __bet = std::tr1::lgamma(__x) - + std::tr1::lgamma(__y) - - std::tr1::lgamma(__x + __y); + _Tp __bet = _GLIBCXX_MATH_NS::lgamma(__x) + + _GLIBCXX_MATH_NS::lgamma(__y) + - _GLIBCXX_MATH_NS::lgamma(__x + __y); #else _Tp __bet = __log_gamma(__x) + __log_gamma(__y) @@ -190,8 +197,11 @@ namespace tr1 } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} + } // namespace __detail +#undef _GLIBCXX_MATH_NS +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_BETA_FUNCTION_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ccomplex b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ccomplex similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ccomplex rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ccomplex index b033ca38b..2c331f6a1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ccomplex +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ccomplex @@ -1,6 +1,6 @@ // TR1 ccomplex -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cctype b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cctype similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cctype rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cctype index eae5bab42..5bca4b78a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cctype +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cctype @@ -1,6 +1,6 @@ // TR1 cctype -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cfenv b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cfenv similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cfenv rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cfenv index b8a071cfa..7dd371afa 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cfenv +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cfenv @@ -1,6 +1,6 @@ // TR1 cfenv -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cfloat b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cfloat similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cfloat rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cfloat index 79cfe95f8..bcd77f1af 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cfloat +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cfloat @@ -1,6 +1,6 @@ // TR1 cfloat -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cinttypes b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cinttypes similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cinttypes rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cinttypes index b635c8b4a..a922e6990 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cinttypes +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cinttypes @@ -1,6 +1,6 @@ // TR1 cinttypes -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/climits b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/climits similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/climits rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/climits index 52b16b74c..d703a68a1 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/climits +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/climits @@ -1,6 +1,6 @@ // TR1 climits -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cmath b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cmath similarity index 85% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cmath rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cmath index 181cc2440..b24e8c2a7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cmath +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cmath @@ -1,6 +1,6 @@ // TR1 cmath -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -151,6 +151,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if _GLIBCXX_USE_C99_MATH_TR1 + // Using declarations to bring names from libc's into std::tr1. + // types using ::double_t; using ::float_t; @@ -416,10 +418,79 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if _GLIBCXX_USE_C99_MATH_TR1 - /// Additional overloads [8.16.4]. - using std::acos; + /** Additional overloads [8.16.4]. + * @{ + */ -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO + // For functions defined in C++03 the additional overloads are already + // declared in so we can just re-declare them in std::tr1. + + using std::acos; + using std::asin; + using std::atan; + using std::atan2; + using std::ceil; + using std::cos; + using std::cosh; + using std::exp; + using std::floor; + using std::fmod; + using std::frexp; + using std::ldexp; + using std::log; + using std::log10; + using std::sin; + using std::sinh; + using std::sqrt; + using std::tan; + using std::tanh; + +#if __cplusplus >= 201103L + + // Since C++11, defines additional overloads for these functions + // in namespace std. + + using std::acosh; + using std::asinh; + using std::atanh; + using std::cbrt; + using std::copysign; + using std::erf; + using std::erfc; + using std::exp2; + using std::expm1; + using std::fdim; + using std::fma; + using std::fmax; + using std::fmin; + using std::hypot; + using std::ilogb; + using std::lgamma; + using std::llrint; + using std::llround; + using std::log1p; + using std::log2; + using std::logb; + using std::lrint; + using std::lround; + using std::nan; + using std::nearbyint; + using std::nextafter; + using std::nexttoward; + using std::remainder; + using std::remquo; + using std::rint; + using std::round; + using std::scalbln; + using std::scalbn; + using std::tgamma; + using std::trunc; + +#else // __cplusplus < 201103L + + // In C++03 we need to provide the additional overloads. + +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float acosh(float __x) { return __builtin_acoshf(__x); } @@ -435,9 +506,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION acosh(_Tp __x) { return __builtin_acosh(__x); } - using std::asin; - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float asinh(float __x) { return __builtin_asinhf(__x); } @@ -453,10 +522,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION asinh(_Tp __x) { return __builtin_asinh(__x); } - using std::atan; - using std::atan2; - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float atanh(float __x) { return __builtin_atanhf(__x); } @@ -472,7 +538,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION atanh(_Tp __x) { return __builtin_atanh(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float cbrt(float __x) { return __builtin_cbrtf(__x); } @@ -488,9 +554,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION cbrt(_Tp __x) { return __builtin_cbrt(__x); } - using std::ceil; - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float copysign(float __x, float __y) { return __builtin_copysignf(__x, __y); } @@ -508,10 +572,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return copysign(__type(__x), __type(__y)); } - using std::cos; - using std::cosh; - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float erf(float __x) { return __builtin_erff(__x); } @@ -527,7 +588,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION erf(_Tp __x) { return __builtin_erf(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float erfc(float __x) { return __builtin_erfcf(__x); } @@ -543,9 +604,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION erfc(_Tp __x) { return __builtin_erfc(__x); } - using std::exp; - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float exp2(float __x) { return __builtin_exp2f(__x); } @@ -561,7 +620,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION exp2(_Tp __x) { return __builtin_exp2(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float expm1(float __x) { return __builtin_expm1f(__x); } @@ -577,33 +636,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION expm1(_Tp __x) { return __builtin_expm1(__x); } - // Note: we deal with fabs in a special way, because an using std::fabs - // would bring in also the overloads for complex types, which in C++0x - // mode have a different return type. - // With __CORRECT_ISO_CPP_MATH_H_PROTO, math.h imports std::fabs in the - // global namespace after the declarations of the float / double / long - // double overloads but before the std::complex overloads. - using ::fabs; - -#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO - inline float - fabs(float __x) - { return __builtin_fabsf(__x); } - - inline long double - fabs(long double __x) - { return __builtin_fabsl(__x); } -#endif - - template - inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, - double>::__type - fabs(_Tp __x) - { return __builtin_fabs(__x); } -#endif - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float fdim(float __x, float __y) { return __builtin_fdimf(__x, __y); } @@ -621,9 +654,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return fdim(__type(__x), __type(__y)); } - using std::floor; - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float fma(float __x, float __y, float __z) { return __builtin_fmaf(__x, __y, __z); } @@ -641,7 +672,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return fma(__type(__x), __type(__y), __type(__z)); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float fmax(float __x, float __y) { return __builtin_fmaxf(__x, __y); } @@ -659,7 +690,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return fmax(__type(__x), __type(__y)); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float fmin(float __x, float __y) { return __builtin_fminf(__x, __y); } @@ -677,10 +708,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return fmin(__type(__x), __type(__y)); } - using std::fmod; - using std::frexp; - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float hypot(float __x, float __y) { return __builtin_hypotf(__x, __y); } @@ -698,7 +726,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return hypot(__type(__y), __type(__x)); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline int ilogb(float __x) { return __builtin_ilogbf(__x); } @@ -714,9 +742,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ilogb(_Tp __x) { return __builtin_ilogb(__x); } - using std::ldexp; - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float lgamma(float __x) { return __builtin_lgammaf(__x); } @@ -732,7 +758,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION lgamma(_Tp __x) { return __builtin_lgamma(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline long long llrint(float __x) { return __builtin_llrintf(__x); } @@ -748,7 +774,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION llrint(_Tp __x) { return __builtin_llrint(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline long long llround(float __x) { return __builtin_llroundf(__x); } @@ -764,10 +790,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION llround(_Tp __x) { return __builtin_llround(__x); } - using std::log; - using std::log10; - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float log1p(float __x) { return __builtin_log1pf(__x); } @@ -784,7 +807,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __builtin_log1p(__x); } // DR 568. -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float log2(float __x) { return __builtin_log2f(__x); } @@ -800,7 +823,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION log2(_Tp __x) { return __builtin_log2(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float logb(float __x) { return __builtin_logbf(__x); } @@ -818,7 +841,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __builtin_logb(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline long lrint(float __x) { return __builtin_lrintf(__x); } @@ -834,7 +857,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION lrint(_Tp __x) { return __builtin_lrint(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline long lround(float __x) { return __builtin_lroundf(__x); } @@ -850,7 +873,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION lround(_Tp __x) { return __builtin_lround(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float nearbyint(float __x) { return __builtin_nearbyintf(__x); } @@ -866,7 +889,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION nearbyint(_Tp __x) { return __builtin_nearbyint(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float nextafter(float __x, float __y) { return __builtin_nextafterf(__x, __y); } @@ -884,7 +907,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return nextafter(__type(__x), __type(__y)); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float nexttoward(float __x, long double __y) { return __builtin_nexttowardf(__x, __y); } @@ -900,7 +923,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION nexttoward(_Tp __x, long double __y) { return __builtin_nexttoward(__x, __y); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float remainder(float __x, float __y) { return __builtin_remainderf(__x, __y); } @@ -918,7 +941,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return remainder(__type(__x), __type(__y)); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float remquo(float __x, float __y, int* __pquo) { return __builtin_remquof(__x, __y, __pquo); } @@ -936,7 +959,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return remquo(__type(__x), __type(__y), __pquo); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float rint(float __x) { return __builtin_rintf(__x); } @@ -952,7 +975,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION rint(_Tp __x) { return __builtin_rint(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float round(float __x) { return __builtin_roundf(__x); } @@ -968,7 +991,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION round(_Tp __x) { return __builtin_round(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float scalbln(float __x, long __ex) { return __builtin_scalblnf(__x, __ex); } @@ -984,7 +1007,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION scalbln(_Tp __x, long __ex) { return __builtin_scalbln(__x, __ex); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float scalbn(float __x, int __ex) { return __builtin_scalbnf(__x, __ex); } @@ -1000,13 +1023,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION scalbn(_Tp __x, int __ex) { return __builtin_scalbn(__x, __ex); } - using std::sin; - using std::sinh; - using std::sqrt; - using std::tan; - using std::tanh; - -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float tgamma(float __x) { return __builtin_tgammaf(__x); } @@ -1022,7 +1039,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION tgamma(_Tp __x) { return __builtin_tgamma(__x); } -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float trunc(float __x) { return __builtin_truncf(__x); } @@ -1038,6 +1055,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION trunc(_Tp __x) { return __builtin_trunc(__x); } +#endif // __cplusplus < 201103L + + // @} + #endif _GLIBCXX_END_NAMESPACE_VERSION } @@ -1050,21 +1071,20 @@ namespace tr1 _GLIBCXX_BEGIN_NAMESPACE_VERSION // DR 550. What should the return type of pow(float,int) be? - // NB: C++0x and TR1 != C++03. + // NB: C++11 and TR1 != C++03. - // The std::tr1::pow(double, double) overload cannot be provided - // here, because it would clash with ::pow(double,double) declared - // in , if is included at the same time (raised - // by the fix of PR c++/54537). It is not possible either to use the - // using-declaration 'using ::pow;' here, because if the user code - // has a 'using std::pow;', it would bring the pow(*,int) averloads - // in the tr1 namespace, which is undesirable. Consequently, the - // solution is to forward std::tr1::pow(double,double) to - // std::pow(double,double) via the templatized version below. See + // We cannot do "using std::pow;" because that would bring in unwanted + // pow(*, int) overloads in C++03, with the wrong return type. Instead we + // define all the necessary overloads, but the std::tr1::pow(double, double) + // overload cannot be provided here, because would add it to + // the global namespace where it would clash with ::pow(double,double) from + // libc (revealed by the fix of PR c++/54537). + // The solution is to forward std::tr1::pow(double,double) to + // std::pow(double,double) via the function template below. See // the discussion about this issue here: // http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01278.html -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP inline float pow(float __x, float __y) { return std::pow(__x, __y); } @@ -1082,10 +1102,160 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return std::pow(__type(__x), __type(__y)); } +#if __cplusplus >= 201103L + // We also deal with fabs in a special way, because "using std::fabs;" + // could bring in C++11's std::fabs(const std::complex&) with a + // different return type from std::tr1::fabs(const std::complex&). + // We define the necessary overloads, except std::tr1::fabs(double) which + // could clash with ::fabs(double) from libc. + // The function template handles double as well as integers, forwarding + // to std::fabs. + +#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP + inline float + fabs(float __x) + { return __builtin_fabsf(__x); } + + inline long double + fabs(long double __x) + { return __builtin_fabsl(__x); } +#endif +#endif + + template + inline typename __gnu_cxx::__promote<_Tp>::__type + fabs(_Tp __x) + { return std::fabs(__x); } + +#else // ! C++11 + + // For C++03 just use std::fabs as there is no overload for std::complex<>. + using std::fabs; + +#endif // C++11 + + + _GLIBCXX_END_NAMESPACE_VERSION } } +#if _GLIBCXX_USE_STD_SPEC_FUNCS + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace tr1 +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @defgroup tr1_math_spec_func Mathematical Special Functions + * @ingroup numerics + * + * A collection of advanced mathematical special functions. + * @{ + */ + + using std::assoc_laguerref; + using std::assoc_laguerrel; + using std::assoc_laguerre; + + using std::assoc_legendref; + using std::assoc_legendrel; + using std::assoc_legendre; + + using std::betaf; + using std::betal; + using std::beta; + + using std::comp_ellint_1f; + using std::comp_ellint_1l; + using std::comp_ellint_1; + + using std::comp_ellint_2f; + using std::comp_ellint_2l; + using std::comp_ellint_2; + + using std::comp_ellint_3f; + using std::comp_ellint_3l; + using std::comp_ellint_3; + + using __gnu_cxx::conf_hypergf; + using __gnu_cxx::conf_hypergl; + using __gnu_cxx::conf_hyperg; + + using std::cyl_bessel_if; + using std::cyl_bessel_il; + using std::cyl_bessel_i; + + using std::cyl_bessel_jf; + using std::cyl_bessel_jl; + using std::cyl_bessel_j; + + using std::cyl_bessel_kf; + using std::cyl_bessel_kl; + using std::cyl_bessel_k; + + using std::cyl_neumannf; + using std::cyl_neumannl; + using std::cyl_neumann; + + using std::ellint_1f; + using std::ellint_1l; + using std::ellint_1; + + using std::ellint_2f; + using std::ellint_2l; + using std::ellint_2; + + using std::ellint_3f; + using std::ellint_3l; + using std::ellint_3; + + using std::expintf; + using std::expintl; + using std::expint; + + using std::hermitef; + using std::hermitel; + using std::hermite; + + using __gnu_cxx::hypergf; + using __gnu_cxx::hypergl; + using __gnu_cxx::hyperg; + + using std::laguerref; + using std::laguerrel; + using std::laguerre; + + using std::legendref; + using std::legendrel; + using std::legendre; + + using std::riemann_zetaf; + using std::riemann_zetal; + using std::riemann_zeta; + + using std::sph_besself; + using std::sph_bessell; + using std::sph_bessel; + + using std::sph_legendref; + using std::sph_legendrel; + using std::sph_legendre; + + using std::sph_neumannf; + using std::sph_neumannl; + using std::sph_neumann; + + /* @} */ // tr1_math_spec_func +_GLIBCXX_END_NAMESPACE_VERSION +} +} + +#else // ! _GLIBCXX_USE_STD_SPEC_FUNCS + #include #include #include @@ -1513,5 +1683,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } } +#endif // _GLIBCXX_USE_STD_SPEC_FUNCS #endif // _GLIBCXX_TR1_CMATH diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/complex b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/complex similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/complex rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/complex index f4de867ac..10dce9d1b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/complex +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/complex @@ -1,6 +1,6 @@ // TR1 complex -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -48,17 +48,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using std::acos; using std::asin; using std::atan; + using std::acosh; + using std::asinh; + using std::atanh; #else template std::complex<_Tp> acos(const std::complex<_Tp>&); template std::complex<_Tp> asin(const std::complex<_Tp>&); template std::complex<_Tp> atan(const std::complex<_Tp>&); -#endif - template std::complex<_Tp> acosh(const std::complex<_Tp>&); template std::complex<_Tp> asinh(const std::complex<_Tp>&); template std::complex<_Tp> atanh(const std::complex<_Tp>&); +#endif - // The std::fabs return type in C++0x mode is different (just _Tp). + // The std::fabs return type in C++11 mode is different (just _Tp). template std::complex<_Tp> fabs(const std::complex<_Tp>&); #if __cplusplus < 201103L @@ -178,8 +180,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __complex_atan(__z); } #endif -#endif // C++11 - template std::complex<_Tp> __complex_acosh(const std::complex<_Tp>& __z) @@ -299,6 +299,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __complex_atanh(__z); } #endif +#endif // C++11 + template inline std::complex<_Tp> /// fabs(__z) [8.1.8]. @@ -373,7 +375,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline std::complex<_Tp> conj(const std::complex<_Tp>& __z) - { return std::conj(__z); } + { return std::conj(__z); } template inline std::complex::__type> diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/complex.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/complex.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/complex.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/complex.h index 5c4883773..2f5dd4896 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/complex.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/complex.h @@ -1,6 +1,6 @@ // TR1 complex.h -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdarg b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdarg similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdarg rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdarg index 983637d65..d7cf8b47f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdarg +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdarg @@ -1,6 +1,6 @@ // TR1 cstdarg -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdbool b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdbool similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdbool rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdbool index ad8975a6f..f2fb6dd24 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdbool +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdbool @@ -1,6 +1,6 @@ // TR1 cstdbool -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdint b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdint similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdint rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdint index d9927bd41..f883c26ca 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdint +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdint @@ -1,6 +1,6 @@ // TR1 cstdint -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdio b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdio similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdio rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdio index 768182300..b4553e932 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdio +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdio @@ -1,6 +1,6 @@ // TR1 cstdio -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -33,7 +33,7 @@ #include -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDIO namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdlib b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdlib similarity index 93% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdlib rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdlib index c3c65eb8f..9d5bd732d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cstdlib +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cstdlib @@ -1,6 +1,6 @@ // TR1 cstdlib -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -35,7 +35,7 @@ #if _GLIBCXX_HOSTED -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDLIB namespace std _GLIBCXX_VISIBILITY(default) { @@ -65,7 +65,7 @@ namespace tr1 } } -#endif // _GLIBCXX_USE_C99 +#endif // _GLIBCXX_USE_C99_STDLIB #endif // _GLIBCXX_HOSTED diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ctgmath b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ctgmath similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ctgmath rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ctgmath index 3eecdd339..bbb89706c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ctgmath +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ctgmath @@ -1,6 +1,6 @@ // TR1 ctgmath -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ctime b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ctime similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ctime rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ctime index 9df275217..2206a9fc7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ctime +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ctime @@ -1,6 +1,6 @@ // TR1 ctime -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ctype.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ctype.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ctype.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ctype.h index 55d0e6494..1d6a55ccf 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ctype.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ctype.h @@ -1,6 +1,6 @@ // TR1 ctype.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cwchar b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cwchar similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cwchar rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cwchar index 10772ee27..deaf92d63 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cwchar +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cwchar @@ -1,6 +1,6 @@ // TR1 cwchar -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -52,7 +52,7 @@ namespace tr1 using std::vwscanf; #endif -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_WCHAR using std::wcstold; using std::wcstoll; using std::wcstoull; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cwctype b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cwctype similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cwctype rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cwctype index 8405261cd..9a207c876 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/cwctype +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/cwctype @@ -1,6 +1,6 @@ // TR1 cwctype -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ell_integral.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ell_integral.tcc similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ell_integral.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ell_integral.tcc index c17f3595e..01f9313a2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/ell_integral.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/ell_integral.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -44,8 +44,13 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +#else +# error do not include this header directly, use or +#endif // [5.2] Special functions // Implementation-space details. @@ -742,8 +747,10 @@ namespace tr1 } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} + } // namespace __detail +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_ELL_INTEGRAL_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/exp_integral.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/exp_integral.tcc similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/exp_integral.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/exp_integral.tcc index b327e7d46..f33f234e6 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/exp_integral.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/exp_integral.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -49,8 +49,13 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +#else +# error do not include this header directly, use or +#endif // [5.2] Special functions // Implementation-space details. @@ -519,8 +524,10 @@ namespace tr1 } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} + } // namespace __detail +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_EXP_INTEGRAL_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/fenv.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/fenv.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/fenv.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/fenv.h index a484f357b..3a14362d3 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/fenv.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/fenv.h @@ -1,6 +1,6 @@ // TR1 fenv.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/float.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/float.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/float.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/float.h index 3bdce1351..6b6b9c68e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/float.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/float.h @@ -1,6 +1,6 @@ // TR1 float.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/functional b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/functional similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/functional rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/functional index 0ca858514..256f94d8a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/functional +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/functional @@ -1,6 +1,6 @@ // TR1 functional header -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/functional_hash.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/functional_hash.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/functional_hash.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/functional_hash.h index c642c18b5..acc766ddd 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/functional_hash.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/functional_hash.h @@ -1,6 +1,6 @@ // TR1 functional_hash.h header -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -83,6 +83,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Fowler / Noll / Vo (FNV) Hash (type FNV-1a) // (Used by the next specializations of std::tr1::hash.) + // N.B. These functions should work on unsigned char, otherwise they do not + // correctly implement the FNV-1a algorithm (see PR59406). + // The existing behaviour is retained for backwards compatibility. + /// Dummy generic implementation (for sizeof(size_t) != 4, 8). template struct _Fnv_hash_base diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/gamma.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/gamma.tcc similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/gamma.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/gamma.tcc index 187e00d1a..dbbca1e9e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/gamma.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/gamma.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -46,12 +46,19 @@ #ifndef _GLIBCXX_TR1_GAMMA_TCC #define _GLIBCXX_TR1_GAMMA_TCC 1 -#include "special_function_util.h" +#include namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +# define _GLIBCXX_MATH_NS ::std +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +# define _GLIBCXX_MATH_NS ::std::tr1 +#else +# error do not include this header directly, use or +#endif // Implementation-space details. namespace __detail { @@ -282,9 +289,9 @@ namespace tr1 = std::numeric_limits<_Tp>::max_exponent10 * std::log(_Tp(10)) - _Tp(1); #if _GLIBCXX_USE_C99_MATH_TR1 - _Tp __coeff = std::tr1::lgamma(_Tp(1 + __n)) - - std::tr1::lgamma(_Tp(1 + __k)) - - std::tr1::lgamma(_Tp(1 + __n - __k)); + _Tp __coeff = _GLIBCXX_MATH_NS::lgamma(_Tp(1 + __n)) + - _GLIBCXX_MATH_NS::lgamma(_Tp(1 + __k)) + - _GLIBCXX_MATH_NS::lgamma(_Tp(1 + __n - __k)); #else _Tp __coeff = __log_gamma(_Tp(1 + __n)) - __log_gamma(_Tp(1 + __k)) @@ -449,7 +456,7 @@ namespace tr1 { const _Tp __hzeta = __hurwitz_zeta(_Tp(__n + 1), __x); #if _GLIBCXX_USE_C99_MATH_TR1 - const _Tp __ln_nfact = std::tr1::lgamma(_Tp(__n + 1)); + const _Tp __ln_nfact = _GLIBCXX_MATH_NS::lgamma(_Tp(__n + 1)); #else const _Tp __ln_nfact = __log_gamma(_Tp(__n + 1)); #endif @@ -461,9 +468,12 @@ namespace tr1 } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} -} + } // namespace __detail +#undef _GLIBCXX_MATH_NS +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif +} // namespace std #endif // _GLIBCXX_TR1_GAMMA_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/hashtable.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/hashtable.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/hashtable.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/hashtable.h index c1a82698f..8dc7a41ad 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/hashtable.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/hashtable.h @@ -1,6 +1,6 @@ // TR1 hashtable.h header -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/hashtable_policy.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/hashtable_policy.h similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/hashtable_policy.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/hashtable_policy.h index 0ad8cfd88..f44d0cf9a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/hashtable_policy.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/hashtable_policy.h @@ -1,6 +1,6 @@ // Internal policy header for TR1 unordered_set and unordered_map -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -420,8 +420,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Prime_rehash_policy:: _M_next_bkt(std::size_t __n) const { - const unsigned long* __p = std::lower_bound(__prime_list, __prime_list - + _S_n_primes, __n); + // Don't include the last prime in the search, so that anything + // higher than the second-to-last prime returns a past-the-end + // iterator that can be dereferenced to get the last prime. + const unsigned long* __p + = std::lower_bound(__prime_list, __prime_list + _S_n_primes - 1, __n); _M_next_resize = static_cast(__builtin_ceil(*__p * _M_max_load_factor)); return *__p; @@ -434,11 +437,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_bkt_for_elements(std::size_t __n) const { const float __min_bkts = __n / _M_max_load_factor; - const unsigned long* __p = std::lower_bound(__prime_list, __prime_list - + _S_n_primes, __min_bkts); - _M_next_resize = - static_cast(__builtin_ceil(*__p * _M_max_load_factor)); - return *__p; + return _M_next_bkt(__builtin_ceil(__min_bkts)); } // Finds the smallest prime p such that alpha p > __n_elt + __n_ins. @@ -462,12 +461,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__min_bkts > __n_bkt) { __min_bkts = std::max(__min_bkts, _M_growth_factor * __n_bkt); - const unsigned long* __p = - std::lower_bound(__prime_list, __prime_list + _S_n_primes, - __min_bkts); - _M_next_resize = static_cast - (__builtin_ceil(*__p * _M_max_load_factor)); - return std::make_pair(true, *__p); + return std::make_pair(true, + _M_next_bkt(__builtin_ceil(__min_bkts))); } else { diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/hypergeometric.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/hypergeometric.tcc similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/hypergeometric.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/hypergeometric.tcc index f1a4021aa..49af5f98d 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/hypergeometric.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/hypergeometric.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -43,8 +43,15 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +# define _GLIBCXX_MATH_NS ::std +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +# define _GLIBCXX_MATH_NS ::std::tr1 +#else +# error do not include this header directly, use or +#endif // [5.2] Special functions // Implementation-space details. @@ -222,7 +229,7 @@ namespace tr1 __conf_hyperg(_Tp __a, _Tp __c, _Tp __x) { #if _GLIBCXX_USE_C99_MATH_TR1 - const _Tp __c_nint = std::tr1::nearbyint(__c); + const _Tp __c_nint = _GLIBCXX_MATH_NS::nearbyint(__c); #else const _Tp __c_nint = static_cast(__c + _Tp(0.5L)); #endif @@ -723,9 +730,9 @@ namespace tr1 __hyperg(_Tp __a, _Tp __b, _Tp __c, _Tp __x) { #if _GLIBCXX_USE_C99_MATH_TR1 - const _Tp __a_nint = std::tr1::nearbyint(__a); - const _Tp __b_nint = std::tr1::nearbyint(__b); - const _Tp __c_nint = std::tr1::nearbyint(__c); + const _Tp __a_nint = _GLIBCXX_MATH_NS::nearbyint(__a); + const _Tp __b_nint = _GLIBCXX_MATH_NS::nearbyint(__b); + const _Tp __c_nint = _GLIBCXX_MATH_NS::nearbyint(__c); #else const _Tp __a_nint = static_cast(__a + _Tp(0.5L)); const _Tp __b_nint = static_cast(__b + _Tp(0.5L)); @@ -768,8 +775,11 @@ namespace tr1 } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} + } // namespace __detail +#undef _GLIBCXX_MATH_NS +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_HYPERGEOMETRIC_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/inttypes.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/inttypes.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/inttypes.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/inttypes.h index 65429b85c..0fa409d8e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/inttypes.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/inttypes.h @@ -1,6 +1,6 @@ // TR1 inttypes.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/legendre_function.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/legendre_function.tcc similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/legendre_function.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/legendre_function.tcc index 7db82e3af..ea2a511d9 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/legendre_function.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/legendre_function.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -48,8 +48,15 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +# define _GLIBCXX_MATH_NS ::std +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +# define _GLIBCXX_MATH_NS ::std::tr1 +#else +# error do not include this header directly, use or +#endif // [5.2] Special functions // Implementation-space details. @@ -243,14 +250,14 @@ namespace tr1 const _Tp __sgn = ( __m % 2 == 1 ? -_Tp(1) : _Tp(1)); const _Tp __y_mp1m_factor = __x * std::sqrt(_Tp(2 * __m + 3)); #if _GLIBCXX_USE_C99_MATH_TR1 - const _Tp __lncirc = std::tr1::log1p(-__x * __x); + const _Tp __lncirc = _GLIBCXX_MATH_NS::log1p(-__x * __x); #else const _Tp __lncirc = std::log(_Tp(1) - __x * __x); #endif // Gamma(m+1/2) / Gamma(m) #if _GLIBCXX_USE_C99_MATH_TR1 - const _Tp __lnpoch = std::tr1::lgamma(_Tp(__m + _Tp(0.5L))) - - std::tr1::lgamma(_Tp(__m)); + const _Tp __lnpoch = _GLIBCXX_MATH_NS::lgamma(_Tp(__m + _Tp(0.5L))) + - _GLIBCXX_MATH_NS::lgamma(_Tp(__m)); #else const _Tp __lnpoch = __log_gamma(_Tp(__m + _Tp(0.5L))) - __log_gamma(_Tp(__m)); @@ -296,8 +303,11 @@ namespace tr1 } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} + } // namespace __detail +#undef _GLIBCXX_MATH_NS +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_LEGENDRE_FUNCTION_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/limits.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/limits.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/limits.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/limits.h index d3d7f602a..107e3ebb7 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/limits.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/limits.h @@ -1,6 +1,6 @@ // TR1 limits.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/math.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/math.h similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/math.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/math.h index 62c48a2e9..382ffd13c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/math.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/math.h @@ -1,6 +1,6 @@ // TR1 math.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/memory b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/memory similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/memory rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/memory index 274788bde..137ca5b4e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/memory +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/memory @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/modified_bessel_func.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/modified_bessel_func.tcc similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/modified_bessel_func.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/modified_bessel_func.tcc index 215d464f7..d21e3c7de 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/modified_bessel_func.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/modified_bessel_func.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -50,8 +50,13 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +#else +# error do not include this header directly, use or +#endif // [5.2] Special functions // Implementation-space details. @@ -427,8 +432,10 @@ namespace tr1 } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} + } // namespace __detail +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_MODIFIED_BESSEL_FUNC_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/poly_hermite.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/poly_hermite.tcc similarity index 91% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/poly_hermite.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/poly_hermite.tcc index 4fb1a149a..80ea2187e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/poly_hermite.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/poly_hermite.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -41,8 +41,13 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +#else +# error do not include this header directly, use or +#endif // [5.2] Special functions // Implementation-space details. @@ -117,8 +122,10 @@ namespace tr1 } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} + } // namespace __detail +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_POLY_HERMITE_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/poly_laguerre.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/poly_laguerre.tcc similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/poly_laguerre.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/poly_laguerre.tcc index 16a4adbd0..0c33c0320 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/poly_laguerre.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/poly_laguerre.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -43,8 +43,15 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +# define _GLIBCXX_MATH_NS ::std +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +# define _GLIBCXX_MATH_NS ::std::tr1 +#else +# error do not include this header directly, use or +#endif // [5.2] Special functions // Implementation-space details. @@ -80,8 +87,8 @@ namespace tr1 * __eta * __eta * __cos2th * __sin2th; #if _GLIBCXX_USE_C99_MATH_TR1 - const _Tp __lg_b = std::tr1::lgamma(_Tp(__n) + __b); - const _Tp __lnfact = std::tr1::lgamma(_Tp(__n + 1)); + const _Tp __lg_b = _GLIBCXX_MATH_NS::lgamma(_Tp(__n) + __b); + const _Tp __lnfact = _GLIBCXX_MATH_NS::lgamma(_Tp(__n + 1)); #else const _Tp __lg_b = __log_gamma(_Tp(__n) + __b); const _Tp __lnfact = __log_gamma(_Tp(__n + 1)); @@ -312,8 +319,11 @@ namespace tr1 { return __poly_laguerre(__n, 0, __x); } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} + } // namespace __detail +#undef _GLIBCXX_MATH_NS +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_POLY_LAGUERRE_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/random b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/random similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/random rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/random index 3b3b046e3..c982ba722 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/random +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/random @@ -1,6 +1,6 @@ // random number generation -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/random.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/random.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/random.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/random.h index 41478472c..67654a8bb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/random.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/random.h @@ -1,6 +1,6 @@ // random number generation -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/random.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/random.tcc similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/random.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/random.tcc index a1589b695..265bd0bc2 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/random.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/random.tcc @@ -1,6 +1,6 @@ // random number generation (out of line) -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/regex b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/regex similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/regex rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/regex index 37a81ce51..bfb5ef770 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/regex +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/regex @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/riemann_zeta.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/riemann_zeta.tcc similarity index 91% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/riemann_zeta.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/riemann_zeta.tcc index 19def7029..b4992f265 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/riemann_zeta.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/riemann_zeta.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -46,8 +46,15 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +# define _GLIBCXX_MATH_NS ::std +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +# define _GLIBCXX_MATH_NS ::std::tr1 +#else +# error do not include this header directly, use or +#endif // [5.2] Special functions // Implementation-space details. @@ -163,7 +170,7 @@ namespace tr1 if (__s < _Tp(0)) { #if _GLIBCXX_USE_C99_MATH_TR1 - if (std::tr1::fmod(__s,_Tp(2)) == _Tp(0)) + if (_GLIBCXX_MATH_NS::fmod(__s,_Tp(2)) == _Tp(0)) return _Tp(0); else #endif @@ -173,7 +180,7 @@ namespace tr1 * __numeric_constants<_Tp>::__pi(), __s) * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) #if _GLIBCXX_USE_C99_MATH_TR1 - * std::exp(std::tr1::lgamma(_Tp(1) - __s)) + * std::exp(_GLIBCXX_MATH_NS::lgamma(_Tp(1) - __s)) #else * std::exp(__log_gamma(_Tp(1) - __s)) #endif @@ -192,9 +199,9 @@ namespace tr1 for (unsigned int __j = 0; __j <= __i; ++__j) { #if _GLIBCXX_USE_C99_MATH_TR1 - _Tp __bincoeff = std::tr1::lgamma(_Tp(1 + __i)) - - std::tr1::lgamma(_Tp(1 + __j)) - - std::tr1::lgamma(_Tp(1 + __i - __j)); + _Tp __bincoeff = _GLIBCXX_MATH_NS::lgamma(_Tp(1 + __i)) + - _GLIBCXX_MATH_NS::lgamma(_Tp(1 + __j)) + - _GLIBCXX_MATH_NS::lgamma(_Tp(1 + __i - __j)); #else _Tp __bincoeff = __log_gamma(_Tp(1 + __i)) - __log_gamma(_Tp(1 + __j)) @@ -297,7 +304,7 @@ namespace tr1 __zeta *= std::pow(_Tp(2) * __numeric_constants<_Tp>::__pi(), __s) * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) #if _GLIBCXX_USE_C99_MATH_TR1 - * std::exp(std::tr1::lgamma(_Tp(1) - __s)) + * std::exp(_GLIBCXX_MATH_NS::lgamma(_Tp(1) - __s)) #else * std::exp(__log_gamma(_Tp(1) - __s)) #endif @@ -320,7 +327,7 @@ namespace tr1 * __numeric_constants<_Tp>::__pi(), __s) * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) #if _GLIBCXX_USE_C99_MATH_TR1 - * std::tr1::tgamma(_Tp(1) - __s) + * _GLIBCXX_MATH_NS::tgamma(_Tp(1) - __s) #else * std::exp(__log_gamma(_Tp(1) - __s)) #endif @@ -375,9 +382,9 @@ namespace tr1 for (unsigned int __j = 0; __j <= __i; ++__j) { #if _GLIBCXX_USE_C99_MATH_TR1 - _Tp __bincoeff = std::tr1::lgamma(_Tp(1 + __i)) - - std::tr1::lgamma(_Tp(1 + __j)) - - std::tr1::lgamma(_Tp(1 + __i - __j)); + _Tp __bincoeff = _GLIBCXX_MATH_NS::lgamma(_Tp(1 + __i)) + - _GLIBCXX_MATH_NS::lgamma(_Tp(1 + __j)) + - _GLIBCXX_MATH_NS::lgamma(_Tp(1 + __i - __j)); #else _Tp __bincoeff = __log_gamma(_Tp(1 + __i)) - __log_gamma(_Tp(1 + __j)) @@ -426,8 +433,11 @@ namespace tr1 { return __hurwitz_zeta_glob(__a, __s); } _GLIBCXX_END_NAMESPACE_VERSION - } // namespace std::tr1::__detail -} + } // namespace __detail +#undef _GLIBCXX_MATH_NS +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_RIEMANN_ZETA_TCC diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/shared_ptr.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/shared_ptr.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/shared_ptr.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/shared_ptr.h index ebb9d3621..f702cd689 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/shared_ptr.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/shared_ptr.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -145,8 +145,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // See http://gcc.gnu.org/ml/libstdc++/2005-11/msg00136.html if (_Mutex_base<_Lp>::_S_need_barriers) { - _GLIBCXX_READ_MEM_BARRIER; - _GLIBCXX_WRITE_MEM_BARRIER; + __atomic_thread_fence (__ATOMIC_ACQ_REL); } // Be race-detector-friendly. For more info see bits/c++config. @@ -176,8 +175,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { // See _M_release(), // destroy() must observe results of dispose() - _GLIBCXX_READ_MEM_BARRIER; - _GLIBCXX_WRITE_MEM_BARRIER; + __atomic_thread_fence (__ATOMIC_ACQ_REL); } _M_destroy(); } diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/special_function_util.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/special_function_util.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/special_function_util.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/special_function_util.h index 9b7cd6530..9d40a16ca 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/special_function_util.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/special_function_util.h @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -38,8 +38,13 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if _GLIBCXX_USE_STD_SPEC_FUNCS +#elif defined(_GLIBCXX_TR1_CMATH) namespace tr1 { +#else +# error do not include this header directly, use or +#endif namespace __detail { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -128,7 +133,9 @@ namespace tr1 _GLIBCXX_END_NAMESPACE_VERSION } // namespace __detail -} +#if ! _GLIBCXX_USE_STD_SPEC_FUNCS && defined(_GLIBCXX_TR1_CMATH) +} // namespace tr1 +#endif } #endif // _GLIBCXX_TR1_SPECIAL_FUNCTION_UTIL_H diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdarg.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdarg.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdarg.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdarg.h index 75da1caec..759729e6f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdarg.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdarg.h @@ -1,6 +1,6 @@ // TR1 stdarg.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdbool.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdbool.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdbool.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdbool.h index db94af6ed..1e74c139b 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdbool.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdbool.h @@ -1,6 +1,6 @@ // TR1 stdbool.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdint.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdint.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdint.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdint.h index 20144eb39..073e10f04 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdint.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdint.h @@ -1,6 +1,6 @@ // TR1 stdint.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdio.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdio.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdio.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdio.h index f4662f53e..437cf1394 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdio.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdio.h @@ -1,6 +1,6 @@ // TR1 stdio.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdlib.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdlib.h similarity index 94% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdlib.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdlib.h index 310c7bc67..7b8080abb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/stdlib.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/stdlib.h @@ -1,6 +1,6 @@ // TR1 stdlib.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -33,7 +33,7 @@ #if _GLIBCXX_HOSTED -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_STDLIB using std::tr1::atoll; using std::tr1::strtoll; diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/tgmath.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/tgmath.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/tgmath.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/tgmath.h index 31286082a..c782df8fc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/tgmath.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/tgmath.h @@ -1,6 +1,6 @@ // TR1 tgmath.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/tuple b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/tuple similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/tuple rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/tuple index eab59df41..fe53a8b99 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/tuple +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/tuple @@ -1,6 +1,6 @@ // class template tuple -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/type_traits b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/type_traits similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/type_traits rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/type_traits index 638c856eb..abdb83b48 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/type_traits +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/type_traits @@ -1,6 +1,6 @@ // TR1 type_traits -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_map b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_map similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_map rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_map index afe5dabf7..59edbbadd 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_map +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_map @@ -1,6 +1,6 @@ // TR1 unordered_map -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_map.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_map.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_map.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_map.h index c33a2dd6c..34776aeea 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_map.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_map.h @@ -1,6 +1,6 @@ // TR1 unordered_map implementation -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_set b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_set similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_set rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_set index 2a264c39e..f4bbe826f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_set +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_set @@ -1,6 +1,6 @@ // TR1 unordered_set -*- C++ -*- -// Copyright (C) 2005-2015 Free Software Foundation, Inc. +// Copyright (C) 2005-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_set.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_set.h similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_set.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_set.h index 68459f7e2..f9d04901c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/unordered_set.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/unordered_set.h @@ -1,6 +1,6 @@ // TR1 unordered_set implementation -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/utility b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/utility similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/utility rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/utility index 83f8c1017..91076d988 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/utility +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/utility @@ -1,6 +1,6 @@ // TR1 utility -*- C++ -*- -// Copyright (C) 2004-2015 Free Software Foundation, Inc. +// Copyright (C) 2004-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/wchar.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/wchar.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/wchar.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/wchar.h index f62203c1a..583738f4f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/wchar.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/wchar.h @@ -1,6 +1,6 @@ // TR1 wchar.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/wctype.h b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/wctype.h similarity index 95% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/wctype.h rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/wctype.h index 8e49c7d72..9c77d315a 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr1/wctype.h +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr1/wctype.h @@ -1,6 +1,6 @@ // TR1 wctype.h -*- C++ -*- -// Copyright (C) 2006-2015 Free Software Foundation, Inc. +// Copyright (C) 2006-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/bool_set b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/bool_set similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/bool_set rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/bool_set index 08ff30841..9d55b3c0e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/bool_set +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/bool_set @@ -1,6 +1,6 @@ // TR2 -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/bool_set.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/bool_set.tcc similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/bool_set.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/bool_set.tcc index f627c27d7..a5fd898a8 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/bool_set.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/bool_set.tcc @@ -1,6 +1,6 @@ // TR2 support files -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/dynamic_bitset b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/dynamic_bitset similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/dynamic_bitset rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/dynamic_bitset index 183179f25..ff4e5887e 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/dynamic_bitset +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/dynamic_bitset @@ -1,6 +1,6 @@ // TR2 -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -593,6 +593,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @param __str A string of '0' and '1' characters. * @param __pos Index of the first character in @p __str to use. * @param __n The number of characters to copy. + * @param __zero The character to use for unset bits. + * @param __one The character to use for set bits. + * @param __alloc An allocator. * @throw std::out_of_range If @p __pos is bigger the size of @p __str. * @throw std::invalid_argument If a character appears in the string * which is neither '0' nor '1'. diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/dynamic_bitset.tcc b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/dynamic_bitset.tcc similarity index 99% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/dynamic_bitset.tcc rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/dynamic_bitset.tcc index 6a5b2b5ea..7b64580cc 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/dynamic_bitset.tcc +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/dynamic_bitset.tcc @@ -1,6 +1,6 @@ // TR2 -*- C++ -*- -// Copyright (C) 2009-2015 Free Software Foundation, Inc. +// Copyright (C) 2009-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/ratio b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/ratio similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/ratio rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/ratio index 801cdfb7f..c0a2d4d30 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/ratio +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/ratio @@ -1,6 +1,6 @@ // TR2 -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/type_traits b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/type_traits similarity index 97% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/type_traits rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/type_traits index 63a1355bf..35f621500 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tr2/type_traits +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tr2/type_traits @@ -1,6 +1,6 @@ // TR2 -*- C++ -*- -// Copyright (C) 2011-2015 Free Software Foundation, Inc. +// Copyright (C) 2011-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/tuple b/devkitARM/arm-none-eabi/include/c++/7.1.0/tuple similarity index 55% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/tuple rename to devkitARM/arm-none-eabi/include/c++/7.1.0/tuple index e500a762d..1f5365ad0 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/tuple +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/tuple @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -38,6 +38,7 @@ #include #include #include +#include namespace std _GLIBCXX_VISIBILITY(default) { @@ -48,7 +49,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @{ */ - template + template + class tuple; + + template + struct __is_empty_non_tuple : is_empty<_Tp> { }; + + // Using EBO for elements that are tuples causes ambiguous base errors. + template + struct __is_empty_non_tuple> : false_type { }; + + // Use the Empty Base-class Optimization for empty, non-final types. + template + using __empty_not_final + = typename conditional<__is_final(_Tp), false_type, + __is_empty_non_tuple<_Tp>>::type; + + template::value> struct _Head_base; template @@ -156,20 +174,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * get() operation. */ template - struct _Tuple_impl; - - template - struct __is_empty_non_tuple : is_empty<_Tp> { }; - - // Using EBO for elements that are tuples causes ambiguous base errors. - template - struct __is_empty_non_tuple> : false_type { }; - - // Use the Empty Base-class Optimization for empty, non-final types. - template - using __empty_not_final - = typename conditional<__is_final(_Tp), false_type, - __is_empty_non_tuple<_Tp>>::type; + struct _Tuple_impl; /** * Recursive tuple implementation. Here we store the @c Head element @@ -179,14 +184,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct _Tuple_impl<_Idx, _Head, _Tail...> : public _Tuple_impl<_Idx + 1, _Tail...>, - private _Head_base<_Idx, _Head, __empty_not_final<_Head>::value> + private _Head_base<_Idx, _Head> { template friend class _Tuple_impl; typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; - typedef _Head_base<_Idx, _Head, __empty_not_final<_Head>::value> _Base; + typedef _Head_base<_Idx, _Head> _Base; - static constexpr _Head& + static constexpr _Head& _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } static constexpr const _Head& @@ -201,12 +206,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr _Tuple_impl() : _Inherited(), _Base() { } - explicit + explicit constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail) : _Inherited(__tail...), _Base(__head) { } template::type> + enable_if::type> explicit constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) : _Inherited(std::forward<_UTail>(__tail)...), @@ -218,7 +223,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Tuple_impl(_Tuple_impl&& __in) noexcept(__and_, is_nothrow_move_constructible<_Inherited>>::value) - : _Inherited(std::move(_M_tail(__in))), + : _Inherited(std::move(_M_tail(__in))), _Base(std::forward<_Head>(_M_head(__in))) { } template @@ -256,13 +261,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl& __in) - : _Inherited(__tag, __a, _M_tail(__in)), + : _Inherited(__tag, __a, _M_tail(__in)), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } template _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl&& __in) - : _Inherited(__tag, __a, std::move(_M_tail(__in))), + : _Inherited(__tag, __a, std::move(_M_tail(__in))), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), std::forward<_Head>(_M_head(__in))) { } @@ -324,9 +329,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION protected: void _M_swap(_Tuple_impl& __in) - noexcept(noexcept(swap(std::declval<_Head&>(), - std::declval<_Head&>())) - && noexcept(_M_tail(__in)._M_swap(_M_tail(__in)))) + noexcept(__is_nothrow_swappable<_Head>::value + && noexcept(_M_tail(__in)._M_swap(_M_tail(__in)))) { using std::swap; swap(_M_head(*this), _M_head(__in)); @@ -337,11 +341,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Basis case of inheritance recursion. template struct _Tuple_impl<_Idx, _Head> - : private _Head_base<_Idx, _Head, __empty_not_final<_Head>::value> + : private _Head_base<_Idx, _Head> { template friend class _Tuple_impl; - typedef _Head_base<_Idx, _Head, __empty_not_final<_Head>::value> _Base; + typedef _Head_base<_Idx, _Head> _Base; static constexpr _Head& _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } @@ -451,70 +455,314 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION protected: void _M_swap(_Tuple_impl& __in) - noexcept(noexcept(swap(std::declval<_Head&>(), std::declval<_Head&>()))) + noexcept(__is_nothrow_swappable<_Head>::value) { using std::swap; swap(_M_head(*this), _M_head(__in)); } }; + // Concept utility functions, reused in conditionally-explicit + // constructors. + template + struct _TC + { + template + static constexpr bool _ConstructibleTuple() + { + return __and_...>::value; + } + + template + static constexpr bool _ImplicitlyConvertibleTuple() + { + return __and_...>::value; + } + + template + static constexpr bool _MoveConstructibleTuple() + { + return __and_...>::value; + } + + template + static constexpr bool _ImplicitlyMoveConvertibleTuple() + { + return __and_...>::value; + } + + template + static constexpr bool _NonNestedTuple() + { + return __and_<__not_, + typename remove_cv< + typename remove_reference<_SrcTuple>::type + >::type>>, + __not_>, + __not_> + >::value; + } + template + static constexpr bool _NotSameTuple() + { + return __not_, + typename remove_const< + typename remove_reference<_UElements...>::type + >::type>>::value; + } + }; + + template + struct _TC + { + template + static constexpr bool _ConstructibleTuple() + { + return false; + } + + template + static constexpr bool _ImplicitlyConvertibleTuple() + { + return false; + } + + template + static constexpr bool _MoveConstructibleTuple() + { + return false; + } + + template + static constexpr bool _ImplicitlyMoveConvertibleTuple() + { + return false; + } + + template + static constexpr bool _NonNestedTuple() + { + return true; + } + template + static constexpr bool _NotSameTuple() + { + return true; + } + }; + /// Primary class template, tuple - template + template class tuple : public _Tuple_impl<0, _Elements...> { typedef _Tuple_impl<0, _Elements...> _Inherited; + // Used for constraining the default constructor so + // that it becomes dependent on the constraints. + template + struct _TC2 + { + static constexpr bool _DefaultConstructibleTuple() + { + return __and_...>::value; + } + static constexpr bool _ImplicitlyDefaultConstructibleTuple() + { + return __and_<__is_implicitly_default_constructible<_Elements>...> + ::value; + } + }; + public: + template:: + _ImplicitlyDefaultConstructibleTuple(), + bool>::type = true> constexpr tuple() : _Inherited() { } - explicit - constexpr tuple(const _Elements&... __elements) + template:: + _DefaultConstructibleTuple() + && + !_TC2<_Dummy>:: + _ImplicitlyDefaultConstructibleTuple(), + bool>::type = false> + explicit constexpr tuple() + : _Inherited() { } + + // Shortcut for the cases where constructors taking _Elements... + // need to be constrained. + template using _TCC = + _TC::value, + _Elements...>; + + template::template + _ConstructibleTuple<_Elements...>() + && _TCC<_Dummy>::template + _ImplicitlyConvertibleTuple<_Elements...>() + && (sizeof...(_Elements) >= 1), + bool>::type=true> + constexpr tuple(const _Elements&... __elements) : _Inherited(__elements...) { } - template...>::value>::type> - explicit + template::template + _ConstructibleTuple<_Elements...>() + && !_TCC<_Dummy>::template + _ImplicitlyConvertibleTuple<_Elements...>() + && (sizeof...(_Elements) >= 1), + bool>::type=false> + explicit constexpr tuple(const _Elements&... __elements) + : _Inherited(__elements...) { } + + // Shortcut for the cases where constructors taking _UElements... + // need to be constrained. + template using _TMC = + _TC<(sizeof...(_Elements) == sizeof...(_UElements)) + && (_TC<(sizeof...(_UElements)==1), _Elements...>:: + template _NotSameTuple<_UElements...>()), + _Elements...>; + + // Shortcut for the cases where constructors taking tuple<_UElements...> + // need to be constrained. + template using _TMCT = + _TC<(sizeof...(_Elements) == sizeof...(_UElements)) + && !is_same, + tuple<_UElements...>>::value, + _Elements...>; + + template::template + _MoveConstructibleTuple<_UElements...>() + && _TMC<_UElements...>::template + _ImplicitlyMoveConvertibleTuple<_UElements...>() + && (sizeof...(_Elements) >= 1), + bool>::type=true> constexpr tuple(_UElements&&... __elements) + : _Inherited(std::forward<_UElements>(__elements)...) { } + + template::template + _MoveConstructibleTuple<_UElements...>() + && !_TMC<_UElements...>::template + _ImplicitlyMoveConvertibleTuple<_UElements...>() + && (sizeof...(_Elements) >= 1), + bool>::type=false> + explicit constexpr tuple(_UElements&&... __elements) : _Inherited(std::forward<_UElements>(__elements)...) { } constexpr tuple(const tuple&) = default; - constexpr tuple(tuple&&) = default; + constexpr tuple(tuple&&) = default; - template...>::value>::type> + // Shortcut for the cases where constructors taking tuples + // must avoid creating temporaries. + template using _TNTC = + _TC::value && sizeof...(_Elements) == 1, + _Elements...>; + + template::template + _ConstructibleTuple<_UElements...>() + && _TMCT<_UElements...>::template + _ImplicitlyConvertibleTuple<_UElements...>() + && _TNTC<_Dummy>::template + _NonNestedTuple&>(), + bool>::type=true> constexpr tuple(const tuple<_UElements...>& __in) : _Inherited(static_cast&>(__in)) { } - template...>::value>::type> + template::template + _ConstructibleTuple<_UElements...>() + && !_TMCT<_UElements...>::template + _ImplicitlyConvertibleTuple<_UElements...>() + && _TNTC<_Dummy>::template + _NonNestedTuple&>(), + bool>::type=false> + explicit constexpr tuple(const tuple<_UElements...>& __in) + : _Inherited(static_cast&>(__in)) + { } + + template::template + _MoveConstructibleTuple<_UElements...>() + && _TMCT<_UElements...>::template + _ImplicitlyMoveConvertibleTuple<_UElements...>() + && _TNTC<_Dummy>::template + _NonNestedTuple&&>(), + bool>::type=true> constexpr tuple(tuple<_UElements...>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } + template::template + _MoveConstructibleTuple<_UElements...>() + && !_TMCT<_UElements...>::template + _ImplicitlyMoveConvertibleTuple<_UElements...>() + && _TNTC<_Dummy>::template + _NonNestedTuple&&>(), + bool>::type=false> + explicit constexpr tuple(tuple<_UElements...>&& __in) + : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } + // Allocator-extended constructors. template tuple(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a) { } - template + template::template + _ConstructibleTuple<_Elements...>() + && _TCC<_Dummy>::template + _ImplicitlyConvertibleTuple<_Elements...>(), + bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, const _Elements&... __elements) : _Inherited(__tag, __a, __elements...) { } - template::type> + template::template + _ConstructibleTuple<_Elements...>() + && !_TCC<_Dummy>::template + _ImplicitlyConvertibleTuple<_Elements...>(), + bool>::type=false> + explicit tuple(allocator_arg_t __tag, const _Alloc& __a, + const _Elements&... __elements) + : _Inherited(__tag, __a, __elements...) { } + + template::template + _MoveConstructibleTuple<_UElements...>() + && _TMC<_UElements...>::template + _ImplicitlyMoveConvertibleTuple<_UElements...>(), + bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, _UElements&&... __elements) : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) { } + template::template + _MoveConstructibleTuple<_UElements...>() + && !_TMC<_UElements...>::template + _ImplicitlyMoveConvertibleTuple<_UElements...>(), + bool>::type=false> + explicit tuple(allocator_arg_t __tag, const _Alloc& __a, + _UElements&&... __elements) + : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) + { } + template tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) : _Inherited(__tag, __a, static_cast(__in)) { } @@ -523,24 +771,66 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } - template::type> + template::template + _ConstructibleTuple<_UElements...>() + && _TMCT<_UElements...>::template + _ImplicitlyConvertibleTuple<_UElements...>() + && _TNTC<_Dummy>::template + _NonNestedTuple&&>(), + bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_UElements...>& __in) : _Inherited(__tag, __a, static_cast&>(__in)) { } - template::type> + template::template + _ConstructibleTuple<_UElements...>() + && !_TMCT<_UElements...>::template + _ImplicitlyConvertibleTuple<_UElements...>() + && _TNTC<_Dummy>::template + _NonNestedTuple&&>(), + bool>::type=false> + explicit tuple(allocator_arg_t __tag, const _Alloc& __a, + const tuple<_UElements...>& __in) + : _Inherited(__tag, __a, + static_cast&>(__in)) + { } + + template::template + _MoveConstructibleTuple<_UElements...>() + && _TMCT<_UElements...>::template + _ImplicitlyMoveConvertibleTuple<_UElements...>() + && _TNTC<_Dummy>::template + _NonNestedTuple&&>(), + bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_UElements...>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } + template::template + _MoveConstructibleTuple<_UElements...>() + && !_TMCT<_UElements...>::template + _ImplicitlyMoveConvertibleTuple<_UElements...>() + && _TNTC<_Dummy>::template + _NonNestedTuple&&>(), + bool>::type=false> + explicit tuple(allocator_arg_t __tag, const _Alloc& __a, + tuple<_UElements...>&& __in) + : _Inherited(__tag, __a, + static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) + { } + tuple& operator=(const tuple& __in) { @@ -556,20 +846,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } - template + typename enable_if::type> - tuple& + == sizeof...(_Elements), tuple&>::type operator=(const tuple<_UElements...>& __in) { static_cast<_Inherited&>(*this) = __in; return *this; } - template + typename enable_if::type> - tuple& + == sizeof...(_Elements), tuple&>::type operator=(tuple<_UElements...>&& __in) { static_cast<_Inherited&>(*this) = std::move(__in); @@ -582,12 +872,33 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _Inherited::_M_swap(__in); } }; +#if __cpp_deduction_guides >= 201606 + template + tuple(_UTypes...) -> tuple<_UTypes...>; + template + tuple(pair<_T1, _T2>) -> tuple<_T1, _T2>; + template + tuple(allocator_arg_t, _Alloc, _UTypes...) -> tuple<_UTypes...>; + template + tuple(allocator_arg_t, _Alloc, pair<_T1, _T2>) -> tuple<_T1, _T2>; + template + tuple(allocator_arg_t, _Alloc, tuple<_UTypes...>) -> tuple<_UTypes...>; +#endif + // Explicit specialization, zero-element tuple. - template<> + template<> class tuple<> { public: void swap(tuple&) noexcept { /* no-op */ } + // We need the default since we're going to define no-op + // allocator constructors. + tuple() = default; + // No-op allocator constructors. + template + tuple(allocator_arg_t, const _Alloc&) { } + template + tuple(allocator_arg_t, const _Alloc&, const tuple&) { } }; /// Partial specialization, 2-element tuple. @@ -598,65 +909,208 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef _Tuple_impl<0, _T1, _T2> _Inherited; public: + template , + __is_implicitly_default_constructible<_U2>> + ::value, bool>::type = true> + constexpr tuple() : _Inherited() { } - explicit - constexpr tuple(const _T1& __a1, const _T2& __a2) - : _Inherited(__a1, __a2) { } + template , + is_default_constructible<_U2>, + __not_< + __and_<__is_implicitly_default_constructible<_U1>, + __is_implicitly_default_constructible<_U2>>>> + ::value, bool>::type = false> - template, - is_convertible<_U2, _T2>>::value>::type> - explicit + explicit constexpr tuple() + : _Inherited() { } + + // Shortcut for the cases where constructors taking _T1, _T2 + // need to be constrained. + template using _TCC = + _TC::value, _T1, _T2>; + + template::template + _ConstructibleTuple<_T1, _T2>() + && _TCC<_Dummy>::template + _ImplicitlyConvertibleTuple<_T1, _T2>(), + bool>::type = true> + constexpr tuple(const _T1& __a1, const _T2& __a2) + : _Inherited(__a1, __a2) { } + + template::template + _ConstructibleTuple<_T1, _T2>() + && !_TCC<_Dummy>::template + _ImplicitlyConvertibleTuple<_T1, _T2>(), + bool>::type = false> + explicit constexpr tuple(const _T1& __a1, const _T2& __a2) + : _Inherited(__a1, __a2) { } + + // Shortcut for the cases where constructors taking _U1, _U2 + // need to be constrained. + using _TMC = _TC; + + template() + && _TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>() + && !is_same::type, + allocator_arg_t>::value, + bool>::type = true> constexpr tuple(_U1&& __a1, _U2&& __a2) : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } + template() + && !_TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>() + && !is_same::type, + allocator_arg_t>::value, + bool>::type = false> + explicit constexpr tuple(_U1&& __a1, _U2&& __a2) + : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } + constexpr tuple(const tuple&) = default; constexpr tuple(tuple&&) = default; - template, - is_convertible>::value>::type> + template() + && _TMC::template + _ImplicitlyConvertibleTuple<_U1, _U2>(), + bool>::type = true> constexpr tuple(const tuple<_U1, _U2>& __in) : _Inherited(static_cast&>(__in)) { } - template, - is_convertible<_U2, _T2>>::value>::type> + template() + && !_TMC::template + _ImplicitlyConvertibleTuple<_U1, _U2>(), + bool>::type = false> + explicit constexpr tuple(const tuple<_U1, _U2>& __in) + : _Inherited(static_cast&>(__in)) { } + + template() + && _TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), + bool>::type = true> constexpr tuple(tuple<_U1, _U2>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } - template, - is_convertible>::value>::type> + template() + && !_TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), + bool>::type = false> + explicit constexpr tuple(tuple<_U1, _U2>&& __in) + : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } + + template() + && _TMC::template + _ImplicitlyConvertibleTuple<_U1, _U2>(), + bool>::type = true> constexpr tuple(const pair<_U1, _U2>& __in) : _Inherited(__in.first, __in.second) { } - template, - is_convertible<_U2, _T2>>::value>::type> + template() + && !_TMC::template + _ImplicitlyConvertibleTuple<_U1, _U2>(), + bool>::type = false> + explicit constexpr tuple(const pair<_U1, _U2>& __in) + : _Inherited(__in.first, __in.second) { } + + template() + && _TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), + bool>::type = true> constexpr tuple(pair<_U1, _U2>&& __in) : _Inherited(std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } + template() + && !_TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), + bool>::type = false> + explicit constexpr tuple(pair<_U1, _U2>&& __in) + : _Inherited(std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } + // Allocator-extended constructors. template tuple(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a) { } - template + template::template + _ConstructibleTuple<_T1, _T2>() + && _TCC<_Dummy>::template + _ImplicitlyConvertibleTuple<_T1, _T2>(), + bool>::type=true> + tuple(allocator_arg_t __tag, const _Alloc& __a, const _T1& __a1, const _T2& __a2) : _Inherited(__tag, __a, __a1, __a2) { } - template + template::template + _ConstructibleTuple<_T1, _T2>() + && !_TCC<_Dummy>::template + _ImplicitlyConvertibleTuple<_T1, _T2>(), + bool>::type=false> + + explicit tuple(allocator_arg_t __tag, const _Alloc& __a, + const _T1& __a1, const _T2& __a2) + : _Inherited(__tag, __a, __a1, __a2) { } + + template() + && _TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), + bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) : _Inherited(__tag, __a, std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } + template() + && !_TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), + bool>::type = false> + explicit tuple(allocator_arg_t __tag, const _Alloc& __a, + _U1&& __a1, _U2&& __a2) + : _Inherited(__tag, __a, std::forward<_U1>(__a1), + std::forward<_U2>(__a2)) { } + template tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) : _Inherited(__tag, __a, static_cast(__in)) { } @@ -665,28 +1119,92 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } - template + template() + && _TMC::template + _ImplicitlyConvertibleTuple<_U1, _U2>(), + bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_U1, _U2>& __in) : _Inherited(__tag, __a, static_cast&>(__in)) { } - template + template() + && !_TMC::template + _ImplicitlyConvertibleTuple<_U1, _U2>(), + bool>::type = false> + explicit tuple(allocator_arg_t __tag, const _Alloc& __a, + const tuple<_U1, _U2>& __in) + : _Inherited(__tag, __a, + static_cast&>(__in)) + { } + + template() + && _TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), + bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } - template + template() + && !_TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), + bool>::type = false> + explicit tuple(allocator_arg_t __tag, const _Alloc& __a, + tuple<_U1, _U2>&& __in) + : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) + { } + + template() + && _TMC::template + _ImplicitlyConvertibleTuple<_U1, _U2>(), + bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, const pair<_U1, _U2>& __in) : _Inherited(__tag, __a, __in.first, __in.second) { } - template + template() + && !_TMC::template + _ImplicitlyConvertibleTuple<_U1, _U2>(), + bool>::type = false> + explicit tuple(allocator_arg_t __tag, const _Alloc& __a, + const pair<_U1, _U2>& __in) + : _Inherited(__tag, __a, __in.first, __in.second) { } + + template() + && _TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), + bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) : _Inherited(__tag, __a, std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } + template() + && !_TMC::template + _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), + bool>::type = false> + explicit tuple(allocator_arg_t __tag, const _Alloc& __a, + pair<_U1, _U2>&& __in) + : _Inherited(__tag, __a, std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } + tuple& operator=(const tuple& __in) { @@ -743,9 +1261,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; - /// Gives the type of the ith element of a given tuple type. - template - struct tuple_element; + /// class tuple_size + template + struct tuple_size> + : public integral_constant { }; + +#if __cplusplus > 201402L + template + inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value; +#endif /** * Recursive case for tuple_element: strip off the first element in @@ -764,58 +1288,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef _Head type; }; - // Duplicate of C++14's tuple_element_t for internal use in C++11 mode - template - using __tuple_element_t = typename tuple_element<__i, _Tp>::type; - - template - struct tuple_element<__i, const _Tp> + /** + * Error case for tuple_element: invalid index. + */ + template + struct tuple_element<__i, tuple<>> { - typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; + static_assert(__i < tuple_size>::value, + "tuple index is in range"); }; - template - struct tuple_element<__i, volatile _Tp> - { - typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; - }; - - template - struct tuple_element<__i, const volatile _Tp> - { - typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; - }; - -#if __cplusplus > 201103L -#define __cpp_lib_tuple_element_t 201402 - - template - using tuple_element_t = typename tuple_element<__i, _Tp>::type; -#endif - - /// Finds the size of a given tuple type. - template - struct tuple_size; - - // _GLIBCXX_RESOLVE_LIB_DEFECTS - // 2313. tuple_size should always derive from integral_constant - template - struct tuple_size - : integral_constant::value> { }; - - template - struct tuple_size - : integral_constant::value> { }; - - template - struct tuple_size - : integral_constant::value> { }; - - /// class tuple_size - template - struct tuple_size> - : public integral_constant { }; - template constexpr _Head& __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept @@ -890,7 +1372,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return bool(std::get<__i>(__t) == std::get<__i>(__u)) && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u); } - + static constexpr bool __less(const _Tp& __t, const _Up& __u) { @@ -905,7 +1387,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { static constexpr bool __eq(const _Tp&, const _Up&) { return true; } - + static constexpr bool __less(const _Tp&, const _Up&) { return false; } }; @@ -970,34 +1452,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __result_type(std::forward<_Elements>(__args)...); } + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2275. Why is forward_as_tuple not constexpr? template - tuple<_Elements&&...> + constexpr tuple<_Elements&&...> forward_as_tuple(_Elements&&... __args) noexcept { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } - template - struct __is_tuple_like_impl : false_type - { }; - - template - struct __is_tuple_like_impl> : true_type - { }; - - template - struct __is_tuple_like_impl> : true_type - { }; - - template - struct __is_tuple_like_impl> : true_type - { }; - - // Internal type trait that allows us to sfinae-protect tuple_cat. - template - struct __is_tuple_like - : public __is_tuple_like_impl::type>::type>::type - { }; - template struct __make_tuple_impl; @@ -1120,30 +1581,49 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __concater::_S_do(std::forward<_Tpls>(__tpls)...); } + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2301. Why is tie not constexpr? /// tie template - inline tuple<_Elements&...> + constexpr tuple<_Elements&...> tie(_Elements&... __args) noexcept { return tuple<_Elements&...>(__args...); } /// swap template - inline void + inline +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + // Constrained free swap overload, see p0185r1 + typename enable_if<__and_<__is_swappable<_Elements>...>::value + >::type +#else + void +#endif swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + template + typename enable_if...>::value>::type + swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; +#endif + // A class (and instance) which can be used in 'tie' when an element - // of a tuple is not required + // of a tuple is not required. + // _GLIBCXX14_CONSTEXPR + // 2933. PR for LWG 2773 could be clearer struct _Swallow_assign { template - const _Swallow_assign& + _GLIBCXX14_CONSTEXPR const _Swallow_assign& operator=(const _Tp&) const { return *this; } }; - const _Swallow_assign ignore{}; + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2773. Making std::ignore constexpr + _GLIBCXX17_INLINE constexpr _Swallow_assign ignore{}; /// Partial specialization for tuples template @@ -1172,6 +1652,44 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) { } +#if __cplusplus > 201402L +# define __cpp_lib_apply 201603 + + template + constexpr decltype(auto) + __apply_impl(_Fn&& __f, _Tuple&& __t, index_sequence<_Idx...>) + { + return std::__invoke(std::forward<_Fn>(__f), + std::get<_Idx>(std::forward<_Tuple>(__t))...); + } + + template + constexpr decltype(auto) + apply(_Fn&& __f, _Tuple&& __t) + { + using _Indices = make_index_sequence>>; + return std::__apply_impl(std::forward<_Fn>(__f), + std::forward<_Tuple>(__t), + _Indices{}); + } + +#define __cpp_lib_make_from_tuple 201606 + + template + constexpr _Tp + __make_from_tuple_impl(_Tuple&& __t, index_sequence<_Idx...>) + { return _Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...); } + + template + constexpr _Tp + make_from_tuple(_Tuple&& __t) + { + return __make_from_tuple_impl<_Tp>( + std::forward<_Tuple>(__t), + make_index_sequence>>{}); + } +#endif // C++17 + /// @} _GLIBCXX_END_NAMESPACE_VERSION diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/type_traits b/devkitARM/arm-none-eabi/include/c++/7.1.0/type_traits similarity index 68% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/type_traits rename to devkitARM/arm-none-eabi/include/c++/7.1.0/type_traits index 03e198acd..aac7cff6c 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/type_traits +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/type_traits @@ -1,6 +1,6 @@ // C++11 -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -79,7 +79,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr value_type operator()() const { return value; } #endif }; - + template constexpr _Tp integral_constant<_Tp, __v>::value; @@ -92,6 +92,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template using __bool_constant = integral_constant; +#if __cplusplus > 201402L +# define __cpp_lib_bool_constant 201505 + template + using bool_constant = integral_constant; +#endif + // Meta programming helper types. template @@ -148,6 +154,39 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : public integral_constant { }; +#if __cplusplus > 201402L + +#define __cpp_lib_logical_traits 201510 + + template + struct conjunction + : __and_<_Bn...> + { }; + + template + struct disjunction + : __or_<_Bn...> + { }; + + template + struct negation + : __not_<_Pp> + { }; + + template + inline constexpr bool conjunction_v + = conjunction<_Bn...>::value; + + template + inline constexpr bool disjunction_v + = disjunction<_Bn...>::value; + + template + inline constexpr bool negation_v + = negation<_Pp>::value; + +#endif + // For several sfinae-friendly trait implementations we transport both the // result information (as the member type) and the failure information (no // member type). This is very similar to std::enable_if, but we cannot use @@ -186,7 +225,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<> struct __is_integral_helper : public true_type { }; - + template<> struct __is_integral_helper : public true_type { }; @@ -419,100 +458,100 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct is_function : public false_type { }; - template - struct is_function<_Res(_ArgTypes...)> + template + struct is_function<_Res(_ArgTypes...) _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) &> + template + struct is_function<_Res(_ArgTypes...) & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) &&> + template + struct is_function<_Res(_ArgTypes...) && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......)> + template + struct is_function<_Res(_ArgTypes......) _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) &> + template + struct is_function<_Res(_ArgTypes......) & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) &&> + template + struct is_function<_Res(_ArgTypes......) && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) const> + template + struct is_function<_Res(_ArgTypes...) const _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) const &> + template + struct is_function<_Res(_ArgTypes...) const & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) const &&> + template + struct is_function<_Res(_ArgTypes...) const && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) const> + template + struct is_function<_Res(_ArgTypes......) const _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) const &> + template + struct is_function<_Res(_ArgTypes......) const & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) const &&> + template + struct is_function<_Res(_ArgTypes......) const && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) volatile> + template + struct is_function<_Res(_ArgTypes...) volatile _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) volatile &> + template + struct is_function<_Res(_ArgTypes...) volatile & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) volatile &&> + template + struct is_function<_Res(_ArgTypes...) volatile && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) volatile> + template + struct is_function<_Res(_ArgTypes......) volatile _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) volatile &> + template + struct is_function<_Res(_ArgTypes......) volatile & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) volatile &&> + template + struct is_function<_Res(_ArgTypes......) volatile && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) const volatile> + template + struct is_function<_Res(_ArgTypes...) const volatile _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) const volatile &> + template + struct is_function<_Res(_ArgTypes...) const volatile & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes...) const volatile &&> + template + struct is_function<_Res(_ArgTypes...) const volatile && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) const volatile> + template + struct is_function<_Res(_ArgTypes......) const volatile _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) const volatile &> + template + struct is_function<_Res(_ArgTypes......) const volatile & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct is_function<_Res(_ArgTypes......) const volatile &&> + template + struct is_function<_Res(_ArgTypes......) const volatile && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; #define __cpp_lib_is_null_pointer 201309 @@ -602,13 +641,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : public __or_, is_reference<_Tp>>::type { }; - template - struct __is_referenceable<_Res(_Args...)> + template + struct __is_referenceable<_Res(_Args...) _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; - template - struct __is_referenceable<_Res(_Args......)> + template + struct __is_referenceable<_Res(_Args......) _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; @@ -622,7 +661,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct is_const<_Tp const> : public true_type { }; - + /// is_volatile template struct is_volatile @@ -709,7 +748,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// is_unsigned template struct is_unsigned - : public __and_, __not_>>::type + : public __and_, __not_>> { }; @@ -738,9 +777,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __is_array_unknown_bounds - : public __and_, __not_>>::type + : public __and_, __not_>> { }; - + // In N3290 is_destructible does not say anything about function // types and abstract types, see LWG 2049. This implementation // describes function types as non-destructible and all complete @@ -856,22 +895,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __is_default_constructible_atom : public __and_<__not_>, - __is_default_constructible_impl<_Tp>>::type + __is_default_constructible_impl<_Tp>> { }; template::value> struct __is_default_constructible_safe; // The following technique is a workaround for a current core language - // restriction, which does not allow for array types to occur in + // restriction, which does not allow for array types to occur in // functional casts of the form T(). Complete arrays can be default- - // constructed, if the element type is default-constructible, but + // constructed, if the element type is default-constructible, but // arrays with unknown bounds are not. template struct __is_default_constructible_safe<_Tp, true> : public __and_<__is_array_known_bounds<_Tp>, __is_default_constructible_atom::type>>::type + remove_all_extents<_Tp>::type>> { }; template @@ -893,7 +932,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // This implementation uses different strategies depending on the // target type to reduce the test overhead as much as possible: // - // a) For a reference target type, we use a static_cast expression + // a) For a reference target type, we use a static_cast expression // modulo its extra cases. // // b) For a non-reference target type we use a ::new expression. @@ -951,7 +990,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __is_direct_constructible_new_safe : public __and_, - __is_direct_constructible_impl<_Tp, _Arg>>::type + __is_direct_constructible_impl<_Tp, _Arg>> { }; template @@ -964,10 +1003,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct remove_reference; template, + = __not_<__or_, is_function<_From>>>::value> struct __is_base_to_derived_ref; + template + struct is_constructible; + // Detect whether we have a downcast situation during // reference binding. template @@ -978,7 +1020,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename remove_cv::type>::type __dst_t; typedef __and_<__not_>, - is_base_of<__src_t, __dst_t>> type; + is_base_of<__src_t, __dst_t>, + __not_>> type; static constexpr bool value = type::value; }; @@ -1001,7 +1044,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _From>::type>::type __src_t; typedef typename remove_cv::type>::type __dst_t; - typedef __and_<__not_>, + typedef __and_<__not_>, __or_, is_base_of<__dst_t, __src_t>>> type; static constexpr bool value = type::value; @@ -1012,18 +1055,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : public false_type { }; - // Here we handle direct-initialization to a reference type as + // Here we handle direct-initialization to a reference type as // equivalent to a static_cast modulo overshooting conversions. // These are restricted to the following conversions: // a) A base class value to a derived class reference - // b) An lvalue to an rvalue-reference of reference-compatible + // b) An lvalue to an rvalue-reference of reference-compatible // types that are not functions template struct __is_direct_constructible_ref_cast : public __and_<__is_static_castable<_Arg, _Tp>, __not_<__or_<__is_base_to_derived_ref<_Arg, _Tp>, __is_lvalue_to_rvalue_ref<_Arg, _Tp> - >>>::type + >>> { }; template @@ -1138,7 +1181,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __is_nt_default_constructible_impl<_Tp, true> : public __and_<__is_array_known_bounds<_Tp>, __is_nt_default_constructible_atom::type>>::type + remove_all_extents<_Tp>::type>> { }; template @@ -1150,7 +1193,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct is_nothrow_default_constructible : public __and_, - __is_nt_default_constructible_impl<_Tp>>::type + __is_nt_default_constructible_impl<_Tp>> { }; template @@ -1173,7 +1216,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct is_nothrow_constructible : public __and_, - __is_nt_constructible_impl<_Tp, _Args...>>::type + __is_nt_constructible_impl<_Tp, _Args...>> { }; template::value> @@ -1279,7 +1322,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct is_nothrow_assignable : public __and_, - __is_nt_assignable_impl<_Tp, _Up>>::type + __is_nt_assignable_impl<_Tp, _Up>> { }; template::value> @@ -1322,79 +1365,92 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct is_trivially_constructible : public __and_, integral_constant>::type + __is_trivially_constructible(_Tp, _Args...)>> { }; - + /// is_trivially_default_constructible template struct is_trivially_default_constructible : public is_trivially_constructible<_Tp>::type { }; + struct __do_is_implicitly_default_constructible_impl + { + template + static void __helper(const _Tp&); + + template + static true_type __test(const _Tp&, + decltype(__helper({}))* = 0); + + static false_type __test(...); + }; + + template + struct __is_implicitly_default_constructible_impl + : public __do_is_implicitly_default_constructible_impl + { + typedef decltype(__test(declval<_Tp>())) type; + }; + + template + struct __is_implicitly_default_constructible_safe + : public __is_implicitly_default_constructible_impl<_Tp>::type + { }; + + template + struct __is_implicitly_default_constructible + : public __and_, + __is_implicitly_default_constructible_safe<_Tp>> + { }; + /// is_trivially_copy_constructible template struct is_trivially_copy_constructible - : public __and_, + : public __and_, integral_constant>::type + __is_trivially_constructible(_Tp, const _Tp&)>> { }; - + /// is_trivially_move_constructible template struct is_trivially_move_constructible - : public __and_, + : public __and_, integral_constant>::type + __is_trivially_constructible(_Tp, _Tp&&)>> { }; /// is_trivially_assignable template struct is_trivially_assignable - : public __and_, + : public __and_, integral_constant>::type + __is_trivially_assignable(_Tp, _Up)>> { }; /// is_trivially_copy_assignable template struct is_trivially_copy_assignable - : public __and_, + : public __and_, integral_constant>::type + __is_trivially_assignable(_Tp&, const _Tp&)>> { }; /// is_trivially_move_assignable template struct is_trivially_move_assignable - : public __and_, + : public __and_, integral_constant>::type + __is_trivially_assignable(_Tp&, _Tp&&)>> { }; /// is_trivially_destructible template struct is_trivially_destructible : public __and_, integral_constant>::type + __has_trivial_destructor(_Tp)>> { }; - /// has_trivial_default_constructor (temporary legacy) - template - struct has_trivial_default_constructor - : public integral_constant - { } _GLIBCXX_DEPRECATED; - - /// has_trivial_copy_constructor (temporary legacy) - template - struct has_trivial_copy_constructor - : public integral_constant - { } _GLIBCXX_DEPRECATED; - - /// has_trivial_copy_assign (temporary legacy) - template - struct has_trivial_copy_assign - : public integral_constant - { } _GLIBCXX_DEPRECATED; /// has_virtual_destructor template @@ -1402,19 +1458,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : public integral_constant { }; - + // type property queries. /// alignment_of template struct alignment_of : public integral_constant { }; - + /// rank template struct rank : public integral_constant { }; - + template struct rank<_Tp[_Size]> : public integral_constant::value> { }; @@ -1427,7 +1483,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct extent : public integral_constant { }; - + template struct extent<_Tp[_Size], _Uint> : public integral_constant struct remove_const<_Tp const> { typedef _Tp type; }; - + /// remove_volatile template struct remove_volatile @@ -1512,7 +1568,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct remove_volatile<_Tp volatile> { typedef _Tp type; }; - + /// remove_cv template struct remove_cv @@ -1520,17 +1576,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef typename remove_const::type>::type type; }; - + /// add_const template struct add_const { typedef _Tp const type; }; - + /// add_volatile template struct add_volatile { typedef _Tp volatile type; }; - + /// add_cv template struct add_cv @@ -1655,7 +1711,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; public: - typedef typename __match::__type __type; + typedef typename __match::__type __type; }; // Utility for finding the unsigned versions of signed integral types. @@ -1715,7 +1771,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // Select between integral and enum: not possible to be both. - template::value, bool _IsEnum = is_enum<_Tp>::value> class __make_unsigned_selector; @@ -1739,13 +1795,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest); static const bool __b1 = sizeof(_Tp) <= sizeof(unsigned short); static const bool __b2 = sizeof(_Tp) <= sizeof(unsigned int); - typedef conditional<__b2, unsigned int, unsigned long> __cond2; + static const bool __b3 = sizeof(_Tp) <= sizeof(unsigned long); + typedef conditional<__b3, unsigned long, unsigned long long> __cond3; + typedef typename __cond3::type __cond3_type; + typedef conditional<__b2, unsigned int, __cond3_type> __cond2; typedef typename __cond2::type __cond2_type; typedef conditional<__b1, unsigned short, __cond2_type> __cond1; typedef typename __cond1::type __cond1_type; + typedef typename conditional<__b0, __smallest, __cond1_type>::type + __unsigned_type; + typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned; + public: - typedef typename conditional<__b0, __smallest, __cond1_type>::type __type; + typedef typename __cv_unsigned::__type __type; }; // Given an integral/enum type, return the corresponding unsigned @@ -1753,7 +1816,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Primary template. /// make_unsigned template - struct make_unsigned + struct make_unsigned { typedef typename __make_unsigned_selector<_Tp>::__type type; }; // Integral, but don't define. @@ -1827,7 +1890,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif // Select between integral and enum: not possible to be both. - template::value, bool _IsEnum = is_enum<_Tp>::value> class __make_signed_selector; @@ -1846,18 +1909,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template class __make_signed_selector<_Tp, false, true> { - // With -fshort-enums, an enum may be as small as a char. - typedef signed char __smallest; - static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest); - static const bool __b1 = sizeof(_Tp) <= sizeof(signed short); - static const bool __b2 = sizeof(_Tp) <= sizeof(signed int); - typedef conditional<__b2, signed int, signed long> __cond2; - typedef typename __cond2::type __cond2_type; - typedef conditional<__b1, signed short, __cond2_type> __cond1; - typedef typename __cond1::type __cond1_type; + typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type; public: - typedef typename conditional<__b0, __smallest, __cond1_type>::type __type; + typedef typename __make_signed_selector<__unsigned_type>::__type __type; }; // Given an integral/enum type, return the corresponding signed @@ -1865,7 +1920,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Primary template. /// make_signed template - struct make_signed + struct make_signed { typedef typename __make_signed_selector<_Tp>::__type type; }; // Integral, but don't define. @@ -1947,7 +2002,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { typedef typename remove_reference<_Tp>::type* type; }; template - struct add_pointer + struct add_pointer : public __add_pointer_helper<_Tp> { }; @@ -1963,11 +2018,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __aligned_storage_msa - { + { union __type { unsigned char __data[_Len]; - struct __attribute__((__aligned__)) { } __align; + struct __attribute__((__aligned__)) { } __align; }; }; @@ -1984,11 +2039,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template::__type)> struct aligned_storage - { + { union type { unsigned char __data[_Len]; - struct __attribute__((__aligned__((_Align)))) { } __align; + struct __attribute__((__aligned__((_Align)))) { } __align; }; }; @@ -2041,28 +2096,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Decay trait for arrays and functions, used for perfect forwarding // in make_pair, make_tuple, etc. - template::value, - bool _IsFunction = is_function<_Up>::value> + bool _IsFunction = is_function<_Up>::value> struct __decay_selector; // NB: DR 705. - template + template struct __decay_selector<_Up, false, false> { typedef typename remove_cv<_Up>::type __type; }; - template + template struct __decay_selector<_Up, true, false> { typedef typename remove_extent<_Up>::type* __type; }; - template + template struct __decay_selector<_Up, false, true> { typedef typename add_pointer<_Up>::type __type; }; /// decay - template - class decay - { + template + class decay + { typedef typename remove_reference<_Tp>::type __remove_type; public: @@ -2096,7 +2151,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Primary template. /// Define a member typedef @c type only if a boolean constant is true. template - struct enable_if + struct enable_if { }; // Partial specialization for true. @@ -2214,13 +2269,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_result_of_sfinae 201210 + struct __invoke_memfun_ref { }; + struct __invoke_memfun_deref { }; + struct __invoke_memobj_ref { }; + struct __invoke_memobj_deref { }; + struct __invoke_other { }; + + // Associate a tag type with a specialization of __success_type. + template + struct __result_of_success : __success_type<_Tp> + { using __invoke_type = _Tag; }; + // [func.require] paragraph 1 bullet 1: struct __result_of_memfun_ref_impl { template - static __success_type().*std::declval<_Fp>())(std::declval<_Args>()...) - )> _S_test(int); + ), __invoke_memfun_ref> _S_test(int); template static __failure_type _S_test(...); @@ -2237,9 +2303,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_memfun_deref_impl { template - static __success_type()).*std::declval<_Fp>())(std::declval<_Args>()...) - )> _S_test(int); + ), __invoke_memfun_deref> _S_test(int); template static __failure_type _S_test(...); @@ -2256,9 +2322,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_memobj_ref_impl { template - static __success_type().*std::declval<_Fp>() - )> _S_test(int); + ), __invoke_memobj_ref> _S_test(int); template static __failure_type _S_test(...); @@ -2275,9 +2341,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_memobj_deref_impl { template - static __success_type()).*std::declval<_Fp>() - )> _S_test(int); + ), __invoke_memobj_deref> _S_test(int); template static __failure_type _S_test(...); @@ -2322,6 +2388,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >::type::type type; }; + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2219. INVOKE-ing a pointer to member with a reference_wrapper + // as the object expression + + // Used by result_of, invoke etc. to unwrap a reference_wrapper. + template::type> + struct __inv_unwrap + { + using type = _Tp; + }; + + template + struct __inv_unwrap<_Tp, reference_wrapper<_Up>> + { + using type = _Up&; + }; + template struct __result_of_impl { @@ -2330,21 +2413,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __result_of_impl - : public __result_of_memobj::type, _Arg> + : public __result_of_memobj::type, + typename __inv_unwrap<_Arg>::type> { }; template struct __result_of_impl - : public __result_of_memfun::type, _Arg, _Args...> + : public __result_of_memfun::type, + typename __inv_unwrap<_Arg>::type, _Args...> { }; // [func.require] paragraph 1 bullet 5: struct __result_of_other_impl { template - static __success_type()(std::declval<_Args>()...) - )> _S_test(int); + ), __invoke_other> _S_test(int); template static __failure_type _S_test(...); @@ -2357,8 +2442,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type; }; + // __invoke_result (std::invoke_result for C++11) template - struct result_of<_Functor(_ArgTypes...)> + struct __invoke_result : public __result_of_impl< is_member_object_pointer< typename remove_reference<_Functor>::type @@ -2366,10 +2452,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION is_member_function_pointer< typename remove_reference<_Functor>::type >::value, - _Functor, _ArgTypes... + _Functor, _ArgTypes... >::type { }; + template + struct result_of<_Functor(_ArgTypes...)> + : public __invoke_result<_Functor, _ArgTypes...> + { }; + #if __cplusplus > 201103L /// Alias template for aligned_storage template using __void_t = void; +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 +#define __cpp_lib_void_t 201411 + /// A metafunction that always yields void, used for detecting valid types. + template using void_t = void; +#endif + + /// Implementation of the detection idiom (negative case). + template class _Op, typename... _Args> + struct __detector + { + using value_t = false_type; + using type = _Default; + }; + + /// Implementation of the detection idiom (positive case). + template class _Op, + typename... _Args> + struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> + { + using value_t = true_type; + using type = _Op<_Args...>; + }; + + // Detect whether _Op<_Args...> is a valid type, use _Default if not. + template class _Op, + typename... _Args> + using __detected_or = __detector<_Default, void, _Op, _Args...>; + + // _Op<_Args...> if that is a valid type, otherwise _Default. + template class _Op, + typename... _Args> + using __detected_or_t + = typename __detected_or<_Default, _Op, _Args...>::type; + /// @} group metaprogramming /** @@ -2422,6 +2548,544 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : true_type \ { }; + template + struct __is_swappable; + + template + struct __is_nothrow_swappable; + + template + class tuple; + + template + struct __is_tuple_like_impl : false_type + { }; + + template + struct __is_tuple_like_impl> : true_type + { }; + + // Internal type trait that allows us to sfinae-protect tuple_cat. + template + struct __is_tuple_like + : public __is_tuple_like_impl::type>::type>::type + { }; + + template + inline + typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, + is_move_constructible<_Tp>, + is_move_assignable<_Tp>>::value>::type + swap(_Tp&, _Tp&) + noexcept(__and_, + is_nothrow_move_assignable<_Tp>>::value); + + template + inline + typename enable_if<__is_swappable<_Tp>::value>::type + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + noexcept(__is_nothrow_swappable<_Tp>::value); + + namespace __swappable_details { + using std::swap; + + struct __do_is_swappable_impl + { + template(), std::declval<_Tp&>()))> + static true_type __test(int); + + template + static false_type __test(...); + }; + + struct __do_is_nothrow_swappable_impl + { + template + static __bool_constant< + noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())) + > __test(int); + + template + static false_type __test(...); + }; + + } // namespace __swappable_details + + template + struct __is_swappable_impl + : public __swappable_details::__do_is_swappable_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template + struct __is_nothrow_swappable_impl + : public __swappable_details::__do_is_nothrow_swappable_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template + struct __is_swappable + : public __is_swappable_impl<_Tp>::type + { }; + + template + struct __is_nothrow_swappable + : public __is_nothrow_swappable_impl<_Tp>::type + { }; + +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 +#define __cpp_lib_is_swappable 201603 + /// Metafunctions used for detecting swappable types: p0185r1 + + /// is_swappable + template + struct is_swappable + : public __is_swappable_impl<_Tp>::type + { }; + + /// is_nothrow_swappable + template + struct is_nothrow_swappable + : public __is_nothrow_swappable_impl<_Tp>::type + { }; + +#if __cplusplus >= 201402L + /// is_swappable_v + template + _GLIBCXX17_INLINE constexpr bool is_swappable_v = + is_swappable<_Tp>::value; + + /// is_nothrow_swappable_v + template + _GLIBCXX17_INLINE constexpr bool is_nothrow_swappable_v = + is_nothrow_swappable<_Tp>::value; +#endif // __cplusplus >= 201402L + + namespace __swappable_with_details { + using std::swap; + + struct __do_is_swappable_with_impl + { + template(), std::declval<_Up>())), + typename + = decltype(swap(std::declval<_Up>(), std::declval<_Tp>()))> + static true_type __test(int); + + template + static false_type __test(...); + }; + + struct __do_is_nothrow_swappable_with_impl + { + template + static __bool_constant< + noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())) + && + noexcept(swap(std::declval<_Up>(), std::declval<_Tp>())) + > __test(int); + + template + static false_type __test(...); + }; + + } // namespace __swappable_with_details + + template + struct __is_swappable_with_impl + : public __swappable_with_details::__do_is_swappable_with_impl + { + typedef decltype(__test<_Tp, _Up>(0)) type; + }; + + // Optimization for the homogenous lvalue case, not required: + template + struct __is_swappable_with_impl<_Tp&, _Tp&> + : public __swappable_details::__do_is_swappable_impl + { + typedef decltype(__test<_Tp&>(0)) type; + }; + + template + struct __is_nothrow_swappable_with_impl + : public __swappable_with_details::__do_is_nothrow_swappable_with_impl + { + typedef decltype(__test<_Tp, _Up>(0)) type; + }; + + // Optimization for the homogenous lvalue case, not required: + template + struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&> + : public __swappable_details::__do_is_nothrow_swappable_impl + { + typedef decltype(__test<_Tp&>(0)) type; + }; + + /// is_swappable_with + template + struct is_swappable_with + : public __is_swappable_with_impl<_Tp, _Up>::type + { }; + + /// is_nothrow_swappable_with + template + struct is_nothrow_swappable_with + : public __is_nothrow_swappable_with_impl<_Tp, _Up>::type + { }; + +#if __cplusplus >= 201402L + /// is_swappable_with_v + template + _GLIBCXX17_INLINE constexpr bool is_swappable_with_v = + is_swappable_with<_Tp, _Up>::value; + + /// is_nothrow_swappable_with_v + template + _GLIBCXX17_INLINE constexpr bool is_nothrow_swappable_with_v = + is_nothrow_swappable_with<_Tp, _Up>::value; +#endif // __cplusplus >= 201402L + +#endif// c++1z or gnu++11 + + // __is_invocable (std::is_invocable for C++11) + + template + struct __is_invocable_impl : false_type { }; + + template + struct __is_invocable_impl<_Result, _Ret, __void_t> + : __or_, is_convertible>::type + { }; + + template + struct __is_invocable + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type + { }; + + template + constexpr bool __call_is_nt(__invoke_memfun_ref) + { + using _Up = typename __inv_unwrap<_Tp>::type; + return noexcept((std::declval<_Up>().*std::declval<_Fn>())( + std::declval<_Args>()...)); + } + + template + constexpr bool __call_is_nt(__invoke_memfun_deref) + { + return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())( + std::declval<_Args>()...)); + } + + template + constexpr bool __call_is_nt(__invoke_memobj_ref) + { + using _Up = typename __inv_unwrap<_Tp>::type; + return noexcept(std::declval<_Up>().*std::declval<_Fn>()); + } + + template + constexpr bool __call_is_nt(__invoke_memobj_deref) + { + return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>()); + } + + template + constexpr bool __call_is_nt(__invoke_other) + { + return noexcept(std::declval<_Fn>()(std::declval<_Args>()...)); + } + + template + struct __call_is_nothrow + : __bool_constant< + std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{}) + > + { }; + + template + using __call_is_nothrow_ + = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>; + + // __is_nothrow_invocable (std::is_nothrow_invocable for C++11) + template + struct __is_nothrow_invocable + : __and_<__is_invocable<_Fn, _Args...>, + __call_is_nothrow_<_Fn, _Args...>>::type + { }; + + struct __nonesuch { + __nonesuch() = delete; + ~__nonesuch() = delete; + __nonesuch(__nonesuch const&) = delete; + void operator=(__nonesuch const&) = delete; + }; + +#if __cplusplus > 201402L +# define __cpp_lib_is_invocable 201703 + + /// std::invoke_result + template + struct invoke_result + : public __invoke_result<_Functor, _ArgTypes...> + { }; + + /// std::invoke_result_t + template + using invoke_result_t = typename invoke_result<_Fn, _Args...>::type; + + /// std::is_invocable + template + struct is_invocable + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type + { }; + + /// std::is_invocable_r + template + struct is_invocable_r + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type + { }; + + /// std::is_nothrow_invocable + template + struct is_nothrow_invocable + : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>, + __call_is_nothrow_<_Fn, _ArgTypes...>>::type + { }; + + /// std::is_nothrow_invocable_r + template + struct is_nothrow_invocable_r + : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>, + __call_is_nothrow_<_Fn, _ArgTypes...>>::type + { }; + + /// std::is_invocable_v + template + inline constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; + + /// std::is_nothrow_invocable_v + template + inline constexpr bool is_nothrow_invocable_v + = is_nothrow_invocable<_Fn, _Args...>::value; + + /// std::is_invocable_r_v + template + inline constexpr bool is_invocable_r_v + = is_invocable_r<_Fn, _Args...>::value; + + /// std::is_nothrow_invocable_r_v + template + inline constexpr bool is_nothrow_invocable_r_v + = is_nothrow_invocable_r<_Fn, _Args...>::value; +#endif // C++17 + +#if __cplusplus > 201402L +# define __cpp_lib_type_trait_variable_templates 201510L +template + inline constexpr bool is_void_v = is_void<_Tp>::value; +template + inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; +template + inline constexpr bool is_integral_v = is_integral<_Tp>::value; +template + inline constexpr bool is_floating_point_v = is_floating_point<_Tp>::value; +template + inline constexpr bool is_array_v = is_array<_Tp>::value; +template + inline constexpr bool is_pointer_v = is_pointer<_Tp>::value; +template + inline constexpr bool is_lvalue_reference_v = + is_lvalue_reference<_Tp>::value; +template + inline constexpr bool is_rvalue_reference_v = + is_rvalue_reference<_Tp>::value; +template + inline constexpr bool is_member_object_pointer_v = + is_member_object_pointer<_Tp>::value; +template + inline constexpr bool is_member_function_pointer_v = + is_member_function_pointer<_Tp>::value; +template + inline constexpr bool is_enum_v = is_enum<_Tp>::value; +template + inline constexpr bool is_union_v = is_union<_Tp>::value; +template + inline constexpr bool is_class_v = is_class<_Tp>::value; +template + inline constexpr bool is_function_v = is_function<_Tp>::value; +template + inline constexpr bool is_reference_v = is_reference<_Tp>::value; +template + inline constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value; +template + inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; +template + inline constexpr bool is_object_v = is_object<_Tp>::value; +template + inline constexpr bool is_scalar_v = is_scalar<_Tp>::value; +template + inline constexpr bool is_compound_v = is_compound<_Tp>::value; +template + inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; +template + inline constexpr bool is_const_v = is_const<_Tp>::value; +template + inline constexpr bool is_volatile_v = is_volatile<_Tp>::value; +template + inline constexpr bool is_trivial_v = is_trivial<_Tp>::value; +template + inline constexpr bool is_trivially_copyable_v = + is_trivially_copyable<_Tp>::value; +template + inline constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value; +template + inline constexpr bool is_pod_v = is_pod<_Tp>::value; +template + inline constexpr bool is_literal_type_v = is_literal_type<_Tp>::value; +template + inline constexpr bool is_empty_v = is_empty<_Tp>::value; +template + inline constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value; +template + inline constexpr bool is_abstract_v = is_abstract<_Tp>::value; +template + inline constexpr bool is_final_v = is_final<_Tp>::value; +template + inline constexpr bool is_signed_v = is_signed<_Tp>::value; +template + inline constexpr bool is_unsigned_v = is_unsigned<_Tp>::value; +template + inline constexpr bool is_constructible_v = + is_constructible<_Tp, _Args...>::value; +template + inline constexpr bool is_default_constructible_v = + is_default_constructible<_Tp>::value; +template + inline constexpr bool is_copy_constructible_v = + is_copy_constructible<_Tp>::value; +template + inline constexpr bool is_move_constructible_v = + is_move_constructible<_Tp>::value; +template + inline constexpr bool is_assignable_v = is_assignable<_Tp, _Up>::value; +template + inline constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; +template + inline constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value; +template + inline constexpr bool is_destructible_v = is_destructible<_Tp>::value; +template + inline constexpr bool is_trivially_constructible_v = + is_trivially_constructible<_Tp, _Args...>::value; +template + inline constexpr bool is_trivially_default_constructible_v = + is_trivially_default_constructible<_Tp>::value; +template + inline constexpr bool is_trivially_copy_constructible_v = + is_trivially_copy_constructible<_Tp>::value; +template + inline constexpr bool is_trivially_move_constructible_v = + is_trivially_move_constructible<_Tp>::value; +template + inline constexpr bool is_trivially_assignable_v = + is_trivially_assignable<_Tp, _Up>::value; +template + inline constexpr bool is_trivially_copy_assignable_v = + is_trivially_copy_assignable<_Tp>::value; +template + inline constexpr bool is_trivially_move_assignable_v = + is_trivially_move_assignable<_Tp>::value; +template + inline constexpr bool is_trivially_destructible_v = + is_trivially_destructible<_Tp>::value; +template + inline constexpr bool is_nothrow_constructible_v = + is_nothrow_constructible<_Tp, _Args...>::value; +template + inline constexpr bool is_nothrow_default_constructible_v = + is_nothrow_default_constructible<_Tp>::value; +template + inline constexpr bool is_nothrow_copy_constructible_v = + is_nothrow_copy_constructible<_Tp>::value; +template + inline constexpr bool is_nothrow_move_constructible_v = + is_nothrow_move_constructible<_Tp>::value; +template + inline constexpr bool is_nothrow_assignable_v = + is_nothrow_assignable<_Tp, _Up>::value; +template + inline constexpr bool is_nothrow_copy_assignable_v = + is_nothrow_copy_assignable<_Tp>::value; +template + inline constexpr bool is_nothrow_move_assignable_v = + is_nothrow_move_assignable<_Tp>::value; +template + inline constexpr bool is_nothrow_destructible_v = + is_nothrow_destructible<_Tp>::value; +template + inline constexpr bool has_virtual_destructor_v = + has_virtual_destructor<_Tp>::value; +template + inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value; +template + inline constexpr size_t rank_v = rank<_Tp>::value; +template + inline constexpr size_t extent_v = extent<_Tp, _Idx>::value; +template + inline constexpr bool is_same_v = is_same<_Tp, _Up>::value; +template + inline constexpr bool is_base_of_v = is_base_of<_Base, _Derived>::value; +template + inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value; + +#ifdef __has_builtin +# if !__has_builtin(__has_unique_object_representations) +// Try not to break non-GNU compilers that don't support the built-in: +# define _GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP 1 +# endif +#endif + +#ifndef _GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP +# define __cpp_lib_has_unique_object_representations 201606 + /// has_unique_object_representations + template + struct has_unique_object_representations + : bool_constant<__has_unique_object_representations( + remove_cv_t> + )> + { }; +#endif +#undef _GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP + +#if __GNUC__ >= 7 +# define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 +#elif defined __has_builtin +// For non-GNU compilers: +# if __has_builtin(__is_aggregate) +# define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 +# endif +#endif + +#ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE +#define __cpp_lib_is_aggregate 201703 + /// is_aggregate + template + struct is_aggregate + : bool_constant<__is_aggregate(remove_cv_t<_Tp>)> { }; + + /// is_aggregate_v + template + inline constexpr bool is_aggregate_v = is_aggregate<_Tp>::value; +#endif +#undef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE + +#endif // C++17 + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/typeindex b/devkitARM/arm-none-eabi/include/c++/7.1.0/typeindex similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/typeindex rename to devkitARM/arm-none-eabi/include/c++/7.1.0/typeindex index afb28dcfc..bf32faefb 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/typeindex +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/typeindex @@ -1,6 +1,6 @@ // C++11 -*- C++ -*- -// Copyright (C) 2010-2015 Free Software Foundation, Inc. +// Copyright (C) 2010-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/typeinfo b/devkitARM/arm-none-eabi/include/c++/7.1.0/typeinfo similarity index 98% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/typeinfo rename to devkitARM/arm-none-eabi/include/c++/7.1.0/typeinfo index f79d062b4..059016c35 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/typeinfo +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/typeinfo @@ -1,5 +1,5 @@ // RTTI support for -*- C++ -*- -// Copyright (C) 1994-2015 Free Software Foundation, Inc. +// Copyright (C) 1994-2017 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -31,7 +31,7 @@ #pragma GCC system_header -#include +#include #if __cplusplus >= 201103L #include #endif diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/unordered_map b/devkitARM/arm-none-eabi/include/c++/7.1.0/unordered_map similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/unordered_map rename to devkitARM/arm-none-eabi/include/c++/7.1.0/unordered_map index 4489991e8..2cdcd3779 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/unordered_map +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/unordered_map @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/unordered_set b/devkitARM/arm-none-eabi/include/c++/7.1.0/unordered_set similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/unordered_set rename to devkitARM/arm-none-eabi/include/c++/7.1.0/unordered_set index 233af64fb..2646c0f2f 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/unordered_set +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/unordered_set @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007-2015 Free Software Foundation, Inc. +// Copyright (C) 2007-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/utility b/devkitARM/arm-none-eabi/include/c++/7.1.0/utility similarity index 67% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/utility rename to devkitARM/arm-none-eabi/include/c++/7.1.0/utility index 1aac77c10..188fcc265 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/utility +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/utility @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -49,7 +49,7 @@ */ /** @file include/utility - * This is a Standard C++ Library header. + * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_UTILITY @@ -71,20 +71,81 @@ #if __cplusplus >= 201103L +#include #include #include +#if __cplusplus > 201402L +#include +#endif + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION - template - class tuple_size; + /// Finds the size of a given tuple type. + template + struct tuple_size; - template - class tuple_element; + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2770. tuple_size specialization is not SFINAE compatible + template + struct __tuple_size_cv_impl { }; - // Various functions which give std::pair a tuple-like interface. + template + struct __tuple_size_cv_impl<_Tp, __void_t::value)>> + : integral_constant::value> { }; + + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2313. tuple_size should always derive from integral_constant + template + struct tuple_size : __tuple_size_cv_impl<_Tp> { }; + + template + struct tuple_size : __tuple_size_cv_impl<_Tp> { }; + + template + struct tuple_size : __tuple_size_cv_impl<_Tp> { }; + + /// Gives the type of the ith element of a given tuple type. + template + struct tuple_element; + + // Duplicate of C++14's tuple_element_t for internal use in C++11 mode + template + using __tuple_element_t = typename tuple_element<__i, _Tp>::type; + + template + struct tuple_element<__i, const _Tp> + { + typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; + }; + + template + struct tuple_element<__i, volatile _Tp> + { + typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; + }; + + template + struct tuple_element<__i, const volatile _Tp> + { + typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; + }; + +#if __cplusplus > 201103L +#define __cpp_lib_tuple_element_t 201402 + + template + using tuple_element_t = typename tuple_element<__i, _Tp>::type; +#endif + + // Various functions which give std::pair a tuple-like interface. + + /// Partial specialization for std::pair + template + struct __is_tuple_like_impl> : true_type + { }; /// Partial specialization for std::pair template @@ -95,7 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct tuple_element<0, std::pair<_Tp1, _Tp2>> { typedef _Tp1 type; }; - + /// Partial specialization for std::pair template struct tuple_element<1, std::pair<_Tp1, _Tp2>> @@ -202,17 +263,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Stores a tuple of indices. Used by tuple and pair, and by bind() to // extract the elements in a tuple. - template - struct _Index_tuple + template struct _Index_tuple { }; + + // Concatenates two _Index_tuples. + template struct _Itup_cat; + + template + struct _Itup_cat<_Index_tuple<_Ind1...>, _Index_tuple<_Ind2...>> { - typedef _Index_tuple<_Indexes..., sizeof...(_Indexes)> __next; + using __type = _Index_tuple<_Ind1..., (_Ind2 + sizeof...(_Ind1))...>; }; // Builds an _Index_tuple<0, 1, 2, ..., _Num-1>. template struct _Build_index_tuple + : _Itup_cat::__type, + typename _Build_index_tuple<_Num - _Num / 2>::__type> + { }; + + template<> + struct _Build_index_tuple<1> { - typedef typename _Build_index_tuple<_Num - 1>::__type::__next __type; + typedef _Index_tuple<0> __type; }; template<> @@ -264,6 +336,52 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using index_sequence_for = make_index_sequence; #endif +#if __cplusplus > 201402L + + struct in_place_t { + explicit in_place_t() = default; + }; + + inline constexpr in_place_t in_place{}; + + template struct in_place_type_t + { + explicit in_place_type_t() = default; + }; + + template + inline constexpr in_place_type_t<_Tp> in_place_type{}; + + template struct in_place_index_t + { + explicit in_place_index_t() = default; + }; + + template + inline constexpr in_place_index_t<_Idx> in_place_index{}; + + template + struct __is_in_place_type_impl : false_type + { }; + + template + struct __is_in_place_type_impl> : true_type + { }; + + template + struct __is_in_place_type + : public __is_in_place_type_impl<_Tp> + { }; + +#define __cpp_lib_as_const 201510 + template + constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { return __t; } + + template + void as_const(const _Tp&&) = delete; + +#endif // C++17 + _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/valarray b/devkitARM/arm-none-eabi/include/c++/7.1.0/valarray similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/valarray rename to devkitARM/arm-none-eabi/include/c++/7.1.0/valarray index 827524915..2dc6e42ca 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/valarray +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/valarray @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- valarray class. -// Copyright (C) 1997-2015 Free Software Foundation, Inc. +// Copyright (C) 1997-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -23,7 +23,7 @@ // . /** @file include/valarray - * This is a Standard C++ Library header. + * This is a Standard C++ Library header. */ // Written by Gabriel Dos Reis @@ -45,11 +45,11 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION - template + template class _Expr; - template - class _ValArray; + template + class _ValArray; template class _Meta, class _Dom> struct _UnClos; @@ -57,22 +57,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template class _Meta1, template class _Meta2, - class _Dom1, class _Dom2> + class _Dom1, class _Dom2> class _BinClos; - template class _Meta, class _Dom> + template class _Meta, class _Dom> class _SClos; - template class _Meta, class _Dom> + template class _Meta, class _Dom> class _GClos; - - template class _Meta, class _Dom> + + template class _Meta, class _Dom> class _IClos; - - template class _Meta, class _Dom> + + template class _Meta, class _Dom> class _ValFunClos; - - template class _Meta, class _Dom> + + template class _Meta, class _Dom> class _RefFunClos; template class valarray; // An array of type _Tp @@ -88,7 +88,7 @@ _GLIBCXX_END_NAMESPACE_VERSION #include #include - + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -109,21 +109,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * aliasing that can result from pointer representations. It represents a * one-dimensional array from which different multidimensional subsets can * be accessed and modified. - * + * * @tparam _Tp Type of object in the array. */ - template + template class valarray { template - struct _UnaryOp + struct _UnaryOp { typedef typename __fun<_Op, _Tp>::result_type __rt; typedef _Expr<_UnClos<_Op, _ValArray, _Tp>, __rt> _Rt; }; public: typedef _Tp value_type; - + // _lib.valarray.cons_ construct/destroy: /// Construct an empty array. valarray(); @@ -254,7 +254,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _lib.valarray.access_ element access: /** - * Return a reference to the i'th array element. + * Return a reference to the i'th array element. * * @param __i Index of element to return. * @return Reference to the i'th element. @@ -482,10 +482,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Tp sum() const; /// Return the minimum element using operator<(). - _Tp min() const; + _Tp min() const; /// Return the maximum element using operator<(). - _Tp max() const; + _Tp max() const; /** * @brief Return a shifted array. @@ -559,14 +559,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION private: size_t _M_size; _Tp* __restrict__ _M_data; - + friend class _Array<_Tp>; }; - + +#if __cpp_deduction_guides >= 201606 + template + valarray(const _Tp(&)[_Nm], size_t) -> valarray<_Tp>; +#endif + template inline const _Tp& valarray<_Tp>::operator[](size_t __i) const - { + { __glibcxx_requires_subscript(__i); return _M_data[__i]; } @@ -574,7 +579,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline _Tp& valarray<_Tp>::operator[](size_t __i) - { + { __glibcxx_requires_subscript(__i); return _M_data[__i]; } @@ -605,8 +610,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION valarray<_Tp>::valarray() : _M_size(0), _M_data(0) {} template - inline - valarray<_Tp>::valarray(size_t __n) + inline + valarray<_Tp>::valarray(size_t __n) : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n)) { std::__valarray_default_construct(_M_data, _M_data + __n); } @@ -620,9 +625,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline valarray<_Tp>::valarray(const _Tp* __restrict__ __p, size_t __n) : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n)) - { - _GLIBCXX_DEBUG_ASSERT(__p != 0 || __n == 0); - std::__valarray_copy_construct(__p, __p + __n, _M_data); + { + __glibcxx_assert(__p != 0 || __n == 0); + std::__valarray_copy_construct(__p, __p + __n, _M_data); } template @@ -779,7 +784,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline valarray<_Tp>& valarray<_Tp>::operator=(const slice_array<_Tp>& __sa) { - _GLIBCXX_DEBUG_ASSERT(_M_size == __sa._M_sz); + __glibcxx_assert(_M_size == __sa._M_sz); std::__valarray_copy(__sa._M_array, __sa._M_sz, __sa._M_stride, _Array<_Tp>(_M_data)); return *this; @@ -789,7 +794,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline valarray<_Tp>& valarray<_Tp>::operator=(const gslice_array<_Tp>& __ga) { - _GLIBCXX_DEBUG_ASSERT(_M_size == __ga._M_index.size()); + __glibcxx_assert(_M_size == __ga._M_index.size()); std::__valarray_copy(__ga._M_array, _Array(__ga._M_index), _Array<_Tp>(_M_data), _M_size); return *this; @@ -799,7 +804,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline valarray<_Tp>& valarray<_Tp>::operator=(const mask_array<_Tp>& __ma) { - _GLIBCXX_DEBUG_ASSERT(_M_size == __ma._M_sz); + __glibcxx_assert(_M_size == __ma._M_sz); std::__valarray_copy(__ma._M_array, __ma._M_mask, _Array<_Tp>(_M_data), _M_size); return *this; @@ -809,7 +814,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline valarray<_Tp>& valarray<_Tp>::operator=(const indirect_array<_Tp>& __ia) { - _GLIBCXX_DEBUG_ASSERT(_M_size == __ia._M_sz); + __glibcxx_assert(_M_size == __ia._M_sz); std::__valarray_copy(__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size); return *this; @@ -917,7 +922,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif template - inline size_t + inline size_t valarray<_Tp>::size() const { return _M_size; } @@ -925,7 +930,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline _Tp valarray<_Tp>::sum() const { - _GLIBCXX_DEBUG_ASSERT(_M_size > 0); + __glibcxx_assert(_M_size > 0); return std::__valarray_sum(_M_data, _M_data + _M_size); } @@ -1027,12 +1032,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } std::__valarray_fill_construct(_M_data, _M_data + __n, __c); } - + template inline _Tp valarray<_Tp>::min() const { - _GLIBCXX_DEBUG_ASSERT(_M_size > 0); + __glibcxx_assert(_M_size > 0); return *std::min_element(_M_data, _M_data + _M_size); } @@ -1040,10 +1045,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline _Tp valarray<_Tp>::max() const { - _GLIBCXX_DEBUG_ASSERT(_M_size > 0); + __glibcxx_assert(_M_size > 0); return *std::max_element(_M_data, _M_data + _M_size); } - + template inline _Expr<_ValFunClos<_ValArray, _Tp>, _Tp> valarray<_Tp>::apply(_Tp func(_Tp)) const @@ -1090,7 +1095,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline valarray<_Tp>& \ valarray<_Tp>::operator _Op##=(const valarray<_Tp> &__v) \ { \ - _GLIBCXX_DEBUG_ASSERT(_M_size == __v._M_size); \ + __glibcxx_assert(_M_size == __v._M_size); \ _Array_augmented_##_Name(_Array<_Tp>(_M_data), _M_size, \ _Array<_Tp>(__v._M_data)); \ return *this; \ @@ -1130,7 +1135,7 @@ _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(<<, __shift_left) _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, __shift_right) #undef _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT - + #define _DEFINE_BINARY_OPERATOR(_Op, _Name) \ template \ @@ -1138,7 +1143,7 @@ _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, __shift_right) typename __fun<_Name, _Tp>::result_type> \ operator _Op(const valarray<_Tp>& __v, const valarray<_Tp>& __w) \ { \ - _GLIBCXX_DEBUG_ASSERT(__v.size() == __w.size()); \ + __glibcxx_assert(__v.size() == __w.size()); \ typedef _BinClos<_Name, _ValArray, _ValArray, _Tp, _Tp> _Closure; \ typedef typename __fun<_Name, _Tp>::result_type _Rt; \ return _Expr<_Closure, _Rt>(_Closure(__v, __w)); \ diff --git a/devkitARM/arm-none-eabi/include/c++/7.1.0/variant b/devkitARM/arm-none-eabi/include/c++/7.1.0/variant new file mode 100644 index 000000000..272b2a6f6 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/variant @@ -0,0 +1,1303 @@ +// -*- C++ -*- + +// Copyright (C) 2016-2017 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file variant + * This is the C++ Library header. + */ + +#ifndef _GLIBCXX_VARIANT +#define _GLIBCXX_VARIANT 1 + +#pragma GCC system_header + +#if __cplusplus <= 201402L +# include +#else + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) +{ +namespace __detail +{ +namespace __variant +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + struct _Nth_type; + + template + struct _Nth_type<_Np, _First, _Rest...> + : _Nth_type<_Np-1, _Rest...> { }; + + template + struct _Nth_type<0, _First, _Rest...> + { using type = _First; }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace __variant +} // namespace __detail + +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template class tuple; + template class variant; + template struct hash; + + template + struct variant_size; + + template + struct variant_size : variant_size<_Variant> {}; + + template + struct variant_size : variant_size<_Variant> {}; + + template + struct variant_size : variant_size<_Variant> {}; + + template + struct variant_size> + : std::integral_constant {}; + + template + inline constexpr size_t variant_size_v = variant_size<_Variant>::value; + + template + struct variant_alternative; + + template + struct variant_alternative<_Np, variant<_First, _Rest...>> + : variant_alternative<_Np-1, variant<_Rest...>> {}; + + template + struct variant_alternative<0, variant<_First, _Rest...>> + { using type = _First; }; + + template + using variant_alternative_t = + typename variant_alternative<_Np, _Variant>::type; + + template + struct variant_alternative<_Np, const _Variant> + { using type = add_const_t>; }; + + template + struct variant_alternative<_Np, volatile _Variant> + { using type = add_volatile_t>; }; + + template + struct variant_alternative<_Np, const volatile _Variant> + { using type = add_cv_t>; }; + + inline constexpr size_t variant_npos = -1; + + template + constexpr variant_alternative_t<_Np, variant<_Types...>>& + get(variant<_Types...>&); + + template + constexpr variant_alternative_t<_Np, variant<_Types...>>&& + get(variant<_Types...>&&); + + template + constexpr variant_alternative_t<_Np, variant<_Types...>> const& + get(const variant<_Types...>&); + + template + constexpr variant_alternative_t<_Np, variant<_Types...>> const&& + get(const variant<_Types...>&&); + +_GLIBCXX_END_NAMESPACE_VERSION + +namespace __detail +{ +namespace __variant +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Returns the first apparence of _Tp in _Types. + // Returns sizeof...(_Types) if _Tp is not in _Types. + template + struct __index_of : std::integral_constant {}; + + template + inline constexpr size_t __index_of_v = __index_of<_Tp, _Types...>::value; + + template + struct __index_of<_Tp, _First, _Rest...> : + std::integral_constant + ? 0 : __index_of_v<_Tp, _Rest...> + 1> {}; + + // _Uninitialized is guaranteed to be a literal type, even if T is not. + // We have to do this, because [basic.types]p10.5.3 (n4606) is not implemented + // yet. When it's implemented, _Uninitialized can be changed to the alias + // to T, therefore equivalent to being removed entirely. + // + // Another reason we may not want to remove _Uninitialzied may be that, we + // want _Uninitialized to be trivially destructible, no matter whether T + // is; but we will see. + template> + struct _Uninitialized; + + template + struct _Uninitialized<_Type, true> + { + template + constexpr _Uninitialized(in_place_index_t<0>, _Args&&... __args) + : _M_storage(std::forward<_Args>(__args)...) + { } + + constexpr const _Type& _M_get() const & + { return _M_storage; } + + constexpr _Type& _M_get() & + { return _M_storage; } + + constexpr const _Type&& _M_get() const && + { return std::move(_M_storage); } + + constexpr _Type&& _M_get() && + { return std::move(_M_storage); } + + _Type _M_storage; + }; + + template + struct _Uninitialized<_Type, false> + { + template + constexpr _Uninitialized(in_place_index_t<0>, _Args&&... __args) + { ::new (&_M_storage) _Type(std::forward<_Args>(__args)...); } + + const _Type& _M_get() const & + { return *_M_storage._M_ptr(); } + + _Type& _M_get() & + { return *_M_storage._M_ptr(); } + + const _Type&& _M_get() const && + { return std::move(*_M_storage._M_ptr()); } + + _Type&& _M_get() && + { return std::move(*_M_storage._M_ptr()); } + + __gnu_cxx::__aligned_membuf<_Type> _M_storage; + }; + + template + _Ref __ref_cast(void* __ptr) + { + return static_cast<_Ref>(*static_cast*>(__ptr)); + } + + template + constexpr decltype(auto) __get(in_place_index_t<0>, _Union&& __u) + { return std::forward<_Union>(__u)._M_first._M_get(); } + + template + constexpr decltype(auto) __get(in_place_index_t<_Np>, _Union&& __u) + { return __get(in_place_index<_Np-1>, std::forward<_Union>(__u)._M_rest); } + + // Returns the typed storage for __v. + template + constexpr decltype(auto) __get(_Variant&& __v) + { + return __get(std::in_place_index<_Np>, std::forward<_Variant>(__v)._M_u); + } + + // Various functions as "vtable" entries, where those vtables are used by + // polymorphic operations. + template + constexpr void + __erased_ctor(void* __lhs, void* __rhs) + { ::new (__lhs) remove_reference_t<_Lhs>(__ref_cast<_Rhs>(__rhs)); } + + template + constexpr void + __erased_dtor(_Variant&& __v) + { + auto&& __element = __get<_Np>(std::forward<_Variant>(__v)); + using _Type = std::remove_reference_t; + __element.~_Type(); + } + + template + constexpr void + __erased_assign(void* __lhs, void* __rhs) + { __ref_cast<_Lhs>(__lhs) = __ref_cast<_Rhs>(__rhs); } + + template + constexpr void + __erased_swap(void* __lhs, void* __rhs) + { + using std::swap; + swap(__ref_cast<_Lhs>(__lhs), __ref_cast<_Rhs>(__rhs)); + } + +#define _VARIANT_RELATION_FUNCTION_TEMPLATE(__OP, __NAME) \ + template \ + constexpr bool \ + __erased_##__NAME(const _Variant& __lhs, const _Variant& __rhs) \ + { \ + return __get<_Np>(std::forward<_Variant>(__lhs)) \ + __OP __get<_Np>(std::forward<_Variant>(__rhs)); \ + } + + _VARIANT_RELATION_FUNCTION_TEMPLATE(<, less) + _VARIANT_RELATION_FUNCTION_TEMPLATE(<=, less_equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(==, equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(!=, not_equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(>=, greater_equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(>, greater) + +#undef _VARIANT_RELATION_FUNCTION_TEMPLATE + + template + constexpr size_t + __erased_hash(void* __t) + { + return std::hash>>{}( + __ref_cast<_Tp>(__t)); + } + + // Defines members and ctors. + template + union _Variadic_union { }; + + template + union _Variadic_union<_First, _Rest...> + { + constexpr _Variadic_union() : _M_rest() { } + + template + constexpr _Variadic_union(in_place_index_t<0>, _Args&&... __args) + : _M_first(in_place_index<0>, std::forward<_Args>(__args)...) + { } + + template + constexpr _Variadic_union(in_place_index_t<_Np>, _Args&&... __args) + : _M_rest(in_place_index<_Np-1>, std::forward<_Args>(__args)...) + { } + + _Uninitialized<_First> _M_first; + _Variadic_union<_Rest...> _M_rest; + }; + + // Defines index and the dtor, possibly trivial. + template + struct _Variant_storage; + + template + using __select_index = + typename __select_int::_Select_int_base + ::type::value_type; + + template + struct _Variant_storage + { + template + static constexpr void (*_S_vtable[])(const _Variant_storage&) = + { &__erased_dtor... }; + + constexpr _Variant_storage() : _M_index(variant_npos) { } + + template + constexpr _Variant_storage(in_place_index_t<_Np>, _Args&&... __args) + : _M_u(in_place_index<_Np>, std::forward<_Args>(__args)...), + _M_index(_Np) + { } + + template + constexpr void _M_reset_impl(std::index_sequence<__indices...>) + { + if (_M_index != __index_type(variant_npos)) + _S_vtable<__indices...>[_M_index](*this); + } + + void _M_reset() + { + _M_reset_impl(std::index_sequence_for<_Types...>{}); + _M_index = variant_npos; + } + + ~_Variant_storage() + { _M_reset(); } + + _Variadic_union<_Types...> _M_u; + using __index_type = __select_index<_Types...>; + __index_type _M_index; + }; + + template + struct _Variant_storage + { + constexpr _Variant_storage() : _M_index(variant_npos) { } + + template + constexpr _Variant_storage(in_place_index_t<_Np>, _Args&&... __args) + : _M_u(in_place_index<_Np>, std::forward<_Args>(__args)...), + _M_index(_Np) + { } + + void _M_reset() + { _M_index = variant_npos; } + + _Variadic_union<_Types...> _M_u; + using __index_type = __select_index<_Types...>; + __index_type _M_index; + }; + + // Helps SFINAE on special member functions. Otherwise it can live in variant + // class. + template + struct _Variant_base : + _Variant_storage<(std::is_trivially_destructible_v<_Types> && ...), + _Types...> + { + using _Storage = + _Variant_storage<(std::is_trivially_destructible_v<_Types> && ...), + _Types...>; + + constexpr + _Variant_base() + noexcept(is_nothrow_default_constructible_v< + variant_alternative_t<0, variant<_Types...>>>) + : _Variant_base(in_place_index<0>) { } + + _Variant_base(const _Variant_base& __rhs) + { + if (__rhs._M_valid()) + { + static constexpr void (*_S_vtable[])(void*, void*) = + { &__erased_ctor<_Types&, const _Types&>... }; + _S_vtable[__rhs._M_index](_M_storage(), __rhs._M_storage()); + this->_M_index = __rhs._M_index; + } + } + + _Variant_base(_Variant_base&& __rhs) + noexcept((is_nothrow_move_constructible_v<_Types> && ...)) + { + if (__rhs._M_valid()) + { + static constexpr void (*_S_vtable[])(void*, void*) = + { &__erased_ctor<_Types&, _Types&&>... }; + _S_vtable[__rhs._M_index](_M_storage(), __rhs._M_storage()); + this->_M_index = __rhs._M_index; + } + } + + template + constexpr explicit + _Variant_base(in_place_index_t<_Np> __i, _Args&&... __args) + : _Storage(__i, std::forward<_Args>(__args)...) + { } + + _Variant_base& + operator=(const _Variant_base& __rhs) + { + if (this->_M_index == __rhs._M_index) + { + if (__rhs._M_valid()) + { + static constexpr void (*_S_vtable[])(void*, void*) = + { &__erased_assign<_Types&, const _Types&>... }; + _S_vtable[__rhs._M_index](_M_storage(), __rhs._M_storage()); + } + } + else + { + _Variant_base __tmp(__rhs); + this->~_Variant_base(); + __try + { + ::new (this) _Variant_base(std::move(__tmp)); + } + __catch (...) + { + this->_M_index = variant_npos; + __throw_exception_again; + } + } + __glibcxx_assert(this->_M_index == __rhs._M_index); + return *this; + } + + void _M_destructive_move(_Variant_base&& __rhs) + { + this->~_Variant_base(); + __try + { + ::new (this) _Variant_base(std::move(__rhs)); + } + __catch (...) + { + this->_M_index = variant_npos; + __throw_exception_again; + } + } + + _Variant_base& + operator=(_Variant_base&& __rhs) + noexcept((is_nothrow_move_constructible_v<_Types> && ...) + && (is_nothrow_move_assignable_v<_Types> && ...)) + { + if (this->_M_index == __rhs._M_index) + { + if (__rhs._M_valid()) + { + static constexpr void (*_S_vtable[])(void*, void*) = + { &__erased_assign<_Types&, _Types&&>... }; + _S_vtable[__rhs._M_index](_M_storage(), __rhs._M_storage()); + } + } + else + { + _M_destructive_move(std::move(__rhs)); + } + return *this; + } + + void* + _M_storage() const + { + return const_cast(static_cast( + std::addressof(_Storage::_M_u))); + } + + constexpr bool + _M_valid() const noexcept + { + return this->_M_index != + typename _Storage::__index_type(variant_npos); + } + }; + + // For how many times does _Tp appear in _Tuple? + template + struct __tuple_count; + + template + inline constexpr size_t __tuple_count_v = + __tuple_count<_Tp, _Tuple>::value; + + template + struct __tuple_count<_Tp, tuple<_Types...>> + : integral_constant { }; + + template + struct __tuple_count<_Tp, tuple<_First, _Rest...>> + : integral_constant< + size_t, + __tuple_count_v<_Tp, tuple<_Rest...>> + is_same_v<_Tp, _First>> { }; + + // TODO: Reuse this in ? + template + inline constexpr bool __exactly_once = + __tuple_count_v<_Tp, tuple<_Types...>> == 1; + + // Takes _Types and create an overloaded _S_fun for each type. + // If a type appears more than once in _Types, create only one overload. + template + struct __overload_set + { static void _S_fun(); }; + + template + struct __overload_set<_First, _Rest...> : __overload_set<_Rest...> + { + using __overload_set<_Rest...>::_S_fun; + static integral_constant _S_fun(_First); + }; + + template + struct __overload_set : __overload_set<_Rest...> + { + using __overload_set<_Rest...>::_S_fun; + }; + + // Helper for variant(_Tp&&) and variant::operator=(_Tp&&). + // __accepted_index maps the arbitrary _Tp to an alternative type in _Variant. + template + struct __accepted_index + { static constexpr size_t value = variant_npos; }; + + template + struct __accepted_index< + _Tp, variant<_Types...>, + decltype(__overload_set<_Types...>::_S_fun(std::declval<_Tp>()), + std::declval())> + { + static constexpr size_t value = sizeof...(_Types) - 1 + - decltype(__overload_set<_Types...>:: + _S_fun(std::declval<_Tp>()))::value; + }; + + // Returns the raw storage for __v. + template + void* __get_storage(_Variant&& __v) + { return __v._M_storage(); } + + // Used for storing multi-dimensional vtable. + template + struct _Multi_array + { + constexpr const _Tp& + _M_access() const + { return _M_data; } + + _Tp _M_data; + }; + + template + struct _Multi_array<_Tp, __first, __rest...> + { + template + constexpr const _Tp& + _M_access(size_t __first_index, _Args... __rest_indices) const + { return _M_arr[__first_index]._M_access(__rest_indices...); } + + _Multi_array<_Tp, __rest...> _M_arr[__first]; + }; + + // Creates a multi-dimensional vtable recursively. + // + // For example, + // visit([](auto, auto){}, + // variant(), // typedef'ed as V1 + // variant()) // typedef'ed as V2 + // will trigger instantiations of: + // __gen_vtable_impl<_Multi_array, + // tuple, std::index_sequence<>> + // __gen_vtable_impl<_Multi_array, + // tuple, std::index_sequence<0>> + // __gen_vtable_impl<_Multi_array, + // tuple, std::index_sequence<0, 0>> + // __gen_vtable_impl<_Multi_array, + // tuple, std::index_sequence<0, 1>> + // __gen_vtable_impl<_Multi_array, + // tuple, std::index_sequence<0, 2>> + // __gen_vtable_impl<_Multi_array, + // tuple, std::index_sequence<1>> + // __gen_vtable_impl<_Multi_array, + // tuple, std::index_sequence<1, 0>> + // __gen_vtable_impl<_Multi_array, + // tuple, std::index_sequence<1, 1>> + // __gen_vtable_impl<_Multi_array, + // tuple, std::index_sequence<1, 2>> + // The returned multi-dimensional vtable can be fast accessed by the visitor + // using index calculation. + template + struct __gen_vtable_impl; + + template + struct __gen_vtable_impl< + _Multi_array<_Result_type (*)(_Visitor, _Variants...), __dimensions...>, + tuple<_Variants...>, std::index_sequence<__indices...>> + { + using _Next = + remove_reference_t::type>; + using _Array_type = + _Multi_array<_Result_type (*)(_Visitor, _Variants...), + __dimensions...>; + + static constexpr _Array_type + _S_apply() + { + _Array_type __vtable{}; + _S_apply_all_alts( + __vtable, make_index_sequence>()); + return __vtable; + } + + template + static constexpr void + _S_apply_all_alts(_Array_type& __vtable, + std::index_sequence<__var_indices...>) + { + (_S_apply_single_alt<__var_indices>( + __vtable._M_arr[__var_indices]), ...); + } + + template + static constexpr void + _S_apply_single_alt(_Tp& __element) + { + using _Alternative = variant_alternative_t<__index, _Next>; + __element = __gen_vtable_impl< + remove_reference_t< + decltype(__element)>, tuple<_Variants...>, + std::index_sequence<__indices..., __index>>::_S_apply(); + } + }; + + template + struct __gen_vtable_impl< + _Multi_array<_Result_type (*)(_Visitor, _Variants...)>, + tuple<_Variants...>, std::index_sequence<__indices...>> + { + using _Array_type = + _Multi_array<_Result_type (*)(_Visitor&&, _Variants...)>; + + decltype(auto) + static constexpr __visit_invoke(_Visitor&& __visitor, _Variants... __vars) + { + return __invoke(std::forward<_Visitor>(__visitor), + std::get<__indices>( + std::forward<_Variants>(__vars))...); + } + + static constexpr auto + _S_apply() + { return _Array_type{&__visit_invoke}; } + }; + + template + struct __gen_vtable + { + using _Func_ptr = _Result_type (*)(_Visitor&&, _Variants...); + using _Array_type = + _Multi_array<_Func_ptr, + variant_size_v>...>; + + static constexpr _Array_type + _S_apply() + { + return __gen_vtable_impl<_Array_type, tuple<_Variants...>, + std::index_sequence<>>::_S_apply(); + } + + static constexpr auto _S_vtable = _S_apply(); + }; + + template + struct _Base_dedup : public _Tp { }; + + template + struct _Variant_hash_base; + + template + struct _Variant_hash_base, + std::index_sequence<__indices...>> + : _Base_dedup<__indices, __poison_hash>>... { }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace __variant +} // namespace __detail + +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + template + inline constexpr bool holds_alternative(const variant<_Types...>& __v) + noexcept + { + static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, + "T should occur for exactly once in alternatives"); + return __v.index() == __detail::__variant::__index_of_v<_Tp, _Types...>; + } + + template + constexpr inline _Tp& get(variant<_Types...>& __v) + { + static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, + "T should occur for exactly once in alternatives"); + static_assert(!is_void_v<_Tp>, "_Tp should not be void"); + return get<__detail::__variant::__index_of_v<_Tp, _Types...>>(__v); + } + + template + constexpr inline _Tp&& get(variant<_Types...>&& __v) + { + static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, + "T should occur for exactly once in alternatives"); + static_assert(!is_void_v<_Tp>, "_Tp should not be void"); + return get<__detail::__variant::__index_of_v<_Tp, _Types...>>( + std::move(__v)); + } + + template + constexpr inline const _Tp& get(const variant<_Types...>& __v) + { + static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, + "T should occur for exactly once in alternatives"); + static_assert(!is_void_v<_Tp>, "_Tp should not be void"); + return get<__detail::__variant::__index_of_v<_Tp, _Types...>>(__v); + } + + template + constexpr inline const _Tp&& get(const variant<_Types...>&& __v) + { + static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, + "T should occur for exactly once in alternatives"); + static_assert(!is_void_v<_Tp>, "_Tp should not be void"); + return get<__detail::__variant::__index_of_v<_Tp, _Types...>>( + std::move(__v)); + } + + template + constexpr inline + add_pointer_t>> + get_if(variant<_Types...>* __ptr) noexcept + { + using _Alternative_type = variant_alternative_t<_Np, variant<_Types...>>; + static_assert(_Np < sizeof...(_Types), + "The index should be in [0, number of alternatives)"); + static_assert(!is_void_v<_Alternative_type>, "_Tp should not be void"); + if (__ptr && __ptr->index() == _Np) + return &__detail::__variant::__get<_Np>(*__ptr); + return nullptr; + } + + template + constexpr inline + add_pointer_t>> + get_if(const variant<_Types...>* __ptr) noexcept + { + using _Alternative_type = variant_alternative_t<_Np, variant<_Types...>>; + static_assert(_Np < sizeof...(_Types), + "The index should be in [0, number of alternatives)"); + static_assert(!is_void_v<_Alternative_type>, "_Tp should not be void"); + if (__ptr && __ptr->index() == _Np) + return &__detail::__variant::__get<_Np>(*__ptr); + return nullptr; + } + + template + constexpr inline add_pointer_t<_Tp> + get_if(variant<_Types...>* __ptr) noexcept + { + static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, + "T should occur for exactly once in alternatives"); + static_assert(!is_void_v<_Tp>, "_Tp should not be void"); + return get_if<__detail::__variant::__index_of_v<_Tp, _Types...>>(__ptr); + } + + template + constexpr inline add_pointer_t + get_if(const variant<_Types...>* __ptr) + noexcept + { + static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, + "T should occur for exactly once in alternatives"); + static_assert(!is_void_v<_Tp>, "_Tp should not be void"); + return get_if<__detail::__variant::__index_of_v<_Tp, _Types...>>(__ptr); + } + + struct monostate { }; + +#define _VARIANT_RELATION_FUNCTION_TEMPLATE(__OP, __NAME) \ + template \ + constexpr bool operator __OP(const variant<_Types...>& __lhs, \ + const variant<_Types...>& __rhs) \ + { \ + return __lhs._M_##__NAME(__rhs, std::index_sequence_for<_Types...>{}); \ + } \ +\ + constexpr bool operator __OP(monostate, monostate) noexcept \ + { return 0 __OP 0; } + + _VARIANT_RELATION_FUNCTION_TEMPLATE(<, less) + _VARIANT_RELATION_FUNCTION_TEMPLATE(<=, less_equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(==, equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(!=, not_equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(>=, greater_equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(>, greater) + +#undef _VARIANT_RELATION_FUNCTION_TEMPLATE + + template + constexpr decltype(auto) visit(_Visitor&&, _Variants&&...); + + template + inline enable_if_t<(is_move_constructible_v<_Types> && ...) + && (is_swappable_v<_Types> && ...)> + swap(variant<_Types...>& __lhs, variant<_Types...>& __rhs) + noexcept(noexcept(__lhs.swap(__rhs))) + { __lhs.swap(__rhs); } + + template + enable_if_t && ...) + && (is_swappable_v<_Types> && ...))> + swap(variant<_Types...>&, variant<_Types...>&) = delete; + + class bad_variant_access : public exception + { + public: + bad_variant_access() noexcept : _M_reason("Unknown reason") { } + const char* what() const noexcept override + { return _M_reason; } + + private: + bad_variant_access(const char* __reason) : _M_reason(__reason) { } + + const char* _M_reason; + + friend void __throw_bad_variant_access(const char* __what); + }; + + inline void + __throw_bad_variant_access(const char* __what) + { _GLIBCXX_THROW_OR_ABORT(bad_variant_access(__what)); } + + template + class variant + : private __detail::__variant::_Variant_base<_Types...>, + private _Enable_default_constructor< + is_default_constructible_v< + variant_alternative_t<0, variant<_Types...>>>, variant<_Types...>>, + private _Enable_copy_move< + (is_copy_constructible_v<_Types> && ...), + (is_copy_constructible_v<_Types> && ...) + && (is_move_constructible_v<_Types> && ...) + && (is_copy_assignable_v<_Types> && ...), + (is_move_constructible_v<_Types> && ...), + (is_move_constructible_v<_Types> && ...) + && (is_move_assignable_v<_Types> && ...), + variant<_Types...>> + { + private: + static_assert(sizeof...(_Types) > 0, + "variant must have at least one alternative"); + static_assert(!(std::is_reference_v<_Types> || ...), + "variant must have no reference alternative"); + static_assert(!(std::is_void_v<_Types> || ...), + "variant must have no void alternative"); + + using _Base = __detail::__variant::_Variant_base<_Types...>; + using _Default_ctor_enabler = + _Enable_default_constructor< + is_default_constructible_v< + variant_alternative_t<0, variant<_Types...>>>, variant<_Types...>>; + + template + static constexpr bool + __exactly_once = __detail::__variant::__exactly_once<_Tp, _Types...>; + + template + static constexpr size_t __accepted_index = + __detail::__variant::__accepted_index<_Tp&&, variant>::value; + + template + struct __to_type_impl; + + template + struct __to_type_impl<_Np, true> + { using type = variant_alternative_t<_Np, variant>; }; + + template + using __to_type = typename __to_type_impl<_Np>::type; + + template + using __accepted_type = __to_type<__accepted_index<_Tp>>; + + template + static constexpr size_t __index_of = + __detail::__variant::__index_of_v<_Tp, _Types...>; + + public: + constexpr variant() + noexcept(is_nothrow_default_constructible_v<__to_type<0>>) = default; + variant(const variant&) = default; + variant(variant&&) + noexcept((is_nothrow_move_constructible_v<_Types> && ...)) = default; + + template> + && is_constructible_v<__accepted_type<_Tp&&>, _Tp&&> + && !is_same_v, variant>>> + constexpr + variant(_Tp&& __t) + noexcept(is_nothrow_constructible_v<__accepted_type<_Tp&&>, _Tp&&>) + : variant(in_place_index<__accepted_index<_Tp&&>>, std::forward<_Tp>(__t)) + { __glibcxx_assert(holds_alternative<__accepted_type<_Tp&&>>(*this)); } + + template + && is_constructible_v<_Tp, _Args&&...>>> + constexpr explicit + variant(in_place_type_t<_Tp>, _Args&&... __args) + : variant(in_place_index<__index_of<_Tp>>, std::forward<_Args>(__args)...) + { __glibcxx_assert(holds_alternative<_Tp>(*this)); } + + template + && is_constructible_v< + _Tp, initializer_list<_Up>&, _Args&&...>>> + constexpr explicit + variant(in_place_type_t<_Tp>, initializer_list<_Up> __il, + _Args&&... __args) + : variant(in_place_index<__index_of<_Tp>>, __il, + std::forward<_Args>(__args)...) + { __glibcxx_assert(holds_alternative<_Tp>(*this)); } + + template, _Args&&...>>> + constexpr explicit + variant(in_place_index_t<_Np>, _Args&&... __args) + : _Base(in_place_index<_Np>, std::forward<_Args>(__args)...), + _Default_ctor_enabler(_Enable_default_constructor_tag{}) + { __glibcxx_assert(index() == _Np); } + + template, + initializer_list<_Up>&, _Args&&...>>> + constexpr explicit + variant(in_place_index_t<_Np>, initializer_list<_Up> __il, + _Args&&... __args) + : _Base(in_place_index<_Np>, __il, std::forward<_Args>(__args)...), + _Default_ctor_enabler(_Enable_default_constructor_tag{}) + { __glibcxx_assert(index() == _Np); } + + ~variant() = default; + + variant& operator=(const variant&) = default; + variant& operator=(variant&&) + noexcept((is_nothrow_move_constructible_v<_Types> && ...) + && (is_nothrow_move_assignable_v<_Types> && ...)) = default; + + template + enable_if_t<__exactly_once<__accepted_type<_Tp&&>> + && is_constructible_v<__accepted_type<_Tp&&>, _Tp&&> + && is_assignable_v<__accepted_type<_Tp&&>&, _Tp&&> + && !is_same_v, variant>, variant&> + operator=(_Tp&& __rhs) + noexcept(is_nothrow_assignable_v<__accepted_type<_Tp&&>&, _Tp&&> + && is_nothrow_constructible_v<__accepted_type<_Tp&&>, _Tp&&>) + { + constexpr auto __index = __accepted_index<_Tp&&>; + if (index() == __index) + std::get<__index>(*this) = std::forward<_Tp>(__rhs); + else + this->emplace<__index>(std::forward<_Tp>(__rhs)); + __glibcxx_assert(holds_alternative<__accepted_type<_Tp&&>>(*this)); + return *this; + } + + template + enable_if_t && __exactly_once<_Tp>, + _Tp&> + emplace(_Args&&... __args) + { + auto& ret = + this->emplace<__index_of<_Tp>>(std::forward<_Args>(__args)...); + __glibcxx_assert(holds_alternative<_Tp>(*this)); + return ret; + } + + template + enable_if_t&, _Args...> + && __exactly_once<_Tp>, + _Tp&> + emplace(initializer_list<_Up> __il, _Args&&... __args) + { + auto& ret = + this->emplace<__index_of<_Tp>>(__il, + std::forward<_Args>(__args)...); + __glibcxx_assert(holds_alternative<_Tp>(*this)); + return ret; + } + + template + enable_if_t, + _Args...>, + variant_alternative_t<_Np, variant>&> + emplace(_Args&&... __args) + { + static_assert(_Np < sizeof...(_Types), + "The index should be in [0, number of alternatives)"); + this->~variant(); + __try + { + ::new (this) variant(in_place_index<_Np>, + std::forward<_Args>(__args)...); + } + __catch (...) + { + this->_M_index = variant_npos; + __throw_exception_again; + } + __glibcxx_assert(index() == _Np); + return std::get<_Np>(*this); + } + + template + enable_if_t, + initializer_list<_Up>&, _Args...>, + variant_alternative_t<_Np, variant>&> + emplace(initializer_list<_Up> __il, _Args&&... __args) + { + static_assert(_Np < sizeof...(_Types), + "The index should be in [0, number of alternatives)"); + this->~variant(); + __try + { + ::new (this) variant(in_place_index<_Np>, __il, + std::forward<_Args>(__args)...); + } + __catch (...) + { + this->_M_index = variant_npos; + __throw_exception_again; + } + __glibcxx_assert(index() == _Np); + return std::get<_Np>(*this); + } + + constexpr bool valueless_by_exception() const noexcept + { return !this->_M_valid(); } + + constexpr size_t index() const noexcept + { + if (this->_M_index == + typename _Base::_Storage::__index_type(variant_npos)) + return variant_npos; + return this->_M_index; + } + + void + swap(variant& __rhs) + noexcept((__is_nothrow_swappable<_Types>::value && ...) + && is_nothrow_move_constructible_v) + { + if (this->index() == __rhs.index()) + { + if (this->_M_valid()) + { + static constexpr void (*_S_vtable[])(void*, void*) = + { &__detail::__variant::__erased_swap<_Types&, _Types&>... }; + _S_vtable[__rhs._M_index](this->_M_storage(), + __rhs._M_storage()); + } + } + else if (!this->_M_valid()) + { + this->_M_destructive_move(std::move(__rhs)); + __rhs._M_reset(); + } + else if (!__rhs._M_valid()) + { + __rhs._M_destructive_move(std::move(*this)); + this->_M_reset(); + } + else + { + auto __tmp = std::move(__rhs); + __rhs._M_destructive_move(std::move(*this)); + this->_M_destructive_move(std::move(__tmp)); + } + } + + private: +#define _VARIANT_RELATION_FUNCTION_TEMPLATE(__OP, __NAME) \ + template \ + static constexpr bool \ + (*_S_erased_##__NAME[])(const variant&, const variant&) = \ + { &__detail::__variant::__erased_##__NAME< \ + const variant&, __indices>... }; \ + template \ + constexpr inline bool \ + _M_##__NAME(const variant& __rhs, \ + std::index_sequence<__indices...>) const \ + { \ + auto __lhs_index = this->index(); \ + auto __rhs_index = __rhs.index(); \ + if (__lhs_index != __rhs_index || valueless_by_exception()) \ + /* Modulo addition. */ \ + return __lhs_index + 1 __OP __rhs_index + 1; \ + return _S_erased_##__NAME<__indices...>[__lhs_index](*this, __rhs); \ + } + + _VARIANT_RELATION_FUNCTION_TEMPLATE(<, less) + _VARIANT_RELATION_FUNCTION_TEMPLATE(<=, less_equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(==, equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(!=, not_equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(>=, greater_equal) + _VARIANT_RELATION_FUNCTION_TEMPLATE(>, greater) + +#undef _VARIANT_RELATION_FUNCTION_TEMPLATE + + template + friend constexpr decltype(auto) __detail::__variant:: +#if _GLIBCXX_INLINE_VERSION + __7:: // Required due to PR c++/59256 +#endif + __get(_Vp&& __v); + + template + friend void* __detail::__variant:: +#if _GLIBCXX_INLINE_VERSION + __7:: // Required due to PR c++/59256 +#endif + __get_storage(_Vp&& __v); + +#define _VARIANT_RELATION_FUNCTION_TEMPLATE(__OP) \ + template \ + friend constexpr bool \ + operator __OP(const variant<_Tp...>& __lhs, \ + const variant<_Tp...>& __rhs); + + _VARIANT_RELATION_FUNCTION_TEMPLATE(<) + _VARIANT_RELATION_FUNCTION_TEMPLATE(<=) + _VARIANT_RELATION_FUNCTION_TEMPLATE(==) + _VARIANT_RELATION_FUNCTION_TEMPLATE(!=) + _VARIANT_RELATION_FUNCTION_TEMPLATE(>=) + _VARIANT_RELATION_FUNCTION_TEMPLATE(>) + +#undef _VARIANT_RELATION_FUNCTION_TEMPLATE + }; + + template + constexpr variant_alternative_t<_Np, variant<_Types...>>& + get(variant<_Types...>& __v) + { + static_assert(_Np < sizeof...(_Types), + "The index should be in [0, number of alternatives)"); + if (__v.index() != _Np) + __throw_bad_variant_access("Unexpected index"); + return __detail::__variant::__get<_Np>(__v); + } + + template + constexpr variant_alternative_t<_Np, variant<_Types...>>&& + get(variant<_Types...>&& __v) + { + static_assert(_Np < sizeof...(_Types), + "The index should be in [0, number of alternatives)"); + if (__v.index() != _Np) + __throw_bad_variant_access("Unexpected index"); + return __detail::__variant::__get<_Np>(std::move(__v)); + } + + template + constexpr const variant_alternative_t<_Np, variant<_Types...>>& + get(const variant<_Types...>& __v) + { + static_assert(_Np < sizeof...(_Types), + "The index should be in [0, number of alternatives)"); + if (__v.index() != _Np) + __throw_bad_variant_access("Unexpected index"); + return __detail::__variant::__get<_Np>(__v); + } + + template + constexpr const variant_alternative_t<_Np, variant<_Types...>>&& + get(const variant<_Types...>&& __v) + { + static_assert(_Np < sizeof...(_Types), + "The index should be in [0, number of alternatives)"); + if (__v.index() != _Np) + __throw_bad_variant_access("Unexpected index"); + return __detail::__variant::__get<_Np>(std::move(__v)); + } + + template + constexpr decltype(auto) + visit(_Visitor&& __visitor, _Variants&&... __variants) + { + if ((__variants.valueless_by_exception() || ...)) + __throw_bad_variant_access("Unexpected index"); + + using _Result_type = + decltype(std::forward<_Visitor>(__visitor)( + get<0>(std::forward<_Variants>(__variants))...)); + + constexpr auto& __vtable = __detail::__variant::__gen_vtable< + _Result_type, _Visitor&&, _Variants&&...>::_S_vtable; + + auto __func_ptr = __vtable._M_access(__variants.index()...); + return (*__func_ptr)(std::forward<_Visitor>(__visitor), + std::forward<_Variants>(__variants)...); + } + + template + struct __variant_hash_call_base_impl + { + size_t + operator()(const variant<_Types...>& __t) const + noexcept((is_nothrow_invocable_v>, _Types> && ...)) + { + if (!__t.valueless_by_exception()) + { + namespace __edv = __detail::__variant; + static constexpr size_t (*_S_vtable[])(void*) = + { &__edv::__erased_hash... }; + return hash{}(__t.index()) + + _S_vtable[__t.index()](__edv::__get_storage(__t)); + } + return hash{}(__t.index()); + } + }; + + template + struct __variant_hash_call_base_impl {}; + + template + using __variant_hash_call_base = + __variant_hash_call_base_impl<(__poison_hash>:: + __enable_hash_call &&...), _Types...>; + + template + struct hash> + : private __detail::__variant::_Variant_hash_base< + variant<_Types...>, std::index_sequence_for<_Types...>>, + public __variant_hash_call_base<_Types...> + { + using result_type = size_t; + using argument_type = variant<_Types...>; + }; + + template<> + struct hash + { + using result_type = size_t; + using argument_type = monostate; + + size_t + operator()(const monostate& __t) const noexcept + { + constexpr size_t __magic_monostate_hash = -7777; + return __magic_monostate_hash; + } + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#endif // C++17 + +#endif // _GLIBCXX_VARIANT diff --git a/devkitARM/arm-none-eabi/include/c++/5.3.0/vector b/devkitARM/arm-none-eabi/include/c++/7.1.0/vector similarity index 96% rename from devkitARM/arm-none-eabi/include/c++/5.3.0/vector rename to devkitARM/arm-none-eabi/include/c++/7.1.0/vector index adab85b99..dde507503 100644 --- a/devkitARM/arm-none-eabi/include/c++/5.3.0/vector +++ b/devkitARM/arm-none-eabi/include/c++/7.1.0/vector @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001-2015 Free Software Foundation, Inc. +// Copyright (C) 2001-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include #ifndef _GLIBCXX_EXPORT_TEMPLATE diff --git a/devkitARM/arm-none-eabi/include/complex.h b/devkitARM/arm-none-eabi/include/complex.h index 969b20e5f..89d6162dc 100644 --- a/devkitARM/arm-none-eabi/include/complex.h +++ b/devkitARM/arm-none-eabi/include/complex.h @@ -83,6 +83,7 @@ float complex clogf(float complex); float cabsf(float complex) __RENAME(__c99_cabsf); #endif */ +long double cabsl(long double complex) ; double cabs(double complex) ; float cabsf(float complex) ; @@ -102,22 +103,50 @@ float cargf(float complex); /* 7.3.9.2 The cimag functions */ double cimag(double complex); float cimagf(float complex); -/*long double cimagl(long double complex); */ +long double cimagl(long double complex); /* 7.3.9.3 The conj functions */ double complex conj(double complex); float complex conjf(float complex); -/*long double complex conjl(long double complex); */ /* 7.3.9.4 The cproj functions */ double complex cproj(double complex); float complex cprojf(float complex); -/*long double complex cprojl(long double complex); */ /* 7.3.9.5 The creal functions */ double creal(double complex); float crealf(float complex); -/*long double creall(long double complex); */ +long double creall(long double complex); + +#if __GNU_VISIBLE +double complex clog10(double complex); +float complex clog10f(float complex); +#endif + +#if defined(__CYGWIN__) +long double complex cacosl(long double complex); +long double complex casinl(long double complex); +long double complex catanl(long double complex); +long double complex ccosl(long double complex); +long double complex csinl(long double complex); +long double complex ctanl(long double complex); +long double complex cacoshl(long double complex); +long double complex casinhl(long double complex); +long double complex catanhl(long double complex); +long double complex ccoshl(long double complex); +long double complex csinhl(long double complex); +long double complex ctanhl(long double complex); +long double complex cexpl(long double complex); +long double complex clogl(long double complex); +long double complex cpowl(long double complex, long double complex); +long double complex csqrtl(long double complex); +long double cargl(long double complex); +long double complex conjl(long double complex); +long double complex cprojl(long double complex); +#if __GNU_VISIBLE +long double complex clog10l(long double complex); +#endif +#endif /* __CYGWIN__ */ __END_DECLS diff --git a/devkitARM/arm-none-eabi/include/cpio.h b/devkitARM/arm-none-eabi/include/cpio.h new file mode 100644 index 000000000..99860b29c --- /dev/null +++ b/devkitARM/arm-none-eabi/include/cpio.h @@ -0,0 +1,30 @@ +/* POSIX.1 symbolic constants for c_mode field of cpio archive format */ + +#ifndef _CPIO_H +#define _CPIO_H + +#define C_IRUSR 0000400 /* Read by owner */ +#define C_IWUSR 0000200 /* Write by owner */ +#define C_IXUSR 0000100 /* Execute by owner */ +#define C_IRGRP 0000040 /* Read by group */ +#define C_IWGRP 0000020 /* Write by group */ +#define C_IXGRP 0000010 /* Execute by group */ +#define C_IROTH 0000004 /* Read by others */ +#define C_IWOTH 0000002 /* Write by others */ +#define C_IXOTH 0000001 /* Execute by others */ +#define C_ISUID 0004000 /* Set user ID */ +#define C_ISGID 0002000 /* Set group ID */ +#define C_ISVTX 0001000 /* On directories, restricted deletion flag */ + +#define C_ISDIR 0040000 /* Directory */ +#define C_ISFIFO 0010000 /* FIFO */ +#define C_ISREG 0100000 /* Regular file */ +#define C_ISBLK 0060000 /* Block special */ +#define C_ISCHR 0020000 /* Character special */ +#define C_ISCTG 0110000 /* Reserved */ +#define C_ISLNK 0120000 /* Symbolic link */ +#define C_ISSOCK 0140000 /* Socket */ + +#define MAGIC "070707" + +#endif /* _CPIO_H */ diff --git a/devkitARM/arm-none-eabi/include/ctype.h b/devkitARM/arm-none-eabi/include/ctype.h index 56ad5abb6..31577d16e 100644 --- a/devkitARM/arm-none-eabi/include/ctype.h +++ b/devkitARM/arm-none-eabi/include/ctype.h @@ -2,6 +2,11 @@ #define _CTYPE_H_ #include "_ansi.h" +#include + +#if __POSIX_VISIBLE >= 200809 || __MISC_VISIBLE || defined (_COMPILING_NEWLIB) +#include +#endif _BEGIN_STD_C @@ -19,17 +24,39 @@ int _EXFUN(isxdigit,(int __c)); int _EXFUN(tolower, (int __c)); int _EXFUN(toupper, (int __c)); -#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L +#if __ISO_C_VISIBLE >= 1999 int _EXFUN(isblank, (int __c)); #endif -#ifndef __STRICT_ANSI__ +#if __MISC_VISIBLE || __XSI_VISIBLE int _EXFUN(isascii, (int __c)); int _EXFUN(toascii, (int __c)); #define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a') #define _toupper(__c) ((unsigned char)(__c) - 'a' + 'A') #endif +#if __POSIX_VISIBLE >= 200809 +extern int isalnum_l (int __c, locale_t __l); +extern int isalpha_l (int __c, locale_t __l); +extern int isblank_l (int __c, locale_t __l); +extern int iscntrl_l (int __c, locale_t __l); +extern int isdigit_l (int __c, locale_t __l); +extern int isgraph_l (int __c, locale_t __l); +extern int islower_l (int __c, locale_t __l); +extern int isprint_l (int __c, locale_t __l); +extern int ispunct_l (int __c, locale_t __l); +extern int isspace_l (int __c, locale_t __l); +extern int isupper_l (int __c, locale_t __l); +extern int isxdigit_l(int __c, locale_t __l); +extern int tolower_l (int __c, locale_t __l); +extern int toupper_l (int __c, locale_t __l); +#endif + +#if __MISC_VISIBLE +extern int isascii_l (int __c, locale_t __l); +extern int toascii_l (int __c, locale_t __l); +#endif + #define _U 01 #define _L 02 #define _N 04 @@ -39,22 +66,20 @@ int _EXFUN(toascii, (int __c)); #define _X 0100 #define _B 0200 -#ifndef _MB_CAPABLE -_CONST -#endif -extern __IMPORT char *__ctype_ptr__; +const char *__locale_ctype_ptr (void); +# define __CTYPE_PTR (__locale_ctype_ptr ()) #ifndef __cplusplus /* These macros are intentionally written in a manner that will trigger a gcc -Wall warning if the user mistakenly passes a 'char' instead of an int containing an 'unsigned char'. Note that the sizeof will - always be 1, which is what we want for mapping EOF to __ctype_ptr__[0]; + always be 1, which is what we want for mapping EOF to __CTYPE_PTR[0]; the use of a raw index inside the sizeof triggers the gcc warning if __c was of type char, and sizeof masks side effects of the extra __c. - Meanwhile, the real index to __ctype_ptr__+1 must be cast to int, + Meanwhile, the real index to __CTYPE_PTR+1 must be cast to int, since isalpha(0x100000001LL) must equal isalpha(1), rather than being an out-of-bounds reference on a 64-bit machine. */ -#define __ctype_lookup(__c) ((__ctype_ptr__+sizeof(""[__c]))[(int)(__c)]) +#define __ctype_lookup(__c) ((__CTYPE_PTR+sizeof(""[__c]))[(int)(__c)]) #define isalpha(__c) (__ctype_lookup(__c)&(_U|_L)) #define isupper(__c) ((__ctype_lookup(__c)&(_U|_L))==_U) @@ -68,13 +93,45 @@ extern __IMPORT char *__ctype_ptr__; #define isgraph(__c) (__ctype_lookup(__c)&(_P|_U|_L|_N)) #define iscntrl(__c) (__ctype_lookup(__c)&_C) -#if defined(__GNUC__) && \ - (!defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901L) +#if defined(__GNUC__) && __ISO_C_VISIBLE >= 1999 #define isblank(__c) \ __extension__ ({ __typeof__ (__c) __x = (__c); \ (__ctype_lookup(__x)&_B) || (int) (__x) == '\t';}) #endif +#if __POSIX_VISIBLE >= 200809 +const char *__locale_ctype_ptr_l (locale_t); +#define __ctype_lookup_l(__c,__l) ((__locale_ctype_ptr_l(__l)+sizeof(""[__c]))[(int)(__c)]) + +#define isalpha_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_U|_L)) +#define isupper_l(__c,__l) ((__ctype_lookup_l(__c,__l)&(_U|_L))==_U) +#define islower_l(__c,__l) ((__ctype_lookup_l(__c,__l)&(_U|_L))==_L) +#define isdigit_l(__c,__l) (__ctype_lookup_l(__c,__l)&_N) +#define isxdigit_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_X|_N)) +#define isspace_l(__c,__l) (__ctype_lookup_l(__c,__l)&_S) +#define ispunct_l(__c,__l) (__ctype_lookup_l(__c,__l)&_P) +#define isalnum_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_U|_L|_N)) +#define isprint_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_P|_U|_L|_N|_B)) +#define isgraph_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_P|_U|_L|_N)) +#define iscntrl_l(__c,__l) (__ctype_lookup_l(__c,__l)&_C) + +#if defined(__GNUC__) +#define isblank_l(__c, __l) \ + __extension__ ({ __typeof__ (__c) __x = (__c); \ + (__ctype_lookup_l(__x,__l)&_B) || (int) (__x) == '\t';}) +#endif + +#endif /* __POSIX_VISIBLE >= 200809 */ + +#if __MISC_VISIBLE || __XSI_VISIBLE +#define isascii(__c) ((unsigned)(__c)<=0177) +#define toascii(__c) ((__c)&0177) +#endif + +#if __MISC_VISIBLE +#define isascii_l(__c,__l) ((__l),(unsigned)(__c)<=0177) +#define toascii_l(__c,__l) ((__l),(__c)&0177) +#endif /* Non-gcc versions will get the library versions, and will be slightly slower. These macros are not NLS-aware so they are @@ -92,18 +149,17 @@ extern __IMPORT char *__ctype_ptr__; function. */ # define toupper(__c) \ __extension__ ({ __typeof__ (__c) __x = (__c); \ - (void) __ctype_ptr__[__x]; (toupper) (__x);}) + (void) __CTYPE_PTR[__x]; (toupper) (__x);}) # define tolower(__c) \ __extension__ ({ __typeof__ (__c) __x = (__c); \ - (void) __ctype_ptr__[__x]; (tolower) (__x);}) + (void) __CTYPE_PTR[__x]; (tolower) (__x);}) # endif /* _MB_EXTENDED_CHARSETS* */ # endif /* __GNUC__ */ -#endif /* !__cplusplus */ -#ifndef __STRICT_ANSI__ -#define isascii(__c) ((unsigned)(__c)<=0177) -#define toascii(__c) ((__c)&0177) -#endif +#if __POSIX_VISIBLE >= 200809 +#endif /* __POSIX_VISIBLE >= 200809 */ + +#endif /* !__cplusplus */ /* For C++ backward-compatibility only. */ extern __IMPORT _CONST char _ctype_[]; diff --git a/devkitARM/arm-none-eabi/include/devctl.h b/devkitARM/arm-none-eabi/include/devctl.h new file mode 100644 index 000000000..e6d987545 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/devctl.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2016 Joel Sherrill . All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _POSIX_DEVCTL_h_ +#define _POSIX_DEVCTL_h_ + +/* + * The posix_devctl() method is defined by POSIX 1003.26-2003. Aside + * from the single method, it adds the following requirements: + * + * + define _POSIX_26_VERSION to 200312L + * + add _SC_POSIX_26_VERSION in . Return _POSIX_26_VERSION + * + application must define _POSIX_26_C_SOURCE to use posix_devctl(). + * + posix_devctl() is prototyped in + */ + +#ifdef _POSIX_26_C_SOURCE +#include + +int posix_devctl( + int fd, + int dcmd, + void *restrict dev_data_ptr, + size_t nbyte, + int *restrict dev_info_ptr +); +#endif + +#endif diff --git a/devkitARM/arm-none-eabi/include/dirent.h b/devkitARM/arm-none-eabi/include/dirent.h index 6fefc03cb..6135b9f6e 100644 --- a/devkitARM/arm-none-eabi/include/dirent.h +++ b/devkitARM/arm-none-eabi/include/dirent.h @@ -3,9 +3,10 @@ #ifdef __cplusplus extern "C" { #endif +#include #include -#if !defined(MAXNAMLEN) && !defined(_POSIX_SOURCE) +#if !defined(MAXNAMLEN) && __BSD_VISIBLE #define MAXNAMLEN 1024 #endif diff --git a/devkitARM/arm-none-eabi/include/fnmatch.h b/devkitARM/arm-none-eabi/include/fnmatch.h index 06311fc4b..a94e923a4 100644 --- a/devkitARM/arm-none-eabi/include/fnmatch.h +++ b/devkitARM/arm-none-eabi/include/fnmatch.h @@ -33,21 +33,21 @@ #ifndef _FNMATCH_H_ #define _FNMATCH_H_ +#include + #define FNM_NOMATCH 1 /* Match failed. */ #define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ #define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ #define FNM_PERIOD 0x04 /* Period must be matched by period. */ -#if defined(_GNU_SOURCE) || !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) +#if __GNU_VISIBLE #define FNM_LEADING_DIR 0x08 /* Ignore / after Imatch. */ #define FNM_CASEFOLD 0x10 /* Case insensitive search. */ #define FNM_IGNORECASE FNM_CASEFOLD #define FNM_FILE_NAME FNM_PATHNAME #endif -#include - __BEGIN_DECLS int fnmatch(const char *, const char *, int); __END_DECLS diff --git a/devkitARM/arm-none-eabi/include/grp.h b/devkitARM/arm-none-eabi/include/grp.h index c3a5a676c..6a265643a 100644 --- a/devkitARM/arm-none-eabi/include/grp.h +++ b/devkitARM/arm-none-eabi/include/grp.h @@ -49,7 +49,7 @@ #include #endif -#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) +#if __BSD_VISIBLE #define _PATH_GROUP "/etc/group" #endif @@ -67,25 +67,20 @@ extern "C" { #ifndef __INSIDE_CYGWIN__ struct group *getgrgid (gid_t); struct group *getgrnam (const char *); +#if __MISC_VISIBLE || __POSIX_VISIBLE int getgrnam_r (const char *, struct group *, char *, size_t, struct group **); int getgrgid_r (gid_t, struct group *, char *, size_t, struct group **); -#ifndef _POSIX_SOURCE +#endif /* __MISC_VISIBLE || __POSIX_VISIBLE */ +#if __MISC_VISIBLE || __XSI_VISIBLE >= 4 struct group *getgrent (void); void setgrent (void); void endgrent (void); -#ifndef __CYGWIN__ -void setgrfile (const char *); -#endif /* !__CYGWIN__ */ -#ifndef _XOPEN_SOURCE -#ifndef __CYGWIN__ -char *group_from_gid (gid_t, int); -int setgroupent (int); -#endif /* !__CYGWIN__ */ +#endif /* __MISC_VISIBLE || __XSI_VISIBLE >= 4 */ +#if __BSD_VISIBLE int initgroups (const char *, gid_t); -#endif /* !_XOPEN_SOURCE */ -#endif /* !_POSIX_SOURCE */ +#endif /* __BSD_VISIBLE */ #endif /* !__INSIDE_CYGWIN__ */ #ifdef __cplusplus diff --git a/devkitARM/arm-none-eabi/include/ieeefp.h b/devkitARM/arm-none-eabi/include/ieeefp.h index 0b06fb786..2c042848b 100644 --- a/devkitARM/arm-none-eabi/include/ieeefp.h +++ b/devkitARM/arm-none-eabi/include/ieeefp.h @@ -4,11 +4,12 @@ #include "_ansi.h" #include +#include _BEGIN_STD_C /* FIXME FIXME FIXME: - Neither of __ieee_{float,double}_shape_tape seem to be used anywhere + Neither of __ieee_{float,double}_shape_type seem to be used anywhere except in libm/test. If that is the case, please delete these from here. If that is not the case, please insert documentation here describing why they're needed. */ @@ -46,9 +47,7 @@ typedef union long aslong[2]; } __ieee_double_shape_type; -#endif - -#ifdef __IEEE_LITTLE_ENDIAN +#elif defined __IEEE_LITTLE_ENDIAN typedef union { @@ -92,7 +91,7 @@ typedef union } __ieee_double_shape_type; -#endif +#endif /* __IEEE_LITTLE_ENDIAN */ #ifdef __IEEE_BIG_ENDIAN @@ -118,9 +117,7 @@ typedef union } __ieee_float_shape_type; -#endif - -#ifdef __IEEE_LITTLE_ENDIAN +#elif defined __IEEE_LITTLE_ENDIAN typedef union { @@ -144,10 +141,70 @@ typedef union } __ieee_float_shape_type; +#endif /* __IEEE_LITTLE_ENDIAN */ + +#ifndef _LDBL_EQ_DBL + +#ifndef LDBL_MANT_DIG +#error "LDBL_MANT_DIG not defined - should be found in float.h" + +#elif LDBL_MANT_DIG == DBL_MANT_DIG +#error "double and long double are the same size but LDBL_EQ_DBL is not defined" + +#elif LDBL_MANT_DIG == 53 +/* This happens when doubles are 32-bits and long doubles are 64-bits. */ +#define EXT_EXPBITS 11 +#define EXT_FRACHBITS 20 +#define EXT_FRACLBITS 32 +#define __ieee_ext_field_type unsigned long + +#elif LDBL_MANT_DIG == 64 +#define EXT_EXPBITS 15 +#define EXT_FRACHBITS 32 +#define EXT_FRACLBITS 32 +#define __ieee_ext_field_type unsigned int + +#elif LDBL_MANT_DIG == 65 +#define EXT_EXPBITS 15 +#define EXT_FRACHBITS 32 +#define EXT_FRACLBITS 32 +#define __ieee_ext_field_type unsigned int + +#elif LDBL_MANT_DIG == 112 +#define EXT_EXPBITS 15 +#define EXT_FRACHBITS 48 +#define EXT_FRACLBITS 64 +#define __ieee_ext_field_type unsigned long long + +#elif LDBL_MANT_DIG == 113 +#define EXT_EXPBITS 15 +#define EXT_FRACHBITS 48 +#define EXT_FRACLBITS 64 +#define __ieee_ext_field_type unsigned long long + +#else +#error Unsupported value for LDBL_MANT_DIG #endif +#define EXT_EXP_INFNAN ((1 << EXT_EXPBITS) - 1) /* 32767 */ +#define EXT_EXP_BIAS ((1 << (EXT_EXPBITS - 1)) - 1) /* 16383 */ +#define EXT_FRACBITS (EXT_FRACLBITS + EXT_FRACHBITS) +typedef struct ieee_ext +{ + __ieee_ext_field_type ext_fracl : EXT_FRACLBITS; + __ieee_ext_field_type ext_frach : EXT_FRACHBITS; + __ieee_ext_field_type ext_exp : EXT_EXPBITS; + __ieee_ext_field_type ext_sign : 1; +} ieee_ext; +typedef union ieee_ext_u +{ + long double extu_ld; + struct ieee_ext extu_ext; +} ieee_ext_u; + +#endif /* ! _LDBL_EQ_DBL */ /* FLOATING ROUNDING */ @@ -184,19 +241,6 @@ typedef int fp_rdi; fp_rdi _EXFUN(fpgetroundtoi,(void)); fp_rdi _EXFUN(fpsetroundtoi,(fp_rdi)); -#undef isnan -#undef isinf - -int _EXFUN(isnan, (double)); -int _EXFUN(isinf, (double)); -int _EXFUN(finite, (double)); - - - -int _EXFUN(isnanf, (float)); -int _EXFUN(isinff, (float)); -int _EXFUN(finitef, (float)); - #define __IEEE_DBL_EXPBIAS 1023 #define __IEEE_FLT_EXPBIAS 127 @@ -213,22 +257,17 @@ int _EXFUN(finitef, (float)); #define __IEEE_DBL_NAN_EXP 0x7ff #define __IEEE_FLT_NAN_EXP 0xff -#ifndef __ieeefp_isnanf -#define __ieeefp_isnanf(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \ - ((*(long *)&(x) & 0x007fffffL)!=0000000000L)) -#endif +#ifdef __ieeefp_isnanf #define isnanf(x) __ieeefp_isnanf(x) - -#ifndef __ieeefp_isinff -#define __ieeefp_isinff(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \ - ((*(long *)&(x) & 0x007fffffL)==0000000000L)) #endif + +#ifdef __ieeefp_isinff #define isinff(x) __ieeefp_isinff(x) - -#ifndef __ieeefp_finitef -#define __ieeefp_finitef(x) (((*(long *)&(x) & 0x7f800000L)!=0x7f800000L)) #endif + +#ifdef __ieeefp_finitef #define finitef(x) __ieeefp_finitef(x) +#endif #ifdef _DOUBLE_IS_32BITS #undef __IEEE_DBL_EXPBIAS diff --git a/devkitARM/arm-none-eabi/include/inttypes.h b/devkitARM/arm-none-eabi/include/inttypes.h index 39bf13511..25c6e99fa 100644 --- a/devkitARM/arm-none-eabi/include/inttypes.h +++ b/devkitARM/arm-none-eabi/include/inttypes.h @@ -14,6 +14,7 @@ #define _INTTYPES_H #include +#include #include #include #define __need_wchar_t @@ -22,7 +23,9 @@ #define __STRINGIFY(a) #a /* 8-bit types */ -#define __PRI8(x) __STRINGIFY(x) +#define __PRI8(x) __INT8 __STRINGIFY(x) +#define __PRI8LEAST(x) __LEAST8 __STRINGIFY(x) +#define __PRI8FAST(x) __FAST8 __STRINGIFY(x) /* NOTICE: scanning 8-bit types requires use of the hh specifier * which is only supported on newlib platforms that @@ -35,7 +38,9 @@ */ #if defined(_WANT_IO_C99_FORMATS) - #define __SCN8(x) __STRINGIFY(hh##x) + #define __SCN8(x) __INT8 __STRINGIFY(x) + #define __SCN8LEAST(x) __LEAST8 __STRINGIFY(x) + #define __SCN8FAST(x) __FAST8 __STRINGIFY(x) #endif /* _WANT_IO_C99_FORMATS */ @@ -58,45 +63,49 @@ #endif /* _WANT_IO_C99_FORMATS */ -#define PRIdLEAST8 __PRI8(d) -#define PRIiLEAST8 __PRI8(i) -#define PRIoLEAST8 __PRI8(o) -#define PRIuLEAST8 __PRI8(u) -#define PRIxLEAST8 __PRI8(x) -#define PRIXLEAST8 __PRI8(X) +#define PRIdLEAST8 __PRI8LEAST(d) +#define PRIiLEAST8 __PRI8LEAST(i) +#define PRIoLEAST8 __PRI8LEAST(o) +#define PRIuLEAST8 __PRI8LEAST(u) +#define PRIxLEAST8 __PRI8LEAST(x) +#define PRIXLEAST8 __PRI8LEAST(X) /* Macros below are only enabled for a newlib built with C99 I/O format support. */ #if defined(_WANT_IO_C99_FORMATS) - #define SCNdLEAST8 __SCN8(d) - #define SCNiLEAST8 __SCN8(i) - #define SCNoLEAST8 __SCN8(o) - #define SCNuLEAST8 __SCN8(u) - #define SCNxLEAST8 __SCN8(x) + #define SCNdLEAST8 __SCN8LEAST(d) + #define SCNiLEAST8 __SCN8LEAST(i) + #define SCNoLEAST8 __SCN8LEAST(o) + #define SCNuLEAST8 __SCN8LEAST(u) + #define SCNxLEAST8 __SCN8LEAST(x) #endif /* _WANT_IO_C99_FORMATS */ -#define PRIdFAST8 __PRI8(d) -#define PRIiFAST8 __PRI8(i) -#define PRIoFAST8 __PRI8(o) -#define PRIuFAST8 __PRI8(u) -#define PRIxFAST8 __PRI8(x) -#define PRIXFAST8 __PRI8(X) +#define PRIdFAST8 __PRI8FAST(d) +#define PRIiFAST8 __PRI8FAST(i) +#define PRIoFAST8 __PRI8FAST(o) +#define PRIuFAST8 __PRI8FAST(u) +#define PRIxFAST8 __PRI8FAST(x) +#define PRIXFAST8 __PRI8FAST(X) /* Macros below are only enabled for a newlib built with C99 I/O format support. */ #if defined(_WANT_IO_C99_FORMATS) - #define SCNdFAST8 __SCN8(d) - #define SCNiFAST8 __SCN8(i) - #define SCNoFAST8 __SCN8(o) - #define SCNuFAST8 __SCN8(u) - #define SCNxFAST8 __SCN8(x) + #define SCNdFAST8 __SCN8FAST(d) + #define SCNiFAST8 __SCN8FAST(i) + #define SCNoFAST8 __SCN8FAST(o) + #define SCNuFAST8 __SCN8FAST(u) + #define SCNxFAST8 __SCN8FAST(x) #endif /* _WANT_IO_C99_FORMATS */ /* 16-bit types */ -#define __PRI16(x) __STRINGIFY(x) -#define __SCN16(x) __STRINGIFY(h##x) +#define __PRI16(x) __INT16 __STRINGIFY(x) +#define __PRI16LEAST(x) __LEAST16 __STRINGIFY(x) +#define __PRI16FAST(x) __FAST16 __STRINGIFY(x) +#define __SCN16(x) __INT16 __STRINGIFY(x) +#define __SCN16LEAST(x) __LEAST16 __STRINGIFY(x) +#define __SCN16FAST(x) __FAST16 __STRINGIFY(x) #define PRId16 __PRI16(d) @@ -113,41 +122,40 @@ #define SCNx16 __SCN16(x) -#define PRIdLEAST16 __PRI16(d) -#define PRIiLEAST16 __PRI16(i) -#define PRIoLEAST16 __PRI16(o) -#define PRIuLEAST16 __PRI16(u) -#define PRIxLEAST16 __PRI16(x) -#define PRIXLEAST16 __PRI16(X) +#define PRIdLEAST16 __PRI16LEAST(d) +#define PRIiLEAST16 __PRI16LEAST(i) +#define PRIoLEAST16 __PRI16LEAST(o) +#define PRIuLEAST16 __PRI16LEAST(u) +#define PRIxLEAST16 __PRI16LEAST(x) +#define PRIXLEAST16 __PRI16LEAST(X) -#define SCNdLEAST16 __SCN16(d) -#define SCNiLEAST16 __SCN16(i) -#define SCNoLEAST16 __SCN16(o) -#define SCNuLEAST16 __SCN16(u) -#define SCNxLEAST16 __SCN16(x) +#define SCNdLEAST16 __SCN16LEAST(d) +#define SCNiLEAST16 __SCN16LEAST(i) +#define SCNoLEAST16 __SCN16LEAST(o) +#define SCNuLEAST16 __SCN16LEAST(u) +#define SCNxLEAST16 __SCN16LEAST(x) -#define PRIdFAST16 __PRI16(d) -#define PRIiFAST16 __PRI16(i) -#define PRIoFAST16 __PRI16(o) -#define PRIuFAST16 __PRI16(u) -#define PRIxFAST16 __PRI16(x) -#define PRIXFAST16 __PRI16(X) +#define PRIdFAST16 __PRI16FAST(d) +#define PRIiFAST16 __PRI16FAST(i) +#define PRIoFAST16 __PRI16FAST(o) +#define PRIuFAST16 __PRI16FAST(u) +#define PRIxFAST16 __PRI16FAST(x) +#define PRIXFAST16 __PRI16FAST(X) -#define SCNdFAST16 __SCN16(d) -#define SCNiFAST16 __SCN16(i) -#define SCNoFAST16 __SCN16(o) -#define SCNuFAST16 __SCN16(u) -#define SCNxFAST16 __SCN16(x) +#define SCNdFAST16 __SCN16FAST(d) +#define SCNiFAST16 __SCN16FAST(i) +#define SCNoFAST16 __SCN16FAST(o) +#define SCNuFAST16 __SCN16FAST(u) +#define SCNxFAST16 __SCN16FAST(x) /* 32-bit types */ -#if __have_long32 -#define __PRI32(x) __STRINGIFY(l##x) -#define __SCN32(x) __STRINGIFY(l##x) -#else -#define __PRI32(x) __STRINGIFY(x) -#define __SCN32(x) __STRINGIFY(x) -#endif +#define __PRI32(x) __INT32 __STRINGIFY(x) +#define __SCN32(x) __INT32 __STRINGIFY(x) +#define __PRI32LEAST(x) __LEAST32 __STRINGIFY(x) +#define __SCN32LEAST(x) __LEAST32 __STRINGIFY(x) +#define __PRI32FAST(x) __FAST32 __STRINGIFY(x) +#define __SCN32FAST(x) __FAST32 __STRINGIFY(x) #define PRId32 __PRI32(d) #define PRIi32 __PRI32(i) @@ -163,46 +171,44 @@ #define SCNx32 __SCN32(x) -#define PRIdLEAST32 __PRI32(d) -#define PRIiLEAST32 __PRI32(i) -#define PRIoLEAST32 __PRI32(o) -#define PRIuLEAST32 __PRI32(u) -#define PRIxLEAST32 __PRI32(x) -#define PRIXLEAST32 __PRI32(X) +#define PRIdLEAST32 __PRI32LEAST(d) +#define PRIiLEAST32 __PRI32LEAST(i) +#define PRIoLEAST32 __PRI32LEAST(o) +#define PRIuLEAST32 __PRI32LEAST(u) +#define PRIxLEAST32 __PRI32LEAST(x) +#define PRIXLEAST32 __PRI32LEAST(X) -#define SCNdLEAST32 __SCN32(d) -#define SCNiLEAST32 __SCN32(i) -#define SCNoLEAST32 __SCN32(o) -#define SCNuLEAST32 __SCN32(u) -#define SCNxLEAST32 __SCN32(x) +#define SCNdLEAST32 __SCN32LEAST(d) +#define SCNiLEAST32 __SCN32LEAST(i) +#define SCNoLEAST32 __SCN32LEAST(o) +#define SCNuLEAST32 __SCN32LEAST(u) +#define SCNxLEAST32 __SCN32LEAST(x) -#define PRIdFAST32 __PRI32(d) -#define PRIiFAST32 __PRI32(i) -#define PRIoFAST32 __PRI32(o) -#define PRIuFAST32 __PRI32(u) -#define PRIxFAST32 __PRI32(x) -#define PRIXFAST32 __PRI32(X) +#define PRIdFAST32 __PRI32FAST(d) +#define PRIiFAST32 __PRI32FAST(i) +#define PRIoFAST32 __PRI32FAST(o) +#define PRIuFAST32 __PRI32FAST(u) +#define PRIxFAST32 __PRI32FAST(x) +#define PRIXFAST32 __PRI32FAST(X) -#define SCNdFAST32 __SCN32(d) -#define SCNiFAST32 __SCN32(i) -#define SCNoFAST32 __SCN32(o) -#define SCNuFAST32 __SCN32(u) -#define SCNxFAST32 __SCN32(x) +#define SCNdFAST32 __SCN32FAST(d) +#define SCNiFAST32 __SCN32FAST(i) +#define SCNoFAST32 __SCN32FAST(o) +#define SCNuFAST32 __SCN32FAST(u) +#define SCNxFAST32 __SCN32FAST(x) /* 64-bit types */ -#if __have_long64 -#define __PRI64(x) __STRINGIFY(l##x) -#define __SCN64(x) __STRINGIFY(l##x) -#elif __have_longlong64 -#define __PRI64(x) __STRINGIFY(ll##x) -#define __SCN64(x) __STRINGIFY(ll##x) -#else -#define __PRI64(x) __STRINGIFY(x) -#define __SCN64(x) __STRINGIFY(x) -#endif +#define __PRI64(x) __INT64 __STRINGIFY(x) +#define __SCN64(x) __INT64 __STRINGIFY(x) +#define __PRI64LEAST(x) __LEAST64 __STRINGIFY(x) +#define __SCN64LEAST(x) __LEAST64 __STRINGIFY(x) +#define __PRI64FAST(x) __FAST64 __STRINGIFY(x) +#define __SCN64FAST(x) __FAST64 __STRINGIFY(x) + +#if __int64_t_defined #define PRId64 __PRI64(d) #define PRIi64 __PRI64(i) #define PRIo64 __PRI64(o) @@ -215,34 +221,36 @@ #define SCNo64 __SCN64(o) #define SCNu64 __SCN64(u) #define SCNx64 __SCN64(x) +#endif -#if __int64_t_defined -#define PRIdLEAST64 __PRI64(d) -#define PRIiLEAST64 __PRI64(i) -#define PRIoLEAST64 __PRI64(o) -#define PRIuLEAST64 __PRI64(u) -#define PRIxLEAST64 __PRI64(x) -#define PRIXLEAST64 __PRI64(X) +#if __int_least64_t_defined +#define PRIdLEAST64 __PRI64LEAST(d) +#define PRIiLEAST64 __PRI64LEAST(i) +#define PRIoLEAST64 __PRI64LEAST(o) +#define PRIuLEAST64 __PRI64LEAST(u) +#define PRIxLEAST64 __PRI64LEAST(x) +#define PRIXLEAST64 __PRI64LEAST(X) -#define SCNdLEAST64 __SCN64(d) -#define SCNiLEAST64 __SCN64(i) -#define SCNoLEAST64 __SCN64(o) -#define SCNuLEAST64 __SCN64(u) -#define SCNxLEAST64 __SCN64(x) +#define SCNdLEAST64 __SCN64LEAST(d) +#define SCNiLEAST64 __SCN64LEAST(i) +#define SCNoLEAST64 __SCN64LEAST(o) +#define SCNuLEAST64 __SCN64LEAST(u) +#define SCNxLEAST64 __SCN64LEAST(x) +#endif +#if __int_fast64_t_defined +#define PRIdFAST64 __PRI64FAST(d) +#define PRIiFAST64 __PRI64FAST(i) +#define PRIoFAST64 __PRI64FAST(o) +#define PRIuFAST64 __PRI64FAST(u) +#define PRIxFAST64 __PRI64FAST(x) +#define PRIXFAST64 __PRI64FAST(X) -#define PRIdFAST64 __PRI64(d) -#define PRIiFAST64 __PRI64(i) -#define PRIoFAST64 __PRI64(o) -#define PRIuFAST64 __PRI64(u) -#define PRIxFAST64 __PRI64(x) -#define PRIXFAST64 __PRI64(X) - -#define SCNdFAST64 __SCN64(d) -#define SCNiFAST64 __SCN64(i) -#define SCNoFAST64 __SCN64(o) -#define SCNuFAST64 __SCN64(u) -#define SCNxFAST64 __SCN64(x) +#define SCNdFAST64 __SCN64FAST(d) +#define SCNiFAST64 __SCN64FAST(i) +#define SCNoFAST64 __SCN64FAST(o) +#define SCNuFAST64 __SCN64FAST(u) +#define SCNxFAST64 __SCN64FAST(x) #endif /* max-bit types */ @@ -271,10 +279,10 @@ #define SCNxMAX __SCNMAX(x) /* ptr types */ -#if defined(_UINTPTR_EQ_ULONGLONG) +#if defined (_INTPTR_EQ_LONGLONG) # define __PRIPTR(x) __STRINGIFY(ll##x) # define __SCNPTR(x) __STRINGIFY(ll##x) -#elif defined(_UINTPTR_EQ_ULONG) +#elif defined (_INTPTR_EQ_LONG) # define __PRIPTR(x) __STRINGIFY(l##x) # define __SCNPTR(x) __STRINGIFY(l##x) #else diff --git a/devkitARM/arm-none-eabi/include/langinfo.h b/devkitARM/arm-none-eabi/include/langinfo.h index 9040adeff..0fbb2a8d9 100644 --- a/devkitARM/arm-none-eabi/include/langinfo.h +++ b/devkitARM/arm-none-eabi/include/langinfo.h @@ -32,6 +32,9 @@ #include #include #include +#if __POSIX_VISIBLE >= 200809 +#include +#endif typedef int nl_item; @@ -310,7 +313,10 @@ enum __nl_item }; __BEGIN_DECLS -char *nl_langinfo(nl_item); +char *nl_langinfo (nl_item); +#if __POSIX_VISIBLE >= 200809 +char *nl_langinfo_l (nl_item, locale_t); +#endif __END_DECLS #endif /* !_LANGINFO_H_ */ diff --git a/devkitARM/arm-none-eabi/include/libgen.h b/devkitARM/arm-none-eabi/include/libgen.h index abfab0e5c..3c717c5b0 100644 --- a/devkitARM/arm-none-eabi/include/libgen.h +++ b/devkitARM/arm-none-eabi/include/libgen.h @@ -6,13 +6,27 @@ #define _LIBGEN_H_ #include "_ansi.h" +#include #include #ifdef __cplusplus extern "C" { #endif -char *_EXFUN(basename, (char *)); +/* There are two common basename variants. If you do NOT #include + and you do + + #define _GNU_SOURCE + #include + + you get the GNU version. Otherwise you get the POSIX versionfor which you + should #include i for the function prototype. POSIX requires that + #undef basename will still let you invoke the underlying function. However, + this also implies that the POSIX version is used in this case. That's made + sure here. */ +#undef basename +#define basename __xpg_basename +char *_EXFUN(basename, (char *)) __asm__(__ASMNAME("basename")); char *_EXFUN(dirname, (char *)); #ifdef __cplusplus diff --git a/devkitARM/arm-none-eabi/include/limits.h b/devkitARM/arm-none-eabi/include/limits.h index 190f1f783..dd09c1cee 100644 --- a/devkitARM/arm-none-eabi/include/limits.h +++ b/devkitARM/arm-none-eabi/include/limits.h @@ -2,6 +2,7 @@ # define _LIBC_LIMITS_H_ 1 #include +#include # ifdef _MB_LEN_MAX # define MB_LEN_MAX _MB_LEN_MAX @@ -96,8 +97,7 @@ # define __LONG_LONG_MAX__ 9223372036854775807LL # endif -# if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) +# if __ISO_C_VISIBLE >= 1999 /* Minimum and maximum values a `signed long long int' can hold. */ # undef LLONG_MIN # define LLONG_MIN (-LLONG_MAX-1) @@ -109,7 +109,7 @@ # define ULLONG_MAX (LLONG_MAX * 2ULL + 1) # endif -# if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__) +# if __GNU_VISIBLE /* Minimum and maximum values a `signed long long int' can hold. */ # undef LONG_LONG_MIN # define LONG_LONG_MIN (-LONG_LONG_MAX-1) diff --git a/devkitARM/arm-none-eabi/include/locale.h b/devkitARM/arm-none-eabi/include/locale.h index cbd658e41..7feb881aa 100644 --- a/devkitARM/arm-none-eabi/include/locale.h +++ b/devkitARM/arm-none-eabi/include/locale.h @@ -8,6 +8,7 @@ #define _LOCALE_H_ #include "_ansi.h" +#include #define __need_NULL #include @@ -20,6 +21,22 @@ #define LC_TIME 5 #define LC_MESSAGES 6 +#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB) + +#include + +#define LC_ALL_MASK (1 << LC_ALL) +#define LC_COLLATE_MASK (1 << LC_COLLATE) +#define LC_CTYPE_MASK (1 << LC_CTYPE) +#define LC_MONETARY_MASK (1 << LC_MONETARY) +#define LC_NUMERIC_MASK (1 << LC_NUMERIC) +#define LC_TIME_MASK (1 << LC_TIME) +#define LC_MESSAGES_MASK (1 << LC_MESSAGES) + +#define LC_GLOBAL_LOCALE ((struct __locale_t *) -1) + +#endif /* __POSIX_VISIBLE >= 200809 */ + _BEGIN_STD_C struct lconv @@ -50,15 +67,30 @@ struct lconv char int_p_sign_posn; }; -#ifndef _REENT_ONLY -char *_EXFUN(setlocale,(int category, const char *locale)); -struct lconv *_EXFUN(localeconv,(void)); -#endif - struct _reent; -char *_EXFUN(_setlocale_r,(struct _reent *, int category, const char *locale)); +char *_EXFUN(_setlocale_r,(struct _reent *, int, const char *)); struct lconv *_EXFUN(_localeconv_r,(struct _reent *)); +struct __locale_t *_newlocale_r (struct _reent *, int, const char *, + struct __locale_t *); +void _freelocale_r (struct _reent *, struct __locale_t *); +struct __locale_t *_duplocale_r (struct _reent *, struct __locale_t *); +struct __locale_t *_uselocale_r (struct _reent *, struct __locale_t *); + +#ifndef _REENT_ONLY + +char *_EXFUN(setlocale,(int, const char *)); +struct lconv *_EXFUN(localeconv,(void)); + +#if __POSIX_VISIBLE >= 200809 +locale_t newlocale (int, const char *, locale_t); +void freelocale (locale_t); +locale_t duplocale (locale_t); +locale_t uselocale (locale_t); +#endif /* __POSIX_VISIBLE >= 200809 */ + +#endif /* _REENT_ONLY */ + _END_STD_C #endif /* _LOCALE_H_ */ diff --git a/devkitARM/arm-none-eabi/include/machine/_arc4random.h b/devkitARM/arm-none-eabi/include/machine/_arc4random.h new file mode 100644 index 000000000..52808d722 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/machine/_arc4random.h @@ -0,0 +1 @@ +/* Use default implementation, see arc4random.h */ diff --git a/devkitARM/arm-none-eabi/include/machine/_default_types.h b/devkitARM/arm-none-eabi/include/machine/_default_types.h index 0eb1fbc3d..6137493be 100644 --- a/devkitARM/arm-none-eabi/include/machine/_default_types.h +++ b/devkitARM/arm-none-eabi/include/machine/_default_types.h @@ -1,5 +1,5 @@ /* - * $Id: _default_types.h,v 1.7 2014/03/04 08:05:39 corinna Exp $ + * $Id$ */ #ifndef _MACHINE__DEFAULT_TYPES_H @@ -19,6 +19,20 @@ #include #endif +/* Check if "long long" is 64bit wide */ +/* Modern GCCs provide __LONG_LONG_MAX__, SUSv3 wants LLONG_MAX */ +#if ( defined(__LONG_LONG_MAX__) && (__LONG_LONG_MAX__ > 0x7fffffff) ) \ + || ( defined(LLONG_MAX) && (LLONG_MAX > 0x7fffffff) ) +#define __have_longlong64 1 +#endif + +/* Check if "long" is 64bit or 32bit wide */ +#if __EXP(LONG_MAX) > 0x7fffffff +#define __have_long64 1 +#elif __EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__) +#define __have_long32 1 +#endif + #ifdef __cplusplus extern "C" { #endif @@ -196,6 +210,22 @@ typedef __uint64_t __uint_least64_t; #define ___int_least64_t_defined 1 #endif +#if defined(__INTMAX_TYPE__) +typedef __INTMAX_TYPE__ __intmax_t; +#elif __have_longlong64 +typedef signed long long __intmax_t; +#else +typedef signed long __intmax_t; +#endif + +#if defined(__UINTMAX_TYPE__) +typedef __UINTMAX_TYPE__ __uintmax_t; +#elif __have_longlong64 +typedef unsigned long long __uintmax_t; +#else +typedef unsigned long __uintmax_t; +#endif + #ifdef __INTPTR_TYPE__ typedef __INTPTR_TYPE__ __intptr_t; #ifdef __UINTPTR_TYPE__ diff --git a/devkitARM/arm-none-eabi/include/machine/_endian.h b/devkitARM/arm-none-eabi/include/machine/_endian.h new file mode 100644 index 000000000..3f50a6943 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/machine/_endian.h @@ -0,0 +1,39 @@ +/* ARM configuration file. + Copyright (c) 2015 ARM Ltd. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#ifndef __MACHINE_ENDIAN_H__ +#error "must be included via " +#endif /* !__MACHINE_ENDIAN_H__ */ + +#define _LITTLE_ENDIAN 1234 +#define _BIG_ENDIAN 4321 +#define _PDP_ENDIAN 3412 + +#ifdef __ARMEB__ +#define _BYTE_ORDER _BIG_ENDIAN +#else +#define _BYTE_ORDER _LITTLE_ENDIAN +#endif diff --git a/devkitARM/arm-none-eabi/include/machine/_time.h b/devkitARM/arm-none-eabi/include/machine/_time.h new file mode 100644 index 000000000..476760c91 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/machine/_time.h @@ -0,0 +1,3 @@ +#ifndef _SYS_TIME_H_ +#error "must be included via " +#endif /* !_SYS_TIME_H_ */ diff --git a/devkitARM/arm-none-eabi/include/machine/_types.h b/devkitARM/arm-none-eabi/include/machine/_types.h index 18f96d5f1..40092f99f 100644 --- a/devkitARM/arm-none-eabi/include/machine/_types.h +++ b/devkitARM/arm-none-eabi/include/machine/_types.h @@ -1,8 +1,19 @@ -/* - * $Id: _types.h,v 1.3 2007/09/07 21:16:25 jjohnstn Exp $ - */ - #ifndef _MACHINE__TYPES_H #define _MACHINE__TYPES_H + #include + +/* Use 64bit types */ +typedef __int64_t _off_t; +#define __machine_off_t_defined + +typedef __int64_t _fpos_t; +#define __machine_fpos_t_defined + +typedef __uint32_t __ino_t; +#define __machine_ino_t_defined + +typedef __uint32_t __dev_t; +#define __machine_dev_t_defined #endif + diff --git a/devkitARM/arm-none-eabi/include/machine/endian.h b/devkitARM/arm-none-eabi/include/machine/endian.h index 07ebc8f63..34a5726e6 100644 --- a/devkitARM/arm-none-eabi/include/machine/endian.h +++ b/devkitARM/arm-none-eabi/include/machine/endian.h @@ -1,20 +1,69 @@ #ifndef __MACHINE_ENDIAN_H__ +#define __MACHINE_ENDIAN_H__ -#include +#include +#include +#include -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 -#endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 -#endif - -#ifndef BYTE_ORDER -#if defined(__IEEE_LITTLE_ENDIAN) || defined(__IEEE_BYTES_LITTLE_ENDIAN) -#define BYTE_ORDER LITTLE_ENDIAN +#if _BYTE_ORDER == _LITTLE_ENDIAN +#define _QUAD_HIGHWORD 1 +#define _QUAD_LOWWORD 0 #else -#define BYTE_ORDER BIG_ENDIAN +#define _QUAD_HIGHWORD 0 +#define _QUAD_LOWWORD 1 #endif + +#if __BSD_VISIBLE +#define LITTLE_ENDIAN _LITTLE_ENDIAN +#define BIG_ENDIAN _BIG_ENDIAN +#define PDP_ENDIAN _PDP_ENDIAN +#define BYTE_ORDER _BYTE_ORDER #endif +#ifdef __GNUC__ +#define __bswap16(_x) __builtin_bswap16(_x) +#define __bswap32(_x) __builtin_bswap32(_x) +#define __bswap64(_x) __builtin_bswap64(_x) +#else /* __GNUC__ */ +static __inline __uint16_t +__bswap16(__uint16_t _x) +{ + + return ((__uint16_t)((_x >> 8) | ((_x << 8) & 0xff00))); +} + +static __inline __uint32_t +__bswap32(__uint32_t _x) +{ + + return ((__uint32_t)((_x >> 24) | ((_x >> 8) & 0xff00) | + ((_x << 8) & 0xff0000) | ((_x << 24) & 0xff000000))); +} + +static __inline __uint64_t +__bswap64(__uint64_t _x) +{ + + return ((__uint64_t)((_x >> 56) | ((_x >> 40) & 0xff00) | + ((_x >> 24) & 0xff0000) | ((_x >> 8) & 0xff000000) | + ((_x << 8) & ((__uint64_t)0xff << 32)) | + ((_x << 24) & ((__uint64_t)0xff << 40)) | + ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56)))); +} +#endif /* !__GNUC__ */ + +#ifndef __machine_host_to_from_network_defined +#if _BYTE_ORDER == _LITTLE_ENDIAN +#define __htonl(_x) __bswap32(_x) +#define __htons(_x) __bswap16(_x) +#define __ntohl(_x) __bswap32(_x) +#define __ntohs(_x) __bswap16(_x) +#else +#define __htonl(_x) ((__uint32_t)(_x)) +#define __htons(_x) ((__uint16_t)(_x)) +#define __ntohl(_x) ((__uint32_t)(_x)) +#define __ntohs(_x) ((__uint16_t)(_x)) +#endif +#endif /* __machine_host_to_from_network_defined */ + #endif /* __MACHINE_ENDIAN_H__ */ diff --git a/devkitARM/arm-none-eabi/include/machine/ieeefp.h b/devkitARM/arm-none-eabi/include/machine/ieeefp.h index 8304a1b87..11ef0dd03 100644 --- a/devkitARM/arm-none-eabi/include/machine/ieeefp.h +++ b/devkitARM/arm-none-eabi/include/machine/ieeefp.h @@ -283,6 +283,10 @@ #define __IEEE_BIG_ENDIAN #endif +#ifdef __FT32__ +#define __IEEE_LITTLE_ENDIAN +#endif + #ifdef __mcore__ #define __IEEE_BIG_ENDIAN #endif @@ -415,6 +419,10 @@ # endif #endif +#ifdef __VISIUM__ +#define __IEEE_BIG_ENDIAN +#endif + #ifndef __IEEE_BIG_ENDIAN #ifndef __IEEE_LITTLE_ENDIAN #error Endianess not declared!! diff --git a/devkitARM/arm-none-eabi/include/machine/param.h b/devkitARM/arm-none-eabi/include/machine/param.h index 595294cf3..513f7b0b0 100644 --- a/devkitARM/arm-none-eabi/include/machine/param.h +++ b/devkitARM/arm-none-eabi/include/machine/param.h @@ -5,10 +5,4 @@ # define HZ (100) -#ifdef __ARMEB__ -#define BYTE_ORDER BIG_ENDIAN -#else -#define BYTE_ORDER LITTLE_ENDIAN -#endif - #endif diff --git a/devkitARM/arm-none-eabi/include/machine/setjmp.h b/devkitARM/arm-none-eabi/include/machine/setjmp.h index f7e5865ab..2b4dd8b91 100644 --- a/devkitARM/arm-none-eabi/include/machine/setjmp.h +++ b/devkitARM/arm-none-eabi/include/machine/setjmp.h @@ -92,6 +92,9 @@ _BEGIN_STD_C # define _JBLEN (13 * 4) # elif defined(__unix__) || defined(__rtems__) # define _JBLEN 9 +# elif defined(__iamcu__) +/* Intel MCU jmp_buf only covers callee-saved registers. */ +# define _JBLEN 6 # else # include "setjmp-dj.h" # endif @@ -250,6 +253,10 @@ _BEGIN_STD_C #define _JBLEN 10 #endif +#ifdef __FT32__ +#define _JBLEN 27 +#endif + #ifdef __iq2000__ #define _JBLEN 32 #endif @@ -258,6 +265,10 @@ _BEGIN_STD_C #define _JBLEN 16 #endif +#ifdef __arc__ +#define _JBLEN 25 /* r13-r30,blink,lp_count,lp_start,lp_end,mlo,mhi,status32 */ +#endif + #ifdef __MMIX__ /* Using a layout compatible with GCC's built-in. */ #define _JBLEN 5 @@ -287,6 +298,10 @@ _BEGIN_STD_C #define _JBLEN 18 #endif +#ifdef __ia64 +#define _JBLEN 64 +#endif + #ifdef __lm32__ #define _JBLEN 19 #endif @@ -338,6 +353,11 @@ _BEGIN_STD_C #define _JBLEN 0x44 #endif +#ifdef __VISIUM__ +/* All call-saved GP registers: r11-r19,r21,r22,r23. */ +#define _JBLEN 12 +#endif + #ifdef _JBLEN #ifdef _JBTYPE typedef _JBTYPE jmp_buf[_JBLEN]; @@ -376,6 +396,13 @@ typedef int sigjmp_buf[_JBLEN+1+(sizeof (sigset_t)/sizeof (int))]; #define __SIGMASK_FUNC sigprocmask #endif +#ifdef __CYGWIN__ +/* Per POSIX, siglongjmp has to be implemented as function. Cygwin + provides functions for both, siglongjmp and sigsetjmp since 2.2.0. */ +extern void siglongjmp (sigjmp_buf, int) __attribute__ ((__noreturn__)); +extern int sigsetjmp (sigjmp_buf, int); +#endif + #if defined(__GNUC__) #define sigsetjmp(env, savemask) \ @@ -413,8 +440,8 @@ typedef int sigjmp_buf[_JBLEN+1+(sizeof (sigset_t)/sizeof (int))]; are equivalent to sigsetjmp/siglongjmp when not saving the signal mask. New applications should use sigsetjmp/siglongjmp instead. */ #ifdef __CYGWIN__ -extern void _longjmp(jmp_buf, int); -extern int _setjmp(jmp_buf); +extern void _longjmp (jmp_buf, int) __attribute__ ((__noreturn__)); +extern int _setjmp (jmp_buf); #else #define _setjmp(env) sigsetjmp ((env), 0) #define _longjmp(env, val) siglongjmp ((env), (val)) diff --git a/devkitARM/arm-none-eabi/include/machine/time.h b/devkitARM/arm-none-eabi/include/machine/time.h index 06e2ccffb..6f9a35cc5 100644 --- a/devkitARM/arm-none-eabi/include/machine/time.h +++ b/devkitARM/arm-none-eabi/include/machine/time.h @@ -1,19 +1,15 @@ #ifndef _MACHTIME_H_ #define _MACHTIME_H_ -#if defined(__rtems__) -#define _CLOCKS_PER_SEC_ sysconf(_SC_CLK_TCK) -#else /* !__rtems__ */ -#if defined(__aarch64__) || defined(__arm__) || defined(__thumb__) +#if defined(__rtems__) || defined(__VISIUM__) +#define _CLOCKS_PER_SEC_ 1000000 +#elif defined(__aarch64__) || defined(__arm__) || defined(__thumb__) #define _CLOCKS_PER_SEC_ 100 #endif -#endif /* !__rtems__ */ #ifdef __SPU__ -#include +#include int nanosleep (const struct timespec *, struct timespec *); #endif #endif /* _MACHTIME_H_ */ - - diff --git a/devkitARM/arm-none-eabi/include/machine/types.h b/devkitARM/arm-none-eabi/include/machine/types.h index 40a75faa5..a5a64e675 100644 --- a/devkitARM/arm-none-eabi/include/machine/types.h +++ b/devkitARM/arm-none-eabi/include/machine/types.h @@ -1,30 +1,7 @@ -#ifndef _MACHTYPES_H_ -#define _MACHTYPES_H_ - /* - * The following section is RTEMS specific and is needed to more - * closely match the types defined in the BSD machine/types.h. - * This is needed to let the RTEMS/BSD TCP/IP stack compile. + * Newlib targets may provide an own version of this file in their machine + * directory to add custom user types for . */ -#if defined(__rtems__) -#include -#endif - -#define _CLOCK_T_ unsigned long /* clock() */ -#define _TIME_T_ long /* time() */ -#define _CLOCKID_T_ unsigned long -#define _TIMER_T_ unsigned long - -#ifndef _HAVE_SYSTYPES -typedef long int __off_t; -typedef int __pid_t; -#ifdef __GNUC__ -__extension__ typedef long long int __loff_t; -#else -typedef long int __loff_t; -#endif -#endif - -#endif /* _MACHTYPES_H_ */ - - +#ifndef _SYS_TYPES_H +#error "must be included via " +#endif /* !_SYS_TYPES_H */ diff --git a/devkitARM/arm-none-eabi/include/math.h b/devkitARM/arm-none-eabi/include/math.h index d16ce3074..ebbdac68c 100644 --- a/devkitARM/arm-none-eabi/include/math.h +++ b/devkitARM/arm-none-eabi/include/math.h @@ -3,6 +3,7 @@ #define _MATH_H_ #include +#include #include #include "_ansi.h" @@ -136,9 +137,26 @@ extern double fmod _PARAMS((double, double)); #endif /* ! defined (__math_68881) */ #endif /* ! defined (_REENT_ONLY) */ -#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || \ - (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) +#if __MISC_VISIBLE +extern int finite _PARAMS((double)); +extern int finitef _PARAMS((float)); +extern int finitel _PARAMS((long double)); +extern int isinff _PARAMS((float)); +extern int isnanf _PARAMS((float)); +#ifdef __CYGWIN__ /* not implemented in newlib yet */ +extern int isinfl _PARAMS((long double)); +extern int isnanl _PARAMS((long double)); +#endif +#if !defined(__cplusplus) || __cplusplus < 201103L +extern int isinf _PARAMS((double)); +#endif +#endif /* __MISC_VISIBLE */ +#if (__MISC_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 600)) \ + && (!defined(__cplusplus) || __cplusplus < 201103L) +extern int isnan _PARAMS((double)); +#endif +#if __ISO_C_VISIBLE >= 1999 /* ISO C99 types and macros. */ /* FIXME: FLT_EVAL_METHOD should somehow be gotten from float.h (which is hard, @@ -180,10 +198,10 @@ extern double fmod _PARAMS((double, double)); #define FP_NORMAL 4 #ifndef FP_ILOGB0 -# define FP_ILOGB0 (-INT_MAX) +# define FP_ILOGB0 (-__INT_MAX__) #endif #ifndef FP_ILOGBNAN -# define FP_ILOGBNAN INT_MAX +# define FP_ILOGBNAN __INT_MAX__ #endif #ifndef MATH_ERRNO @@ -205,35 +223,70 @@ extern int __fpclassifyd (double x); extern int __signbitf (float x); extern int __signbitd (double x); -#define fpclassify(__x) \ - ((sizeof(__x) == sizeof(float)) ? __fpclassifyf(__x) : \ - __fpclassifyd(__x)) - -#ifndef isfinite - #define isfinite(__y) \ - (__extension__ ({int __cy = fpclassify(__y); \ - __cy != FP_INFINITE && __cy != FP_NAN;})) -#endif - /* Note: isinf and isnan were once functions in newlib that took double * arguments. C99 specifies that these names are reserved for macros * supporting multiple floating point types. Thus, they are * now defined as macros. Implementations of the old functions * taking double arguments still exist for compatibility purposes - * (prototypes for them are in ). */ -#ifndef isinf - #define isinf(y) (fpclassify(y) == FP_INFINITE) + * (prototypes for them are earlier in this header). */ + +#if __GNUC_PREREQ (4, 4) + #define fpclassify(__x) (__builtin_fpclassify (FP_NAN, FP_INFINITE, \ + FP_NORMAL, FP_SUBNORMAL, \ + FP_ZERO, __x)) + #ifndef isfinite + #define isfinite(__x) (__builtin_isfinite (__x)) + #endif + #ifndef isinf + #define isinf(__x) (__builtin_isinf_sign (__x)) + #endif + #ifndef isnan + #define isnan(__x) (__builtin_isnan (__x)) + #endif + #define isnormal(__x) (__builtin_isnormal (__x)) +#else + #define fpclassify(__x) \ + ((sizeof(__x) == sizeof(float)) ? __fpclassifyf(__x) : \ + __fpclassifyd(__x)) + #ifndef isfinite + #define isfinite(__y) \ + (__extension__ ({int __cy = fpclassify(__y); \ + __cy != FP_INFINITE && __cy != FP_NAN;})) + #endif + #ifndef isinf + #define isinf(__x) (fpclassify(__x) == FP_INFINITE) + #endif + #ifndef isnan + #define isnan(__x) (fpclassify(__x) == FP_NAN) + #endif + #define isnormal(__x) (fpclassify(__x) == FP_NORMAL) #endif -#ifndef isnan - #define isnan(y) (fpclassify(y) == FP_NAN) +#if __GNUC_PREREQ (4, 0) + #if defined(_HAVE_LONG_DOUBLE) + #define signbit(__x) \ + ((sizeof(__x) == sizeof(float)) ? __builtin_signbitf(__x) : \ + (sizeof(__x) == sizeof(double)) ? __builtin_signbit (__x) : \ + __builtin_signbitl(__x)) + #else + #define signbit(__x) \ + ((sizeof(__x) == sizeof(float)) ? __builtin_signbitf(__x) : \ + __builtin_signbit (__x)) + #endif +#else + #define signbit(__x) \ + ((sizeof(__x) == sizeof(float)) ? __signbitf(__x) : \ + __signbitd(__x)) #endif -#define isnormal(y) (fpclassify(y) == FP_NORMAL) -#define signbit(__x) \ - ((sizeof(__x) == sizeof(float)) ? __signbitf(__x) : \ - __signbitd(__x)) - +#if __GNUC_PREREQ (2, 97) +#define isgreater(__x,__y) (__builtin_isgreater (__x, __y)) +#define isgreaterequal(__x,__y) (__builtin_isgreaterequal (__x, __y)) +#define isless(__x,__y) (__builtin_isless (__x, __y)) +#define islessequal(__x,__y) (__builtin_islessequal (__x, __y)) +#define islessgreater(__x,__y) (__builtin_islessgreater (__x, __y)) +#define isunordered(__x,__y) (__builtin_isunordered (__x, __y)) +#else #define isgreater(x,y) \ (__extension__ ({__typeof__(x) __x = (x); __typeof__(y) __y = (y); \ !isunordered(__x,__y) && (__x > __y);})) @@ -253,12 +306,12 @@ extern int __signbitd (double x); #define isunordered(a,b) \ (__extension__ ({__typeof__(a) __a = (a); __typeof__(b) __b = (b); \ fpclassify(__a) == FP_NAN || fpclassify(__b) == FP_NAN;})) +#endif /* Non ANSI double precision functions. */ extern double infinity _PARAMS((void)); extern double nan _PARAMS((const char *)); -extern int finite _PARAMS((double)); extern double copysign _PARAMS((double, double)); extern double logb _PARAMS((double)); extern int ilogb _PARAMS((double)); @@ -357,7 +410,6 @@ extern float fmaf _PARAMS((float, float, float)); extern float infinityf _PARAMS((void)); extern float nanf _PARAMS((const char *)); -extern int finitef _PARAMS((float)); extern float copysignf _PARAMS((float, float)); extern float logbf _PARAMS((float)); extern int ilogbf _PARAMS((float)); @@ -382,8 +434,12 @@ extern float log2f _PARAMS((float)); extern float hypotf _PARAMS((float, float)); #endif /* ! defined (_REENT_ONLY) */ -/* On platforms where long double equals double. */ -#ifdef _LDBL_EQ_DBL +/* Newlib doesn't fully support long double math functions so far. + On platforms where long double equals double the long double functions + simply call the double functions. On Cygwin the long double functions + are implemented independently from newlib to be able to use optimized + assembler functions despite using the Microsoft x86_64 ABI. */ +#if defined (_LDBL_EQ_DBL) || defined (__CYGWIN__) /* Reentrant ANSI C functions. */ #ifndef __math_68881 extern long double atanl _PARAMS((long double)); @@ -453,44 +509,56 @@ extern long double lgammal _PARAMS((long double)); extern long double erfl _PARAMS((long double)); extern long double erfcl _PARAMS((long double)); #endif /* ! defined (_REENT_ONLY) */ -#else /* !_LDBL_EQ_DBL */ +#else /* !_LDBL_EQ_DBL && !__CYGWIN__ */ +extern long double hypotl _PARAMS((long double, long double)); +extern long double sqrtl _PARAMS((long double)); #ifdef __i386__ /* Other long double precision functions. */ extern _LONG_DOUBLE rintl _PARAMS((_LONG_DOUBLE)); extern long int lrintl _PARAMS((_LONG_DOUBLE)); extern long long int llrintl _PARAMS((_LONG_DOUBLE)); #endif /* __i386__ */ -#endif /* !_LDBL_EQ_DBL */ +#endif /* !_LDBL_EQ_DBL && !__CYGWIN__ */ -#endif /* !defined (__STRICT_ANSI__) || defined(__cplusplus) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) */ - -#if !defined (__STRICT_ANSI__) || defined(__cplusplus) +#endif /* __ISO_C_VISIBLE >= 1999 */ +#if __MISC_VISIBLE extern double drem _PARAMS((double, double)); -extern void sincos _PARAMS((double, double *, double *)); +extern float dremf _PARAMS((float, float)); +#ifdef __CYGWIN__ +extern float dreml _PARAMS((long double, long double)); +#endif /* __CYGWIN__ */ extern double gamma_r _PARAMS((double, int *)); extern double lgamma_r _PARAMS((double, int *)); +extern float gammaf_r _PARAMS((float, int *)); +extern float lgammaf_r _PARAMS((float, int *)); +#endif +#if __MISC_VISIBLE || __XSI_VISIBLE extern double y0 _PARAMS((double)); extern double y1 _PARAMS((double)); extern double yn _PARAMS((int, double)); extern double j0 _PARAMS((double)); extern double j1 _PARAMS((double)); extern double jn _PARAMS((int, double)); +#endif -extern float dremf _PARAMS((float, float)); -extern void sincosf _PARAMS((float, float *, float *)); -extern float gammaf_r _PARAMS((float, int *)); -extern float lgammaf_r _PARAMS((float, int *)); - +#if __MISC_VISIBLE || __XSI_VISIBLE >= 600 extern float y0f _PARAMS((float)); extern float y1f _PARAMS((float)); extern float ynf _PARAMS((int, float)); extern float j0f _PARAMS((float)); extern float j1f _PARAMS((float)); extern float jnf _PARAMS((int, float)); +#endif /* GNU extensions */ +#if __GNU_VISIBLE +extern void sincos _PARAMS((double, double *, double *)); +extern void sincosf _PARAMS((float, float *, float *)); +#ifdef __CYGWIN__ +extern void sincosl _PARAMS((long double, long double *, long double *)); +#endif /* __CYGWIN__ */ # ifndef exp10 extern double exp10 _PARAMS((double)); # endif @@ -503,11 +571,17 @@ extern float exp10f _PARAMS((float)); # ifndef pow10f extern float pow10f _PARAMS((float)); # endif +#ifdef __CYGWIN__ +# ifndef exp10l +extern float exp10l _PARAMS((float)); +# endif +# ifndef pow10l +extern float pow10l _PARAMS((float)); +# endif +#endif /* __CYGWIN__ */ +#endif /* __GNU_VISIBLE */ -#endif /* !defined (__STRICT_ANSI__) || defined(__cplusplus) */ - -#ifndef __STRICT_ANSI__ - +#if __MISC_VISIBLE || __XSI_VISIBLE /* The gamma functions use a global variable, signgam. */ #ifndef _REENT_ONLY #define signgam (*__signgam()) @@ -515,7 +589,9 @@ extern int *__signgam _PARAMS((void)); #endif /* ! defined (_REENT_ONLY) */ #define __signgam_r(ptr) _REENT_SIGNGAM(ptr) +#endif /* __MISC_VISIBLE || __XSI_VISIBLE */ +#if __SVID_VISIBLE /* The exception structure passed to the matherr routine. */ /* We have a problem when using C++ since `exception' is a reserved name in C++. */ @@ -548,11 +624,11 @@ extern int matherr _PARAMS((struct exception *e)); #define TLOSS 5 #define PLOSS 6 -#endif /* ! defined (__STRICT_ANSI__) */ +#endif /* __SVID_VISIBLE */ /* Useful constants. */ -#if !defined(__STRICT_ANSI__) || ((_XOPEN_SOURCE - 0) >= 500) +#if __BSD_VISIBLE || __XSI_VISIBLE #define MAXFLOAT 3.40282347e+38F @@ -572,7 +648,7 @@ extern int matherr _PARAMS((struct exception *e)); #endif -#ifndef __STRICT_ANSI__ +#if __BSD_VISIBLE #define M_TWOPI (M_PI * 2.0) #define M_3PI_4 2.3561944901923448370E0 @@ -604,7 +680,7 @@ extern __IMPORT _LIB_VERSION_TYPE _LIB_VERSION; #define _XOPEN_ __fdlibm_xopen #define _POSIX_ __fdlibm_posix -#endif /* ! defined (__STRICT_ANSI__) */ +#endif /* __BSD_VISIBLE */ _END_STD_C diff --git a/devkitARM/arm-none-eabi/include/memory.h b/devkitARM/arm-none-eabi/include/memory.h new file mode 100644 index 000000000..f4a14fcb8 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/memory.h @@ -0,0 +1,4 @@ +#ifndef _MEMORY_H +#define _MEMORY_H +#include +#endif /* !_MEMORY_H */ diff --git a/devkitARM/arm-none-eabi/include/newlib.h b/devkitARM/arm-none-eabi/include/newlib.h index 3a8770ab5..ca07e9720 100644 --- a/devkitARM/arm-none-eabi/include/newlib.h +++ b/devkitARM/arm-none-eabi/include/newlib.h @@ -11,7 +11,7 @@ /* #undef _ELIX_LEVEL */ /* Newlib version */ -#define _NEWLIB_VERSION "2.2.0" +#include <_newlib_version.h> /* C99 formats support (such as %a, %zu, ...) in IO functions like * printf/scanf enabled */ @@ -62,12 +62,6 @@ /* True if long double supported and it is equal to double. */ #define _LDBL_EQ_DBL 1 -/* Define if uintptr_t is unsigned long on this architecture */ -/* #undef _UINTPTR_EQ_ULONG */ - -/* Define if uintptr_t is unsigned long long on this architecture */ -/* #undef _UINTPTR_EQ_ULONGLONG */ - /* Define if ivo supported in streamio. */ #define _FVWRITE_IN_STREAMIO 1 @@ -75,7 +69,7 @@ #define _FSEEK_OPTIMIZATION 1 /* Define if wide char orientation is supported. */ -#define _WIDE_ORIENT 1 +/* #undef _WIDE_ORIENT */ /* Define if unbuffered stream file optimization is supported. */ #define _UNBUF_STREAM_OPT 1 diff --git a/devkitARM/arm-none-eabi/include/pthread.h b/devkitARM/arm-none-eabi/include/pthread.h index 3640da2b5..46f54206f 100644 --- a/devkitARM/arm-none-eabi/include/pthread.h +++ b/devkitARM/arm-none-eabi/include/pthread.h @@ -1,8 +1,7 @@ -/* pthread.h +/* + * Written by Joel Sherrill . * - * Written by Joel Sherrill . - * - * COPYRIGHT (c) 1989-2013. + * COPYRIGHT (c) 1989-2013, 2015. * On-Line Applications Research Corporation (OAR). * * Permission to use, copy, modify, and distribute this software for any @@ -14,8 +13,6 @@ * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * - * $Id: pthread.h,v 1.12 2013/11/29 23:35:34 joel Exp $ */ #ifndef __PTHREAD_h @@ -31,7 +28,7 @@ extern "C" { #include #include -#include +#include #include struct _pthread_cleanup_context { @@ -76,7 +73,7 @@ int _EXFUN(pthread_mutex_destroy, (pthread_mutex_t *__mutex)); pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; */ -#define PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t) 0xFFFFFFFF) +#define PTHREAD_MUTEX_INITIALIZER _PTHREAD_MUTEX_INITIALIZER /* Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93 NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29 */ @@ -96,6 +93,13 @@ int _EXFUN(pthread_mutex_timedlock, int _EXFUN(pthread_condattr_init, (pthread_condattr_t *__attr)); int _EXFUN(pthread_condattr_destroy, (pthread_condattr_t *__attr)); + +int _EXFUN(pthread_condattr_getclock, + (const pthread_condattr_t *__restrict __attr, + clockid_t *__restrict __clock_id)); +int _EXFUN(pthread_condattr_setclock, + (pthread_condattr_t *__attr, clockid_t __clock_id)); + int _EXFUN(pthread_condattr_getpshared, (_CONST pthread_condattr_t *__attr, int *__pshared)); int _EXFUN(pthread_condattr_setpshared, @@ -112,7 +116,7 @@ int _EXFUN(pthread_cond_destroy, (pthread_cond_t *__mutex)); pthread_cond_t cond = PTHREAD_COND_INITIALIZER; */ -#define PTHREAD_COND_INITIALIZER ((pthread_cond_t) 0xFFFFFFFF) +#define PTHREAD_COND_INITIALIZER _PTHREAD_COND_INITIALIZER /* Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101 */ @@ -161,6 +165,9 @@ int _EXFUN(pthread_getschedparam, int _EXFUN(pthread_setschedparam, (pthread_t __pthread, int __policy, struct sched_param *__param)); +/* Set Scheduling Priority of a Thread */ +int _EXFUN(pthread_setschedprio, (pthread_t thread, int prio)); + #endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */ #if defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT) @@ -218,7 +225,7 @@ int _EXFUN(pthread_attr_setguardsize, * in GNU/Linux. They may be provided by other OSes for * compatibility. */ -#if defined(__GNU_VISIBLE) +#if __GNU_VISIBLE #if defined(__rtems__) int _EXFUN(pthread_attr_setaffinity_np, (pthread_attr_t *__attr, size_t __cpusetsize, @@ -235,7 +242,7 @@ int _EXFUN(pthread_getaffinity_np, int _EXFUN(pthread_getattr_np, (pthread_t __id, pthread_attr_t *__attr)); #endif /* defined(__rtems__) */ -#endif /* defined(__GNU_VISIBLE) */ +#endif /* __GNU_VISIBLE */ /* Thread Creation, P1003.1c/Draft 10, p. 144 */ @@ -253,7 +260,7 @@ int _EXFUN(pthread_detach, (pthread_t __pthread)); /* Thread Termination, p1003.1c/Draft 10, p. 150 */ -void _EXFUN(pthread_exit, (void *__value_ptr)); +void _EXFUN(pthread_exit, (void *__value_ptr)) __dead2; /* Get Calling Thread's ID, p1003.1c/Draft 10, p. XXX */ @@ -263,6 +270,18 @@ pthread_t _EXFUN(pthread_self, (void)); int _EXFUN(pthread_equal, (pthread_t __t1, pthread_t __t2)); +/* Retrieve ID of a Thread's CPU Time Clock */ +int _EXFUN(pthread_getcpuclockid, + (pthread_t thread, clockid_t *clock_id)); + +/* Get/Set Current Thread's Concurrency Level */ +int _EXFUN(pthread_setconcurrency, (int new_level)); +int _EXFUN(pthread_getconcurrency, (void)); + +#if __BSD_VISIBLE || __GNU_VISIBLE +void _EXFUN(pthread_yield, (void)); +#endif + /* Dynamic Package Initialization */ /* This is used to statically initialize a pthread_once_t. Example: @@ -271,7 +290,7 @@ int _EXFUN(pthread_equal, (pthread_t __t1, pthread_t __t2)); NOTE: This is named inconsistently -- it should be INITIALIZER. */ -#define PTHREAD_ONCE_INIT { 1, 0 } /* is initialized and not run */ +#define PTHREAD_ONCE_INIT _PTHREAD_ONCE_INIT int _EXFUN(pthread_once, (pthread_once_t *__once_control, void (*__init_routine)(void))); @@ -329,7 +348,7 @@ void _EXFUN(_pthread_cleanup_pop, _pthread_cleanup_pop(&_pthread_clup_ctx, (_execute)); \ } while (0) -#if defined(_GNU_SOURCE) +#if __GNU_VISIBLE void _EXFUN(_pthread_cleanup_push_defer, (struct _pthread_cleanup_context *_context, void (*_routine)(void *), void *_arg)); @@ -347,7 +366,7 @@ void _EXFUN(_pthread_cleanup_pop_restore, #define pthread_cleanup_pop_restore_np(_execute) \ _pthread_cleanup_pop_restore(&_pthread_clup_ctx, (_execute)); \ } while (0) -#endif /* defined(_GNU_SOURCE) */ +#endif /* __GNU_VISIBLE */ #if defined(_POSIX_THREAD_CPUTIME) @@ -398,7 +417,7 @@ int _EXFUN(pthread_spin_unlock, (pthread_spinlock_t *__spinlock)); pthread_mutex_t mutex = PTHREAD_RWLOCK_INITIALIZER; */ -#define PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t) 0xFFFFFFFF) +#define PTHREAD_RWLOCK_INITIALIZER _PTHREAD_RWLOCK_INITIALIZER int _EXFUN(pthread_rwlockattr_init, (pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlockattr_destroy, (pthread_rwlockattr_t *__attr)); diff --git a/devkitARM/arm-none-eabi/include/pwd.h b/devkitARM/arm-none-eabi/include/pwd.h index 3dea4ee2d..f37d289f9 100644 --- a/devkitARM/arm-none-eabi/include/pwd.h +++ b/devkitARM/arm-none-eabi/include/pwd.h @@ -63,14 +63,14 @@ struct passwd { struct passwd *getpwuid (uid_t); struct passwd *getpwnam (const char *); -#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 +#if __MISC_VISIBLE || __POSIX_VISIBLE int getpwnam_r (const char *, struct passwd *, char *, size_t , struct passwd **); int getpwuid_r (uid_t, struct passwd *, char *, size_t, struct passwd **); #endif -#if __XSI_VISIBLE >= 500 +#if __MISC_VISIBLE || __XSI_VISIBLE >= 4 struct passwd *getpwent (void); void setpwent (void); void endpwent (void); diff --git a/devkitARM/arm-none-eabi/include/reent.h b/devkitARM/arm-none-eabi/include/reent.h index 861be71d3..b7664b0b9 100644 --- a/devkitARM/arm-none-eabi/include/reent.h +++ b/devkitARM/arm-none-eabi/include/reent.h @@ -92,7 +92,6 @@ extern "C" { #include #include -#include #define __need_size_t #define __need_ptrdiff_t diff --git a/devkitARM/arm-none-eabi/include/sched.h b/devkitARM/arm-none-eabi/include/sched.h index a3f58ac9c..504ad5274 100644 --- a/devkitARM/arm-none-eabi/include/sched.h +++ b/devkitARM/arm-none-eabi/include/sched.h @@ -14,7 +14,7 @@ * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. * - * $Id: sched.h,v 1.2 2010/04/01 18:33:33 jjohnstn Exp $ + * $Id$ */ #ifndef _SCHED_H_ diff --git a/devkitARM/arm-none-eabi/include/signal.h b/devkitARM/arm-none-eabi/include/signal.h index 8c50a2eb3..0324ae71a 100644 --- a/devkitARM/arm-none-eabi/include/signal.h +++ b/devkitARM/arm-none-eabi/include/signal.h @@ -2,15 +2,18 @@ #define _SIGNAL_H_ #include "_ansi.h" +#include #include _BEGIN_STD_C typedef int sig_atomic_t; /* Atomic entity type (ANSI) */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE typedef _sig_func_ptr sig_t; /* BSD naming */ +#endif +#if __GNU_VISIBLE typedef _sig_func_ptr sighandler_t; /* glibc naming */ -#endif /* !_POSIX_SOURCE */ +#endif #define SIG_DFL ((_sig_func_ptr)0) /* Default action */ #define SIG_IGN ((_sig_func_ptr)1) /* Ignore action */ diff --git a/devkitARM/arm-none-eabi/include/stdint.h b/devkitARM/arm-none-eabi/include/stdint.h index 7386164b9..4abdacb9f 100644 --- a/devkitARM/arm-none-eabi/include/stdint.h +++ b/devkitARM/arm-none-eabi/include/stdint.h @@ -11,53 +11,30 @@ #include #include +#include #ifdef __cplusplus extern "C" { #endif -#ifdef ___int8_t_defined -typedef __int8_t int8_t ; -typedef __uint8_t uint8_t ; -#define __int8_t_defined 1 -#endif - #ifdef ___int_least8_t_defined typedef __int_least8_t int_least8_t; typedef __uint_least8_t uint_least8_t; #define __int_least8_t_defined 1 #endif -#ifdef ___int16_t_defined -typedef __int16_t int16_t ; -typedef __uint16_t uint16_t ; -#define __int16_t_defined 1 -#endif - #ifdef ___int_least16_t_defined typedef __int_least16_t int_least16_t; typedef __uint_least16_t uint_least16_t; #define __int_least16_t_defined 1 #endif -#ifdef ___int32_t_defined -typedef __int32_t int32_t ; -typedef __uint32_t uint32_t ; -#define __int32_t_defined 1 -#endif - #ifdef ___int_least32_t_defined typedef __int_least32_t int_least32_t; typedef __uint_least32_t uint_least32_t; #define __int_least32_t_defined 1 #endif -#ifdef ___int64_t_defined -typedef __int64_t int64_t ; -typedef __uint64_t uint64_t ; -#define __int64_t_defined 1 -#endif - #ifdef ___int_least64_t_defined typedef __int_least64_t int_least64_t; typedef __uint_least64_t uint_least64_t; @@ -147,37 +124,15 @@ typedef __uint_least64_t uint_least64_t; #endif #endif -/* Greatest-width integer types */ -/* Modern GCCs provide __INTMAX_TYPE__ */ -#if defined(__INTMAX_TYPE__) - typedef __INTMAX_TYPE__ intmax_t; -#elif __have_longlong64 - typedef signed long long intmax_t; -#else - typedef signed long intmax_t; -#endif - -/* Modern GCCs provide __UINTMAX_TYPE__ */ -#if defined(__UINTMAX_TYPE__) - typedef __UINTMAX_TYPE__ uintmax_t; -#elif __have_longlong64 - typedef unsigned long long uintmax_t; -#else - typedef unsigned long uintmax_t; -#endif - -typedef __intptr_t intptr_t; -typedef __uintptr_t uintptr_t; - #ifdef __INTPTR_TYPE__ #define INTPTR_MIN (-__INTPTR_MAX__ - 1) -#define INTPTR_MAX __INTPTR_MAX__ -#define UINTPTR_MAX __UINTPTR_MAX__ +#define INTPTR_MAX (__INTPTR_MAX__) +#define UINTPTR_MAX (__UINTPTR_MAX__) #elif defined(__PTRDIFF_TYPE__) #define INTPTR_MAX PTRDIFF_MAX #define INTPTR_MIN PTRDIFF_MIN #ifdef __UINTPTR_MAX__ -#define UINTPTR_MAX __UINTPTR_MAX__ +#define UINTPTR_MAX (__UINTPTR_MAX__) #else #define UINTPTR_MAX (2UL * PTRDIFF_MAX + 1) #endif @@ -186,7 +141,7 @@ typedef __uintptr_t uintptr_t; * Fallback to hardcoded values, * should be valid on cpu's with 32bit int/32bit void* */ -#define INTPTR_MAX __STDINT_EXP(LONG_MAX) +#define INTPTR_MAX (__STDINT_EXP(LONG_MAX)) #define INTPTR_MIN (-__STDINT_EXP(LONG_MAX) - 1) #define UINTPTR_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1) #endif @@ -195,77 +150,77 @@ typedef __uintptr_t uintptr_t; #ifdef __INT8_MAX__ #define INT8_MIN (-__INT8_MAX__ - 1) -#define INT8_MAX __INT8_MAX__ -#define UINT8_MAX __UINT8_MAX__ +#define INT8_MAX (__INT8_MAX__) +#define UINT8_MAX (__UINT8_MAX__) #elif defined(__int8_t_defined) -#define INT8_MIN -128 -#define INT8_MAX 127 -#define UINT8_MAX 255 +#define INT8_MIN (-128) +#define INT8_MAX (127) +#define UINT8_MAX (255) #endif #ifdef __INT_LEAST8_MAX__ #define INT_LEAST8_MIN (-__INT_LEAST8_MAX__ - 1) -#define INT_LEAST8_MAX __INT_LEAST8_MAX__ -#define UINT_LEAST8_MAX __UINT_LEAST8_MAX__ +#define INT_LEAST8_MAX (__INT_LEAST8_MAX__) +#define UINT_LEAST8_MAX (__UINT_LEAST8_MAX__) #elif defined(__int_least8_t_defined) -#define INT_LEAST8_MIN -128 -#define INT_LEAST8_MAX 127 -#define UINT_LEAST8_MAX 255 +#define INT_LEAST8_MIN (-128) +#define INT_LEAST8_MAX (127) +#define UINT_LEAST8_MAX (255) #else #error required type int_least8_t missing #endif #ifdef __INT16_MAX__ #define INT16_MIN (-__INT16_MAX__ - 1) -#define INT16_MAX __INT16_MAX__ -#define UINT16_MAX __UINT16_MAX__ +#define INT16_MAX (__INT16_MAX__) +#define UINT16_MAX (__UINT16_MAX__) #elif defined(__int16_t_defined) -#define INT16_MIN -32768 -#define INT16_MAX 32767 -#define UINT16_MAX 65535 +#define INT16_MIN (-32768) +#define INT16_MAX (32767) +#define UINT16_MAX (65535) #endif #ifdef __INT_LEAST16_MAX__ #define INT_LEAST16_MIN (-__INT_LEAST16_MAX__ - 1) -#define INT_LEAST16_MAX __INT_LEAST16_MAX__ -#define UINT_LEAST16_MAX __UINT_LEAST16_MAX__ +#define INT_LEAST16_MAX (__INT_LEAST16_MAX__) +#define UINT_LEAST16_MAX (__UINT_LEAST16_MAX__) #elif defined(__int_least16_t_defined) -#define INT_LEAST16_MIN -32768 -#define INT_LEAST16_MAX 32767 -#define UINT_LEAST16_MAX 65535 +#define INT_LEAST16_MIN (-32768) +#define INT_LEAST16_MAX (32767) +#define UINT_LEAST16_MAX (65535) #else #error required type int_least16_t missing #endif #ifdef __INT32_MAX__ #define INT32_MIN (-__INT32_MAX__ - 1) -#define INT32_MAX __INT32_MAX__ -#define UINT32_MAX __UINT32_MAX__ +#define INT32_MAX (__INT32_MAX__) +#define UINT32_MAX (__UINT32_MAX__) #elif defined(__int32_t_defined) -#if __have_long32 +#if defined (_INT32_EQ_LONG) #define INT32_MIN (-2147483647L-1) -#define INT32_MAX 2147483647L -#define UINT32_MAX 4294967295UL +#define INT32_MAX (2147483647L) +#define UINT32_MAX (4294967295UL) #else #define INT32_MIN (-2147483647-1) -#define INT32_MAX 2147483647 -#define UINT32_MAX 4294967295U +#define INT32_MAX (2147483647) +#define UINT32_MAX (4294967295U) #endif #endif #ifdef __INT_LEAST32_MAX__ #define INT_LEAST32_MIN (-__INT_LEAST32_MAX__ - 1) -#define INT_LEAST32_MAX __INT_LEAST32_MAX__ -#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__ +#define INT_LEAST32_MAX (__INT_LEAST32_MAX__) +#define UINT_LEAST32_MAX (__UINT_LEAST32_MAX__) #elif defined(__int_least32_t_defined) -#if __have_long32 +#if defined (_INT32_EQ_LONG) #define INT_LEAST32_MIN (-2147483647L-1) -#define INT_LEAST32_MAX 2147483647L -#define UINT_LEAST32_MAX 4294967295UL +#define INT_LEAST32_MAX (2147483647L) +#define UINT_LEAST32_MAX (4294967295UL) #else #define INT_LEAST32_MIN (-2147483647-1) -#define INT_LEAST32_MAX 2147483647 -#define UINT_LEAST32_MAX 4294967295U +#define INT_LEAST32_MAX (2147483647) +#define UINT_LEAST32_MAX (4294967295U) #endif #else #error required type int_least32_t missing @@ -273,44 +228,44 @@ typedef __uintptr_t uintptr_t; #ifdef __INT64_MAX__ #define INT64_MIN (-__INT64_MAX__ - 1) -#define INT64_MAX __INT64_MAX__ -#define UINT64_MAX __UINT64_MAX__ +#define INT64_MAX (__INT64_MAX__) +#define UINT64_MAX (__UINT64_MAX__) #elif defined(__int64_t_defined) #if __have_long64 #define INT64_MIN (-9223372036854775807L-1L) -#define INT64_MAX 9223372036854775807L -#define UINT64_MAX 18446744073709551615U +#define INT64_MAX (9223372036854775807L) +#define UINT64_MAX (18446744073709551615U) #elif __have_longlong64 #define INT64_MIN (-9223372036854775807LL-1LL) -#define INT64_MAX 9223372036854775807LL -#define UINT64_MAX 18446744073709551615ULL +#define INT64_MAX (9223372036854775807LL) +#define UINT64_MAX (18446744073709551615ULL) #endif #endif #ifdef __INT_LEAST64_MAX__ #define INT_LEAST64_MIN (-__INT_LEAST64_MAX__ - 1) -#define INT_LEAST64_MAX __INT_LEAST64_MAX__ -#define UINT_LEAST64_MAX __UINT_LEAST64_MAX__ +#define INT_LEAST64_MAX (__INT_LEAST64_MAX__) +#define UINT_LEAST64_MAX (__UINT_LEAST64_MAX__) #elif defined(__int_least64_t_defined) #if __have_long64 #define INT_LEAST64_MIN (-9223372036854775807L-1L) -#define INT_LEAST64_MAX 9223372036854775807L -#define UINT_LEAST64_MAX 18446744073709551615U +#define INT_LEAST64_MAX (9223372036854775807L) +#define UINT_LEAST64_MAX (18446744073709551615U) #elif __have_longlong64 #define INT_LEAST64_MIN (-9223372036854775807LL-1LL) -#define INT_LEAST64_MAX 9223372036854775807LL -#define UINT_LEAST64_MAX 18446744073709551615ULL +#define INT_LEAST64_MAX (9223372036854775807LL) +#define UINT_LEAST64_MAX (18446744073709551615ULL) #endif #endif #ifdef __INT_FAST8_MAX__ #define INT_FAST8_MIN (-__INT_FAST8_MAX__ - 1) -#define INT_FAST8_MAX __INT_FAST8_MAX__ -#define UINT_FAST8_MAX __UINT_FAST8_MAX__ +#define INT_FAST8_MAX (__INT_FAST8_MAX__) +#define UINT_FAST8_MAX (__UINT_FAST8_MAX__) #elif defined(__int_fast8_t_defined) #if __STDINT_EXP(INT_MAX) >= 0x7f #define INT_FAST8_MIN (-__STDINT_EXP(INT_MAX)-1) -#define INT_FAST8_MAX __STDINT_EXP(INT_MAX) +#define INT_FAST8_MAX (__STDINT_EXP(INT_MAX)) #define UINT_FAST8_MAX (__STDINT_EXP(INT_MAX)*2U+1U) #else #define INT_FAST8_MIN INT_LEAST8_MIN @@ -321,12 +276,12 @@ typedef __uintptr_t uintptr_t; #ifdef __INT_FAST16_MAX__ #define INT_FAST16_MIN (-__INT_FAST16_MAX__ - 1) -#define INT_FAST16_MAX __INT_FAST16_MAX__ -#define UINT_FAST16_MAX __UINT_FAST16_MAX__ +#define INT_FAST16_MAX (__INT_FAST16_MAX__) +#define UINT_FAST16_MAX (__UINT_FAST16_MAX__) #elif defined(__int_fast16_t_defined) #if __STDINT_EXP(INT_MAX) >= 0x7fff #define INT_FAST16_MIN (-__STDINT_EXP(INT_MAX)-1) -#define INT_FAST16_MAX __STDINT_EXP(INT_MAX) +#define INT_FAST16_MAX (__STDINT_EXP(INT_MAX)) #define UINT_FAST16_MAX (__STDINT_EXP(INT_MAX)*2U+1U) #else #define INT_FAST16_MIN INT_LEAST16_MIN @@ -337,12 +292,12 @@ typedef __uintptr_t uintptr_t; #ifdef __INT_FAST32_MAX__ #define INT_FAST32_MIN (-__INT_FAST32_MAX__ - 1) -#define INT_FAST32_MAX __INT_FAST32_MAX__ -#define UINT_FAST32_MAX __UINT_FAST32_MAX__ +#define INT_FAST32_MAX (__INT_FAST32_MAX__) +#define UINT_FAST32_MAX (__UINT_FAST32_MAX__) #elif defined(__int_fast32_t_defined) #if __STDINT_EXP(INT_MAX) >= 0x7fffffff #define INT_FAST32_MIN (-__STDINT_EXP(INT_MAX)-1) -#define INT_FAST32_MAX __STDINT_EXP(INT_MAX) +#define INT_FAST32_MAX (__STDINT_EXP(INT_MAX)) #define UINT_FAST32_MAX (__STDINT_EXP(INT_MAX)*2U+1U) #else #define INT_FAST32_MIN INT_LEAST32_MIN @@ -353,12 +308,12 @@ typedef __uintptr_t uintptr_t; #ifdef __INT_FAST64_MAX__ #define INT_FAST64_MIN (-__INT_FAST64_MAX__ - 1) -#define INT_FAST64_MAX __INT_FAST64_MAX__ -#define UINT_FAST64_MAX __UINT_FAST64_MAX__ +#define INT_FAST64_MAX (__INT_FAST64_MAX__) +#define UINT_FAST64_MAX (__UINT_FAST64_MAX__) #elif defined(__int_fast64_t_defined) #if __STDINT_EXP(INT_MAX) > 0x7fffffff #define INT_FAST64_MIN (-__STDINT_EXP(INT_MAX)-1) -#define INT_FAST64_MAX __STDINT_EXP(INT_MAX) +#define INT_FAST64_MAX (__STDINT_EXP(INT_MAX)) #define UINT_FAST64_MAX (__STDINT_EXP(INT_MAX)*2U+1U) #else #define INT_FAST64_MIN INT_LEAST64_MIN @@ -368,7 +323,7 @@ typedef __uintptr_t uintptr_t; #endif #ifdef __INTMAX_MAX__ -#define INTMAX_MAX __INTMAX_MAX__ +#define INTMAX_MAX (__INTMAX_MAX__) #define INTMAX_MIN (-INTMAX_MAX - 1) #elif defined(__INTMAX_TYPE__) /* All relevant GCC versions prefer long to long long for intmax_t. */ @@ -377,7 +332,7 @@ typedef __uintptr_t uintptr_t; #endif #ifdef __UINTMAX_MAX__ -#define UINTMAX_MAX __UINTMAX_MAX__ +#define UINTMAX_MAX (__UINTMAX_MAX__) #elif defined(__UINTMAX_TYPE__) /* All relevant GCC versions prefer long to long long for intmax_t. */ #define UINTMAX_MAX UINT64_MAX @@ -385,27 +340,27 @@ typedef __uintptr_t uintptr_t; /* This must match size_t in stddef.h, currently long unsigned int */ #ifdef __SIZE_MAX__ -#define SIZE_MAX __SIZE_MAX__ +#define SIZE_MAX (__SIZE_MAX__) #else #define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1) #endif /* This must match sig_atomic_t in (currently int) */ #define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1) -#define SIG_ATOMIC_MAX __STDINT_EXP(INT_MAX) +#define SIG_ATOMIC_MAX (__STDINT_EXP(INT_MAX)) /* This must match ptrdiff_t in (currently long int) */ #ifdef __PTRDIFF_MAX__ -#define PTRDIFF_MAX __PTRDIFF_MAX__ +#define PTRDIFF_MAX (__PTRDIFF_MAX__) #else -#define PTRDIFF_MAX __STDINT_EXP(LONG_MAX) +#define PTRDIFF_MAX (__STDINT_EXP(LONG_MAX)) #endif #define PTRDIFF_MIN (-PTRDIFF_MAX - 1) /* This must match definition in */ #ifndef WCHAR_MIN #ifdef __WCHAR_MIN__ -#define WCHAR_MIN __WCHAR_MIN__ +#define WCHAR_MIN (__WCHAR_MIN__) #elif defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0) #define WCHAR_MIN (0 + L'\0') #else @@ -416,7 +371,7 @@ typedef __uintptr_t uintptr_t; /* This must match definition in */ #ifndef WCHAR_MAX #ifdef __WCHAR_MAX__ -#define WCHAR_MAX __WCHAR_MAX__ +#define WCHAR_MAX (__WCHAR_MAX__) #elif defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0) #define WCHAR_MAX (0xffffffffu + L'\0') #else @@ -426,14 +381,14 @@ typedef __uintptr_t uintptr_t; /* wint_t is unsigned int on almost all GCC targets. */ #ifdef __WINT_MAX__ -#define WINT_MAX __WINT_MAX__ +#define WINT_MAX (__WINT_MAX__) #else #define WINT_MAX (__STDINT_EXP(INT_MAX) * 2U + 1U) #endif #ifdef __WINT_MIN__ -#define WINT_MIN __WINT_MIN__ +#define WINT_MIN (__WINT_MIN__) #else -#define WINT_MIN 0U +#define WINT_MIN (0U) #endif /** Macros for minimum-width integer constant expressions */ @@ -465,7 +420,7 @@ typedef __uintptr_t uintptr_t; #define INT32_C(x) __INT32_C(x) #define UINT32_C(x) __UINT32_C(x) #else -#if __have_long32 +#if defined (_INT32_EQ_LONG) #define INT32_C(x) x##L #define UINT32_C(x) x##UL #else diff --git a/devkitARM/arm-none-eabi/include/stdio.h b/devkitARM/arm-none-eabi/include/stdio.h index e336ee6eb..062965e5f 100644 --- a/devkitARM/arm-none-eabi/include/stdio.h +++ b/devkitARM/arm-none-eabi/include/stdio.h @@ -35,9 +35,22 @@ #include #include +/* typedef only __gnuc_va_list, used throughout the header */ #define __need___va_list #include +/* typedef va_list only when required */ +#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE +#ifdef __GNUC__ +#ifndef _VA_LIST_DEFINED +typedef __gnuc_va_list va_list; +#define _VA_LIST_DEFINED +#endif +#else /* !__GNUC__ */ +#include +#endif +#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ + /* * defines __FILE, _fpos_t. * They must be defined there because struct _reent needs them (and we don't @@ -49,7 +62,10 @@ _BEGIN_STD_C +#if !defined(__FILE_defined) typedef __FILE FILE; +# define __FILE_defined +#endif #ifdef __CYGWIN__ typedef _fpos64_t fpos_t; @@ -125,7 +141,7 @@ typedef _fpos64_t fpos64_t; #define L_tmpnam FILENAME_MAX #endif -#ifndef __STRICT_ANSI__ +#if __BSD_VISIBLE || __XSI_VISIBLE #define P_tmpdir "/tmp" #endif @@ -161,6 +177,12 @@ typedef _fpos64_t fpos64_t; #endif #endif +#if __POSIX_VISIBLE +char * _EXFUN(ctermid, (char *)); +#endif +#if __XSI_VISIBLE && __XSI_VISIBLE < 600 +char * _EXFUN(cuserid, (char *)); +#endif FILE * _EXFUN(tmpfile, (void)); char * _EXFUN(tmpnam, (char *)); #if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 @@ -205,7 +227,7 @@ int _EXFUN(fgetpos, (FILE *, _fpos_t *)); #else int _EXFUN(fgetpos, (FILE *__restrict, fpos_t *__restrict)); #endif -int _EXFUN(fseek, (FILE *, long, int)); +int _EXFUN(fseek, (FILE *, off_t, int)); #ifdef _COMPILING_NEWLIB int _EXFUN(fsetpos, (FILE *, const _fpos_t *)); #else @@ -227,7 +249,7 @@ int _EXFUN(rename, (const char *, const char *)); int _EXFUN(_rename, (const char *, const char *)); #endif #endif -#if !defined(__STRICT_ANSI__) || defined(__USE_XOPEN2K) +#if __LARGEFILE_VISIBLE || __POSIX_VISIBLE >= 200112 #ifdef _COMPILING_NEWLIB int _EXFUN(fseeko, (FILE *, _off_t, int)); _off_t _EXFUN(ftello, ( FILE *)); @@ -239,16 +261,32 @@ off_t _EXFUN(ftello, ( FILE *)); #if __GNU_VISIBLE int _EXFUN(fcloseall, (_VOID)); #endif -#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L) #ifndef _REENT_ONLY +#if __ISO_C_VISIBLE >= 1999 +int _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); +int _EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); +int _EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); +int _EXFUN(vscanf, (const char *, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); +int _EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); +#endif +#if __GNU_VISIBLE +int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); +int _EXFUN(vasprintf, (char **, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); +#endif +#if __MISC_VISIBLE /* Newlib-specific */ int _EXFUN(asiprintf, (char **, const char *, ...) _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); char * _EXFUN(asniprintf, (char *, size_t *, const char *, ...) _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); char * _EXFUN(asnprintf, (char *__restrict, size_t *__restrict, const char *__restrict, ...) _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); #ifndef diprintf int _EXFUN(diprintf, (int, const char *, ...) _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); @@ -265,8 +303,6 @@ int _EXFUN(siprintf, (char *, const char *, ...) _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); int _EXFUN(siscanf, (const char *, const char *, ...) _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); -int _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); int _EXFUN(sniprintf, (char *, size_t, const char *, ...) _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); int _EXFUN(vasiprintf, (char **, const char *, __VALIST) @@ -275,50 +311,50 @@ char * _EXFUN(vasniprintf, (char *, size_t *, const char *, __VALIST) _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); char * _EXFUN(vasnprintf, (char *, size_t *, const char *, __VALIST) _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(vasprintf, (char **, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); int _EXFUN(vdiprintf, (int, const char *, __VALIST) _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); int _EXFUN(vfiprintf, (FILE *, const char *, __VALIST) _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); int _EXFUN(vfiscanf, (FILE *, const char *, __VALIST) _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); -int _EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); int _EXFUN(viprintf, (const char *, __VALIST) _ATTRIBUTE ((__format__ (__printf__, 1, 0)))); int _EXFUN(viscanf, (const char *, __VALIST) _ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); -int _EXFUN(vscanf, (const char *, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); int _EXFUN(vsiprintf, (char *, const char *, __VALIST) _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); int _EXFUN(vsiscanf, (const char *, const char *, __VALIST) _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); int _EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST) _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); +#endif /* __MISC_VISIBLE */ #endif /* !_REENT_ONLY */ -#endif /* !__STRICT_ANSI__ */ /* * Routines in POSIX 1003.1:2001. */ -#ifndef __STRICT_ANSI__ +#if __POSIX_VISIBLE #ifndef _REENT_ONLY FILE * _EXFUN(fdopen, (int, const char *)); #endif int _EXFUN(fileno, (FILE *)); -int _EXFUN(getw, (FILE *)); +#endif +#if __MISC_VISIBLE || __POSIX_VISIBLE >= 199209 int _EXFUN(pclose, (FILE *)); FILE * _EXFUN(popen, (const char *, const char *)); -int _EXFUN(putw, (int, FILE *)); +#endif + +#if __BSD_VISIBLE void _EXFUN(setbuffer, (FILE *, char *, int)); int _EXFUN(setlinebuf, (FILE *)); +#endif + +#if __MISC_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112) +int _EXFUN(getw, (FILE *)); +int _EXFUN(putw, (int, FILE *)); +#endif +#if __MISC_VISIBLE || __POSIX_VISIBLE int _EXFUN(getc_unlocked, (FILE *)); int _EXFUN(getchar_unlocked, (void)); void _EXFUN(flockfile, (FILE *)); @@ -326,13 +362,13 @@ int _EXFUN(ftrylockfile, (FILE *)); void _EXFUN(funlockfile, (FILE *)); int _EXFUN(putc_unlocked, (int, FILE *)); int _EXFUN(putchar_unlocked, (int)); -#endif /* ! __STRICT_ANSI__ */ +#endif /* * Routines in POSIX 1003.1:200x. */ -#ifndef __STRICT_ANSI__ +#if __POSIX_VISIBLE >= 200809 # ifndef _REENT_ONLY # ifndef dprintf int _EXFUN(dprintf, (int, const char *__restrict, ...) @@ -342,13 +378,13 @@ FILE * _EXFUN(fmemopen, (void *__restrict, size_t, const char *__restrict)); /* getdelim - see __getdelim for now */ /* getline - see __getline for now */ FILE * _EXFUN(open_memstream, (char **, size_t *)); -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 -int _EXFUN(renameat, (int, const char *, int, const char *)); -#endif int _EXFUN(vdprintf, (int, const char *__restrict, __VALIST) _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); # endif #endif +#if __ATFILE_VISIBLE +int _EXFUN(renameat, (int, const char *, int, const char *)); +#endif /* * Recursive versions of the above. @@ -399,7 +435,7 @@ size_t _EXFUN(_fread_r, (struct _reent *, _PTR __restrict, size_t _size, size_t size_t _EXFUN(_fread_unlocked_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); int _EXFUN(_fscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...) _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); -int _EXFUN(_fseek_r, (struct _reent *, FILE *, long, int)); +int _EXFUN(_fseek_r, (struct _reent *, FILE *, off_t, int)); int _EXFUN(_fseeko_r,(struct _reent *, FILE *, _off_t, int)); long _EXFUN(_ftell_r, (struct _reent *, FILE *)); _off_t _EXFUN(_ftello_r,(struct _reent *, FILE *)); @@ -492,7 +528,7 @@ int _EXFUN(fpurge, (FILE *)); ssize_t _EXFUN(__getdelim, (char **, size_t *, int, FILE *)); ssize_t _EXFUN(__getline, (char **, size_t *, FILE *)); -#if __BSD_VISIBLE +#if __MISC_VISIBLE void _EXFUN(clearerr_unlocked, (FILE *)); int _EXFUN(feof_unlocked, (FILE *)); int _EXFUN(ferror_unlocked, (FILE *)); @@ -542,7 +578,7 @@ int _EXFUN(__swbuf_r, (struct _reent *, int, FILE *)); * Stdio function-access interface. */ -#ifndef __STRICT_ANSI__ +#if __BSD_VISIBLE # ifdef __LARGE64_FILES FILE *_EXFUN(funopen,(const _PTR __cookie, int (*__readfn)(_PTR __c, char *__buf, @@ -579,7 +615,9 @@ FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie, (fpos_t (*)())0, (int (*)())0) # define fwopen(__cookie, __fn) funopen(__cookie, (int (*)())0, __fn, \ (fpos_t (*)())0, (int (*)())0) +#endif /* __BSD_VISIBLE */ +#if __GNU_VISIBLE typedef ssize_t cookie_read_function_t(void *__cookie, char *__buf, size_t __n); typedef ssize_t cookie_write_function_t(void *__cookie, const char *__buf, size_t __n); @@ -603,7 +641,7 @@ FILE *_EXFUN(fopencookie,(void *__cookie, const char *__mode, cookie_io_functions_t __functions)); FILE *_EXFUN(_fopencookie_r,(struct _reent *, void *__cookie, const char *__mode, cookie_io_functions_t __functions)); -#endif /* ! __STRICT_ANSI__ */ +#endif /* __GNU_VISIBLE */ #ifndef __CUSTOM_FILE_IO__ /* @@ -642,10 +680,12 @@ _ELIDABLE_INLINE int __sgetc_r(struct _reent *__ptr, FILE *__p) #define __sgetc_r(__ptr, __p) __sgetc_raw_r(__ptr, __p) #endif -#ifdef _never /* __GNUC__ */ -/* If this inline is actually used, then systems using coff debugging - info get hopelessly confused. 21sept93 rich@cygnus.com. */ +#ifdef __GNUC__ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { +#ifdef __SCLE + if ((_p->_flags & __SCLE) && _c == '\n') + __sputc_r (_ptr, '\r', _p); +#endif if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) return (*_p->_p++ = _c); else @@ -683,14 +723,14 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { #define ferror(p) __sferror(p) #define clearerr(p) __sclearerr(p) -#if __BSD_VISIBLE +#if __MISC_VISIBLE #define feof_unlocked(p) __sfeof(p) #define ferror_unlocked(p) __sferror(p) #define clearerr_unlocked(p) __sclearerr(p) -#endif /* __BSD_VISIBLE */ +#endif /* __MISC_VISIBLE */ #endif /* _REENT_SMALL */ -#if 0 /*ndef __STRICT_ANSI__ - FIXME: must initialize stdio first, use fn */ +#if 0 /* __POSIX_VISIBLE - FIXME: must initialize stdio first, use fn */ #define fileno(p) __sfileno(p) #endif @@ -701,15 +741,17 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { #endif /* lint */ #endif /* __CYGWIN__ */ -#ifndef __STRICT_ANSI__ +#if __MISC_VISIBLE /* fast always-buffered version, true iff error */ #define fast_putc(x,p) (--(p)->_w < 0 ? \ __swbuf_r(_REENT, (int)(x), p) == EOF : (*(p)->_p = (x), (p)->_p++, 0)) - -#define L_cuserid 9 /* posix says it goes in stdio.h :( */ -#ifdef __CYGWIN__ -#define L_ctermid 16 #endif + +#if __GNU_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 600) +#define L_cuserid 9 /* posix says it goes in stdio.h :( */ +#endif +#if __POSIX_VISIBLE +#define L_ctermid 16 #endif #endif /* !__CUSTOM_FILE_IO__ */ @@ -717,7 +759,7 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { #define getchar() getc(stdin) #define putchar(x) putc(x, stdout) -#ifndef __STRICT_ANSI__ +#if __MISC_VISIBLE || __POSIX_VISIBLE #define getchar_unlocked() getc_unlocked(stdin) #define putchar_unlocked(x) putc_unlocked(x, stdout) #endif diff --git a/devkitARM/arm-none-eabi/include/stdlib.h b/devkitARM/arm-none-eabi/include/stdlib.h index 38ac29654..7b62e004f 100644 --- a/devkitARM/arm-none-eabi/include/stdlib.h +++ b/devkitARM/arm-none-eabi/include/stdlib.h @@ -26,6 +26,10 @@ #include #endif +#if __GNU_VISIBLE +#include +#endif + _BEGIN_STD_C typedef struct @@ -40,9 +44,7 @@ typedef struct long rem; /* remainder */ } ldiv_t; -#if !defined(__STRICT_ANSI__) || \ - (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) +#if __ISO_C_VISIBLE >= 1999 typedef struct { long long int quot; /* quotient */ @@ -66,9 +68,14 @@ int _EXFUN(__locale_mb_cur_max,(_VOID)); _VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((__noreturn__))); int _EXFUN(abs,(int)); +#if __BSD_VISIBLE +__uint32_t _EXFUN(arc4random, (void)); +__uint32_t _EXFUN(arc4random_uniform, (__uint32_t)); +void _EXFUN(arc4random_buf, (void *, size_t)); +#endif int _EXFUN(atexit,(_VOID (*__func)(_VOID))); double _EXFUN(atof,(const char *__nptr)); -#ifndef __STRICT_ANSI__ +#if __MISC_VISIBLE float _EXFUN(atoff,(const char *__nptr)); #endif int _EXFUN(atoi,(const char *__nptr)); @@ -88,7 +95,7 @@ char * _EXFUN(getenv,(const char *__string)); char * _EXFUN(_getenv_r,(struct _reent *, const char *__string)); char * _EXFUN(_findenv,(_CONST char *, int *)); char * _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *)); -#ifndef __STRICT_ANSI__ +#if __POSIX_VISIBLE >= 200809 extern char *suboptarg; /* getsubopt(3) external variable */ int _EXFUN(getsubopt,(char **, char * const *, char **)); #endif @@ -105,40 +112,54 @@ size_t _EXFUN(mbstowcs,(wchar_t *__restrict, const char *__restrict, size_t)); size_t _EXFUN(_mbstowcs_r,(struct _reent *, wchar_t *__restrict, const char *__restrict, size_t, _mbstate_t *)); size_t _EXFUN(wcstombs,(char *__restrict, const wchar_t *__restrict, size_t)); size_t _EXFUN(_wcstombs_r,(struct _reent *, char *__restrict, const wchar_t *__restrict, size_t, _mbstate_t *)); -#ifndef __STRICT_ANSI__ #ifndef _REENT_ONLY +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 char * _EXFUN(mkdtemp,(char *)); +#endif +#if __GNU_VISIBLE int _EXFUN(mkostemp,(char *, int)); int _EXFUN(mkostemps,(char *, int, int)); -int _EXFUN(mkstemp,(char *)); -int _EXFUN(mkstemps,(char *, int)); -char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead")))); #endif +#if __MISC_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4 +int _EXFUN(mkstemp,(char *)); +#endif +#if __MISC_VISIBLE +int _EXFUN(mkstemps,(char *, int)); +#endif +#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) +char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead")))); +#endif +#endif /* !_REENT_ONLY */ char * _EXFUN(_mkdtemp_r, (struct _reent *, char *)); int _EXFUN(_mkostemp_r, (struct _reent *, char *, int)); int _EXFUN(_mkostemps_r, (struct _reent *, char *, int, int)); int _EXFUN(_mkstemp_r, (struct _reent *, char *)); int _EXFUN(_mkstemps_r, (struct _reent *, char *, int)); -char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead")))); -#endif +char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead")))); _VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, __compar_fn_t _compar)); int _EXFUN(rand,(_VOID)); _PTR _EXFUN_NOTHROW(realloc,(_PTR __r, size_t __size)); -#ifndef __STRICT_ANSI__ +#if __BSD_VISIBLE _PTR _EXFUN(reallocf,(_PTR __r, size_t __size)); +#endif +#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 char * _EXFUN(realpath, (const char *__restrict path, char *__restrict resolved_path)); #endif +#if __BSD_VISIBLE +int _EXFUN(rpmatch, (const char *response)); +#endif +#if __XSI_VISIBLE +_VOID _EXFUN(setkey, (const char *__key)); +#endif _VOID _EXFUN(srand,(unsigned __seed)); double _EXFUN(strtod,(const char *__restrict __n, char **__restrict __end_PTR)); double _EXFUN(_strtod_r,(struct _reent *,const char *__restrict __n, char **__restrict __end_PTR)); -#if !defined(__STRICT_ANSI__) || \ - (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) +#if __ISO_C_VISIBLE >= 1999 float _EXFUN(strtof,(const char *__restrict __n, char **__restrict __end_PTR)); #endif -#ifndef __STRICT_ANSI__ +#if __MISC_VISIBLE /* the following strtodf interface is deprecated...use strtof instead */ -# ifndef strtodf +# ifndef strtodf # define strtodf strtof # endif #endif @@ -147,26 +168,45 @@ long _EXFUN(_strtol_r,(struct _reent *,const char *__restrict __n, char **__rest unsigned long _EXFUN(strtoul,(const char *__restrict __n, char **__restrict __end_PTR, int __base)); unsigned long _EXFUN(_strtoul_r,(struct _reent *,const char *__restrict __n, char **__restrict __end_PTR, int __base)); +#if __GNU_VISIBLE +double strtod_l (const char *__restrict, char **__restrict, locale_t); +float strtof_l (const char *__restrict, char **__restrict, locale_t); +#ifdef _HAVE_LONG_DOUBLE +extern long double strtold_l (const char *__restrict, char **__restrict, + locale_t); +#endif /* _HAVE_LONG_DOUBLE */ +long strtol_l (const char *__restrict, char **__restrict, int, locale_t); +unsigned long strtoul_l (const char *__restrict, char **__restrict, int, + locale_t __loc); +long long strtoll_l (const char *__restrict, char **__restrict, int, locale_t); +unsigned long long strtoull_l (const char *__restrict, char **__restrict, int, + locale_t __loc); +#endif + int _EXFUN(system,(const char *__string)); -#ifndef __STRICT_ANSI__ +#if __SVID_VISIBLE || __XSI_VISIBLE >= 4 long _EXFUN(a64l,(const char *__input)); char * _EXFUN(l64a,(long __input)); char * _EXFUN(_l64a_r,(struct _reent *,long __input)); +#endif +#if __MISC_VISIBLE int _EXFUN(on_exit,(_VOID (*__func)(int, _PTR),_PTR __arg)); -#endif /* ! __STRICT_ANSI__ */ -#if !defined(__STRICT_ANSI__) || \ - (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) +#endif +#if __ISO_C_VISIBLE >= 1999 _VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__))); #endif -#ifndef __STRICT_ANSI__ +#if __SVID_VISIBLE || __XSI_VISIBLE int _EXFUN(putenv,(char *__string)); +#endif int _EXFUN(_putenv_r,(struct _reent *, char *__string)); _PTR _EXFUN(_reallocf_r,(struct _reent *, _PTR, size_t)); +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 int _EXFUN(setenv,(const char *__string, const char *__value, int __overwrite)); +#endif int _EXFUN(_setenv_r,(struct _reent *, const char *__string, const char *__value, int __overwrite)); +#if __XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112 char * _EXFUN(gcvt,(double,int,char *)); char * _EXFUN(gcvtf,(float,int,char *)); char * _EXFUN(fcvt,(double,int,int *,int *)); @@ -175,15 +215,18 @@ char * _EXFUN(ecvt,(double,int,int *,int *)); char * _EXFUN(ecvtbuf,(double, int, int*, int*, char *)); char * _EXFUN(fcvtbuf,(double, int, int*, int*, char *)); char * _EXFUN(ecvtf,(float,int,int *,int *)); -char * _EXFUN(dtoa,(double, int, int, int *, int*, char**)); #endif char * _EXFUN(__itoa,(int, char *, int)); char * _EXFUN(__utoa,(unsigned, char *, int)); -#ifndef __STRICT_ANSI__ +#if __MISC_VISIBLE char * _EXFUN(itoa,(int, char *, int)); char * _EXFUN(utoa,(unsigned, char *, int)); +#endif +#if __POSIX_VISIBLE int _EXFUN(rand_r,(unsigned *__seed)); +#endif +#if __SVID_VISIBLE || __XSI_VISIBLE double _EXFUN(drand48,(_VOID)); double _EXFUN(_drand48_r,(struct _reent *)); double _EXFUN(erand48,(unsigned short [3])); @@ -204,45 +247,42 @@ unsigned short * _EXFUN(_seed48_r,(struct _reent *, unsigned short [3])); _VOID _EXFUN(srand48,(long)); _VOID _EXFUN(_srand48_r,(struct _reent *, long)); -#endif /* ! __STRICT_ANSI__ */ -#if !defined(__STRICT_ANSI__) || \ - (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) +#endif /* __SVID_VISIBLE || __XSI_VISIBLE */ +#if __SVID_VISIBLE || __XSI_VISIBLE >= 4 || __BSD_VISIBLE +char * _EXFUN(initstate,(unsigned, char *, size_t)); +long _EXFUN(random,(_VOID)); +char * _EXFUN(setstate,(char *)); +_VOID _EXFUN(srandom,(unsigned)); +#endif +#if __ISO_C_VISIBLE >= 1999 long long _EXFUN(atoll,(const char *__nptr)); #endif -#ifndef __STRICT_ANSI__ long long _EXFUN(_atoll_r,(struct _reent *, const char *__nptr)); -#endif /* ! __STRICT_ANSI__ */ -#if !defined(__STRICT_ANSI__) || \ - (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) +#if __ISO_C_VISIBLE >= 1999 long long _EXFUN(llabs,(long long)); lldiv_t _EXFUN(lldiv,(long long __numer, long long __denom)); long long _EXFUN(strtoll,(const char *__restrict __n, char **__restrict __end_PTR, int __base)); #endif -#ifndef __STRICT_ANSI__ long long _EXFUN(_strtoll_r,(struct _reent *, const char *__restrict __n, char **__restrict __end_PTR, int __base)); -#endif /* ! __STRICT_ANSI__ */ -#if !defined(__STRICT_ANSI__) || \ - (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) +#if __ISO_C_VISIBLE >= 1999 unsigned long long _EXFUN(strtoull,(const char *__restrict __n, char **__restrict __end_PTR, int __base)); #endif -#ifndef __STRICT_ANSI__ unsigned long long _EXFUN(_strtoull_r,(struct _reent *, const char *__restrict __n, char **__restrict __end_PTR, int __base)); #ifndef __CYGWIN__ +#if __MISC_VISIBLE _VOID _EXFUN(cfree,(_PTR)); +#endif +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 int _EXFUN(unsetenv,(const char *__string)); +#endif int _EXFUN(_unsetenv_r,(struct _reent *, const char *__string)); -#endif +#endif /* !__CYGWIN__ */ -#ifdef __rtems__ -int _EXFUN(posix_memalign,(void **, size_t, size_t)); +#if __POSIX_VISIBLE >= 200112 +int _EXFUN(__nonnull (1) posix_memalign,(void **, size_t, size_t)); #endif -#endif /* ! __STRICT_ANSI__ */ - char * _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**)); #ifndef __CYGWIN__ _PTR _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t)); @@ -259,7 +299,9 @@ _VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *)) _BSD_SOURCE, you get the BSD version; otherwise you get the GNU version. We want that #undef qsort_r will still let you invoke the underlying function, but that requires gcc support. */ -#ifdef _BSD_SOURCE +#if __GNU_VISIBLE +_VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, int (*_compar)(const _PTR, const _PTR, _PTR), _PTR __thunk)); +#elif __BSD_VISIBLE # ifdef __GNUC__ _VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, int (*_compar)(_PTR, const _PTR, const _PTR))) __asm__ (__ASMNAME ("__bsd_qsort_r")); @@ -267,19 +309,27 @@ _VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, _VOID _EXFUN(__bsd_qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, int (*_compar)(_PTR, const _PTR, const _PTR))); # define qsort_r __bsd_qsort_r # endif -#elif __GNU_VISIBLE -_VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, int (*_compar)(const _PTR, const _PTR, _PTR), _PTR __thunk)); #endif /* On platforms where long double equals double. */ #ifdef _HAVE_LONG_DOUBLE -#if !defined(__STRICT_ANSI__) || \ - (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) +extern long double _strtold_r (struct _reent *, const char *__restrict, char **__restrict); +#if __ISO_C_VISIBLE >= 1999 extern long double strtold (const char *__restrict, char **__restrict); #endif #endif /* _HAVE_LONG_DOUBLE */ +/* + * If we're in a mode greater than C99, expose C11 functions. + */ +#if __ISO_C_VISIBLE >= 2011 +void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) + __alloc_size(2); +int at_quick_exit(void (*)(void)); +_Noreturn void + quick_exit(int); +#endif /* __ISO_C_VISIBLE >= 2011 */ + _END_STD_C #endif /* _STDLIB_H_ */ diff --git a/devkitARM/arm-none-eabi/include/string.h b/devkitARM/arm-none-eabi/include/string.h index af5c9da4d..ba5e51ee7 100644 --- a/devkitARM/arm-none-eabi/include/string.h +++ b/devkitARM/arm-none-eabi/include/string.h @@ -16,6 +16,10 @@ #define __need_NULL #include +#if __POSIX_VISIBLE >= 200809 +#include +#endif + _BEGIN_STD_C _PTR _EXFUN(memchr,(const _PTR, int, size_t)); @@ -43,52 +47,63 @@ char *_EXFUN(strtok,(char *__restrict, const char *__restrict)); #endif size_t _EXFUN(strxfrm,(char *__restrict, const char *__restrict, size_t)); -#if __POSIX_VISIBLE +#if __POSIX_VISIBLE >= 200809 +int strcoll_l (const char *, const char *, locale_t); +char *strerror_l (int, locale_t); +size_t strxfrm_l (char *__restrict, const char *__restrict, size_t, locale_t); +#endif +#if __GNU_VISIBLE +int strcasecmp_l (const char *, const char *, locale_t); +int strncasecmp_l (const char *, const char *, size_t, locale_t); +#endif +#if __MISC_VISIBLE || __POSIX_VISIBLE char *_EXFUN(strtok_r,(char *__restrict, const char *__restrict, char **__restrict)); #endif -#if __BSD_VISIBLE +#if __BSD_VISIBLE /* POSIX declaration is in */ int _EXFUN(bcmp,(const void *, const void *, size_t)); void _EXFUN(bcopy,(const void *, void *, size_t)); void _EXFUN(bzero,(void *, size_t)); +#endif +#if __BSD_VISIBLE +void _EXFUN(explicit_bzero,(void *, size_t)); +int _EXFUN(timingsafe_bcmp,(const void *, const void *, size_t)); +int _EXFUN(timingsafe_memcmp,(const void *, const void *, size_t)); +#endif +#if __BSD_VISIBLE /* POSIX declaration is in */ int _EXFUN(ffs,(int)); char *_EXFUN(index,(const char *, int)); #endif -#if __BSD_VISIBLE || __XSI_VISIBLE +#if __MISC_VISIBLE || __POSIX_VISIBLE _PTR _EXFUN(memccpy,(_PTR __restrict, const _PTR __restrict, int, size_t)); #endif #if __GNU_VISIBLE _PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t)); _PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t)); -#endif _PTR _EXFUN(memrchr,(const _PTR, int, size_t)); -#if __GNU_VISIBLE _PTR _EXFUN(rawmemchr,(const _PTR, int)); #endif -#if __BSD_VISIBLE +#if __BSD_VISIBLE /* POSIX declaration is in */ char *_EXFUN(rindex,(const char *, int)); #endif +#if __POSIX_VISIBLE >= 200809 char *_EXFUN(stpcpy,(char *__restrict, const char *__restrict)); char *_EXFUN(stpncpy,(char *__restrict, const char *__restrict, size_t)); -#if __BSD_VISIBLE || __POSIX_VISIBLE +#endif +#if __BSD_VISIBLE /* POSIX declaration is in */ int _EXFUN(strcasecmp,(const char *, const char *)); #endif #if __GNU_VISIBLE char *_EXFUN(strcasestr,(const char *, const char *)); char *_EXFUN(strchrnul,(const char *, int)); #endif -#if __XSI_VISIBLE >= 500 +#if __MISC_VISIBLE || __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 char *_EXFUN(strdup,(const char *)); #endif -#ifndef __STRICT_ANSI__ char *_EXFUN(_strdup_r,(struct _reent *, const char *)); -#endif -#if __XSI_VISIBLE >= 700 +#if __POSIX_VISIBLE >= 200809 char *_EXFUN(strndup,(const char *, size_t)); #endif - -#ifndef __STRICT_ANSI__ char *_EXFUN(_strndup_r,(struct _reent *, const char *, size_t)); -#endif #if __GNU_VISIBLE int _EXFUN(ffsl,(long)); @@ -101,10 +116,13 @@ int _EXFUN(ffsll, (long long)); invoke the underlying function, but that requires gcc support. */ #if __GNU_VISIBLE char *_EXFUN(strerror_r,(int, char *, size_t)); -#else +#elif __POSIX_VISIBLE >= 200112 # ifdef __GNUC__ int _EXFUN(strerror_r,(int, char *, size_t)) - __asm__ (__ASMNAME ("__xpg_strerror_r")); +#ifdef __ASMNAME + __asm__ (__ASMNAME ("__xpg_strerror_r")) +#endif + ; # else int _EXFUN(__xpg_strerror_r,(int, char *, size_t)); # define strerror_r __xpg_strerror_r @@ -118,22 +136,17 @@ char * _EXFUN(_strerror_r, (struct _reent *, int, int, int *)); size_t _EXFUN(strlcat,(char *, const char *, size_t)); size_t _EXFUN(strlcpy,(char *, const char *, size_t)); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE +#if __BSD_VISIBLE /* POSIX declaration is in */ int _EXFUN(strncasecmp,(const char *, const char *, size_t)); #endif -#if !defined(__STRICT_ANSI__) || __POSIX_VISIBLE >= 200809 || \ - __XSI_VISIBLE >= 700 +#if __POSIX_VISIBLE >= 200809 size_t _EXFUN(strnlen,(const char *, size_t)); #endif #if __BSD_VISIBLE char *_EXFUN(strsep,(char **, const char *)); #endif -/* - * The origin of these is unknown to me so I am conditionalizing them - * on __STRICT_ANSI__. Finetuning this is definitely needed. --joel - */ -#if !defined(__STRICT_ANSI__) +#if __MISC_VISIBLE char *_EXFUN(strlwr,(char *)); char *_EXFUN(strupr,(char *)); #endif @@ -146,7 +159,7 @@ char *_EXFUN(strsignal, (int __signo)); int _EXFUN(strtosigno, (const char *__name)); #endif -#if defined _GNU_SOURCE && defined __GNUC__ +#if __GNU_VISIBLE && defined(__GNUC__) #define strdupa(__s) \ (__extension__ ({const char *__in = (__s); \ size_t __len = strlen (__in) + 1; \ @@ -158,7 +171,23 @@ int _EXFUN(strtosigno, (const char *__name)); char *__out = (char *) __builtin_alloca (__len); \ __out[__len-1] = '\0'; \ (char *) memcpy (__out, __in, __len-1);})) -#endif /* _GNU_SOURCE && __GNUC__ */ +#endif /* __GNU_VISIBLE && __GNUC__ */ + +/* There are two common basename variants. If you do NOT #include + and you do + + #define _GNU_SOURCE + #include + + you get the GNU version. Otherwise you get the POSIX versionfor which you + should #include i for the function prototype. POSIX requires that + #undef basename will still let you invoke the underlying function. However, + this also implies that the POSIX version is used in this case. That's made + sure here. */ +#if __GNU_VISIBLE && !defined(basename) +# define basename basename +char *_EXFUN(__nonnull (1) basename,(const char *)) __asm__(__ASMNAME("__gnu_basename")); +#endif #include diff --git a/devkitARM/arm-none-eabi/include/strings.h b/devkitARM/arm-none-eabi/include/strings.h index 131d81d20..be019581c 100644 --- a/devkitARM/arm-none-eabi/include/strings.h +++ b/devkitARM/arm-none-eabi/include/strings.h @@ -7,14 +7,21 @@ #ifndef _STRINGS_H_ #define _STRINGS_H_ +/* These functions are already declared in with __BSD_VISIBLE */ +#if !(defined(_STRING_H_) && __BSD_VISIBLE) + #include "_ansi.h" #include - +#include #include /* for size_t */ +#if __POSIX_VISIBLE >= 200809 +#include +#endif + _BEGIN_STD_C -#if !defined __STRICT_ANSI__ && _POSIX_VERSION < 200809L +#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE < 200809) /* * Marked LEGACY in Open Group Base Specifications Issue 6/IEEE Std 1003.1-2004 * Removed from Open Group Base Specifications Issue 7/IEEE Std 1003.1-2008 @@ -24,12 +31,19 @@ void _EXFUN(bcopy,(const void *, void *, size_t)); void _EXFUN(bzero,(void *, size_t)); char *_EXFUN(index,(const char *, int)); char *_EXFUN(rindex,(const char *, int)); -#endif /* ! __STRICT_ANSI__ */ +#endif /* __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE < 200809) */ int _EXFUN(ffs,(int)); int _EXFUN(strcasecmp,(const char *, const char *)); int _EXFUN(strncasecmp,(const char *, const char *, size_t)); +#if __POSIX_VISIBLE >= 200809 +int strcasecmp_l (const char *, const char *, locale_t); +int strncasecmp_l (const char *, const char *, size_t, locale_t); +#endif /* __POSIX_VISIBLE >= 200809 */ + _END_STD_C +#endif /* !(_STRING_H_ && __BSD_VISIBLE) */ + #endif /* _STRINGS_H_ */ diff --git a/devkitARM/arm-none-eabi/include/sys/_default_fcntl.h b/devkitARM/arm-none-eabi/include/sys/_default_fcntl.h index eb674ae79..ede90c4bc 100644 --- a/devkitARM/arm-none-eabi/include/sys/_default_fcntl.h +++ b/devkitARM/arm-none-eabi/include/sys/_default_fcntl.h @@ -65,7 +65,7 @@ extern "C" { #define O_SEARCH _FEXECSRCH #endif -#ifndef _POSIX_SOURCE +#if __MISC_VISIBLE /* * Flags that work for fcntl(fd, F_SETFL, FXXXX) @@ -97,7 +97,11 @@ extern "C" { #define FEXCL _FEXCL #define FNOCTTY _FNOCTTY -#endif /* !_POSIX_SOURCE */ +#endif /* __MISC_VISIBLE */ + +#if __BSD_VISIBLE +#define FNONBLOCK _FNONBLOCK +#endif /* __BSD_VISIBLE */ /* XXX close on exec request; must match UF_EXCLOSE in user.h */ #define FD_CLOEXEC 1 /* posix */ @@ -108,20 +112,20 @@ extern "C" { #define F_SETFD 2 /* Set fildes flags (close on exec) */ #define F_GETFL 3 /* Get file flags */ #define F_SETFL 4 /* Set file flags */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 #define F_GETOWN 5 /* Get owner - for ASYNC */ #define F_SETOWN 6 /* Set owner - for ASYNC */ -#endif /* !_POSIX_SOURCE */ +#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 */ #define F_GETLK 7 /* Get record-locking information */ #define F_SETLK 8 /* Set or Clear a record-lock (Non-Blocking) */ #define F_SETLKW 9 /* Set or Clear a record-lock (Blocking) */ -#ifndef _POSIX_SOURCE +#if __MISC_VISIBLE #define F_RGETLK 10 /* Test a remote lock to see if it is blocked */ #define F_RSETLK 11 /* Set or unlock a remote lock */ #define F_CNVT 12 /* Convert a fhandle to an open fd */ #define F_RSETLKW 13 /* Set or Clear remote record-lock(Blocking) */ -#endif /* !_POSIX_SOURCE */ -#ifdef __CYGWIN__ +#endif /* __MISC_VISIBLE */ +#if __POSIX_VISIBLE >= 200809 #define F_DUPFD_CLOEXEC 14 /* As F_DUPFD, but set close-on-exec flag */ #endif @@ -129,11 +133,11 @@ extern "C" { #define F_RDLCK 1 /* read lock */ #define F_WRLCK 2 /* write lock */ #define F_UNLCK 3 /* remove lock(s) */ -#ifndef _POSIX_SOURCE +#if __MISC_VISIBLE #define F_UNLKSYS 4 /* remove remote locks for a given system */ -#endif /* !_POSIX_SOURCE */ +#endif /* __MISC_VISIBLE */ -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined(__CYGWIN__) +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 /* Special descriptor value to denote the cwd in calls to openat(2) etc. */ #define AT_FDCWD -2 @@ -166,7 +170,7 @@ struct flock { }; #endif /* __CYGWIN__ */ -#ifndef _POSIX_SOURCE +#if __MISC_VISIBLE /* extended file segment locking set data type */ struct eflock { short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ @@ -178,13 +182,13 @@ struct eflock { long l_rpid; /* Remote process id wanting this lock */ long l_rsys; /* Remote system id wanting this lock */ }; -#endif /* !_POSIX_SOURCE */ +#endif /* __MISC_VISIBLE */ #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined(__CYGWIN__) +#if __ATFILE_VISIBLE extern int openat _PARAMS ((int, const char *, int, ...)); #endif extern int creat _PARAMS ((const char *, mode_t)); @@ -192,7 +196,7 @@ extern int fcntl _PARAMS ((int, int, ...)); #if __BSD_VISIBLE extern int flock _PARAMS ((int, int)); #endif -#ifdef __CYGWIN__ +#if __GNU_VISIBLE #include extern int futimesat _PARAMS ((int, const char *, const struct timeval *)); #endif diff --git a/devkitARM/arm-none-eabi/include/sys/_intsup.h b/devkitARM/arm-none-eabi/include/sys/_intsup.h index 7c3bc01cb..88d7400d8 100644 --- a/devkitARM/arm-none-eabi/include/sys/_intsup.h +++ b/devkitARM/arm-none-eabi/include/sys/_intsup.h @@ -19,18 +19,177 @@ #include #endif -/* Check if "long long" is 64bit wide */ -/* Modern GCCs provide __LONG_LONG_MAX__, SUSv3 wants LLONG_MAX */ -#if ( defined(__LONG_LONG_MAX__) && (__LONG_LONG_MAX__ > 0x7fffffff) ) \ - || ( defined(LLONG_MAX) && (LLONG_MAX > 0x7fffffff) ) -#define __have_longlong64 1 +/* Determine how intptr_t and intN_t fastN_t and leastN_t are defined by gcc + for this target. This is used to determine the correct printf() constant in + inttypes.h and other constants in stdint.h. + So we end up with + ?(signed|unsigned) char == 0 + ?(signed|unsigned) short == 1 + ?(signed|unsigned) int == 2 + ?(signed|unsigned) short int == 3 + ?(signed|unsigned) long == 4 + ?(signed|unsigned) long int == 6 + ?(signed|unsigned) long long == 8 + ?(signed|unsigned) long long int == 10 + */ +#pragma push_macro("signed") +#pragma push_macro("unsigned") +#pragma push_macro("char") +#pragma push_macro("short") +#pragma push_macro("__int20") +#pragma push_macro("int") +#pragma push_macro("long") +#undef signed +#undef unsigned +#undef char +#undef short +#undef int +#undef __int20 +#undef long +#define signed +0 +#define unsigned +0 +#define char +0 +#define short +1 +#define __int20 +2 +#define int +2 +#define long +4 +#if (__INTPTR_TYPE__ == 8 || __INTPTR_TYPE__ == 10) +#define _INTPTR_EQ_LONGLONG +#elif (__INTPTR_TYPE__ == 4 || __INTPTR_TYPE__ == 6) +#define _INTPTR_EQ_LONG +/* Note - the tests for _INTPTR_EQ_INT and _INTPTR_EQ_SHORT are currently + redundant as the values are not used. But one day they may be needed + and so the tests remain. */ +#elif __INTPTR_TYPE__ == 2 +#define _INTPTR_EQ_INT +#elif (__INTPTR_TYPE__ == 1 || __INTPTR_TYPE__ == 3) +#define _INTPTR_EQ_SHORT +#else +#error "Unable to determine type definition of intptr_t" +#endif +#if (__INT32_TYPE__ == 4 || __INT32_TYPE__ == 6) +#define _INT32_EQ_LONG +#elif __INT32_TYPE__ == 2 +/* Nothing to define because int32_t is safe to print as an int. */ +#else +#error "Unable to determine type definition of int32_t" #endif -/* Check if "long" is 64bit or 32bit wide */ -#if __STDINT_EXP(LONG_MAX) > 0x7fffffff -#define __have_long64 1 -#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__) -#define __have_long32 1 +#if (__INT8_TYPE__ == 0) +#define __INT8 "hh" +#elif (__INT8_TYPE__ == 1 || __INT8_TYPE__ == 3) +#define __INT8 "h" +#elif (__INT8_TYPE__ == 2) +#define __INT8 +#elif (__INT8_TYPE__ == 4 || __INT8_TYPE__ == 6) +#define __INT8 "l" +#elif (__INT8_TYPE__ == 8 || __INT8_TYPE__ == 10) +#define __INT8 "ll" #endif +#if (__INT16_TYPE__ == 1 || __INT16_TYPE__ == 3) +#define __INT16 "h" +#elif (__INT16_TYPE__ == 2) +#define __INT16 +#elif (__INT16_TYPE__ == 4 || __INT16_TYPE__ == 6) +#define __INT16 "l" +#elif (__INT16_TYPE__ == 8 || __INT16_TYPE__ == 10) +#define __INT16 "ll" +#endif +#if (__INT32_TYPE__ == 2) +#define __INT32 +#elif (__INT32_TYPE__ == 4 || __INT32_TYPE__ == 6) +#define __INT32 "l" +#elif (__INT32_TYPE__ == 8 || __INT32_TYPE__ == 10) +#define __INT32 "ll" +#endif +#if (__INT64_TYPE__ == 2) +#define __INT64 +#elif (__INT64_TYPE__ == 4 || __INT64_TYPE__ == 6) +#define __INT64 "l" +#elif (__INT64_TYPE__ == 8 || __INT64_TYPE__ == 10) +#define __INT64 "ll" +#endif +#if (__INT_FAST8_TYPE__ == 0) +#define __FAST8 "hh" +#elif (__INT_FAST8_TYPE__ == 1 || __INT_FAST8_TYPE__ == 3) +#define __FAST8 "h" +#elif (__INT_FAST8_TYPE__ == 2) +#define __FAST8 +#elif (__INT_FAST8_TYPE__ == 4 || __INT_FAST8_TYPE__ == 6) +#define __FAST8 "l" +#elif (__INT_FAST8_TYPE__ == 8 || __INT_FAST8_TYPE__ == 10) +#define __FAST8 "ll" +#endif +#if (__INT_FAST16_TYPE__ == 1 || __INT_FAST16_TYPE__ == 3) +#define __FAST16 "h" +#elif (__INT_FAST16_TYPE__ == 2) +#define __FAST16 +#elif (__INT_FAST16_TYPE__ == 4 || __INT_FAST16_TYPE__ == 6) +#define __FAST16 "l" +#elif (__INT_FAST16_TYPE__ == 8 || __INT_FAST16_TYPE__ == 10) +#define __FAST16 "ll" +#endif +#if (__INT_FAST32_TYPE__ == 2) +#define __FAST32 +#elif (__INT_FAST32_TYPE__ == 4 || __INT_FAST32_TYPE__ == 6) +#define __FAST32 "l" +#elif (__INT_FAST32_TYPE__ == 8 || __INT_FAST32_TYPE__ == 10) +#define __FAST32 "ll" +#endif +#if (__INT_FAST64_TYPE__ == 2) +#define __FAST64 +#elif (__INT_FAST64_TYPE__ == 4 || __INT_FAST64_TYPE__ == 6) +#define __FAST64 "l" +#elif (__INT_FAST64_TYPE__ == 8 || __INT_FAST64_TYPE__ == 10) +#define __FAST64 "ll" +#endif + +#if (__INT_LEAST8_TYPE__ == 0) +#define __LEAST8 "hh" +#elif (__INT_LEAST8_TYPE__ == 1 || __INT_LEAST8_TYPE__ == 3) +#define __LEAST8 "h" +#elif (__INT_LEAST8_TYPE__ == 2) +#define __LEAST8 +#elif (__INT_LEAST8_TYPE__ == 4 || __INT_LEAST8_TYPE__ == 6) +#define __LEAST8 "l" +#elif (__INT_LEAST8_TYPE__ == 8 || __INT_LEAST8_TYPE__ == 10) +#define __LEAST8 "ll" +#endif +#if (__INT_LEAST16_TYPE__ == 1 || __INT_LEAST16_TYPE__ == 3) +#define __LEAST16 "h" +#elif (__INT_LEAST16_TYPE__ == 2) +#define __LEAST16 +#elif (__INT_LEAST16_TYPE__ == 4 || __INT_LEAST16_TYPE__ == 6) +#define __LEAST16 "l" +#elif (__INT_LEAST16_TYPE__ == 8 || __INT_LEAST16_TYPE__ == 10) +#define __LEAST16 "ll" +#endif +#if (__INT_LEAST32_TYPE__ == 2) +#define __LEAST32 +#elif (__INT_LEAST32_TYPE__ == 4 || __INT_LEAST32_TYPE__ == 6) +#define __LEAST32 "l" +#elif (__INT_LEAST32_TYPE__ == 8 || __INT_LEAST32_TYPE__ == 10) +#define __LEAST32 "ll" +#endif +#if (__INT_LEAST64_TYPE__ == 2) +#define __LEAST64 +#elif (__INT_LEAST64_TYPE__ == 4 || __INT_LEAST64_TYPE__ == 6) +#define __LEAST64 "l" +#elif (__INT_LEAST64_TYPE__ == 8 || __INT_LEAST64_TYPE__ == 10) +#define __LEAST64 "ll" +#endif +#undef signed +#undef unsigned +#undef char +#undef short +#undef int +#undef long +#pragma pop_macro("signed") +#pragma pop_macro("unsigned") +#pragma pop_macro("char") +#pragma pop_macro("short") +#pragma pop_macro("__int20") +#pragma pop_macro("int") +#pragma pop_macro("long") #endif /* _SYS__INTSUP_H */ diff --git a/devkitARM/arm-none-eabi/include/sys/_locale.h b/devkitARM/arm-none-eabi/include/sys/_locale.h new file mode 100644 index 000000000..ce6f9955c --- /dev/null +++ b/devkitARM/arm-none-eabi/include/sys/_locale.h @@ -0,0 +1,12 @@ +/* Definition of opaque POSIX-1.2008 type locale_t for userspace. */ + +#ifndef _SYS__LOCALE_H +#define _SYS__LOCALE_H + +#include +#include + +struct __locale_t; +typedef struct __locale_t *locale_t; + +#endif /* _SYS__LOCALE_H */ diff --git a/devkitARM/arm-none-eabi/include/sys/_pthreadtypes.h b/devkitARM/arm-none-eabi/include/sys/_pthreadtypes.h new file mode 100644 index 000000000..b29f50c27 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/sys/_pthreadtypes.h @@ -0,0 +1,233 @@ +/* + * Written by Joel Sherrill . + * + * COPYRIGHT (c) 1989-2013, 2015. + * On-Line Applications Research Corporation (OAR). + * + * Permission to use, copy, modify, and distribute this software for any + * purpose without fee is hereby granted, provided that this entire notice + * is included in all copies of any software which is or includes a copy + * or modification of this software. + * + * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION + * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS + * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + */ + +#ifndef _SYS__PTHREADTYPES_H_ +#define _SYS__PTHREADTYPES_H_ + +#if defined(_POSIX_THREADS) + +#include + +/* + * 2.5 Primitive System Data Types, P1003.1c/D10, p. 19. + */ + +#if defined(__XMK__) +typedef unsigned int pthread_t; /* identify a thread */ +#else +typedef __uint32_t pthread_t; /* identify a thread */ +#endif + +/* P1003.1c/D10, p. 118-119 */ +#define PTHREAD_SCOPE_PROCESS 0 +#define PTHREAD_SCOPE_SYSTEM 1 + +/* P1003.1c/D10, p. 111 */ +#define PTHREAD_INHERIT_SCHED 1 /* scheduling policy and associated */ + /* attributes are inherited from */ + /* the calling thread. */ +#define PTHREAD_EXPLICIT_SCHED 2 /* set from provided attribute object */ + +/* P1003.1c/D10, p. 141 */ +#define PTHREAD_CREATE_DETACHED 0 +#define PTHREAD_CREATE_JOINABLE 1 + +#if defined(__XMK__) +typedef struct pthread_attr_s { + int contentionscope; + struct sched_param schedparam; + int detachstate; + void *stackaddr; + size_t stacksize; +} pthread_attr_t; + +#define PTHREAD_STACK_MIN 200 + +#else /* !defined(__XMK__) */ +typedef struct { + int is_initialized; + void *stackaddr; + int stacksize; + int contentionscope; + int inheritsched; + int schedpolicy; + struct sched_param schedparam; + + /* P1003.4b/D8, p. 54 adds cputime_clock_allowed attribute. */ +#if defined(_POSIX_THREAD_CPUTIME) + int cputime_clock_allowed; /* see time.h */ +#endif + int detachstate; +} pthread_attr_t; + +#endif /* !defined(__XMK__) */ + +#if defined(_POSIX_THREAD_PROCESS_SHARED) +/* NOTE: P1003.1c/D10, p. 81 defines following values for process_shared. */ + +#define PTHREAD_PROCESS_PRIVATE 0 /* visible within only the creating process */ +#define PTHREAD_PROCESS_SHARED 1 /* visible too all processes with access to */ + /* the memory where the resource is */ + /* located */ +#endif + +#if defined(_POSIX_THREAD_PRIO_PROTECT) +/* Mutexes */ + +/* Values for blocking protocol. */ + +#define PTHREAD_PRIO_NONE 0 +#define PTHREAD_PRIO_INHERIT 1 +#define PTHREAD_PRIO_PROTECT 2 +#endif + +#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) + +/* Values for mutex type */ + +/* The following defines are part of the X/Open System Interface (XSI). */ + +/* + * This type of mutex does not detect deadlock. A thread attempting to + * relock this mutex without first unlocking it shall deadlock. Attempting + * to unlock a mutex locked by a different thread results in undefined + * behavior. Attempting to unlock an unlocked mutex results in undefined + * behavior. + */ +#define PTHREAD_MUTEX_NORMAL 0 + +/* + * A thread attempting to relock this mutex without first unlocking + * it shall succeed in locking the mutex. The relocking deadlock which + * can occur with mutexes of type PTHREAD_MUTEX_NORMAL cannot occur with + * this type of mutex. Multiple locks of this mutex shall require the + * same number of unlocks to release the mutex before another thread can + * acquire the mutex. A thread attempting to unlock a mutex which another + * thread has locked shall return with an error. A thread attempting to + * unlock an unlocked mutex shall return with an error. + */ +#define PTHREAD_MUTEX_RECURSIVE 1 + +/* + * This type of mutex provides error checking. A thread attempting + * to relock this mutex without first unlocking it shall return with an + * error. A thread attempting to unlock a mutex which another thread has + * locked shall return with an error. A thread attempting to unlock an + * unlocked mutex shall return with an error. + */ +#define PTHREAD_MUTEX_ERRORCHECK 2 + +/* + * Attempting to recursively lock a mutex of this type results + * in undefined behavior. Attempting to unlock a mutex of this type + * which was not locked by the calling thread results in undefined + * behavior. Attempting to unlock a mutex of this type which is not locked + * results in undefined behavior. An implementation may map this mutex to + * one of the other mutex types. + */ +#define PTHREAD_MUTEX_DEFAULT 3 + +#endif /* !defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) */ + +#if defined(__XMK__) +typedef unsigned int pthread_mutex_t; /* identify a mutex */ + +typedef struct { + int type; +} pthread_mutexattr_t; + +#else /* !defined(__XMK__) */ +typedef __uint32_t pthread_mutex_t; /* identify a mutex */ + +typedef struct { + int is_initialized; +#if defined(_POSIX_THREAD_PROCESS_SHARED) + int process_shared; /* allow mutex to be shared amongst processes */ +#endif +#if defined(_POSIX_THREAD_PRIO_PROTECT) + int prio_ceiling; + int protocol; +#endif +#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) + int type; +#endif + int recursive; +} pthread_mutexattr_t; +#endif /* !defined(__XMK__) */ + +#define _PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t) 0xFFFFFFFF) + +/* Condition Variables */ + +typedef __uint32_t pthread_cond_t; /* identify a condition variable */ + +#define _PTHREAD_COND_INITIALIZER ((pthread_cond_t) 0xFFFFFFFF) + +typedef struct { + int is_initialized; + clock_t clock; /* specifiy clock for timeouts */ +#if defined(_POSIX_THREAD_PROCESS_SHARED) + int process_shared; /* allow this to be shared amongst processes */ +#endif +} pthread_condattr_t; /* a condition attribute object */ + +/* Keys */ + +typedef __uint32_t pthread_key_t; /* thread-specific data keys */ + +typedef struct { + int is_initialized; /* is this structure initialized? */ + int init_executed; /* has the initialization routine been run? */ +} pthread_once_t; /* dynamic package initialization */ + +#define _PTHREAD_ONCE_INIT { 1, 0 } /* is initialized and not run */ +#endif /* defined(_POSIX_THREADS) */ + +/* POSIX Barrier Types */ + +#if defined(_POSIX_BARRIERS) +typedef __uint32_t pthread_barrier_t; /* POSIX Barrier Object */ +typedef struct { + int is_initialized; /* is this structure initialized? */ +#if defined(_POSIX_THREAD_PROCESS_SHARED) + int process_shared; /* allow this to be shared amongst processes */ +#endif +} pthread_barrierattr_t; +#endif /* defined(_POSIX_BARRIERS) */ + +/* POSIX Spin Lock Types */ + +#if defined(_POSIX_SPIN_LOCKS) +typedef __uint32_t pthread_spinlock_t; /* POSIX Spin Lock Object */ +#endif /* defined(_POSIX_SPIN_LOCKS) */ + +/* POSIX Reader/Writer Lock Types */ + +#if defined(_POSIX_READER_WRITER_LOCKS) +typedef __uint32_t pthread_rwlock_t; /* POSIX RWLock Object */ + +#define _PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t) 0xFFFFFFFF) + +typedef struct { + int is_initialized; /* is this structure initialized? */ +#if defined(_POSIX_THREAD_PROCESS_SHARED) + int process_shared; /* allow this to be shared amongst processes */ +#endif +} pthread_rwlockattr_t; +#endif /* defined(_POSIX_READER_WRITER_LOCKS) */ + +#endif /* ! _SYS__PTHREADTYPES_H_ */ diff --git a/devkitARM/arm-none-eabi/include/sys/_sigset.h b/devkitARM/arm-none-eabi/include/sys/_sigset.h new file mode 100644 index 000000000..a9c0d2d4e --- /dev/null +++ b/devkitARM/arm-none-eabi/include/sys/_sigset.h @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 1982, 1986, 1989, 1991, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)signal.h 8.4 (Berkeley) 5/4/95 + * $FreeBSD$ + */ + +#ifndef _SYS__SIGSET_H_ +#define _SYS__SIGSET_H_ + +typedef unsigned long __sigset_t; + +#endif /* !_SYS__SIGSET_H_ */ diff --git a/devkitARM/arm-none-eabi/include/sys/_stdint.h b/devkitARM/arm-none-eabi/include/sys/_stdint.h new file mode 100644 index 000000000..21a14d3ea --- /dev/null +++ b/devkitARM/arm-none-eabi/include/sys/_stdint.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2004, 2005 by + * Ralf Corsepius, Ulm/Germany. All rights reserved. + * + * Permission to use, copy, modify, and distribute this software + * is freely granted, provided that this notice is preserved. + */ + +#ifndef _SYS__STDINT_H +#define _SYS__STDINT_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef ___int8_t_defined +#ifndef _INT8_T_DECLARED +typedef __int8_t int8_t ; +#define _INT8_T_DECLARED +#endif +#ifndef _UINT8_T_DECLARED +typedef __uint8_t uint8_t ; +#define _UINT8_T_DECLARED +#endif +#define __int8_t_defined 1 +#endif /* ___int8_t_defined */ + +#ifdef ___int16_t_defined +#ifndef _INT16_T_DECLARED +typedef __int16_t int16_t ; +#define _INT16_T_DECLARED +#endif +#ifndef _UINT16_T_DECLARED +typedef __uint16_t uint16_t ; +#define _UINT16_T_DECLARED +#endif +#define __int16_t_defined 1 +#endif /* ___int16_t_defined */ + +#ifdef ___int32_t_defined +#ifndef _INT32_T_DECLARED +typedef __int32_t int32_t ; +#define _INT32_T_DECLARED +#endif +#ifndef _UINT32_T_DECLARED +typedef __uint32_t uint32_t ; +#define _UINT32_T_DECLARED +#endif +#define __int32_t_defined 1 +#endif /* ___int32_t_defined */ + +#ifdef ___int64_t_defined +#ifndef _INT64_T_DECLARED +typedef __int64_t int64_t ; +#define _INT64_T_DECLARED +#endif +#ifndef _UINT64_T_DECLARED +typedef __uint64_t uint64_t ; +#define _UINT64_T_DECLARED +#endif +#define __int64_t_defined 1 +#endif /* ___int64_t_defined */ + +#ifndef _INTMAX_T_DECLARED +typedef __intmax_t intmax_t; +#define _INTMAX_T_DECLARED +#endif + +#ifndef _UINTMAX_T_DECLARED +typedef __uintmax_t uintmax_t; +#define _UINTMAX_T_DECLARED +#endif + +#ifndef _INTPTR_T_DECLARED +typedef __intptr_t intptr_t; +#define _INTPTR_T_DECLARED +#endif + +#ifndef _UINTPTR_T_DECLARED +typedef __uintptr_t uintptr_t; +#define _UINTPTR_T_DECLARED +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS__STDINT_H */ diff --git a/devkitARM/arm-none-eabi/include/sys/_timespec.h b/devkitARM/arm-none-eabi/include/sys/_timespec.h new file mode 100644 index 000000000..7609e4a46 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/sys/_timespec.h @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)time.h 8.5 (Berkeley) 5/4/95 + * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp + * $FreeBSD$ + */ + +#ifndef _SYS__TIMESPEC_H_ +#define _SYS__TIMESPEC_H_ + +#include + +#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED) +typedef _TIME_T_ time_t; +#define __time_t_defined +#define _TIME_T_DECLARED +#endif + +struct timespec { + time_t tv_sec; /* seconds */ + long tv_nsec; /* and nanoseconds */ +}; + +#endif /* !_SYS__TIMESPEC_H_ */ diff --git a/devkitARM/arm-none-eabi/include/sys/_timeval.h b/devkitARM/arm-none-eabi/include/sys/_timeval.h new file mode 100644 index 000000000..676a0b894 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/sys/_timeval.h @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2002 Mike Barcroft + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS__TIMEVAL_H_ +#define _SYS__TIMEVAL_H_ + +#include + +#ifndef _SUSECONDS_T_DECLARED +typedef __suseconds_t suseconds_t; +#define _SUSECONDS_T_DECLARED +#endif + +#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED) +typedef _TIME_T_ time_t; +#define __time_t_defined +#define _TIME_T_DECLARED +#endif + +/* This define is also used outside of Newlib, e.g. in MinGW-w64 */ +#ifndef _TIMEVAL_DEFINED +#define _TIMEVAL_DEFINED + +/* + * Structure returned by gettimeofday(2) system call, and used in other calls. + */ +struct timeval { + time_t tv_sec; /* seconds */ + suseconds_t tv_usec; /* and microseconds */ +}; + +#if __BSD_VISIBLE +#ifndef _KERNEL /* NetBSD/OpenBSD compatible interfaces */ + +#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) +#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) +#define timercmp(tvp, uvp, cmp) \ + (((tvp)->tv_sec == (uvp)->tv_sec) ? \ + ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ + ((tvp)->tv_sec cmp (uvp)->tv_sec)) +#define timeradd(tvp, uvp, vvp) \ + do { \ + (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ + (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ + if ((vvp)->tv_usec >= 1000000) { \ + (vvp)->tv_sec++; \ + (vvp)->tv_usec -= 1000000; \ + } \ + } while (0) +#define timersub(tvp, uvp, vvp) \ + do { \ + (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ + (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ + if ((vvp)->tv_usec < 0) { \ + (vvp)->tv_sec--; \ + (vvp)->tv_usec += 1000000; \ + } \ + } while (0) +#endif +#endif /* __BSD_VISIBLE */ + +#endif /* _TIMEVAL_DEFINED */ + +#endif /* !_SYS__TIMEVAL_H_ */ diff --git a/devkitARM/arm-none-eabi/include/sys/_types.h b/devkitARM/arm-none-eabi/include/sys/_types.h index f5aedd0f9..98b93ce71 100644 --- a/devkitARM/arm-none-eabi/include/sys/_types.h +++ b/devkitARM/arm-none-eabi/include/sys/_types.h @@ -2,51 +2,141 @@ /* This file defines various typedefs needed by the system calls that support the C library. Basically, they're just the POSIX versions with an '_' - prepended. This file lives in the `sys' directory so targets can provide - their own if desired (or they can put target dependant conditionals here). + prepended. Targets shall use to define their own + internal types if desired. + + There are three define patterns used for type definitions. Lets assume + xyz_t is a user type. + + The internal type definition uses __machine_xyz_t_defined. It is defined by + to disable a default definition in . It + must not be used in other files. + + User type definitions are guarded by __xyz_t_defined in glibc and + _XYZ_T_DECLARED in BSD compatible systems. */ #ifndef _SYS__TYPES_H #define _SYS__TYPES_H +#include +#include #include #include -#ifndef __off_t_defined +#ifndef __machine_blkcnt_t_defined +typedef long __blkcnt_t; +#endif + +#ifndef __machine_blksize_t_defined +typedef long __blksize_t; +#endif + +#ifndef __machine_fsblkcnt_t_defined +typedef __uint64_t __fsblkcnt_t; +#endif + +#ifndef __machine_fsfilcnt_t_defined +typedef __uint32_t __fsfilcnt_t; +#endif + +#ifndef __machine_off_t_defined typedef long _off_t; #endif -#ifndef __dev_t_defined -typedef int __dev_t; +#if defined(__XMK__) +typedef signed char __pid_t; +#else +typedef int __pid_t; #endif -#ifndef __uid_t_defined +#ifndef __machine_dev_t_defined +typedef short __dev_t; +#endif + +#ifndef __machine_uid_t_defined typedef unsigned short __uid_t; #endif -#ifndef __gid_t_defined +#ifndef __machine_gid_t_defined typedef unsigned short __gid_t; #endif -#ifndef __off64_t_defined +#ifndef __machine_id_t_defined +typedef __uint32_t __id_t; +#endif + +#ifndef __machine_ino_t_defined +#if (defined(__i386__) && (defined(GO32) || defined(__MSDOS__))) || \ + defined(__sparc__) || defined(__SPU__) +typedef unsigned long __ino_t; +#else +typedef unsigned short __ino_t; +#endif +#endif + +#ifndef __machine_mode_t_defined +#if defined(__i386__) && (defined(GO32) || defined(__MSDOS__)) +typedef int __mode_t; +#else +#if defined(__sparc__) && !defined(__sparc_v9__) +#ifdef __svr4__ +typedef unsigned long __mode_t; +#else +typedef unsigned short __mode_t; +#endif +#else +typedef __uint32_t __mode_t; +#endif +#endif +#endif + +#ifndef __machine_off64_t_defined __extension__ typedef long long _off64_t; #endif +#if defined(__CYGWIN__) && !defined(__LP64__) +typedef _off64_t __off_t; +#else +typedef _off_t __off_t; +#endif + +typedef _off64_t __loff_t; + +#ifndef __machine_key_t_defined +typedef long __key_t; +#endif + /* * We need fpos_t for the following, but it doesn't have a leading "_", * so we use _fpos_t instead. */ -#ifndef __fpos_t_defined +#ifndef __machine_fpos_t_defined typedef long _fpos_t; /* XXX must match off_t in */ /* (and must be `long' for now) */ #endif #ifdef __LARGE64_FILES -#ifndef __fpos64_t_defined +#ifndef __machine_fpos64_t_defined typedef _off64_t _fpos64_t; #endif #endif -#ifndef __ssize_t_defined +/* Defined by GCC provided */ +#undef __size_t + +#ifndef __machine_size_t_defined +#ifdef __SIZE_TYPE__ +typedef __SIZE_TYPE__ __size_t; +#else +#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647 +typedef unsigned int __size_t; +#else +typedef unsigned long __size_t; +#endif +#endif +#endif + +#ifndef __machine_ssize_t_defined #ifdef __SIZE_TYPE__ /* If __SIZE_TYPE__ is defined (gcc) we define ssize_t based on size_t. We simply change "unsigned" to "signed" for this single definition @@ -63,10 +153,12 @@ typedef long _ssize_t; #endif #endif +typedef _ssize_t __ssize_t; + #define __need_wint_t #include -#ifndef __mbstate_t_defined +#ifndef __machine_mbstate_t_defined /* Conversion state information. */ typedef struct { @@ -79,13 +171,43 @@ typedef struct } _mbstate_t; #endif -#ifndef __flock_t_defined +#ifndef __machine_flock_t_defined typedef _LOCK_RECURSIVE_T _flock_t; #endif -#ifndef __iconv_t_defined +#ifndef __machine_iconv_t_defined /* Iconv descriptor type */ typedef void *_iconv_t; #endif +#define _CLOCK_T_ unsigned long /* clock() */ +typedef _CLOCK_T_ __clock_t; + +#define _TIME_T_ long /* time() */ +typedef _TIME_T_ __time_t; + +#define _CLOCKID_T_ unsigned long +typedef _CLOCKID_T_ __clockid_t; + +#define _TIMER_T_ unsigned long +typedef _TIMER_T_ __timer_t; + +#ifndef __machine_sa_family_t_defined +typedef __uint8_t __sa_family_t; +#endif + +#ifndef __machine_socklen_t_defined +typedef __uint32_t __socklen_t; +#endif + +typedef unsigned short __nlink_t; +typedef long __suseconds_t; /* microseconds (signed) */ +typedef unsigned long __useconds_t; /* microseconds (unsigned) */ + +#ifdef __GNUCLIKE_BUILTIN_VARARGS +typedef __builtin_va_list __va_list; +#else +typedef char * __va_list; +#endif /* __GNUCLIKE_BUILTIN_VARARGS */ + #endif /* _SYS__TYPES_H */ diff --git a/devkitARM/arm-none-eabi/include/sys/cdefs.h b/devkitARM/arm-none-eabi/include/sys/cdefs.h index a5e613c63..f569fc4d0 100644 --- a/devkitARM/arm-none-eabi/include/sys/cdefs.h +++ b/devkitARM/arm-none-eabi/include/sys/cdefs.h @@ -69,7 +69,9 @@ /* * Testing against Clang-specific extensions. */ - +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif #ifndef __has_extension #define __has_extension __has_feature #endif @@ -100,33 +102,33 @@ #if defined(__GNUC__) || defined(__INTEL_COMPILER) #if __GNUC__ >= 3 || defined(__INTEL_COMPILER) -#define __GNUCLIKE_ASM 3 -#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS +#define __GNUCLIKE_ASM 3 +#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS #else -#define __GNUCLIKE_ASM 2 +#define __GNUCLIKE_ASM 2 #endif -#define __GNUCLIKE___TYPEOF 1 -#define __GNUCLIKE___OFFSETOF 1 -#define __GNUCLIKE___SECTION 1 +#define __GNUCLIKE___TYPEOF 1 +#define __GNUCLIKE___OFFSETOF 1 +#define __GNUCLIKE___SECTION 1 #ifndef __INTEL_COMPILER -# define __GNUCLIKE_CTOR_SECTION_HANDLING 1 +#define __GNUCLIKE_CTOR_SECTION_HANDLING 1 #endif -#define __GNUCLIKE_BUILTIN_CONSTANT_P 1 -# if defined(__INTEL_COMPILER) && defined(__cplusplus) \ - && __INTEL_COMPILER < 800 -# undef __GNUCLIKE_BUILTIN_CONSTANT_P -# endif +#define __GNUCLIKE_BUILTIN_CONSTANT_P 1 +#if defined(__INTEL_COMPILER) && defined(__cplusplus) && \ + __INTEL_COMPILER < 800 +#undef __GNUCLIKE_BUILTIN_CONSTANT_P +#endif -#if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) && !defined(__INTEL_COMPILER) -# define __GNUCLIKE_BUILTIN_VARARGS 1 -# define __GNUCLIKE_BUILTIN_STDARG 1 -# define __GNUCLIKE_BUILTIN_VAALIST 1 +#if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) +#define __GNUCLIKE_BUILTIN_VARARGS 1 +#define __GNUCLIKE_BUILTIN_STDARG 1 +#define __GNUCLIKE_BUILTIN_VAALIST 1 #endif #if defined(__GNUC__) -# define __GNUC_VA_LIST_COMPATIBILITY 1 +#define __GNUC_VA_LIST_COMPATIBILITY 1 #endif /* @@ -137,23 +139,23 @@ #endif #ifndef __INTEL_COMPILER -# define __GNUCLIKE_BUILTIN_NEXT_ARG 1 -# define __GNUCLIKE_MATH_BUILTIN_RELOPS +#define __GNUCLIKE_BUILTIN_NEXT_ARG 1 +#define __GNUCLIKE_MATH_BUILTIN_RELOPS #endif -#define __GNUCLIKE_BUILTIN_MEMCPY 1 +#define __GNUCLIKE_BUILTIN_MEMCPY 1 /* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */ -#define __CC_SUPPORTS_INLINE 1 -#define __CC_SUPPORTS___INLINE 1 -#define __CC_SUPPORTS___INLINE__ 1 +#define __CC_SUPPORTS_INLINE 1 +#define __CC_SUPPORTS___INLINE 1 +#define __CC_SUPPORTS___INLINE__ 1 -#define __CC_SUPPORTS___FUNC__ 1 -#define __CC_SUPPORTS_WARNING 1 +#define __CC_SUPPORTS___FUNC__ 1 +#define __CC_SUPPORTS_WARNING 1 -#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ +#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ -#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 +#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 #endif /* __GNUC__ || __INTEL_COMPILER */ @@ -229,8 +231,12 @@ #define __unused #define __packed #define __aligned(x) +#define __alloc_align(x) +#define __alloc_size(x) #define __section(x) +#define __weak_symbol #else +#define __weak_symbol __attribute__((__weak__)) #if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER) #define __dead2 #define __pure2 @@ -242,7 +248,7 @@ #define __unused /* XXX Find out what to do for __packed, __aligned and __section */ #endif -#if __GNUC_PREREQ__(2, 7) +#if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER) #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) #define __unused __attribute__((__unused__)) @@ -251,16 +257,17 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif -#if defined(__INTEL_COMPILER) -#define __dead2 __attribute__((__noreturn__)) -#define __pure2 __attribute__((__const__)) -#define __unused __attribute__((__unused__)) -#define __used __attribute__((__used__)) -#define __packed __attribute__((__packed__)) -#define __aligned(x) __attribute__((__aligned__(x))) -#define __section(x) __attribute__((__section__(x))) +#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__) +#define __alloc_size(x) __attribute__((__alloc_size__(x))) +#else +#define __alloc_size(x) #endif +#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__) +#define __alloc_align(x) __attribute__((__alloc_align__(x))) +#else +#define __alloc_align(x) #endif +#endif /* lint */ #if !__GNUC_PREREQ__(2, 95) #define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) @@ -270,7 +277,7 @@ * Keywords added in C11. */ -#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L +#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint) #if !__has_extension(c_alignas) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ @@ -302,23 +309,28 @@ #define _Noreturn __dead2 #endif -#if __GNUC_PREREQ__(4, 6) && !defined(__cplusplus) -/* Do nothing: _Static_assert() works as per C11 */ -#elif !__has_extension(c_static_assert) +#if !__has_extension(c_static_assert) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_static_assert) #define _Static_assert(x, y) static_assert(x, y) +#elif __GNUC_PREREQ__(4,6) +/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ #elif defined(__COUNTER__) #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) #define __Static_assert(x, y) ___Static_assert(x, y) -#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] +#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ + __unused #else #define _Static_assert(x, y) struct __hack #endif #endif #if !__has_extension(c_thread_local) -/* XXX: Change this to test against C++11 when clang in base supports it. */ +/* + * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode + * without actually supporting the thread_local keyword. Don't check for + * the presence of C++11 when defining _Thread_local. + */ #if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ __has_extension(cxx_thread_local) #define _Thread_local thread_local @@ -338,7 +350,8 @@ * distinguish multiple cases. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ + __has_extension(c_generic_selections) #define __generic(expr, t, yes, no) \ _Generic(expr, t: yes, default: no) #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) @@ -368,15 +381,19 @@ #endif #if __GNUC_PREREQ__(3, 3) -#define __nonnull(x) __attribute__((__nonnull__(x))) +#define __nonnull(x) __attribute__((__nonnull__(x))) +#define __nonnull_all __attribute__((__nonnull__)) #else -#define __nonnull(x) +#define __nonnull(x) +#define __nonnull_all #endif #if __GNUC_PREREQ__(3, 4) #define __fastcall __attribute__((__fastcall__)) +#define __result_use_check __attribute__((__warn_unused_result__)) #else #define __fastcall +#define __result_use_check #endif #if __GNUC_PREREQ__(4, 1) @@ -385,6 +402,12 @@ #define __returns_twice #endif +#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable) +#define __unreachable() __builtin_unreachable() +#else +#define __unreachable() ((void)0) +#endif + /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) #define __func__ NULL @@ -433,19 +456,26 @@ * larger code. */ #if __GNUC_PREREQ__(2, 96) -#define __predict_true(exp) __builtin_expect((exp), 1) -#define __predict_false(exp) __builtin_expect((exp), 0) +#define __predict_true(exp) __builtin_expect((exp), 1) +#define __predict_false(exp) __builtin_expect((exp), 0) #else -#define __predict_true(exp) (exp) -#define __predict_false(exp) (exp) +#define __predict_true(exp) (exp) +#define __predict_false(exp) (exp) #endif -#if __GNUC_PREREQ__(4, 2) -#define __hidden __attribute__((__visibility__("hidden"))) +#if __GNUC_PREREQ__(4, 0) +#define __sentinel __attribute__((__sentinel__)) #define __exported __attribute__((__visibility__("default"))) +/* Only default visibility is supported on PE/COFF targets. */ +#ifndef __CYGWIN__ +#define __hidden __attribute__((__visibility__("hidden"))) #else #define __hidden +#endif +#else +#define __sentinel #define __exported +#define __hidden #endif #define __offsetof(type, field) offsetof(type, field) @@ -460,7 +490,7 @@ */ #if __GNUC_PREREQ__(3, 1) #define __containerof(x, s, m) ({ \ - const volatile __typeof__(((s *)0)->m) *__x = (x); \ + const volatile __typeof(((s *)0)->m) *__x = (x); \ __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ }) #else @@ -492,6 +522,22 @@ __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) #endif +/* + * FORTIFY_SOURCE, and perhaps other compiler-specific features, require + * the use of non-standard inlining. In general we should try to avoid + * using these but GCC-compatible compilers tend to support the extensions + * well enough to use them in limited cases. + */ +#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) +#if __GNUC_PREREQ__(4, 3) || __has_attribute(__artificial__) +#define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) +#else +#define __gnu_inline __attribute__((__gnu_inline__)) +#endif /* artificial */ +#else +#define __gnu_inline +#endif + /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ #if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ defined(__GNUC__) && !defined(__INTEL_COMPILER) @@ -583,128 +629,79 @@ #define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) #endif -/*- - * The following definitions are an extension of the behavior originally - * implemented in , but with a different level of granularity. - * POSIX.1 requires that the macros we test be defined before any standard - * header file is included. +/* + * Type Safety Checking * - * Here's a quick run-down of the versions: - * defined(_POSIX_SOURCE) 1003.1-1988 - * _POSIX_C_SOURCE == 1 1003.1-1990 - * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option - * _POSIX_C_SOURCE == 199309 1003.1b-1993 - * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, - * and the omnibus ISO/IEC 9945-1: 1996 - * _POSIX_C_SOURCE == 200112 1003.1-2001 - * _POSIX_C_SOURCE == 200809 1003.1-2008 - * - * In addition, the X/Open Portability Guide, which is now the Single UNIX - * Specification, defines a feature-test macro which indicates the version of - * that specification, and which subsumes _POSIX_C_SOURCE. - * - * Our macros begin with two underscores to avoid namespace screwage. + * Clang provides additional attributes to enable checking type safety + * properties that cannot be enforced by the C type system. */ -/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */ -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1 -#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */ -#define _POSIX_C_SOURCE 199009 -#endif - -/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */ -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2 -#undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 199209 -#endif - -/* Deal with various X/Open Portability Guides and Single UNIX Spec. */ -#ifdef _XOPEN_SOURCE -#if _XOPEN_SOURCE - 0 >= 700 -#define __XSI_VISIBLE 700 -#undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 200809 -#elif _XOPEN_SOURCE - 0 >= 600 -#define __XSI_VISIBLE 600 -#undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 200112 -#elif _XOPEN_SOURCE - 0 >= 500 -#define __XSI_VISIBLE 500 -#undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 199506 -#endif +#if __has_attribute(__argument_with_type_tag__) && \ + __has_attribute(__type_tag_for_datatype__) && !defined(lint) +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ + __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) +#define __datatype_type_tag(kind, type) \ + __attribute__((__type_tag_for_datatype__(kind, type))) +#else +#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) +#define __datatype_type_tag(kind, type) #endif /* - * Deal with all versions of POSIX. The ordering relative to the tests above is - * important. - */ -#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) -#define _POSIX_C_SOURCE 198808 -#endif -#ifdef _POSIX_C_SOURCE -#if _POSIX_C_SOURCE >= 200809 -#define __POSIX_VISIBLE 200809 -#define __ISO_C_VISIBLE 1999 -#elif _POSIX_C_SOURCE >= 200112 -#define __POSIX_VISIBLE 200112 -#define __ISO_C_VISIBLE 1999 -#elif _POSIX_C_SOURCE >= 199506 -#define __POSIX_VISIBLE 199506 -#define __ISO_C_VISIBLE 1990 -#elif _POSIX_C_SOURCE >= 199309 -#define __POSIX_VISIBLE 199309 -#define __ISO_C_VISIBLE 1990 -#elif _POSIX_C_SOURCE >= 199209 -#define __POSIX_VISIBLE 199209 -#define __ISO_C_VISIBLE 1990 -#elif _POSIX_C_SOURCE >= 199009 -#define __POSIX_VISIBLE 199009 -#define __ISO_C_VISIBLE 1990 -#else -#define __POSIX_VISIBLE 198808 -#define __ISO_C_VISIBLE 0 -#endif /* _POSIX_C_SOURCE */ -#else -/*- - * Deal with _ANSI_SOURCE: - * If it is defined, and no other compilation environment is explicitly - * requested, then define our internal feature-test macros to zero. This - * makes no difference to the preprocessor (undefined symbols in preprocessing - * expressions are defined to have value zero), but makes it more convenient for - * a test program to print out the values. + * Lock annotations. * - * If a program mistakenly defines _ANSI_SOURCE and some other macro such as - * _POSIX_C_SOURCE, we will assume that it wants the broader compilation - * environment (and in fact we will never get here). + * Clang provides support for doing basic thread-safety tests at + * compile-time, by marking which locks will/should be held when + * entering/leaving a functions. + * + * Furthermore, it is also possible to annotate variables and structure + * members to enforce that they are only accessed when certain locks are + * held. */ -#if defined(_ANSI_SOURCE) /* Hide almost everything. */ -#define __POSIX_VISIBLE 0 -#define __XSI_VISIBLE 0 -#define __BSD_VISIBLE 0 -#define __ISO_C_VISIBLE 1990 -#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */ -#define __POSIX_VISIBLE 0 -#define __XSI_VISIBLE 0 -#define __BSD_VISIBLE 0 -#define __ISO_C_VISIBLE 1999 -#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */ -#define __POSIX_VISIBLE 0 -#define __XSI_VISIBLE 0 -#define __BSD_VISIBLE 0 -#define __ISO_C_VISIBLE 2011 -#elif defined(_GNU_SOURCE) /* Everything and the kitchen sink. */ -#define __POSIX_VISIBLE 200809 -#define __XSI_VISIBLE 700 -#define __BSD_VISIBLE 1 -#define __ISO_C_VISIBLE 2011 -#define __GNU_VISIBLE 1 -#else /* Default: everything except __GNU_VISIBLE. */ -#define __POSIX_VISIBLE 200809 -#define __XSI_VISIBLE 700 -#define __BSD_VISIBLE 1 -#define __ISO_C_VISIBLE 2011 -#endif + +#if __has_extension(c_thread_safety_attributes) +#define __lock_annotate(x) __attribute__((x)) +#else +#define __lock_annotate(x) #endif +/* Structure implements a lock. */ +#define __lockable __lock_annotate(lockable) + +/* Function acquires an exclusive or shared lock. */ +#define __locks_exclusive(...) \ + __lock_annotate(exclusive_lock_function(__VA_ARGS__)) +#define __locks_shared(...) \ + __lock_annotate(shared_lock_function(__VA_ARGS__)) + +/* Function attempts to acquire an exclusive or shared lock. */ +#define __trylocks_exclusive(...) \ + __lock_annotate(exclusive_trylock_function(__VA_ARGS__)) +#define __trylocks_shared(...) \ + __lock_annotate(shared_trylock_function(__VA_ARGS__)) + +/* Function releases a lock. */ +#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__)) + +/* Function asserts that an exclusive or shared lock is held. */ +#define __asserts_exclusive(...) \ + __lock_annotate(assert_exclusive_lock(__VA_ARGS__)) +#define __asserts_shared(...) \ + __lock_annotate(assert_shared_lock(__VA_ARGS__)) + +/* Function requires that an exclusive or shared lock is or is not held. */ +#define __requires_exclusive(...) \ + __lock_annotate(exclusive_locks_required(__VA_ARGS__)) +#define __requires_shared(...) \ + __lock_annotate(shared_locks_required(__VA_ARGS__)) +#define __requires_unlocked(...) \ + __lock_annotate(locks_excluded(__VA_ARGS__)) + +/* Function should not be analyzed. */ +#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) + +/* Guard variables and structure members by lock. */ +#define __guarded_by(x) __lock_annotate(guarded_by(x)) +#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) + #endif /* !_SYS_CDEFS_H_ */ diff --git a/devkitARM/arm-none-eabi/include/sys/config.h b/devkitARM/arm-none-eabi/include/sys/config.h index 33b03cd4e..0dc69499e 100644 --- a/devkitARM/arm-none-eabi/include/sys/config.h +++ b/devkitARM/arm-none-eabi/include/sys/config.h @@ -95,7 +95,6 @@ /* we want the reentrancy structure to be returned by a function */ #define __DYNAMIC_REENT__ #define HAVE_GETDATE -#define _HAVE_SYSTYPES #define _READ_WRITE_RETURN_TYPE _ssize_t #define __LARGE64_FILES 1 /* we use some glibc header files so turn on glibc large file feature */ @@ -188,6 +187,10 @@ #define __CUSTOM_FILE_IO__ #endif +#if defined(__or1k__) || defined(__or1knd__) +#define __DYNAMIC_REENT__ +#endif + /* This block should be kept in sync with GCC's limits.h. The point of having these definitions here is to not include limits.h, which would pollute the user namespace, while still using types of the @@ -231,9 +234,6 @@ #if defined(__CYGWIN__) #include -#if !defined (__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) -#define __USE_XOPEN2K 1 -#endif #endif #if defined(__rtems__) diff --git a/devkitARM/arm-none-eabi/include/sys/features.h b/devkitARM/arm-none-eabi/include/sys/features.h index 2370bb67b..a23158ca2 100644 --- a/devkitARM/arm-none-eabi/include/sys/features.h +++ b/devkitARM/arm-none-eabi/include/sys/features.h @@ -1,7 +1,7 @@ /* * Written by Joel Sherrill . * - * COPYRIGHT (c) 1989-2000. + * COPYRIGHT (c) 1989-2014. * * On-Line Applications Research Corporation (OAR). * @@ -15,7 +15,7 @@ * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. * - * $Id: features.h,v 1.31 2014/09/17 22:20:16 jjohnstn Exp $ + * $Id$ */ #ifndef _SYS_FEATURES_H @@ -25,11 +25,7 @@ extern "C" { #endif -/* Macros to determine that newlib is being used. Put in this header to - * be similar to where glibc stores its version of these macros. - */ -#define __NEWLIB__ 2 -#define __NEWLIB_MINOR__ 1 +#include <_newlib_version.h> /* Macro to test version of GCC. Returns 0 for non-GCC or too old GCC. */ #ifndef __GNUC_PREREQ @@ -43,6 +39,281 @@ extern "C" { /* Version with trailing underscores for BSD compatibility. */ #define __GNUC_PREREQ__(ma, mi) __GNUC_PREREQ(ma, mi) + +/* + * Feature test macros control which symbols are exposed by the system + * headers. Any of these must be defined before including any headers. + * + * __STRICT_ANSI__ (defined by gcc -ansi, -std=c90, -std=c99, or -std=c11) + * ISO C + * + * _POSIX_SOURCE (deprecated by _POSIX_C_SOURCE=1) + * _POSIX_C_SOURCE >= 1 + * POSIX.1-1990 + * + * _POSIX_C_SOURCE >= 2 + * POSIX.2-1992 + * + * _POSIX_C_SOURCE >= 199309L + * POSIX.1b-1993 Real-time extensions + * + * _POSIX_C_SOURCE >= 199506L + * POSIX.1c-1995 Threads extensions + * + * _POSIX_C_SOURCE >= 200112L + * POSIX.1-2001 and C99 + * + * _POSIX_C_SOURCE >= 200809L + * POSIX.1-2008 + * + * _XOPEN_SOURCE + * POSIX.1-1990 and XPG4 + * + * _XOPEN_SOURCE_EXTENDED + * SUSv1 (POSIX.2-1992 plus XPG4v2) + * + * _XOPEN_SOURCE >= 500 + * SUSv2 (POSIX.1c-1995 plus XSI) + * + * _XOPEN_SOURCE >= 600 + * SUSv3 (POSIX.1-2001 plus XSI) and C99 + * + * _XOPEN_SOURCE >= 700 + * SUSv4 (POSIX.1-2008 plus XSI) + * + * _ISOC99_SOURCE or gcc -std=c99 or g++ + * ISO C99 + * + * _ISOC11_SOURCE or gcc -std=c11 or g++ -std=c++11 + * ISO C11 + * + * _ATFILE_SOURCE (implied by _POSIX_C_SOURCE >= 200809L) + * "at" functions + * + * _LARGEFILE_SOURCE (deprecated by _XOPEN_SOURCE >= 500) + * fseeko, ftello + * + * _GNU_SOURCE + * All of the above plus GNU extensions + * + * _BSD_SOURCE (deprecated by _DEFAULT_SOURCE) + * _SVID_SOURCE (deprecated by _DEFAULT_SOURCE) + * _DEFAULT_SOURCE (or none of the above) + * POSIX-1.2008 with BSD and SVr4 extensions + */ + +#ifdef _GNU_SOURCE +#undef _ATFILE_SOURCE +#define _ATFILE_SOURCE 1 +#undef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE 1 +#undef _ISOC99_SOURCE +#define _ISOC99_SOURCE 1 +#undef _ISOC11_SOURCE +#define _ISOC11_SOURCE 1 +#undef _POSIX_SOURCE +#define _POSIX_SOURCE 1 +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809L +#undef _XOPEN_SOURCE +#define _XOPEN_SOURCE 700 +#undef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED 1 +#endif /* _GNU_SOURCE */ + +#if defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || \ + (!defined(__STRICT_ANSI__) && !defined(_ANSI_SOURCE) && \ + !defined(_ISOC99_SOURCE) && !defined(_POSIX_SOURCE) && \ + !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) +#undef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE 1 +#endif + +#if defined(_DEFAULT_SOURCE) +#undef _POSIX_SOURCE +#define _POSIX_SOURCE 1 +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809L +#endif + +#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) && \ + ((!defined(__STRICT_ANSI__) && !defined(_ANSI_SOURCE)) || \ + (_XOPEN_SOURCE - 0) >= 500) +#define _POSIX_SOURCE 1 +#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 700 +#define _POSIX_C_SOURCE 200809L +#elif (_XOPEN_SOURCE - 0) >= 600 +#define _POSIX_C_SOURCE 200112L +#elif (_XOPEN_SOURCE - 0) >= 500 +#define _POSIX_C_SOURCE 199506L +#elif (_XOPEN_SOURCE - 0) < 500 +#define _POSIX_C_SOURCE 2 +#endif +#endif + +#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809 +#undef _ATFILE_SOURCE +#define _ATFILE_SOURCE 1 +#endif + +/* + * The following private macros are used throughout the headers to control + * which symbols should be exposed. They are for internal use only, as + * indicated by the leading double underscore, and must never be used outside + * of these headers. + * + * __POSIX_VISIBLE + * any version of POSIX.1; enabled by default, or with _POSIX_SOURCE, + * any value of _POSIX_C_SOURCE, or _XOPEN_SOURCE >= 500. + * + * __POSIX_VISIBLE >= 2 + * POSIX.2-1992; enabled by default, with _POSIX_C_SOURCE >= 2, + * or _XOPEN_SOURCE >= 500. + * + * __POSIX_VISIBLE >= 199309 + * POSIX.1b-1993; enabled by default, with _POSIX_C_SOURCE >= 199309L, + * or _XOPEN_SOURCE >= 500. + * + * __POSIX_VISIBLE >= 199506 + * POSIX.1c-1995; enabled by default, with _POSIX_C_SOURCE >= 199506L, + * or _XOPEN_SOURCE >= 500. + * + * __POSIX_VISIBLE >= 200112 + * POSIX.1-2001; enabled by default, with _POSIX_C_SOURCE >= 200112L, + * or _XOPEN_SOURCE >= 600. + * + * __POSIX_VISIBLE >= 200809 + * POSIX.1-2008; enabled by default, with _POSIX_C_SOURCE >= 200809L, + * or _XOPEN_SOURCE >= 700. + * + * __XSI_VISIBLE + * XPG4 XSI extensions; enabled with any version of _XOPEN_SOURCE. + * + * __XSI_VISIBLE >= 4 + * SUSv1 XSI extensions; enabled with both _XOPEN_SOURCE and + * _XOPEN_SOURCE_EXTENDED together. + * + * __XSI_VISIBLE >= 500 + * SUSv2 XSI extensions; enabled with _XOPEN_SOURCE >= 500. + * + * __XSI_VISIBLE >= 600 + * SUSv3 XSI extensions; enabled with _XOPEN_SOURCE >= 600. + * + * __XSI_VISIBLE >= 700 + * SUSv4 XSI extensions; enabled with _XOPEN_SOURCE >= 700. + * + * __ISO_C_VISIBLE >= 1999 + * ISO C99; enabled with gcc -std=c99 or newer (on by default since GCC 5), + * any version of C++, or with _ISOC99_SOURCE, _POSIX_C_SOURCE >= 200112L, + * or _XOPEN_SOURCE >= 600. + * + * __ISO_C_VISIBLE >= 2011 + * ISO C11; enabled with gcc -std=c11 or newer (on by default since GCC 5), + * g++ -std=c++11 or newer (on by default since GCC 6), or with + * _ISOC11_SOURCE. + * + * __ATFILE_VISIBLE + * "at" functions; enabled by default, with _ATFILE_SOURCE, + * _POSIX_C_SOURCE >= 200809L, or _XOPEN_SOURCE >= 700. + * + * __LARGEFILE_VISIBLE + * fseeko, ftello; enabled with _LARGEFILE_SOURCE or _XOPEN_SOURCE >= 500. + * + * __BSD_VISIBLE + * BSD extensions; enabled by default, or with _BSD_SOURCE. + * + * __SVID_VISIBLE + * SVr4 extensions; enabled by default, or with _SVID_SOURCE. + * + * __MISC_VISIBLE + * Extensions found in both BSD and SVr4 (shorthand for + * (__BSD_VISIBLE || __SVID_VISIBLE)), or newlib-specific + * extensions; enabled by default. + * + * __GNU_VISIBLE + * GNU extensions; enabled with _GNU_SOURCE. + * + * In all cases above, "enabled by default" means either by defining + * _DEFAULT_SOURCE, or by not defining any of the public feature test macros. + * Defining _GNU_SOURCE makes all of the above avaliable. + */ + +#ifdef _ATFILE_SOURCE +#define __ATFILE_VISIBLE 1 +#else +#define __ATFILE_VISIBLE 0 +#endif + +#ifdef _DEFAULT_SOURCE +#define __BSD_VISIBLE 1 +#else +#define __BSD_VISIBLE 0 +#endif + +#ifdef _GNU_SOURCE +#define __GNU_VISIBLE 1 +#else +#define __GNU_VISIBLE 0 +#endif + +#if defined(_ISOC11_SOURCE) || \ + (__STDC_VERSION__ - 0) >= 201112L || (__cplusplus - 0) >= 201103L +#define __ISO_C_VISIBLE 2011 +#elif defined(_ISOC99_SOURCE) || (_POSIX_C_SOURCE - 0) >= 200112L || \ + (__STDC_VERSION__ - 0) >= 199901L || defined(__cplusplus) +#define __ISO_C_VISIBLE 1999 +#else +#define __ISO_C_VISIBLE 1990 +#endif + +#if defined(_LARGEFILE_SOURCE) || (_XOPEN_SOURCE - 0) >= 500 +#define __LARGEFILE_VISIBLE 1 +#else +#define __LARGEFILE_VISIBLE 0 +#endif + +#ifdef _DEFAULT_SOURCE +#define __MISC_VISIBLE 1 +#else +#define __MISC_VISIBLE 0 +#endif + +#if (_POSIX_C_SOURCE - 0) >= 200809L +#define __POSIX_VISIBLE 200809 +#elif (_POSIX_C_SOURCE - 0) >= 200112L +#define __POSIX_VISIBLE 200112 +#elif (_POSIX_C_SOURCE - 0) >= 199506L +#define __POSIX_VISIBLE 199506 +#elif (_POSIX_C_SOURCE - 0) >= 199309L +#define __POSIX_VISIBLE 199309 +#elif (_POSIX_C_SOURCE - 0) >= 2 || defined(_XOPEN_SOURCE) +#define __POSIX_VISIBLE 199209 +#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) +#define __POSIX_VISIBLE 199009 +#else +#define __POSIX_VISIBLE 0 +#endif + +#ifdef _DEFAULT_SOURCE +#define __SVID_VISIBLE 1 +#else +#define __SVID_VISIBLE 0 +#endif + +#if (_XOPEN_SOURCE - 0) >= 700 +#define __XSI_VISIBLE 700 +#elif (_XOPEN_SOURCE - 0) >= 600 +#define __XSI_VISIBLE 600 +#elif (_XOPEN_SOURCE - 0) >= 500 +#define __XSI_VISIBLE 500 +#elif defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED) +#define __XSI_VISIBLE 4 +#elif defined(_XOPEN_SOURCE) +#define __XSI_VISIBLE 1 +#else +#define __XSI_VISIBLE 0 +#endif + /* RTEMS adheres to POSIX -- 1003.1b with some features from annexes. */ #ifdef __rtems__ @@ -57,6 +328,7 @@ extern "C" { #define _POSIX_MEMORY_PROTECTION 1 #define _POSIX_MESSAGE_PASSING 1 #define _POSIX_MONOTONIC_CLOCK 200112L +#define _POSIX_CLOCK_SELECTION 200112L #define _POSIX_PRIORITIZED_IO 1 #define _POSIX_PRIORITY_SCHEDULING 1 #define _POSIX_REALTIME_SIGNALS 1 @@ -94,6 +366,9 @@ extern "C" { /* UNIX98 added some new pthread mutex attributes */ #define _UNIX98_THREAD_MUTEX_ATTRIBUTES 1 +/* POSIX 1003.26-2003 defined device control method */ +#define _POSIX_26_VERSION 200312L + #endif /* XMK loosely adheres to POSIX -- 1003.1 */ @@ -111,62 +386,82 @@ extern "C" { #ifdef __CYGWIN__ -#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L +#if __POSIX_VISIBLE >= 200809 +#define _POSIX_VERSION 200809L +#define _POSIX2_VERSION 200809L +#elif __POSIX_VISIBLE >= 200112 #define _POSIX_VERSION 200112L #define _POSIX2_VERSION 200112L -#define _XOPEN_VERSION 600 +#elif __POSIX_VISIBLE >= 199506 +#define _POSIX_VERSION 199506L +#define _POSIX2_VERSION 199506L +#elif __POSIX_VISIBLE >= 199309 +#define _POSIX_VERSION 199309L +#define _POSIX2_VERSION 199209L +#elif __POSIX_VISIBLE >= 199209 +#define _POSIX_VERSION 199009L +#define _POSIX2_VERSION 199209L +#elif __POSIX_VISIBLE +#define _POSIX_VERSION 199009L +#endif +#if __XSI_VISIBLE >= 4 +#define _XOPEN_VERSION __XSI_VISIBLE +#endif -#define _POSIX_ADVISORY_INFO 200112L +#define _POSIX_ADVISORY_INFO 200809L /* #define _POSIX_ASYNCHRONOUS_IO -1 */ -/* #define _POSIX_BARRIERS -1 */ +#define _POSIX_BARRIERS 200809L #define _POSIX_CHOWN_RESTRICTED 1 -#define _POSIX_CLOCK_SELECTION 200112L -#define _POSIX_CPUTIME 200112L -#define _POSIX_FSYNC 200112L -#define _POSIX_IPV6 200112L +#define _POSIX_CLOCK_SELECTION 200809L +#define _POSIX_CPUTIME 200809L +#define _POSIX_FSYNC 200809L +#define _POSIX_IPV6 200809L #define _POSIX_JOB_CONTROL 1 -#define _POSIX_MAPPED_FILES 200112L +#define _POSIX_MAPPED_FILES 200809L /* #define _POSIX_MEMLOCK -1 */ -#define _POSIX_MEMLOCK_RANGE 200112L -#define _POSIX_MEMORY_PROTECTION 200112L -#define _POSIX_MESSAGE_PASSING 200112L -#define _POSIX_MONOTONIC_CLOCK 200112L +#define _POSIX_MEMLOCK_RANGE 200809L +#define _POSIX_MEMORY_PROTECTION 200809L +#define _POSIX_MESSAGE_PASSING 200809L +#define _POSIX_MONOTONIC_CLOCK 200809L #define _POSIX_NO_TRUNC 1 /* #define _POSIX_PRIORITIZED_IO -1 */ -#define _POSIX_PRIORITY_SCHEDULING 200112L -#define _POSIX_RAW_SOCKETS 200112L -#define _POSIX_READER_WRITER_LOCKS 200112L -#define _POSIX_REALTIME_SIGNALS 200112L +#define _POSIX_PRIORITY_SCHEDULING 200809L +#define _POSIX_RAW_SOCKETS 200809L +#define _POSIX_READER_WRITER_LOCKS 200809L +#define _POSIX_REALTIME_SIGNALS 200809L #define _POSIX_REGEXP 1 #define _POSIX_SAVED_IDS 1 -#define _POSIX_SEMAPHORES 200112L -#define _POSIX_SHARED_MEMORY_OBJECTS 200112L +#define _POSIX_SEMAPHORES 200809L +#define _POSIX_SHARED_MEMORY_OBJECTS 200809L #define _POSIX_SHELL 1 -/* #define _POSIX_SPAWN -1 */ -#define _POSIX_SPIN_LOCKS 200112L +#define _POSIX_SPAWN 200809L +#define _POSIX_SPIN_LOCKS 200809L /* #define _POSIX_SPORADIC_SERVER -1 */ -#define _POSIX_SYNCHRONIZED_IO 200112L -#define _POSIX_THREAD_ATTR_STACKADDR 200112L -#define _POSIX_THREAD_ATTR_STACKSIZE 200112L -#define _POSIX_THREAD_CPUTIME 200112L +#define _POSIX_SYNCHRONIZED_IO 200809L +#define _POSIX_THREAD_ATTR_STACKADDR 200809L +#define _POSIX_THREAD_ATTR_STACKSIZE 200809L +#define _POSIX_THREAD_CPUTIME 200809L /* #define _POSIX_THREAD_PRIO_INHERIT -1 */ /* #define _POSIX_THREAD_PRIO_PROTECT -1 */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L -#define _POSIX_THREAD_PROCESS_SHARED 200112L -#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L +#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L +#define _POSIX_THREAD_PROCESS_SHARED 200809L +#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L /* #define _POSIX_THREAD_SPORADIC_SERVER -1 */ -#define _POSIX_THREADS 200112L +#define _POSIX_THREADS 200809L /* #define _POSIX_TIMEOUTS -1 */ -#define _POSIX_TIMERS 1 +#define _POSIX_TIMERS 200809L /* #define _POSIX_TRACE -1 */ /* #define _POSIX_TRACE_EVENT_FILTER -1 */ /* #define _POSIX_TRACE_INHERIT -1 */ /* #define _POSIX_TRACE_LOG -1 */ /* #define _POSIX_TYPED_MEMORY_OBJECTS -1 */ #define _POSIX_VDISABLE '\0' -#define _POSIX2_C_BIND 200112L -#define _POSIX2_C_DEV 200112L -#define _POSIX2_CHAR_TERM 200112L + +#if __POSIX_VISIBLE >= 2 +#define _POSIX2_C_VERSION _POSIX2_VERSION +#define _POSIX2_C_BIND _POSIX2_VERSION +#define _POSIX2_C_DEV _POSIX2_VERSION +#define _POSIX2_CHAR_TERM _POSIX2_VERSION /* #define _POSIX2_FORT_DEV -1 */ /* #define _POSIX2_FORT_RUN -1 */ /* #define _POSIX2_LOCALEDEF -1 */ @@ -176,8 +471,10 @@ extern "C" { /* #define _POSIX2_PBS_LOCATE -1 */ /* #define _POSIX2_PBS_MESSAGE -1 */ /* #define _POSIX2_PBS_TRACK -1 */ -#define _POSIX2_SW_DEV 200112L -#define _POSIX2_UPE 200112L +#define _POSIX2_SW_DEV _POSIX2_VERSION +#define _POSIX2_UPE _POSIX2_VERSION +#endif /* __POSIX_VISIBLE >= 2 */ + #define _POSIX_V6_ILP32_OFF32 -1 #ifdef __LP64__ #define _POSIX_V6_ILP32_OFFBIG -1 @@ -188,10 +485,16 @@ extern "C" { #define _POSIX_V6_LP64_OFF64 -1 #define _POSIX_V6_LPBIG_OFFBIG -1 #endif +#define _POSIX_V7_ILP32_OFF32 _POSIX_V6_ILP32_OFF32 +#define _POSIX_V7_ILP32_OFFBIG _POSIX_V6_ILP32_OFFBIG +#define _POSIX_V7_LP64_OFF64 _POSIX_V6_LP64_OFF64 +#define _POSIX_V7_LPBIG_OFFBIG _POSIX_V6_LPBIG_OFFBIG #define _XBS5_ILP32_OFF32 _POSIX_V6_ILP32_OFF32 #define _XBS5_ILP32_OFFBIG _POSIX_V6_ILP32_OFFBIG #define _XBS5_LP64_OFF64 _POSIX_V6_LP64_OFF64 #define _XBS5_LPBIG_OFFBIG _POSIX_V6_LPBIG_OFFBIG + +#if __XSI_VISIBLE #define _XOPEN_CRYPT 1 #define _XOPEN_ENH_I18N 1 /* #define _XOPEN_LEGACY -1 */ @@ -200,8 +503,7 @@ extern "C" { #define _XOPEN_SHM 1 /* #define _XOPEN_STREAMS -1 */ /* #define _XOPEN_UNIX -1 */ - -#endif /* !__STRICT_ANSI__ || __cplusplus || __STDC_VERSION__ >= 199901L */ +#endif /* __XSI_VISIBLE */ /* The value corresponds to UNICODE version 4.0, which is the version supported by XP. Newlib supports 5.2 (2011) but so far Cygwin needs @@ -210,25 +512,6 @@ extern "C" { #endif /* __CYGWIN__ */ -/* Per the permission given in POSIX.1-2008 section 2.2.1, define - * _POSIX_C_SOURCE if _XOPEN_SOURCE is defined and _POSIX_C_SOURCE is not. - * (_XOPEN_SOURCE indicates that XSI extensions are desired by an application.) - * This permission is first granted in 2008, but use it for older ones, also. - * Allow for _XOPEN_SOURCE to be empty (from the earliest form of it, before it - * was required to have specific values). - */ -#if !defined(_POSIX_C_SOURCE) && defined(_XOPEN_SOURCE) - #if (_XOPEN_SOURCE - 0) == 700 /* POSIX.1-2008 */ - #define _POSIX_C_SOURCE 200809L - #elif (_XOPEN_SOURCE - 0) == 600 /* POSIX.1-2001 or 2004 */ - #define _POSIX_C_SOURCE 200112L - #elif (_XOPEN_SOURCE - 0) == 500 /* POSIX.1-1995 */ - #define _POSIX_C_SOURCE 199506L - #elif (_XOPEN_SOURCE - 0) < 500 /* really old */ - #define _POSIX_C_SOURCE 2 - #endif -#endif - #ifdef __cplusplus } #endif diff --git a/devkitARM/arm-none-eabi/include/sys/iosupport.h b/devkitARM/arm-none-eabi/include/sys/iosupport.h index 2b5fc6ea6..10a6a716d 100644 --- a/devkitARM/arm-none-eabi/include/sys/iosupport.h +++ b/devkitARM/arm-none-eabi/include/sys/iosupport.h @@ -35,11 +35,11 @@ typedef struct { const char *name; size_t structSize; int (*open_r)(struct _reent *r, void *fileStruct, const char *path, int flags, int mode); - int (*close_r)(struct _reent *r, int fd); - ssize_t (*write_r)(struct _reent *r, int fd, const char *ptr, size_t len); - ssize_t (*read_r)(struct _reent *r, int fd, char *ptr, size_t len); - off_t (*seek_r)(struct _reent *r, int fd, off_t pos, int dir); - int (*fstat_r)(struct _reent *r, int fd, struct stat *st); + int (*close_r)(struct _reent *r, void *fd); + ssize_t (*write_r)(struct _reent *r, void *fd, const char *ptr, size_t len); + ssize_t (*read_r)(struct _reent *r, void *fd, char *ptr, size_t len); + off_t (*seek_r)(struct _reent *r, void *fd, off_t pos, int dir); + int (*fstat_r)(struct _reent *r, void *fd, struct stat *st); int (*stat_r)(struct _reent *r, const char *file, struct stat *st); int (*link_r)(struct _reent *r, const char *existing, const char *newLink); int (*unlink_r)(struct _reent *r, const char *name); @@ -54,13 +54,13 @@ typedef struct { int (*dirnext_r)(struct _reent *r, DIR_ITER *dirState, char *filename, struct stat *filestat); int (*dirclose_r)(struct _reent *r, DIR_ITER *dirState); int (*statvfs_r)(struct _reent *r, const char *path, struct statvfs *buf); - int (*ftruncate_r)(struct _reent *r, int fd, off_t len); - int (*fsync_r)(struct _reent *r, int fd); + int (*ftruncate_r)(struct _reent *r, void *fd, off_t len); + int (*fsync_r)(struct _reent *r, void *fd); void *deviceData; int (*chmod_r)(struct _reent *r, const char *path, mode_t mode); - int (*fchmod_r)(struct _reent *r, int fd, mode_t mode); + int (*fchmod_r)(struct _reent *r, void *fd, mode_t mode); int (*rmdir_r)(struct _reent *r, const char *name); } devoptab_t; @@ -93,7 +93,7 @@ void setDefaultDevice( int device ); const devoptab_t* GetDeviceOpTab (const char *name); void __release_handle(int fd); -int __alloc_handle(size_t size); +int __alloc_handle(int device); __handle *__get_handle(int fd); #ifdef __cplusplus diff --git a/devkitARM/arm-none-eabi/include/sys/param.h b/devkitARM/arm-none-eabi/include/sys/param.h index 836f80fda..e8969b954 100644 --- a/devkitARM/arm-none-eabi/include/sys/param.h +++ b/devkitARM/arm-none-eabi/include/sys/param.h @@ -3,24 +3,25 @@ #ifndef _SYS_PARAM_H # define _SYS_PARAM_H +#include +#include + +#ifndef NBBY +# define NBBY 8 /* number of bits in a byte */ +#endif #ifndef HZ # define HZ (60) #endif #ifndef NOFILE -# define NOFILE (60) +# define NOFILE (60) #endif #ifndef PATHSIZE # define PATHSIZE (1024) #endif #define MAXPATHLEN PATHSIZE -#define BIG_ENDIAN 4321 -#define LITTLE_ENDIAN 1234 -#ifdef __ARMEB__ -#define BYTE_ORDER BIG_ENDIAN -#else -#define BYTE_ORDER LITTLE_ENDIAN -#endif +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif diff --git a/devkitARM/arm-none-eabi/include/sys/reent.h b/devkitARM/arm-none-eabi/include/sys/reent.h index ce5b3eda7..9d8be350d 100644 --- a/devkitARM/arm-none-eabi/include/sys/reent.h +++ b/devkitARM/arm-none-eabi/include/sys/reent.h @@ -37,6 +37,8 @@ typedef __uint32_t __ULong; struct _reent; +struct __locale_t; + /* * If _REENT_SMALL is defined, we make struct _reent as small as possible, * by having nearly everything possible allocated at first use. @@ -384,8 +386,8 @@ struct _reent int __sdidinit; /* 1 means stdio has been init'd */ - int _current_category; /* unused */ - _CONST char *_current_locale; /* unused */ + int _unspecified_locale_info; /* unused, reserved for locale stuff */ + struct __locale_t *_locale;/* per-thread locale */ struct _mprec *_mp; @@ -414,6 +416,8 @@ struct _reent __FILE *__sf; /* file descriptors */ struct _misc_reent *_misc; /* strtok, multibyte states */ char *_signal_buf; /* strsignal */ + + void *deviceData; }; extern const struct __sFILE_fake __sf_fake_stdin; @@ -429,7 +433,7 @@ extern const struct __sFILE_fake __sf_fake_stderr; _NULL, \ 0, \ 0, \ - "C", \ + _NULL, \ _NULL, \ _NULL, \ 0, \ @@ -446,12 +450,10 @@ extern const struct __sFILE_fake __sf_fake_stderr; _NULL \ } -#define _REENT_INIT_PTR(var) \ - { memset((var), 0, sizeof(*(var))); \ - (var)->_stdin = (__FILE *)&__sf_fake_stdin; \ +#define _REENT_INIT_PTR_ZEROED(var) \ + { (var)->_stdin = (__FILE *)&__sf_fake_stdin; \ (var)->_stdout = (__FILE *)&__sf_fake_stdout; \ (var)->_stderr = (__FILE *)&__sf_fake_stderr; \ - (var)->_current_locale = "C"; \ } /* Only built the assert() calls if we are built with debugging. */ @@ -578,8 +580,9 @@ struct _reent int _inc; /* used by tmpnam */ char _emergency[_REENT_EMERGENCY_SIZE]; - int _current_category; /* used by setlocale */ - _CONST char *_current_locale; + /* TODO */ + int _unspecified_locale_info; /* unused, reserved for locale stuff */ + struct __locale_t *_locale;/* per-thread locale */ int __sdidinit; /* 1 means stdio has been init'd */ @@ -644,6 +647,7 @@ struct _reent would be broken otherwise). */ struct _glue __sglue; /* root of glue chain */ __FILE __sf[3]; /* first three file descriptors */ + void *deviceData; }; #define _REENT_INIT(var) \ @@ -654,7 +658,7 @@ struct _reent 0, \ "", \ 0, \ - "C", \ + _NULL, \ 0, \ _NULL, \ _NULL, \ @@ -694,12 +698,10 @@ struct _reent {_NULL, 0, _NULL} \ } -#define _REENT_INIT_PTR(var) \ - { memset((var), 0, sizeof(*(var))); \ - (var)->_stdin = &(var)->__sf[0]; \ +#define _REENT_INIT_PTR_ZEROED(var) \ + { (var)->_stdin = &(var)->__sf[0]; \ (var)->_stdout = &(var)->__sf[1]; \ (var)->_stderr = &(var)->__sf[2]; \ - (var)->_current_locale = "C"; \ (var)->_new._reent._rand_next = 1; \ (var)->_new._reent._r48._seed[0] = _RAND48_SEED_0; \ (var)->_new._reent._r48._seed[1] = _RAND48_SEED_1; \ @@ -745,6 +747,11 @@ struct _reent #endif /* !_REENT_SMALL */ +#define _REENT_INIT_PTR(var) \ + { memset((var), 0, sizeof(*(var))); \ + _REENT_INIT_PTR_ZEROED(var); \ + } + /* This value is used in stdlib/misc.c. reent/reent.c has to know it as well to make sure the freelist is correctly free'd. Therefore we define it here, rather than in stdlib/misc.c, as before. */ diff --git a/devkitARM/arm-none-eabi/include/sys/sched.h b/devkitARM/arm-none-eabi/include/sys/sched.h index bed14bfc7..4adb6e2d6 100644 --- a/devkitARM/arm-none-eabi/include/sys/sched.h +++ b/devkitARM/arm-none-eabi/include/sys/sched.h @@ -14,13 +14,15 @@ * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. * - * $Id: sched.h,v 1.3 2010/04/01 18:33:37 jjohnstn Exp $ + * $Id$ */ #ifndef _SYS_SCHED_H_ #define _SYS_SCHED_H_ +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/devkitARM/arm-none-eabi/include/sys/select.h b/devkitARM/arm-none-eabi/include/sys/select.h new file mode 100644 index 000000000..f5dc58688 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/sys/select.h @@ -0,0 +1,87 @@ +/* select.h + Copyright 1998, 1999, 2000, 2001, 2005, 2009 Red Hat, Inc. + + Written by Geoffrey Noer + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +#ifndef _SYS_SELECT_H +#define _SYS_SELECT_H + +/* We don't define fd_set and friends if we are compiling POSIX + source, or if we have included (or may include as indicated + by __USE_W32_SOCKETS) the W32api winsock[2].h header which + defines Windows versions of them. Note that a program which + includes the W32api winsock[2].h header must know what it is doing; + it must not call the Cygwin select function. +*/ +# if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) + +#include +#include +#include +#include + +#if !defined(_SIGSET_T_DECLARED) +#define _SIGSET_T_DECLARED +typedef __sigset_t sigset_t; +#endif + +# define _SYS_TYPES_FD_SET +/* + * Select uses bit masks of file descriptors in longs. + * These macros manipulate such bit fields (the filesystem macros use chars). + * FD_SETSIZE may be defined by the user, but the default here + * should be >= NOFILE (param.h). + */ +# ifndef FD_SETSIZE +# define FD_SETSIZE 64 +# endif + +typedef unsigned long fd_mask; +# define NFDBITS (sizeof (fd_mask) * 8) /* bits per mask */ +# ifndef _howmany +# define _howmany(x,y) (((x)+((y)-1))/(y)) +# endif + +/* We use a macro for fd_set so that including Sockets.h afterwards + can work. */ +typedef struct _types_fd_set { + fd_mask fds_bits[_howmany(FD_SETSIZE, NFDBITS)]; +} _types_fd_set; + +#define fd_set _types_fd_set + +# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS))) +# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS))) +# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS))) +# define FD_ZERO(p) (__extension__ (void)({ \ + size_t __i; \ + char *__tmp = (char *)p; \ + for (__i = 0; __i < sizeof (*(p)); ++__i) \ + *__tmp++ = 0; \ +})) + +#if !defined (__INSIDE_CYGWIN_NET__) + +__BEGIN_DECLS + +int select __P ((int __n, fd_set *__readfds, fd_set *__writefds, + fd_set *__exceptfds, struct timeval *__timeout)); +#if __POSIX_VISIBLE >= 200112 +int pselect __P ((int __n, fd_set *__readfds, fd_set *__writefds, + fd_set *__exceptfds, const struct timespec *__timeout, + const sigset_t *__set)); +#endif + +__END_DECLS + +#endif /* !__INSIDE_CYGWIN_NET__ */ + +#endif /* !(_WINSOCK_H || _WINSOCKAPI_ || __USE_W32_SOCKETS) */ + +#endif /* sys/select.h */ diff --git a/devkitARM/arm-none-eabi/include/sys/signal.h b/devkitARM/arm-none-eabi/include/sys/signal.h index a29f525c1..8d1b53fce 100644 --- a/devkitARM/arm-none-eabi/include/sys/signal.h +++ b/devkitARM/arm-none-eabi/include/sys/signal.h @@ -7,14 +7,15 @@ extern "C" { #endif #include "_ansi.h" +#include #include #include +#include +#include -/* #ifndef __STRICT_ANSI__*/ - -/* Cygwin defines it's own sigset_t in include/cygwin/signal.h */ -#ifndef __CYGWIN__ -typedef unsigned long sigset_t; +#if !defined(_SIGSET_T_DECLARED) +#define _SIGSET_T_DECLARED +typedef __sigset_t sigset_t; #endif #if defined(__rtems__) @@ -74,7 +75,7 @@ typedef struct { #define SA_NOCLDSTOP 0x1 /* Do not generate SIGCHLD when children stop */ #define SA_SIGINFO 0x2 /* Invoke the signal catching function with */ /* three arguments instead of one. */ -#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 +#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 #define SA_ONSTACK 0x4 /* Signal delivery will be on a separate stack. */ #endif @@ -107,7 +108,22 @@ struct sigaction { #define sa_sigaction _signal_handlers._sigaction #endif -#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 +#elif defined(__CYGWIN__) +#include +#else +#define SA_NOCLDSTOP 1 /* only value supported now for sa_flags */ + +typedef void (*_sig_func_ptr)(int); + +struct sigaction +{ + _sig_func_ptr sa_handler; + sigset_t sa_mask; + int sa_flags; +}; +#endif /* defined(__rtems__) */ + +#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 /* * Minimum and default signal stack constants. Allow for target overrides * from . @@ -125,6 +141,8 @@ struct sigaction { #define SS_ONSTACK 0x1 #define SS_DISABLE 0x2 +#endif + /* * Structure used in sigaltstack call. */ @@ -133,36 +151,11 @@ typedef struct sigaltstack { int ss_flags; /* Flags. */ size_t ss_size; /* Stack size. */ } stack_t; -#endif - -#elif defined(__CYGWIN__) -#include -#else -#define SA_NOCLDSTOP 1 /* only value supported now for sa_flags */ - -typedef void (*_sig_func_ptr)(int); - -struct sigaction -{ - _sig_func_ptr sa_handler; - sigset_t sa_mask; - int sa_flags; -}; -#endif /* defined(__rtems__) */ #define SIG_SETMASK 0 /* set mask with sigprocmask() */ #define SIG_BLOCK 1 /* set of signals to block */ #define SIG_UNBLOCK 2 /* set of signals to, well, unblock */ -/* These depend upon the type of sigset_t, which right now - is always a long.. They're in the POSIX namespace, but - are not ANSI. */ -#define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0) -#define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0) -#define sigemptyset(what) (*(what) = 0, 0) -#define sigfillset(what) (*(what) = ~(0), 0) -#define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0) - int _EXFUN(sigprocmask, (int how, const sigset_t *set, sigset_t *oset)); #if defined(_POSIX_THREADS) @@ -170,20 +163,14 @@ int _EXFUN(pthread_sigmask, (int how, const sigset_t *set, sigset_t *oset)); #endif #if defined(__CYGWIN__) || defined(__rtems__) -#undef sigaddset -#undef sigdelset -#undef sigemptyset -#undef sigfillset -#undef sigismember - #ifdef _COMPILING_NEWLIB int _EXFUN(_kill, (pid_t, int)); #endif /* _COMPILING_NEWLIB */ #endif /* __CYGWIN__ || __rtems__ */ -#if defined(__CYGWIN__) || defined(__rtems__) || defined(__SPU__) + int _EXFUN(kill, (pid_t, int)); -#endif /* __CYGWIN__ || __rtems__ || __SPU__ */ -#if defined(__CYGWIN__) || defined(__rtems__) + +#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 int _EXFUN(killpg, (pid_t, int)); int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *)); int _EXFUN(sigaddset, (sigset_t *, const int)); @@ -195,18 +182,23 @@ int _EXFUN(sigpending, (sigset_t *)); int _EXFUN(sigsuspend, (const sigset_t *)); int _EXFUN(sigpause, (int)); -#ifdef __rtems__ -#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 +#if !defined(__CYGWIN__) && !defined(__rtems__) +/* These depend upon the type of sigset_t, which right now + is always a long.. They're in the POSIX namespace, but + are not ANSI. */ +#define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0) +#define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0) +#define sigemptyset(what) (*(what) = 0, 0) +#define sigfillset(what) (*(what) = ~(0), 0) +#define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0) +#endif /* !__CYGWIN__ && !__rtems__ */ +#endif /* __BSD_VISIBLE || __XSI_VISIBLE >= 4 */ + +#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 int _EXFUN(sigaltstack, (const stack_t *__restrict, stack_t *__restrict)); #endif -#endif #if defined(_POSIX_THREADS) -#ifdef __CYGWIN__ -# ifndef _CYGWIN_TYPES_H -# error You need the winsup sources or a cygwin installation to compile the cygwin version of newlib. -# endif -#endif int _EXFUN(pthread_kill, (pthread_t thread, int sig)); #endif @@ -226,10 +218,6 @@ int _EXFUN(sigqueue, (pid_t pid, int signo, const union sigval value)); #endif /* defined(_POSIX_REALTIME_SIGNALS) */ -#endif /* defined(__CYGWIN__) || defined(__rtems__) */ - -/* #endif __STRICT_ANSI__ */ - #if defined(___AM29K__) /* These all need to be defined for ANSI C, but I don't think they are meaningful. */ @@ -349,6 +337,12 @@ int _EXFUN(sigqueue, (pid_t pid, int signo, const union sigval value)); } #endif +#if defined(__CYGWIN__) +#if __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 +#include +#endif +#endif + #ifndef _SIGNAL_H_ /* Some applications take advantage of the fact that * and are equivalent in glibc. Allow for that here. */ diff --git a/devkitARM/arm-none-eabi/include/sys/stat.h b/devkitARM/arm-none-eabi/include/sys/stat.h index 11b9d8080..94a90c0dd 100644 --- a/devkitARM/arm-none-eabi/include/sys/stat.h +++ b/devkitARM/arm-none-eabi/include/sys/stat.h @@ -9,6 +9,7 @@ extern "C" { #include #include #include +#include /* dj's stat defines _STAT_H_ */ #ifndef _STAT_H_ @@ -52,8 +53,8 @@ struct stat long st_spare2; time_t st_ctime; long st_spare3; - long st_blksize; - long st_blocks; + blksize_t st_blksize; + blkcnt_t st_blocks; long st_spare4[2]; #endif #endif @@ -81,12 +82,12 @@ struct stat #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ #define S_ISVTX 0001000 /* save swapped text even after use */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define S_IREAD 0000400 /* read permission, owner */ #define S_IWRITE 0000200 /* write permission, owner */ #define S_IEXEC 0000100 /* execute/search permission, owner */ #define S_ENFMT 0002000 /* enforcement-mode locking */ -#endif /* !_POSIX_SOURCE */ +#endif /* !_BSD_VISIBLE */ #define S_IFMT _IFMT #define S_IFDIR _IFDIR @@ -123,7 +124,7 @@ struct stat #define S_IWOTH 0000002 /* write permission, other */ #define S_IXOTH 0000001/* execute/search permission, other */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) /* 0777 */ #define ALLPERMS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) /* 07777 */ #define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* 0666 */ @@ -156,19 +157,15 @@ int _EXFUN(lstat,( const char *__restrict __path, struct stat *__restrict __buf int _EXFUN(mknod,( const char *__path, mode_t __mode, dev_t __dev )); #endif -#if (__POSIX_VISIBLE >= 200809 || defined (__CYGWIN__)) && !defined(__INSIDE_CYGWIN__) +#if __ATFILE_VISIBLE && !defined(__INSIDE_CYGWIN__) int _EXFUN(fchmodat, (int, const char *, mode_t, int)); -#endif -#if (__BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined (__CYGWIN__)) && !defined(__INSIDE_CYGWIN__) int _EXFUN(fstatat, (int, const char *__restrict , struct stat *__restrict, int)); int _EXFUN(mkdirat, (int, const char *, mode_t)); int _EXFUN(mkfifoat, (int, const char *, mode_t)); -#endif -#if (__BSD_VISIBLE || __XSI_VISIBLE >= 700 || defined (__CYGWIN__)) && !defined(__INSIDE_CYGWIN__) int _EXFUN(mknodat, (int, const char *, mode_t, dev_t)); -#endif -#if (__BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined (__CYGWIN__)) && !defined(__INSIDE_CYGWIN__) int _EXFUN(utimensat, (int, const char *, const struct timespec *, int)); +#endif +#if __POSIX_VISIBLE >= 200809 && !defined(__INSIDE_CYGWIN__) int _EXFUN(futimens, (int, const struct timespec *)); #endif diff --git a/devkitARM/arm-none-eabi/include/sys/syslimits.h b/devkitARM/arm-none-eabi/include/sys/syslimits.h index 51d99ec95..ba9dbd667 100644 --- a/devkitARM/arm-none-eabi/include/sys/syslimits.h +++ b/devkitARM/arm-none-eabi/include/sys/syslimits.h @@ -44,7 +44,7 @@ #define LINK_MAX 32767 /* max file link count */ #define MAX_CANON 255 /* max bytes in term canon input line */ #define MAX_INPUT 255 /* max bytes in terminal input */ -#define NAME_MAX 768 /* max bytes in a file name */ +#define NAME_MAX 255 /* max bytes in a file name */ #define NGROUPS_MAX 16 /* max supplemental group id's */ #ifndef OPEN_MAX #define OPEN_MAX 64 /* max open files per process */ diff --git a/devkitARM/arm-none-eabi/include/sys/time.h b/devkitARM/arm-none-eabi/include/sys/time.h index be16497fc..5fdb6673b 100644 --- a/devkitARM/arm-none-eabi/include/sys/time.h +++ b/devkitARM/arm-none-eabi/include/sys/time.h @@ -2,90 +2,301 @@ Written by Geoffrey Noer Public domain; no rights reserved. */ +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)time.h 8.5 (Berkeley) 5/4/95 + * $FreeBSD$ + */ + #ifndef _SYS_TIME_H_ -#define _SYS_TIME_H_ +#define _SYS_TIME_H_ #include <_ansi.h> +#include +#include #include +#include -#ifdef __cplusplus -extern "C" { +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#include #endif -#ifndef _TIMEVAL_DEFINED -#define _TIMEVAL_DEFINED -struct timeval { - time_t tv_sec; - suseconds_t tv_usec; -}; - -/* BSD time macros used by RTEMS code */ -#if defined (__rtems__) || defined (__CYGWIN__) - -/* Convenience macros for operations on timevals. - NOTE: `timercmp' does not work for >= or <=. */ -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) -#define timercmp(a, b, CMP) \ - (((a)->tv_sec == (b)->tv_sec) ? \ - ((a)->tv_usec CMP (b)->tv_usec) : \ - ((a)->tv_sec CMP (b)->tv_sec)) -#define timeradd(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ - if ((result)->tv_usec >= 1000000) \ - { \ - ++(result)->tv_sec; \ - (result)->tv_usec -= 1000000; \ - } \ - } while (0) -#define timersub(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ - if ((result)->tv_usec < 0) { \ - --(result)->tv_sec; \ - (result)->tv_usec += 1000000; \ - } \ - } while (0) -#endif /* defined (__rtems__) || defined (__CYGWIN__) */ -#endif /* !_TIMEVAL_DEFINED */ - struct timezone { - int tz_minuteswest; - int tz_dsttime; + int tz_minuteswest; /* minutes west of Greenwich */ + int tz_dsttime; /* type of dst correction */ +}; +#define DST_NONE 0 /* not on dst */ +#define DST_USA 1 /* USA style dst */ +#define DST_AUST 2 /* Australian style dst */ +#define DST_WET 3 /* Western European dst */ +#define DST_MET 4 /* Middle European dst */ +#define DST_EET 5 /* Eastern European dst */ +#define DST_CAN 6 /* Canada */ + +#if __BSD_VISIBLE +struct bintime { + time_t sec; + uint64_t frac; }; -#ifdef __CYGWIN__ -#include -#endif /* __CYGWIN__ */ +static __inline void +bintime_addx(struct bintime *_bt, uint64_t _x) +{ + uint64_t _u; -#define ITIMER_REAL 0 -#define ITIMER_VIRTUAL 1 -#define ITIMER_PROF 2 + _u = _bt->frac; + _bt->frac += _x; + if (_u > _bt->frac) + _bt->sec++; +} -struct itimerval { - struct timeval it_interval; - struct timeval it_value; +static __inline void +bintime_add(struct bintime *_bt, const struct bintime *_bt2) +{ + uint64_t _u; + + _u = _bt->frac; + _bt->frac += _bt2->frac; + if (_u > _bt->frac) + _bt->sec++; + _bt->sec += _bt2->sec; +} + +static __inline void +bintime_sub(struct bintime *_bt, const struct bintime *_bt2) +{ + uint64_t _u; + + _u = _bt->frac; + _bt->frac -= _bt2->frac; + if (_u < _bt->frac) + _bt->sec--; + _bt->sec -= _bt2->sec; +} + +static __inline void +bintime_mul(struct bintime *_bt, u_int _x) +{ + uint64_t _p1, _p2; + + _p1 = (_bt->frac & 0xffffffffull) * _x; + _p2 = (_bt->frac >> 32) * _x + (_p1 >> 32); + _bt->sec *= _x; + _bt->sec += (_p2 >> 32); + _bt->frac = (_p2 << 32) | (_p1 & 0xffffffffull); +} + +static __inline void +bintime_shift(struct bintime *_bt, int _exp) +{ + + if (_exp > 0) { + _bt->sec <<= _exp; + _bt->sec |= _bt->frac >> (64 - _exp); + _bt->frac <<= _exp; + } else if (_exp < 0) { + _bt->frac >>= -_exp; + _bt->frac |= (uint64_t)_bt->sec << (64 + _exp); + _bt->sec >>= -_exp; + } +} + +#define bintime_clear(a) ((a)->sec = (a)->frac = 0) +#define bintime_isset(a) ((a)->sec || (a)->frac) +#define bintime_cmp(a, b, cmp) \ + (((a)->sec == (b)->sec) ? \ + ((a)->frac cmp (b)->frac) : \ + ((a)->sec cmp (b)->sec)) + +#define SBT_1S ((sbintime_t)1 << 32) +#define SBT_1M (SBT_1S * 60) +#define SBT_1MS (SBT_1S / 1000) +#define SBT_1US (SBT_1S / 1000000) +#define SBT_1NS (SBT_1S / 1000000000) +#define SBT_MAX 0x7fffffffffffffffLL + +static __inline int +sbintime_getsec(sbintime_t _sbt) +{ + + return (_sbt >> 32); +} + +static __inline sbintime_t +bttosbt(const struct bintime _bt) +{ + + return (((sbintime_t)_bt.sec << 32) + (_bt.frac >> 32)); +} + +static __inline struct bintime +sbttobt(sbintime_t _sbt) +{ + struct bintime _bt; + + _bt.sec = _sbt >> 32; + _bt.frac = _sbt << 32; + return (_bt); +} + +/*- + * Background information: + * + * When converting between timestamps on parallel timescales of differing + * resolutions it is historical and scientific practice to round down rather + * than doing 4/5 rounding. + * + * The date changes at midnight, not at noon. + * + * Even at 15:59:59.999999999 it's not four'o'clock. + * + * time_second ticks after N.999999999 not after N.4999999999 + */ + +static __inline void +bintime2timespec(const struct bintime *_bt, struct timespec *_ts) +{ + + _ts->tv_sec = _bt->sec; + _ts->tv_nsec = ((uint64_t)1000000000 * + (uint32_t)(_bt->frac >> 32)) >> 32; +} + +static __inline void +timespec2bintime(const struct timespec *_ts, struct bintime *_bt) +{ + + _bt->sec = _ts->tv_sec; + /* 18446744073 = int(2^64 / 1000000000) */ + _bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL; +} + +static __inline void +bintime2timeval(const struct bintime *_bt, struct timeval *_tv) +{ + + _tv->tv_sec = _bt->sec; + _tv->tv_usec = ((uint64_t)1000000 * (uint32_t)(_bt->frac >> 32)) >> 32; +} + +static __inline void +timeval2bintime(const struct timeval *_tv, struct bintime *_bt) +{ + + _bt->sec = _tv->tv_sec; + /* 18446744073709 = int(2^64 / 1000000) */ + _bt->frac = _tv->tv_usec * (uint64_t)18446744073709LL; +} + +static __inline struct timespec +sbttots(sbintime_t _sbt) +{ + struct timespec _ts; + + _ts.tv_sec = _sbt >> 32; + _ts.tv_nsec = ((uint64_t)1000000000 * (uint32_t)_sbt) >> 32; + return (_ts); +} + +static __inline sbintime_t +tstosbt(struct timespec _ts) +{ + + return (((sbintime_t)_ts.tv_sec << 32) + + (_ts.tv_nsec * (((uint64_t)1 << 63) / 500000000) >> 32)); +} + +static __inline struct timeval +sbttotv(sbintime_t _sbt) +{ + struct timeval _tv; + + _tv.tv_sec = _sbt >> 32; + _tv.tv_usec = ((uint64_t)1000000 * (uint32_t)_sbt) >> 32; + return (_tv); +} + +static __inline sbintime_t +tvtosbt(struct timeval _tv) +{ + + return (((sbintime_t)_tv.tv_sec << 32) + + (_tv.tv_usec * (((uint64_t)1 << 63) / 500000) >> 32)); +} +#endif /* __BSD_VISIBLE */ + +/* + * Names of the interval timers, and structure + * defining a timer setting. + */ +#define ITIMER_REAL 0 +#define ITIMER_VIRTUAL 1 +#define ITIMER_PROF 2 + +struct itimerval { + struct timeval it_interval; /* timer interval */ + struct timeval it_value; /* current value */ }; +#ifndef _KERNEL +#include + +__BEGIN_DECLS +int _EXFUN(utimes, (const char *__path, const struct timeval *__tvp)); + +#if __BSD_VISIBLE +int _EXFUN(adjtime, (const struct timeval *, struct timeval *)); +int _EXFUN(futimes, (int, const struct timeval *)); +int _EXFUN(lutimes, (const char *, const struct timeval *)); +int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *)); +#endif + +#if __MISC_VISIBLE || __XSI_VISIBLE +int _EXFUN(getitimer, (int __which, struct itimerval *__value)); +int _EXFUN(setitimer, (int __which, const struct itimerval *__restrict __value, + struct itimerval *__restrict __ovalue)); +#endif + +int _EXFUN(gettimeofday, (struct timeval *__restrict __p, + void *__restrict __tz)); + +#if __GNU_VISIBLE +int _EXFUN(futimesat, (int, const char *, const struct timeval [2])); +#endif + #ifdef _COMPILING_NEWLIB int _EXFUN(_gettimeofday, (struct timeval *__p, void *__tz)); #endif -int _EXFUN(gettimeofday, (struct timeval *__restrict __p, - void *__restrict __tz)); -#if __BSD_VISIBLE -int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *)); -int _EXFUN(adjtime, (const struct timeval *, struct timeval *)); -#endif -int _EXFUN(utimes, (const char *__path, const struct timeval *__tvp)); -int _EXFUN(getitimer, (int __which, struct itimerval *__value)); -int _EXFUN(setitimer, (int __which, const struct itimerval *__restrict __value, - struct itimerval *__restrict __ovalue)); +__END_DECLS -#ifdef __cplusplus -} -#endif -#endif /* _SYS_TIME_H_ */ +#endif /* !_KERNEL */ +#include + +#endif /* !_SYS_TIME_H_ */ diff --git a/devkitARM/arm-none-eabi/include/sys/timeb.h b/devkitARM/arm-none-eabi/include/sys/timeb.h index 0a2c3de8b..793b48143 100644 --- a/devkitARM/arm-none-eabi/include/sys/timeb.h +++ b/devkitARM/arm-none-eabi/include/sys/timeb.h @@ -15,11 +15,12 @@ extern "C" { #define _SYS_TIMEB_H #include <_ansi.h> -#include +#include -#ifndef __time_t_defined -typedef _TIME_T_ time_t; -#define __time_t_defined +#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED) +typedef _TIME_T_ time_t; +#define __time_t_defined +#define _TIME_T_DECLARED #endif struct timeb diff --git a/devkitARM/arm-none-eabi/include/sys/times.h b/devkitARM/arm-none-eabi/include/sys/times.h index 927812cb8..b1f1dc699 100644 --- a/devkitARM/arm-none-eabi/include/sys/times.h +++ b/devkitARM/arm-none-eabi/include/sys/times.h @@ -5,11 +5,12 @@ extern "C" { #define _SYS_TIMES_H #include <_ansi.h> -#include +#include -#ifndef __clock_t_defined -typedef _CLOCK_T_ clock_t; -#define __clock_t_defined +#if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED) +typedef _CLOCK_T_ clock_t; +#define __clock_t_defined +#define _CLOCK_T_DECLARED #endif /* Get Process Times, P1003.1b-1993, p. 92 */ diff --git a/devkitARM/arm-none-eabi/include/sys/timespec.h b/devkitARM/arm-none-eabi/include/sys/timespec.h new file mode 100644 index 000000000..2505cef89 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/sys/timespec.h @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 1982, 1986, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)time.h 8.5 (Berkeley) 5/4/95 + * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp + * $FreeBSD$ + */ + +#ifndef _SYS_TIMESPEC_H_ +#define _SYS_TIMESPEC_H_ + +#include +#include + +#if __BSD_VISIBLE +#define TIMEVAL_TO_TIMESPEC(tv, ts) \ + do { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ + } while (0) +#define TIMESPEC_TO_TIMEVAL(tv, ts) \ + do { \ + (tv)->tv_sec = (ts)->tv_sec; \ + (tv)->tv_usec = (ts)->tv_nsec / 1000; \ + } while (0) + +#endif /* __BSD_VISIBLE */ + +/* + * Structure defined by POSIX.1b to be like a itimerval, but with + * timespecs. Used in the timer_*() system calls. + */ +struct itimerspec { + struct timespec it_interval; + struct timespec it_value; +}; + +#endif /* _SYS_TIMESPEC_H_ */ diff --git a/devkitARM/arm-none-eabi/include/sys/tree.h b/devkitARM/arm-none-eabi/include/sys/tree.h new file mode 100644 index 000000000..f4167c4e4 --- /dev/null +++ b/devkitARM/arm-none-eabi/include/sys/tree.h @@ -0,0 +1,801 @@ +/* $NetBSD: tree.h,v 1.8 2004/03/28 19:38:30 provos Exp $ */ +/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */ +/* $FreeBSD$ */ + +/*- + * Copyright 2002 Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _SYS_TREE_H_ +#define _SYS_TREE_H_ + +#include + +/* + * This file defines data structures for different types of trees: + * splay trees and red-black trees. + * + * A splay tree is a self-organizing data structure. Every operation + * on the tree causes a splay to happen. The splay moves the requested + * node to the root of the tree and partly rebalances it. + * + * This has the benefit that request locality causes faster lookups as + * the requested nodes move to the top of the tree. On the other hand, + * every lookup causes memory writes. + * + * The Balance Theorem bounds the total access time for m operations + * and n inserts on an initially empty tree as O((m + n)lg n). The + * amortized cost for a sequence of m accesses to a splay tree is O(lg n); + * + * A red-black tree is a binary search tree with the node color as an + * extra attribute. It fulfills a set of conditions: + * - every search path from the root to a leaf consists of the + * same number of black nodes, + * - each red node (except for the root) has a black parent, + * - each leaf node is black. + * + * Every operation on a red-black tree is bounded as O(lg n). + * The maximum height of a red-black tree is 2lg (n+1). + */ + +#define SPLAY_HEAD(name, type) \ +struct name { \ + struct type *sph_root; /* root of the tree */ \ +} + +#define SPLAY_INITIALIZER(root) \ + { NULL } + +#define SPLAY_INIT(root) do { \ + (root)->sph_root = NULL; \ +} while (/*CONSTCOND*/ 0) + +#define SPLAY_ENTRY(type) \ +struct { \ + struct type *spe_left; /* left element */ \ + struct type *spe_right; /* right element */ \ +} + +#define SPLAY_LEFT(elm, field) (elm)->field.spe_left +#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right +#define SPLAY_ROOT(head) (head)->sph_root +#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) + +/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ +#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ +} while (/*CONSTCOND*/ 0) + +#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ +} while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKLEFT(head, tmp, field) do { \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ +} while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKRIGHT(head, tmp, field) do { \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ +} while (/*CONSTCOND*/ 0) + +#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \ + SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ +} while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ + +#define SPLAY_PROTOTYPE(name, type, field, cmp) \ +void name##_SPLAY(struct name *, struct type *); \ +void name##_SPLAY_MINMAX(struct name *, int); \ +struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ +struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ + \ +/* Finds the node with the same key as elm */ \ +static __inline struct type * \ +name##_SPLAY_FIND(struct name *head, struct type *elm) \ +{ \ + if (SPLAY_EMPTY(head)) \ + return(NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) \ + return (head->sph_root); \ + return (NULL); \ +} \ + \ +static __inline struct type * \ +name##_SPLAY_NEXT(struct name *head, struct type *elm) \ +{ \ + name##_SPLAY(head, elm); \ + if (SPLAY_RIGHT(elm, field) != NULL) { \ + elm = SPLAY_RIGHT(elm, field); \ + while (SPLAY_LEFT(elm, field) != NULL) { \ + elm = SPLAY_LEFT(elm, field); \ + } \ + } else \ + elm = NULL; \ + return (elm); \ +} \ + \ +static __inline struct type * \ +name##_SPLAY_MIN_MAX(struct name *head, int val) \ +{ \ + name##_SPLAY_MINMAX(head, val); \ + return (SPLAY_ROOT(head)); \ +} + +/* Main splay operation. + * Moves node close to the key of elm to top + */ +#define SPLAY_GENERATE(name, type, field, cmp) \ +struct type * \ +name##_SPLAY_INSERT(struct name *head, struct type *elm) \ +{ \ + if (SPLAY_EMPTY(head)) { \ + SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ + } else { \ + int __comp; \ + name##_SPLAY(head, elm); \ + __comp = (cmp)(elm, (head)->sph_root); \ + if(__comp < 0) { \ + SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\ + SPLAY_RIGHT(elm, field) = (head)->sph_root; \ + SPLAY_LEFT((head)->sph_root, field) = NULL; \ + } else if (__comp > 0) { \ + SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\ + SPLAY_LEFT(elm, field) = (head)->sph_root; \ + SPLAY_RIGHT((head)->sph_root, field) = NULL; \ + } else \ + return ((head)->sph_root); \ + } \ + (head)->sph_root = (elm); \ + return (NULL); \ +} \ + \ +struct type * \ +name##_SPLAY_REMOVE(struct name *head, struct type *elm) \ +{ \ + struct type *__tmp; \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) { \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\ + } else { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\ + name##_SPLAY(head, elm); \ + SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ + } \ + return (elm); \ + } \ + return (NULL); \ +} \ + \ +void \ +name##_SPLAY(struct name *head, struct type *elm) \ +{ \ + struct type __node, *__left, *__right, *__tmp; \ + int __comp; \ +\ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ + __left = __right = &__node; \ +\ + while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) < 0){ \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) > 0){ \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ +} \ + \ +/* Splay with either the minimum or the maximum element \ + * Used to find minimum or maximum element in tree. \ + */ \ +void name##_SPLAY_MINMAX(struct name *head, int __comp) \ +{ \ + struct type __node, *__left, *__right, *__tmp; \ +\ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ + __left = __right = &__node; \ +\ + while (1) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp < 0){ \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ +} + +#define SPLAY_NEGINF -1 +#define SPLAY_INF 1 + +#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) +#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) +#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) +#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) +#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ + : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) +#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ + : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) + +#define SPLAY_FOREACH(x, name, head) \ + for ((x) = SPLAY_MIN(name, head); \ + (x) != NULL; \ + (x) = SPLAY_NEXT(name, head, x)) + +/* Macros that define a red-black tree */ +#define RB_HEAD(name, type) \ +struct name { \ + struct type *rbh_root; /* root of the tree */ \ +} + +#define RB_INITIALIZER(root) \ + { NULL } + +#define RB_INIT(root) do { \ + (root)->rbh_root = NULL; \ +} while (/*CONSTCOND*/ 0) + +#define RB_BLACK 0 +#define RB_RED 1 +#define RB_ENTRY(type) \ +struct { \ + struct type *rbe_left; /* left element */ \ + struct type *rbe_right; /* right element */ \ + struct type *rbe_parent; /* parent element */ \ + int rbe_color; /* node color */ \ +} + +#define RB_LEFT(elm, field) (elm)->field.rbe_left +#define RB_RIGHT(elm, field) (elm)->field.rbe_right +#define RB_PARENT(elm, field) (elm)->field.rbe_parent +#define RB_COLOR(elm, field) (elm)->field.rbe_color +#define RB_ROOT(head) (head)->rbh_root +#define RB_EMPTY(head) (RB_ROOT(head) == NULL) + +#define RB_SET(elm, parent, field) do { \ + RB_PARENT(elm, field) = parent; \ + RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ + RB_COLOR(elm, field) = RB_RED; \ +} while (/*CONSTCOND*/ 0) + +#define RB_SET_BLACKRED(black, red, field) do { \ + RB_COLOR(black, field) = RB_BLACK; \ + RB_COLOR(red, field) = RB_RED; \ +} while (/*CONSTCOND*/ 0) + +#ifndef RB_AUGMENT +#define RB_AUGMENT(x) do {} while (0) +#endif + +#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ + (tmp) = RB_RIGHT(elm, field); \ + if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \ + RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_LEFT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ +} while (/*CONSTCOND*/ 0) + +#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ + (tmp) = RB_LEFT(elm, field); \ + if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \ + RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_RIGHT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ +} while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ +#define RB_PROTOTYPE(name, type, field, cmp) \ + RB_PROTOTYPE_INTERNAL(name, type, field, cmp,) +#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ + RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static) +#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ + RB_PROTOTYPE_INSERT_COLOR(name, type, attr); \ + RB_PROTOTYPE_REMOVE_COLOR(name, type, attr); \ + RB_PROTOTYPE_INSERT(name, type, attr); \ + RB_PROTOTYPE_REMOVE(name, type, attr); \ + RB_PROTOTYPE_FIND(name, type, attr); \ + RB_PROTOTYPE_NFIND(name, type, attr); \ + RB_PROTOTYPE_NEXT(name, type, attr); \ + RB_PROTOTYPE_PREV(name, type, attr); \ + RB_PROTOTYPE_MINMAX(name, type, attr); +#define RB_PROTOTYPE_INSERT_COLOR(name, type, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *, struct type *) +#define RB_PROTOTYPE_REMOVE_COLOR(name, type, attr) \ + attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *) +#define RB_PROTOTYPE_REMOVE(name, type, attr) \ + attr struct type *name##_RB_REMOVE(struct name *, struct type *) +#define RB_PROTOTYPE_INSERT(name, type, attr) \ + attr struct type *name##_RB_INSERT(struct name *, struct type *) +#define RB_PROTOTYPE_FIND(name, type, attr) \ + attr struct type *name##_RB_FIND(struct name *, struct type *) +#define RB_PROTOTYPE_NFIND(name, type, attr) \ + attr struct type *name##_RB_NFIND(struct name *, struct type *) +#define RB_PROTOTYPE_NEXT(name, type, attr) \ + attr struct type *name##_RB_NEXT(struct type *) +#define RB_PROTOTYPE_PREV(name, type, attr) \ + attr struct type *name##_RB_PREV(struct type *) +#define RB_PROTOTYPE_MINMAX(name, type, attr) \ + attr struct type *name##_RB_MINMAX(struct name *, int) + +/* Main rb operation. + * Moves node close to the key of elm to top + */ +#define RB_GENERATE(name, type, field, cmp) \ + RB_GENERATE_INTERNAL(name, type, field, cmp,) +#define RB_GENERATE_STATIC(name, type, field, cmp) \ + RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static) +#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ + RB_GENERATE_INSERT_COLOR(name, type, field, attr) \ + RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ + RB_GENERATE_INSERT(name, type, field, cmp, attr) \ + RB_GENERATE_REMOVE(name, type, field, attr) \ + RB_GENERATE_FIND(name, type, field, cmp, attr) \ + RB_GENERATE_NFIND(name, type, field, cmp, attr) \ + RB_GENERATE_NEXT(name, type, field, attr) \ + RB_GENERATE_PREV(name, type, field, attr) \ + RB_GENERATE_MINMAX(name, type, field, attr) + +#define RB_GENERATE_INSERT_COLOR(name, type, field, attr) \ +attr void \ +name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ +{ \ + struct type *parent, *gparent, *tmp; \ + while ((parent = RB_PARENT(elm, field)) != NULL && \ + RB_COLOR(parent, field) == RB_RED) { \ + gparent = RB_PARENT(parent, field); \ + if (parent == RB_LEFT(gparent, field)) { \ + tmp = RB_RIGHT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field);\ + elm = gparent; \ + continue; \ + } \ + if (RB_RIGHT(parent, field) == elm) { \ + RB_ROTATE_LEFT(head, parent, tmp, field);\ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_RIGHT(head, gparent, tmp, field); \ + } else { \ + tmp = RB_LEFT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field);\ + elm = gparent; \ + continue; \ + } \ + if (RB_LEFT(parent, field) == elm) { \ + RB_ROTATE_RIGHT(head, parent, tmp, field);\ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_LEFT(head, gparent, tmp, field); \ + } \ + } \ + RB_COLOR(head->rbh_root, field) = RB_BLACK; \ +} + +#define RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ +attr void \ +name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ +{ \ + struct type *tmp; \ + while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ + elm != RB_ROOT(head)) { \ + if (RB_LEFT(parent, field) == elm) { \ + tmp = RB_RIGHT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_LEFT(head, parent, tmp, field);\ + tmp = RB_RIGHT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\ + struct type *oleft; \ + if ((oleft = RB_LEFT(tmp, field)) \ + != NULL) \ + RB_COLOR(oleft, field) = RB_BLACK;\ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_RIGHT(head, tmp, oleft, field);\ + tmp = RB_RIGHT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_RIGHT(tmp, field)) \ + RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\ + RB_ROTATE_LEFT(head, parent, tmp, field);\ + elm = RB_ROOT(head); \ + break; \ + } \ + } else { \ + tmp = RB_LEFT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_RIGHT(head, parent, tmp, field);\ + tmp = RB_LEFT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\ + struct type *oright; \ + if ((oright = RB_RIGHT(tmp, field)) \ + != NULL) \ + RB_COLOR(oright, field) = RB_BLACK;\ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_LEFT(head, tmp, oright, field);\ + tmp = RB_LEFT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_LEFT(tmp, field)) \ + RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\ + RB_ROTATE_RIGHT(head, parent, tmp, field);\ + elm = RB_ROOT(head); \ + break; \ + } \ + } \ + } \ + if (elm) \ + RB_COLOR(elm, field) = RB_BLACK; \ +} + +#define RB_GENERATE_REMOVE(name, type, field, attr) \ +attr struct type * \ +name##_RB_REMOVE(struct name *head, struct type *elm) \ +{ \ + struct type *child, *parent, *old = elm; \ + int color; \ + if (RB_LEFT(elm, field) == NULL) \ + child = RB_RIGHT(elm, field); \ + else if (RB_RIGHT(elm, field) == NULL) \ + child = RB_LEFT(elm, field); \ + else { \ + struct type *left; \ + elm = RB_RIGHT(elm, field); \ + while ((left = RB_LEFT(elm, field)) != NULL) \ + elm = left; \ + child = RB_RIGHT(elm, field); \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + if (RB_PARENT(elm, field) == old) \ + parent = elm; \ + (elm)->field = (old)->field; \ + if (RB_PARENT(old, field)) { \ + if (RB_LEFT(RB_PARENT(old, field), field) == old)\ + RB_LEFT(RB_PARENT(old, field), field) = elm;\ + else \ + RB_RIGHT(RB_PARENT(old, field), field) = elm;\ + RB_AUGMENT(RB_PARENT(old, field)); \ + } else \ + RB_ROOT(head) = elm; \ + RB_PARENT(RB_LEFT(old, field), field) = elm; \ + if (RB_RIGHT(old, field)) \ + RB_PARENT(RB_RIGHT(old, field), field) = elm; \ + if (parent) { \ + left = parent; \ + do { \ + RB_AUGMENT(left); \ + } while ((left = RB_PARENT(left, field)) != NULL); \ + } \ + goto color; \ + } \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ +color: \ + if (color == RB_BLACK) \ + name##_RB_REMOVE_COLOR(head, parent, child); \ + return (old); \ +} \ + +#define RB_GENERATE_INSERT(name, type, field, cmp, attr) \ +/* Inserts a node into the RB tree */ \ +attr struct type * \ +name##_RB_INSERT(struct name *head, struct type *elm) \ +{ \ + struct type *tmp; \ + struct type *parent = NULL; \ + int comp = 0; \ + tmp = RB_ROOT(head); \ + while (tmp) { \ + parent = tmp; \ + comp = (cmp)(elm, parent); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + RB_SET(elm, parent, field); \ + if (parent != NULL) { \ + if (comp < 0) \ + RB_LEFT(parent, field) = elm; \ + else \ + RB_RIGHT(parent, field) = elm; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = elm; \ + name##_RB_INSERT_COLOR(head, elm); \ + return (NULL); \ +} + +#define RB_GENERATE_FIND(name, type, field, cmp, attr) \ +/* Finds the node with the same key as elm */ \ +attr struct type * \ +name##_RB_FIND(struct name *head, struct type *elm) \ +{ \ + struct type *tmp = RB_ROOT(head); \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (NULL); \ +} + +#define RB_GENERATE_NFIND(name, type, field, cmp, attr) \ +/* Finds the first node greater than or equal to the search key */ \ +attr struct type * \ +name##_RB_NFIND(struct name *head, struct type *elm) \ +{ \ + struct type *tmp = RB_ROOT(head); \ + struct type *res = NULL; \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) { \ + res = tmp; \ + tmp = RB_LEFT(tmp, field); \ + } \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (res); \ +} + +#define RB_GENERATE_NEXT(name, type, field, attr) \ +/* ARGSUSED */ \ +attr struct type * \ +name##_RB_NEXT(struct type *elm) \ +{ \ + if (RB_RIGHT(elm, field)) { \ + elm = RB_RIGHT(elm, field); \ + while (RB_LEFT(elm, field)) \ + elm = RB_LEFT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ +} + +#define RB_GENERATE_PREV(name, type, field, attr) \ +/* ARGSUSED */ \ +attr struct type * \ +name##_RB_PREV(struct type *elm) \ +{ \ + if (RB_LEFT(elm, field)) { \ + elm = RB_LEFT(elm, field); \ + while (RB_RIGHT(elm, field)) \ + elm = RB_RIGHT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field)))\ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ +} + +#define RB_GENERATE_MINMAX(name, type, field, attr) \ +attr struct type * \ +name##_RB_MINMAX(struct name *head, int val) \ +{ \ + struct type *tmp = RB_ROOT(head); \ + struct type *parent = NULL; \ + while (tmp) { \ + parent = tmp; \ + if (val < 0) \ + tmp = RB_LEFT(tmp, field); \ + else \ + tmp = RB_RIGHT(tmp, field); \ + } \ + return (parent); \ +} + +#define RB_NEGINF -1 +#define RB_INF 1 + +#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) +#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) +#define RB_FIND(name, x, y) name##_RB_FIND(x, y) +#define RB_NFIND(name, x, y) name##_RB_NFIND(x, y) +#define RB_NEXT(name, x, y) name##_RB_NEXT(y) +#define RB_PREV(name, x, y) name##_RB_PREV(y) +#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) +#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) + +#define RB_FOREACH(x, name, head) \ + for ((x) = RB_MIN(name, head); \ + (x) != NULL; \ + (x) = name##_RB_NEXT(x)) + +#define RB_FOREACH_FROM(x, name, y) \ + for ((x) = (y); \ + ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_SAFE(x, name, head, y) \ + for ((x) = RB_MIN(name, head); \ + ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_REVERSE(x, name, head) \ + for ((x) = RB_MAX(name, head); \ + (x) != NULL; \ + (x) = name##_RB_PREV(x)) + +#define RB_FOREACH_REVERSE_FROM(x, name, y) \ + for ((x) = (y); \ + ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ + for ((x) = RB_MAX(name, head); \ + ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \ + (x) = (y)) + +#endif /* _SYS_TREE_H_ */ diff --git a/devkitARM/arm-none-eabi/include/sys/types.h b/devkitARM/arm-none-eabi/include/sys/types.h index 79f73acbf..65ff520c8 100644 --- a/devkitARM/arm-none-eabi/include/sys/types.h +++ b/devkitARM/arm-none-eabi/include/sys/types.h @@ -18,20 +18,12 @@ #ifndef _SYS_TYPES_H #include <_ansi.h> - -#ifndef __INTTYPES_DEFINED__ -#define __INTTYPES_DEFINED__ - +#include #include -#if defined(__rtems__) || defined(__XMK__) -/* - * The following section is RTEMS specific and is needed to more - * closely match the types defined in the BSD sys/types.h. - * This is needed to let the RTEMS/BSD TCP/IP stack compile. - */ - -/* deprecated */ +/* BSD types permitted by POSIX and always exposed as in Glibc. Only provided + for backward compatibility with BSD code. The uintN_t standard types should + be preferred in new code. */ #if ___int8_t_defined typedef __uint8_t u_int8_t; #endif @@ -41,52 +33,54 @@ typedef __uint16_t u_int16_t; #if ___int32_t_defined typedef __uint32_t u_int32_t; #endif - #if ___int64_t_defined typedef __uint64_t u_int64_t; +#endif +typedef int register_t; +#define __BIT_TYPES_DEFINED__ 1 + +#if defined(__rtems__) || defined(__XMK__) +/* + * The following section is RTEMS specific and is needed to more + * closely match the types defined in the BSD sys/types.h. + * This is needed to let the RTEMS/BSD TCP/IP stack compile. + */ /* deprecated */ +#if ___int64_t_defined typedef __uint64_t u_quad_t; typedef __int64_t quad_t; typedef quad_t * qaddr_t; #endif -#endif - -#endif /* ! __INTTYPES_DEFINED */ +#endif /* __rtems__ || __XMK__ */ #ifndef __need_inttypes #define _SYS_TYPES_H +/* must be before for __size_t considerations */ +#include #include +#include -#ifdef __i386__ -#if defined (GO32) || defined (__MSDOS__) -#define __MS_types__ -#endif -#endif - -# include -# include - -/* To ensure the stat struct's layout doesn't change when sizeof(int), etc. - changes, we assume sizeof short and long never change and have all types - used to define struct stat use them and not int where possible. - Where not possible, _ST_INTxx are used. It would be preferable to not have - such assumptions, but until the extra fluff is necessary, it's avoided. - No 64 bit targets use stat yet. What to do about them is postponed - until necessary. */ -#ifdef __GNUC__ -#define _ST_INT32 __attribute__ ((__mode__ (__SI__))) -#else -#define _ST_INT32 -#endif - -# ifndef _POSIX_SOURCE - +#if __BSD_VISIBLE +#include +#include # define physadr physadr_t # define quad quad_t +#ifndef _IN_ADDR_T_DECLARED +typedef __uint32_t in_addr_t; /* base type for internet address */ +#define _IN_ADDR_T_DECLARED +#endif + +#ifndef _IN_PORT_T_DECLARED +typedef __uint16_t in_port_t; +#define _IN_PORT_T_DECLARED +#endif +#endif /* __BSD_VISIBLE */ + +#if __MISC_VISIBLE #ifndef _BSDTYPES_DEFINED /* also defined in mingw/gmon.h and in w32api/winsock[2].h */ #ifndef __u_char_defined @@ -107,36 +101,35 @@ typedef unsigned long u_long; #endif #define _BSDTYPES_DEFINED #endif +#endif /*__BSD_VISIBLE || __CYGWIN__ */ +#if __MISC_VISIBLE typedef unsigned short ushort; /* System V compatibility */ typedef unsigned int uint; /* System V compatibility */ typedef unsigned long ulong; /* System V compatibility */ -# endif /*!_POSIX_SOURCE */ - -#ifndef __clock_t_defined -typedef _CLOCK_T_ clock_t; -#define __clock_t_defined #endif -#ifndef __time_t_defined -typedef _TIME_T_ time_t; -#define __time_t_defined +#ifndef _BLKCNT_T_DECLARED +typedef __blkcnt_t blkcnt_t; +#define _BLKCNT_T_DECLARED #endif -#ifndef __timespec_defined -#define __timespec_defined -/* Time Value Specification Structures, P1003.1b-1993, p. 261 */ - -struct timespec { - time_t tv_sec; /* Seconds */ - long tv_nsec; /* Nanoseconds */ -}; +#ifndef _BLKSIZE_T_DECLARED +typedef __blksize_t blksize_t; +#define _BLKSIZE_T_DECLARED #endif -struct itimerspec { - struct timespec it_interval; /* Timer period */ - struct timespec it_value; /* Timer expiration */ -}; +#if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED) +typedef _CLOCK_T_ clock_t; +#define __clock_t_defined +#define _CLOCK_T_DECLARED +#endif + +#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED) +typedef _TIME_T_ time_t; +#define __time_t_defined +#define _TIME_T_DECLARED +#endif #ifndef __daddr_t_defined typedef long daddr_t; @@ -147,31 +140,27 @@ typedef char * caddr_t; #define __caddr_t_defined #endif -#ifndef __CYGWIN__ -#if defined(__MS_types__) || defined(__rtems__) || \ - defined(__sparc__) || defined(__SPU__) -typedef unsigned long ino_t; -#else -typedef unsigned int ino_t; +#ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */ +typedef __fsblkcnt_t fsblkcnt_t; +typedef __fsfilcnt_t fsfilcnt_t; +#define _FSBLKCNT_T_DECLARED #endif -#endif /*__CYGWIN__*/ -#ifdef __MS_types__ +#ifndef _ID_T_DECLARED +typedef __id_t id_t; /* can hold a uid_t or pid_t */ +#define _ID_T_DECLARED +#endif + +#ifndef _INO_T_DECLARED +typedef __ino_t ino_t; /* inode number */ +#define _INO_T_DECLARED +#endif + +#if defined(__i386__) && (defined(GO32) || defined(__MSDOS__)) +typedef char * addr_t; typedef unsigned long vm_offset_t; typedef unsigned long vm_size_t; - -#define __BIT_TYPES_DEFINED__ - -typedef signed char int8_t; -typedef unsigned char u_int8_t; -typedef short int16_t; -typedef unsigned short u_int16_t; -typedef int int32_t; -typedef unsigned int u_int32_t; -typedef long long int64_t; -typedef unsigned long long u_int64_t; -typedef int32_t register_t; -#endif /* __MS_types__ */ +#endif /* __i386__ && (GO32 || __MSDOS__) */ /* * All these should be machine specific - right now they are all broken. @@ -180,342 +169,75 @@ typedef int32_t register_t; * how the file was compiled (e.g. -mint16 vs -mint32, etc.). */ -#ifndef __CYGWIN__ /* which defines these types in it's own types.h. */ -typedef _off_t off_t; -typedef __dev_t dev_t; -typedef __uid_t uid_t; -typedef __gid_t gid_t; +#ifndef _OFF_T_DECLARED +typedef __off_t off_t; /* file offset */ +#define _OFF_T_DECLARED +#endif +#ifndef _DEV_T_DECLARED +typedef __dev_t dev_t; /* device number or struct cdev */ +#define _DEV_T_DECLARED +#endif +#ifndef _UID_T_DECLARED +typedef __uid_t uid_t; /* user id */ +#define _UID_T_DECLARED +#endif +#ifndef _GID_T_DECLARED +typedef __gid_t gid_t; /* group id */ +#define _GID_T_DECLARED #endif -#if defined(__XMK__) -typedef signed char pid_t; -#else -typedef int pid_t; +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; /* process id */ +#define _PID_T_DECLARED #endif -#if defined(__rtems__) -typedef _mode_t mode_t; +#ifndef _KEY_T_DECLARED +typedef __key_t key_t; /* IPC key */ +#define _KEY_T_DECLARED #endif -#ifndef __CYGWIN__ -typedef long key_t; -#endif +#ifndef _SSIZE_T_DECLARED typedef _ssize_t ssize_t; - -#if !defined(__CYGWIN__) && !defined(__rtems__) -#ifdef __MS_types__ -typedef char * addr_t; -typedef int mode_t; -#else -#if defined (__sparc__) && !defined (__sparc_v9__) -#ifdef __svr4__ -typedef unsigned long mode_t; -#else -typedef unsigned short mode_t; -#endif -#else -typedef unsigned int mode_t _ST_INT32; -#endif -#endif /* ! __MS_types__ */ -#endif /*__CYGWIN__*/ - -typedef unsigned short nlink_t; - -/* We don't define fd_set and friends if we are compiling POSIX - source, or if we have included (or may include as indicated - by __USE_W32_SOCKETS) the W32api winsock[2].h header which - defines Windows versions of them. Note that a program which - includes the W32api winsock[2].h header must know what it is doing; - it must not call the cygwin32 select function. -*/ -# if !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) -# define _SYS_TYPES_FD_SET -# define NBBY 8 /* number of bits in a byte */ -/* - * Select uses bit masks of file descriptors in longs. - * These macros manipulate such bit fields (the filesystem macros use chars). - * FD_SETSIZE may be defined by the user, but the default here - * should be >= NOFILE (param.h). - */ -# ifndef FD_SETSIZE -# define FD_SETSIZE 64 -# endif - -typedef long fd_mask; -# define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */ -# ifndef howmany -# define howmany(x,y) (((x)+((y)-1))/(y)) -# endif - -/* We use a macro for fd_set so that including Sockets.h afterwards - can work. */ -typedef struct _types_fd_set { - fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; -} _types_fd_set; - -#define fd_set _types_fd_set - -# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS))) -# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS))) -# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS))) -# define FD_ZERO(p) (__extension__ (void)({ \ - size_t __i; \ - char *__tmp = (char *)p; \ - for (__i = 0; __i < sizeof (*(p)); ++__i) \ - *__tmp++ = 0; \ -})) - -# endif /* !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) */ - -#undef __MS_types__ -#undef _ST_INT32 - - -#ifndef __clockid_t_defined -typedef _CLOCKID_T_ clockid_t; -#define __clockid_t_defined +#define _SSIZE_T_DECLARED #endif -#ifndef __timer_t_defined -typedef _TIMER_T_ timer_t; -#define __timer_t_defined +#ifndef _MODE_T_DECLARED +typedef __mode_t mode_t; /* permissions */ +#define _MODE_T_DECLARED #endif -typedef unsigned long useconds_t; -typedef long suseconds_t; +#ifndef _NLINK_T_DECLARED +typedef __nlink_t nlink_t; /* link count */ +#define _NLINK_T_DECLARED +#endif -typedef __uint32_t fsblkcnt_t; -typedef __uint32_t fsfilcnt_t; +#if !defined(__clockid_t_defined) && !defined(_CLOCKID_T_DECLARED) +typedef __clockid_t clockid_t; +#define __clockid_t_defined +#define _CLOCKID_T_DECLARED +#endif + +#if !defined(__timer_t_defined) && !defined(_TIMER_T_DECLARED) +typedef __timer_t timer_t; +#define __timer_t_defined +#define _TIMER_T_DECLARED +#endif + +#ifndef _USECONDS_T_DECLARED +typedef __useconds_t useconds_t; /* microseconds (unsigned) */ +#define _USECONDS_T_DECLARED +#endif + +#ifndef _SUSECONDS_T_DECLARED +typedef __suseconds_t suseconds_t; +#define _SUSECONDS_T_DECLARED +#endif + +typedef __int64_t sbintime_t; #include - - -/* Cygwin will probably never have full posix compliance due to little things - * like an inability to set the stackaddress. Cygwin is also using void * - * pointers rather than structs to ensure maximum binary compatability with - * previous releases. - * This means that we don't use the types defined here, but rather in - * - */ -#if defined(_POSIX_THREADS) && !defined(__CYGWIN__) - -#include - -/* - * 2.5 Primitive System Data Types, P1003.1c/D10, p. 19. - */ - -#if defined(__XMK__) -typedef unsigned int pthread_t; /* identify a thread */ -#else -typedef __uint32_t pthread_t; /* identify a thread */ -#endif - -/* P1003.1c/D10, p. 118-119 */ -#define PTHREAD_SCOPE_PROCESS 0 -#define PTHREAD_SCOPE_SYSTEM 1 - -/* P1003.1c/D10, p. 111 */ -#define PTHREAD_INHERIT_SCHED 1 /* scheduling policy and associated */ - /* attributes are inherited from */ - /* the calling thread. */ -#define PTHREAD_EXPLICIT_SCHED 2 /* set from provided attribute object */ - -/* P1003.1c/D10, p. 141 */ -#define PTHREAD_CREATE_DETACHED 0 -#define PTHREAD_CREATE_JOINABLE 1 - -#if defined(__rtems__) - #include -#endif - -#if defined(__XMK__) -typedef struct pthread_attr_s { - int contentionscope; - struct sched_param schedparam; - int detachstate; - void *stackaddr; - size_t stacksize; -} pthread_attr_t; - -#define PTHREAD_STACK_MIN 200 - -#else /* !defined(__XMK__) */ -typedef struct { - int is_initialized; - void *stackaddr; - int stacksize; - int contentionscope; - int inheritsched; - int schedpolicy; - struct sched_param schedparam; -#if defined(__rtems__) - size_t guardsize; -#endif - - /* P1003.4b/D8, p. 54 adds cputime_clock_allowed attribute. */ -#if defined(_POSIX_THREAD_CPUTIME) - int cputime_clock_allowed; /* see time.h */ -#endif - int detachstate; -#if defined(__rtems__) - size_t affinitysetsize; - cpu_set_t *affinityset; - cpu_set_t affinitysetpreallocated; -#endif -} pthread_attr_t; - -#endif /* !defined(__XMK__) */ - -#if defined(_POSIX_THREAD_PROCESS_SHARED) -/* NOTE: P1003.1c/D10, p. 81 defines following values for process_shared. */ - -#define PTHREAD_PROCESS_PRIVATE 0 /* visible within only the creating process */ -#define PTHREAD_PROCESS_SHARED 1 /* visible too all processes with access to */ - /* the memory where the resource is */ - /* located */ -#endif - -#if defined(_POSIX_THREAD_PRIO_PROTECT) -/* Mutexes */ - -/* Values for blocking protocol. */ - -#define PTHREAD_PRIO_NONE 0 -#define PTHREAD_PRIO_INHERIT 1 -#define PTHREAD_PRIO_PROTECT 2 -#endif - -#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) - -/* Values for mutex type */ - -/* The following defines are part of the X/Open System Interface (XSI). */ - -/* - * This type of mutex does not detect deadlock. A thread attempting to - * relock this mutex without first unlocking it shall deadlock. Attempting - * to unlock a mutex locked by a different thread results in undefined - * behavior. Attempting to unlock an unlocked mutex results in undefined - * behavior. - */ -#define PTHREAD_MUTEX_NORMAL 0 - -/* - * A thread attempting to relock this mutex without first unlocking - * it shall succeed in locking the mutex. The relocking deadlock which - * can occur with mutexes of type PTHREAD_MUTEX_NORMAL cannot occur with - * this type of mutex. Multiple locks of this mutex shall require the - * same number of unlocks to release the mutex before another thread can - * acquire the mutex. A thread attempting to unlock a mutex which another - * thread has locked shall return with an error. A thread attempting to - * unlock an unlocked mutex shall return with an error. - */ -#define PTHREAD_MUTEX_RECURSIVE 1 - -/* - * This type of mutex provides error checking. A thread attempting - * to relock this mutex without first unlocking it shall return with an - * error. A thread attempting to unlock a mutex which another thread has - * locked shall return with an error. A thread attempting to unlock an - * unlocked mutex shall return with an error. - */ -#define PTHREAD_MUTEX_ERRORCHECK 2 - -/* - * Attempting to recursively lock a mutex of this type results - * in undefined behavior. Attempting to unlock a mutex of this type - * which was not locked by the calling thread results in undefined - * behavior. Attempting to unlock a mutex of this type which is not locked - * results in undefined behavior. An implementation may map this mutex to - * one of the other mutex types. - */ -#define PTHREAD_MUTEX_DEFAULT 3 - -#endif /* !defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) */ - -#if defined(__XMK__) -typedef unsigned int pthread_mutex_t; /* identify a mutex */ - -typedef struct { - int type; -} pthread_mutexattr_t; - -#else /* !defined(__XMK__) */ -typedef __uint32_t pthread_mutex_t; /* identify a mutex */ - -typedef struct { - int is_initialized; -#if defined(_POSIX_THREAD_PROCESS_SHARED) - int process_shared; /* allow mutex to be shared amongst processes */ -#endif -#if defined(_POSIX_THREAD_PRIO_PROTECT) - int prio_ceiling; - int protocol; -#endif -#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) - int type; -#endif - int recursive; -} pthread_mutexattr_t; -#endif /* !defined(__XMK__) */ - -/* Condition Variables */ - -typedef __uint32_t pthread_cond_t; /* identify a condition variable */ - -typedef struct { - int is_initialized; -#if defined(_POSIX_THREAD_PROCESS_SHARED) - int process_shared; /* allow this to be shared amongst processes */ -#endif -} pthread_condattr_t; /* a condition attribute object */ - -/* Keys */ - -typedef __uint32_t pthread_key_t; /* thread-specific data keys */ - -typedef struct { - int is_initialized; /* is this structure initialized? */ - int init_executed; /* has the initialization routine been run? */ -} pthread_once_t; /* dynamic package initialization */ -#else -#if defined (__CYGWIN__) -#include -#endif -#endif /* defined(_POSIX_THREADS) */ - -/* POSIX Barrier Types */ - -#if defined(_POSIX_BARRIERS) -typedef __uint32_t pthread_barrier_t; /* POSIX Barrier Object */ -typedef struct { - int is_initialized; /* is this structure initialized? */ -#if defined(_POSIX_THREAD_PROCESS_SHARED) - int process_shared; /* allow this to be shared amongst processes */ -#endif -} pthread_barrierattr_t; -#endif /* defined(_POSIX_BARRIERS) */ - -/* POSIX Spin Lock Types */ - -#if !defined (__CYGWIN__) -#if defined(_POSIX_SPIN_LOCKS) -typedef __uint32_t pthread_spinlock_t; /* POSIX Spin Lock Object */ -#endif /* defined(_POSIX_SPIN_LOCKS) */ - -/* POSIX Reader/Writer Lock Types */ - -#if defined(_POSIX_READER_WRITER_LOCKS) -typedef __uint32_t pthread_rwlock_t; /* POSIX RWLock Object */ -typedef struct { - int is_initialized; /* is this structure initialized? */ -#if defined(_POSIX_THREAD_PROCESS_SHARED) - int process_shared; /* allow this to be shared amongst processes */ -#endif -} pthread_rwlockattr_t; -#endif /* defined(_POSIX_READER_WRITER_LOCKS) */ -#endif /* __CYGWIN__ */ +#include +#include #endif /* !__need_inttypes */ diff --git a/devkitARM/arm-none-eabi/include/sys/unistd.h b/devkitARM/arm-none-eabi/include/sys/unistd.h index d7cfa249a..af9d12c9e 100644 --- a/devkitARM/arm-none-eabi/include/sys/unistd.h +++ b/devkitARM/arm-none-eabi/include/sys/unistd.h @@ -24,109 +24,135 @@ int _EXFUN(chmod, (const char *__path, mode_t __mode )); #if !defined(__INSIDE_CYGWIN__) int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group )); #endif -#if defined(__CYGWIN__) || defined(__rtems__) +#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) int _EXFUN(chroot, (const char *__path )); #endif int _EXFUN(close, (int __fildes )); -#if defined(__CYGWIN__) +#if __POSIX_VISIBLE >= 199209 size_t _EXFUN(confstr, (int __name, char *__buf, size_t __len)); #endif +#if __XSI_VISIBLE +char * _EXFUN(crypt, (const char *__key, const char *__salt)); +#endif +#if __XSI_VISIBLE && __XSI_VISIBLE < 700 char * _EXFUN(ctermid, (char *__s )); +#endif +#if __XSI_VISIBLE && __XSI_VISIBLE < 600 char * _EXFUN(cuserid, (char *__s )); -#if defined(__CYGWIN__) +#endif +#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) int _EXFUN(daemon, (int nochdir, int noclose)); #endif int _EXFUN(dup, (int __fildes )); int _EXFUN(dup2, (int __fildes, int __fildes2 )); -#if defined(__CYGWIN__) +#if __GNU_VISIBLE int _EXFUN(dup3, (int __fildes, int __fildes2, int flags)); int _EXFUN(eaccess, (const char *__path, int __mode)); +#endif +#if __XSI_VISIBLE +void _EXFUN(encrypt, (char *__block, int __edflag)); +#endif +#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) void _EXFUN(endusershell, (void)); +#endif +#if __GNU_VISIBLE int _EXFUN(euidaccess, (const char *__path, int __mode)); #endif int _EXFUN(execl, (const char *__path, const char *, ... )); int _EXFUN(execle, (const char *__path, const char *, ... )); int _EXFUN(execlp, (const char *__file, const char *, ... )); -#if defined(__CYGWIN__) +#if __MISC_VISIBLE int _EXFUN(execlpe, (const char *__file, const char *, ... )); #endif int _EXFUN(execv, (const char *__path, char * const __argv[] )); int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] )); int _EXFUN(execvp, (const char *__file, char * const __argv[] )); -#if defined(__CYGWIN__) +#if __GNU_VISIBLE int _EXFUN(execvpe, (const char *__file, char * const __argv[], char * const __envp[] )); #endif -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE || defined(__CYGWIN__) +#if __ATFILE_VISIBLE int _EXFUN(faccessat, (int __dirfd, const char *__path, int __mode, int __flags)); #endif -#if defined(__CYGWIN__) || defined(__rtems__) || defined(__SPU__) +#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 int _EXFUN(fchdir, (int __fildes)); #endif int _EXFUN(fchmod, (int __fildes, mode_t __mode )); #if !defined(__INSIDE_CYGWIN__) int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group )); #endif -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE || defined(__CYGWIN__) +#if __ATFILE_VISIBLE int _EXFUN(fchownat, (int __dirfd, const char *__path, uid_t __owner, gid_t __group, int __flags)); #endif -#if defined(__CYGWIN__) +#if __POSIX_VISIBLE >= 200809 int _EXFUN(fexecve, (int __fd, char * const __argv[], char * const __envp[] )); #endif pid_t _EXFUN(fork, (void )); long _EXFUN(fpathconf, (int __fd, int __name )); int _EXFUN(fsync, (int __fd)); int _EXFUN(fdatasync, (int __fd)); -#if defined(__CYGWIN__) +#if __GNU_VISIBLE char * _EXFUN(get_current_dir_name, (void)); #endif char * _EXFUN(getcwd, (char *__buf, size_t __size )); -#if defined(__CYGWIN__) +#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) int _EXFUN(getdomainname ,(char *__name, size_t __len)); #endif +#if __BSD_VISIBLE +int _EXFUN(getentropy, (void *, size_t)); +#endif #if !defined(__INSIDE_CYGWIN__) gid_t _EXFUN(getegid, (void )); uid_t _EXFUN(geteuid, (void )); gid_t _EXFUN(getgid, (void )); #endif int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] )); +#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 long _EXFUN(gethostid, (void)); +#endif char * _EXFUN(getlogin, (void )); #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) int _EXFUN(getlogin_r, (char *name, size_t namesize) ); #endif char * _EXFUN(getpass, (const char *__prompt)); int _EXFUN(getpagesize, (void)); -#if defined(__CYGWIN__) +#if __BSD_VISIBLE int _EXFUN(getpeereid, (int, uid_t *, gid_t *)); #endif pid_t _EXFUN(getpgid, (pid_t)); pid_t _EXFUN(getpgrp, (void )); pid_t _EXFUN(getpid, (void )); pid_t _EXFUN(getppid, (void )); -#if defined(__CYGWIN__) || defined(__rtems__) +#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 pid_t _EXFUN(getsid, (pid_t)); #endif #if !defined(__INSIDE_CYGWIN__) uid_t _EXFUN(getuid, (void )); #endif -#ifdef __CYGWIN__ +#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) char * _EXFUN(getusershell, (void)); +#endif +#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809) char * _EXFUN(getwd, (char *__buf )); +#endif +#if __BSD_VISIBLE int _EXFUN(iruserok, (unsigned long raddr, int superuser, const char *ruser, const char *luser)); #endif int _EXFUN(isatty, (int __fildes )); +#if __BSD_VISIBLE +int _EXFUN(issetugid, (void)); +#endif #if !defined(__INSIDE_CYGWIN__) int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group )); #endif int _EXFUN(link, (const char *__path1, const char *__path2 )); -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE || defined(__CYGWIN__) +#if __ATFILE_VISIBLE int _EXFUN(linkat, (int __dirfd1, const char *__path1, int __dirfd2, const char *__path2, int __flags )); #endif int _EXFUN(nice, (int __nice_value )); #if !defined(__INSIDE_CYGWIN__) off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence )); #endif -#if defined(__SPU__) || defined(__CYGWIN__) +#if __MISC_VISIBLE || __XSI_VISIBLE >= 4 #define F_ULOCK 0 #define F_LOCK 1 #define F_TLOCK 2 @@ -135,41 +161,41 @@ int _EXFUN(lockf, (int __fd, int __cmd, off_t __len)); #endif long _EXFUN(pathconf, (const char *__path, int __name )); int _EXFUN(pause, (void )); -#ifdef __CYGWIN__ +#if __POSIX_VISIBLE >= 199506 int _EXFUN(pthread_atfork, (void (*)(void), void (*)(void), void (*)(void))); #endif int _EXFUN(pipe, (int __fildes[2] )); -#ifdef __CYGWIN__ +#if __GNU_VISIBLE int _EXFUN(pipe2, (int __fildes[2], int flags)); #endif ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset)); ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset)); _READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte )); -#if defined(__CYGWIN__) +#if __BSD_VISIBLE int _EXFUN(rresvport, (int *__alport)); int _EXFUN(revoke, (char *__path)); #endif int _EXFUN(rmdir, (const char *__path )); -#if defined(__CYGWIN__) +#if __BSD_VISIBLE int _EXFUN(ruserok, (const char *rhost, int superuser, const char *ruser, const char *luser)); #endif void * _EXFUN(sbrk, (ptrdiff_t __incr)); #if !defined(__INSIDE_CYGWIN__) -#if defined(__CYGWIN__) || defined(__rtems__) +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 int _EXFUN(setegid, (gid_t __gid )); int _EXFUN(seteuid, (uid_t __uid )); #endif int _EXFUN(setgid, (gid_t __gid )); #endif -#if defined(__CYGWIN__) +#if __BSD_VISIBLE int _EXFUN(setgroups, (int ngroups, const gid_t *grouplist )); #endif -#if __BSD_VISIBLE || (defined(_XOPEN_SOURCE) && __XSI_VISIBLE < 500) +#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) int _EXFUN(sethostname, (const char *, size_t)); #endif int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid )); int _EXFUN(setpgrp, (void )); -#if defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__) +#if (__BSD_VISIBLE || __XSI_VISIBLE >= 4) && !defined(__INSIDE_CYGWIN__) int _EXFUN(setregid, (gid_t __rgid, gid_t __egid)); int _EXFUN(setreuid, (uid_t __ruid, uid_t __euid)); #endif @@ -177,7 +203,7 @@ pid_t _EXFUN(setsid, (void )); #if !defined(__INSIDE_CYGWIN__) int _EXFUN(setuid, (uid_t __uid )); #endif -#if defined(__CYGWIN__) +#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) void _EXFUN(setusershell, (void)); #endif unsigned _EXFUN(sleep, (unsigned int __seconds )); @@ -186,9 +212,7 @@ long _EXFUN(sysconf, (int __name )); pid_t _EXFUN(tcgetpgrp, (int __fildes )); int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id )); char * _EXFUN(ttyname, (int __fildes )); -#if defined(__CYGWIN__) || defined(__rtems__) int _EXFUN(ttyname_r, (int, char *, size_t)); -#endif int _EXFUN(unlink, (const char *__path )); int _EXFUN(usleep, (useconds_t __useconds)); int _EXFUN(vhangup, (void )); @@ -205,9 +229,9 @@ int getopt(int, char * const [], const char *); extern int optreset; /* getopt(3) external variable */ #endif -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809) pid_t _EXFUN(vfork, (void )); -#endif /* _POSIX_SOURCE */ +#endif #ifdef _COMPILING_NEWLIB /* Provide prototypes for most of the _ names that are @@ -248,14 +272,14 @@ char * _EXFUN(mktemp, (char *)); void _EXFUN(sync, (void)); #endif +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4 ssize_t _EXFUN(readlink, (const char *__restrict __path, char *__restrict __buf, size_t __buflen)); -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE || defined(__CYGWIN__) +int _EXFUN(symlink, (const char *__name1, const char *__name2)); +#endif +#if __ATFILE_VISIBLE ssize_t _EXFUN(readlinkat, (int __dirfd1, const char *__restrict __path, char *__restrict __buf, size_t __buflen)); -#endif -int _EXFUN(symlink, (const char *__name1, const char *__name2)); -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE || defined(__CYGWIN__) int _EXFUN(symlinkat, (const char *, int, const char *)); int _EXFUN(unlinkat, (int, const char *, int)); #endif @@ -418,6 +442,22 @@ int _EXFUN(unlinkat, (int, const char *, int)); #define _SC_THREAD_ROBUST_PRIO_INHERIT 122 #define _SC_THREAD_ROBUST_PRIO_PROTECT 123 #define _SC_XOPEN_UUCP 124 +#define _SC_LEVEL1_ICACHE_SIZE 125 +#define _SC_LEVEL1_ICACHE_ASSOC 126 +#define _SC_LEVEL1_ICACHE_LINESIZE 127 +#define _SC_LEVEL1_DCACHE_SIZE 128 +#define _SC_LEVEL1_DCACHE_ASSOC 129 +#define _SC_LEVEL1_DCACHE_LINESIZE 130 +#define _SC_LEVEL2_CACHE_SIZE 131 +#define _SC_LEVEL2_CACHE_ASSOC 132 +#define _SC_LEVEL2_CACHE_LINESIZE 133 +#define _SC_LEVEL3_CACHE_SIZE 134 +#define _SC_LEVEL3_CACHE_ASSOC 135 +#define _SC_LEVEL3_CACHE_LINESIZE 136 +#define _SC_LEVEL4_CACHE_SIZE 137 +#define _SC_LEVEL4_CACHE_ASSOC 138 +#define _SC_LEVEL4_CACHE_LINESIZE 139 +#define _SC_POSIX_26_VERSION 140 /* * pathconf values per IEEE Std 1003.1, 2008 Edition @@ -449,6 +489,7 @@ int _EXFUN(unlinkat, (int, const char *, int)); #define _PC_POSIX_PERMISSIONS 90 /* Ask for full POSIX permission support including uid/gid settings. */ #define _PC_POSIX_SECURITY 91 +#define _PC_CASE_INSENSITIVE 92 #endif /* diff --git a/devkitARM/arm-none-eabi/include/sys/wait.h b/devkitARM/arm-none-eabi/include/sys/wait.h index 73fe37202..f17e53f12 100644 --- a/devkitARM/arm-none-eabi/include/sys/wait.h +++ b/devkitARM/arm-none-eabi/include/sys/wait.h @@ -11,7 +11,7 @@ extern "C" { #define WUNTRACED 2 /* A status looks like: - <2 bytes info> <2 bytes code> + <1 byte info> <1 byte code> == 0, child has exited, info is the exit value == 1..7e, child has exited, info is the signal number. diff --git a/devkitARM/arm-none-eabi/include/tar.h b/devkitARM/arm-none-eabi/include/tar.h index 07b06dd7f..36437fc38 100644 --- a/devkitARM/arm-none-eabi/include/tar.h +++ b/devkitARM/arm-none-eabi/include/tar.h @@ -5,6 +5,8 @@ #ifndef _TAR_H #define _TAR_H +#include + /* General definitions */ #define TMAGIC "ustar" /* ustar plus null byte. */ #define TMAGLEN 6 /* Length of the above. */ @@ -25,7 +27,9 @@ /* Mode field bit definitions (octal) */ #define TSUID 04000 /* Set UID on execution. */ #define TSGID 02000 /* Set GID on execution. */ +#if __XSI_VISIBLE || __POSIX_VISIBLE < 200112 #define TSVTX 01000 /* On directories, restricted deletion flag. */ +#endif #define TUREAD 00400 /* Read by owner. */ #define TUWRITE 00200 /* Write by owner. */ #define TUEXEC 00100 /* Execute/search by owner. */ diff --git a/devkitARM/arm-none-eabi/include/tgmath.h b/devkitARM/arm-none-eabi/include/tgmath.h index f9c8311cc..97dc50eaa 100644 --- a/devkitARM/arm-none-eabi/include/tgmath.h +++ b/devkitARM/arm-none-eabi/include/tgmath.h @@ -79,7 +79,7 @@ __tg_type3(__e1, __e2, __e3, long double _Complex) || \ __tg_type3(__e1, __e2, __e3, __typeof__(_Complex_I))) -#ifdef _LDBL_EQ_DBL +#if defined (_LDBL_EQ_DBL) || defined (__CYGWIN__) #define __tg_impl_simple(x, y, z, fn, fnf, fnl, ...) \ __builtin_choose_expr(__tg_type_corr(x, y, z, long double), \ fnl(__VA_ARGS__), __builtin_choose_expr( \ @@ -161,9 +161,10 @@ #define lround(__x) __tg_simple(__x, lround) #define nearbyint(__x) __tg_simple(__x, nearbyint) #define nextafter(__x, __y) __tg_simple2(__x, __y, nextafter) -/* not yet implemented even for _LDBL_EQ_DBL platforms +/* not yet implemented even for _LDBL_EQ_DBL platforms */ +#ifdef __CYGWIN__ #define nexttoward(__x, __y) __tg_simplev(__x, nexttoward, __x, __y) -*/ +#endif #define remainder(__x, __y) __tg_simple2(__x, __y, remainder) #define remquo(__x, __y, __z) __tg_impl_simple(__x, __x, __y, remquo, remquof, \ remquol, __x, __y, __z) diff --git a/devkitARM/arm-none-eabi/include/threads.h b/devkitARM/arm-none-eabi/include/threads.h new file mode 100644 index 000000000..9fb08b03d --- /dev/null +++ b/devkitARM/arm-none-eabi/include/threads.h @@ -0,0 +1,93 @@ +/*- + * Copyright (c) 2011 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _THREADS_H_ +#define _THREADS_H_ + +#include +#include + +typedef void (*tss_dtor_t)(void *); +typedef int (*thrd_start_t)(void *); + +enum { + mtx_plain = 0x1, + mtx_recursive = 0x2, + mtx_timed = 0x4 +}; + +enum { + thrd_busy = 1, + thrd_error = 2, + thrd_nomem = 3, + thrd_success = 4, + thrd_timedout = 5 +}; + +#if !defined(__cplusplus) || __cplusplus < 201103L +#define thread_local _Thread_local +#endif + +__BEGIN_DECLS +void call_once(once_flag *, void (*)(void)); +int cnd_broadcast(cnd_t *); +void cnd_destroy(cnd_t *); +int cnd_init(cnd_t *); +int cnd_signal(cnd_t *); +int cnd_timedwait(cnd_t *__restrict, mtx_t *__restrict __mtx, + const struct timespec *__restrict) + __requires_exclusive(*__mtx); +int cnd_wait(cnd_t *, mtx_t *__mtx) + __requires_exclusive(*__mtx); +void mtx_destroy(mtx_t *__mtx) + __requires_unlocked(*__mtx); +int mtx_init(mtx_t *__mtx, int) + __requires_unlocked(*__mtx); +int mtx_lock(mtx_t *__mtx) + __locks_exclusive(*__mtx); +int mtx_timedlock(mtx_t *__restrict __mtx, + const struct timespec *__restrict) + __trylocks_exclusive(thrd_success, *__mtx); +int mtx_trylock(mtx_t *__mtx) + __trylocks_exclusive(thrd_success, *__mtx); +int mtx_unlock(mtx_t *__mtx) + __unlocks(*__mtx); +int thrd_create(thrd_t *, thrd_start_t, void *); +thrd_t thrd_current(void); +int thrd_detach(thrd_t); +int thrd_equal(thrd_t, thrd_t); +_Noreturn void + thrd_exit(int); +int thrd_join(thrd_t, int *); +int thrd_sleep(const struct timespec *, struct timespec *); +void thrd_yield(void); +int tss_create(tss_t *, tss_dtor_t); +void tss_delete(tss_t); +void * tss_get(tss_t); +int tss_set(tss_t, void *); +__END_DECLS + +#endif /* !_THREADS_H_ */ diff --git a/devkitARM/arm-none-eabi/include/time.h b/devkitARM/arm-none-eabi/include/time.h index d7b6612db..ec67cb25b 100644 --- a/devkitARM/arm-none-eabi/include/time.h +++ b/devkitARM/arm-none-eabi/include/time.h @@ -8,6 +8,7 @@ #define _TIME_H_ #include "_ansi.h" +#include #include #define __need_size_t @@ -25,6 +26,11 @@ #define CLK_TCK CLOCKS_PER_SEC #include +#include + +#if __POSIX_VISIBLE >= 200809 +#include +#endif _BEGIN_STD_C @@ -61,6 +67,12 @@ size_t _EXFUN(strftime, (char *__restrict _s, size_t _maxsize, const char *__restrict _fmt, const struct tm *__restrict _t)); +#if __POSIX_VISIBLE >= 200809 +extern size_t strftime_l (char *__restrict _s, size_t _maxsize, + const char *__restrict _fmt, + const struct tm *__restrict _t, locale_t _l); +#endif + char *_EXFUN(asctime_r, (const struct tm *__restrict, char *__restrict)); char *_EXFUN(ctime_r, (const time_t *, char *)); @@ -75,11 +87,19 @@ _END_STD_C extern "C" { #endif -#ifndef __STRICT_ANSI__ +#if __XSI_VISIBLE char *_EXFUN(strptime, (const char *__restrict, const char *__restrict, struct tm *__restrict)); +#endif +#if __GNU_VISIBLE +char *strptime_l (const char *__restrict, const char *__restrict, + struct tm *__restrict, locale_t); +#endif + +#if __POSIX_VISIBLE _VOID _EXFUN(tzset, (_VOID)); +#endif _VOID _EXFUN(_tzset_r, (struct _reent *)); typedef struct __tzrule_struct @@ -105,6 +125,7 @@ __tzinfo_type *_EXFUN (__gettzinfo, (_VOID)); /* getdate functions */ #ifdef HAVE_GETDATE +#if __XSI_VISIBLE >= 4 #ifndef _REENT_ONLY #define getdate_err (*__getdate_err()) int *_EXFUN(__getdate_err,(_VOID)); @@ -120,21 +141,27 @@ struct tm * _EXFUN(getdate, (const char *)); 7 there is no line in the template that matches the input, 8 invalid input specification */ #endif /* !_REENT_ONLY */ +#endif /* __XSI_VISIBLE >= 4 */ +#if __GNU_VISIBLE /* getdate_r returns the error code as above */ int _EXFUN(getdate_r, (const char *, struct tm *)); +#endif /* __GNU_VISIBLE */ #endif /* HAVE_GETDATE */ /* defines for the opengroup specifications Derived from Issue 1 of the SVID. */ +#if __SVID_VISIBLE || __XSI_VISIBLE extern __IMPORT long _timezone; extern __IMPORT int _daylight; +#endif +#if __POSIX_VISIBLE extern __IMPORT char *_tzname[2]; /* POSIX defines the external tzname being defined in time.h */ #ifndef tzname #define tzname _tzname #endif -#endif /* !__STRICT_ANSI__ */ +#endif /* __POSIX_VISIBLE */ #ifdef __cplusplus } diff --git a/devkitARM/arm-none-eabi/include/wchar.h b/devkitARM/arm-none-eabi/include/wchar.h index 596cce698..4766ca971 100644 --- a/devkitARM/arm-none-eabi/include/wchar.h +++ b/devkitARM/arm-none-eabi/include/wchar.h @@ -11,15 +11,32 @@ #define __need_NULL #include -#define __need___va_list -#include - /* For _mbstate_t definition. */ #include #include /* For __STDC_ISO_10646__ */ #include +/* typedef only __gnuc_va_list, used throughout the header */ +#define __need___va_list +#include + +/* typedef va_list only when required */ +#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE +#ifdef __GNUC__ +#ifndef _VA_LIST_DEFINED +typedef __gnuc_va_list va_list; +#define _VA_LIST_DEFINED +#endif +#else /* !__GNUC__ */ +#include +#endif +#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ + +#if __XSI_VISIBLE /* && __XSI_VISIBLE < 800 */ && !__GNU_VISIBLE +#include +#endif + #ifndef WEOF # define WEOF ((wint_t)-1) #endif @@ -46,10 +63,19 @@ #endif #endif +#if __POSIX_VISIBLE >= 200809 +#include +#endif + _BEGIN_STD_C +#if __POSIX_VISIBLE >= 200809 || _XSI_VISIBLE /* As in stdio.h, defines __FILE. */ +#if !defined(__FILE_defined) typedef __FILE FILE; +# define __FILE_defined +#endif +#endif /* As required by POSIX.1-2008, declare tm as incomplete type. The actual definition is in time.h. */ @@ -68,8 +94,10 @@ size_t _EXFUN(mbrtowc, (wchar_t *__restrict, const char *__restrict, size_t, size_t _EXFUN(_mbrtowc_r, (struct _reent *, wchar_t * , const char * , size_t, mbstate_t *)); int _EXFUN(mbsinit, (const mbstate_t *)); +#if __POSIX_VISIBLE >= 200809 size_t _EXFUN(mbsnrtowcs, (wchar_t *__restrict, const char **__restrict, size_t, size_t, mbstate_t *__restrict)); +#endif size_t _EXFUN(_mbsnrtowcs_r, (struct _reent *, wchar_t * , const char ** , size_t, size_t, mbstate_t *)); size_t _EXFUN(mbsrtowcs, (wchar_t *__restrict, const char **__restrict, size_t, @@ -77,39 +105,53 @@ size_t _EXFUN(mbsrtowcs, (wchar_t *__restrict, const char **__restrict, size_t, size_t _EXFUN(_mbsrtowcs_r, (struct _reent *, wchar_t * , const char ** , size_t, mbstate_t *)); size_t _EXFUN(wcrtomb, (char *__restrict, wchar_t, mbstate_t *__restrict)); size_t _EXFUN(_wcrtomb_r, (struct _reent *, char * , wchar_t, mbstate_t *)); +#if __POSIX_VISIBLE >= 200809 size_t _EXFUN(wcsnrtombs, (char *__restrict, const wchar_t **__restrict, size_t, size_t, mbstate_t *__restrict)); +#endif size_t _EXFUN(_wcsnrtombs_r, (struct _reent *, char * , const wchar_t ** , size_t, size_t, mbstate_t *)); size_t _EXFUN(wcsrtombs, (char *__restrict, const wchar_t **__restrict, size_t, mbstate_t *__restrict)); size_t _EXFUN(_wcsrtombs_r, (struct _reent *, char * , const wchar_t ** , size_t, mbstate_t *)); +#if __POSIX_VISIBLE >= 200809 int _EXFUN(wcscasecmp, (const wchar_t *, const wchar_t *)); +#endif wchar_t *_EXFUN(wcscat, (wchar_t *__restrict, const wchar_t *__restrict)); wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t)); int _EXFUN(wcscmp, (const wchar_t *, const wchar_t *)); int _EXFUN(wcscoll, (const wchar_t *, const wchar_t *)); wchar_t *_EXFUN(wcscpy, (wchar_t *__restrict, const wchar_t *__restrict)); +#if __POSIX_VISIBLE >= 200809 wchar_t *_EXFUN(wcpcpy, (wchar_t *__restrict, const wchar_t *__restrict)); wchar_t *_EXFUN(wcsdup, (const wchar_t *)); +#endif wchar_t *_EXFUN(_wcsdup_r, (struct _reent *, const wchar_t * )); size_t _EXFUN(wcscspn, (const wchar_t *, const wchar_t *)); size_t _EXFUN(wcsftime, (wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict)); +#if __GNU_VISIBLE +size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict, + const struct tm *__restrict, locale_t); +#endif size_t _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t)); size_t _EXFUN(wcslcpy, (wchar_t *, const wchar_t *, size_t)); size_t _EXFUN(wcslen, (const wchar_t *)); +#if __POSIX_VISIBLE >= 200809 int _EXFUN(wcsncasecmp, (const wchar_t *, const wchar_t *, size_t)); +#endif wchar_t *_EXFUN(wcsncat, (wchar_t *__restrict, const wchar_t *__restrict, size_t)); int _EXFUN(wcsncmp, (const wchar_t *, const wchar_t *, size_t)); wchar_t *_EXFUN(wcsncpy, (wchar_t *__restrict, const wchar_t *__restrict, size_t)); +#if __POSIX_VISIBLE >= 200809 wchar_t *_EXFUN(wcpncpy, (wchar_t *__restrict, const wchar_t *__restrict, size_t)); size_t _EXFUN(wcsnlen, (const wchar_t *, size_t)); +#endif wchar_t *_EXFUN(wcspbrk, (const wchar_t *, const wchar_t *)); wchar_t *_EXFUN(wcsrchr, (const wchar_t *, wchar_t)); size_t _EXFUN(wcsspn, (const wchar_t *, const wchar_t *)); @@ -119,12 +161,26 @@ wchar_t *_EXFUN(wcstok, (wchar_t *__restrict, const wchar_t *__restrict, wchar_t **__restrict)); double _EXFUN(wcstod, (const wchar_t *__restrict, wchar_t **__restrict)); double _EXFUN(_wcstod_r, (struct _reent *, const wchar_t *, wchar_t **)); +#if __ISO_C_VISIBLE >= 1999 float _EXFUN(wcstof, (const wchar_t *__restrict, wchar_t **__restrict)); +#endif float _EXFUN(_wcstof_r, (struct _reent *, const wchar_t *, wchar_t **)); +#if __XSI_VISIBLE int _EXFUN(wcswidth, (const wchar_t *, size_t)); +#endif size_t _EXFUN(wcsxfrm, (wchar_t *__restrict, const wchar_t *__restrict, size_t)); +#if __POSIX_VISIBLE >= 200809 +extern int wcscasecmp_l (const wchar_t *, const wchar_t *, locale_t); +extern int wcsncasecmp_l (const wchar_t *, const wchar_t *, size_t, locale_t); +extern int wcscoll_l (const wchar_t *, const wchar_t *, locale_t); +extern size_t wcsxfrm_l (wchar_t *__restrict, const wchar_t *__restrict, size_t, + locale_t); +#endif + +#if __XSI_VISIBLE int _EXFUN(wcwidth, (const wchar_t)); +#endif wchar_t *_EXFUN(wmemchr, (const wchar_t *, wchar_t, size_t)); int _EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t)); wchar_t *_EXFUN(wmemcpy, (wchar_t *__restrict, const wchar_t *__restrict, @@ -133,26 +189,44 @@ wchar_t *_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t)); wchar_t *_EXFUN(wmemset, (wchar_t *, wchar_t, size_t)); long _EXFUN(wcstol, (const wchar_t *__restrict, wchar_t **__restrict, int)); +#if __ISO_C_VISIBLE >= 1999 long long _EXFUN(wcstoll, (const wchar_t *__restrict, wchar_t **__restrict, int)); +#endif unsigned long _EXFUN(wcstoul, (const wchar_t *__restrict, wchar_t **__restrict, int)); +#if __ISO_C_VISIBLE >= 1999 unsigned long long _EXFUN(wcstoull, (const wchar_t *__restrict, wchar_t **__restrict, int)); +#endif long _EXFUN(_wcstol_r, (struct _reent *, const wchar_t *, wchar_t **, int)); long long _EXFUN(_wcstoll_r, (struct _reent *, const wchar_t *, wchar_t **, int)); unsigned long _EXFUN(_wcstoul_r, (struct _reent *, const wchar_t *, wchar_t **, int)); unsigned long long _EXFUN(_wcstoull_r, (struct _reent *, const wchar_t *, wchar_t **, int)); -/* On platforms where long double equals double. */ -#ifdef _LDBL_EQ_DBL +#if __ISO_C_VISIBLE >= 1999 long double _EXFUN(wcstold, (const wchar_t *, wchar_t **)); -#endif /* _LDBL_EQ_DBL */ +#endif + +#if __GNU_VISIBLE +long wcstol_l (const wchar_t *__restrict, wchar_t **__restrict, int, locale_t); +long long wcstoll_l (const wchar_t *__restrict, wchar_t **__restrict, int, + locale_t); +unsigned long wcstoul_l (const wchar_t *__restrict, wchar_t **__restrict, int, + locale_t); +unsigned long long wcstoull_l (const wchar_t *__restrict, wchar_t **__restrict, + int, locale_t); +double wcstod_l (const wchar_t *, wchar_t **, locale_t); +float wcstof_l (const wchar_t *, wchar_t **, locale_t); +long double wcstold_l (const wchar_t *, wchar_t **, locale_t); +#endif wint_t _EXFUN(fgetwc, (__FILE *)); wchar_t *_EXFUN(fgetws, (wchar_t *__restrict, int, __FILE *__restrict)); wint_t _EXFUN(fputwc, (wchar_t, __FILE *)); int _EXFUN(fputws, (const wchar_t *__restrict, __FILE *__restrict)); +#if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500 int _EXFUN (fwide, (__FILE *, int)); +#endif wint_t _EXFUN (getwc, (__FILE *)); wint_t _EXFUN (getwchar, (void)); wint_t _EXFUN(putwc, (wchar_t, __FILE *)); @@ -189,7 +263,9 @@ wint_t _EXFUN(putwc_unlocked, (wchar_t, __FILE *)); wint_t _EXFUN(putwchar_unlocked, (wchar_t)); #endif +#if __POSIX_VISIBLE >= 200809 __FILE *_EXFUN (open_wmemstream, (wchar_t **, size_t *)); +#endif __FILE *_EXFUN (_open_wmemstream_r, (struct _reent *, wchar_t **, size_t *)); #ifndef __VALIST @@ -200,6 +276,7 @@ __FILE *_EXFUN (_open_wmemstream_r, (struct _reent *, wchar_t **, size_t *)); #endif #endif +#if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500 int _EXFUN(fwprintf, (__FILE *__restrict, const wchar_t *__restrict, ...)); int _EXFUN(swprintf, (wchar_t *__restrict, size_t, const wchar_t *__restrict, ...)); @@ -209,6 +286,7 @@ int _EXFUN(vswprintf, (wchar_t *__restrict, size_t, const wchar_t *__restrict, __VALIST)); int _EXFUN(vwprintf, (const wchar_t *__restrict, __VALIST)); int _EXFUN(wprintf, (const wchar_t *__restrict, ...)); +#endif int _EXFUN(_fwprintf_r, (struct _reent *, __FILE *, const wchar_t *, ...)); int _EXFUN(_swprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, ...)); @@ -217,6 +295,7 @@ int _EXFUN(_vswprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, _ int _EXFUN(_vwprintf_r, (struct _reent *, const wchar_t *, __VALIST)); int _EXFUN(_wprintf_r, (struct _reent *, const wchar_t *, ...)); +#if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500 int _EXFUN(fwscanf, (__FILE *__restrict, const wchar_t *__restrict, ...)); int _EXFUN(swscanf, (const wchar_t *__restrict, const wchar_t *__restrict, ...)); @@ -226,6 +305,7 @@ int _EXFUN(vswscanf, (const wchar_t *__restrict, const wchar_t *__restrict, __VALIST)); int _EXFUN(vwscanf, (const wchar_t *__restrict, __VALIST)); int _EXFUN(wscanf, (const wchar_t *__restrict, ...)); +#endif int _EXFUN(_fwscanf_r, (struct _reent *, __FILE *, const wchar_t *, ...)); int _EXFUN(_swscanf_r, (struct _reent *, const wchar_t *, const wchar_t *, ...)); diff --git a/devkitARM/arm-none-eabi/include/wctype.h b/devkitARM/arm-none-eabi/include/wctype.h index c72c9decf..d08537411 100644 --- a/devkitARM/arm-none-eabi/include/wctype.h +++ b/devkitARM/arm-none-eabi/include/wctype.h @@ -7,6 +7,10 @@ #define __need_wint_t #include +#if __POSIX_VISIBLE >= 200809 +#include +#endif + #ifndef WEOF # define WEOF ((wint_t)-1) #endif @@ -25,7 +29,9 @@ typedef int wctrans_t; int _EXFUN(iswalpha, (wint_t)); int _EXFUN(iswalnum, (wint_t)); +#if __ISO_C_VISIBLE >= 1999 int _EXFUN(iswblank, (wint_t)); +#endif int _EXFUN(iswcntrl, (wint_t)); int _EXFUN(iswctype, (wint_t, wctype_t)); int _EXFUN(iswdigit, (wint_t)); @@ -42,6 +48,27 @@ wint_t _EXFUN(towlower, (wint_t)); wctrans_t _EXFUN(wctrans, (const char *)); wctype_t _EXFUN(wctype, (const char *)); +#if __POSIX_VISIBLE >= 200809 +extern int iswalpha_l (wint_t, locale_t); +extern int iswalnum_l (wint_t, locale_t); +extern int iswblank_l (wint_t, locale_t); +extern int iswcntrl_l (wint_t, locale_t); +extern int iswctype_l (wint_t, wctype_t, locale_t); +extern int iswdigit_l (wint_t, locale_t); +extern int iswgraph_l (wint_t, locale_t); +extern int iswlower_l (wint_t, locale_t); +extern int iswprint_l (wint_t, locale_t); +extern int iswpunct_l (wint_t, locale_t); +extern int iswspace_l (wint_t, locale_t); +extern int iswupper_l (wint_t, locale_t); +extern int iswxdigit_l (wint_t, locale_t); +extern wint_t towctrans_l (wint_t, wctrans_t, locale_t); +extern wint_t towupper_l (wint_t, locale_t); +extern wint_t towlower_l (wint_t, locale_t); +extern wctrans_t wctrans_l (const char *, locale_t); +extern wctype_t wctype_l (const char *, locale_t); +#endif + _END_STD_C #endif /* _WCTYPE_H_ */ diff --git a/devkitARM/arm-none-eabi/lib/3dsx.ld b/devkitARM/arm-none-eabi/lib/3dsx.ld index 93d2bb116..025034aa3 100644 --- a/devkitARM/arm-none-eabi/lib/3dsx.ld +++ b/devkitARM/arm-none-eabi/lib/3dsx.ld @@ -13,8 +13,8 @@ SECTIONS { /* =========== CODE section =========== */ - . = 0x100000; - __start__ = . ; + PROVIDE(__start__ = 0x100000); + . = __start__; .text ALIGN(0x1000) : { @@ -40,7 +40,9 @@ SECTIONS /* =========== RODATA section =========== */ - .rodata ALIGN(0x1000) : + . = ALIGN(0x1000); + + .rodata : { *(.rodata) *(.roda) @@ -58,7 +60,9 @@ SECTIONS /* =========== DATA section =========== */ - .data ALIGN(0x1000) : + . = ALIGN(0x1000); + + .data : { *(.data) *(.data.*) diff --git a/devkitARM/arm-none-eabi/lib/3dsx_crt0.s b/devkitARM/arm-none-eabi/lib/3dsx_crt0.s index 312eba2a8..eaf084341 100644 --- a/devkitARM/arm-none-eabi/lib/3dsx_crt0.s +++ b/devkitARM/arm-none-eabi/lib/3dsx_crt0.s @@ -5,7 +5,7 @@ @--------------------------------------------------------------------------------- @--------------------------------------------------------------------------------- - .section ".crt0" + .section ".crt0","ax" .global _start, __service_ptr, __apt_appid, __heap_size, __linear_heap_size, __system_arglist, __system_runflags @--------------------------------------------------------------------------------- .align 2 diff --git a/devkitARM/arm-none-eabi/lib/Makefile b/devkitARM/arm-none-eabi/lib/Makefile index c3423bb57..eb2d7cafd 100644 --- a/devkitARM/arm-none-eabi/lib/Makefile +++ b/devkitARM/arm-none-eabi/lib/Makefile @@ -3,3 +3,11 @@ include $(DEVKITARM)/base_rules all: $(CC) -x assembler-with-cpp -marm -c $(CRT)_crt0.s -o$(CRT)_crt0.o $(CC) -x assembler-with-cpp -mthumb -c $(CRT)_crt0.s -o thumb/$(CRT)_crt0.o + +ds_arm7_vram_crt0: + $(CC) -x assembler-with-cpp -marm -c -DVRAM ds_arm7_crt0.s -ods_arm7_vram_crt0.o + $(CC) -x assembler-with-cpp -mthumb -c -DVRAM ds_arm7_crt0.s -othumb/ds_arm7_vram_crt0.o + +3dsx_crt0: + $(CC) -march=armv6k -mfloat-abi=hard -c 3dsx_crt0.s -o armv6k/fpu/3dsx_crt0.o + diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/3dsx_crt0.o b/devkitARM/arm-none-eabi/lib/armv6k/fpu/3dsx_crt0.o index 4308ad799..3000ced7f 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/3dsx_crt0.o and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/3dsx_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/cpu-init/rdimon-aem.o b/devkitARM/arm-none-eabi/lib/armv6k/fpu/cpu-init/rdimon-aem.o index 540e25125..4c4b1cab9 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/cpu-init/rdimon-aem.o and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/cpu-init/rdimon-aem.o differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/crt0.o b/devkitARM/arm-none-eabi/lib/armv6k/fpu/crt0.o index 203c7700d..920c92058 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/crt0.o and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libc.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libc.a index 2887e5f20..40e43ae13 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libc.a and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libc.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libg.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libg.a index 2887e5f20..40e43ae13 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libg.a and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libg.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libgloss-linux.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libgloss-linux.a index 3c738a016..af49caebe 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libgloss-linux.a and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libgloss-linux.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libm.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libm.a index db0b7780f..b0b749a58 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libm.a and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libm.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libnosys.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libnosys.a index 743a5699f..7169bf0bf 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libnosys.a and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libnosys.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libobjc.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libobjc.a deleted file mode 100644 index ec9f8b1e1..000000000 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libobjc.a and /dev/null differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/librdimon.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/librdimon.a index c34d7b4ce..2c27f54b0 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/librdimon.a and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/librdimon.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/librdpmon.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/librdpmon.a index af819994b..814f12cd5 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/librdpmon.a and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/librdpmon.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.a index 11bde1b71..42ec04ff6 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.a and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.a-gdb.py b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.a-gdb.py index 32ca47715..1c06f8230 100644 --- a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.a-gdb.py +++ b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.a-gdb.py @@ -1,5 +1,5 @@ # -*- python -*- -# Copyright (C) 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ import gdb import os import os.path -pythondir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/share/gcc-5.3.0/python' +pythondir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/share/gcc-7.1.0/python' libdir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib/armv6k/fpu' # This file might be loaded when there is no current objfile. This diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.la b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.la index f75ca646d..767afaf5d 100644 --- a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.la +++ b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libstdc++.la @@ -25,7 +25,7 @@ weak_library_names='' # Version information for libstdc++. current=6 age=0 -revision=21 +revision=23 # Is this an already installed library? installed=yes diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libsupc++.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libsupc++.a index 2e3fed6f1..a7f583e2a 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libsupc++.a and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libsupc++.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libsysbase.a b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libsysbase.a index d52519e7b..c0572e8b3 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libsysbase.a and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/libsysbase.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/linux-crt0.o b/devkitARM/arm-none-eabi/lib/armv6k/fpu/linux-crt0.o index fe0b04068..d04b2091c 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/linux-crt0.o and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/linux-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/nano.specs b/devkitARM/arm-none-eabi/lib/armv6k/fpu/nano.specs index 60dc407c6..575f47d38 100644 --- a/devkitARM/arm-none-eabi/lib/armv6k/fpu/nano.specs +++ b/devkitARM/arm-none-eabi/lib/armv6k/fpu/nano.specs @@ -1,5 +1,9 @@ %rename link nano_link %rename link_gcc_c_sequence nano_link_gcc_c_sequence +%rename cpp nano_cpp + +*cpp: +-isystem =/include/newlib-nano %(nano_cpp) *nano_libc: -lc_nano diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/rdimon-crt0.o b/devkitARM/arm-none-eabi/lib/armv6k/fpu/rdimon-crt0.o index 93909c619..f7e8d05f4 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/rdimon-crt0.o and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/rdimon-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/rdpmon-crt0.o b/devkitARM/arm-none-eabi/lib/armv6k/fpu/rdpmon-crt0.o index b6e41a9b3..a263a796a 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/rdpmon-crt0.o and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/rdpmon-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/redboot-crt0.o b/devkitARM/arm-none-eabi/lib/armv6k/fpu/redboot-crt0.o index d9ea0e3ee..a3db525bc 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/redboot-crt0.o and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/redboot-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/redboot-syscalls.o b/devkitARM/arm-none-eabi/lib/armv6k/fpu/redboot-syscalls.o index 3ea3fd623..4c4de373c 100644 Binary files a/devkitARM/arm-none-eabi/lib/armv6k/fpu/redboot-syscalls.o and b/devkitARM/arm-none-eabi/lib/armv6k/fpu/redboot-syscalls.o differ diff --git a/devkitARM/arm-none-eabi/lib/be/aprofile-validation.specs b/devkitARM/arm-none-eabi/lib/be/aprofile-validation.specs new file mode 100644 index 000000000..166a5dec6 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/aprofile-validation.specs @@ -0,0 +1,22 @@ +# aem-validation.specs +# +# Spec file for AArch32 A profile baremetal newlib, libgloss on +# VALIDATION platform with AngelAPI semi-hosting. +# +# This Spec file is also appropriate for the foundation model. + +%rename link old_link + +*link: +--defsym=_rdimon_vector_base=0x00000000 -Ttext-segment=0x00010000 %(old_link) + +%rename lib libc + +*libgloss: +-lrdimon + +*lib: +cpu-init/rdimon-aem.o%s --start-group %(libc) %(libgloss) --end-group + +*startfile: +crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s} diff --git a/devkitARM/arm-none-eabi/lib/be/aprofile-ve.specs b/devkitARM/arm-none-eabi/lib/be/aprofile-ve.specs new file mode 100644 index 000000000..d94bb7a94 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/aprofile-ve.specs @@ -0,0 +1,22 @@ +# aem-ve.specs +# +# Spec file for AArch32 A profile baremetal newlib, libgloss on VE platform with AngelAPI +# semi-hosting. +# +# This Spec file is also appropriate for the foundation model. + +%rename link old_link + +*link: +--defsym=_rdimon_vector_base=0x80000000 -Ttext-segment=0x80010000 %(old_link) + +%rename lib libc + +*libgloss: +-lrdimon + +*lib: +cpu-init/rdimon-aem.o%s --start-group %(libc) %(libgloss) --end-group + +*startfile: +crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s} diff --git a/devkitARM/arm-none-eabi/lib/be/cpu-init/rdimon-aem.o b/devkitARM/arm-none-eabi/lib/be/cpu-init/rdimon-aem.o new file mode 100644 index 000000000..081b46831 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/cpu-init/rdimon-aem.o differ diff --git a/devkitARM/arm-none-eabi/lib/be/crt0.o b/devkitARM/arm-none-eabi/lib/be/crt0.o new file mode 100644 index 000000000..533305fe4 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/be/iq80310.specs b/devkitARM/arm-none-eabi/lib/be/iq80310.specs new file mode 100644 index 000000000..a016e887f --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/iq80310.specs @@ -0,0 +1,8 @@ +%rename link old_link + +*link: +-T redboot.ld%s -Ttext 0xA0020000 %(old_link) + +*startfile: +crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s + diff --git a/devkitARM/arm-none-eabi/lib/be/libc.a b/devkitARM/arm-none-eabi/lib/be/libc.a new file mode 100644 index 000000000..2a90bc43c Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/libc.a differ diff --git a/devkitARM/arm-none-eabi/lib/be/libg.a b/devkitARM/arm-none-eabi/lib/be/libg.a new file mode 100644 index 000000000..2a90bc43c Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/libg.a differ diff --git a/devkitARM/arm-none-eabi/lib/be/libgloss-linux.a b/devkitARM/arm-none-eabi/lib/be/libgloss-linux.a new file mode 100644 index 000000000..cf56fed41 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/libgloss-linux.a differ diff --git a/devkitARM/arm-none-eabi/lib/be/libm.a b/devkitARM/arm-none-eabi/lib/be/libm.a new file mode 100644 index 000000000..0da6e1a4b Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/libm.a differ diff --git a/devkitARM/arm-none-eabi/lib/be/libnosys.a b/devkitARM/arm-none-eabi/lib/be/libnosys.a new file mode 100644 index 000000000..4f59b8e1c Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/libnosys.a differ diff --git a/devkitARM/arm-none-eabi/lib/be/librdimon.a b/devkitARM/arm-none-eabi/lib/be/librdimon.a new file mode 100644 index 000000000..026455dfa Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/librdimon.a differ diff --git a/devkitARM/arm-none-eabi/lib/be/librdpmon.a b/devkitARM/arm-none-eabi/lib/be/librdpmon.a new file mode 100644 index 000000000..a2e73bd94 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/librdpmon.a differ diff --git a/devkitARM/arm-none-eabi/lib/be/libstdc++.a b/devkitARM/arm-none-eabi/lib/be/libstdc++.a new file mode 100644 index 000000000..e4c5b78f4 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/libstdc++.a differ diff --git a/devkitARM/arm-none-eabi/lib/be/libstdc++.a-gdb.py b/devkitARM/arm-none-eabi/lib/be/libstdc++.a-gdb.py new file mode 100644 index 000000000..f7f87feff --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/libstdc++.a-gdb.py @@ -0,0 +1,61 @@ +# -*- python -*- +# Copyright (C) 2009-2017 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import sys +import gdb +import os +import os.path + +pythondir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/share/gcc-7.1.0/python' +libdir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib/be' + +# This file might be loaded when there is no current objfile. This +# can happen if the user loads it manually. In this case we don't +# update sys.path; instead we just hope the user managed to do that +# beforehand. +if gdb.current_objfile () is not None: + # Update module path. We want to find the relative path from libdir + # to pythondir, and then we want to apply that relative path to the + # directory holding the objfile with which this file is associated. + # This preserves relocatability of the gcc tree. + + # Do a simple normalization that removes duplicate separators. + pythondir = os.path.normpath (pythondir) + libdir = os.path.normpath (libdir) + + prefix = os.path.commonprefix ([libdir, pythondir]) + # In some bizarre configuration we might have found a match in the + # middle of a directory name. + if prefix[-1] != '/': + prefix = os.path.dirname (prefix) + '/' + + # Strip off the prefix. + pythondir = pythondir[len (prefix):] + libdir = libdir[len (prefix):] + + # Compute the ".."s needed to get from libdir to the prefix. + dotdots = ('..' + os.sep) * len (libdir.split (os.sep)) + + objfile = gdb.current_objfile ().filename + dir_ = os.path.join (os.path.dirname (objfile), dotdots, pythondir) + + if not dir_ in sys.path: + sys.path.insert(0, dir_) + +# Call a function as a plain import would not execute body of the included file +# on repeated reloads of this object file. +from libstdcxx.v6 import register_libstdcxx_printers +register_libstdcxx_printers(gdb.current_objfile()) diff --git a/devkitARM/arm-none-eabi/lib/thumb/libobjc.la b/devkitARM/arm-none-eabi/lib/be/libstdc++.la similarity index 85% rename from devkitARM/arm-none-eabi/lib/thumb/libobjc.la rename to devkitARM/arm-none-eabi/lib/be/libstdc++.la index b3bec1ac3..0b32124c8 100644 --- a/devkitARM/arm-none-eabi/lib/thumb/libobjc.la +++ b/devkitARM/arm-none-eabi/lib/be/libstdc++.la @@ -1,4 +1,4 @@ -# libobjc.la - a libtool library file +# libstdc++.la - a libtool library file # Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a # # Please DO NOT delete this file! @@ -11,7 +11,7 @@ dlname='' library_names='' # The name of the static archive. -old_library='libobjc.a' +old_library='libstdc++.a' # Linker flags that can not go in dependency_libs. inherited_linker_flags='' @@ -22,10 +22,10 @@ dependency_libs='' # Names of additional weak libraries provided by this library weak_library_names='' -# Version information for libobjc. -current=4 +# Version information for libstdc++. +current=6 age=0 -revision=0 +revision=23 # Is this an already installed library? installed=yes @@ -38,4 +38,4 @@ dlopen='' dlpreopen='' # Directory that this library needs to be installed in: -libdir='/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib/thumb' +libdir='/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib/be' diff --git a/devkitARM/arm-none-eabi/lib/be/libsupc++.a b/devkitARM/arm-none-eabi/lib/be/libsupc++.a new file mode 100644 index 000000000..d249fbfa4 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/libsupc++.a differ diff --git a/devkitARM/arm-none-eabi/lib/libobjc.la b/devkitARM/arm-none-eabi/lib/be/libsupc++.la similarity index 87% rename from devkitARM/arm-none-eabi/lib/libobjc.la rename to devkitARM/arm-none-eabi/lib/be/libsupc++.la index 47fd15d98..545d5d27e 100644 --- a/devkitARM/arm-none-eabi/lib/libobjc.la +++ b/devkitARM/arm-none-eabi/lib/be/libsupc++.la @@ -1,4 +1,4 @@ -# libobjc.la - a libtool library file +# libsupc++.la - a libtool library file # Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a # # Please DO NOT delete this file! @@ -11,7 +11,7 @@ dlname='' library_names='' # The name of the static archive. -old_library='libobjc.a' +old_library='libsupc++.a' # Linker flags that can not go in dependency_libs. inherited_linker_flags='' @@ -22,8 +22,8 @@ dependency_libs='' # Names of additional weak libraries provided by this library weak_library_names='' -# Version information for libobjc. -current=4 +# Version information for libsupc++. +current=0 age=0 revision=0 @@ -38,4 +38,4 @@ dlopen='' dlpreopen='' # Directory that this library needs to be installed in: -libdir='/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib' +libdir='/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib/be' diff --git a/devkitARM/arm-none-eabi/lib/be/libsysbase.a b/devkitARM/arm-none-eabi/lib/be/libsysbase.a new file mode 100644 index 000000000..5822b97e6 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/libsysbase.a differ diff --git a/devkitARM/arm-none-eabi/lib/be/linux-crt0.o b/devkitARM/arm-none-eabi/lib/be/linux-crt0.o new file mode 100644 index 000000000..62708d93c Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/linux-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/be/linux.specs b/devkitARM/arm-none-eabi/lib/be/linux.specs new file mode 100644 index 000000000..3e8b6865e --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/linux.specs @@ -0,0 +1,11 @@ +%rename lib libc + +*libgloss: +-lgloss-linux + +*lib: +%(libc) %(libgloss) + +*startfile: +linux-crt0%O%s crti%O%s crtbegin%O%s + diff --git a/devkitARM/arm-none-eabi/lib/be/nano.specs b/devkitARM/arm-none-eabi/lib/be/nano.specs new file mode 100644 index 000000000..575f47d38 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/nano.specs @@ -0,0 +1,22 @@ +%rename link nano_link +%rename link_gcc_c_sequence nano_link_gcc_c_sequence +%rename cpp nano_cpp + +*cpp: +-isystem =/include/newlib-nano %(nano_cpp) + +*nano_libc: +-lc_nano + +*nano_libgloss: +%{specs=rdimon.specs:-lrdimon_nano} %{specs=nosys.specs:-lnosys} + +*link_gcc_c_sequence: +%(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group + +*link: +%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) %:replace-outfile(-lrdimon -lrdimon_nano) %:replace-outfile(-lstdc++ -lstdc++_nano) %:replace-outfile(-lsupc++ -lsupc++_nano) + +*lib: +%{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}} + diff --git a/devkitARM/arm-none-eabi/lib/be/nosys.specs b/devkitARM/arm-none-eabi/lib/be/nosys.specs new file mode 100644 index 000000000..3a84db3b5 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/nosys.specs @@ -0,0 +1,11 @@ +%rename link_gcc_c_sequence nosys_link_gcc_c_sequence + +*nosys_libgloss: +-lnosys + +*nosys_libc: +%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano} + +*link_gcc_c_sequence: +%(nosys_link_gcc_c_sequence) --start-group %G %(nosys_libc) %(nosys_libgloss) --end-group + diff --git a/devkitARM/arm-none-eabi/lib/be/pid.specs b/devkitARM/arm-none-eabi/lib/be/pid.specs new file mode 100644 index 000000000..c8a9f14c9 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/pid.specs @@ -0,0 +1,8 @@ +%rename link old_link + +*link: +-T redboot.ld%s -Ttext 0x10000 %(old_link) + +*startfile: +crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s + diff --git a/devkitARM/arm-none-eabi/lib/be/rdimon-crt0.o b/devkitARM/arm-none-eabi/lib/be/rdimon-crt0.o new file mode 100644 index 000000000..df5144a62 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/rdimon-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/be/rdimon.specs b/devkitARM/arm-none-eabi/lib/be/rdimon.specs new file mode 100644 index 000000000..c35061f3a --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/rdimon.specs @@ -0,0 +1,14 @@ +%rename link_gcc_c_sequence rdimon_link_gcc_c_sequence + +*rdimon_libc: +%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano} + +*rdimon_libgloss: +%{!specs=nano.specs:-lrdimon} %{specs=nano.specs:-lrdimon_nano} + +*link_gcc_c_sequence: +%(rdimon_link_gcc_c_sequence) --start-group %G %(rdimon_libc) %(rdimon_libgloss) --end-group + +*startfile: +crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s} + diff --git a/devkitARM/arm-none-eabi/lib/be/rdpmon-crt0.o b/devkitARM/arm-none-eabi/lib/be/rdpmon-crt0.o new file mode 100644 index 000000000..08198c4dd Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/rdpmon-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/be/rdpmon.specs b/devkitARM/arm-none-eabi/lib/be/rdpmon.specs new file mode 100644 index 000000000..903db1fb1 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/rdpmon.specs @@ -0,0 +1,8 @@ +%rename link old_link + +*link: +%(old_link) -lrdpmon + +*startfile: +crti%O%s crtbegin%O%s %{!pg:rdpmon-crt0%O%s} %{pg:rdpmon-crt0%O%s} + diff --git a/devkitARM/arm-none-eabi/lib/be/redboot-crt0.o b/devkitARM/arm-none-eabi/lib/be/redboot-crt0.o new file mode 100644 index 000000000..5d60099f5 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/redboot-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/be/redboot-syscalls.o b/devkitARM/arm-none-eabi/lib/be/redboot-syscalls.o new file mode 100644 index 000000000..915c8e98a Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/be/redboot-syscalls.o differ diff --git a/devkitARM/arm-none-eabi/lib/be/redboot.ld b/devkitARM/arm-none-eabi/lib/be/redboot.ld new file mode 100644 index 000000000..3d1f8d806 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/redboot.ld @@ -0,0 +1,220 @@ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", + "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +/* Do we need any of these for elf? + __DYNAMIC = 0; */ +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = 0x00020000; + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.text : + { + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t*) + } + .rela.text : + { + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t*) + } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.rodata : + { + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r*) + } + .rela.rodata : + { + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r*) + } + .rel.data : + { + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d*) + } + .rela.data : + { + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d*) + } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.sdata : + { + *(.rel.sdata) + *(.rel.sdata.*) + *(.rel.gnu.linkonce.s*) + } + .rela.sdata : + { + *(.rela.sdata) + *(.rela.sdata.*) + *(.rela.gnu.linkonce.s*) + } + .rel.sbss : { *(.rel.sbss) } + .rela.sbss : { *(.rela.sbss) } + .rel.bss : { *(.rel.bss) } + .rela.bss : { *(.rela.bss) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .plt : { *(.plt) } + .text : + { + *(.text) + *(.text.*) + *(.stub) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t*) + *(.glue_7t) *(.glue_7) + } =0 + .init : + { + KEEP (*(.init)) + } =0 + _etext = .; + PROVIDE (etext = .); + .fini : + { + KEEP (*(.fini)) + } =0 + .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) } + .rodata1 : { *(.rodata1) } + .eh_frame_hdr : { *(.eh_frame_hdr) } + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = ALIGN(256) + (. & (256 - 1)); + .data : + { + *(.data) + *(.data.*) + *(.gnu.linkonce.d*) + SORT(CONSTRUCTORS) + } + .data1 : { *(.data1) } + .eh_frame : { KEEP (*(.eh_frame)) } + .gcc_except_table : { *(.gcc_except_table) } + .ctors : + { + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + KEEP (*crtbegin.o(.ctors)) + /* We don't want to include the .ctor section from + from the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + } + .jcr : { KEEP (*(.jcr)) } + .got : { *(.got.plt) *(.got) } + .dynamic : { *(.dynamic) } + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : + { + *(.sdata) + *(.sdata.*) + *(.gnu.linkonce.s.*) + } + _edata = .; + PROVIDE (edata = .); + __bss_start = .; + __bss_start__ = .; + .sbss : + { + *(.dynsbss) + *(.sbss) + *(.sbss.*) + *(.scommon) + } + .bss : + { + *(.dynbss) + *(.bss) + *(.bss.*) + *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. */ + . = ALIGN(32 / 8); + } + . = ALIGN(32 / 8); + _end = .; + _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; + PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + .debug_ranges 0 : { *(.debug_ranges) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + .stack 0x80000 : { _stack = .; *(.stack) } + /* These must appear regardless of . */ +} diff --git a/devkitARM/arm-none-eabi/lib/be/redboot.specs b/devkitARM/arm-none-eabi/lib/be/redboot.specs new file mode 100644 index 000000000..8a00c3b6d --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/be/redboot.specs @@ -0,0 +1,8 @@ +%rename link old_link + +*link: +-T redboot.ld%s -Ttext 0x20000 %(old_link) + +*startfile: +crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s + diff --git a/devkitARM/arm-none-eabi/lib/cpu-init/rdimon-aem.o b/devkitARM/arm-none-eabi/lib/cpu-init/rdimon-aem.o index 5ddc1eb02..0acf0ebad 100644 Binary files a/devkitARM/arm-none-eabi/lib/cpu-init/rdimon-aem.o and b/devkitARM/arm-none-eabi/lib/cpu-init/rdimon-aem.o differ diff --git a/devkitARM/arm-none-eabi/lib/crt0.o b/devkitARM/arm-none-eabi/lib/crt0.o index dbb34dcaa..30cce8fe7 100644 Binary files a/devkitARM/arm-none-eabi/lib/crt0.o and b/devkitARM/arm-none-eabi/lib/crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/dldi.ld b/devkitARM/arm-none-eabi/lib/dldi.ld index ae8f0185a..e39228fe4 100644 --- a/devkitARM/arm-none-eabi/lib/dldi.ld +++ b/devkitARM/arm-none-eabi/lib/dldi.ld @@ -8,16 +8,16 @@ MEMORY { the patcher / linker to find all shifted addresses within each section. Changed sections are: glue_7, got */ - ddmem : ORIGIN = 0xBF800000, LENGTH = 32K + ddmem : ORIGIN = 0xBF800000, LENGTH = 16K } SECTIONS { - .init : + .crt0 : { __text_start = . ; - KEEP (*(.init)) + KEEP (*(.crt0)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ } >ddmem = 0xff diff --git a/devkitARM/arm-none-eabi/lib/ds_arm7.ld b/devkitARM/arm-none-eabi/lib/ds_arm7.ld index e92d798eb..530ceaa7f 100644 --- a/devkitARM/arm-none-eabi/lib/ds_arm7.ld +++ b/devkitARM/arm-none-eabi/lib/ds_arm7.ld @@ -2,10 +2,21 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) -MEMORY { - rom : ORIGIN = 0x08000000, LENGTH = 32M - iwram : ORIGIN = 0x037f8000, LENGTH = 96K +PHDRS { + crt0 PT_LOAD FLAGS(7); + arm7 PT_LOAD FLAGS(7); + arm7i PT_LOAD FLAGS(0x100007); +} + + +MEMORY { + ewram : ORIGIN = 0x02380000, LENGTH = 12M - 512K + rom : ORIGIN = 0x08000000, LENGTH = 32M + iwram : ORIGIN = 0x037f8000, LENGTH = 96K + + twl_ewram : ORIGIN = 0x02e80000, LENGTH = 512K - 64K + twl_iwram : ORIGIN = 0x03000000, LENGTH = 256K } __iwram_start = ORIGIN(iwram); @@ -21,30 +32,57 @@ __irq_vector = 0x04000000 - 4; SECTIONS { - .init : - { - __text_start = . ; - KEEP (*(.init)) - . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >iwram = 0xff - .plt : { *(.plt) } >iwram = 0xff - .text : /* ALIGN (4): */ + .twl : { + __arm7i_lma__ = LOADADDR(.twl); + __arm7i_start__ = .; + *(.twl) + *.twl*(.text .stub .text.* .gnu.linkonce.t.*) + *.twl*(.rodata) + *.twl*(.roda) + *.twl*(.rodata.*) + *.twl*(.data) + *.twl*(.data.*) + *.twl*(.gnu.linkonce.d*) + __arm7i_end__ = .; + } >twl_iwram AT>twl_ewram :arm7i + + .twl_bss ALIGN(4) (NOLOAD) : + { + __twl_bss_start__ = .; + *(.twl_bss) + *.twl.*(.dynbss) + *.twl.*(.gnu.linkonce.b*) + *.twl.*(.bss*) + *.twl.*(COMMON) + __twl_bss_end__ = .; + } >twl_iwram :NONE + + .crt0 : + { + KEEP (*(.crt0)) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + } >ewram :crt0 + + .text : + { + __arm7_lma__ = LOADADDR(.text); + __arm7_start__ = .; + KEEP (*(SORT_NONE(.init))) + *(.plt) *(.text .stub .text.* .gnu.linkonce.t.*) KEEP (*(.text.*personality*)) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.glue_7t) *(.glue_7) *(.vfp11_veneer) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >iwram = 0xff + } >iwram AT>ewram :arm7 .fini : { KEEP (*(.fini)) - } >iwram =0xff - - __text_end = . ; + } >iwram AT>ewram .rodata : { @@ -55,27 +93,38 @@ SECTIONS *(.gnu.linkonce.r*) SORT(CONSTRUCTORS) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >iwram = 0xff + } >iwram AT>ewram - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >iwram - __exidx_start = .; - .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >iwram - __exidx_end = .; + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >iwram AT>ewram + + .ARM.exidx : { + __exidx_start = .; + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + __exidx_end = .; + } >iwram AT>ewram /* Ensure the __preinit_array_start label is properly aligned. We could instead move the label definition inside the section, but the linker would then create the section even if it turns out to be empty, which isn't pretty. */ - . = ALIGN(32 / 8); - PROVIDE (__preinit_array_start = .); - .preinit_array : { KEEP (*(.preinit_array)) } >iwram = 0xff - PROVIDE (__preinit_array_end = .); - PROVIDE (__init_array_start = .); - .init_array : { KEEP (*(.init_array)) } >iwram = 0xff - PROVIDE (__init_array_end = .); - PROVIDE (__fini_array_start = .); - .fini_array : { KEEP (*(.fini_array)) } >iwram = 0xff - PROVIDE (__fini_array_end = .); + .preinit_array : { + . = ALIGN(32 / 8); + PROVIDE (__preinit_array_start = .); + KEEP (*(.preinit_array)) + PROVIDE (__preinit_array_end = .); + } >iwram AT>ewram + + .init_array : { + PROVIDE (__init_array_start = .); + KEEP (*(.init_array)) + PROVIDE (__init_array_end = .); + } >iwram AT>ewram + + .fini_array : { + PROVIDE (__fini_array_start = .); + KEEP (*(.fini_array)) + PROVIDE (__fini_array_end = .); + } >iwram AT>ewram .ctors : { @@ -90,7 +139,7 @@ SECTIONS KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >iwram = 0xff + } >iwram AT>ewram .dtors : { @@ -99,21 +148,21 @@ SECTIONS KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >iwram = 0xff + } >iwram AT>ewram .eh_frame : { KEEP (*(.eh_frame)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >iwram = 0xff + } >iwram AT>ewram .gcc_except_table : { *(.gcc_except_table) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >iwram = 0xff - .jcr : { KEEP (*(.jcr)) } >iwram = 0 - .got : { *(.got.plt) *(.got) } >iwram = 0 + } >iwram AT>ewram + .jcr : { KEEP (*(.jcr)) } >iwram AT>ewram + .got : { *(.got.plt) *(.got) } >iwram AT>ewram .data ALIGN(4) : { __data_start = ABSOLUTE(.); @@ -123,10 +172,11 @@ SECTIONS CONSTRUCTORS . = ALIGN(4); __data_end = ABSOLUTE(.) ; - } >iwram = 0xff + } >iwram AT>ewram - .bss ALIGN(4) : + .bss ALIGN(4) (NOLOAD) : { + __arm7_end__ = .; __bss_start = ABSOLUTE(.); __bss_start__ = ABSOLUTE(.); *(.dynbss) @@ -171,6 +221,5 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - .stack 0x80000 : { _stack = .; *(.stack) } /* These must appear regardless of . */ -} +} \ No newline at end of file diff --git a/devkitARM/arm-none-eabi/lib/ds_arm7_crt0.o b/devkitARM/arm-none-eabi/lib/ds_arm7_crt0.o index 341d10cf4..7ae28ea94 100644 Binary files a/devkitARM/arm-none-eabi/lib/ds_arm7_crt0.o and b/devkitARM/arm-none-eabi/lib/ds_arm7_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/ds_arm7_crt0.s b/devkitARM/arm-none-eabi/lib/ds_arm7_crt0.s index bb27fd691..03d570da2 100644 --- a/devkitARM/arm-none-eabi/lib/ds_arm7_crt0.s +++ b/devkitARM/arm-none-eabi/lib/ds_arm7_crt0.s @@ -1,5 +1,5 @@ @--------------------------------------------------------------------------------- - .section ".init" + .section ".crt0","ax" .global _start @--------------------------------------------------------------------------------- .align 4 @@ -23,11 +23,53 @@ _start: msr cpsr, r0 ldr sp, =__sp_usr @ Set user stack +#ifndef VRAM + adr r1, __sync_start @ Perform ARM7<->ARM9 sync code + ldr r2, =__arm7_start__ + mov r3, #(__sync_end-__sync_start) + mov r8, r2 + bl CopyMem + mov r3, r8 + bl _blx_r3_stub + +@--------------------------------------------------------------------------------- +@ Copy arm7 binary from LMA to VMA (EWRAM to IWRAM) +@--------------------------------------------------------------------------------- + adr r0, arm7lma @ Calculate ARM7 LMA + ldr r1, [r0] + add r1, r1, r0 + ldr r2, =__arm7_start__ + ldr r4, =__arm7_end__ + bl CopyMemCheck + +#else + bl __sync_start +#endif + ldr r0, =__bss_start__ @ Clear BSS section to 0x00 ldr r1, =__bss_end__ sub r1, r1, r0 bl ClearMem +#ifndef VRAM + cmp r10, #1 + bne NotTWL + ldr r1, =__dsimode @ set DSi mode flag + strb r10, [r1] + + ldr r1, =0x02ffe1d8 @ Get ARM7i LMA from header + ldr r1, [r1] + ldr r2, =__arm7i_start__ + ldr r4, =__arm7i_end__ + bl CopyMemCheck + + ldr r0, =__twl_bss_start__ @ Clear TWL BSS section to 0x00 + ldr r1, =__twl_bss_end__ + sub r1, r1, r0 + bl ClearMem +#endif + +NotTWL: ldr r3, =__libc_init_array @ global constructors bl _blx_r3_stub @@ -35,14 +77,51 @@ _start: mov r1, #0 @ char *argv[] ldr r3, =main ldr lr,=__libnds_exit - bx r3 - - -@--------------------------------------------------------------------------------- + mov r12, #0x4000000 @ tell arm9 we are ready + mov r9, #0 + str r9, [r12, #0x180] _blx_r3_stub: -@--------------------------------------------------------------------------------- bx r3 +#ifndef VRAM +arm7lma: + .word __arm7_lma__ - . +#endif + .pool + +@--------------------------------------------------------------------------------- +@ ARM7<->ARM9 synchronization code +@--------------------------------------------------------------------------------- + +__sync_start: + push {lr} + mov r12, #0x4000000 + mov r9, #0x0 + bl IPCSync + mov r9, #(0x9<<8) + str r9, [r12, #0x180] + mov r9, #0xA + bl IPCSync + mov r9, #(0xB<<8) + str r9, [r12, #0x180] + mov r9, #0xC + bl IPCSync + mov r9, #(0xD<<8) + str r9, [r12, #0x180] +IPCRecvFlag: + ldr r10, [r12, #0x180] + and r10, r10, #0xF + cmp r10, #0xC + beq IPCRecvFlag + pop {pc} +IPCSync: + ldr r10, [r12, #0x180] + and r10, r10, #0xF + cmp r10, r9 + bne IPCSync + bx lr +__sync_end: + @--------------------------------------------------------------------------------- @ Clear memory to 0x00 if length != 0 @ r0 = Start Address @@ -70,6 +149,9 @@ ClrLoop: @--------------------------------------------------------------------------------- CopyMemCheck: @--------------------------------------------------------------------------------- + cmp r1, r2 + bxeq lr + sub r3, r4, r2 @ Is there any data to copy? @--------------------------------------------------------------------------------- @ Copy memory diff --git a/devkitARM/arm-none-eabi/lib/ds_arm7_iwram.ld b/devkitARM/arm-none-eabi/lib/ds_arm7_iwram.ld new file mode 100644 index 000000000..64673b9e4 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/ds_arm7_iwram.ld @@ -0,0 +1,187 @@ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) + +MEMORY { + + rom : ORIGIN = 0x08000000, LENGTH = 32M + iwram : ORIGIN = 0x037f8000, LENGTH = 96K +} + +__iwram_start = ORIGIN(iwram); +__iwram_top = ORIGIN(iwram)+ LENGTH(iwram); + +__sp_irq = __iwram_top - 0x100; +__sp_svc = __sp_irq - 0x100; +__sp_usr = __sp_svc - 0x100; + +__irq_flags = 0x04000000 - 8; +__irq_flagsaux = 0x04000000 - 0x40; +__irq_vector = 0x04000000 - 4; + +SECTIONS +{ + .crt0 : + { + __text_start = . ; + KEEP (*(.crt0)) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + } >iwram = 0xff + + .init : + { + KEEP (*(SORT_NONE(.init))) + } >iwram = 0xff + + .plt : { *(.plt) } >iwram = 0xff + + .text : /* ALIGN (4): */ + { + *(.text .stub .text.* .gnu.linkonce.t.*) + KEEP (*(.text.*personality*)) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.glue_7t) *(.glue_7) *(.vfp11_veneer) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + } >iwram = 0xff + + .fini : + { + KEEP (*(.fini)) + } >iwram =0xff + + __text_end = . ; + + .rodata : + { + *(.rodata) + *all.rodata*(*) + *(.roda) + *(.rodata.*) + *(.gnu.linkonce.r*) + SORT(CONSTRUCTORS) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + } >iwram = 0xff + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >iwram + __exidx_start = .; + .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >iwram + __exidx_end = .; + +/* Ensure the __preinit_array_start label is properly aligned. We + could instead move the label definition inside the section, but + the linker would then create the section even if it turns out to + be empty, which isn't pretty. */ + . = ALIGN(32 / 8); + PROVIDE (__preinit_array_start = .); + .preinit_array : { KEEP (*(.preinit_array)) } >iwram = 0xff + PROVIDE (__preinit_array_end = .); + PROVIDE (__init_array_start = .); + .init_array : { KEEP (*(.init_array)) } >iwram = 0xff + PROVIDE (__init_array_end = .); + PROVIDE (__fini_array_start = .); + .fini_array : { KEEP (*(.fini_array)) } >iwram = 0xff + PROVIDE (__fini_array_end = .); + + .ctors : + { + /* gcc uses crtbegin.o to find the start of the constructors, so + we make sure it is first. Because this is a wildcard, it + doesn't matter if the user does not actually link against + crtbegin.o; the linker won't look for a file to match a + wildcard. The wildcard also means that it doesn't matter which + directory crtbegin.o is in. */ + KEEP (*crtbegin.o(.ctors)) + KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + } >iwram = 0xff + + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + } >iwram = 0xff + + .eh_frame : + { + KEEP (*(.eh_frame)) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + } >iwram = 0xff + + .gcc_except_table : + { + *(.gcc_except_table) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + } >iwram = 0xff + .jcr : { KEEP (*(.jcr)) } >iwram = 0 + .got : { *(.got.plt) *(.got) } >iwram = 0 + + + .data ALIGN(4) : { + __data_start = ABSOLUTE(.); + *(.data) + *(.data.*) + *(.gnu.linkonce.d*) + CONSTRUCTORS + . = ALIGN(4); + __data_end = ABSOLUTE(.) ; + } >iwram = 0xff + + + __arm7_end__ = .; + + + .bss ALIGN(4) : + { + __bss_start = ABSOLUTE(.); + __bss_start__ = ABSOLUTE(.); + *(.dynbss) + *(.gnu.linkonce.b*) + *(.bss*) + *(COMMON) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + __bss_end__ = ABSOLUTE(.); + __end__ = ABSOLUTE(.); + } >iwram + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + .stack 0x80000 : { _stack = .; *(.stack) } + /* These must appear regardless of . */ +} diff --git a/devkitARM/arm-none-eabi/lib/ds_arm7_iwram.specs b/devkitARM/arm-none-eabi/lib/ds_arm7_iwram.specs new file mode 100644 index 000000000..b5c7a9d62 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/ds_arm7_iwram.specs @@ -0,0 +1,8 @@ +%rename link old_link + +*link: +%(old_link) -T ds_arm7_iwram.ld%s + +*startfile: +ds_arm7_vram_crt0%O%s crti%O%s crtbegin%O%s + diff --git a/devkitARM/arm-none-eabi/lib/ds_arm7_vram.ld b/devkitARM/arm-none-eabi/lib/ds_arm7_vram.ld index 1f3ac5f12..4118f75c6 100644 --- a/devkitARM/arm-none-eabi/lib/ds_arm7_vram.ld +++ b/devkitARM/arm-none-eabi/lib/ds_arm7_vram.ld @@ -6,7 +6,7 @@ MEMORY { rom : ORIGIN = 0x08000000, LENGTH = 32M iwram : ORIGIN = 0x037f8000, LENGTH = 96K - vram : ORIGIN = 0x06000000, LENGTH = 128K + vram : ORIGIN = 0x06000000, LENGTH = 256K } __iwram_start = ORIGIN(iwram); @@ -22,12 +22,20 @@ __irq_vector = 0x04000000 - 4; SECTIONS { - .init : + .crt0 : { __text_start = . ; - KEEP (*(.init)) + KEEP (*(.crt0)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >vram = 0xff + } >vram = 0xff + + __arm7_lma__ = .; + __arm7_start__ = .; + .init : + { + KEEP (*(SORT_NONE(.init))) + } >vram = 0xff + .plt : { *(.plt) } >vram = 0xff .text : /* ALIGN (4): */ @@ -128,6 +136,8 @@ SECTIONS } >vram = 0xff + __arm7_end__ = .; + .bss ALIGN(4) : { diff --git a/devkitARM/arm-none-eabi/lib/ds_arm7_vram.specs b/devkitARM/arm-none-eabi/lib/ds_arm7_vram.specs index e76a0b43e..322698c4c 100644 --- a/devkitARM/arm-none-eabi/lib/ds_arm7_vram.specs +++ b/devkitARM/arm-none-eabi/lib/ds_arm7_vram.specs @@ -4,5 +4,5 @@ %(old_link) -T ds_arm7_vram.ld%s *startfile: -ds_arm7_crt0%O%s crti%O%s crtbegin%O%s +ds_arm7_vram_crt0%O%s crti%O%s crtbegin%O%s diff --git a/devkitARM/arm-none-eabi/lib/ds_arm7_vram_crt0.o b/devkitARM/arm-none-eabi/lib/ds_arm7_vram_crt0.o new file mode 100644 index 000000000..66dcdb92b Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/ds_arm7_vram_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/ds_arm9.ld b/devkitARM/arm-none-eabi/lib/ds_arm9.ld index 967158906..67b68e02c 100644 --- a/devkitARM/arm-none-eabi/lib/ds_arm9.ld +++ b/devkitARM/arm-none-eabi/lib/ds_arm9.ld @@ -2,11 +2,9 @@ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) -__vectors_start = ORIGIN(vectors); -__itcm_start = ORIGIN(itcm); __ewram_end = ORIGIN(ewram) + LENGTH(ewram); __eheap_end = ORIGIN(ewram) + LENGTH(ewram); -__dtcm_start = ORIGIN(dtcm); + __dtcm_top = ORIGIN(dtcm) + LENGTH(dtcm); __irq_flags = __dtcm_top - 0x08; __irq_vector = __dtcm_top - 0x04; @@ -15,52 +13,67 @@ __sp_svc = __dtcm_top - 0x100; __sp_irq = __sp_svc - 0x100; __sp_usr = __sp_irq - 0x100; +PHDRS { + main PT_LOAD FLAGS(7); + dtcm PT_LOAD FLAGS(7); + itcm PT_LOAD FLAGS(7); + vectors PT_LOAD FLAGS(7); + twl PT_LOAD FLAGS(0x100007); +} + SECTIONS { - .init : + /* Secure area crap */ + .secure : { *(.secure) } >ewram :main = 0 + + .crt0 : { __text_start = . ; - KEEP (*(.init)) + KEEP (*(.crt0)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >ewram = 0xff + } >ewram :main = 0x00 - .plt : { *(.plt) } >ewram = 0xff + .plt : { *(.plt) } >ewram :main = 0xff + + .init : + { + KEEP (*(SORT_NONE(.init))) + } >ewram :main .text : /* ALIGN (4): */ { - *(EXCLUDE_FILE (*.itcm*) .text) - - *(.text.*) - *(.stub) + *(EXCLUDE_FILE(*.itcm* *.vectors* *.twl*) .text) + *(EXCLUDE_FILE(*.itcm* *.vectors* *.twl*) .stub) + *(EXCLUDE_FILE(*.itcm* *.vectors* *.twl*) .text.*) /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.gnu.linkonce.t*) + *(EXCLUDE_FILE(*.twl*) .gnu.warning) + *(EXCLUDE_FILE(*.twl*) .gnu.linkonce.t*) *(.glue_7) *(.glue_7t) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >ewram = 0xff + } >ewram :main = 0xff .fini : { KEEP (*(.fini)) - } >ewram =0xff + } >ewram :main =0xff __text_end = . ; .rodata : { - *(.rodata) + *(EXCLUDE_FILE(*.twl*) .rodata) *all.rodata*(*) - *(.roda) - *(.rodata.*) - *(.gnu.linkonce.r*) + *(EXCLUDE_FILE(*.twl*) .roda) + *(EXCLUDE_FILE(*.twl*) .rodata.*) + *(EXCLUDE_FILE(*.twl*) .gnu.linkonce.r*) SORT(CONSTRUCTORS) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >ewram = 0xff + } >ewram :main = 0xff - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >ewram + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >ewram :main __exidx_start = .; - ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >ewram + ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >ewram :main __exidx_end = .; /* Ensure the __preinit_array_start label is properly aligned. We @@ -71,21 +84,21 @@ SECTIONS . = ALIGN(32 / 8); PROVIDE (__preinit_array_start = .); - .preinit_array : { KEEP (*(.preinit_array)) } >ewram = 0xff + .preinit_array : { KEEP (*(.preinit_array)) } >ewram :main = 0xff PROVIDE (__preinit_array_end = .); PROVIDE (__init_array_start = .); .init_array : { KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) - } >ewram = 0xff + } >ewram :main = 0xff PROVIDE (__init_array_end = .); PROVIDE (__fini_array_start = .); .fini_array : { KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) - } >ewram = 0xff + } >ewram :main = 0xff PROVIDE (__fini_array_end = .); @@ -102,7 +115,7 @@ SECTIONS KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >ewram = 0xff + } >ewram :main = 0xff .dtors : { @@ -111,21 +124,21 @@ SECTIONS KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >ewram = 0xff + } >ewram :main = 0xff .eh_frame : { KEEP (*(.eh_frame)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >ewram = 0xff + } >ewram :main = 0xff .gcc_except_table : { *(.gcc_except_table) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >ewram = 0xff - .jcr : { KEEP (*(.jcr)) } >ewram = 0 - .got : { *(.got.plt) *(.got) *(.rel.got) } >ewram = 0 + } >ewram :main = 0xff + .jcr : { KEEP (*(.jcr)) } >ewram :main = 0 + .got : { *(.got.plt) *(.got) *(.rel.got) } >ewram :main = 0 .ewram ALIGN(4) : { @@ -133,52 +146,51 @@ SECTIONS *(.ewram) *ewram.*(.text) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >ewram = 0xff + } >ewram :main = 0xff .data ALIGN(4) : { __data_start = ABSOLUTE(.); - *(.data) - *(.data.*) - *(.gnu.linkonce.d*) + *(EXCLUDE_FILE(*.twl*) .data) + *(EXCLUDE_FILE(*.twl*) .data.*) + *(EXCLUDE_FILE(*.twl*) .gnu.linkonce.d*) CONSTRUCTORS . = ALIGN(4); __data_end = ABSOLUTE(.) ; - } >ewram = 0xff + } >ewram :main = 0xff - - __dtcm_lma = . ; __bss_vma = . ; - .dtcm __dtcm_start : AT (__dtcm_lma) + .dtcm : { + __dtcm_lma = LOADADDR(.dtcm); + __dtcm_start = ABSOLUTE(.); *(.dtcm) *(.dtcm.*) . = ALIGN(4); __dtcm_end = ABSOLUTE(.); - } >dtcm = 0xff + } >dtcm AT>ewram :dtcm = 0xff - - __itcm_lma = __dtcm_lma + SIZEOF(.dtcm); - - .itcm __itcm_start : AT (__itcm_lma) + .itcm : { + __itcm_lma = LOADADDR(.itcm); + __itcm_start = ABSOLUTE(.); *(.itcm) - *itcm.*(.text) + *.itcm*(.text .stub .text.*) . = ALIGN(4); __itcm_end = ABSOLUTE(.); - } >itcm = 0xff - - __vectors_lma = __itcm_lma + SIZEOF(.itcm); + } >itcm AT>ewram :itcm = 0xff - .vectors __vectors_start : AT (__vectors_lma) + .vectors : { + __vectors_lma = LOADADDR(.vectors); + __vectors_start = ABSOLUTE(.); *(.vectors) - *vectors.*(.text) + *.vectors*(.text .stub .text.*) . = ALIGN(4); __vectors_end = ABSOLUTE(.); - } >vectors = 0xff + } >vectors AT>ewram :vectors = 0xff .sbss __dtcm_end (NOLOAD): { @@ -187,22 +199,48 @@ SECTIONS *(.sbss) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ __sbss_end = ABSOLUTE(.); - } >dtcm + } >dtcm :NONE .bss __bss_vma (NOLOAD): { __bss_start = ABSOLUTE(.); __bss_start__ = ABSOLUTE(.); - *(.dynbss) - *(.gnu.linkonce.b*) - *(.bss*) - *(COMMON) + *(EXCLUDE_FILE(*.twl*) .dynbss) + *(EXCLUDE_FILE(*.twl*) .gnu.linkonce.b*) + *(EXCLUDE_FILE(*.twl*) .bss*) + *(EXCLUDE_FILE(*.twl*) COMMON) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ __bss_end__ = ABSOLUTE(.) ; __end__ = ABSOLUTE(.) ; - } AT>ewram + } >ewram :NONE + .twl __end__ : AT(MAX(0x2400000,MAX(__end__,LOADADDR(.vectors)+SIZEOF(.vectors)))) + { + __arm9i_lma__ = LOADADDR(.twl); + __arm9i_start__ = ABSOLUTE(.); + *(.twl) + *.twl*(.text .stub .text.* .gnu.linkonce.t.*) + *.twl*(.rodata) + *.twl*(.roda) + *.twl*(.rodata.*) + *.twl*(.data) + *.twl*(.data.*) + *.twl*(.gnu.linkonce.d*) + __arm9i_end__ = ABSOLUTE(.); + } :twl + .twl_bss __arm9i_end__ (NOLOAD): + { + __twl_bss_start__ = ABSOLUTE(.); + *(.twl_bss) + *.twl*(.dynbss) + *.twl*(.gnu.linkonce.b*) + *.twl*(.bss*) + *.twl*(COMMON) + . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + __twl_bss_end__ = ABSOLUTE(.); + __twl_end__ = ABSOLUTE(.); + } :NONE /* Stabs debugging sections. */ .stab 0 : { *(.stab) } diff --git a/devkitARM/arm-none-eabi/lib/ds_arm9.mem b/devkitARM/arm-none-eabi/lib/ds_arm9.mem index b29a6449d..1b3f0b4f0 100644 --- a/devkitARM/arm-none-eabi/lib/ds_arm9.mem +++ b/devkitARM/arm-none-eabi/lib/ds_arm9.mem @@ -1,7 +1,5 @@ MEMORY { - - rom : ORIGIN = 0x08000000, LENGTH = 32M - ewram : ORIGIN = 0x02000000, LENGTH = 4M - 4k + ewram : ORIGIN = 0x02000000, LENGTH = 4M - 512k dtcm : ORIGIN = 0x0b000000, LENGTH = 16K vectors : ORIGIN = 0x01000000, LENGTH = 256 itcm : ORIGIN = 0x01000100, LENGTH = 32K - 256 diff --git a/devkitARM/arm-none-eabi/lib/ds_arm9_crt0.o b/devkitARM/arm-none-eabi/lib/ds_arm9_crt0.o index 589670666..71b640573 100644 Binary files a/devkitARM/arm-none-eabi/lib/ds_arm9_crt0.o and b/devkitARM/arm-none-eabi/lib/ds_arm9_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/ds_arm9_crt0.s b/devkitARM/arm-none-eabi/lib/ds_arm9_crt0.s index 9d26e0baf..7b5850f6b 100644 --- a/devkitARM/arm-none-eabi/lib/ds_arm9_crt0.s +++ b/devkitARM/arm-none-eabi/lib/ds_arm9_crt0.s @@ -8,7 +8,7 @@ .equ _libnds_argv,0x02FFFE70 @--------------------------------------------------------------------------------- - .section ".init" + .section ".crt0","ax" .global _start @--------------------------------------------------------------------------------- .align 4 @@ -16,7 +16,7 @@ @--------------------------------------------------------------------------------- _start: @--------------------------------------------------------------------------------- - mov r0, #0x04000000 @ IME = 0; + mov r0, #0x04000000 @ IME = 0; str r0, [r0, #0x208] @ set sensible stacks to allow bios call @@ -46,12 +46,34 @@ _start: msr cpsr, r0 ldr sp, =__sp_usr @ Set user stack + mov r12, #0x4000000 @ Read system ROM status (NTR/TWL) + ldrb r11, [r12,r12,lsr #12] + and r11, r11, #0x3 + + mov r9, #(0x0<<8) @ Synchronize with ARM7 + str r9, [r12, #0x180] + mov r9, #0x9 + bl IPCSync + mov r9, #(0xA<<8) + str r9, [r12, #0x180] + mov r9, #0xB + bl IPCSync + mov r9, #(0xC<<8) + str r9, [r12, #0x180] + mov r9, #0xD + bl IPCSync + mov r9, r11, lsl #8 + str r9, [r12, #0x180] + mov r9, #0 + bl IPCSync + str r9, [r12, #0x180] + ldr r1, =__itcm_lma @ Copy instruction tightly coupled memory (itcm section) from LMA to VMA ldr r2, =__itcm_start ldr r4, =__itcm_end bl CopyMemCheck - ldr r1, =__vectors_lma @ Copy reserved vectors area (itcm section) from LMA to VMA + ldr r1, =__vectors_lma @ Copy reserved vectors area (itcm section) from LMA to VMA ldr r2, =__vectors_start ldr r4, =__vectors_end bl CopyMemCheck @@ -61,6 +83,9 @@ _start: ldr r4, =__dtcm_end bl CopyMemCheck + cmp r11, #1 + ldrne r10, =__end__ @ (DS mode) heap start + ldreq r10, =__twl_end__ @ (DSi mode) heap start bl checkARGV @ check and process argv trickery ldr r0, =__bss_start__ @ Clear BSS section @@ -72,20 +97,42 @@ _start: ldr r1, =__sbss_end sub r1, r1, r0 bl ClearMem - + cmp r11, #1 + bne NotTWL + ldr r9, =__dsimode @ set DSi mode flag + strb r11, [r9] + + @ Copy TWL area (arm9i section) from LMA to VMA + ldr r1, =0x02ffe1c8 @ Get ARM9i LMA from header + ldr r1, [r1] + + ldr r2, =__arm9i_start__ + cmp r1, r2 @ skip copy if LMA=VMA + ldrne r4, =__arm9i_end__ + blne CopyMemCheck + + ldr r0, =__twl_bss_start__ @ Clear TWL BSS section + ldr r1, =__twl_bss_end__ + sub r1, r1, r0 + bl ClearMem + +NotTWL: ldr r0, =_libnds_argv @ reset heap base ldr r2, [r0,#20] @ newheap base - ldr r1,=fake_heap_start - str r2,[r1] + cmp r2, #0 + moveq r2, r10 + ldr r1, =fake_heap_start @ set heap start + str r2, [r1] ldr r1, =fake_heap_end @ set heap end sub r8, r8,#0xc000 str r8, [r1] push {r0} + ldr r0, =__secure_area__ ldr r3, =initSystem blx r3 @ system initialisation @@ -121,7 +168,7 @@ checkARGV: ldr r2, [r0, #8] @ length of command line @ copy to heap - ldr r3, =__end__ @ initial heap base + mov r3, r10 @ initial heap base str r3, [r0, #4] @ set command line address cmp r2, #0 @@ -161,7 +208,7 @@ ClearMem: @--------------------------------------------------------------------------------- mov r2, #3 @ Round down to nearest word boundary add r1, r1, r2 @ Shouldn't be needed - bics r1, r1, r2 @ Clear 2 LSB (and set Z) + bics r1, r1, r2 @ Clear 2 LSB (and set Z) bxeq lr @ Quit if copy size is 0 mov r2, #0 @@ -191,7 +238,7 @@ CopyMem: @--------------------------------------------------------------------------------- mov r0, #3 @ These commands are used in cases where add r3, r3, r0 @ the length is not a multiple of 4, - bics r3, r3, r0 @ even though it should be. + bics r3, r3, r0 @ even though it should be. bxeq lr @ Length is zero, so exit CIDLoop: ldmia r1!, {r0} @@ -201,6 +248,17 @@ CIDLoop: bx lr +@--------------------------------------------------------------------------------- +@ Synchronize with ARM7 +@--------------------------------------------------------------------------------- +IPCSync: +@--------------------------------------------------------------------------------- + ldr r10, [r12, #0x180] + and r10, r10, #0xF + cmp r10, r9 + bne IPCSync + bx lr + @--------------------------------------------------------------------------------- .align .pool diff --git a/devkitARM/arm-none-eabi/lib/ds_cart.ld b/devkitARM/arm-none-eabi/lib/ds_cart.ld index 03590ddf8..baf205977 100644 --- a/devkitARM/arm-none-eabi/lib/ds_cart.ld +++ b/devkitARM/arm-none-eabi/lib/ds_cart.ld @@ -22,14 +22,25 @@ __irq_vector = __iwram_top - 4; SECTIONS { - .init : + .crt0 : { __text_start = . ; - KEEP (*(.init)) + KEEP (*(.crt0)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ - } >rom = 0xff + } >rom = 0xff + + .init : + { + KEEP (*(SORT_NONE(.init))) + } >rom = 0xff + .plt : { *(.plt) } >rom = 0xff + .init : + { + KEEP (*(SORT_NONE(.init))) + } >ewram + .text : /* ALIGN (4): */ { *(EXCLUDE_FILE (*.iwram*) .text) diff --git a/devkitARM/arm-none-eabi/lib/ds_cart_crt0.o b/devkitARM/arm-none-eabi/lib/ds_cart_crt0.o index 613d5a2f1..e8ae28cdb 100644 Binary files a/devkitARM/arm-none-eabi/lib/ds_cart_crt0.o and b/devkitARM/arm-none-eabi/lib/ds_cart_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/ds_cart_crt0.s b/devkitARM/arm-none-eabi/lib/ds_cart_crt0.s index e35815f8a..8b2c4daf1 100644 --- a/devkitARM/arm-none-eabi/lib/ds_cart_crt0.s +++ b/devkitARM/arm-none-eabi/lib/ds_cart_crt0.s @@ -1,5 +1,5 @@ @--------------------------------------------------------------------------------- - .section ".init" + .section ".crt0","ax" .global _start .arm @--------------------------------------------------------------------------------- diff --git a/devkitARM/arm-none-eabi/lib/dsi_arm9.mem b/devkitARM/arm-none-eabi/lib/dsi_arm9.mem index 7bee48430..a1d6aa8be 100644 --- a/devkitARM/arm-none-eabi/lib/dsi_arm9.mem +++ b/devkitARM/arm-none-eabi/lib/dsi_arm9.mem @@ -1,7 +1,5 @@ MEMORY { - - rom : ORIGIN = 0x08000000, LENGTH = 32M - ewram : ORIGIN = 0x02000000, LENGTH = 16M - 4k + ewram : ORIGIN = 0x02000000, LENGTH = 15M - 512k dtcm : ORIGIN = 0x0b000000, LENGTH = 16K vectors : ORIGIN = 0x01000000, LENGTH = 256 itcm : ORIGIN = 0x01000100, LENGTH = 32K - 256 diff --git a/devkitARM/arm-none-eabi/lib/er_crt0.o b/devkitARM/arm-none-eabi/lib/er_crt0.o index 8871a1664..d477e9501 100644 Binary files a/devkitARM/arm-none-eabi/lib/er_crt0.o and b/devkitARM/arm-none-eabi/lib/er_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/er_crt0.s b/devkitARM/arm-none-eabi/lib/er_crt0.s index 801ffa36d..af2b57baa 100644 --- a/devkitARM/arm-none-eabi/lib/er_crt0.s +++ b/devkitARM/arm-none-eabi/lib/er_crt0.s @@ -4,7 +4,7 @@ @ author : tim schuerewegen @ version : 1.0 @--------------------------------------------------------------------------------- - .section ".init" + .section ".crt0","ax" .global _start .align .arm diff --git a/devkitARM/arm-none-eabi/lib/gba_cart.ld b/devkitARM/arm-none-eabi/lib/gba_cart.ld index d9d01b635..2ce1d67b4 100644 --- a/devkitARM/arm-none-eabi/lib/gba_cart.ld +++ b/devkitARM/arm-none-eabi/lib/gba_cart.ld @@ -67,12 +67,18 @@ __irq_flags = 0x03007ff8; SECTIONS { . = __text_start; - .init : + .crt0 : { - KEEP (*(.init)) + KEEP (*(.crt0)) . = ALIGN(4); } >rom =0xff + + .init : + { + KEEP (*(SORT_NONE(.init))) + } >rom + .plt : { *(.plt) diff --git a/devkitARM/arm-none-eabi/lib/gba_crt0.o b/devkitARM/arm-none-eabi/lib/gba_crt0.o index 2a2161d3b..d963aca52 100644 Binary files a/devkitARM/arm-none-eabi/lib/gba_crt0.o and b/devkitARM/arm-none-eabi/lib/gba_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/gba_crt0.s b/devkitARM/arm-none-eabi/lib/gba_crt0.s index 39a4df9a8..a561751e0 100644 --- a/devkitARM/arm-none-eabi/lib/gba_crt0.s +++ b/devkitARM/arm-none-eabi/lib/gba_crt0.s @@ -1,7 +1,10 @@ - .section ".init" + .section ".crt0","ax" .global _start .align + .arm + .cpu arm7tdmi + @--------------------------------------------------------------------------------- _start: @--------------------------------------------------------------------------------- @@ -43,8 +46,8 @@ __slave_number: .word 0 @ reserved .word 0 @ reserved - .global start_vector - .align + .global start_vector + .align @--------------------------------------------------------------------------------- start_vector: @--------------------------------------------------------------------------------- diff --git a/devkitARM/arm-none-eabi/lib/gba_er.ld b/devkitARM/arm-none-eabi/lib/gba_er.ld index 3bc24c6c4..1ee456006 100644 --- a/devkitARM/arm-none-eabi/lib/gba_er.ld +++ b/devkitARM/arm-none-eabi/lib/gba_er.ld @@ -13,9 +13,9 @@ SECTIONS { . = 0x02000000; - .init : + .crt0 : { - *(.init) + *(.crt0) . = ALIGN(4); } = 0xff diff --git a/devkitARM/arm-none-eabi/lib/gba_mb.ld b/devkitARM/arm-none-eabi/lib/gba_mb.ld index 102cb4277..55636438e 100644 --- a/devkitARM/arm-none-eabi/lib/gba_mb.ld +++ b/devkitARM/arm-none-eabi/lib/gba_mb.ld @@ -61,18 +61,25 @@ __irq_flags = 0x03007ff8; SECTIONS { . = __text_start; - .init : + . = __text_start; + .crt0 : { - KEEP (*(.init)) + KEEP (*(.crt0)) . = ALIGN(4); } >ewram =0xff + .init : + { + KEEP (*(SORT_NONE(.init))) + } >ewram + .plt : - { + { *(.plt) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ } >ewram + .text ALIGN (4): { *(EXCLUDE_FILE (*.iwram*) .text) diff --git a/devkitARM/arm-none-eabi/lib/gp32.ld b/devkitARM/arm-none-eabi/lib/gp32.ld index 16b3143e3..f0826e0c5 100644 --- a/devkitARM/arm-none-eabi/lib/gp32.ld +++ b/devkitARM/arm-none-eabi/lib/gp32.ld @@ -9,12 +9,18 @@ MEMORY SECTIONS { - .init : + .crt0 : { __text_start = . ; - KEEP (*(.init)) + KEEP (*(.crt0)) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ } >ram = 0xff + + .init : + { + KEEP (*(SORT_NONE(.init))) + } >ram + .plt : { *(.plt) } >ram = 0xff diff --git a/devkitARM/arm-none-eabi/lib/gp32_crt0.o b/devkitARM/arm-none-eabi/lib/gp32_crt0.o index c1a34fbd7..a75eaed23 100644 Binary files a/devkitARM/arm-none-eabi/lib/gp32_crt0.o and b/devkitARM/arm-none-eabi/lib/gp32_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/gp32_crt0.s b/devkitARM/arm-none-eabi/lib/gp32_crt0.s index fc455c0fe..9eaf54e9f 100644 --- a/devkitARM/arm-none-eabi/lib/gp32_crt0.s +++ b/devkitARM/arm-none-eabi/lib/gp32_crt0.s @@ -1,4 +1,4 @@ - .section ".init" + .section ".crt0","ax" .code 32 .align .global _start diff --git a/devkitARM/arm-none-eabi/lib/gp32_gpsdk_crt0.o b/devkitARM/arm-none-eabi/lib/gp32_gpsdk_crt0.o index 0de677d96..0a5929ad0 100644 Binary files a/devkitARM/arm-none-eabi/lib/gp32_gpsdk_crt0.o and b/devkitARM/arm-none-eabi/lib/gp32_gpsdk_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.x b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.x index 465706f3e..73fa92cf7 100644 --- a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.x +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.x @@ -1,5 +1,5 @@ /* Default linker script, for normal executables */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -95,10 +95,11 @@ SECTIONS PROVIDE_HIDDEN (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } PROVIDE_HIDDEN (__exidx_end = .); - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* These sections are generated by the Sun/Oracle C++ compiler. */ .exception_ranges : ONLY_IF_RO { *(.exception_ranges .exception_ranges*) } @@ -106,7 +107,8 @@ SECTIONS the same address within the page on the next page up. */ . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ @@ -121,15 +123,15 @@ SECTIONS .init_array : { PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) PROVIDE_HIDDEN (__init_array_end = .); } .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) PROVIDE_HIDDEN (__fini_array_end = .); } .ctors : @@ -232,6 +234,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .stack 0x80000 : { _stack = .; diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xbn b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xbn index 422a80689..04218b994 100644 --- a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xbn +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xbn @@ -1,5 +1,5 @@ /* Script for -N: mix text and data on same page; don't align data */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -95,10 +95,11 @@ SECTIONS PROVIDE_HIDDEN (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } PROVIDE_HIDDEN (__exidx_end = .); - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* These sections are generated by the Sun/Oracle C++ compiler. */ .exception_ranges : ONLY_IF_RO { *(.exception_ranges .exception_ranges*) } @@ -106,7 +107,8 @@ SECTIONS the same address within the page on the next page up. */ . = .; /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ @@ -121,15 +123,15 @@ SECTIONS .init_array : { PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) PROVIDE_HIDDEN (__init_array_end = .); } .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) PROVIDE_HIDDEN (__fini_array_end = .); } .ctors : @@ -232,6 +234,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .stack 0x80000 : { _stack = .; diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xc b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xc index a6bf564de..33904f983 100644 --- a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xc +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xc @@ -1,5 +1,5 @@ /* Script for -z combreloc: combine and sort reloc sections */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -94,10 +94,11 @@ SECTIONS PROVIDE_HIDDEN (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } PROVIDE_HIDDEN (__exidx_end = .); - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* These sections are generated by the Sun/Oracle C++ compiler. */ .exception_ranges : ONLY_IF_RO { *(.exception_ranges .exception_ranges*) } @@ -105,7 +106,8 @@ SECTIONS the same address within the page on the next page up. */ . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ @@ -120,15 +122,15 @@ SECTIONS .init_array : { PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) PROVIDE_HIDDEN (__init_array_end = .); } .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) PROVIDE_HIDDEN (__fini_array_end = .); } .ctors : @@ -231,6 +233,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .stack 0x80000 : { _stack = .; diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xd b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xd new file mode 100644 index 000000000..3de2b134f --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xd @@ -0,0 +1,246 @@ +/* Script for ld -pie: link position independent executable */ +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. + Copying and distribution of this script, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. */ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", + "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SEARCH_DIR("/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib"); +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0)); . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; + .interp : { *(.interp) } + .note.gnu.build-id : { *(.note.gnu.build-id) } + .hash : { *(.hash) } + .gnu.hash : { *(.gnu.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } + .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } + .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } + .rel.data.rel.ro : { *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*) } + .rela.data.rel.ro : { *(.rela.data.rel.ro .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*) } + .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } + .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } + .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } + .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } + .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } + .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } + .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } + .rel.iplt : + { + PROVIDE_HIDDEN (__rel_iplt_start = .); + *(.rel.iplt) + PROVIDE_HIDDEN (__rel_iplt_end = .); + } + .rela.iplt : + { + PROVIDE_HIDDEN (__rela_iplt_start = .); + *(.rela.iplt) + PROVIDE_HIDDEN (__rela_iplt_end = .); + } + .rel.plt : + { + *(.rel.plt) + } + .rela.plt : + { + *(.rela.plt) + } + .init : + { + KEEP (*(SORT_NONE(.init))) + } + .plt : { *(.plt) } + .iplt : { *(.iplt) } + .text : + { + *(.text.unlikely .text.*_unlikely .text.unlikely.*) + *(.text.exit .text.exit.*) + *(.text.startup .text.startup.*) + *(.text.hot .text.hot.*) + *(.text .stub .text.* .gnu.linkonce.t.*) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) + } + .fini : + { + KEEP (*(SORT_NONE(.fini))) + } + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } + PROVIDE_HIDDEN (__exidx_start = .); + .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } + PROVIDE_HIDDEN (__exidx_end = .); + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); + /* Exception handling */ + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } + .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } + /* Thread Local Storage sections */ + .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } + .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); + } + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); + } + .ctors : + { + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + KEEP (*crtbegin.o(.ctors)) + KEEP (*crtbegin?.o(.ctors)) + /* We don't want to include the .ctor section from + the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + } + .jcr : { KEEP (*(.jcr)) } + .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) } + .dynamic : { *(.dynamic) } + .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) } + .data : + { + __data_start = . ; + *(.data .data.* .gnu.linkonce.d.*) + SORT(CONSTRUCTORS) + } + .data1 : { *(.data1) } + _edata = .; PROVIDE (edata = .); + . = .; + __bss_start = .; + __bss_start__ = .; + .bss : + { + *(.dynbss) + *(.bss .bss.* .gnu.linkonce.b.*) + *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); + } + _bss_end__ = . ; __bss_end__ = . ; + . = ALIGN(32 / 8); + . = SEGMENT_START("ldata-segment", .); + . = ALIGN(32 / 8); + __end__ = . ; + _end = .; PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* DWARF 3 */ + .debug_pubtypes 0 : { *(.debug_pubtypes) } + .debug_ranges 0 : { *(.debug_ranges) } + /* DWARF Extension. */ + .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } + .stack 0x80000 : + { + _stack = .; + *(.stack) + } + .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) } + .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } +} diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xdc b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xdc new file mode 100644 index 000000000..2c613c143 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xdc @@ -0,0 +1,245 @@ +/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */ +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. + Copying and distribution of this script, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. */ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", + "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SEARCH_DIR("/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib"); +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0)); . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; + .interp : { *(.interp) } + .note.gnu.build-id : { *(.note.gnu.build-id) } + .hash : { *(.hash) } + .gnu.hash : { *(.gnu.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rel.dyn : + { + *(.rel.init) + *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) + *(.rel.fini) + *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) + *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*) + *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) + *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) + *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) + *(.rel.ctors) + *(.rel.dtors) + *(.rel.got) + *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) + PROVIDE_HIDDEN (__rel_iplt_start = .); + *(.rel.iplt) + PROVIDE_HIDDEN (__rel_iplt_end = .); + } + .rela.dyn : + { + *(.rela.init) + *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) + *(.rela.fini) + *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) + *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) + *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) + *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) + *(.rela.ctors) + *(.rela.dtors) + *(.rela.got) + *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) + PROVIDE_HIDDEN (__rela_iplt_start = .); + *(.rela.iplt) + PROVIDE_HIDDEN (__rela_iplt_end = .); + } + .rel.plt : + { + *(.rel.plt) + } + .rela.plt : + { + *(.rela.plt) + } + .init : + { + KEEP (*(SORT_NONE(.init))) + } + .plt : { *(.plt) } + .iplt : { *(.iplt) } + .text : + { + *(.text.unlikely .text.*_unlikely .text.unlikely.*) + *(.text.exit .text.exit.*) + *(.text.startup .text.startup.*) + *(.text.hot .text.hot.*) + *(.text .stub .text.* .gnu.linkonce.t.*) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) + } + .fini : + { + KEEP (*(SORT_NONE(.fini))) + } + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } + PROVIDE_HIDDEN (__exidx_start = .); + .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } + PROVIDE_HIDDEN (__exidx_end = .); + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); + /* Exception handling */ + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } + .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } + /* Thread Local Storage sections */ + .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } + .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); + } + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); + } + .ctors : + { + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + KEEP (*crtbegin.o(.ctors)) + KEEP (*crtbegin?.o(.ctors)) + /* We don't want to include the .ctor section from + the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + } + .jcr : { KEEP (*(.jcr)) } + .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) } + .dynamic : { *(.dynamic) } + .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) } + .data : + { + __data_start = . ; + *(.data .data.* .gnu.linkonce.d.*) + SORT(CONSTRUCTORS) + } + .data1 : { *(.data1) } + _edata = .; PROVIDE (edata = .); + . = .; + __bss_start = .; + __bss_start__ = .; + .bss : + { + *(.dynbss) + *(.bss .bss.* .gnu.linkonce.b.*) + *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); + } + _bss_end__ = . ; __bss_end__ = . ; + . = ALIGN(32 / 8); + . = SEGMENT_START("ldata-segment", .); + . = ALIGN(32 / 8); + __end__ = . ; + _end = .; PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* DWARF 3 */ + .debug_pubtypes 0 : { *(.debug_pubtypes) } + .debug_ranges 0 : { *(.debug_ranges) } + /* DWARF Extension. */ + .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } + .stack 0x80000 : + { + _stack = .; + *(.stack) + } + .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) } + .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } +} diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xdw b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xdw new file mode 100644 index 000000000..c21bcd12f --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xdw @@ -0,0 +1,245 @@ +/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */ +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. + Copying and distribution of this script, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. */ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", + "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SEARCH_DIR("/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib"); +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + PROVIDE (__executable_start = SEGMENT_START("text-segment", 0)); . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS; + .interp : { *(.interp) } + .note.gnu.build-id : { *(.note.gnu.build-id) } + .hash : { *(.hash) } + .gnu.hash : { *(.gnu.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rel.dyn : + { + *(.rel.init) + *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) + *(.rel.fini) + *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) + *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*) + *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) + *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) + *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) + *(.rel.ctors) + *(.rel.dtors) + *(.rel.got) + *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) + PROVIDE_HIDDEN (__rel_iplt_start = .); + *(.rel.iplt) + PROVIDE_HIDDEN (__rel_iplt_end = .); + } + .rela.dyn : + { + *(.rela.init) + *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) + *(.rela.fini) + *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) + *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) + *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) + *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) + *(.rela.ctors) + *(.rela.dtors) + *(.rela.got) + *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) + PROVIDE_HIDDEN (__rela_iplt_start = .); + *(.rela.iplt) + PROVIDE_HIDDEN (__rela_iplt_end = .); + } + .rel.plt : + { + *(.rel.plt) + } + .rela.plt : + { + *(.rela.plt) + } + .init : + { + KEEP (*(SORT_NONE(.init))) + } + .plt : { *(.plt) } + .iplt : { *(.iplt) } + .text : + { + *(.text.unlikely .text.*_unlikely .text.unlikely.*) + *(.text.exit .text.exit.*) + *(.text.startup .text.startup.*) + *(.text.hot .text.hot.*) + *(.text .stub .text.* .gnu.linkonce.t.*) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) + } + .fini : + { + KEEP (*(SORT_NONE(.fini))) + } + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } + PROVIDE_HIDDEN (__exidx_start = .); + .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } + PROVIDE_HIDDEN (__exidx_end = .); + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table + .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } + /* These sections are generated by the Sun/Oracle C++ compiler. */ + .exception_ranges : ONLY_IF_RO { *(.exception_ranges + .exception_ranges*) } + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); + /* Exception handling */ + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } + .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } + .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } + /* Thread Local Storage sections */ + .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } + .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); + } + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); + } + .ctors : + { + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + KEEP (*crtbegin.o(.ctors)) + KEEP (*crtbegin?.o(.ctors)) + /* We don't want to include the .ctor section from + the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + } + .jcr : { KEEP (*(.jcr)) } + .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) } + .dynamic : { *(.dynamic) } + .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) } + .data : + { + __data_start = . ; + *(.data .data.* .gnu.linkonce.d.*) + SORT(CONSTRUCTORS) + } + .data1 : { *(.data1) } + _edata = .; PROVIDE (edata = .); + . = .; + __bss_start = .; + __bss_start__ = .; + .bss : + { + *(.dynbss) + *(.bss .bss.* .gnu.linkonce.b.*) + *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. + FIXME: Why do we need it? When there is no .bss section, we don't + pad the .data section. */ + . = ALIGN(. != 0 ? 32 / 8 : 1); + } + _bss_end__ = . ; __bss_end__ = . ; + . = ALIGN(32 / 8); + . = SEGMENT_START("ldata-segment", .); + . = ALIGN(32 / 8); + __end__ = . ; + _end = .; PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* DWARF 3 */ + .debug_pubtypes 0 : { *(.debug_pubtypes) } + .debug_ranges 0 : { *(.debug_ranges) } + /* DWARF Extension. */ + .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } + .stack 0x80000 : + { + _stack = .; + *(.stack) + } + .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) } + .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } +} diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xn b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xn index a56be3a82..73de05707 100644 --- a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xn +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xn @@ -1,5 +1,5 @@ /* Script for -n: mix text and data on same page */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -95,10 +95,11 @@ SECTIONS PROVIDE_HIDDEN (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } PROVIDE_HIDDEN (__exidx_end = .); - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* These sections are generated by the Sun/Oracle C++ compiler. */ .exception_ranges : ONLY_IF_RO { *(.exception_ranges .exception_ranges*) } @@ -106,7 +107,8 @@ SECTIONS the same address within the page on the next page up. */ . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ @@ -121,15 +123,15 @@ SECTIONS .init_array : { PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) PROVIDE_HIDDEN (__init_array_end = .); } .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) PROVIDE_HIDDEN (__fini_array_end = .); } .ctors : @@ -232,6 +234,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .stack 0x80000 : { _stack = .; diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xr b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xr index 744242595..1be1fe716 100644 --- a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xr +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xr @@ -1,5 +1,5 @@ /* Script for ld -r: link without relocation */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -82,17 +82,19 @@ SECTIONS .rodata1 0 : { *(.rodata1) } .ARM.extab 0 : { *(.ARM.extab) } .ARM.exidx 0 : { *(.ARM.exidx) } - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .eh_frame_hdr : { *(.eh_frame_hdr) } + .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab 0 : ONLY_IF_RO { *(.gnu_extab*) } /* These sections are generated by the Sun/Oracle C++ compiler. */ .exception_ranges 0 : ONLY_IF_RO { *(.exception_ranges .exception_ranges*) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ /* Exception handling */ - .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .gnu_extab 0 : ONLY_IF_RW { *(.gnu_extab) } .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .exception_ranges 0 : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ @@ -112,7 +114,6 @@ SECTIONS .data1 0 : { *(.data1) } .bss 0 : { - *(.dynbss) *(.bss) *(COMMON) /* Align here to ensure that the .bss section occupies space up to @@ -159,6 +160,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .stack 0 : { *(.stack) diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xs b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xs index ce8c197c1..70864e728 100644 --- a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xs +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xs @@ -1,5 +1,5 @@ /* Script for ld --shared: link shared library */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -90,10 +90,11 @@ SECTIONS PROVIDE_HIDDEN (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } PROVIDE_HIDDEN (__exidx_end = .); - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* These sections are generated by the Sun/Oracle C++ compiler. */ .exception_ranges : ONLY_IF_RO { *(.exception_ranges .exception_ranges*) } @@ -101,7 +102,8 @@ SECTIONS the same address within the page on the next page up. */ . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ @@ -113,13 +115,13 @@ SECTIONS } .init_array : { - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) } .fini_array : { - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) } .ctors : { @@ -221,6 +223,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .stack 0x80000 : { _stack = .; diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xsc b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xsc index 184697e24..5b3f6bf49 100644 --- a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xsc +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xsc @@ -1,5 +1,5 @@ /* Script for --shared -z combreloc: shared library, combine & sort relocs */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -89,10 +89,11 @@ SECTIONS PROVIDE_HIDDEN (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } PROVIDE_HIDDEN (__exidx_end = .); - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* These sections are generated by the Sun/Oracle C++ compiler. */ .exception_ranges : ONLY_IF_RO { *(.exception_ranges .exception_ranges*) } @@ -100,7 +101,8 @@ SECTIONS the same address within the page on the next page up. */ . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ @@ -112,13 +114,13 @@ SECTIONS } .init_array : { - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) } .fini_array : { - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) } .ctors : { @@ -220,6 +222,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .stack 0x80000 : { _stack = .; diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xsw b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xsw index b211a53aa..8a2eb55fe 100644 --- a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xsw +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xsw @@ -1,5 +1,5 @@ /* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -89,10 +89,11 @@ SECTIONS PROVIDE_HIDDEN (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } PROVIDE_HIDDEN (__exidx_end = .); - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* These sections are generated by the Sun/Oracle C++ compiler. */ .exception_ranges : ONLY_IF_RO { *(.exception_ranges .exception_ranges*) } @@ -100,7 +101,8 @@ SECTIONS the same address within the page on the next page up. */ . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ @@ -112,13 +114,13 @@ SECTIONS } .init_array : { - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) } .fini_array : { - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) } .ctors : { @@ -220,6 +222,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .stack 0x80000 : { _stack = .; diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xu b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xu index d7499ec3a..657c1b3ac 100644 --- a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xu +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xu @@ -1,5 +1,5 @@ /* Script for ld -Ur: link w/out relocation, do create constructors */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -82,17 +82,19 @@ SECTIONS .rodata1 0 : { *(.rodata1) } .ARM.extab 0 : { *(.ARM.extab) } .ARM.exidx 0 : { *(.ARM.exidx) } - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .eh_frame_hdr : { *(.eh_frame_hdr) } + .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab 0 : ONLY_IF_RO { *(.gnu_extab*) } /* These sections are generated by the Sun/Oracle C++ compiler. */ .exception_ranges 0 : ONLY_IF_RO { *(.exception_ranges .exception_ranges*) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ /* Exception handling */ - .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .gnu_extab 0 : ONLY_IF_RW { *(.gnu_extab) } .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .exception_ranges 0 : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ @@ -113,7 +115,6 @@ SECTIONS .data1 0 : { *(.data1) } .bss 0 : { - *(.dynbss) *(.bss) *(COMMON) /* Align here to ensure that the .bss section occupies space up to @@ -160,6 +161,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .stack 0 : { *(.stack) diff --git a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xw b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xw index a3ffbc29f..e5a4f2bb8 100644 --- a/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xw +++ b/devkitARM/arm-none-eabi/lib/ldscripts/armelf.xw @@ -1,5 +1,5 @@ /* Script for -z combreloc -z now -z relro: combine and sort reloc sections */ -/* Copyright (C) 2014 Free Software Foundation, Inc. +/* Copyright (C) 2014-2017 Free Software Foundation, Inc. Copying and distribution of this script, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. */ @@ -94,10 +94,11 @@ SECTIONS PROVIDE_HIDDEN (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } PROVIDE_HIDDEN (__exidx_end = .); - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } + .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } + .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } /* These sections are generated by the Sun/Oracle C++ compiler. */ .exception_ranges : ONLY_IF_RO { *(.exception_ranges .exception_ranges*) } @@ -105,7 +106,8 @@ SECTIONS the same address within the page on the next page up. */ . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } + .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } /* Thread Local Storage sections */ @@ -120,15 +122,15 @@ SECTIONS .init_array : { PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) PROVIDE_HIDDEN (__init_array_end = .); } .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array )) + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) PROVIDE_HIDDEN (__fini_array_end = .); } .ctors : @@ -231,6 +233,7 @@ SECTIONS .debug_ranges 0 : { *(.debug_ranges) } /* DWARF Extension. */ .debug_macro 0 : { *(.debug_macro) } + .debug_addr 0 : { *(.debug_addr) } .stack 0x80000 : { _stack = .; diff --git a/devkitARM/arm-none-eabi/lib/libc.a b/devkitARM/arm-none-eabi/lib/libc.a index 4039df98c..7db12699f 100644 Binary files a/devkitARM/arm-none-eabi/lib/libc.a and b/devkitARM/arm-none-eabi/lib/libc.a differ diff --git a/devkitARM/arm-none-eabi/lib/libg.a b/devkitARM/arm-none-eabi/lib/libg.a index 4039df98c..7db12699f 100644 Binary files a/devkitARM/arm-none-eabi/lib/libg.a and b/devkitARM/arm-none-eabi/lib/libg.a differ diff --git a/devkitARM/arm-none-eabi/lib/libgloss-linux.a b/devkitARM/arm-none-eabi/lib/libgloss-linux.a index 7e390c37e..c7da3a8f7 100644 Binary files a/devkitARM/arm-none-eabi/lib/libgloss-linux.a and b/devkitARM/arm-none-eabi/lib/libgloss-linux.a differ diff --git a/devkitARM/arm-none-eabi/lib/libm.a b/devkitARM/arm-none-eabi/lib/libm.a index 9fd67aebf..5b4b5c9fa 100644 Binary files a/devkitARM/arm-none-eabi/lib/libm.a and b/devkitARM/arm-none-eabi/lib/libm.a differ diff --git a/devkitARM/arm-none-eabi/lib/libnosys.a b/devkitARM/arm-none-eabi/lib/libnosys.a index f314c2cf4..4e0e2b27d 100644 Binary files a/devkitARM/arm-none-eabi/lib/libnosys.a and b/devkitARM/arm-none-eabi/lib/libnosys.a differ diff --git a/devkitARM/arm-none-eabi/lib/libobjc.a b/devkitARM/arm-none-eabi/lib/libobjc.a deleted file mode 100644 index 2d9cf7e3c..000000000 Binary files a/devkitARM/arm-none-eabi/lib/libobjc.a and /dev/null differ diff --git a/devkitARM/arm-none-eabi/lib/librdimon.a b/devkitARM/arm-none-eabi/lib/librdimon.a index 30dbe0b40..6595099d5 100644 Binary files a/devkitARM/arm-none-eabi/lib/librdimon.a and b/devkitARM/arm-none-eabi/lib/librdimon.a differ diff --git a/devkitARM/arm-none-eabi/lib/librdpmon.a b/devkitARM/arm-none-eabi/lib/librdpmon.a index 3c6d514dc..307ebf6a6 100644 Binary files a/devkitARM/arm-none-eabi/lib/librdpmon.a and b/devkitARM/arm-none-eabi/lib/librdpmon.a differ diff --git a/devkitARM/arm-none-eabi/lib/libstdc++.a b/devkitARM/arm-none-eabi/lib/libstdc++.a index 670a8692d..3d8914134 100644 Binary files a/devkitARM/arm-none-eabi/lib/libstdc++.a and b/devkitARM/arm-none-eabi/lib/libstdc++.a differ diff --git a/devkitARM/arm-none-eabi/lib/libstdc++.a-gdb.py b/devkitARM/arm-none-eabi/lib/libstdc++.a-gdb.py index c3a1e3959..fee019d85 100644 --- a/devkitARM/arm-none-eabi/lib/libstdc++.a-gdb.py +++ b/devkitARM/arm-none-eabi/lib/libstdc++.a-gdb.py @@ -1,5 +1,5 @@ # -*- python -*- -# Copyright (C) 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ import gdb import os import os.path -pythondir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/share/gcc-5.3.0/python' +pythondir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/share/gcc-7.1.0/python' libdir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib' # This file might be loaded when there is no current objfile. This diff --git a/devkitARM/arm-none-eabi/lib/libstdc++.la b/devkitARM/arm-none-eabi/lib/libstdc++.la index 204f6e3a5..d18d8bb11 100644 --- a/devkitARM/arm-none-eabi/lib/libstdc++.la +++ b/devkitARM/arm-none-eabi/lib/libstdc++.la @@ -25,7 +25,7 @@ weak_library_names='' # Version information for libstdc++. current=6 age=0 -revision=21 +revision=23 # Is this an already installed library? installed=yes diff --git a/devkitARM/arm-none-eabi/lib/libsupc++.a b/devkitARM/arm-none-eabi/lib/libsupc++.a index 013dea7f5..db1d94547 100644 Binary files a/devkitARM/arm-none-eabi/lib/libsupc++.a and b/devkitARM/arm-none-eabi/lib/libsupc++.a differ diff --git a/devkitARM/arm-none-eabi/lib/libsysbase.a b/devkitARM/arm-none-eabi/lib/libsysbase.a index 841c48707..cca684718 100644 Binary files a/devkitARM/arm-none-eabi/lib/libsysbase.a and b/devkitARM/arm-none-eabi/lib/libsysbase.a differ diff --git a/devkitARM/arm-none-eabi/lib/linux-crt0.o b/devkitARM/arm-none-eabi/lib/linux-crt0.o index 03821ad37..6682dbb93 100644 Binary files a/devkitARM/arm-none-eabi/lib/linux-crt0.o and b/devkitARM/arm-none-eabi/lib/linux-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/nano.specs b/devkitARM/arm-none-eabi/lib/nano.specs index 60dc407c6..575f47d38 100644 --- a/devkitARM/arm-none-eabi/lib/nano.specs +++ b/devkitARM/arm-none-eabi/lib/nano.specs @@ -1,5 +1,9 @@ %rename link nano_link %rename link_gcc_c_sequence nano_link_gcc_c_sequence +%rename cpp nano_cpp + +*cpp: +-isystem =/include/newlib-nano %(nano_cpp) *nano_libc: -lc_nano diff --git a/devkitARM/arm-none-eabi/lib/rdimon-crt0.o b/devkitARM/arm-none-eabi/lib/rdimon-crt0.o index e6b0b9949..2e505d919 100644 Binary files a/devkitARM/arm-none-eabi/lib/rdimon-crt0.o and b/devkitARM/arm-none-eabi/lib/rdimon-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/rdpmon-crt0.o b/devkitARM/arm-none-eabi/lib/rdpmon-crt0.o index 8356cd26d..e041c0c1e 100644 Binary files a/devkitARM/arm-none-eabi/lib/rdpmon-crt0.o and b/devkitARM/arm-none-eabi/lib/rdpmon-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/redboot-crt0.o b/devkitARM/arm-none-eabi/lib/redboot-crt0.o index 814ce5fd1..d4e603320 100644 Binary files a/devkitARM/arm-none-eabi/lib/redboot-crt0.o and b/devkitARM/arm-none-eabi/lib/redboot-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/redboot-syscalls.o b/devkitARM/arm-none-eabi/lib/redboot-syscalls.o index 427d28084..d87811ace 100644 Binary files a/devkitARM/arm-none-eabi/lib/redboot-syscalls.o and b/devkitARM/arm-none-eabi/lib/redboot-syscalls.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/aprofile-validation.specs b/devkitARM/arm-none-eabi/lib/thumb/be/aprofile-validation.specs new file mode 100644 index 000000000..166a5dec6 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/aprofile-validation.specs @@ -0,0 +1,22 @@ +# aem-validation.specs +# +# Spec file for AArch32 A profile baremetal newlib, libgloss on +# VALIDATION platform with AngelAPI semi-hosting. +# +# This Spec file is also appropriate for the foundation model. + +%rename link old_link + +*link: +--defsym=_rdimon_vector_base=0x00000000 -Ttext-segment=0x00010000 %(old_link) + +%rename lib libc + +*libgloss: +-lrdimon + +*lib: +cpu-init/rdimon-aem.o%s --start-group %(libc) %(libgloss) --end-group + +*startfile: +crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s} diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/aprofile-ve.specs b/devkitARM/arm-none-eabi/lib/thumb/be/aprofile-ve.specs new file mode 100644 index 000000000..d94bb7a94 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/aprofile-ve.specs @@ -0,0 +1,22 @@ +# aem-ve.specs +# +# Spec file for AArch32 A profile baremetal newlib, libgloss on VE platform with AngelAPI +# semi-hosting. +# +# This Spec file is also appropriate for the foundation model. + +%rename link old_link + +*link: +--defsym=_rdimon_vector_base=0x80000000 -Ttext-segment=0x80010000 %(old_link) + +%rename lib libc + +*libgloss: +-lrdimon + +*lib: +cpu-init/rdimon-aem.o%s --start-group %(libc) %(libgloss) --end-group + +*startfile: +crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s} diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/cpu-init/rdimon-aem.o b/devkitARM/arm-none-eabi/lib/thumb/be/cpu-init/rdimon-aem.o new file mode 100644 index 000000000..081b46831 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/cpu-init/rdimon-aem.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/crt0.o b/devkitARM/arm-none-eabi/lib/thumb/be/crt0.o new file mode 100644 index 000000000..d990b8378 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/iq80310.specs b/devkitARM/arm-none-eabi/lib/thumb/be/iq80310.specs new file mode 100644 index 000000000..a016e887f --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/iq80310.specs @@ -0,0 +1,8 @@ +%rename link old_link + +*link: +-T redboot.ld%s -Ttext 0xA0020000 %(old_link) + +*startfile: +crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s + diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/libc.a b/devkitARM/arm-none-eabi/lib/thumb/be/libc.a new file mode 100644 index 000000000..509e16194 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/libc.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/libg.a b/devkitARM/arm-none-eabi/lib/thumb/be/libg.a new file mode 100644 index 000000000..509e16194 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/libg.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/libgloss-linux.a b/devkitARM/arm-none-eabi/lib/thumb/be/libgloss-linux.a new file mode 100644 index 000000000..cb87e2ddb Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/libgloss-linux.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/libm.a b/devkitARM/arm-none-eabi/lib/thumb/be/libm.a new file mode 100644 index 000000000..f757714ad Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/libm.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/libnosys.a b/devkitARM/arm-none-eabi/lib/thumb/be/libnosys.a new file mode 100644 index 000000000..754cabe3c Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/libnosys.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/librdimon.a b/devkitARM/arm-none-eabi/lib/thumb/be/librdimon.a new file mode 100644 index 000000000..075443964 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/librdimon.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/librdpmon.a b/devkitARM/arm-none-eabi/lib/thumb/be/librdpmon.a new file mode 100644 index 000000000..5c90bbb29 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/librdpmon.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/libstdc++.a b/devkitARM/arm-none-eabi/lib/thumb/be/libstdc++.a new file mode 100644 index 000000000..709c6e25a Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/libstdc++.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/libstdc++.a-gdb.py b/devkitARM/arm-none-eabi/lib/thumb/be/libstdc++.a-gdb.py new file mode 100644 index 000000000..21f9ec1c3 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/libstdc++.a-gdb.py @@ -0,0 +1,61 @@ +# -*- python -*- +# Copyright (C) 2009-2017 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import sys +import gdb +import os +import os.path + +pythondir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/share/gcc-7.1.0/python' +libdir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib/thumb/be' + +# This file might be loaded when there is no current objfile. This +# can happen if the user loads it manually. In this case we don't +# update sys.path; instead we just hope the user managed to do that +# beforehand. +if gdb.current_objfile () is not None: + # Update module path. We want to find the relative path from libdir + # to pythondir, and then we want to apply that relative path to the + # directory holding the objfile with which this file is associated. + # This preserves relocatability of the gcc tree. + + # Do a simple normalization that removes duplicate separators. + pythondir = os.path.normpath (pythondir) + libdir = os.path.normpath (libdir) + + prefix = os.path.commonprefix ([libdir, pythondir]) + # In some bizarre configuration we might have found a match in the + # middle of a directory name. + if prefix[-1] != '/': + prefix = os.path.dirname (prefix) + '/' + + # Strip off the prefix. + pythondir = pythondir[len (prefix):] + libdir = libdir[len (prefix):] + + # Compute the ".."s needed to get from libdir to the prefix. + dotdots = ('..' + os.sep) * len (libdir.split (os.sep)) + + objfile = gdb.current_objfile ().filename + dir_ = os.path.join (os.path.dirname (objfile), dotdots, pythondir) + + if not dir_ in sys.path: + sys.path.insert(0, dir_) + +# Call a function as a plain import would not execute body of the included file +# on repeated reloads of this object file. +from libstdcxx.v6 import register_libstdcxx_printers +register_libstdcxx_printers(gdb.current_objfile()) diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/libstdc++.la b/devkitARM/arm-none-eabi/lib/thumb/be/libstdc++.la new file mode 100644 index 000000000..2f1703da9 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/libstdc++.la @@ -0,0 +1,41 @@ +# libstdc++.la - a libtool library file +# Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='' + +# Names of this library. +library_names='' + +# The name of the static archive. +old_library='libstdc++.a' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='' + +# Libraries that this one depends upon. +dependency_libs='' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libstdc++. +current=6 +age=0 +revision=23 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib/thumb/be' diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/libsupc++.a b/devkitARM/arm-none-eabi/lib/thumb/be/libsupc++.a new file mode 100644 index 000000000..e393e1d5b Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/libsupc++.a differ diff --git a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libobjc.la b/devkitARM/arm-none-eabi/lib/thumb/be/libsupc++.la similarity index 86% rename from devkitARM/arm-none-eabi/lib/armv6k/fpu/libobjc.la rename to devkitARM/arm-none-eabi/lib/thumb/be/libsupc++.la index e3cb4635b..d0e79ec93 100644 --- a/devkitARM/arm-none-eabi/lib/armv6k/fpu/libobjc.la +++ b/devkitARM/arm-none-eabi/lib/thumb/be/libsupc++.la @@ -1,4 +1,4 @@ -# libobjc.la - a libtool library file +# libsupc++.la - a libtool library file # Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a # # Please DO NOT delete this file! @@ -11,7 +11,7 @@ dlname='' library_names='' # The name of the static archive. -old_library='libobjc.a' +old_library='libsupc++.a' # Linker flags that can not go in dependency_libs. inherited_linker_flags='' @@ -22,8 +22,8 @@ dependency_libs='' # Names of additional weak libraries provided by this library weak_library_names='' -# Version information for libobjc. -current=4 +# Version information for libsupc++. +current=0 age=0 revision=0 @@ -38,4 +38,4 @@ dlopen='' dlpreopen='' # Directory that this library needs to be installed in: -libdir='/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib/armv6k/fpu' +libdir='/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib/thumb/be' diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/libsysbase.a b/devkitARM/arm-none-eabi/lib/thumb/be/libsysbase.a new file mode 100644 index 000000000..7ea61837b Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/libsysbase.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/linux-crt0.o b/devkitARM/arm-none-eabi/lib/thumb/be/linux-crt0.o new file mode 100644 index 000000000..3bccb6a6c Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/linux-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/linux.specs b/devkitARM/arm-none-eabi/lib/thumb/be/linux.specs new file mode 100644 index 000000000..3e8b6865e --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/linux.specs @@ -0,0 +1,11 @@ +%rename lib libc + +*libgloss: +-lgloss-linux + +*lib: +%(libc) %(libgloss) + +*startfile: +linux-crt0%O%s crti%O%s crtbegin%O%s + diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/nano.specs b/devkitARM/arm-none-eabi/lib/thumb/be/nano.specs new file mode 100644 index 000000000..575f47d38 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/nano.specs @@ -0,0 +1,22 @@ +%rename link nano_link +%rename link_gcc_c_sequence nano_link_gcc_c_sequence +%rename cpp nano_cpp + +*cpp: +-isystem =/include/newlib-nano %(nano_cpp) + +*nano_libc: +-lc_nano + +*nano_libgloss: +%{specs=rdimon.specs:-lrdimon_nano} %{specs=nosys.specs:-lnosys} + +*link_gcc_c_sequence: +%(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group + +*link: +%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) %:replace-outfile(-lrdimon -lrdimon_nano) %:replace-outfile(-lstdc++ -lstdc++_nano) %:replace-outfile(-lsupc++ -lsupc++_nano) + +*lib: +%{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}} + diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/nosys.specs b/devkitARM/arm-none-eabi/lib/thumb/be/nosys.specs new file mode 100644 index 000000000..3a84db3b5 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/nosys.specs @@ -0,0 +1,11 @@ +%rename link_gcc_c_sequence nosys_link_gcc_c_sequence + +*nosys_libgloss: +-lnosys + +*nosys_libc: +%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano} + +*link_gcc_c_sequence: +%(nosys_link_gcc_c_sequence) --start-group %G %(nosys_libc) %(nosys_libgloss) --end-group + diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/pid.specs b/devkitARM/arm-none-eabi/lib/thumb/be/pid.specs new file mode 100644 index 000000000..c8a9f14c9 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/pid.specs @@ -0,0 +1,8 @@ +%rename link old_link + +*link: +-T redboot.ld%s -Ttext 0x10000 %(old_link) + +*startfile: +crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s + diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/rdimon-crt0.o b/devkitARM/arm-none-eabi/lib/thumb/be/rdimon-crt0.o new file mode 100644 index 000000000..ea28d7f36 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/rdimon-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/rdimon.specs b/devkitARM/arm-none-eabi/lib/thumb/be/rdimon.specs new file mode 100644 index 000000000..c35061f3a --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/rdimon.specs @@ -0,0 +1,14 @@ +%rename link_gcc_c_sequence rdimon_link_gcc_c_sequence + +*rdimon_libc: +%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano} + +*rdimon_libgloss: +%{!specs=nano.specs:-lrdimon} %{specs=nano.specs:-lrdimon_nano} + +*link_gcc_c_sequence: +%(rdimon_link_gcc_c_sequence) --start-group %G %(rdimon_libc) %(rdimon_libgloss) --end-group + +*startfile: +crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s} + diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/rdpmon-crt0.o b/devkitARM/arm-none-eabi/lib/thumb/be/rdpmon-crt0.o new file mode 100644 index 000000000..79a9aa046 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/rdpmon-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/rdpmon.specs b/devkitARM/arm-none-eabi/lib/thumb/be/rdpmon.specs new file mode 100644 index 000000000..903db1fb1 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/rdpmon.specs @@ -0,0 +1,8 @@ +%rename link old_link + +*link: +%(old_link) -lrdpmon + +*startfile: +crti%O%s crtbegin%O%s %{!pg:rdpmon-crt0%O%s} %{pg:rdpmon-crt0%O%s} + diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/redboot-crt0.o b/devkitARM/arm-none-eabi/lib/thumb/be/redboot-crt0.o new file mode 100644 index 000000000..5f0c055e8 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/redboot-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/redboot-syscalls.o b/devkitARM/arm-none-eabi/lib/thumb/be/redboot-syscalls.o new file mode 100644 index 000000000..9a8dad170 Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/be/redboot-syscalls.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/redboot.ld b/devkitARM/arm-none-eabi/lib/thumb/be/redboot.ld new file mode 100644 index 000000000..3d1f8d806 --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/redboot.ld @@ -0,0 +1,220 @@ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", + "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +/* Do we need any of these for elf? + __DYNAMIC = 0; */ +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = 0x00020000; + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.text : + { + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t*) + } + .rela.text : + { + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t*) + } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.rodata : + { + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r*) + } + .rela.rodata : + { + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r*) + } + .rel.data : + { + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d*) + } + .rela.data : + { + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d*) + } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.sdata : + { + *(.rel.sdata) + *(.rel.sdata.*) + *(.rel.gnu.linkonce.s*) + } + .rela.sdata : + { + *(.rela.sdata) + *(.rela.sdata.*) + *(.rela.gnu.linkonce.s*) + } + .rel.sbss : { *(.rel.sbss) } + .rela.sbss : { *(.rela.sbss) } + .rel.bss : { *(.rel.bss) } + .rela.bss : { *(.rela.bss) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .plt : { *(.plt) } + .text : + { + *(.text) + *(.text.*) + *(.stub) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t*) + *(.glue_7t) *(.glue_7) + } =0 + .init : + { + KEEP (*(.init)) + } =0 + _etext = .; + PROVIDE (etext = .); + .fini : + { + KEEP (*(.fini)) + } =0 + .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) } + .rodata1 : { *(.rodata1) } + .eh_frame_hdr : { *(.eh_frame_hdr) } + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ + . = ALIGN(256) + (. & (256 - 1)); + .data : + { + *(.data) + *(.data.*) + *(.gnu.linkonce.d*) + SORT(CONSTRUCTORS) + } + .data1 : { *(.data1) } + .eh_frame : { KEEP (*(.eh_frame)) } + .gcc_except_table : { *(.gcc_except_table) } + .ctors : + { + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + KEEP (*crtbegin.o(.ctors)) + /* We don't want to include the .ctor section from + from the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + } + .jcr : { KEEP (*(.jcr)) } + .got : { *(.got.plt) *(.got) } + .dynamic : { *(.dynamic) } + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : + { + *(.sdata) + *(.sdata.*) + *(.gnu.linkonce.s.*) + } + _edata = .; + PROVIDE (edata = .); + __bss_start = .; + __bss_start__ = .; + .sbss : + { + *(.dynsbss) + *(.sbss) + *(.sbss.*) + *(.scommon) + } + .bss : + { + *(.dynbss) + *(.bss) + *(.bss.*) + *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. */ + . = ALIGN(32 / 8); + } + . = ALIGN(32 / 8); + _end = .; + _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; + PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + .debug_ranges 0 : { *(.debug_ranges) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + .stack 0x80000 : { _stack = .; *(.stack) } + /* These must appear regardless of . */ +} diff --git a/devkitARM/arm-none-eabi/lib/thumb/be/redboot.specs b/devkitARM/arm-none-eabi/lib/thumb/be/redboot.specs new file mode 100644 index 000000000..8a00c3b6d --- /dev/null +++ b/devkitARM/arm-none-eabi/lib/thumb/be/redboot.specs @@ -0,0 +1,8 @@ +%rename link old_link + +*link: +-T redboot.ld%s -Ttext 0x20000 %(old_link) + +*startfile: +crti%O%s crtbegin%O%s %{!pg:redboot-crt0%O%s} %{pg:redboot-crt0%O%s} redboot-syscalls%O%s + diff --git a/devkitARM/arm-none-eabi/lib/thumb/cpu-init/rdimon-aem.o b/devkitARM/arm-none-eabi/lib/thumb/cpu-init/rdimon-aem.o index 5ddc1eb02..0acf0ebad 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/cpu-init/rdimon-aem.o and b/devkitARM/arm-none-eabi/lib/thumb/cpu-init/rdimon-aem.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/crt0.o b/devkitARM/arm-none-eabi/lib/thumb/crt0.o index 092ac7969..fae9a799c 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/ds_arm7_crt0.o b/devkitARM/arm-none-eabi/lib/thumb/ds_arm7_crt0.o index 341d10cf4..7ae28ea94 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/ds_arm7_crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/ds_arm7_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/ds_arm7_vram_crt0.o b/devkitARM/arm-none-eabi/lib/thumb/ds_arm7_vram_crt0.o new file mode 100644 index 000000000..66dcdb92b Binary files /dev/null and b/devkitARM/arm-none-eabi/lib/thumb/ds_arm7_vram_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/ds_arm9_crt0.o b/devkitARM/arm-none-eabi/lib/thumb/ds_arm9_crt0.o index 589670666..71b640573 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/ds_arm9_crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/ds_arm9_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/ds_cart_crt0.o b/devkitARM/arm-none-eabi/lib/thumb/ds_cart_crt0.o index 613d5a2f1..e8ae28cdb 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/ds_cart_crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/ds_cart_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/er_crt0.o b/devkitARM/arm-none-eabi/lib/thumb/er_crt0.o index 8871a1664..d477e9501 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/er_crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/er_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/gba_crt0.o b/devkitARM/arm-none-eabi/lib/thumb/gba_crt0.o index 2a2161d3b..d963aca52 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/gba_crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/gba_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/gp32_crt0.o b/devkitARM/arm-none-eabi/lib/thumb/gp32_crt0.o index c1a34fbd7..a75eaed23 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/gp32_crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/gp32_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/gp32_gpsdk_crt0.o b/devkitARM/arm-none-eabi/lib/thumb/gp32_gpsdk_crt0.o index 0de677d96..0a5929ad0 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/gp32_gpsdk_crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/gp32_gpsdk_crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/libc.a b/devkitARM/arm-none-eabi/lib/thumb/libc.a index 69d9f4645..245d9dd7f 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/libc.a and b/devkitARM/arm-none-eabi/lib/thumb/libc.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/libg.a b/devkitARM/arm-none-eabi/lib/thumb/libg.a index 69d9f4645..245d9dd7f 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/libg.a and b/devkitARM/arm-none-eabi/lib/thumb/libg.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/libgloss-linux.a b/devkitARM/arm-none-eabi/lib/thumb/libgloss-linux.a index da4166678..68abd65b9 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/libgloss-linux.a and b/devkitARM/arm-none-eabi/lib/thumb/libgloss-linux.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/libm.a b/devkitARM/arm-none-eabi/lib/thumb/libm.a index 4620a2ef5..f76741f81 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/libm.a and b/devkitARM/arm-none-eabi/lib/thumb/libm.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/libnosys.a b/devkitARM/arm-none-eabi/lib/thumb/libnosys.a index 3dcd0f079..cb5880404 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/libnosys.a and b/devkitARM/arm-none-eabi/lib/thumb/libnosys.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/libobjc.a b/devkitARM/arm-none-eabi/lib/thumb/libobjc.a deleted file mode 100644 index 3b4697c03..000000000 Binary files a/devkitARM/arm-none-eabi/lib/thumb/libobjc.a and /dev/null differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/librdimon.a b/devkitARM/arm-none-eabi/lib/thumb/librdimon.a index e712ea625..3abd8852f 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/librdimon.a and b/devkitARM/arm-none-eabi/lib/thumb/librdimon.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/librdpmon.a b/devkitARM/arm-none-eabi/lib/thumb/librdpmon.a index 85a8dbb2f..7e74c0861 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/librdpmon.a and b/devkitARM/arm-none-eabi/lib/thumb/librdpmon.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/libstdc++.a b/devkitARM/arm-none-eabi/lib/thumb/libstdc++.a index 6a14c6a62..f69653587 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/libstdc++.a and b/devkitARM/arm-none-eabi/lib/thumb/libstdc++.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/libstdc++.a-gdb.py b/devkitARM/arm-none-eabi/lib/thumb/libstdc++.a-gdb.py index 9b05c2cf7..c5bf764e5 100644 --- a/devkitARM/arm-none-eabi/lib/thumb/libstdc++.a-gdb.py +++ b/devkitARM/arm-none-eabi/lib/thumb/libstdc++.a-gdb.py @@ -1,5 +1,5 @@ # -*- python -*- -# Copyright (C) 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ import gdb import os import os.path -pythondir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/share/gcc-5.3.0/python' +pythondir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/share/gcc-7.1.0/python' libdir = '/opt/devkitpro/i686-w64-mingw32/devkitARM/arm-none-eabi/lib/thumb' # This file might be loaded when there is no current objfile. This diff --git a/devkitARM/arm-none-eabi/lib/thumb/libstdc++.la b/devkitARM/arm-none-eabi/lib/thumb/libstdc++.la index 0beb2e0f5..6e5066bf7 100644 --- a/devkitARM/arm-none-eabi/lib/thumb/libstdc++.la +++ b/devkitARM/arm-none-eabi/lib/thumb/libstdc++.la @@ -25,7 +25,7 @@ weak_library_names='' # Version information for libstdc++. current=6 age=0 -revision=21 +revision=23 # Is this an already installed library? installed=yes diff --git a/devkitARM/arm-none-eabi/lib/thumb/libsupc++.a b/devkitARM/arm-none-eabi/lib/thumb/libsupc++.a index c7aa44c76..347ebe2fc 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/libsupc++.a and b/devkitARM/arm-none-eabi/lib/thumb/libsupc++.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/libsysbase.a b/devkitARM/arm-none-eabi/lib/thumb/libsysbase.a index 57924d446..7f4cae5fa 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/libsysbase.a and b/devkitARM/arm-none-eabi/lib/thumb/libsysbase.a differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/linux-crt0.o b/devkitARM/arm-none-eabi/lib/thumb/linux-crt0.o index 4279a84ce..f93d6c33b 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/linux-crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/linux-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/nano.specs b/devkitARM/arm-none-eabi/lib/thumb/nano.specs index 60dc407c6..575f47d38 100644 --- a/devkitARM/arm-none-eabi/lib/thumb/nano.specs +++ b/devkitARM/arm-none-eabi/lib/thumb/nano.specs @@ -1,5 +1,9 @@ %rename link nano_link %rename link_gcc_c_sequence nano_link_gcc_c_sequence +%rename cpp nano_cpp + +*cpp: +-isystem =/include/newlib-nano %(nano_cpp) *nano_libc: -lc_nano diff --git a/devkitARM/arm-none-eabi/lib/thumb/rdimon-crt0.o b/devkitARM/arm-none-eabi/lib/thumb/rdimon-crt0.o index f21944f5f..cbd91dc81 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/rdimon-crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/rdimon-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/rdpmon-crt0.o b/devkitARM/arm-none-eabi/lib/thumb/rdpmon-crt0.o index 823c6df09..81dc25130 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/rdpmon-crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/rdpmon-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/redboot-crt0.o b/devkitARM/arm-none-eabi/lib/thumb/redboot-crt0.o index be59b8eb0..be952bb6e 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/redboot-crt0.o and b/devkitARM/arm-none-eabi/lib/thumb/redboot-crt0.o differ diff --git a/devkitARM/arm-none-eabi/lib/thumb/redboot-syscalls.o b/devkitARM/arm-none-eabi/lib/thumb/redboot-syscalls.o index a0ed4bc60..b029fbb3c 100644 Binary files a/devkitARM/arm-none-eabi/lib/thumb/redboot-syscalls.o and b/devkitARM/arm-none-eabi/lib/thumb/redboot-syscalls.o differ diff --git a/devkitARM/bin/3dslink.exe b/devkitARM/bin/3dslink.exe index 3f2073709..c041043cc 100644 Binary files a/devkitARM/bin/3dslink.exe and b/devkitARM/bin/3dslink.exe differ diff --git a/devkitARM/bin/3dsxtool.exe b/devkitARM/bin/3dsxtool.exe index 542819ea5..7279254b0 100644 Binary files a/devkitARM/bin/3dsxtool.exe and b/devkitARM/bin/3dsxtool.exe differ diff --git a/devkitARM/bin/arm-none-eabi-addr2line.exe b/devkitARM/bin/arm-none-eabi-addr2line.exe index ee70973c2..044e2fe83 100644 Binary files a/devkitARM/bin/arm-none-eabi-addr2line.exe and b/devkitARM/bin/arm-none-eabi-addr2line.exe differ diff --git a/devkitARM/bin/arm-none-eabi-ar.exe b/devkitARM/bin/arm-none-eabi-ar.exe index 43c596af7..e65d21f62 100644 Binary files a/devkitARM/bin/arm-none-eabi-ar.exe and b/devkitARM/bin/arm-none-eabi-ar.exe differ diff --git a/devkitARM/bin/arm-none-eabi-as.exe b/devkitARM/bin/arm-none-eabi-as.exe index ee5a072b2..ed898ddf2 100644 Binary files a/devkitARM/bin/arm-none-eabi-as.exe and b/devkitARM/bin/arm-none-eabi-as.exe differ diff --git a/devkitARM/bin/arm-none-eabi-c++.exe b/devkitARM/bin/arm-none-eabi-c++.exe index e6420027d..4a63b4415 100644 Binary files a/devkitARM/bin/arm-none-eabi-c++.exe and b/devkitARM/bin/arm-none-eabi-c++.exe differ diff --git a/devkitARM/bin/arm-none-eabi-c++filt.exe b/devkitARM/bin/arm-none-eabi-c++filt.exe index a1bc32fb4..ecc01e209 100644 Binary files a/devkitARM/bin/arm-none-eabi-c++filt.exe and b/devkitARM/bin/arm-none-eabi-c++filt.exe differ diff --git a/devkitARM/bin/arm-none-eabi-cpp.exe b/devkitARM/bin/arm-none-eabi-cpp.exe index e1dd9cb65..a20d9d362 100644 Binary files a/devkitARM/bin/arm-none-eabi-cpp.exe and b/devkitARM/bin/arm-none-eabi-cpp.exe differ diff --git a/devkitARM/bin/arm-none-eabi-elfedit.exe b/devkitARM/bin/arm-none-eabi-elfedit.exe index 40d42f0fe..8fa628004 100644 Binary files a/devkitARM/bin/arm-none-eabi-elfedit.exe and b/devkitARM/bin/arm-none-eabi-elfedit.exe differ diff --git a/devkitARM/bin/arm-none-eabi-g++.exe b/devkitARM/bin/arm-none-eabi-g++.exe index e6420027d..4a63b4415 100644 Binary files a/devkitARM/bin/arm-none-eabi-g++.exe and b/devkitARM/bin/arm-none-eabi-g++.exe differ diff --git a/devkitARM/bin/arm-none-eabi-gcc-5.3.0.exe b/devkitARM/bin/arm-none-eabi-gcc-5.3.0.exe deleted file mode 100644 index c69482f67..000000000 Binary files a/devkitARM/bin/arm-none-eabi-gcc-5.3.0.exe and /dev/null differ diff --git a/devkitARM/bin/arm-none-eabi-gcc-7.1.0.exe b/devkitARM/bin/arm-none-eabi-gcc-7.1.0.exe new file mode 100644 index 000000000..9494b7f4f Binary files /dev/null and b/devkitARM/bin/arm-none-eabi-gcc-7.1.0.exe differ diff --git a/devkitARM/bin/arm-none-eabi-gcc-ar.exe b/devkitARM/bin/arm-none-eabi-gcc-ar.exe index 396b84064..4231f535c 100644 Binary files a/devkitARM/bin/arm-none-eabi-gcc-ar.exe and b/devkitARM/bin/arm-none-eabi-gcc-ar.exe differ diff --git a/devkitARM/bin/arm-none-eabi-gcc-nm.exe b/devkitARM/bin/arm-none-eabi-gcc-nm.exe index 50aef72f4..3c1d5f5cf 100644 Binary files a/devkitARM/bin/arm-none-eabi-gcc-nm.exe and b/devkitARM/bin/arm-none-eabi-gcc-nm.exe differ diff --git a/devkitARM/bin/arm-none-eabi-gcc-ranlib.exe b/devkitARM/bin/arm-none-eabi-gcc-ranlib.exe index 208ed959a..8bcd1c1cd 100644 Binary files a/devkitARM/bin/arm-none-eabi-gcc-ranlib.exe and b/devkitARM/bin/arm-none-eabi-gcc-ranlib.exe differ diff --git a/devkitARM/bin/arm-none-eabi-gcc.exe b/devkitARM/bin/arm-none-eabi-gcc.exe index c69482f67..9494b7f4f 100644 Binary files a/devkitARM/bin/arm-none-eabi-gcc.exe and b/devkitARM/bin/arm-none-eabi-gcc.exe differ diff --git a/devkitARM/bin/arm-none-eabi-gcov-dump.exe b/devkitARM/bin/arm-none-eabi-gcov-dump.exe new file mode 100644 index 000000000..039922d06 Binary files /dev/null and b/devkitARM/bin/arm-none-eabi-gcov-dump.exe differ diff --git a/devkitARM/bin/arm-none-eabi-gcov-tool.exe b/devkitARM/bin/arm-none-eabi-gcov-tool.exe index 255cd04fe..1e48b38bb 100644 Binary files a/devkitARM/bin/arm-none-eabi-gcov-tool.exe and b/devkitARM/bin/arm-none-eabi-gcov-tool.exe differ diff --git a/devkitARM/bin/arm-none-eabi-gcov.exe b/devkitARM/bin/arm-none-eabi-gcov.exe index aac413de4..88ab92264 100644 Binary files a/devkitARM/bin/arm-none-eabi-gcov.exe and b/devkitARM/bin/arm-none-eabi-gcov.exe differ diff --git a/devkitARM/bin/arm-none-eabi-gdb.exe b/devkitARM/bin/arm-none-eabi-gdb.exe index 5847b7e83..c636acf2c 100644 Binary files a/devkitARM/bin/arm-none-eabi-gdb.exe and b/devkitARM/bin/arm-none-eabi-gdb.exe differ diff --git a/devkitARM/bin/arm-none-eabi-gprof.exe b/devkitARM/bin/arm-none-eabi-gprof.exe index 3174a5f6a..f6cf95438 100644 Binary files a/devkitARM/bin/arm-none-eabi-gprof.exe and b/devkitARM/bin/arm-none-eabi-gprof.exe differ diff --git a/devkitARM/bin/arm-none-eabi-ld.bfd.exe b/devkitARM/bin/arm-none-eabi-ld.bfd.exe index 1ab7ef814..b47795e1b 100644 Binary files a/devkitARM/bin/arm-none-eabi-ld.bfd.exe and b/devkitARM/bin/arm-none-eabi-ld.bfd.exe differ diff --git a/devkitARM/bin/arm-none-eabi-ld.exe b/devkitARM/bin/arm-none-eabi-ld.exe index 1ab7ef814..b47795e1b 100644 Binary files a/devkitARM/bin/arm-none-eabi-ld.exe and b/devkitARM/bin/arm-none-eabi-ld.exe differ diff --git a/devkitARM/bin/arm-none-eabi-nm.exe b/devkitARM/bin/arm-none-eabi-nm.exe index 03511aa12..0cfe7125b 100644 Binary files a/devkitARM/bin/arm-none-eabi-nm.exe and b/devkitARM/bin/arm-none-eabi-nm.exe differ diff --git a/devkitARM/bin/arm-none-eabi-objcopy.exe b/devkitARM/bin/arm-none-eabi-objcopy.exe index f5c6da1b1..64f2ec37b 100644 Binary files a/devkitARM/bin/arm-none-eabi-objcopy.exe and b/devkitARM/bin/arm-none-eabi-objcopy.exe differ diff --git a/devkitARM/bin/arm-none-eabi-objdump.exe b/devkitARM/bin/arm-none-eabi-objdump.exe index 318ae2e26..8167c57e3 100644 Binary files a/devkitARM/bin/arm-none-eabi-objdump.exe and b/devkitARM/bin/arm-none-eabi-objdump.exe differ diff --git a/devkitARM/bin/arm-none-eabi-ranlib.exe b/devkitARM/bin/arm-none-eabi-ranlib.exe index a62913d83..98fb9ae62 100644 Binary files a/devkitARM/bin/arm-none-eabi-ranlib.exe and b/devkitARM/bin/arm-none-eabi-ranlib.exe differ diff --git a/devkitARM/bin/arm-none-eabi-readelf.exe b/devkitARM/bin/arm-none-eabi-readelf.exe index 70a6cbb6c..17a83a53f 100644 Binary files a/devkitARM/bin/arm-none-eabi-readelf.exe and b/devkitARM/bin/arm-none-eabi-readelf.exe differ diff --git a/devkitARM/bin/arm-none-eabi-run.exe b/devkitARM/bin/arm-none-eabi-run.exe index 98bc57ce1..050e35833 100644 Binary files a/devkitARM/bin/arm-none-eabi-run.exe and b/devkitARM/bin/arm-none-eabi-run.exe differ diff --git a/devkitARM/bin/arm-none-eabi-size.exe b/devkitARM/bin/arm-none-eabi-size.exe index f425351cb..bf85b7c54 100644 Binary files a/devkitARM/bin/arm-none-eabi-size.exe and b/devkitARM/bin/arm-none-eabi-size.exe differ diff --git a/devkitARM/bin/arm-none-eabi-strings.exe b/devkitARM/bin/arm-none-eabi-strings.exe index c8f94bad2..dad5f9262 100644 Binary files a/devkitARM/bin/arm-none-eabi-strings.exe and b/devkitARM/bin/arm-none-eabi-strings.exe differ diff --git a/devkitARM/bin/arm-none-eabi-strip.exe b/devkitARM/bin/arm-none-eabi-strip.exe index 3bd7534b4..cab8b72f9 100644 Binary files a/devkitARM/bin/arm-none-eabi-strip.exe and b/devkitARM/bin/arm-none-eabi-strip.exe differ diff --git a/devkitARM/bin/dfu-prefix.exe b/devkitARM/bin/dfu-prefix.exe index d8772c5d5..9da5d7fb9 100644 Binary files a/devkitARM/bin/dfu-prefix.exe and b/devkitARM/bin/dfu-prefix.exe differ diff --git a/devkitARM/bin/dfu-suffix.exe b/devkitARM/bin/dfu-suffix.exe index b0ed41941..5cc1bc9c3 100644 Binary files a/devkitARM/bin/dfu-suffix.exe and b/devkitARM/bin/dfu-suffix.exe differ diff --git a/devkitARM/bin/dfu-util.exe b/devkitARM/bin/dfu-util.exe index dac25654c..64def1939 100644 Binary files a/devkitARM/bin/dfu-util.exe and b/devkitARM/bin/dfu-util.exe differ diff --git a/devkitARM/bin/dslink.exe b/devkitARM/bin/dslink.exe index a96dc7bc9..3048632c8 100644 Binary files a/devkitARM/bin/dslink.exe and b/devkitARM/bin/dslink.exe differ diff --git a/devkitARM/bin/grit.exe b/devkitARM/bin/grit.exe index 86fc0211b..78f53b313 100644 Binary files a/devkitARM/bin/grit.exe and b/devkitARM/bin/grit.exe differ diff --git a/devkitARM/bin/libquadmath-0.dll b/devkitARM/bin/libquadmath-0.dll new file mode 100644 index 000000000..471dc7795 Binary files /dev/null and b/devkitARM/bin/libquadmath-0.dll differ diff --git a/devkitARM/bin/libssp-0.dll b/devkitARM/bin/libssp-0.dll new file mode 100644 index 000000000..20447be8f Binary files /dev/null and b/devkitARM/bin/libssp-0.dll differ diff --git a/devkitARM/bin/ndstool.exe b/devkitARM/bin/ndstool.exe index 7e00e0dcd..f0ccbc041 100644 Binary files a/devkitARM/bin/ndstool.exe and b/devkitARM/bin/ndstool.exe differ diff --git a/devkitARM/bin/picasso.exe b/devkitARM/bin/picasso.exe index 3ffc2f533..352018e0b 100644 Binary files a/devkitARM/bin/picasso.exe and b/devkitARM/bin/picasso.exe differ diff --git a/devkitARM/bin/smdhtool.exe b/devkitARM/bin/smdhtool.exe index 3b855e0d2..c414075a5 100644 Binary files a/devkitARM/bin/smdhtool.exe and b/devkitARM/bin/smdhtool.exe differ diff --git a/devkitARM/bin/st-flash.exe b/devkitARM/bin/st-flash.exe index 52eff9a0c..114ba609d 100644 Binary files a/devkitARM/bin/st-flash.exe and b/devkitARM/bin/st-flash.exe differ diff --git a/devkitARM/bin/st-info.exe b/devkitARM/bin/st-info.exe new file mode 100644 index 000000000..5b2ee807c Binary files /dev/null and b/devkitARM/bin/st-info.exe differ diff --git a/devkitARM/bin/st-term.exe b/devkitARM/bin/st-term.exe deleted file mode 100644 index 753806359..000000000 Binary files a/devkitARM/bin/st-term.exe and /dev/null differ diff --git a/devkitARM/bin/st-util.exe b/devkitARM/bin/st-util.exe index 3f9cddcfc..176d3939a 100644 Binary files a/devkitARM/bin/st-util.exe and b/devkitARM/bin/st-util.exe differ diff --git a/devkitARM/include/gdb/jit-reader.h b/devkitARM/include/gdb/jit-reader.h index 4d8ca52b4..5a4272ee7 100644 --- a/devkitARM/include/gdb/jit-reader.h +++ b/devkitARM/include/gdb/jit-reader.h @@ -1,6 +1,6 @@ /* JIT declarations for GDB, the GNU Debugger. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2017 Free Software Foundation, Inc. This file is part of GDB. diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crtbegin.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crtbegin.o deleted file mode 100644 index d207c528a..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crtbegin.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crtend.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crtend.o deleted file mode 100644 index d69243c90..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crtend.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crti.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crti.o deleted file mode 100644 index e7ef6f232..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crti.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crtn.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crtn.o deleted file mode 100644 index dc5bd5f90..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/crtn.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/libgcc.a b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/libgcc.a deleted file mode 100644 index 34a74755b..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/libgcc.a and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/libgcov.a b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/libgcov.a deleted file mode 100644 index 5abdb460f..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/armv6k/fpu/libgcov.a and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crtbegin.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crtbegin.o deleted file mode 100644 index 768f8bf9a..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crtbegin.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crtend.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crtend.o deleted file mode 100644 index ca9bf5ca3..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crtend.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crti.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crti.o deleted file mode 100644 index 87856b750..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crti.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crtn.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crtn.o deleted file mode 100644 index 948fb2da2..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/crtn.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/arm_acle.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/arm_acle.h deleted file mode 100644 index 418b39c09..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/arm_acle.h +++ /dev/null @@ -1,100 +0,0 @@ -/* ARM Non-NEON ACLE intrinsics include file. - - Copyright (C) 2013-2015 Free Software Foundation, Inc. - Contributed by ARM Ltd. - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -#ifndef _GCC_ARM_ACLE_H -#define _GCC_ARM_ACLE_H - -#include -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __ARM_FEATURE_CRC32 -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -__crc32b (uint32_t __a, uint8_t __b) -{ - return __builtin_arm_crc32b (__a, __b); -} - -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -__crc32h (uint32_t __a, uint16_t __b) -{ - return __builtin_arm_crc32h (__a, __b); -} - -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -__crc32w (uint32_t __a, uint32_t __b) -{ - return __builtin_arm_crc32w (__a, __b); -} - -#ifdef __ARM_32BIT_STATE -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -__crc32d (uint32_t __a, uint64_t __b) -{ - uint32_t __d; - - __d = __crc32w (__crc32w (__a, __b & 0xffffffffULL), __b >> 32); - return __d; -} -#endif - -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -__crc32cb (uint32_t __a, uint8_t __b) -{ - return __builtin_arm_crc32cb (__a, __b); -} - -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -__crc32ch (uint32_t __a, uint16_t __b) -{ - return __builtin_arm_crc32ch (__a, __b); -} - -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -__crc32cw (uint32_t __a, uint32_t __b) -{ - return __builtin_arm_crc32cw (__a, __b); -} - -#ifdef __ARM_32BIT_STATE -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -__crc32cd (uint32_t __a, uint64_t __b) -{ - uint32_t __d; - - __d = __crc32cw (__crc32cw (__a, __b & 0xffffffffULL), __b >> 32); - return __d; -} -#endif - -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/arm_neon.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/arm_neon.h deleted file mode 100644 index c923e294c..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/arm_neon.h +++ /dev/null @@ -1,13865 +0,0 @@ -/* ARM NEON intrinsics include file. - - Copyright (C) 2006-2015 Free Software Foundation, Inc. - Contributed by CodeSourcery. - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -#ifndef _GCC_ARM_NEON_H -#define _GCC_ARM_NEON_H 1 - -#ifndef __ARM_NEON__ -#error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h -#else - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -typedef __simd64_int8_t int8x8_t; -typedef __simd64_int16_t int16x4_t; -typedef __simd64_int32_t int32x2_t; -typedef __builtin_neon_di int64x1_t; -typedef __simd64_float16_t float16x4_t; -typedef __simd64_float32_t float32x2_t; -typedef __simd64_poly8_t poly8x8_t; -typedef __simd64_poly16_t poly16x4_t; -#ifdef __ARM_FEATURE_CRYPTO -typedef __builtin_neon_poly64 poly64x1_t; -#endif -typedef __simd64_uint8_t uint8x8_t; -typedef __simd64_uint16_t uint16x4_t; -typedef __simd64_uint32_t uint32x2_t; -typedef __builtin_neon_udi uint64x1_t; - -typedef __simd128_int8_t int8x16_t; -typedef __simd128_int16_t int16x8_t; -typedef __simd128_int32_t int32x4_t; -typedef __simd128_int64_t int64x2_t; -typedef __simd128_float32_t float32x4_t; -typedef __simd128_poly8_t poly8x16_t; -typedef __simd128_poly16_t poly16x8_t; -#ifdef __ARM_FEATURE_CRYPTO -typedef __builtin_neon_poly64 poly64x2_t __attribute__ ((__vector_size__ (16))); -#endif - -typedef __simd128_uint8_t uint8x16_t; -typedef __simd128_uint16_t uint16x8_t; -typedef __simd128_uint32_t uint32x4_t; -typedef __simd128_uint64_t uint64x2_t; - -typedef float float32_t; - -/* The Poly types are user visible and live in their own world, - keep them that way. */ -typedef __builtin_neon_poly8 poly8_t; -typedef __builtin_neon_poly16 poly16_t; -#ifdef __ARM_FEATURE_CRYPTO -typedef __builtin_neon_poly64 poly64_t; -typedef __builtin_neon_poly128 poly128_t; -#endif - -typedef struct int8x8x2_t -{ - int8x8_t val[2]; -} int8x8x2_t; - -typedef struct int8x16x2_t -{ - int8x16_t val[2]; -} int8x16x2_t; - -typedef struct int16x4x2_t -{ - int16x4_t val[2]; -} int16x4x2_t; - -typedef struct int16x8x2_t -{ - int16x8_t val[2]; -} int16x8x2_t; - -typedef struct int32x2x2_t -{ - int32x2_t val[2]; -} int32x2x2_t; - -typedef struct int32x4x2_t -{ - int32x4_t val[2]; -} int32x4x2_t; - -typedef struct int64x1x2_t -{ - int64x1_t val[2]; -} int64x1x2_t; - -typedef struct int64x2x2_t -{ - int64x2_t val[2]; -} int64x2x2_t; - -typedef struct uint8x8x2_t -{ - uint8x8_t val[2]; -} uint8x8x2_t; - -typedef struct uint8x16x2_t -{ - uint8x16_t val[2]; -} uint8x16x2_t; - -typedef struct uint16x4x2_t -{ - uint16x4_t val[2]; -} uint16x4x2_t; - -typedef struct uint16x8x2_t -{ - uint16x8_t val[2]; -} uint16x8x2_t; - -typedef struct uint32x2x2_t -{ - uint32x2_t val[2]; -} uint32x2x2_t; - -typedef struct uint32x4x2_t -{ - uint32x4_t val[2]; -} uint32x4x2_t; - -typedef struct uint64x1x2_t -{ - uint64x1_t val[2]; -} uint64x1x2_t; - -typedef struct uint64x2x2_t -{ - uint64x2_t val[2]; -} uint64x2x2_t; - -typedef struct float32x2x2_t -{ - float32x2_t val[2]; -} float32x2x2_t; - -typedef struct float32x4x2_t -{ - float32x4_t val[2]; -} float32x4x2_t; - -typedef struct poly8x8x2_t -{ - poly8x8_t val[2]; -} poly8x8x2_t; - -typedef struct poly8x16x2_t -{ - poly8x16_t val[2]; -} poly8x16x2_t; - -typedef struct poly16x4x2_t -{ - poly16x4_t val[2]; -} poly16x4x2_t; - -typedef struct poly16x8x2_t -{ - poly16x8_t val[2]; -} poly16x8x2_t; - -#ifdef __ARM_FEATURE_CRYPTO -typedef struct poly64x1x2_t -{ - poly64x1_t val[2]; -} poly64x1x2_t; -#endif - - -#ifdef __ARM_FEATURE_CRYPTO -typedef struct poly64x2x2_t -{ - poly64x2_t val[2]; -} poly64x2x2_t; -#endif - - -typedef struct int8x8x3_t -{ - int8x8_t val[3]; -} int8x8x3_t; - -typedef struct int8x16x3_t -{ - int8x16_t val[3]; -} int8x16x3_t; - -typedef struct int16x4x3_t -{ - int16x4_t val[3]; -} int16x4x3_t; - -typedef struct int16x8x3_t -{ - int16x8_t val[3]; -} int16x8x3_t; - -typedef struct int32x2x3_t -{ - int32x2_t val[3]; -} int32x2x3_t; - -typedef struct int32x4x3_t -{ - int32x4_t val[3]; -} int32x4x3_t; - -typedef struct int64x1x3_t -{ - int64x1_t val[3]; -} int64x1x3_t; - -typedef struct int64x2x3_t -{ - int64x2_t val[3]; -} int64x2x3_t; - -typedef struct uint8x8x3_t -{ - uint8x8_t val[3]; -} uint8x8x3_t; - -typedef struct uint8x16x3_t -{ - uint8x16_t val[3]; -} uint8x16x3_t; - -typedef struct uint16x4x3_t -{ - uint16x4_t val[3]; -} uint16x4x3_t; - -typedef struct uint16x8x3_t -{ - uint16x8_t val[3]; -} uint16x8x3_t; - -typedef struct uint32x2x3_t -{ - uint32x2_t val[3]; -} uint32x2x3_t; - -typedef struct uint32x4x3_t -{ - uint32x4_t val[3]; -} uint32x4x3_t; - -typedef struct uint64x1x3_t -{ - uint64x1_t val[3]; -} uint64x1x3_t; - -typedef struct uint64x2x3_t -{ - uint64x2_t val[3]; -} uint64x2x3_t; - -typedef struct float32x2x3_t -{ - float32x2_t val[3]; -} float32x2x3_t; - -typedef struct float32x4x3_t -{ - float32x4_t val[3]; -} float32x4x3_t; - -typedef struct poly8x8x3_t -{ - poly8x8_t val[3]; -} poly8x8x3_t; - -typedef struct poly8x16x3_t -{ - poly8x16_t val[3]; -} poly8x16x3_t; - -typedef struct poly16x4x3_t -{ - poly16x4_t val[3]; -} poly16x4x3_t; - -typedef struct poly16x8x3_t -{ - poly16x8_t val[3]; -} poly16x8x3_t; - -#ifdef __ARM_FEATURE_CRYPTO -typedef struct poly64x1x3_t -{ - poly64x1_t val[3]; -} poly64x1x3_t; -#endif - - -#ifdef __ARM_FEATURE_CRYPTO -typedef struct poly64x2x3_t -{ - poly64x2_t val[3]; -} poly64x2x3_t; -#endif - - -typedef struct int8x8x4_t -{ - int8x8_t val[4]; -} int8x8x4_t; - -typedef struct int8x16x4_t -{ - int8x16_t val[4]; -} int8x16x4_t; - -typedef struct int16x4x4_t -{ - int16x4_t val[4]; -} int16x4x4_t; - -typedef struct int16x8x4_t -{ - int16x8_t val[4]; -} int16x8x4_t; - -typedef struct int32x2x4_t -{ - int32x2_t val[4]; -} int32x2x4_t; - -typedef struct int32x4x4_t -{ - int32x4_t val[4]; -} int32x4x4_t; - -typedef struct int64x1x4_t -{ - int64x1_t val[4]; -} int64x1x4_t; - -typedef struct int64x2x4_t -{ - int64x2_t val[4]; -} int64x2x4_t; - -typedef struct uint8x8x4_t -{ - uint8x8_t val[4]; -} uint8x8x4_t; - -typedef struct uint8x16x4_t -{ - uint8x16_t val[4]; -} uint8x16x4_t; - -typedef struct uint16x4x4_t -{ - uint16x4_t val[4]; -} uint16x4x4_t; - -typedef struct uint16x8x4_t -{ - uint16x8_t val[4]; -} uint16x8x4_t; - -typedef struct uint32x2x4_t -{ - uint32x2_t val[4]; -} uint32x2x4_t; - -typedef struct uint32x4x4_t -{ - uint32x4_t val[4]; -} uint32x4x4_t; - -typedef struct uint64x1x4_t -{ - uint64x1_t val[4]; -} uint64x1x4_t; - -typedef struct uint64x2x4_t -{ - uint64x2_t val[4]; -} uint64x2x4_t; - -typedef struct float32x2x4_t -{ - float32x2_t val[4]; -} float32x2x4_t; - -typedef struct float32x4x4_t -{ - float32x4_t val[4]; -} float32x4x4_t; - -typedef struct poly8x8x4_t -{ - poly8x8_t val[4]; -} poly8x8x4_t; - -typedef struct poly8x16x4_t -{ - poly8x16_t val[4]; -} poly8x16x4_t; - -typedef struct poly16x4x4_t -{ - poly16x4_t val[4]; -} poly16x4x4_t; - -typedef struct poly16x8x4_t -{ - poly16x8_t val[4]; -} poly16x8x4_t; - -#ifdef __ARM_FEATURE_CRYPTO -typedef struct poly64x1x4_t -{ - poly64x1_t val[4]; -} poly64x1x4_t; -#endif - - -#ifdef __ARM_FEATURE_CRYPTO -typedef struct poly64x2x4_t -{ - poly64x2_t val[4]; -} poly64x2x4_t; -#endif - -/* vadd */ -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vadd_s8 (int8x8_t __a, int8x8_t __b) -{ - return __a + __b; -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vadd_s16 (int16x4_t __a, int16x4_t __b) -{ - return __a + __b; -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vadd_s32 (int32x2_t __a, int32x2_t __b) -{ - return __a + __b; -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vadd_f32 (float32x2_t __a, float32x2_t __b) -{ -#ifdef __FAST_MATH - return __a + __b; -#else - return (float32x2_t) __builtin_neon_vaddv2sf (__a, __b); -#endif -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vadd_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return __a + __b; -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vadd_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return __a + __b; -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vadd_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return __a + __b; -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vadd_s64 (int64x1_t __a, int64x1_t __b) -{ - return __a + __b; -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vadd_u64 (uint64x1_t __a, uint64x1_t __b) -{ - return __a + __b; -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vaddq_s8 (int8x16_t __a, int8x16_t __b) -{ - return __a + __b; -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vaddq_s16 (int16x8_t __a, int16x8_t __b) -{ - return __a + __b; -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vaddq_s32 (int32x4_t __a, int32x4_t __b) -{ - return __a + __b; -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vaddq_s64 (int64x2_t __a, int64x2_t __b) -{ - return __a + __b; -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vaddq_f32 (float32x4_t __a, float32x4_t __b) -{ -#ifdef __FAST_MATH - return __a + __b; -#else - return (float32x4_t) __builtin_neon_vaddv4sf (__a, __b); -#endif -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vaddq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return __a + __b; -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vaddq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return __a + __b; -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vaddq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return __a + __b; -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vaddq_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return __a + __b; -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vaddl_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int16x8_t)__builtin_neon_vaddlsv8qi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vaddl_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int32x4_t)__builtin_neon_vaddlsv4hi (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vaddl_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int64x2_t)__builtin_neon_vaddlsv2si (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vaddl_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vaddluv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vaddl_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vaddluv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vaddl_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vaddluv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vaddw_s8 (int16x8_t __a, int8x8_t __b) -{ - return (int16x8_t)__builtin_neon_vaddwsv8qi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vaddw_s16 (int32x4_t __a, int16x4_t __b) -{ - return (int32x4_t)__builtin_neon_vaddwsv4hi (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vaddw_s32 (int64x2_t __a, int32x2_t __b) -{ - return (int64x2_t)__builtin_neon_vaddwsv2si (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vaddw_u8 (uint16x8_t __a, uint8x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vaddwuv8qi ((int16x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vaddw_u16 (uint32x4_t __a, uint16x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vaddwuv4hi ((int32x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vaddw_u32 (uint64x2_t __a, uint32x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vaddwuv2si ((int64x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vhadd_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vhaddsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vhadd_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vhaddsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vhadd_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vhaddsv2si (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vhadd_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vhadduv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vhadd_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vhadduv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vhadd_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vhadduv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vhaddq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vhaddsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vhaddq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vhaddsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vhaddq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vhaddsv4si (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vhaddq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vhadduv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vhaddq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vhadduv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vhaddq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vhadduv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vrhadd_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vrhaddsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vrhadd_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vrhaddsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vrhadd_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vrhaddsv2si (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vrhadd_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vrhadduv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vrhadd_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vrhadduv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vrhadd_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vrhadduv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vrhaddq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vrhaddsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vrhaddq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vrhaddsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vrhaddq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vrhaddsv4si (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vrhaddq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vrhadduv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vrhaddq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vrhadduv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vrhaddq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vrhadduv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vqadd_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vqaddsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqadd_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vqaddsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqadd_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vqaddsv2si (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vqadd_s64 (int64x1_t __a, int64x1_t __b) -{ - return (int64x1_t)__builtin_neon_vqaddsdi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqadd_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vqadduv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqadd_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vqadduv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqadd_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vqadduv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vqadd_u64 (uint64x1_t __a, uint64x1_t __b) -{ - return (uint64x1_t)__builtin_neon_vqaddudi ((int64x1_t) __a, (int64x1_t) __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vqaddq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vqaddsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqaddq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vqaddsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqaddq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vqaddsv4si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqaddq_s64 (int64x2_t __a, int64x2_t __b) -{ - return (int64x2_t)__builtin_neon_vqaddsv2di (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vqaddq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vqadduv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vqaddq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vqadduv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vqaddq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vqadduv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vqaddq_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vqadduv2di ((int64x2_t) __a, (int64x2_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vaddhn_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int8x8_t)__builtin_neon_vaddhnv8hi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vaddhn_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int16x4_t)__builtin_neon_vaddhnv4si (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vaddhn_s64 (int64x2_t __a, int64x2_t __b) -{ - return (int32x2_t)__builtin_neon_vaddhnv2di (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vaddhn_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vaddhnv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vaddhn_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vaddhnv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vaddhn_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vaddhnv2di ((int64x2_t) __a, (int64x2_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vraddhn_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int8x8_t)__builtin_neon_vraddhnv8hi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vraddhn_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int16x4_t)__builtin_neon_vraddhnv4si (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vraddhn_s64 (int64x2_t __a, int64x2_t __b) -{ - return (int32x2_t)__builtin_neon_vraddhnv2di (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vraddhn_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vraddhnv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vraddhn_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vraddhnv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vraddhn_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vraddhnv2di ((int64x2_t) __a, (int64x2_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vmul_s8 (int8x8_t __a, int8x8_t __b) -{ - return __a * __b; -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmul_s16 (int16x4_t __a, int16x4_t __b) -{ - return __a * __b; -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmul_s32 (int32x2_t __a, int32x2_t __b) -{ - return __a * __b; -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmul_f32 (float32x2_t __a, float32x2_t __b) -{ -#ifdef __FAST_MATH - return __a * __b; -#else - return (float32x2_t) __builtin_neon_vmulfv2sf (__a, __b); -#endif - -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vmul_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return __a * __b; -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmul_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return __a * __b; -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmul_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return __a * __b; -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vmulq_s8 (int8x16_t __a, int8x16_t __b) -{ - return __a * __b; -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmulq_s16 (int16x8_t __a, int16x8_t __b) -{ - return __a * __b; -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmulq_s32 (int32x4_t __a, int32x4_t __b) -{ - return __a * __b; -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmulq_f32 (float32x4_t __a, float32x4_t __b) -{ -#ifdef __FAST_MATH - return __a * __b; -#else - return (float32x4_t) __builtin_neon_vmulfv4sf (__a, __b); -#endif -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vmulq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return __a * __b; -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmulq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return __a * __b; -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmulq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return __a * __b; -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vmul_p8 (poly8x8_t __a, poly8x8_t __b) -{ - return (poly8x8_t)__builtin_neon_vmulpv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vmulq_p8 (poly8x16_t __a, poly8x16_t __b) -{ - return (poly8x16_t)__builtin_neon_vmulpv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqdmulh_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vqdmulhv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqdmulh_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vqdmulhv2si (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqdmulhq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vqdmulhv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmulhq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vqdmulhv4si (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqrdmulh_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vqrdmulhv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqrdmulh_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vqrdmulhv2si (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqrdmulhq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vqrdmulhv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqrdmulhq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vqrdmulhv4si (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmull_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int16x8_t)__builtin_neon_vmullsv8qi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmull_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int32x4_t)__builtin_neon_vmullsv4hi (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmull_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int64x2_t)__builtin_neon_vmullsv2si (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmull_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vmulluv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmull_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vmulluv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmull_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vmulluv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vmull_p8 (poly8x8_t __a, poly8x8_t __b) -{ - return (poly16x8_t)__builtin_neon_vmullpv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmull_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int32x4_t)__builtin_neon_vqdmullv4hi (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqdmull_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int64x2_t)__builtin_neon_vqdmullv2si (__a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vmla_s8 (int8x8_t __a, int8x8_t __b, int8x8_t __c) -{ - return (int8x8_t)__builtin_neon_vmlav8qi (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmla_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c) -{ - return (int16x4_t)__builtin_neon_vmlav4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmla_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c) -{ - return (int32x2_t)__builtin_neon_vmlav2si (__a, __b, __c); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmla_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c) -{ - return (float32x2_t)__builtin_neon_vmlav2sf (__a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vmla_u8 (uint8x8_t __a, uint8x8_t __b, uint8x8_t __c) -{ - return (uint8x8_t)__builtin_neon_vmlav8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmla_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c) -{ - return (uint16x4_t)__builtin_neon_vmlav4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmla_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c) -{ - return (uint32x2_t)__builtin_neon_vmlav2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vmlaq_s8 (int8x16_t __a, int8x16_t __b, int8x16_t __c) -{ - return (int8x16_t)__builtin_neon_vmlav16qi (__a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmlaq_s16 (int16x8_t __a, int16x8_t __b, int16x8_t __c) -{ - return (int16x8_t)__builtin_neon_vmlav8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlaq_s32 (int32x4_t __a, int32x4_t __b, int32x4_t __c) -{ - return (int32x4_t)__builtin_neon_vmlav4si (__a, __b, __c); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmlaq_f32 (float32x4_t __a, float32x4_t __b, float32x4_t __c) -{ - return (float32x4_t)__builtin_neon_vmlav4sf (__a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vmlaq_u8 (uint8x16_t __a, uint8x16_t __b, uint8x16_t __c) -{ - return (uint8x16_t)__builtin_neon_vmlav16qi ((int8x16_t) __a, (int8x16_t) __b, (int8x16_t) __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmlaq_u16 (uint16x8_t __a, uint16x8_t __b, uint16x8_t __c) -{ - return (uint16x8_t)__builtin_neon_vmlav8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x8_t) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlaq_u32 (uint32x4_t __a, uint32x4_t __b, uint32x4_t __c) -{ - return (uint32x4_t)__builtin_neon_vmlav4si ((int32x4_t) __a, (int32x4_t) __b, (int32x4_t) __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmlal_s8 (int16x8_t __a, int8x8_t __b, int8x8_t __c) -{ - return (int16x8_t)__builtin_neon_vmlalsv8qi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlal_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c) -{ - return (int32x4_t)__builtin_neon_vmlalsv4hi (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmlal_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c) -{ - return (int64x2_t)__builtin_neon_vmlalsv2si (__a, __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmlal_u8 (uint16x8_t __a, uint8x8_t __b, uint8x8_t __c) -{ - return (uint16x8_t)__builtin_neon_vmlaluv8qi ((int16x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlal_u16 (uint32x4_t __a, uint16x4_t __b, uint16x4_t __c) -{ - return (uint32x4_t)__builtin_neon_vmlaluv4hi ((int32x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmlal_u32 (uint64x2_t __a, uint32x2_t __b, uint32x2_t __c) -{ - return (uint64x2_t)__builtin_neon_vmlaluv2si ((int64x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmlal_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c) -{ - return (int32x4_t)__builtin_neon_vqdmlalv4hi (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqdmlal_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c) -{ - return (int64x2_t)__builtin_neon_vqdmlalv2si (__a, __b, __c); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vmls_s8 (int8x8_t __a, int8x8_t __b, int8x8_t __c) -{ - return (int8x8_t)__builtin_neon_vmlsv8qi (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmls_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c) -{ - return (int16x4_t)__builtin_neon_vmlsv4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmls_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c) -{ - return (int32x2_t)__builtin_neon_vmlsv2si (__a, __b, __c); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmls_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c) -{ - return (float32x2_t)__builtin_neon_vmlsv2sf (__a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vmls_u8 (uint8x8_t __a, uint8x8_t __b, uint8x8_t __c) -{ - return (uint8x8_t)__builtin_neon_vmlsv8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmls_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c) -{ - return (uint16x4_t)__builtin_neon_vmlsv4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmls_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c) -{ - return (uint32x2_t)__builtin_neon_vmlsv2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vmlsq_s8 (int8x16_t __a, int8x16_t __b, int8x16_t __c) -{ - return (int8x16_t)__builtin_neon_vmlsv16qi (__a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmlsq_s16 (int16x8_t __a, int16x8_t __b, int16x8_t __c) -{ - return (int16x8_t)__builtin_neon_vmlsv8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlsq_s32 (int32x4_t __a, int32x4_t __b, int32x4_t __c) -{ - return (int32x4_t)__builtin_neon_vmlsv4si (__a, __b, __c); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmlsq_f32 (float32x4_t __a, float32x4_t __b, float32x4_t __c) -{ - return (float32x4_t)__builtin_neon_vmlsv4sf (__a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vmlsq_u8 (uint8x16_t __a, uint8x16_t __b, uint8x16_t __c) -{ - return (uint8x16_t)__builtin_neon_vmlsv16qi ((int8x16_t) __a, (int8x16_t) __b, (int8x16_t) __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmlsq_u16 (uint16x8_t __a, uint16x8_t __b, uint16x8_t __c) -{ - return (uint16x8_t)__builtin_neon_vmlsv8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x8_t) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlsq_u32 (uint32x4_t __a, uint32x4_t __b, uint32x4_t __c) -{ - return (uint32x4_t)__builtin_neon_vmlsv4si ((int32x4_t) __a, (int32x4_t) __b, (int32x4_t) __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmlsl_s8 (int16x8_t __a, int8x8_t __b, int8x8_t __c) -{ - return (int16x8_t)__builtin_neon_vmlslsv8qi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlsl_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c) -{ - return (int32x4_t)__builtin_neon_vmlslsv4hi (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmlsl_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c) -{ - return (int64x2_t)__builtin_neon_vmlslsv2si (__a, __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmlsl_u8 (uint16x8_t __a, uint8x8_t __b, uint8x8_t __c) -{ - return (uint16x8_t)__builtin_neon_vmlsluv8qi ((int16x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlsl_u16 (uint32x4_t __a, uint16x4_t __b, uint16x4_t __c) -{ - return (uint32x4_t)__builtin_neon_vmlsluv4hi ((int32x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmlsl_u32 (uint64x2_t __a, uint32x2_t __b, uint32x2_t __c) -{ - return (uint64x2_t)__builtin_neon_vmlsluv2si ((int64x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmlsl_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c) -{ - return (int32x4_t)__builtin_neon_vqdmlslv4hi (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqdmlsl_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c) -{ - return (int64x2_t)__builtin_neon_vqdmlslv2si (__a, __b, __c); -} - -#ifdef __ARM_FEATURE_FMA -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vfma_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c) -{ - return (float32x2_t)__builtin_neon_vfmav2sf (__a, __b, __c); -} - -#endif -#ifdef __ARM_FEATURE_FMA -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vfmaq_f32 (float32x4_t __a, float32x4_t __b, float32x4_t __c) -{ - return (float32x4_t)__builtin_neon_vfmav4sf (__a, __b, __c); -} - -#endif -#ifdef __ARM_FEATURE_FMA -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vfms_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c) -{ - return (float32x2_t)__builtin_neon_vfmsv2sf (__a, __b, __c); -} - -#endif -#ifdef __ARM_FEATURE_FMA -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vfmsq_f32 (float32x4_t __a, float32x4_t __b, float32x4_t __c) -{ - return (float32x4_t)__builtin_neon_vfmsv4sf (__a, __b, __c); -} - -#endif -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrndn_f32 (float32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vrintnv2sf (__a); -} - -#endif -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrndnq_f32 (float32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vrintnv4sf (__a); -} - -#endif -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrnda_f32 (float32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vrintav2sf (__a); -} - -#endif -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrndaq_f32 (float32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vrintav4sf (__a); -} - -#endif -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrndp_f32 (float32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vrintpv2sf (__a); -} - -#endif -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrndpq_f32 (float32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vrintpv4sf (__a); -} - -#endif -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrndm_f32 (float32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vrintmv2sf (__a); -} - -#endif -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrndmq_f32 (float32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vrintmv4sf (__a); -} - -#endif - -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrndx_f32 (float32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vrintxv2sf (__a); -} - -#endif - -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrndxq_f32 (float32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vrintxv4sf (__a); -} - -#endif - -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrnd_f32 (float32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vrintzv2sf (__a); -} - -#endif -#if __ARM_ARCH >= 8 -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrndq_f32 (float32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vrintzv4sf (__a); -} - -#endif - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vsub_s8 (int8x8_t __a, int8x8_t __b) -{ - return __a - __b; -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vsub_s16 (int16x4_t __a, int16x4_t __b) -{ - return __a - __b; -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vsub_s32 (int32x2_t __a, int32x2_t __b) -{ - return __a - __b; -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vsub_f32 (float32x2_t __a, float32x2_t __b) -{ -#ifdef __FAST_MATH - return __a - __b; -#else - return (float32x2_t) __builtin_neon_vsubv2sf (__a, __b); -#endif -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vsub_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return __a - __b; -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vsub_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return __a - __b; -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vsub_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return __a - __b; -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vsub_s64 (int64x1_t __a, int64x1_t __b) -{ - return __a - __b; -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vsub_u64 (uint64x1_t __a, uint64x1_t __b) -{ - return __a - __b; -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vsubq_s8 (int8x16_t __a, int8x16_t __b) -{ - return __a - __b; -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vsubq_s16 (int16x8_t __a, int16x8_t __b) -{ - return __a - __b; -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vsubq_s32 (int32x4_t __a, int32x4_t __b) -{ - return __a - __b; -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vsubq_s64 (int64x2_t __a, int64x2_t __b) -{ - return __a - __b; -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vsubq_f32 (float32x4_t __a, float32x4_t __b) -{ -#ifdef __FAST_MATH - return __a - __b; -#else - return (float32x4_t) __builtin_neon_vsubv4sf (__a, __b); -#endif -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vsubq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return __a - __b; -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vsubq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return __a - __b; -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsubq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return __a - __b; -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vsubq_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return __a - __b; -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vsubl_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int16x8_t)__builtin_neon_vsublsv8qi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vsubl_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int32x4_t)__builtin_neon_vsublsv4hi (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vsubl_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int64x2_t)__builtin_neon_vsublsv2si (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vsubl_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vsubluv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsubl_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vsubluv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vsubl_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vsubluv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vsubw_s8 (int16x8_t __a, int8x8_t __b) -{ - return (int16x8_t)__builtin_neon_vsubwsv8qi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vsubw_s16 (int32x4_t __a, int16x4_t __b) -{ - return (int32x4_t)__builtin_neon_vsubwsv4hi (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vsubw_s32 (int64x2_t __a, int32x2_t __b) -{ - return (int64x2_t)__builtin_neon_vsubwsv2si (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vsubw_u8 (uint16x8_t __a, uint8x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vsubwuv8qi ((int16x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsubw_u16 (uint32x4_t __a, uint16x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vsubwuv4hi ((int32x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vsubw_u32 (uint64x2_t __a, uint32x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vsubwuv2si ((int64x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vhsub_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vhsubsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vhsub_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vhsubsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vhsub_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vhsubsv2si (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vhsub_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vhsubuv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vhsub_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vhsubuv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vhsub_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vhsubuv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vhsubq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vhsubsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vhsubq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vhsubsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vhsubq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vhsubsv4si (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vhsubq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vhsubuv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vhsubq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vhsubuv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vhsubq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vhsubuv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vqsub_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vqsubsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqsub_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vqsubsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqsub_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vqsubsv2si (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vqsub_s64 (int64x1_t __a, int64x1_t __b) -{ - return (int64x1_t)__builtin_neon_vqsubsdi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqsub_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vqsubuv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqsub_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vqsubuv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqsub_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vqsubuv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vqsub_u64 (uint64x1_t __a, uint64x1_t __b) -{ - return (uint64x1_t)__builtin_neon_vqsubudi ((int64x1_t) __a, (int64x1_t) __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vqsubq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vqsubsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqsubq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vqsubsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqsubq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vqsubsv4si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqsubq_s64 (int64x2_t __a, int64x2_t __b) -{ - return (int64x2_t)__builtin_neon_vqsubsv2di (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vqsubq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vqsubuv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vqsubq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vqsubuv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vqsubq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vqsubuv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vqsubq_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vqsubuv2di ((int64x2_t) __a, (int64x2_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vsubhn_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int8x8_t)__builtin_neon_vsubhnv8hi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vsubhn_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int16x4_t)__builtin_neon_vsubhnv4si (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vsubhn_s64 (int64x2_t __a, int64x2_t __b) -{ - return (int32x2_t)__builtin_neon_vsubhnv2di (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vsubhn_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vsubhnv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vsubhn_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vsubhnv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vsubhn_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vsubhnv2di ((int64x2_t) __a, (int64x2_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vrsubhn_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int8x8_t)__builtin_neon_vrsubhnv8hi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vrsubhn_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int16x4_t)__builtin_neon_vrsubhnv4si (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vrsubhn_s64 (int64x2_t __a, int64x2_t __b) -{ - return (int32x2_t)__builtin_neon_vrsubhnv2di (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vrsubhn_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vrsubhnv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vrsubhn_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vrsubhnv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vrsubhn_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vrsubhnv2di ((int64x2_t) __a, (int64x2_t) __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vceq_s8 (int8x8_t __a, int8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vceqv8qi (__a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vceq_s16 (int16x4_t __a, int16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vceqv4hi (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vceq_s32 (int32x2_t __a, int32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vceqv2si (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vceq_f32 (float32x2_t __a, float32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vceqv2sf (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vceq_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vceqv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vceq_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vceqv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vceq_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vceqv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vceq_p8 (poly8x8_t __a, poly8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vceqv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vceqq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vceqv16qi (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vceqq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vceqv8hi (__a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vceqq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vceqv4si (__a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vceqq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vceqv4sf (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vceqq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vceqv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vceqq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vceqv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vceqq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vceqv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vceqq_p8 (poly8x16_t __a, poly8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vceqv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vcge_s8 (int8x8_t __a, int8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vcgev8qi (__a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vcge_s16 (int16x4_t __a, int16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vcgev4hi (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcge_s32 (int32x2_t __a, int32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgev2si (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcge_f32 (float32x2_t __a, float32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgev2sf (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vcge_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vcgeuv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vcge_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vcgeuv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcge_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgeuv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vcgeq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vcgev16qi (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vcgeq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vcgev8hi (__a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcgeq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgev4si (__a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcgeq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgev4sf (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vcgeq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vcgeuv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vcgeq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vcgeuv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcgeq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgeuv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vcle_s8 (int8x8_t __a, int8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vcgev8qi (__b, __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vcle_s16 (int16x4_t __a, int16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vcgev4hi (__b, __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcle_s32 (int32x2_t __a, int32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgev2si (__b, __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcle_f32 (float32x2_t __a, float32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgev2sf (__b, __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vcle_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vcgeuv8qi ((int8x8_t) __b, (int8x8_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vcle_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vcgeuv4hi ((int16x4_t) __b, (int16x4_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcle_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgeuv2si ((int32x2_t) __b, (int32x2_t) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vcleq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vcgev16qi (__b, __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vcleq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vcgev8hi (__b, __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcleq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgev4si (__b, __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcleq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgev4sf (__b, __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vcleq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vcgeuv16qi ((int8x16_t) __b, (int8x16_t) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vcleq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vcgeuv8hi ((int16x8_t) __b, (int16x8_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcleq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgeuv4si ((int32x4_t) __b, (int32x4_t) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vcgt_s8 (int8x8_t __a, int8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vcgtv8qi (__a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vcgt_s16 (int16x4_t __a, int16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vcgtv4hi (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcgt_s32 (int32x2_t __a, int32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgtv2si (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcgt_f32 (float32x2_t __a, float32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgtv2sf (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vcgt_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vcgtuv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vcgt_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vcgtuv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcgt_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgtuv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vcgtq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vcgtv16qi (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vcgtq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vcgtv8hi (__a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcgtq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgtv4si (__a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcgtq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgtv4sf (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vcgtq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vcgtuv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vcgtq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vcgtuv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcgtq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgtuv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vclt_s8 (int8x8_t __a, int8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vcgtv8qi (__b, __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vclt_s16 (int16x4_t __a, int16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vcgtv4hi (__b, __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vclt_s32 (int32x2_t __a, int32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgtv2si (__b, __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vclt_f32 (float32x2_t __a, float32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgtv2sf (__b, __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vclt_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vcgtuv8qi ((int8x8_t) __b, (int8x8_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vclt_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vcgtuv4hi ((int16x4_t) __b, (int16x4_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vclt_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcgtuv2si ((int32x2_t) __b, (int32x2_t) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vcltq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vcgtv16qi (__b, __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vcltq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vcgtv8hi (__b, __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcltq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgtv4si (__b, __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcltq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgtv4sf (__b, __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vcltq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vcgtuv16qi ((int8x16_t) __b, (int8x16_t) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vcltq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vcgtuv8hi ((int16x8_t) __b, (int16x8_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcltq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcgtuv4si ((int32x4_t) __b, (int32x4_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcage_f32 (float32x2_t __a, float32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcagev2sf (__a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcageq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcagev4sf (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcale_f32 (float32x2_t __a, float32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcagev2sf (__b, __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcaleq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcagev4sf (__b, __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcagt_f32 (float32x2_t __a, float32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcagtv2sf (__a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcagtq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcagtv4sf (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcalt_f32 (float32x2_t __a, float32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vcagtv2sf (__b, __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcaltq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vcagtv4sf (__b, __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtst_s8 (int8x8_t __a, int8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vtstv8qi (__a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vtst_s16 (int16x4_t __a, int16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vtstv4hi (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vtst_s32 (int32x2_t __a, int32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vtstv2si (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtst_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vtstv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vtst_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vtstv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vtst_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vtstv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtst_p8 (poly8x8_t __a, poly8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vtstv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vtstq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vtstv16qi (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vtstq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vtstv8hi (__a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vtstq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vtstv4si (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vtstq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vtstv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vtstq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vtstv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vtstq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vtstv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vtstq_p8 (poly8x16_t __a, poly8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vtstv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vabd_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vabdsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vabd_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vabdsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vabd_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vabdsv2si (__a, __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vabd_f32 (float32x2_t __a, float32x2_t __b) -{ - return (float32x2_t)__builtin_neon_vabdfv2sf (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vabd_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vabduv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vabd_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vabduv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vabd_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vabduv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vabdq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vabdsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vabdq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vabdsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vabdq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vabdsv4si (__a, __b); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vabdq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (float32x4_t)__builtin_neon_vabdfv4sf (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vabdq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vabduv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vabdq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vabduv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vabdq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vabduv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vabdl_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int16x8_t)__builtin_neon_vabdlsv8qi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vabdl_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int32x4_t)__builtin_neon_vabdlsv4hi (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vabdl_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int64x2_t)__builtin_neon_vabdlsv2si (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vabdl_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vabdluv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vabdl_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vabdluv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vabdl_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vabdluv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vaba_s8 (int8x8_t __a, int8x8_t __b, int8x8_t __c) -{ - return (int8x8_t)__builtin_neon_vabasv8qi (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vaba_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c) -{ - return (int16x4_t)__builtin_neon_vabasv4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vaba_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c) -{ - return (int32x2_t)__builtin_neon_vabasv2si (__a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vaba_u8 (uint8x8_t __a, uint8x8_t __b, uint8x8_t __c) -{ - return (uint8x8_t)__builtin_neon_vabauv8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vaba_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c) -{ - return (uint16x4_t)__builtin_neon_vabauv4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vaba_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c) -{ - return (uint32x2_t)__builtin_neon_vabauv2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vabaq_s8 (int8x16_t __a, int8x16_t __b, int8x16_t __c) -{ - return (int8x16_t)__builtin_neon_vabasv16qi (__a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vabaq_s16 (int16x8_t __a, int16x8_t __b, int16x8_t __c) -{ - return (int16x8_t)__builtin_neon_vabasv8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vabaq_s32 (int32x4_t __a, int32x4_t __b, int32x4_t __c) -{ - return (int32x4_t)__builtin_neon_vabasv4si (__a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vabaq_u8 (uint8x16_t __a, uint8x16_t __b, uint8x16_t __c) -{ - return (uint8x16_t)__builtin_neon_vabauv16qi ((int8x16_t) __a, (int8x16_t) __b, (int8x16_t) __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vabaq_u16 (uint16x8_t __a, uint16x8_t __b, uint16x8_t __c) -{ - return (uint16x8_t)__builtin_neon_vabauv8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x8_t) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vabaq_u32 (uint32x4_t __a, uint32x4_t __b, uint32x4_t __c) -{ - return (uint32x4_t)__builtin_neon_vabauv4si ((int32x4_t) __a, (int32x4_t) __b, (int32x4_t) __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vabal_s8 (int16x8_t __a, int8x8_t __b, int8x8_t __c) -{ - return (int16x8_t)__builtin_neon_vabalsv8qi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vabal_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c) -{ - return (int32x4_t)__builtin_neon_vabalsv4hi (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vabal_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c) -{ - return (int64x2_t)__builtin_neon_vabalsv2si (__a, __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vabal_u8 (uint16x8_t __a, uint8x8_t __b, uint8x8_t __c) -{ - return (uint16x8_t)__builtin_neon_vabaluv8qi ((int16x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vabal_u16 (uint32x4_t __a, uint16x4_t __b, uint16x4_t __c) -{ - return (uint32x4_t)__builtin_neon_vabaluv4hi ((int32x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vabal_u32 (uint64x2_t __a, uint32x2_t __b, uint32x2_t __c) -{ - return (uint64x2_t)__builtin_neon_vabaluv2si ((int64x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vmax_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vmaxsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmax_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vmaxsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmax_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vmaxsv2si (__a, __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmax_f32 (float32x2_t __a, float32x2_t __b) -{ - return (float32x2_t)__builtin_neon_vmaxfv2sf (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vmax_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vmaxuv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmax_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vmaxuv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmax_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vmaxuv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vmaxq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vmaxsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmaxq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vmaxsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmaxq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vmaxsv4si (__a, __b); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmaxq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (float32x4_t)__builtin_neon_vmaxfv4sf (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vmaxq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vmaxuv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmaxq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vmaxuv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmaxq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vmaxuv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vmin_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vminsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmin_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vminsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmin_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vminsv2si (__a, __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmin_f32 (float32x2_t __a, float32x2_t __b) -{ - return (float32x2_t)__builtin_neon_vminfv2sf (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vmin_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vminuv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmin_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vminuv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmin_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vminuv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vminq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vminsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vminq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vminsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vminq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vminsv4si (__a, __b); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vminq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (float32x4_t)__builtin_neon_vminfv4sf (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vminq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vminuv16qi ((int8x16_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vminq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vminuv8hi ((int16x8_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vminq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vminuv4si ((int32x4_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vpadd_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vpaddv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vpadd_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vpaddv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vpadd_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vpaddv2si (__a, __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vpadd_f32 (float32x2_t __a, float32x2_t __b) -{ - return (float32x2_t)__builtin_neon_vpaddv2sf (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vpadd_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vpaddv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vpadd_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vpaddv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vpadd_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vpaddv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vpaddl_s8 (int8x8_t __a) -{ - return (int16x4_t)__builtin_neon_vpaddlsv8qi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vpaddl_s16 (int16x4_t __a) -{ - return (int32x2_t)__builtin_neon_vpaddlsv4hi (__a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vpaddl_s32 (int32x2_t __a) -{ - return (int64x1_t)__builtin_neon_vpaddlsv2si (__a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vpaddl_u8 (uint8x8_t __a) -{ - return (uint16x4_t)__builtin_neon_vpaddluv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vpaddl_u16 (uint16x4_t __a) -{ - return (uint32x2_t)__builtin_neon_vpaddluv4hi ((int16x4_t) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vpaddl_u32 (uint32x2_t __a) -{ - return (uint64x1_t)__builtin_neon_vpaddluv2si ((int32x2_t) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vpaddlq_s8 (int8x16_t __a) -{ - return (int16x8_t)__builtin_neon_vpaddlsv16qi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vpaddlq_s16 (int16x8_t __a) -{ - return (int32x4_t)__builtin_neon_vpaddlsv8hi (__a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vpaddlq_s32 (int32x4_t __a) -{ - return (int64x2_t)__builtin_neon_vpaddlsv4si (__a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vpaddlq_u8 (uint8x16_t __a) -{ - return (uint16x8_t)__builtin_neon_vpaddluv16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vpaddlq_u16 (uint16x8_t __a) -{ - return (uint32x4_t)__builtin_neon_vpaddluv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vpaddlq_u32 (uint32x4_t __a) -{ - return (uint64x2_t)__builtin_neon_vpaddluv4si ((int32x4_t) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vpadal_s8 (int16x4_t __a, int8x8_t __b) -{ - return (int16x4_t)__builtin_neon_vpadalsv8qi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vpadal_s16 (int32x2_t __a, int16x4_t __b) -{ - return (int32x2_t)__builtin_neon_vpadalsv4hi (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vpadal_s32 (int64x1_t __a, int32x2_t __b) -{ - return (int64x1_t)__builtin_neon_vpadalsv2si (__a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vpadal_u8 (uint16x4_t __a, uint8x8_t __b) -{ - return (uint16x4_t)__builtin_neon_vpadaluv8qi ((int16x4_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vpadal_u16 (uint32x2_t __a, uint16x4_t __b) -{ - return (uint32x2_t)__builtin_neon_vpadaluv4hi ((int32x2_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vpadal_u32 (uint64x1_t __a, uint32x2_t __b) -{ - return (uint64x1_t)__builtin_neon_vpadaluv2si ((int64x1_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vpadalq_s8 (int16x8_t __a, int8x16_t __b) -{ - return (int16x8_t)__builtin_neon_vpadalsv16qi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vpadalq_s16 (int32x4_t __a, int16x8_t __b) -{ - return (int32x4_t)__builtin_neon_vpadalsv8hi (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vpadalq_s32 (int64x2_t __a, int32x4_t __b) -{ - return (int64x2_t)__builtin_neon_vpadalsv4si (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vpadalq_u8 (uint16x8_t __a, uint8x16_t __b) -{ - return (uint16x8_t)__builtin_neon_vpadaluv16qi ((int16x8_t) __a, (int8x16_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vpadalq_u16 (uint32x4_t __a, uint16x8_t __b) -{ - return (uint32x4_t)__builtin_neon_vpadaluv8hi ((int32x4_t) __a, (int16x8_t) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vpadalq_u32 (uint64x2_t __a, uint32x4_t __b) -{ - return (uint64x2_t)__builtin_neon_vpadaluv4si ((int64x2_t) __a, (int32x4_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vpmax_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vpmaxsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vpmax_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vpmaxsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vpmax_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vpmaxsv2si (__a, __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vpmax_f32 (float32x2_t __a, float32x2_t __b) -{ - return (float32x2_t)__builtin_neon_vpmaxfv2sf (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vpmax_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vpmaxuv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vpmax_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vpmaxuv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vpmax_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vpmaxuv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vpmin_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vpminsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vpmin_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vpminsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vpmin_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vpminsv2si (__a, __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vpmin_f32 (float32x2_t __a, float32x2_t __b) -{ - return (float32x2_t)__builtin_neon_vpminfv2sf (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vpmin_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vpminuv8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vpmin_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vpminuv4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vpmin_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vpminuv2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrecps_f32 (float32x2_t __a, float32x2_t __b) -{ - return (float32x2_t)__builtin_neon_vrecpsv2sf (__a, __b); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrecpsq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (float32x4_t)__builtin_neon_vrecpsv4sf (__a, __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrsqrts_f32 (float32x2_t __a, float32x2_t __b) -{ - return (float32x2_t)__builtin_neon_vrsqrtsv2sf (__a, __b); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrsqrtsq_f32 (float32x4_t __a, float32x4_t __b) -{ - return (float32x4_t)__builtin_neon_vrsqrtsv4sf (__a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vshl_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vshlsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vshl_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vshlsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vshl_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vshlsv2si (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vshl_s64 (int64x1_t __a, int64x1_t __b) -{ - return (int64x1_t)__builtin_neon_vshlsdi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vshl_u8 (uint8x8_t __a, int8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vshluv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vshl_u16 (uint16x4_t __a, int16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vshluv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vshl_u32 (uint32x2_t __a, int32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vshluv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vshl_u64 (uint64x1_t __a, int64x1_t __b) -{ - return (uint64x1_t)__builtin_neon_vshludi ((int64x1_t) __a, __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vshlq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vshlsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vshlq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vshlsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vshlq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vshlsv4si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vshlq_s64 (int64x2_t __a, int64x2_t __b) -{ - return (int64x2_t)__builtin_neon_vshlsv2di (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vshlq_u8 (uint8x16_t __a, int8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vshluv16qi ((int8x16_t) __a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vshlq_u16 (uint16x8_t __a, int16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vshluv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vshlq_u32 (uint32x4_t __a, int32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vshluv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vshlq_u64 (uint64x2_t __a, int64x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vshluv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vrshl_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vrshlsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vrshl_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vrshlsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vrshl_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vrshlsv2si (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vrshl_s64 (int64x1_t __a, int64x1_t __b) -{ - return (int64x1_t)__builtin_neon_vrshlsdi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vrshl_u8 (uint8x8_t __a, int8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vrshluv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vrshl_u16 (uint16x4_t __a, int16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vrshluv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vrshl_u32 (uint32x2_t __a, int32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vrshluv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vrshl_u64 (uint64x1_t __a, int64x1_t __b) -{ - return (uint64x1_t)__builtin_neon_vrshludi ((int64x1_t) __a, __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vrshlq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vrshlsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vrshlq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vrshlsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vrshlq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vrshlsv4si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vrshlq_s64 (int64x2_t __a, int64x2_t __b) -{ - return (int64x2_t)__builtin_neon_vrshlsv2di (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vrshlq_u8 (uint8x16_t __a, int8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vrshluv16qi ((int8x16_t) __a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vrshlq_u16 (uint16x8_t __a, int16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vrshluv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vrshlq_u32 (uint32x4_t __a, int32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vrshluv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vrshlq_u64 (uint64x2_t __a, int64x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vrshluv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vqshl_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vqshlsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqshl_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vqshlsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqshl_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vqshlsv2si (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vqshl_s64 (int64x1_t __a, int64x1_t __b) -{ - return (int64x1_t)__builtin_neon_vqshlsdi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqshl_u8 (uint8x8_t __a, int8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vqshluv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqshl_u16 (uint16x4_t __a, int16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vqshluv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqshl_u32 (uint32x2_t __a, int32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vqshluv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vqshl_u64 (uint64x1_t __a, int64x1_t __b) -{ - return (uint64x1_t)__builtin_neon_vqshludi ((int64x1_t) __a, __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vqshlq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vqshlsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqshlq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vqshlsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqshlq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vqshlsv4si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqshlq_s64 (int64x2_t __a, int64x2_t __b) -{ - return (int64x2_t)__builtin_neon_vqshlsv2di (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vqshlq_u8 (uint8x16_t __a, int8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vqshluv16qi ((int8x16_t) __a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vqshlq_u16 (uint16x8_t __a, int16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vqshluv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vqshlq_u32 (uint32x4_t __a, int32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vqshluv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vqshlq_u64 (uint64x2_t __a, int64x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vqshluv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vqrshl_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vqrshlsv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqrshl_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x4_t)__builtin_neon_vqrshlsv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqrshl_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x2_t)__builtin_neon_vqrshlsv2si (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vqrshl_s64 (int64x1_t __a, int64x1_t __b) -{ - return (int64x1_t)__builtin_neon_vqrshlsdi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqrshl_u8 (uint8x8_t __a, int8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vqrshluv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqrshl_u16 (uint16x4_t __a, int16x4_t __b) -{ - return (uint16x4_t)__builtin_neon_vqrshluv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqrshl_u32 (uint32x2_t __a, int32x2_t __b) -{ - return (uint32x2_t)__builtin_neon_vqrshluv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vqrshl_u64 (uint64x1_t __a, int64x1_t __b) -{ - return (uint64x1_t)__builtin_neon_vqrshludi ((int64x1_t) __a, __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vqrshlq_s8 (int8x16_t __a, int8x16_t __b) -{ - return (int8x16_t)__builtin_neon_vqrshlsv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqrshlq_s16 (int16x8_t __a, int16x8_t __b) -{ - return (int16x8_t)__builtin_neon_vqrshlsv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqrshlq_s32 (int32x4_t __a, int32x4_t __b) -{ - return (int32x4_t)__builtin_neon_vqrshlsv4si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqrshlq_s64 (int64x2_t __a, int64x2_t __b) -{ - return (int64x2_t)__builtin_neon_vqrshlsv2di (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vqrshlq_u8 (uint8x16_t __a, int8x16_t __b) -{ - return (uint8x16_t)__builtin_neon_vqrshluv16qi ((int8x16_t) __a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vqrshlq_u16 (uint16x8_t __a, int16x8_t __b) -{ - return (uint16x8_t)__builtin_neon_vqrshluv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vqrshlq_u32 (uint32x4_t __a, int32x4_t __b) -{ - return (uint32x4_t)__builtin_neon_vqrshluv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vqrshlq_u64 (uint64x2_t __a, int64x2_t __b) -{ - return (uint64x2_t)__builtin_neon_vqrshluv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vshr_n_s8 (int8x8_t __a, const int __b) -{ - return (int8x8_t)__builtin_neon_vshrs_nv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vshr_n_s16 (int16x4_t __a, const int __b) -{ - return (int16x4_t)__builtin_neon_vshrs_nv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vshr_n_s32 (int32x2_t __a, const int __b) -{ - return (int32x2_t)__builtin_neon_vshrs_nv2si (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vshr_n_s64 (int64x1_t __a, const int __b) -{ - return (int64x1_t)__builtin_neon_vshrs_ndi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vshr_n_u8 (uint8x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vshru_nv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vshr_n_u16 (uint16x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vshru_nv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vshr_n_u32 (uint32x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vshru_nv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vshr_n_u64 (uint64x1_t __a, const int __b) -{ - return (uint64x1_t)__builtin_neon_vshru_ndi ((int64x1_t) __a, __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vshrq_n_s8 (int8x16_t __a, const int __b) -{ - return (int8x16_t)__builtin_neon_vshrs_nv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vshrq_n_s16 (int16x8_t __a, const int __b) -{ - return (int16x8_t)__builtin_neon_vshrs_nv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vshrq_n_s32 (int32x4_t __a, const int __b) -{ - return (int32x4_t)__builtin_neon_vshrs_nv4si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vshrq_n_s64 (int64x2_t __a, const int __b) -{ - return (int64x2_t)__builtin_neon_vshrs_nv2di (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vshrq_n_u8 (uint8x16_t __a, const int __b) -{ - return (uint8x16_t)__builtin_neon_vshru_nv16qi ((int8x16_t) __a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vshrq_n_u16 (uint16x8_t __a, const int __b) -{ - return (uint16x8_t)__builtin_neon_vshru_nv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vshrq_n_u32 (uint32x4_t __a, const int __b) -{ - return (uint32x4_t)__builtin_neon_vshru_nv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vshrq_n_u64 (uint64x2_t __a, const int __b) -{ - return (uint64x2_t)__builtin_neon_vshru_nv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vrshr_n_s8 (int8x8_t __a, const int __b) -{ - return (int8x8_t)__builtin_neon_vrshrs_nv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vrshr_n_s16 (int16x4_t __a, const int __b) -{ - return (int16x4_t)__builtin_neon_vrshrs_nv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vrshr_n_s32 (int32x2_t __a, const int __b) -{ - return (int32x2_t)__builtin_neon_vrshrs_nv2si (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vrshr_n_s64 (int64x1_t __a, const int __b) -{ - return (int64x1_t)__builtin_neon_vrshrs_ndi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vrshr_n_u8 (uint8x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vrshru_nv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vrshr_n_u16 (uint16x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vrshru_nv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vrshr_n_u32 (uint32x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vrshru_nv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vrshr_n_u64 (uint64x1_t __a, const int __b) -{ - return (uint64x1_t)__builtin_neon_vrshru_ndi ((int64x1_t) __a, __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vrshrq_n_s8 (int8x16_t __a, const int __b) -{ - return (int8x16_t)__builtin_neon_vrshrs_nv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vrshrq_n_s16 (int16x8_t __a, const int __b) -{ - return (int16x8_t)__builtin_neon_vrshrs_nv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vrshrq_n_s32 (int32x4_t __a, const int __b) -{ - return (int32x4_t)__builtin_neon_vrshrs_nv4si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vrshrq_n_s64 (int64x2_t __a, const int __b) -{ - return (int64x2_t)__builtin_neon_vrshrs_nv2di (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vrshrq_n_u8 (uint8x16_t __a, const int __b) -{ - return (uint8x16_t)__builtin_neon_vrshru_nv16qi ((int8x16_t) __a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vrshrq_n_u16 (uint16x8_t __a, const int __b) -{ - return (uint16x8_t)__builtin_neon_vrshru_nv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vrshrq_n_u32 (uint32x4_t __a, const int __b) -{ - return (uint32x4_t)__builtin_neon_vrshru_nv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vrshrq_n_u64 (uint64x2_t __a, const int __b) -{ - return (uint64x2_t)__builtin_neon_vrshru_nv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vshrn_n_s16 (int16x8_t __a, const int __b) -{ - return (int8x8_t)__builtin_neon_vshrn_nv8hi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vshrn_n_s32 (int32x4_t __a, const int __b) -{ - return (int16x4_t)__builtin_neon_vshrn_nv4si (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vshrn_n_s64 (int64x2_t __a, const int __b) -{ - return (int32x2_t)__builtin_neon_vshrn_nv2di (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vshrn_n_u16 (uint16x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vshrn_nv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vshrn_n_u32 (uint32x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vshrn_nv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vshrn_n_u64 (uint64x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vshrn_nv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vrshrn_n_s16 (int16x8_t __a, const int __b) -{ - return (int8x8_t)__builtin_neon_vrshrn_nv8hi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vrshrn_n_s32 (int32x4_t __a, const int __b) -{ - return (int16x4_t)__builtin_neon_vrshrn_nv4si (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vrshrn_n_s64 (int64x2_t __a, const int __b) -{ - return (int32x2_t)__builtin_neon_vrshrn_nv2di (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vrshrn_n_u16 (uint16x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vrshrn_nv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vrshrn_n_u32 (uint32x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vrshrn_nv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vrshrn_n_u64 (uint64x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vrshrn_nv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vqshrn_n_s16 (int16x8_t __a, const int __b) -{ - return (int8x8_t)__builtin_neon_vqshrns_nv8hi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqshrn_n_s32 (int32x4_t __a, const int __b) -{ - return (int16x4_t)__builtin_neon_vqshrns_nv4si (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqshrn_n_s64 (int64x2_t __a, const int __b) -{ - return (int32x2_t)__builtin_neon_vqshrns_nv2di (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqshrn_n_u16 (uint16x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vqshrnu_nv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqshrn_n_u32 (uint32x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vqshrnu_nv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqshrn_n_u64 (uint64x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vqshrnu_nv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vqrshrn_n_s16 (int16x8_t __a, const int __b) -{ - return (int8x8_t)__builtin_neon_vqrshrns_nv8hi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqrshrn_n_s32 (int32x4_t __a, const int __b) -{ - return (int16x4_t)__builtin_neon_vqrshrns_nv4si (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqrshrn_n_s64 (int64x2_t __a, const int __b) -{ - return (int32x2_t)__builtin_neon_vqrshrns_nv2di (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqrshrn_n_u16 (uint16x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vqrshrnu_nv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqrshrn_n_u32 (uint32x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vqrshrnu_nv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqrshrn_n_u64 (uint64x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vqrshrnu_nv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqshrun_n_s16 (int16x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vqshrun_nv8hi (__a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqshrun_n_s32 (int32x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vqshrun_nv4si (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqshrun_n_s64 (int64x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vqshrun_nv2di (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqrshrun_n_s16 (int16x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vqrshrun_nv8hi (__a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqrshrun_n_s32 (int32x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vqrshrun_nv4si (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqrshrun_n_s64 (int64x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vqrshrun_nv2di (__a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vshl_n_s8 (int8x8_t __a, const int __b) -{ - return (int8x8_t)__builtin_neon_vshl_nv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vshl_n_s16 (int16x4_t __a, const int __b) -{ - return (int16x4_t)__builtin_neon_vshl_nv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vshl_n_s32 (int32x2_t __a, const int __b) -{ - return (int32x2_t)__builtin_neon_vshl_nv2si (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vshl_n_s64 (int64x1_t __a, const int __b) -{ - return (int64x1_t)__builtin_neon_vshl_ndi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vshl_n_u8 (uint8x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vshl_nv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vshl_n_u16 (uint16x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vshl_nv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vshl_n_u32 (uint32x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vshl_nv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vshl_n_u64 (uint64x1_t __a, const int __b) -{ - return (uint64x1_t)__builtin_neon_vshl_ndi ((int64x1_t) __a, __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vshlq_n_s8 (int8x16_t __a, const int __b) -{ - return (int8x16_t)__builtin_neon_vshl_nv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vshlq_n_s16 (int16x8_t __a, const int __b) -{ - return (int16x8_t)__builtin_neon_vshl_nv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vshlq_n_s32 (int32x4_t __a, const int __b) -{ - return (int32x4_t)__builtin_neon_vshl_nv4si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vshlq_n_s64 (int64x2_t __a, const int __b) -{ - return (int64x2_t)__builtin_neon_vshl_nv2di (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vshlq_n_u8 (uint8x16_t __a, const int __b) -{ - return (uint8x16_t)__builtin_neon_vshl_nv16qi ((int8x16_t) __a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vshlq_n_u16 (uint16x8_t __a, const int __b) -{ - return (uint16x8_t)__builtin_neon_vshl_nv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vshlq_n_u32 (uint32x4_t __a, const int __b) -{ - return (uint32x4_t)__builtin_neon_vshl_nv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vshlq_n_u64 (uint64x2_t __a, const int __b) -{ - return (uint64x2_t)__builtin_neon_vshl_nv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vqshl_n_s8 (int8x8_t __a, const int __b) -{ - return (int8x8_t)__builtin_neon_vqshl_s_nv8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqshl_n_s16 (int16x4_t __a, const int __b) -{ - return (int16x4_t)__builtin_neon_vqshl_s_nv4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqshl_n_s32 (int32x2_t __a, const int __b) -{ - return (int32x2_t)__builtin_neon_vqshl_s_nv2si (__a, __b); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vqshl_n_s64 (int64x1_t __a, const int __b) -{ - return (int64x1_t)__builtin_neon_vqshl_s_ndi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqshl_n_u8 (uint8x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vqshl_u_nv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqshl_n_u16 (uint16x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vqshl_u_nv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqshl_n_u32 (uint32x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vqshl_u_nv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vqshl_n_u64 (uint64x1_t __a, const int __b) -{ - return (uint64x1_t)__builtin_neon_vqshl_u_ndi ((int64x1_t) __a, __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vqshlq_n_s8 (int8x16_t __a, const int __b) -{ - return (int8x16_t)__builtin_neon_vqshl_s_nv16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqshlq_n_s16 (int16x8_t __a, const int __b) -{ - return (int16x8_t)__builtin_neon_vqshl_s_nv8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqshlq_n_s32 (int32x4_t __a, const int __b) -{ - return (int32x4_t)__builtin_neon_vqshl_s_nv4si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqshlq_n_s64 (int64x2_t __a, const int __b) -{ - return (int64x2_t)__builtin_neon_vqshl_s_nv2di (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vqshlq_n_u8 (uint8x16_t __a, const int __b) -{ - return (uint8x16_t)__builtin_neon_vqshl_u_nv16qi ((int8x16_t) __a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vqshlq_n_u16 (uint16x8_t __a, const int __b) -{ - return (uint16x8_t)__builtin_neon_vqshl_u_nv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vqshlq_n_u32 (uint32x4_t __a, const int __b) -{ - return (uint32x4_t)__builtin_neon_vqshl_u_nv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vqshlq_n_u64 (uint64x2_t __a, const int __b) -{ - return (uint64x2_t)__builtin_neon_vqshl_u_nv2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqshlu_n_s8 (int8x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vqshlu_nv8qi (__a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqshlu_n_s16 (int16x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vqshlu_nv4hi (__a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqshlu_n_s32 (int32x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vqshlu_nv2si (__a, __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vqshlu_n_s64 (int64x1_t __a, const int __b) -{ - return (uint64x1_t)__builtin_neon_vqshlu_ndi (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vqshluq_n_s8 (int8x16_t __a, const int __b) -{ - return (uint8x16_t)__builtin_neon_vqshlu_nv16qi (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vqshluq_n_s16 (int16x8_t __a, const int __b) -{ - return (uint16x8_t)__builtin_neon_vqshlu_nv8hi (__a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vqshluq_n_s32 (int32x4_t __a, const int __b) -{ - return (uint32x4_t)__builtin_neon_vqshlu_nv4si (__a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vqshluq_n_s64 (int64x2_t __a, const int __b) -{ - return (uint64x2_t)__builtin_neon_vqshlu_nv2di (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vshll_n_s8 (int8x8_t __a, const int __b) -{ - return (int16x8_t)__builtin_neon_vshlls_nv8qi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vshll_n_s16 (int16x4_t __a, const int __b) -{ - return (int32x4_t)__builtin_neon_vshlls_nv4hi (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vshll_n_s32 (int32x2_t __a, const int __b) -{ - return (int64x2_t)__builtin_neon_vshlls_nv2si (__a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vshll_n_u8 (uint8x8_t __a, const int __b) -{ - return (uint16x8_t)__builtin_neon_vshllu_nv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vshll_n_u16 (uint16x4_t __a, const int __b) -{ - return (uint32x4_t)__builtin_neon_vshllu_nv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vshll_n_u32 (uint32x2_t __a, const int __b) -{ - return (uint64x2_t)__builtin_neon_vshllu_nv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vsra_n_s8 (int8x8_t __a, int8x8_t __b, const int __c) -{ - return (int8x8_t)__builtin_neon_vsras_nv8qi (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vsra_n_s16 (int16x4_t __a, int16x4_t __b, const int __c) -{ - return (int16x4_t)__builtin_neon_vsras_nv4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vsra_n_s32 (int32x2_t __a, int32x2_t __b, const int __c) -{ - return (int32x2_t)__builtin_neon_vsras_nv2si (__a, __b, __c); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vsra_n_s64 (int64x1_t __a, int64x1_t __b, const int __c) -{ - return (int64x1_t)__builtin_neon_vsras_ndi (__a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vsra_n_u8 (uint8x8_t __a, uint8x8_t __b, const int __c) -{ - return (uint8x8_t)__builtin_neon_vsrau_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vsra_n_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) -{ - return (uint16x4_t)__builtin_neon_vsrau_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vsra_n_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) -{ - return (uint32x2_t)__builtin_neon_vsrau_nv2si ((int32x2_t) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vsra_n_u64 (uint64x1_t __a, uint64x1_t __b, const int __c) -{ - return (uint64x1_t)__builtin_neon_vsrau_ndi ((int64x1_t) __a, (int64x1_t) __b, __c); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vsraq_n_s8 (int8x16_t __a, int8x16_t __b, const int __c) -{ - return (int8x16_t)__builtin_neon_vsras_nv16qi (__a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vsraq_n_s16 (int16x8_t __a, int16x8_t __b, const int __c) -{ - return (int16x8_t)__builtin_neon_vsras_nv8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vsraq_n_s32 (int32x4_t __a, int32x4_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vsras_nv4si (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vsraq_n_s64 (int64x2_t __a, int64x2_t __b, const int __c) -{ - return (int64x2_t)__builtin_neon_vsras_nv2di (__a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vsraq_n_u8 (uint8x16_t __a, uint8x16_t __b, const int __c) -{ - return (uint8x16_t)__builtin_neon_vsrau_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vsraq_n_u16 (uint16x8_t __a, uint16x8_t __b, const int __c) -{ - return (uint16x8_t)__builtin_neon_vsrau_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsraq_n_u32 (uint32x4_t __a, uint32x4_t __b, const int __c) -{ - return (uint32x4_t)__builtin_neon_vsrau_nv4si ((int32x4_t) __a, (int32x4_t) __b, __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vsraq_n_u64 (uint64x2_t __a, uint64x2_t __b, const int __c) -{ - return (uint64x2_t)__builtin_neon_vsrau_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vrsra_n_s8 (int8x8_t __a, int8x8_t __b, const int __c) -{ - return (int8x8_t)__builtin_neon_vrsras_nv8qi (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vrsra_n_s16 (int16x4_t __a, int16x4_t __b, const int __c) -{ - return (int16x4_t)__builtin_neon_vrsras_nv4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vrsra_n_s32 (int32x2_t __a, int32x2_t __b, const int __c) -{ - return (int32x2_t)__builtin_neon_vrsras_nv2si (__a, __b, __c); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vrsra_n_s64 (int64x1_t __a, int64x1_t __b, const int __c) -{ - return (int64x1_t)__builtin_neon_vrsras_ndi (__a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vrsra_n_u8 (uint8x8_t __a, uint8x8_t __b, const int __c) -{ - return (uint8x8_t)__builtin_neon_vrsrau_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vrsra_n_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) -{ - return (uint16x4_t)__builtin_neon_vrsrau_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vrsra_n_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) -{ - return (uint32x2_t)__builtin_neon_vrsrau_nv2si ((int32x2_t) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vrsra_n_u64 (uint64x1_t __a, uint64x1_t __b, const int __c) -{ - return (uint64x1_t)__builtin_neon_vrsrau_ndi ((int64x1_t) __a, (int64x1_t) __b, __c); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vrsraq_n_s8 (int8x16_t __a, int8x16_t __b, const int __c) -{ - return (int8x16_t)__builtin_neon_vrsras_nv16qi (__a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vrsraq_n_s16 (int16x8_t __a, int16x8_t __b, const int __c) -{ - return (int16x8_t)__builtin_neon_vrsras_nv8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vrsraq_n_s32 (int32x4_t __a, int32x4_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vrsras_nv4si (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vrsraq_n_s64 (int64x2_t __a, int64x2_t __b, const int __c) -{ - return (int64x2_t)__builtin_neon_vrsras_nv2di (__a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vrsraq_n_u8 (uint8x16_t __a, uint8x16_t __b, const int __c) -{ - return (uint8x16_t)__builtin_neon_vrsrau_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vrsraq_n_u16 (uint16x8_t __a, uint16x8_t __b, const int __c) -{ - return (uint16x8_t)__builtin_neon_vrsrau_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vrsraq_n_u32 (uint32x4_t __a, uint32x4_t __b, const int __c) -{ - return (uint32x4_t)__builtin_neon_vrsrau_nv4si ((int32x4_t) __a, (int32x4_t) __b, __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vrsraq_n_u64 (uint64x2_t __a, uint64x2_t __b, const int __c) -{ - return (uint64x2_t)__builtin_neon_vrsrau_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vsri_n_p64 (poly64x1_t __a, poly64x1_t __b, const int __c) -{ - return (poly64x1_t)__builtin_neon_vsri_ndi (__a, __b, __c); -} - -#endif -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vsri_n_s8 (int8x8_t __a, int8x8_t __b, const int __c) -{ - return (int8x8_t)__builtin_neon_vsri_nv8qi (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vsri_n_s16 (int16x4_t __a, int16x4_t __b, const int __c) -{ - return (int16x4_t)__builtin_neon_vsri_nv4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vsri_n_s32 (int32x2_t __a, int32x2_t __b, const int __c) -{ - return (int32x2_t)__builtin_neon_vsri_nv2si (__a, __b, __c); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vsri_n_s64 (int64x1_t __a, int64x1_t __b, const int __c) -{ - return (int64x1_t)__builtin_neon_vsri_ndi (__a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vsri_n_u8 (uint8x8_t __a, uint8x8_t __b, const int __c) -{ - return (uint8x8_t)__builtin_neon_vsri_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vsri_n_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) -{ - return (uint16x4_t)__builtin_neon_vsri_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vsri_n_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) -{ - return (uint32x2_t)__builtin_neon_vsri_nv2si ((int32x2_t) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vsri_n_u64 (uint64x1_t __a, uint64x1_t __b, const int __c) -{ - return (uint64x1_t)__builtin_neon_vsri_ndi ((int64x1_t) __a, (int64x1_t) __b, __c); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vsri_n_p8 (poly8x8_t __a, poly8x8_t __b, const int __c) -{ - return (poly8x8_t)__builtin_neon_vsri_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vsri_n_p16 (poly16x4_t __a, poly16x4_t __b, const int __c) -{ - return (poly16x4_t)__builtin_neon_vsri_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vsriq_n_p64 (poly64x2_t __a, poly64x2_t __b, const int __c) -{ - return (poly64x2_t)__builtin_neon_vsri_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); -} - -#endif -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vsriq_n_s8 (int8x16_t __a, int8x16_t __b, const int __c) -{ - return (int8x16_t)__builtin_neon_vsri_nv16qi (__a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vsriq_n_s16 (int16x8_t __a, int16x8_t __b, const int __c) -{ - return (int16x8_t)__builtin_neon_vsri_nv8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vsriq_n_s32 (int32x4_t __a, int32x4_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vsri_nv4si (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vsriq_n_s64 (int64x2_t __a, int64x2_t __b, const int __c) -{ - return (int64x2_t)__builtin_neon_vsri_nv2di (__a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vsriq_n_u8 (uint8x16_t __a, uint8x16_t __b, const int __c) -{ - return (uint8x16_t)__builtin_neon_vsri_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vsriq_n_u16 (uint16x8_t __a, uint16x8_t __b, const int __c) -{ - return (uint16x8_t)__builtin_neon_vsri_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsriq_n_u32 (uint32x4_t __a, uint32x4_t __b, const int __c) -{ - return (uint32x4_t)__builtin_neon_vsri_nv4si ((int32x4_t) __a, (int32x4_t) __b, __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vsriq_n_u64 (uint64x2_t __a, uint64x2_t __b, const int __c) -{ - return (uint64x2_t)__builtin_neon_vsri_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vsriq_n_p8 (poly8x16_t __a, poly8x16_t __b, const int __c) -{ - return (poly8x16_t)__builtin_neon_vsri_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vsriq_n_p16 (poly16x8_t __a, poly16x8_t __b, const int __c) -{ - return (poly16x8_t)__builtin_neon_vsri_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vsli_n_p64 (poly64x1_t __a, poly64x1_t __b, const int __c) -{ - return (poly64x1_t)__builtin_neon_vsli_ndi (__a, __b, __c); -} - -#endif -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vsli_n_s8 (int8x8_t __a, int8x8_t __b, const int __c) -{ - return (int8x8_t)__builtin_neon_vsli_nv8qi (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vsli_n_s16 (int16x4_t __a, int16x4_t __b, const int __c) -{ - return (int16x4_t)__builtin_neon_vsli_nv4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vsli_n_s32 (int32x2_t __a, int32x2_t __b, const int __c) -{ - return (int32x2_t)__builtin_neon_vsli_nv2si (__a, __b, __c); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vsli_n_s64 (int64x1_t __a, int64x1_t __b, const int __c) -{ - return (int64x1_t)__builtin_neon_vsli_ndi (__a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vsli_n_u8 (uint8x8_t __a, uint8x8_t __b, const int __c) -{ - return (uint8x8_t)__builtin_neon_vsli_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vsli_n_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) -{ - return (uint16x4_t)__builtin_neon_vsli_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vsli_n_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) -{ - return (uint32x2_t)__builtin_neon_vsli_nv2si ((int32x2_t) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vsli_n_u64 (uint64x1_t __a, uint64x1_t __b, const int __c) -{ - return (uint64x1_t)__builtin_neon_vsli_ndi ((int64x1_t) __a, (int64x1_t) __b, __c); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vsli_n_p8 (poly8x8_t __a, poly8x8_t __b, const int __c) -{ - return (poly8x8_t)__builtin_neon_vsli_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vsli_n_p16 (poly16x4_t __a, poly16x4_t __b, const int __c) -{ - return (poly16x4_t)__builtin_neon_vsli_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vsliq_n_p64 (poly64x2_t __a, poly64x2_t __b, const int __c) -{ - return (poly64x2_t)__builtin_neon_vsli_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); -} - -#endif -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vsliq_n_s8 (int8x16_t __a, int8x16_t __b, const int __c) -{ - return (int8x16_t)__builtin_neon_vsli_nv16qi (__a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vsliq_n_s16 (int16x8_t __a, int16x8_t __b, const int __c) -{ - return (int16x8_t)__builtin_neon_vsli_nv8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vsliq_n_s32 (int32x4_t __a, int32x4_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vsli_nv4si (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vsliq_n_s64 (int64x2_t __a, int64x2_t __b, const int __c) -{ - return (int64x2_t)__builtin_neon_vsli_nv2di (__a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vsliq_n_u8 (uint8x16_t __a, uint8x16_t __b, const int __c) -{ - return (uint8x16_t)__builtin_neon_vsli_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vsliq_n_u16 (uint16x8_t __a, uint16x8_t __b, const int __c) -{ - return (uint16x8_t)__builtin_neon_vsli_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsliq_n_u32 (uint32x4_t __a, uint32x4_t __b, const int __c) -{ - return (uint32x4_t)__builtin_neon_vsli_nv4si ((int32x4_t) __a, (int32x4_t) __b, __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vsliq_n_u64 (uint64x2_t __a, uint64x2_t __b, const int __c) -{ - return (uint64x2_t)__builtin_neon_vsli_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vsliq_n_p8 (poly8x16_t __a, poly8x16_t __b, const int __c) -{ - return (poly8x16_t)__builtin_neon_vsli_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vsliq_n_p16 (poly16x8_t __a, poly16x8_t __b, const int __c) -{ - return (poly16x8_t)__builtin_neon_vsli_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vabs_s8 (int8x8_t __a) -{ - return (int8x8_t)__builtin_neon_vabsv8qi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vabs_s16 (int16x4_t __a) -{ - return (int16x4_t)__builtin_neon_vabsv4hi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vabs_s32 (int32x2_t __a) -{ - return (int32x2_t)__builtin_neon_vabsv2si (__a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vabs_f32 (float32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vabsv2sf (__a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vabsq_s8 (int8x16_t __a) -{ - return (int8x16_t)__builtin_neon_vabsv16qi (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vabsq_s16 (int16x8_t __a) -{ - return (int16x8_t)__builtin_neon_vabsv8hi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vabsq_s32 (int32x4_t __a) -{ - return (int32x4_t)__builtin_neon_vabsv4si (__a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vabsq_f32 (float32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vabsv4sf (__a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vqabs_s8 (int8x8_t __a) -{ - return (int8x8_t)__builtin_neon_vqabsv8qi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqabs_s16 (int16x4_t __a) -{ - return (int16x4_t)__builtin_neon_vqabsv4hi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqabs_s32 (int32x2_t __a) -{ - return (int32x2_t)__builtin_neon_vqabsv2si (__a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vqabsq_s8 (int8x16_t __a) -{ - return (int8x16_t)__builtin_neon_vqabsv16qi (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqabsq_s16 (int16x8_t __a) -{ - return (int16x8_t)__builtin_neon_vqabsv8hi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqabsq_s32 (int32x4_t __a) -{ - return (int32x4_t)__builtin_neon_vqabsv4si (__a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vneg_s8 (int8x8_t __a) -{ - return (int8x8_t)__builtin_neon_vnegv8qi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vneg_s16 (int16x4_t __a) -{ - return (int16x4_t)__builtin_neon_vnegv4hi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vneg_s32 (int32x2_t __a) -{ - return (int32x2_t)__builtin_neon_vnegv2si (__a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vneg_f32 (float32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vnegv2sf (__a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vnegq_s8 (int8x16_t __a) -{ - return (int8x16_t)__builtin_neon_vnegv16qi (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vnegq_s16 (int16x8_t __a) -{ - return (int16x8_t)__builtin_neon_vnegv8hi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vnegq_s32 (int32x4_t __a) -{ - return (int32x4_t)__builtin_neon_vnegv4si (__a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vnegq_f32 (float32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vnegv4sf (__a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vqneg_s8 (int8x8_t __a) -{ - return (int8x8_t)__builtin_neon_vqnegv8qi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqneg_s16 (int16x4_t __a) -{ - return (int16x4_t)__builtin_neon_vqnegv4hi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqneg_s32 (int32x2_t __a) -{ - return (int32x2_t)__builtin_neon_vqnegv2si (__a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vqnegq_s8 (int8x16_t __a) -{ - return (int8x16_t)__builtin_neon_vqnegv16qi (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqnegq_s16 (int16x8_t __a) -{ - return (int16x8_t)__builtin_neon_vqnegv8hi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqnegq_s32 (int32x4_t __a) -{ - return (int32x4_t)__builtin_neon_vqnegv4si (__a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vmvn_s8 (int8x8_t __a) -{ - return (int8x8_t)__builtin_neon_vmvnv8qi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmvn_s16 (int16x4_t __a) -{ - return (int16x4_t)__builtin_neon_vmvnv4hi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmvn_s32 (int32x2_t __a) -{ - return (int32x2_t)__builtin_neon_vmvnv2si (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vmvn_u8 (uint8x8_t __a) -{ - return (uint8x8_t)__builtin_neon_vmvnv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmvn_u16 (uint16x4_t __a) -{ - return (uint16x4_t)__builtin_neon_vmvnv4hi ((int16x4_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmvn_u32 (uint32x2_t __a) -{ - return (uint32x2_t)__builtin_neon_vmvnv2si ((int32x2_t) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vmvn_p8 (poly8x8_t __a) -{ - return (poly8x8_t)__builtin_neon_vmvnv8qi ((int8x8_t) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vmvnq_s8 (int8x16_t __a) -{ - return (int8x16_t)__builtin_neon_vmvnv16qi (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmvnq_s16 (int16x8_t __a) -{ - return (int16x8_t)__builtin_neon_vmvnv8hi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmvnq_s32 (int32x4_t __a) -{ - return (int32x4_t)__builtin_neon_vmvnv4si (__a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vmvnq_u8 (uint8x16_t __a) -{ - return (uint8x16_t)__builtin_neon_vmvnv16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmvnq_u16 (uint16x8_t __a) -{ - return (uint16x8_t)__builtin_neon_vmvnv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmvnq_u32 (uint32x4_t __a) -{ - return (uint32x4_t)__builtin_neon_vmvnv4si ((int32x4_t) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vmvnq_p8 (poly8x16_t __a) -{ - return (poly8x16_t)__builtin_neon_vmvnv16qi ((int8x16_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vcls_s8 (int8x8_t __a) -{ - return (int8x8_t)__builtin_neon_vclsv8qi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vcls_s16 (int16x4_t __a) -{ - return (int16x4_t)__builtin_neon_vclsv4hi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vcls_s32 (int32x2_t __a) -{ - return (int32x2_t)__builtin_neon_vclsv2si (__a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vclsq_s8 (int8x16_t __a) -{ - return (int8x16_t)__builtin_neon_vclsv16qi (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vclsq_s16 (int16x8_t __a) -{ - return (int16x8_t)__builtin_neon_vclsv8hi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vclsq_s32 (int32x4_t __a) -{ - return (int32x4_t)__builtin_neon_vclsv4si (__a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vclz_s8 (int8x8_t __a) -{ - return (int8x8_t)__builtin_neon_vclzv8qi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vclz_s16 (int16x4_t __a) -{ - return (int16x4_t)__builtin_neon_vclzv4hi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vclz_s32 (int32x2_t __a) -{ - return (int32x2_t)__builtin_neon_vclzv2si (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vclz_u8 (uint8x8_t __a) -{ - return (uint8x8_t)__builtin_neon_vclzv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vclz_u16 (uint16x4_t __a) -{ - return (uint16x4_t)__builtin_neon_vclzv4hi ((int16x4_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vclz_u32 (uint32x2_t __a) -{ - return (uint32x2_t)__builtin_neon_vclzv2si ((int32x2_t) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vclzq_s8 (int8x16_t __a) -{ - return (int8x16_t)__builtin_neon_vclzv16qi (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vclzq_s16 (int16x8_t __a) -{ - return (int16x8_t)__builtin_neon_vclzv8hi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vclzq_s32 (int32x4_t __a) -{ - return (int32x4_t)__builtin_neon_vclzv4si (__a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vclzq_u8 (uint8x16_t __a) -{ - return (uint8x16_t)__builtin_neon_vclzv16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vclzq_u16 (uint16x8_t __a) -{ - return (uint16x8_t)__builtin_neon_vclzv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vclzq_u32 (uint32x4_t __a) -{ - return (uint32x4_t)__builtin_neon_vclzv4si ((int32x4_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vcnt_s8 (int8x8_t __a) -{ - return (int8x8_t)__builtin_neon_vcntv8qi (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vcnt_u8 (uint8x8_t __a) -{ - return (uint8x8_t)__builtin_neon_vcntv8qi ((int8x8_t) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vcnt_p8 (poly8x8_t __a) -{ - return (poly8x8_t)__builtin_neon_vcntv8qi ((int8x8_t) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vcntq_s8 (int8x16_t __a) -{ - return (int8x16_t)__builtin_neon_vcntv16qi (__a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vcntq_u8 (uint8x16_t __a) -{ - return (uint8x16_t)__builtin_neon_vcntv16qi ((int8x16_t) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vcntq_p8 (poly8x16_t __a) -{ - return (poly8x16_t)__builtin_neon_vcntv16qi ((int8x16_t) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrecpe_f32 (float32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vrecpev2sf (__a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vrecpe_u32 (uint32x2_t __a) -{ - return (uint32x2_t)__builtin_neon_vrecpev2si ((int32x2_t) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrecpeq_f32 (float32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vrecpev4sf (__a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vrecpeq_u32 (uint32x4_t __a) -{ - return (uint32x4_t)__builtin_neon_vrecpev4si ((int32x4_t) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrsqrte_f32 (float32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vrsqrtev2sf (__a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vrsqrte_u32 (uint32x2_t __a) -{ - return (uint32x2_t)__builtin_neon_vrsqrtev2si ((int32x2_t) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrsqrteq_f32 (float32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vrsqrtev4sf (__a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vrsqrteq_u32 (uint32x4_t __a) -{ - return (uint32x4_t)__builtin_neon_vrsqrtev4si ((int32x4_t) __a); -} - -__extension__ static __inline int8_t __attribute__ ((__always_inline__)) -vget_lane_s8 (int8x8_t __a, const int __b) -{ - return (int8_t)__builtin_neon_vget_lanev8qi (__a, __b); -} - -__extension__ static __inline int16_t __attribute__ ((__always_inline__)) -vget_lane_s16 (int16x4_t __a, const int __b) -{ - return (int16_t)__builtin_neon_vget_lanev4hi (__a, __b); -} - -__extension__ static __inline int32_t __attribute__ ((__always_inline__)) -vget_lane_s32 (int32x2_t __a, const int __b) -{ - return (int32_t)__builtin_neon_vget_lanev2si (__a, __b); -} - -__extension__ static __inline float32_t __attribute__ ((__always_inline__)) -vget_lane_f32 (float32x2_t __a, const int __b) -{ - return (float32_t)__builtin_neon_vget_lanev2sf (__a, __b); -} - -__extension__ static __inline uint8_t __attribute__ ((__always_inline__)) -vget_lane_u8 (uint8x8_t __a, const int __b) -{ - return (uint8_t)__builtin_neon_vget_laneuv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16_t __attribute__ ((__always_inline__)) -vget_lane_u16 (uint16x4_t __a, const int __b) -{ - return (uint16_t)__builtin_neon_vget_laneuv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -vget_lane_u32 (uint32x2_t __a, const int __b) -{ - return (uint32_t)__builtin_neon_vget_laneuv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline poly8_t __attribute__ ((__always_inline__)) -vget_lane_p8 (poly8x8_t __a, const int __b) -{ - return (poly8_t)__builtin_neon_vget_laneuv8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline poly16_t __attribute__ ((__always_inline__)) -vget_lane_p16 (poly16x4_t __a, const int __b) -{ - return (poly16_t)__builtin_neon_vget_laneuv4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline int64_t __attribute__ ((__always_inline__)) -vget_lane_s64 (int64x1_t __a, const int __b) -{ - return (int64_t)__builtin_neon_vget_lanedi (__a, __b); -} - -__extension__ static __inline uint64_t __attribute__ ((__always_inline__)) -vget_lane_u64 (uint64x1_t __a, const int __b) -{ - return (uint64_t)__builtin_neon_vget_lanedi ((int64x1_t) __a, __b); -} - -__extension__ static __inline int8_t __attribute__ ((__always_inline__)) -vgetq_lane_s8 (int8x16_t __a, const int __b) -{ - return (int8_t)__builtin_neon_vget_lanev16qi (__a, __b); -} - -__extension__ static __inline int16_t __attribute__ ((__always_inline__)) -vgetq_lane_s16 (int16x8_t __a, const int __b) -{ - return (int16_t)__builtin_neon_vget_lanev8hi (__a, __b); -} - -__extension__ static __inline int32_t __attribute__ ((__always_inline__)) -vgetq_lane_s32 (int32x4_t __a, const int __b) -{ - return (int32_t)__builtin_neon_vget_lanev4si (__a, __b); -} - -__extension__ static __inline float32_t __attribute__ ((__always_inline__)) -vgetq_lane_f32 (float32x4_t __a, const int __b) -{ - return (float32_t)__builtin_neon_vget_lanev4sf (__a, __b); -} - -__extension__ static __inline uint8_t __attribute__ ((__always_inline__)) -vgetq_lane_u8 (uint8x16_t __a, const int __b) -{ - return (uint8_t)__builtin_neon_vget_laneuv16qi ((int8x16_t) __a, __b); -} - -__extension__ static __inline uint16_t __attribute__ ((__always_inline__)) -vgetq_lane_u16 (uint16x8_t __a, const int __b) -{ - return (uint16_t)__builtin_neon_vget_laneuv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -vgetq_lane_u32 (uint32x4_t __a, const int __b) -{ - return (uint32_t)__builtin_neon_vget_laneuv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline poly8_t __attribute__ ((__always_inline__)) -vgetq_lane_p8 (poly8x16_t __a, const int __b) -{ - return (poly8_t)__builtin_neon_vget_laneuv16qi ((int8x16_t) __a, __b); -} - -__extension__ static __inline poly16_t __attribute__ ((__always_inline__)) -vgetq_lane_p16 (poly16x8_t __a, const int __b) -{ - return (poly16_t)__builtin_neon_vget_laneuv8hi ((int16x8_t) __a, __b); -} - -__extension__ static __inline int64_t __attribute__ ((__always_inline__)) -vgetq_lane_s64 (int64x2_t __a, const int __b) -{ - return (int64_t)__builtin_neon_vget_lanev2di (__a, __b); -} - -__extension__ static __inline uint64_t __attribute__ ((__always_inline__)) -vgetq_lane_u64 (uint64x2_t __a, const int __b) -{ - return (uint64_t)__builtin_neon_vget_lanev2di ((int64x2_t) __a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vset_lane_s8 (int8_t __a, int8x8_t __b, const int __c) -{ - return (int8x8_t)__builtin_neon_vset_lanev8qi ((__builtin_neon_qi) __a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vset_lane_s16 (int16_t __a, int16x4_t __b, const int __c) -{ - return (int16x4_t)__builtin_neon_vset_lanev4hi ((__builtin_neon_hi) __a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vset_lane_s32 (int32_t __a, int32x2_t __b, const int __c) -{ - return (int32x2_t)__builtin_neon_vset_lanev2si ((__builtin_neon_si) __a, __b, __c); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vset_lane_f32 (float32_t __a, float32x2_t __b, const int __c) -{ - return (float32x2_t)__builtin_neon_vset_lanev2sf ((__builtin_neon_sf) __a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vset_lane_u8 (uint8_t __a, uint8x8_t __b, const int __c) -{ - return (uint8x8_t)__builtin_neon_vset_lanev8qi ((__builtin_neon_qi) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vset_lane_u16 (uint16_t __a, uint16x4_t __b, const int __c) -{ - return (uint16x4_t)__builtin_neon_vset_lanev4hi ((__builtin_neon_hi) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vset_lane_u32 (uint32_t __a, uint32x2_t __b, const int __c) -{ - return (uint32x2_t)__builtin_neon_vset_lanev2si ((__builtin_neon_si) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vset_lane_p8 (poly8_t __a, poly8x8_t __b, const int __c) -{ - return (poly8x8_t)__builtin_neon_vset_lanev8qi ((__builtin_neon_qi) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vset_lane_p16 (poly16_t __a, poly16x4_t __b, const int __c) -{ - return (poly16x4_t)__builtin_neon_vset_lanev4hi ((__builtin_neon_hi) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vset_lane_s64 (int64_t __a, int64x1_t __b, const int __c) -{ - return (int64x1_t)__builtin_neon_vset_lanedi ((__builtin_neon_di) __a, __b, __c); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vset_lane_u64 (uint64_t __a, uint64x1_t __b, const int __c) -{ - return (uint64x1_t)__builtin_neon_vset_lanedi ((__builtin_neon_di) __a, (int64x1_t) __b, __c); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vsetq_lane_s8 (int8_t __a, int8x16_t __b, const int __c) -{ - return (int8x16_t)__builtin_neon_vset_lanev16qi ((__builtin_neon_qi) __a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vsetq_lane_s16 (int16_t __a, int16x8_t __b, const int __c) -{ - return (int16x8_t)__builtin_neon_vset_lanev8hi ((__builtin_neon_hi) __a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vsetq_lane_s32 (int32_t __a, int32x4_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vset_lanev4si ((__builtin_neon_si) __a, __b, __c); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vsetq_lane_f32 (float32_t __a, float32x4_t __b, const int __c) -{ - return (float32x4_t)__builtin_neon_vset_lanev4sf ((__builtin_neon_sf) __a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vsetq_lane_u8 (uint8_t __a, uint8x16_t __b, const int __c) -{ - return (uint8x16_t)__builtin_neon_vset_lanev16qi ((__builtin_neon_qi) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vsetq_lane_u16 (uint16_t __a, uint16x8_t __b, const int __c) -{ - return (uint16x8_t)__builtin_neon_vset_lanev8hi ((__builtin_neon_hi) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsetq_lane_u32 (uint32_t __a, uint32x4_t __b, const int __c) -{ - return (uint32x4_t)__builtin_neon_vset_lanev4si ((__builtin_neon_si) __a, (int32x4_t) __b, __c); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vsetq_lane_p8 (poly8_t __a, poly8x16_t __b, const int __c) -{ - return (poly8x16_t)__builtin_neon_vset_lanev16qi ((__builtin_neon_qi) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vsetq_lane_p16 (poly16_t __a, poly16x8_t __b, const int __c) -{ - return (poly16x8_t)__builtin_neon_vset_lanev8hi ((__builtin_neon_hi) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vsetq_lane_s64 (int64_t __a, int64x2_t __b, const int __c) -{ - return (int64x2_t)__builtin_neon_vset_lanev2di ((__builtin_neon_di) __a, __b, __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vsetq_lane_u64 (uint64_t __a, uint64x2_t __b, const int __c) -{ - return (uint64x2_t)__builtin_neon_vset_lanev2di ((__builtin_neon_di) __a, (int64x2_t) __b, __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vcreate_p64 (uint64_t __a) -{ - return (poly64x1_t)__builtin_neon_vcreatedi ((__builtin_neon_di) __a); -} - -#endif -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vcreate_s8 (uint64_t __a) -{ - return (int8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vcreate_s16 (uint64_t __a) -{ - return (int16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vcreate_s32 (uint64_t __a) -{ - return (int32x2_t)__builtin_neon_vcreatev2si ((__builtin_neon_di) __a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vcreate_s64 (uint64_t __a) -{ - return (int64x1_t)__builtin_neon_vcreatedi ((__builtin_neon_di) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vcreate_f32 (uint64_t __a) -{ - return (float32x2_t)__builtin_neon_vcreatev2sf ((__builtin_neon_di) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vcreate_u8 (uint64_t __a) -{ - return (uint8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vcreate_u16 (uint64_t __a) -{ - return (uint16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcreate_u32 (uint64_t __a) -{ - return (uint32x2_t)__builtin_neon_vcreatev2si ((__builtin_neon_di) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vcreate_u64 (uint64_t __a) -{ - return (uint64x1_t)__builtin_neon_vcreatedi ((__builtin_neon_di) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vcreate_p8 (uint64_t __a) -{ - return (poly8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vcreate_p16 (uint64_t __a) -{ - return (poly16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vdup_n_s8 (int8_t __a) -{ - return (int8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vdup_n_s16 (int16_t __a) -{ - return (int16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vdup_n_s32 (int32_t __a) -{ - return (int32x2_t)__builtin_neon_vdup_nv2si ((__builtin_neon_si) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vdup_n_f32 (float32_t __a) -{ - return (float32x2_t)__builtin_neon_vdup_nv2sf ((__builtin_neon_sf) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vdup_n_u8 (uint8_t __a) -{ - return (uint8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vdup_n_u16 (uint16_t __a) -{ - return (uint16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vdup_n_u32 (uint32_t __a) -{ - return (uint32x2_t)__builtin_neon_vdup_nv2si ((__builtin_neon_si) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vdup_n_p8 (poly8_t __a) -{ - return (poly8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vdup_n_p16 (poly16_t __a) -{ - return (poly16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vdup_n_p64 (poly64_t __a) -{ - return (poly64x1_t)__builtin_neon_vdup_ndi ((__builtin_neon_di) __a); -} - -#endif -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vdup_n_s64 (int64_t __a) -{ - return (int64x1_t)__builtin_neon_vdup_ndi ((__builtin_neon_di) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vdup_n_u64 (uint64_t __a) -{ - return (uint64x1_t)__builtin_neon_vdup_ndi ((__builtin_neon_di) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vdupq_n_p64 (poly64_t __a) -{ - return (poly64x2_t)__builtin_neon_vdup_nv2di ((__builtin_neon_di) __a); -} - -#endif -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vdupq_n_s8 (int8_t __a) -{ - return (int8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vdupq_n_s16 (int16_t __a) -{ - return (int16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vdupq_n_s32 (int32_t __a) -{ - return (int32x4_t)__builtin_neon_vdup_nv4si ((__builtin_neon_si) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vdupq_n_f32 (float32_t __a) -{ - return (float32x4_t)__builtin_neon_vdup_nv4sf ((__builtin_neon_sf) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vdupq_n_u8 (uint8_t __a) -{ - return (uint8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vdupq_n_u16 (uint16_t __a) -{ - return (uint16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vdupq_n_u32 (uint32_t __a) -{ - return (uint32x4_t)__builtin_neon_vdup_nv4si ((__builtin_neon_si) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vdupq_n_p8 (poly8_t __a) -{ - return (poly8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vdupq_n_p16 (poly16_t __a) -{ - return (poly16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vdupq_n_s64 (int64_t __a) -{ - return (int64x2_t)__builtin_neon_vdup_nv2di ((__builtin_neon_di) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vdupq_n_u64 (uint64_t __a) -{ - return (uint64x2_t)__builtin_neon_vdup_nv2di ((__builtin_neon_di) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vmov_n_s8 (int8_t __a) -{ - return (int8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmov_n_s16 (int16_t __a) -{ - return (int16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmov_n_s32 (int32_t __a) -{ - return (int32x2_t)__builtin_neon_vdup_nv2si ((__builtin_neon_si) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmov_n_f32 (float32_t __a) -{ - return (float32x2_t)__builtin_neon_vdup_nv2sf ((__builtin_neon_sf) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vmov_n_u8 (uint8_t __a) -{ - return (uint8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmov_n_u16 (uint16_t __a) -{ - return (uint16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmov_n_u32 (uint32_t __a) -{ - return (uint32x2_t)__builtin_neon_vdup_nv2si ((__builtin_neon_si) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vmov_n_p8 (poly8_t __a) -{ - return (poly8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vmov_n_p16 (poly16_t __a) -{ - return (poly16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vmov_n_s64 (int64_t __a) -{ - return (int64x1_t)__builtin_neon_vdup_ndi ((__builtin_neon_di) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vmov_n_u64 (uint64_t __a) -{ - return (uint64x1_t)__builtin_neon_vdup_ndi ((__builtin_neon_di) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vmovq_n_s8 (int8_t __a) -{ - return (int8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmovq_n_s16 (int16_t __a) -{ - return (int16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmovq_n_s32 (int32_t __a) -{ - return (int32x4_t)__builtin_neon_vdup_nv4si ((__builtin_neon_si) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmovq_n_f32 (float32_t __a) -{ - return (float32x4_t)__builtin_neon_vdup_nv4sf ((__builtin_neon_sf) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vmovq_n_u8 (uint8_t __a) -{ - return (uint8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmovq_n_u16 (uint16_t __a) -{ - return (uint16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmovq_n_u32 (uint32_t __a) -{ - return (uint32x4_t)__builtin_neon_vdup_nv4si ((__builtin_neon_si) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vmovq_n_p8 (poly8_t __a) -{ - return (poly8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vmovq_n_p16 (poly16_t __a) -{ - return (poly16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmovq_n_s64 (int64_t __a) -{ - return (int64x2_t)__builtin_neon_vdup_nv2di ((__builtin_neon_di) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmovq_n_u64 (uint64_t __a) -{ - return (uint64x2_t)__builtin_neon_vdup_nv2di ((__builtin_neon_di) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vdup_lane_s8 (int8x8_t __a, const int __b) -{ - return (int8x8_t)__builtin_neon_vdup_lanev8qi (__a, __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vdup_lane_s16 (int16x4_t __a, const int __b) -{ - return (int16x4_t)__builtin_neon_vdup_lanev4hi (__a, __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vdup_lane_s32 (int32x2_t __a, const int __b) -{ - return (int32x2_t)__builtin_neon_vdup_lanev2si (__a, __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vdup_lane_f32 (float32x2_t __a, const int __b) -{ - return (float32x2_t)__builtin_neon_vdup_lanev2sf (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vdup_lane_u8 (uint8x8_t __a, const int __b) -{ - return (uint8x8_t)__builtin_neon_vdup_lanev8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vdup_lane_u16 (uint16x4_t __a, const int __b) -{ - return (uint16x4_t)__builtin_neon_vdup_lanev4hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vdup_lane_u32 (uint32x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vdup_lanev2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vdup_lane_p8 (poly8x8_t __a, const int __b) -{ - return (poly8x8_t)__builtin_neon_vdup_lanev8qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vdup_lane_p16 (poly16x4_t __a, const int __b) -{ - return (poly16x4_t)__builtin_neon_vdup_lanev4hi ((int16x4_t) __a, __b); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vdup_lane_p64 (poly64x1_t __a, const int __b) -{ - return (poly64x1_t)__builtin_neon_vdup_lanedi (__a, __b); -} - -#endif -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vdup_lane_s64 (int64x1_t __a, const int __b) -{ - return (int64x1_t)__builtin_neon_vdup_lanedi (__a, __b); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vdup_lane_u64 (uint64x1_t __a, const int __b) -{ - return (uint64x1_t)__builtin_neon_vdup_lanedi ((int64x1_t) __a, __b); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vdupq_lane_s8 (int8x8_t __a, const int __b) -{ - return (int8x16_t)__builtin_neon_vdup_lanev16qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vdupq_lane_s16 (int16x4_t __a, const int __b) -{ - return (int16x8_t)__builtin_neon_vdup_lanev8hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vdupq_lane_s32 (int32x2_t __a, const int __b) -{ - return (int32x4_t)__builtin_neon_vdup_lanev4si (__a, __b); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vdupq_lane_f32 (float32x2_t __a, const int __b) -{ - return (float32x4_t)__builtin_neon_vdup_lanev4sf (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vdupq_lane_u8 (uint8x8_t __a, const int __b) -{ - return (uint8x16_t)__builtin_neon_vdup_lanev16qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vdupq_lane_u16 (uint16x4_t __a, const int __b) -{ - return (uint16x8_t)__builtin_neon_vdup_lanev8hi ((int16x4_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vdupq_lane_u32 (uint32x2_t __a, const int __b) -{ - return (uint32x4_t)__builtin_neon_vdup_lanev4si ((int32x2_t) __a, __b); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vdupq_lane_p8 (poly8x8_t __a, const int __b) -{ - return (poly8x16_t)__builtin_neon_vdup_lanev16qi ((int8x8_t) __a, __b); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vdupq_lane_p16 (poly16x4_t __a, const int __b) -{ - return (poly16x8_t)__builtin_neon_vdup_lanev8hi ((int16x4_t) __a, __b); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vdupq_lane_p64 (poly64x1_t __a, const int __b) -{ - return (poly64x2_t)__builtin_neon_vdup_lanev2di (__a, __b); -} - -#endif -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vdupq_lane_s64 (int64x1_t __a, const int __b) -{ - return (int64x2_t)__builtin_neon_vdup_lanev2di (__a, __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vdupq_lane_u64 (uint64x1_t __a, const int __b) -{ - return (uint64x2_t)__builtin_neon_vdup_lanev2di ((int64x1_t) __a, __b); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vcombine_p64 (poly64x1_t __a, poly64x1_t __b) -{ - return (poly64x2_t)__builtin_neon_vcombinedi (__a, __b); -} - -#endif -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vcombine_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x16_t)__builtin_neon_vcombinev8qi (__a, __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vcombine_s16 (int16x4_t __a, int16x4_t __b) -{ - return (int16x8_t)__builtin_neon_vcombinev4hi (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vcombine_s32 (int32x2_t __a, int32x2_t __b) -{ - return (int32x4_t)__builtin_neon_vcombinev2si (__a, __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vcombine_s64 (int64x1_t __a, int64x1_t __b) -{ - return (int64x2_t)__builtin_neon_vcombinedi (__a, __b); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vcombine_f32 (float32x2_t __a, float32x2_t __b) -{ - return (float32x4_t)__builtin_neon_vcombinev2sf (__a, __b); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vcombine_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x16_t)__builtin_neon_vcombinev8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vcombine_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return (uint16x8_t)__builtin_neon_vcombinev4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcombine_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return (uint32x4_t)__builtin_neon_vcombinev2si ((int32x2_t) __a, (int32x2_t) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vcombine_u64 (uint64x1_t __a, uint64x1_t __b) -{ - return (uint64x2_t)__builtin_neon_vcombinedi ((int64x1_t) __a, (int64x1_t) __b); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vcombine_p8 (poly8x8_t __a, poly8x8_t __b) -{ - return (poly8x16_t)__builtin_neon_vcombinev8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vcombine_p16 (poly16x4_t __a, poly16x4_t __b) -{ - return (poly16x8_t)__builtin_neon_vcombinev4hi ((int16x4_t) __a, (int16x4_t) __b); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vget_high_p64 (poly64x2_t __a) -{ - return (poly64x1_t)__builtin_neon_vget_highv2di ((int64x2_t) __a); -} - -#endif -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vget_high_s8 (int8x16_t __a) -{ - return (int8x8_t)__builtin_neon_vget_highv16qi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vget_high_s16 (int16x8_t __a) -{ - return (int16x4_t)__builtin_neon_vget_highv8hi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vget_high_s32 (int32x4_t __a) -{ - return (int32x2_t)__builtin_neon_vget_highv4si (__a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vget_high_s64 (int64x2_t __a) -{ - return (int64x1_t)__builtin_neon_vget_highv2di (__a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vget_high_f32 (float32x4_t __a) -{ - return (float32x2_t)__builtin_neon_vget_highv4sf (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vget_high_u8 (uint8x16_t __a) -{ - return (uint8x8_t)__builtin_neon_vget_highv16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vget_high_u16 (uint16x8_t __a) -{ - return (uint16x4_t)__builtin_neon_vget_highv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vget_high_u32 (uint32x4_t __a) -{ - return (uint32x2_t)__builtin_neon_vget_highv4si ((int32x4_t) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vget_high_u64 (uint64x2_t __a) -{ - return (uint64x1_t)__builtin_neon_vget_highv2di ((int64x2_t) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vget_high_p8 (poly8x16_t __a) -{ - return (poly8x8_t)__builtin_neon_vget_highv16qi ((int8x16_t) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vget_high_p16 (poly16x8_t __a) -{ - return (poly16x4_t)__builtin_neon_vget_highv8hi ((int16x8_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vget_low_s8 (int8x16_t __a) -{ - return (int8x8_t)__builtin_neon_vget_lowv16qi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vget_low_s16 (int16x8_t __a) -{ - return (int16x4_t)__builtin_neon_vget_lowv8hi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vget_low_s32 (int32x4_t __a) -{ - return (int32x2_t)__builtin_neon_vget_lowv4si (__a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vget_low_f32 (float32x4_t __a) -{ - return (float32x2_t)__builtin_neon_vget_lowv4sf (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vget_low_u8 (uint8x16_t __a) -{ - return (uint8x8_t)__builtin_neon_vget_lowv16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vget_low_u16 (uint16x8_t __a) -{ - return (uint16x4_t)__builtin_neon_vget_lowv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vget_low_u32 (uint32x4_t __a) -{ - return (uint32x2_t)__builtin_neon_vget_lowv4si ((int32x4_t) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vget_low_p8 (poly8x16_t __a) -{ - return (poly8x8_t)__builtin_neon_vget_lowv16qi ((int8x16_t) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vget_low_p16 (poly16x8_t __a) -{ - return (poly16x4_t)__builtin_neon_vget_lowv8hi ((int16x8_t) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vget_low_p64 (poly64x2_t __a) -{ - return (poly64x1_t)__builtin_neon_vget_lowv2di ((int64x2_t) __a); -} - -#endif -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vget_low_s64 (int64x2_t __a) -{ - return (int64x1_t)__builtin_neon_vget_lowv2di (__a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vget_low_u64 (uint64x2_t __a) -{ - return (uint64x1_t)__builtin_neon_vget_lowv2di ((int64x2_t) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vcvt_s32_f32 (float32x2_t __a) -{ - return (int32x2_t)__builtin_neon_vcvtsv2sf (__a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vcvt_f32_s32 (int32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vcvtsv2si (__a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vcvt_f32_u32 (uint32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vcvtuv2si ((int32x2_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcvt_u32_f32 (float32x2_t __a) -{ - return (uint32x2_t)__builtin_neon_vcvtuv2sf (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vcvtq_s32_f32 (float32x4_t __a) -{ - return (int32x4_t)__builtin_neon_vcvtsv4sf (__a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vcvtq_f32_s32 (int32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vcvtsv4si (__a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vcvtq_f32_u32 (uint32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vcvtuv4si ((int32x4_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcvtq_u32_f32 (float32x4_t __a) -{ - return (uint32x4_t)__builtin_neon_vcvtuv4sf (__a); -} - -#if ((__ARM_FP & 0x2) != 0) -__extension__ static __inline float16x4_t __attribute__ ((__always_inline__)) -vcvt_f16_f32 (float32x4_t __a) -{ - return (float16x4_t)__builtin_neon_vcvtv4hfv4sf (__a); -} - -#endif -#if ((__ARM_FP & 0x2) != 0) -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vcvt_f32_f16 (float16x4_t __a) -{ - return (float32x4_t)__builtin_neon_vcvtv4sfv4hf (__a); -} - -#endif -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vcvt_n_s32_f32 (float32x2_t __a, const int __b) -{ - return (int32x2_t)__builtin_neon_vcvts_nv2sf (__a, __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vcvt_n_f32_s32 (int32x2_t __a, const int __b) -{ - return (float32x2_t)__builtin_neon_vcvts_nv2si (__a, __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vcvt_n_f32_u32 (uint32x2_t __a, const int __b) -{ - return (float32x2_t)__builtin_neon_vcvtu_nv2si ((int32x2_t) __a, __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vcvt_n_u32_f32 (float32x2_t __a, const int __b) -{ - return (uint32x2_t)__builtin_neon_vcvtu_nv2sf (__a, __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vcvtq_n_s32_f32 (float32x4_t __a, const int __b) -{ - return (int32x4_t)__builtin_neon_vcvts_nv4sf (__a, __b); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vcvtq_n_f32_s32 (int32x4_t __a, const int __b) -{ - return (float32x4_t)__builtin_neon_vcvts_nv4si (__a, __b); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vcvtq_n_f32_u32 (uint32x4_t __a, const int __b) -{ - return (float32x4_t)__builtin_neon_vcvtu_nv4si ((int32x4_t) __a, __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vcvtq_n_u32_f32 (float32x4_t __a, const int __b) -{ - return (uint32x4_t)__builtin_neon_vcvtu_nv4sf (__a, __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vmovn_s16 (int16x8_t __a) -{ - return (int8x8_t)__builtin_neon_vmovnv8hi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmovn_s32 (int32x4_t __a) -{ - return (int16x4_t)__builtin_neon_vmovnv4si (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmovn_s64 (int64x2_t __a) -{ - return (int32x2_t)__builtin_neon_vmovnv2di (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vmovn_u16 (uint16x8_t __a) -{ - return (uint8x8_t)__builtin_neon_vmovnv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmovn_u32 (uint32x4_t __a) -{ - return (uint16x4_t)__builtin_neon_vmovnv4si ((int32x4_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmovn_u64 (uint64x2_t __a) -{ - return (uint32x2_t)__builtin_neon_vmovnv2di ((int64x2_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vqmovn_s16 (int16x8_t __a) -{ - return (int8x8_t)__builtin_neon_vqmovnsv8hi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqmovn_s32 (int32x4_t __a) -{ - return (int16x4_t)__builtin_neon_vqmovnsv4si (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqmovn_s64 (int64x2_t __a) -{ - return (int32x2_t)__builtin_neon_vqmovnsv2di (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqmovn_u16 (uint16x8_t __a) -{ - return (uint8x8_t)__builtin_neon_vqmovnuv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqmovn_u32 (uint32x4_t __a) -{ - return (uint16x4_t)__builtin_neon_vqmovnuv4si ((int32x4_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqmovn_u64 (uint64x2_t __a) -{ - return (uint32x2_t)__builtin_neon_vqmovnuv2di ((int64x2_t) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vqmovun_s16 (int16x8_t __a) -{ - return (uint8x8_t)__builtin_neon_vqmovunv8hi (__a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vqmovun_s32 (int32x4_t __a) -{ - return (uint16x4_t)__builtin_neon_vqmovunv4si (__a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vqmovun_s64 (int64x2_t __a) -{ - return (uint32x2_t)__builtin_neon_vqmovunv2di (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmovl_s8 (int8x8_t __a) -{ - return (int16x8_t)__builtin_neon_vmovlsv8qi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmovl_s16 (int16x4_t __a) -{ - return (int32x4_t)__builtin_neon_vmovlsv4hi (__a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmovl_s32 (int32x2_t __a) -{ - return (int64x2_t)__builtin_neon_vmovlsv2si (__a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmovl_u8 (uint8x8_t __a) -{ - return (uint16x8_t)__builtin_neon_vmovluv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmovl_u16 (uint16x4_t __a) -{ - return (uint32x4_t)__builtin_neon_vmovluv4hi ((int16x4_t) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmovl_u32 (uint32x2_t __a) -{ - return (uint64x2_t)__builtin_neon_vmovluv2si ((int32x2_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vtbl1_s8 (int8x8_t __a, int8x8_t __b) -{ - return (int8x8_t)__builtin_neon_vtbl1v8qi (__a, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtbl1_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return (uint8x8_t)__builtin_neon_vtbl1v8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vtbl1_p8 (poly8x8_t __a, uint8x8_t __b) -{ - return (poly8x8_t)__builtin_neon_vtbl1v8qi ((int8x8_t) __a, (int8x8_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vtbl2_s8 (int8x8x2_t __a, int8x8_t __b) -{ - union { int8x8x2_t __i; __builtin_neon_ti __o; } __au = { __a }; - return (int8x8_t)__builtin_neon_vtbl2v8qi (__au.__o, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtbl2_u8 (uint8x8x2_t __a, uint8x8_t __b) -{ - union { uint8x8x2_t __i; __builtin_neon_ti __o; } __au = { __a }; - return (uint8x8_t)__builtin_neon_vtbl2v8qi (__au.__o, (int8x8_t) __b); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vtbl2_p8 (poly8x8x2_t __a, uint8x8_t __b) -{ - union { poly8x8x2_t __i; __builtin_neon_ti __o; } __au = { __a }; - return (poly8x8_t)__builtin_neon_vtbl2v8qi (__au.__o, (int8x8_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vtbl3_s8 (int8x8x3_t __a, int8x8_t __b) -{ - union { int8x8x3_t __i; __builtin_neon_ei __o; } __au = { __a }; - return (int8x8_t)__builtin_neon_vtbl3v8qi (__au.__o, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtbl3_u8 (uint8x8x3_t __a, uint8x8_t __b) -{ - union { uint8x8x3_t __i; __builtin_neon_ei __o; } __au = { __a }; - return (uint8x8_t)__builtin_neon_vtbl3v8qi (__au.__o, (int8x8_t) __b); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vtbl3_p8 (poly8x8x3_t __a, uint8x8_t __b) -{ - union { poly8x8x3_t __i; __builtin_neon_ei __o; } __au = { __a }; - return (poly8x8_t)__builtin_neon_vtbl3v8qi (__au.__o, (int8x8_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vtbl4_s8 (int8x8x4_t __a, int8x8_t __b) -{ - union { int8x8x4_t __i; __builtin_neon_oi __o; } __au = { __a }; - return (int8x8_t)__builtin_neon_vtbl4v8qi (__au.__o, __b); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtbl4_u8 (uint8x8x4_t __a, uint8x8_t __b) -{ - union { uint8x8x4_t __i; __builtin_neon_oi __o; } __au = { __a }; - return (uint8x8_t)__builtin_neon_vtbl4v8qi (__au.__o, (int8x8_t) __b); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vtbl4_p8 (poly8x8x4_t __a, uint8x8_t __b) -{ - union { poly8x8x4_t __i; __builtin_neon_oi __o; } __au = { __a }; - return (poly8x8_t)__builtin_neon_vtbl4v8qi (__au.__o, (int8x8_t) __b); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vtbx1_s8 (int8x8_t __a, int8x8_t __b, int8x8_t __c) -{ - return (int8x8_t)__builtin_neon_vtbx1v8qi (__a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtbx1_u8 (uint8x8_t __a, uint8x8_t __b, uint8x8_t __c) -{ - return (uint8x8_t)__builtin_neon_vtbx1v8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vtbx1_p8 (poly8x8_t __a, poly8x8_t __b, uint8x8_t __c) -{ - return (poly8x8_t)__builtin_neon_vtbx1v8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vtbx2_s8 (int8x8_t __a, int8x8x2_t __b, int8x8_t __c) -{ - union { int8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - return (int8x8_t)__builtin_neon_vtbx2v8qi (__a, __bu.__o, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtbx2_u8 (uint8x8_t __a, uint8x8x2_t __b, uint8x8_t __c) -{ - union { uint8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - return (uint8x8_t)__builtin_neon_vtbx2v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vtbx2_p8 (poly8x8_t __a, poly8x8x2_t __b, uint8x8_t __c) -{ - union { poly8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - return (poly8x8_t)__builtin_neon_vtbx2v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vtbx3_s8 (int8x8_t __a, int8x8x3_t __b, int8x8_t __c) -{ - union { int8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - return (int8x8_t)__builtin_neon_vtbx3v8qi (__a, __bu.__o, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtbx3_u8 (uint8x8_t __a, uint8x8x3_t __b, uint8x8_t __c) -{ - union { uint8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - return (uint8x8_t)__builtin_neon_vtbx3v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vtbx3_p8 (poly8x8_t __a, poly8x8x3_t __b, uint8x8_t __c) -{ - union { poly8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - return (poly8x8_t)__builtin_neon_vtbx3v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vtbx4_s8 (int8x8_t __a, int8x8x4_t __b, int8x8_t __c) -{ - union { int8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - return (int8x8_t)__builtin_neon_vtbx4v8qi (__a, __bu.__o, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vtbx4_u8 (uint8x8_t __a, uint8x8x4_t __b, uint8x8_t __c) -{ - union { uint8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - return (uint8x8_t)__builtin_neon_vtbx4v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vtbx4_p8 (poly8x8_t __a, poly8x8x4_t __b, uint8x8_t __c) -{ - union { poly8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - return (poly8x8_t)__builtin_neon_vtbx4v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmul_lane_s16 (int16x4_t __a, int16x4_t __b, const int __c) -{ - return (int16x4_t)__builtin_neon_vmul_lanev4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmul_lane_s32 (int32x2_t __a, int32x2_t __b, const int __c) -{ - return (int32x2_t)__builtin_neon_vmul_lanev2si (__a, __b, __c); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmul_lane_f32 (float32x2_t __a, float32x2_t __b, const int __c) -{ - return (float32x2_t)__builtin_neon_vmul_lanev2sf (__a, __b, __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmul_lane_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) -{ - return (uint16x4_t)__builtin_neon_vmul_lanev4hi ((int16x4_t) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmul_lane_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) -{ - return (uint32x2_t)__builtin_neon_vmul_lanev2si ((int32x2_t) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmulq_lane_s16 (int16x8_t __a, int16x4_t __b, const int __c) -{ - return (int16x8_t)__builtin_neon_vmul_lanev8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmulq_lane_s32 (int32x4_t __a, int32x2_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vmul_lanev4si (__a, __b, __c); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmulq_lane_f32 (float32x4_t __a, float32x2_t __b, const int __c) -{ - return (float32x4_t)__builtin_neon_vmul_lanev4sf (__a, __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmulq_lane_u16 (uint16x8_t __a, uint16x4_t __b, const int __c) -{ - return (uint16x8_t)__builtin_neon_vmul_lanev8hi ((int16x8_t) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmulq_lane_u32 (uint32x4_t __a, uint32x2_t __b, const int __c) -{ - return (uint32x4_t)__builtin_neon_vmul_lanev4si ((int32x4_t) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmla_lane_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) -{ - return (int16x4_t)__builtin_neon_vmla_lanev4hi (__a, __b, __c, __d); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmla_lane_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) -{ - return (int32x2_t)__builtin_neon_vmla_lanev2si (__a, __b, __c, __d); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmla_lane_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c, const int __d) -{ - return (float32x2_t)__builtin_neon_vmla_lanev2sf (__a, __b, __c, __d); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmla_lane_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c, const int __d) -{ - return (uint16x4_t)__builtin_neon_vmla_lanev4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c, __d); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmla_lane_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c, const int __d) -{ - return (uint32x2_t)__builtin_neon_vmla_lanev2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c, __d); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmlaq_lane_s16 (int16x8_t __a, int16x8_t __b, int16x4_t __c, const int __d) -{ - return (int16x8_t)__builtin_neon_vmla_lanev8hi (__a, __b, __c, __d); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlaq_lane_s32 (int32x4_t __a, int32x4_t __b, int32x2_t __c, const int __d) -{ - return (int32x4_t)__builtin_neon_vmla_lanev4si (__a, __b, __c, __d); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmlaq_lane_f32 (float32x4_t __a, float32x4_t __b, float32x2_t __c, const int __d) -{ - return (float32x4_t)__builtin_neon_vmla_lanev4sf (__a, __b, __c, __d); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmlaq_lane_u16 (uint16x8_t __a, uint16x8_t __b, uint16x4_t __c, const int __d) -{ - return (uint16x8_t)__builtin_neon_vmla_lanev8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x4_t) __c, __d); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlaq_lane_u32 (uint32x4_t __a, uint32x4_t __b, uint32x2_t __c, const int __d) -{ - return (uint32x4_t)__builtin_neon_vmla_lanev4si ((int32x4_t) __a, (int32x4_t) __b, (int32x2_t) __c, __d); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlal_lane_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) -{ - return (int32x4_t)__builtin_neon_vmlals_lanev4hi (__a, __b, __c, __d); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmlal_lane_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) -{ - return (int64x2_t)__builtin_neon_vmlals_lanev2si (__a, __b, __c, __d); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlal_lane_u16 (uint32x4_t __a, uint16x4_t __b, uint16x4_t __c, const int __d) -{ - return (uint32x4_t)__builtin_neon_vmlalu_lanev4hi ((int32x4_t) __a, (int16x4_t) __b, (int16x4_t) __c, __d); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmlal_lane_u32 (uint64x2_t __a, uint32x2_t __b, uint32x2_t __c, const int __d) -{ - return (uint64x2_t)__builtin_neon_vmlalu_lanev2si ((int64x2_t) __a, (int32x2_t) __b, (int32x2_t) __c, __d); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmlal_lane_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) -{ - return (int32x4_t)__builtin_neon_vqdmlal_lanev4hi (__a, __b, __c, __d); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqdmlal_lane_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) -{ - return (int64x2_t)__builtin_neon_vqdmlal_lanev2si (__a, __b, __c, __d); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmls_lane_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) -{ - return (int16x4_t)__builtin_neon_vmls_lanev4hi (__a, __b, __c, __d); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmls_lane_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) -{ - return (int32x2_t)__builtin_neon_vmls_lanev2si (__a, __b, __c, __d); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmls_lane_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c, const int __d) -{ - return (float32x2_t)__builtin_neon_vmls_lanev2sf (__a, __b, __c, __d); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmls_lane_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c, const int __d) -{ - return (uint16x4_t)__builtin_neon_vmls_lanev4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c, __d); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmls_lane_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c, const int __d) -{ - return (uint32x2_t)__builtin_neon_vmls_lanev2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c, __d); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmlsq_lane_s16 (int16x8_t __a, int16x8_t __b, int16x4_t __c, const int __d) -{ - return (int16x8_t)__builtin_neon_vmls_lanev8hi (__a, __b, __c, __d); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlsq_lane_s32 (int32x4_t __a, int32x4_t __b, int32x2_t __c, const int __d) -{ - return (int32x4_t)__builtin_neon_vmls_lanev4si (__a, __b, __c, __d); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmlsq_lane_f32 (float32x4_t __a, float32x4_t __b, float32x2_t __c, const int __d) -{ - return (float32x4_t)__builtin_neon_vmls_lanev4sf (__a, __b, __c, __d); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmlsq_lane_u16 (uint16x8_t __a, uint16x8_t __b, uint16x4_t __c, const int __d) -{ - return (uint16x8_t)__builtin_neon_vmls_lanev8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x4_t) __c, __d); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlsq_lane_u32 (uint32x4_t __a, uint32x4_t __b, uint32x2_t __c, const int __d) -{ - return (uint32x4_t)__builtin_neon_vmls_lanev4si ((int32x4_t) __a, (int32x4_t) __b, (int32x2_t) __c, __d); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlsl_lane_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) -{ - return (int32x4_t)__builtin_neon_vmlsls_lanev4hi (__a, __b, __c, __d); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmlsl_lane_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) -{ - return (int64x2_t)__builtin_neon_vmlsls_lanev2si (__a, __b, __c, __d); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlsl_lane_u16 (uint32x4_t __a, uint16x4_t __b, uint16x4_t __c, const int __d) -{ - return (uint32x4_t)__builtin_neon_vmlslu_lanev4hi ((int32x4_t) __a, (int16x4_t) __b, (int16x4_t) __c, __d); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmlsl_lane_u32 (uint64x2_t __a, uint32x2_t __b, uint32x2_t __c, const int __d) -{ - return (uint64x2_t)__builtin_neon_vmlslu_lanev2si ((int64x2_t) __a, (int32x2_t) __b, (int32x2_t) __c, __d); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmlsl_lane_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) -{ - return (int32x4_t)__builtin_neon_vqdmlsl_lanev4hi (__a, __b, __c, __d); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqdmlsl_lane_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) -{ - return (int64x2_t)__builtin_neon_vqdmlsl_lanev2si (__a, __b, __c, __d); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmull_lane_s16 (int16x4_t __a, int16x4_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vmulls_lanev4hi (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmull_lane_s32 (int32x2_t __a, int32x2_t __b, const int __c) -{ - return (int64x2_t)__builtin_neon_vmulls_lanev2si (__a, __b, __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmull_lane_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) -{ - return (uint32x4_t)__builtin_neon_vmullu_lanev4hi ((int16x4_t) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmull_lane_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) -{ - return (uint64x2_t)__builtin_neon_vmullu_lanev2si ((int32x2_t) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmull_lane_s16 (int16x4_t __a, int16x4_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vqdmull_lanev4hi (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqdmull_lane_s32 (int32x2_t __a, int32x2_t __b, const int __c) -{ - return (int64x2_t)__builtin_neon_vqdmull_lanev2si (__a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqdmulhq_lane_s16 (int16x8_t __a, int16x4_t __b, const int __c) -{ - return (int16x8_t)__builtin_neon_vqdmulh_lanev8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmulhq_lane_s32 (int32x4_t __a, int32x2_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vqdmulh_lanev4si (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqdmulh_lane_s16 (int16x4_t __a, int16x4_t __b, const int __c) -{ - return (int16x4_t)__builtin_neon_vqdmulh_lanev4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqdmulh_lane_s32 (int32x2_t __a, int32x2_t __b, const int __c) -{ - return (int32x2_t)__builtin_neon_vqdmulh_lanev2si (__a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqrdmulhq_lane_s16 (int16x8_t __a, int16x4_t __b, const int __c) -{ - return (int16x8_t)__builtin_neon_vqrdmulh_lanev8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqrdmulhq_lane_s32 (int32x4_t __a, int32x2_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vqrdmulh_lanev4si (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqrdmulh_lane_s16 (int16x4_t __a, int16x4_t __b, const int __c) -{ - return (int16x4_t)__builtin_neon_vqrdmulh_lanev4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqrdmulh_lane_s32 (int32x2_t __a, int32x2_t __b, const int __c) -{ - return (int32x2_t)__builtin_neon_vqrdmulh_lanev2si (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmul_n_s16 (int16x4_t __a, int16_t __b) -{ - return (int16x4_t)__builtin_neon_vmul_nv4hi (__a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmul_n_s32 (int32x2_t __a, int32_t __b) -{ - return (int32x2_t)__builtin_neon_vmul_nv2si (__a, (__builtin_neon_si) __b); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmul_n_f32 (float32x2_t __a, float32_t __b) -{ - return (float32x2_t)__builtin_neon_vmul_nv2sf (__a, (__builtin_neon_sf) __b); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmul_n_u16 (uint16x4_t __a, uint16_t __b) -{ - return (uint16x4_t)__builtin_neon_vmul_nv4hi ((int16x4_t) __a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmul_n_u32 (uint32x2_t __a, uint32_t __b) -{ - return (uint32x2_t)__builtin_neon_vmul_nv2si ((int32x2_t) __a, (__builtin_neon_si) __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmulq_n_s16 (int16x8_t __a, int16_t __b) -{ - return (int16x8_t)__builtin_neon_vmul_nv8hi (__a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmulq_n_s32 (int32x4_t __a, int32_t __b) -{ - return (int32x4_t)__builtin_neon_vmul_nv4si (__a, (__builtin_neon_si) __b); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmulq_n_f32 (float32x4_t __a, float32_t __b) -{ - return (float32x4_t)__builtin_neon_vmul_nv4sf (__a, (__builtin_neon_sf) __b); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmulq_n_u16 (uint16x8_t __a, uint16_t __b) -{ - return (uint16x8_t)__builtin_neon_vmul_nv8hi ((int16x8_t) __a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmulq_n_u32 (uint32x4_t __a, uint32_t __b) -{ - return (uint32x4_t)__builtin_neon_vmul_nv4si ((int32x4_t) __a, (__builtin_neon_si) __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmull_n_s16 (int16x4_t __a, int16_t __b) -{ - return (int32x4_t)__builtin_neon_vmulls_nv4hi (__a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmull_n_s32 (int32x2_t __a, int32_t __b) -{ - return (int64x2_t)__builtin_neon_vmulls_nv2si (__a, (__builtin_neon_si) __b); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmull_n_u16 (uint16x4_t __a, uint16_t __b) -{ - return (uint32x4_t)__builtin_neon_vmullu_nv4hi ((int16x4_t) __a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmull_n_u32 (uint32x2_t __a, uint32_t __b) -{ - return (uint64x2_t)__builtin_neon_vmullu_nv2si ((int32x2_t) __a, (__builtin_neon_si) __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmull_n_s16 (int16x4_t __a, int16_t __b) -{ - return (int32x4_t)__builtin_neon_vqdmull_nv4hi (__a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqdmull_n_s32 (int32x2_t __a, int32_t __b) -{ - return (int64x2_t)__builtin_neon_vqdmull_nv2si (__a, (__builtin_neon_si) __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqdmulhq_n_s16 (int16x8_t __a, int16_t __b) -{ - return (int16x8_t)__builtin_neon_vqdmulh_nv8hi (__a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmulhq_n_s32 (int32x4_t __a, int32_t __b) -{ - return (int32x4_t)__builtin_neon_vqdmulh_nv4si (__a, (__builtin_neon_si) __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqdmulh_n_s16 (int16x4_t __a, int16_t __b) -{ - return (int16x4_t)__builtin_neon_vqdmulh_nv4hi (__a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqdmulh_n_s32 (int32x2_t __a, int32_t __b) -{ - return (int32x2_t)__builtin_neon_vqdmulh_nv2si (__a, (__builtin_neon_si) __b); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vqrdmulhq_n_s16 (int16x8_t __a, int16_t __b) -{ - return (int16x8_t)__builtin_neon_vqrdmulh_nv8hi (__a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqrdmulhq_n_s32 (int32x4_t __a, int32_t __b) -{ - return (int32x4_t)__builtin_neon_vqrdmulh_nv4si (__a, (__builtin_neon_si) __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vqrdmulh_n_s16 (int16x4_t __a, int16_t __b) -{ - return (int16x4_t)__builtin_neon_vqrdmulh_nv4hi (__a, (__builtin_neon_hi) __b); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vqrdmulh_n_s32 (int32x2_t __a, int32_t __b) -{ - return (int32x2_t)__builtin_neon_vqrdmulh_nv2si (__a, (__builtin_neon_si) __b); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmla_n_s16 (int16x4_t __a, int16x4_t __b, int16_t __c) -{ - return (int16x4_t)__builtin_neon_vmla_nv4hi (__a, __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmla_n_s32 (int32x2_t __a, int32x2_t __b, int32_t __c) -{ - return (int32x2_t)__builtin_neon_vmla_nv2si (__a, __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmla_n_f32 (float32x2_t __a, float32x2_t __b, float32_t __c) -{ - return (float32x2_t)__builtin_neon_vmla_nv2sf (__a, __b, (__builtin_neon_sf) __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmla_n_u16 (uint16x4_t __a, uint16x4_t __b, uint16_t __c) -{ - return (uint16x4_t)__builtin_neon_vmla_nv4hi ((int16x4_t) __a, (int16x4_t) __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmla_n_u32 (uint32x2_t __a, uint32x2_t __b, uint32_t __c) -{ - return (uint32x2_t)__builtin_neon_vmla_nv2si ((int32x2_t) __a, (int32x2_t) __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmlaq_n_s16 (int16x8_t __a, int16x8_t __b, int16_t __c) -{ - return (int16x8_t)__builtin_neon_vmla_nv8hi (__a, __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlaq_n_s32 (int32x4_t __a, int32x4_t __b, int32_t __c) -{ - return (int32x4_t)__builtin_neon_vmla_nv4si (__a, __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmlaq_n_f32 (float32x4_t __a, float32x4_t __b, float32_t __c) -{ - return (float32x4_t)__builtin_neon_vmla_nv4sf (__a, __b, (__builtin_neon_sf) __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmlaq_n_u16 (uint16x8_t __a, uint16x8_t __b, uint16_t __c) -{ - return (uint16x8_t)__builtin_neon_vmla_nv8hi ((int16x8_t) __a, (int16x8_t) __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlaq_n_u32 (uint32x4_t __a, uint32x4_t __b, uint32_t __c) -{ - return (uint32x4_t)__builtin_neon_vmla_nv4si ((int32x4_t) __a, (int32x4_t) __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlal_n_s16 (int32x4_t __a, int16x4_t __b, int16_t __c) -{ - return (int32x4_t)__builtin_neon_vmlals_nv4hi (__a, __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmlal_n_s32 (int64x2_t __a, int32x2_t __b, int32_t __c) -{ - return (int64x2_t)__builtin_neon_vmlals_nv2si (__a, __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlal_n_u16 (uint32x4_t __a, uint16x4_t __b, uint16_t __c) -{ - return (uint32x4_t)__builtin_neon_vmlalu_nv4hi ((int32x4_t) __a, (int16x4_t) __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmlal_n_u32 (uint64x2_t __a, uint32x2_t __b, uint32_t __c) -{ - return (uint64x2_t)__builtin_neon_vmlalu_nv2si ((int64x2_t) __a, (int32x2_t) __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmlal_n_s16 (int32x4_t __a, int16x4_t __b, int16_t __c) -{ - return (int32x4_t)__builtin_neon_vqdmlal_nv4hi (__a, __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqdmlal_n_s32 (int64x2_t __a, int32x2_t __b, int32_t __c) -{ - return (int64x2_t)__builtin_neon_vqdmlal_nv2si (__a, __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vmls_n_s16 (int16x4_t __a, int16x4_t __b, int16_t __c) -{ - return (int16x4_t)__builtin_neon_vmls_nv4hi (__a, __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vmls_n_s32 (int32x2_t __a, int32x2_t __b, int32_t __c) -{ - return (int32x2_t)__builtin_neon_vmls_nv2si (__a, __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vmls_n_f32 (float32x2_t __a, float32x2_t __b, float32_t __c) -{ - return (float32x2_t)__builtin_neon_vmls_nv2sf (__a, __b, (__builtin_neon_sf) __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vmls_n_u16 (uint16x4_t __a, uint16x4_t __b, uint16_t __c) -{ - return (uint16x4_t)__builtin_neon_vmls_nv4hi ((int16x4_t) __a, (int16x4_t) __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vmls_n_u32 (uint32x2_t __a, uint32x2_t __b, uint32_t __c) -{ - return (uint32x2_t)__builtin_neon_vmls_nv2si ((int32x2_t) __a, (int32x2_t) __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vmlsq_n_s16 (int16x8_t __a, int16x8_t __b, int16_t __c) -{ - return (int16x8_t)__builtin_neon_vmls_nv8hi (__a, __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlsq_n_s32 (int32x4_t __a, int32x4_t __b, int32_t __c) -{ - return (int32x4_t)__builtin_neon_vmls_nv4si (__a, __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vmlsq_n_f32 (float32x4_t __a, float32x4_t __b, float32_t __c) -{ - return (float32x4_t)__builtin_neon_vmls_nv4sf (__a, __b, (__builtin_neon_sf) __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vmlsq_n_u16 (uint16x8_t __a, uint16x8_t __b, uint16_t __c) -{ - return (uint16x8_t)__builtin_neon_vmls_nv8hi ((int16x8_t) __a, (int16x8_t) __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlsq_n_u32 (uint32x4_t __a, uint32x4_t __b, uint32_t __c) -{ - return (uint32x4_t)__builtin_neon_vmls_nv4si ((int32x4_t) __a, (int32x4_t) __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vmlsl_n_s16 (int32x4_t __a, int16x4_t __b, int16_t __c) -{ - return (int32x4_t)__builtin_neon_vmlsls_nv4hi (__a, __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vmlsl_n_s32 (int64x2_t __a, int32x2_t __b, int32_t __c) -{ - return (int64x2_t)__builtin_neon_vmlsls_nv2si (__a, __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vmlsl_n_u16 (uint32x4_t __a, uint16x4_t __b, uint16_t __c) -{ - return (uint32x4_t)__builtin_neon_vmlslu_nv4hi ((int32x4_t) __a, (int16x4_t) __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vmlsl_n_u32 (uint64x2_t __a, uint32x2_t __b, uint32_t __c) -{ - return (uint64x2_t)__builtin_neon_vmlslu_nv2si ((int64x2_t) __a, (int32x2_t) __b, (__builtin_neon_si) __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vqdmlsl_n_s16 (int32x4_t __a, int16x4_t __b, int16_t __c) -{ - return (int32x4_t)__builtin_neon_vqdmlsl_nv4hi (__a, __b, (__builtin_neon_hi) __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vqdmlsl_n_s32 (int64x2_t __a, int32x2_t __b, int32_t __c) -{ - return (int64x2_t)__builtin_neon_vqdmlsl_nv2si (__a, __b, (__builtin_neon_si) __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vext_p64 (poly64x1_t __a, poly64x1_t __b, const int __c) -{ - return (poly64x1_t)__builtin_neon_vextdi (__a, __b, __c); -} - -#endif -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vext_s8 (int8x8_t __a, int8x8_t __b, const int __c) -{ - return (int8x8_t)__builtin_neon_vextv8qi (__a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vext_s16 (int16x4_t __a, int16x4_t __b, const int __c) -{ - return (int16x4_t)__builtin_neon_vextv4hi (__a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vext_s32 (int32x2_t __a, int32x2_t __b, const int __c) -{ - return (int32x2_t)__builtin_neon_vextv2si (__a, __b, __c); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vext_s64 (int64x1_t __a, int64x1_t __b, const int __c) -{ - return (int64x1_t)__builtin_neon_vextdi (__a, __b, __c); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vext_f32 (float32x2_t __a, float32x2_t __b, const int __c) -{ - return (float32x2_t)__builtin_neon_vextv2sf (__a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vext_u8 (uint8x8_t __a, uint8x8_t __b, const int __c) -{ - return (uint8x8_t)__builtin_neon_vextv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vext_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) -{ - return (uint16x4_t)__builtin_neon_vextv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vext_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) -{ - return (uint32x2_t)__builtin_neon_vextv2si ((int32x2_t) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vext_u64 (uint64x1_t __a, uint64x1_t __b, const int __c) -{ - return (uint64x1_t)__builtin_neon_vextdi ((int64x1_t) __a, (int64x1_t) __b, __c); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vext_p8 (poly8x8_t __a, poly8x8_t __b, const int __c) -{ - return (poly8x8_t)__builtin_neon_vextv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vext_p16 (poly16x4_t __a, poly16x4_t __b, const int __c) -{ - return (poly16x4_t)__builtin_neon_vextv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vextq_p64 (poly64x2_t __a, poly64x2_t __b, const int __c) -{ - return (poly64x2_t)__builtin_neon_vextv2di ((int64x2_t) __a, (int64x2_t) __b, __c); -} - -#endif -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vextq_s8 (int8x16_t __a, int8x16_t __b, const int __c) -{ - return (int8x16_t)__builtin_neon_vextv16qi (__a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vextq_s16 (int16x8_t __a, int16x8_t __b, const int __c) -{ - return (int16x8_t)__builtin_neon_vextv8hi (__a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vextq_s32 (int32x4_t __a, int32x4_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vextv4si (__a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vextq_s64 (int64x2_t __a, int64x2_t __b, const int __c) -{ - return (int64x2_t)__builtin_neon_vextv2di (__a, __b, __c); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vextq_f32 (float32x4_t __a, float32x4_t __b, const int __c) -{ - return (float32x4_t)__builtin_neon_vextv4sf (__a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vextq_u8 (uint8x16_t __a, uint8x16_t __b, const int __c) -{ - return (uint8x16_t)__builtin_neon_vextv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vextq_u16 (uint16x8_t __a, uint16x8_t __b, const int __c) -{ - return (uint16x8_t)__builtin_neon_vextv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vextq_u32 (uint32x4_t __a, uint32x4_t __b, const int __c) -{ - return (uint32x4_t)__builtin_neon_vextv4si ((int32x4_t) __a, (int32x4_t) __b, __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vextq_u64 (uint64x2_t __a, uint64x2_t __b, const int __c) -{ - return (uint64x2_t)__builtin_neon_vextv2di ((int64x2_t) __a, (int64x2_t) __b, __c); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vextq_p8 (poly8x16_t __a, poly8x16_t __b, const int __c) -{ - return (poly8x16_t)__builtin_neon_vextv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vextq_p16 (poly16x8_t __a, poly16x8_t __b, const int __c) -{ - return (poly16x8_t)__builtin_neon_vextv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vrev64_s8 (int8x8_t __a) -{ - return (int8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 7, 6, 5, 4, 3, 2, 1, 0 }); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vrev64_s16 (int16x4_t __a) -{ - return (int16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 3, 2, 1, 0 }); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vrev64_s32 (int32x2_t __a) -{ - return (int32x2_t) __builtin_shuffle (__a, (uint32x2_t) { 1, 0 }); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vrev64_f32 (float32x2_t __a) -{ - return (float32x2_t) __builtin_shuffle (__a, (uint32x2_t) { 1, 0 }); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vrev64_u8 (uint8x8_t __a) -{ - return (uint8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 7, 6, 5, 4, 3, 2, 1, 0 }); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vrev64_u16 (uint16x4_t __a) -{ - return (uint16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 3, 2, 1, 0 }); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vrev64_u32 (uint32x2_t __a) -{ - return (uint32x2_t) __builtin_shuffle (__a, (uint32x2_t) { 1, 0 }); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vrev64_p8 (poly8x8_t __a) -{ - return (poly8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 7, 6, 5, 4, 3, 2, 1, 0 }); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vrev64_p16 (poly16x4_t __a) -{ - return (poly16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 3, 2, 1, 0 }); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vrev64q_s8 (int8x16_t __a) -{ - return (int8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vrev64q_s16 (int16x8_t __a) -{ - return (int16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vrev64q_s32 (int32x4_t __a) -{ - return (int32x4_t) __builtin_shuffle (__a, (uint32x4_t) { 1, 0, 3, 2 }); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vrev64q_f32 (float32x4_t __a) -{ - return (float32x4_t) __builtin_shuffle (__a, (uint32x4_t) { 1, 0, 3, 2 }); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vrev64q_u8 (uint8x16_t __a) -{ - return (uint8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vrev64q_u16 (uint16x8_t __a) -{ - return (uint16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vrev64q_u32 (uint32x4_t __a) -{ - return (uint32x4_t) __builtin_shuffle (__a, (uint32x4_t) { 1, 0, 3, 2 }); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vrev64q_p8 (poly8x16_t __a) -{ - return (poly8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vrev64q_p16 (poly16x8_t __a) -{ - return (poly16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vrev32_s8 (int8x8_t __a) -{ - return (int8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vrev32_s16 (int16x4_t __a) -{ - return (int16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 1, 0, 3, 2 }); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vrev32_u8 (uint8x8_t __a) -{ - return (uint8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vrev32_u16 (uint16x4_t __a) -{ - return (uint16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 1, 0, 3, 2 }); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vrev32_p8 (poly8x8_t __a) -{ - return (poly8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vrev32_p16 (poly16x4_t __a) -{ - return (poly16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 1, 0, 3, 2 }); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vrev32q_s8 (int8x16_t __a) -{ - return (int8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vrev32q_s16 (int16x8_t __a) -{ - return (int16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vrev32q_u8 (uint8x16_t __a) -{ - return (uint8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vrev32q_u16 (uint16x8_t __a) -{ - return (uint16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vrev32q_p8 (poly8x16_t __a) -{ - return (poly8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vrev32q_p16 (poly16x8_t __a) -{ - return (poly16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vrev16_s8 (int8x8_t __a) -{ - return (int8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vrev16_u8 (uint8x8_t __a) -{ - return (uint8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vrev16_p8 (poly8x8_t __a) -{ - return (poly8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vrev16q_s8 (int8x16_t __a) -{ - return (int8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 }); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vrev16q_u8 (uint8x16_t __a) -{ - return (uint8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 }); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vrev16q_p8 (poly8x16_t __a) -{ - return (poly8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 }); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vbsl_p64 (uint64x1_t __a, poly64x1_t __b, poly64x1_t __c) -{ - return (poly64x1_t)__builtin_neon_vbsldi ((int64x1_t) __a, __b, __c); -} - -#endif -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vbsl_s8 (uint8x8_t __a, int8x8_t __b, int8x8_t __c) -{ - return (int8x8_t)__builtin_neon_vbslv8qi ((int8x8_t) __a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vbsl_s16 (uint16x4_t __a, int16x4_t __b, int16x4_t __c) -{ - return (int16x4_t)__builtin_neon_vbslv4hi ((int16x4_t) __a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vbsl_s32 (uint32x2_t __a, int32x2_t __b, int32x2_t __c) -{ - return (int32x2_t)__builtin_neon_vbslv2si ((int32x2_t) __a, __b, __c); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vbsl_s64 (uint64x1_t __a, int64x1_t __b, int64x1_t __c) -{ - return (int64x1_t)__builtin_neon_vbsldi ((int64x1_t) __a, __b, __c); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vbsl_f32 (uint32x2_t __a, float32x2_t __b, float32x2_t __c) -{ - return (float32x2_t)__builtin_neon_vbslv2sf ((int32x2_t) __a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vbsl_u8 (uint8x8_t __a, uint8x8_t __b, uint8x8_t __c) -{ - return (uint8x8_t)__builtin_neon_vbslv8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vbsl_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c) -{ - return (uint16x4_t)__builtin_neon_vbslv4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vbsl_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c) -{ - return (uint32x2_t)__builtin_neon_vbslv2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vbsl_u64 (uint64x1_t __a, uint64x1_t __b, uint64x1_t __c) -{ - return (uint64x1_t)__builtin_neon_vbsldi ((int64x1_t) __a, (int64x1_t) __b, (int64x1_t) __c); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vbsl_p8 (uint8x8_t __a, poly8x8_t __b, poly8x8_t __c) -{ - return (poly8x8_t)__builtin_neon_vbslv8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vbsl_p16 (uint16x4_t __a, poly16x4_t __b, poly16x4_t __c) -{ - return (poly16x4_t)__builtin_neon_vbslv4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vbslq_p64 (uint64x2_t __a, poly64x2_t __b, poly64x2_t __c) -{ - return (poly64x2_t)__builtin_neon_vbslv2di ((int64x2_t) __a, (int64x2_t) __b, (int64x2_t) __c); -} - -#endif -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vbslq_s8 (uint8x16_t __a, int8x16_t __b, int8x16_t __c) -{ - return (int8x16_t)__builtin_neon_vbslv16qi ((int8x16_t) __a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vbslq_s16 (uint16x8_t __a, int16x8_t __b, int16x8_t __c) -{ - return (int16x8_t)__builtin_neon_vbslv8hi ((int16x8_t) __a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vbslq_s32 (uint32x4_t __a, int32x4_t __b, int32x4_t __c) -{ - return (int32x4_t)__builtin_neon_vbslv4si ((int32x4_t) __a, __b, __c); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vbslq_s64 (uint64x2_t __a, int64x2_t __b, int64x2_t __c) -{ - return (int64x2_t)__builtin_neon_vbslv2di ((int64x2_t) __a, __b, __c); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vbslq_f32 (uint32x4_t __a, float32x4_t __b, float32x4_t __c) -{ - return (float32x4_t)__builtin_neon_vbslv4sf ((int32x4_t) __a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vbslq_u8 (uint8x16_t __a, uint8x16_t __b, uint8x16_t __c) -{ - return (uint8x16_t)__builtin_neon_vbslv16qi ((int8x16_t) __a, (int8x16_t) __b, (int8x16_t) __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vbslq_u16 (uint16x8_t __a, uint16x8_t __b, uint16x8_t __c) -{ - return (uint16x8_t)__builtin_neon_vbslv8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x8_t) __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vbslq_u32 (uint32x4_t __a, uint32x4_t __b, uint32x4_t __c) -{ - return (uint32x4_t)__builtin_neon_vbslv4si ((int32x4_t) __a, (int32x4_t) __b, (int32x4_t) __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vbslq_u64 (uint64x2_t __a, uint64x2_t __b, uint64x2_t __c) -{ - return (uint64x2_t)__builtin_neon_vbslv2di ((int64x2_t) __a, (int64x2_t) __b, (int64x2_t) __c); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vbslq_p8 (uint8x16_t __a, poly8x16_t __b, poly8x16_t __c) -{ - return (poly8x16_t)__builtin_neon_vbslv16qi ((int8x16_t) __a, (int8x16_t) __b, (int8x16_t) __c); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vbslq_p16 (uint16x8_t __a, poly16x8_t __b, poly16x8_t __c) -{ - return (poly16x8_t)__builtin_neon_vbslv8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x8_t) __c); -} - -/* For big-endian, the shuffle masks for ZIP, UZP and TRN must be changed as - follows. (nelt = the number of elements within a vector.) - - Firstly, a value of N within a mask, becomes (N ^ (nelt - 1)), as gcc vector - extension's indexing scheme is reversed *within each vector* (relative to the - neon intrinsics view), but without changing which of the two vectors. - - Secondly, the elements within each mask are reversed, as the mask is itself a - vector, and will itself be loaded in reverse order (again, relative to the - neon intrinsics view, i.e. that would result from a "vld1" instruction). */ - -__extension__ static __inline int8x8x2_t __attribute__ ((__always_inline__)) -vtrn_s8 (int8x8_t __a, int8x8_t __b) -{ - int8x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 9, 1, 11, 3, 13, 5, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 8, 0, 10, 2, 12, 4, 14, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 0, 8, 2, 10, 4, 12, 6, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 1, 9, 3, 11, 5, 13, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline int16x4x2_t __attribute__ ((__always_inline__)) -vtrn_s16 (int16x4_t __a, int16x4_t __b) -{ - int16x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 1, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 6, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 2, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 5, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline uint8x8x2_t __attribute__ ((__always_inline__)) -vtrn_u8 (uint8x8_t __a, uint8x8_t __b) -{ - uint8x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 9, 1, 11, 3, 13, 5, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 8, 0, 10, 2, 12, 4, 14, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 0, 8, 2, 10, 4, 12, 6, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 1, 9, 3, 11, 5, 13, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline uint16x4x2_t __attribute__ ((__always_inline__)) -vtrn_u16 (uint16x4_t __a, uint16x4_t __b) -{ - uint16x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 1, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 6, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 2, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 5, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline poly8x8x2_t __attribute__ ((__always_inline__)) -vtrn_p8 (poly8x8_t __a, poly8x8_t __b) -{ - poly8x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 9, 1, 11, 3, 13, 5, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 8, 0, 10, 2, 12, 4, 14, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 0, 8, 2, 10, 4, 12, 6, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 1, 9, 3, 11, 5, 13, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline poly16x4x2_t __attribute__ ((__always_inline__)) -vtrn_p16 (poly16x4_t __a, poly16x4_t __b) -{ - poly16x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 1, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 6, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 2, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 5, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline int32x2x2_t __attribute__ ((__always_inline__)) -vtrn_s32 (int32x2_t __a, int32x2_t __b) -{ - int32x2x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); -#endif - return __rv; -} - -__extension__ static __inline float32x2x2_t __attribute__ ((__always_inline__)) -vtrn_f32 (float32x2_t __a, float32x2_t __b) -{ - float32x2x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); -#endif - return __rv; -} - -__extension__ static __inline uint32x2x2_t __attribute__ ((__always_inline__)) -vtrn_u32 (uint32x2_t __a, uint32x2_t __b) -{ - uint32x2x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); -#endif - return __rv; -} - -__extension__ static __inline int8x16x2_t __attribute__ ((__always_inline__)) -vtrnq_s8 (int8x16_t __a, int8x16_t __b) -{ - int8x16x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 17, 1, 19, 3, 21, 5, 23, 7, 25, 9, 27, 11, 29, 13, 31, 15 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 16, 0, 18, 2, 20, 4, 22, 6, 24, 8, 26, 10, 28, 12, 30, 14 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 30 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 1, 17, 3, 19, 5, 21, 7, 23, 9, 25, 11, 27, 13, 29, 15, 31 }); -#endif - return __rv; -} - -__extension__ static __inline int16x8x2_t __attribute__ ((__always_inline__)) -vtrnq_s16 (int16x8_t __a, int16x8_t __b) -{ - int16x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 9, 1, 11, 3, 13, 5, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 8, 0, 10, 2, 12, 4, 14, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 0, 8, 2, 10, 4, 12, 6, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 1, 9, 3, 11, 5, 13, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline int32x4x2_t __attribute__ ((__always_inline__)) -vtrnq_s32 (int32x4_t __a, int32x4_t __b) -{ - int32x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 1, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 0, 6, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 2, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 5, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline float32x4x2_t __attribute__ ((__always_inline__)) -vtrnq_f32 (float32x4_t __a, float32x4_t __b) -{ - float32x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 1, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 0, 6, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 2, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 5, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline uint8x16x2_t __attribute__ ((__always_inline__)) -vtrnq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - uint8x16x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 17, 1, 19, 3, 21, 5, 23, 7, 25, 9, 27, 11, 29, 13, 31, 15 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 16, 0, 18, 2, 20, 4, 22, 6, 24, 8, 26, 10, 28, 12, 30, 14 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 30 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 1, 17, 3, 19, 5, 21, 7, 23, 9, 25, 11, 27, 13, 29, 15, 31 }); -#endif - return __rv; -} - -__extension__ static __inline uint16x8x2_t __attribute__ ((__always_inline__)) -vtrnq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - uint16x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 9, 1, 11, 3, 13, 5, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 8, 0, 10, 2, 12, 4, 14, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 0, 8, 2, 10, 4, 12, 6, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 1, 9, 3, 11, 5, 13, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline uint32x4x2_t __attribute__ ((__always_inline__)) -vtrnq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - uint32x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 1, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 0, 6, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 2, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 5, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline poly8x16x2_t __attribute__ ((__always_inline__)) -vtrnq_p8 (poly8x16_t __a, poly8x16_t __b) -{ - poly8x16x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 17, 1, 19, 3, 21, 5, 23, 7, 25, 9, 27, 11, 29, 13, 31, 15 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 16, 0, 18, 2, 20, 4, 22, 6, 24, 8, 26, 10, 28, 12, 30, 14 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 30 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 1, 17, 3, 19, 5, 21, 7, 23, 9, 25, 11, 27, 13, 29, 15, 31 }); -#endif - return __rv; -} - -__extension__ static __inline poly16x8x2_t __attribute__ ((__always_inline__)) -vtrnq_p16 (poly16x8_t __a, poly16x8_t __b) -{ - poly16x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 9, 1, 11, 3, 13, 5, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 8, 0, 10, 2, 12, 4, 14, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 0, 8, 2, 10, 4, 12, 6, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 1, 9, 3, 11, 5, 13, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline int8x8x2_t __attribute__ ((__always_inline__)) -vzip_s8 (int8x8_t __a, int8x8_t __b) -{ - int8x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 12, 4, 13, 5, 14, 6, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 8, 0, 9, 1, 10, 2, 11, 3 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 0, 8, 1, 9, 2, 10, 3, 11 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 4, 12, 5, 13, 6, 14, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline int16x4x2_t __attribute__ ((__always_inline__)) -vzip_s16 (int16x4_t __a, int16x4_t __b) -{ - int16x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 6, 2, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 5, 1 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 1, 5 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 2, 6, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline uint8x8x2_t __attribute__ ((__always_inline__)) -vzip_u8 (uint8x8_t __a, uint8x8_t __b) -{ - uint8x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 12, 4, 13, 5, 14, 6, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 8, 0, 9, 1, 10, 2, 11, 3 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 0, 8, 1, 9, 2, 10, 3, 11 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 4, 12, 5, 13, 6, 14, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline uint16x4x2_t __attribute__ ((__always_inline__)) -vzip_u16 (uint16x4_t __a, uint16x4_t __b) -{ - uint16x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 6, 2, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 5, 1 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 1, 5 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 2, 6, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline poly8x8x2_t __attribute__ ((__always_inline__)) -vzip_p8 (poly8x8_t __a, poly8x8_t __b) -{ - poly8x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 12, 4, 13, 5, 14, 6, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 8, 0, 9, 1, 10, 2, 11, 3 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 0, 8, 1, 9, 2, 10, 3, 11 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 4, 12, 5, 13, 6, 14, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline poly16x4x2_t __attribute__ ((__always_inline__)) -vzip_p16 (poly16x4_t __a, poly16x4_t __b) -{ - poly16x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 6, 2, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 5, 1 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 1, 5 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 2, 6, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline int32x2x2_t __attribute__ ((__always_inline__)) -vzip_s32 (int32x2_t __a, int32x2_t __b) -{ - int32x2x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); -#endif - return __rv; -} - -__extension__ static __inline float32x2x2_t __attribute__ ((__always_inline__)) -vzip_f32 (float32x2_t __a, float32x2_t __b) -{ - float32x2x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); -#endif - return __rv; -} - -__extension__ static __inline uint32x2x2_t __attribute__ ((__always_inline__)) -vzip_u32 (uint32x2_t __a, uint32x2_t __b) -{ - uint32x2x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); -#endif - return __rv; -} - -__extension__ static __inline int8x16x2_t __attribute__ ((__always_inline__)) -vzipq_s8 (int8x16_t __a, int8x16_t __b) -{ - int8x16x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 24, 8, 25, 9, 26, 10, 27, 11, 28, 12, 29, 13, 30, 14, 31, 15 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 16, 0, 17, 1, 18, 2, 19, 3, 20, 4, 21, 5, 22, 6, 23, 7 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31 }); -#endif - return __rv; -} - -__extension__ static __inline int16x8x2_t __attribute__ ((__always_inline__)) -vzipq_s16 (int16x8_t __a, int16x8_t __b) -{ - int16x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 12, 4, 13, 5, 14, 6, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 8, 0, 9, 1, 10, 2, 11, 3 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 0, 8, 1, 9, 2, 10, 3, 11 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 4, 12, 5, 13, 6, 14, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline int32x4x2_t __attribute__ ((__always_inline__)) -vzipq_s32 (int32x4_t __a, int32x4_t __b) -{ - int32x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 6, 2, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 0, 5, 1 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 1, 5 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 2, 6, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline float32x4x2_t __attribute__ ((__always_inline__)) -vzipq_f32 (float32x4_t __a, float32x4_t __b) -{ - float32x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 6, 2, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 0, 5, 1 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 1, 5 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 2, 6, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline uint8x16x2_t __attribute__ ((__always_inline__)) -vzipq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - uint8x16x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 24, 8, 25, 9, 26, 10, 27, 11, 28, 12, 29, 13, 30, 14, 31, 15 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 16, 0, 17, 1, 18, 2, 19, 3, 20, 4, 21, 5, 22, 6, 23, 7 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31 }); -#endif - return __rv; -} - -__extension__ static __inline uint16x8x2_t __attribute__ ((__always_inline__)) -vzipq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - uint16x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 12, 4, 13, 5, 14, 6, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 8, 0, 9, 1, 10, 2, 11, 3 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 0, 8, 1, 9, 2, 10, 3, 11 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 4, 12, 5, 13, 6, 14, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline uint32x4x2_t __attribute__ ((__always_inline__)) -vzipq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - uint32x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 6, 2, 7, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 0, 5, 1 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 1, 5 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 2, 6, 3, 7 }); -#endif - return __rv; -} - -__extension__ static __inline poly8x16x2_t __attribute__ ((__always_inline__)) -vzipq_p8 (poly8x16_t __a, poly8x16_t __b) -{ - poly8x16x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 24, 8, 25, 9, 26, 10, 27, 11, 28, 12, 29, 13, 30, 14, 31, 15 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 16, 0, 17, 1, 18, 2, 19, 3, 20, 4, 21, 5, 22, 6, 23, 7 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31 }); -#endif - return __rv; -} - -__extension__ static __inline poly16x8x2_t __attribute__ ((__always_inline__)) -vzipq_p16 (poly16x8_t __a, poly16x8_t __b) -{ - poly16x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 12, 4, 13, 5, 14, 6, 15, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 8, 0, 9, 1, 10, 2, 11, 3 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 0, 8, 1, 9, 2, 10, 3, 11 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 4, 12, 5, 13, 6, 14, 7, 15 }); -#endif - return __rv; -} - -__extension__ static __inline int8x8x2_t __attribute__ ((__always_inline__)) -vuzp_s8 (int8x8_t __a, int8x8_t __b) -{ - int8x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 9, 11, 13, 15, 1, 3, 5, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 8, 10, 12, 14, 0, 2, 4, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 0, 2, 4, 6, 8, 10, 12, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 1, 3, 5, 7, 9, 11, 13, 15 }); -#endif - return __rv; -} - -__extension__ static __inline int16x4x2_t __attribute__ ((__always_inline__)) -vuzp_s16 (int16x4_t __a, int16x4_t __b) -{ - int16x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 7, 1, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 6, 0, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 2, 4, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 3, 5, 7 }); -#endif - return __rv; -} - -__extension__ static __inline int32x2x2_t __attribute__ ((__always_inline__)) -vuzp_s32 (int32x2_t __a, int32x2_t __b) -{ - int32x2x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); -#endif - return __rv; -} - -__extension__ static __inline float32x2x2_t __attribute__ ((__always_inline__)) -vuzp_f32 (float32x2_t __a, float32x2_t __b) -{ - float32x2x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); -#endif - return __rv; -} - -__extension__ static __inline uint8x8x2_t __attribute__ ((__always_inline__)) -vuzp_u8 (uint8x8_t __a, uint8x8_t __b) -{ - uint8x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 9, 11, 13, 15, 1, 3, 5, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 8, 10, 12, 14, 0, 2, 4, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 0, 2, 4, 6, 8, 10, 12, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 1, 3, 5, 7, 9, 11, 13, 15 }); -#endif - return __rv; -} - -__extension__ static __inline uint16x4x2_t __attribute__ ((__always_inline__)) -vuzp_u16 (uint16x4_t __a, uint16x4_t __b) -{ - uint16x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 7, 1, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 6, 0, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 2, 4, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 3, 5, 7 }); -#endif - return __rv; -} - -__extension__ static __inline uint32x2x2_t __attribute__ ((__always_inline__)) -vuzp_u32 (uint32x2_t __a, uint32x2_t __b) -{ - uint32x2x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); -#endif - return __rv; -} - -__extension__ static __inline poly8x8x2_t __attribute__ ((__always_inline__)) -vuzp_p8 (poly8x8_t __a, poly8x8_t __b) -{ - poly8x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 9, 11, 13, 15, 1, 3, 5, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 8, 10, 12, 14, 0, 2, 4, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 0, 2, 4, 6, 8, 10, 12, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) - { 1, 3, 5, 7, 9, 11, 13, 15 }); -#endif - return __rv; -} - -__extension__ static __inline poly16x4x2_t __attribute__ ((__always_inline__)) -vuzp_p16 (poly16x4_t __a, poly16x4_t __b) -{ - poly16x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 7, 1, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 6, 0, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 2, 4, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 3, 5, 7 }); -#endif - return __rv; -} - -__extension__ static __inline int8x16x2_t __attribute__ ((__always_inline__)) -vuzpq_s8 (int8x16_t __a, int8x16_t __b) -{ - int8x16x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 17, 19, 21, 23, 25, 27, 29, 31, 1, 3, 5, 7, 9, 11, 13, 15 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 16, 18, 20, 22, 24, 26, 28, 30, 0, 2, 4, 6, 8, 10, 12, 14 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 }); -#endif - return __rv; -} - -__extension__ static __inline int16x8x2_t __attribute__ ((__always_inline__)) -vuzpq_s16 (int16x8_t __a, int16x8_t __b) -{ - int16x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 9, 11, 13, 15, 1, 3, 5, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 8, 10, 12, 14, 0, 2, 4, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 0, 2, 4, 6, 8, 10, 12, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 1, 3, 5, 7, 9, 11, 13, 15 }); -#endif - return __rv; -} - -__extension__ static __inline int32x4x2_t __attribute__ ((__always_inline__)) -vuzpq_s32 (int32x4_t __a, int32x4_t __b) -{ - int32x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 7, 1, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 6, 0, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 2, 4, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 3, 5, 7 }); -#endif - return __rv; -} - -__extension__ static __inline float32x4x2_t __attribute__ ((__always_inline__)) -vuzpq_f32 (float32x4_t __a, float32x4_t __b) -{ - float32x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 7, 1, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 6, 0, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 2, 4, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 3, 5, 7 }); -#endif - return __rv; -} - -__extension__ static __inline uint8x16x2_t __attribute__ ((__always_inline__)) -vuzpq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - uint8x16x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 17, 19, 21, 23, 25, 27, 29, 31, 1, 3, 5, 7, 9, 11, 13, 15 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 16, 18, 20, 22, 24, 26, 28, 30, 0, 2, 4, 6, 8, 10, 12, 14 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 }); -#endif - return __rv; -} - -__extension__ static __inline uint16x8x2_t __attribute__ ((__always_inline__)) -vuzpq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - uint16x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 9, 11, 13, 15, 1, 3, 5, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 8, 10, 12, 14, 0, 2, 4, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 0, 2, 4, 6, 8, 10, 12, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 1, 3, 5, 7, 9, 11, 13, 15 }); -#endif - return __rv; -} - -__extension__ static __inline uint32x4x2_t __attribute__ ((__always_inline__)) -vuzpq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - uint32x4x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 7, 1, 3 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 6, 0, 2 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 2, 4, 6 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 3, 5, 7 }); -#endif - return __rv; -} - -__extension__ static __inline poly8x16x2_t __attribute__ ((__always_inline__)) -vuzpq_p8 (poly8x16_t __a, poly8x16_t __b) -{ - poly8x16x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 17, 19, 21, 23, 25, 27, 29, 31, 1, 3, 5, 7, 9, 11, 13, 15 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 16, 18, 20, 22, 24, 26, 28, 30, 0, 2, 4, 6, 8, 10, 12, 14 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) - { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 }); -#endif - return __rv; -} - -__extension__ static __inline poly16x8x2_t __attribute__ ((__always_inline__)) -vuzpq_p16 (poly16x8_t __a, poly16x8_t __b) -{ - poly16x8x2_t __rv; -#ifdef __ARM_BIG_ENDIAN - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 9, 11, 13, 15, 1, 3, 5, 7 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 8, 10, 12, 14, 0, 2, 4, 6 }); -#else - __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 0, 2, 4, 6, 8, 10, 12, 14 }); - __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) - { 1, 3, 5, 7, 9, 11, 13, 15 }); -#endif - return __rv; -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vld1_p64 (const poly64_t * __a) -{ - return (poly64x1_t)__builtin_neon_vld1di ((const __builtin_neon_di *) __a); -} - -#endif -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vld1_s8 (const int8_t * __a) -{ - return (int8x8_t)__builtin_neon_vld1v8qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vld1_s16 (const int16_t * __a) -{ - return (int16x4_t)__builtin_neon_vld1v4hi ((const __builtin_neon_hi *) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vld1_s32 (const int32_t * __a) -{ - return (int32x2_t)__builtin_neon_vld1v2si ((const __builtin_neon_si *) __a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vld1_s64 (const int64_t * __a) -{ - return (int64x1_t)__builtin_neon_vld1di ((const __builtin_neon_di *) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vld1_f32 (const float32_t * __a) -{ - return (float32x2_t)__builtin_neon_vld1v2sf ((const __builtin_neon_sf *) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vld1_u8 (const uint8_t * __a) -{ - return (uint8x8_t)__builtin_neon_vld1v8qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vld1_u16 (const uint16_t * __a) -{ - return (uint16x4_t)__builtin_neon_vld1v4hi ((const __builtin_neon_hi *) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vld1_u32 (const uint32_t * __a) -{ - return (uint32x2_t)__builtin_neon_vld1v2si ((const __builtin_neon_si *) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vld1_u64 (const uint64_t * __a) -{ - return (uint64x1_t)__builtin_neon_vld1di ((const __builtin_neon_di *) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vld1_p8 (const poly8_t * __a) -{ - return (poly8x8_t)__builtin_neon_vld1v8qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vld1_p16 (const poly16_t * __a) -{ - return (poly16x4_t)__builtin_neon_vld1v4hi ((const __builtin_neon_hi *) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vld1q_p64 (const poly64_t * __a) -{ - return (poly64x2_t)__builtin_neon_vld1v2di ((const __builtin_neon_di *) __a); -} - -#endif -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vld1q_s8 (const int8_t * __a) -{ - return (int8x16_t)__builtin_neon_vld1v16qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vld1q_s16 (const int16_t * __a) -{ - return (int16x8_t)__builtin_neon_vld1v8hi ((const __builtin_neon_hi *) __a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vld1q_s32 (const int32_t * __a) -{ - return (int32x4_t)__builtin_neon_vld1v4si ((const __builtin_neon_si *) __a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vld1q_s64 (const int64_t * __a) -{ - return (int64x2_t)__builtin_neon_vld1v2di ((const __builtin_neon_di *) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vld1q_f32 (const float32_t * __a) -{ - return (float32x4_t)__builtin_neon_vld1v4sf ((const __builtin_neon_sf *) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vld1q_u8 (const uint8_t * __a) -{ - return (uint8x16_t)__builtin_neon_vld1v16qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vld1q_u16 (const uint16_t * __a) -{ - return (uint16x8_t)__builtin_neon_vld1v8hi ((const __builtin_neon_hi *) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vld1q_u32 (const uint32_t * __a) -{ - return (uint32x4_t)__builtin_neon_vld1v4si ((const __builtin_neon_si *) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vld1q_u64 (const uint64_t * __a) -{ - return (uint64x2_t)__builtin_neon_vld1v2di ((const __builtin_neon_di *) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vld1q_p8 (const poly8_t * __a) -{ - return (poly8x16_t)__builtin_neon_vld1v16qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vld1q_p16 (const poly16_t * __a) -{ - return (poly16x8_t)__builtin_neon_vld1v8hi ((const __builtin_neon_hi *) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vld1_lane_s8 (const int8_t * __a, int8x8_t __b, const int __c) -{ - return (int8x8_t)__builtin_neon_vld1_lanev8qi ((const __builtin_neon_qi *) __a, __b, __c); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vld1_lane_s16 (const int16_t * __a, int16x4_t __b, const int __c) -{ - return (int16x4_t)__builtin_neon_vld1_lanev4hi ((const __builtin_neon_hi *) __a, __b, __c); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vld1_lane_s32 (const int32_t * __a, int32x2_t __b, const int __c) -{ - return (int32x2_t)__builtin_neon_vld1_lanev2si ((const __builtin_neon_si *) __a, __b, __c); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vld1_lane_f32 (const float32_t * __a, float32x2_t __b, const int __c) -{ - return (float32x2_t)__builtin_neon_vld1_lanev2sf ((const __builtin_neon_sf *) __a, __b, __c); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vld1_lane_u8 (const uint8_t * __a, uint8x8_t __b, const int __c) -{ - return (uint8x8_t)__builtin_neon_vld1_lanev8qi ((const __builtin_neon_qi *) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vld1_lane_u16 (const uint16_t * __a, uint16x4_t __b, const int __c) -{ - return (uint16x4_t)__builtin_neon_vld1_lanev4hi ((const __builtin_neon_hi *) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vld1_lane_u32 (const uint32_t * __a, uint32x2_t __b, const int __c) -{ - return (uint32x2_t)__builtin_neon_vld1_lanev2si ((const __builtin_neon_si *) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vld1_lane_p8 (const poly8_t * __a, poly8x8_t __b, const int __c) -{ - return (poly8x8_t)__builtin_neon_vld1_lanev8qi ((const __builtin_neon_qi *) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vld1_lane_p16 (const poly16_t * __a, poly16x4_t __b, const int __c) -{ - return (poly16x4_t)__builtin_neon_vld1_lanev4hi ((const __builtin_neon_hi *) __a, (int16x4_t) __b, __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vld1_lane_p64 (const poly64_t * __a, poly64x1_t __b, const int __c) -{ - return (poly64x1_t)__builtin_neon_vld1_lanedi ((const __builtin_neon_di *) __a, __b, __c); -} - -#endif -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vld1_lane_s64 (const int64_t * __a, int64x1_t __b, const int __c) -{ - return (int64x1_t)__builtin_neon_vld1_lanedi ((const __builtin_neon_di *) __a, __b, __c); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vld1_lane_u64 (const uint64_t * __a, uint64x1_t __b, const int __c) -{ - return (uint64x1_t)__builtin_neon_vld1_lanedi ((const __builtin_neon_di *) __a, (int64x1_t) __b, __c); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vld1q_lane_s8 (const int8_t * __a, int8x16_t __b, const int __c) -{ - return (int8x16_t)__builtin_neon_vld1_lanev16qi ((const __builtin_neon_qi *) __a, __b, __c); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vld1q_lane_s16 (const int16_t * __a, int16x8_t __b, const int __c) -{ - return (int16x8_t)__builtin_neon_vld1_lanev8hi ((const __builtin_neon_hi *) __a, __b, __c); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vld1q_lane_s32 (const int32_t * __a, int32x4_t __b, const int __c) -{ - return (int32x4_t)__builtin_neon_vld1_lanev4si ((const __builtin_neon_si *) __a, __b, __c); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vld1q_lane_f32 (const float32_t * __a, float32x4_t __b, const int __c) -{ - return (float32x4_t)__builtin_neon_vld1_lanev4sf ((const __builtin_neon_sf *) __a, __b, __c); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vld1q_lane_u8 (const uint8_t * __a, uint8x16_t __b, const int __c) -{ - return (uint8x16_t)__builtin_neon_vld1_lanev16qi ((const __builtin_neon_qi *) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vld1q_lane_u16 (const uint16_t * __a, uint16x8_t __b, const int __c) -{ - return (uint16x8_t)__builtin_neon_vld1_lanev8hi ((const __builtin_neon_hi *) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vld1q_lane_u32 (const uint32_t * __a, uint32x4_t __b, const int __c) -{ - return (uint32x4_t)__builtin_neon_vld1_lanev4si ((const __builtin_neon_si *) __a, (int32x4_t) __b, __c); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vld1q_lane_p8 (const poly8_t * __a, poly8x16_t __b, const int __c) -{ - return (poly8x16_t)__builtin_neon_vld1_lanev16qi ((const __builtin_neon_qi *) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vld1q_lane_p16 (const poly16_t * __a, poly16x8_t __b, const int __c) -{ - return (poly16x8_t)__builtin_neon_vld1_lanev8hi ((const __builtin_neon_hi *) __a, (int16x8_t) __b, __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vld1q_lane_p64 (const poly64_t * __a, poly64x2_t __b, const int __c) -{ - return (poly64x2_t)__builtin_neon_vld1_lanev2di ((const __builtin_neon_di *) __a, (int64x2_t) __b, __c); -} - -#endif -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vld1q_lane_s64 (const int64_t * __a, int64x2_t __b, const int __c) -{ - return (int64x2_t)__builtin_neon_vld1_lanev2di ((const __builtin_neon_di *) __a, __b, __c); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vld1q_lane_u64 (const uint64_t * __a, uint64x2_t __b, const int __c) -{ - return (uint64x2_t)__builtin_neon_vld1_lanev2di ((const __builtin_neon_di *) __a, (int64x2_t) __b, __c); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vld1_dup_s8 (const int8_t * __a) -{ - return (int8x8_t)__builtin_neon_vld1_dupv8qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vld1_dup_s16 (const int16_t * __a) -{ - return (int16x4_t)__builtin_neon_vld1_dupv4hi ((const __builtin_neon_hi *) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vld1_dup_s32 (const int32_t * __a) -{ - return (int32x2_t)__builtin_neon_vld1_dupv2si ((const __builtin_neon_si *) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vld1_dup_f32 (const float32_t * __a) -{ - return (float32x2_t)__builtin_neon_vld1_dupv2sf ((const __builtin_neon_sf *) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vld1_dup_u8 (const uint8_t * __a) -{ - return (uint8x8_t)__builtin_neon_vld1_dupv8qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vld1_dup_u16 (const uint16_t * __a) -{ - return (uint16x4_t)__builtin_neon_vld1_dupv4hi ((const __builtin_neon_hi *) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vld1_dup_u32 (const uint32_t * __a) -{ - return (uint32x2_t)__builtin_neon_vld1_dupv2si ((const __builtin_neon_si *) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vld1_dup_p8 (const poly8_t * __a) -{ - return (poly8x8_t)__builtin_neon_vld1_dupv8qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vld1_dup_p16 (const poly16_t * __a) -{ - return (poly16x4_t)__builtin_neon_vld1_dupv4hi ((const __builtin_neon_hi *) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vld1_dup_p64 (const poly64_t * __a) -{ - return (poly64x1_t)__builtin_neon_vld1_dupdi ((const __builtin_neon_di *) __a); -} - -#endif -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vld1_dup_s64 (const int64_t * __a) -{ - return (int64x1_t)__builtin_neon_vld1_dupdi ((const __builtin_neon_di *) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vld1_dup_u64 (const uint64_t * __a) -{ - return (uint64x1_t)__builtin_neon_vld1_dupdi ((const __builtin_neon_di *) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vld1q_dup_s8 (const int8_t * __a) -{ - return (int8x16_t)__builtin_neon_vld1_dupv16qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vld1q_dup_s16 (const int16_t * __a) -{ - return (int16x8_t)__builtin_neon_vld1_dupv8hi ((const __builtin_neon_hi *) __a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vld1q_dup_s32 (const int32_t * __a) -{ - return (int32x4_t)__builtin_neon_vld1_dupv4si ((const __builtin_neon_si *) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vld1q_dup_f32 (const float32_t * __a) -{ - return (float32x4_t)__builtin_neon_vld1_dupv4sf ((const __builtin_neon_sf *) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vld1q_dup_u8 (const uint8_t * __a) -{ - return (uint8x16_t)__builtin_neon_vld1_dupv16qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vld1q_dup_u16 (const uint16_t * __a) -{ - return (uint16x8_t)__builtin_neon_vld1_dupv8hi ((const __builtin_neon_hi *) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vld1q_dup_u32 (const uint32_t * __a) -{ - return (uint32x4_t)__builtin_neon_vld1_dupv4si ((const __builtin_neon_si *) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vld1q_dup_p8 (const poly8_t * __a) -{ - return (poly8x16_t)__builtin_neon_vld1_dupv16qi ((const __builtin_neon_qi *) __a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vld1q_dup_p16 (const poly16_t * __a) -{ - return (poly16x8_t)__builtin_neon_vld1_dupv8hi ((const __builtin_neon_hi *) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vld1q_dup_p64 (const poly64_t * __a) -{ - return (poly64x2_t)__builtin_neon_vld1_dupv2di ((const __builtin_neon_di *) __a); -} - -#endif -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vld1q_dup_s64 (const int64_t * __a) -{ - return (int64x2_t)__builtin_neon_vld1_dupv2di ((const __builtin_neon_di *) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vld1q_dup_u64 (const uint64_t * __a) -{ - return (uint64x2_t)__builtin_neon_vld1_dupv2di ((const __builtin_neon_di *) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_p64 (poly64_t * __a, poly64x1_t __b) -{ - __builtin_neon_vst1di ((__builtin_neon_di *) __a, __b); -} - -#endif -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_s8 (int8_t * __a, int8x8_t __b) -{ - __builtin_neon_vst1v8qi ((__builtin_neon_qi *) __a, __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_s16 (int16_t * __a, int16x4_t __b) -{ - __builtin_neon_vst1v4hi ((__builtin_neon_hi *) __a, __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_s32 (int32_t * __a, int32x2_t __b) -{ - __builtin_neon_vst1v2si ((__builtin_neon_si *) __a, __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_s64 (int64_t * __a, int64x1_t __b) -{ - __builtin_neon_vst1di ((__builtin_neon_di *) __a, __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_f32 (float32_t * __a, float32x2_t __b) -{ - __builtin_neon_vst1v2sf ((__builtin_neon_sf *) __a, __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_u8 (uint8_t * __a, uint8x8_t __b) -{ - __builtin_neon_vst1v8qi ((__builtin_neon_qi *) __a, (int8x8_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_u16 (uint16_t * __a, uint16x4_t __b) -{ - __builtin_neon_vst1v4hi ((__builtin_neon_hi *) __a, (int16x4_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_u32 (uint32_t * __a, uint32x2_t __b) -{ - __builtin_neon_vst1v2si ((__builtin_neon_si *) __a, (int32x2_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_u64 (uint64_t * __a, uint64x1_t __b) -{ - __builtin_neon_vst1di ((__builtin_neon_di *) __a, (int64x1_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_p8 (poly8_t * __a, poly8x8_t __b) -{ - __builtin_neon_vst1v8qi ((__builtin_neon_qi *) __a, (int8x8_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_p16 (poly16_t * __a, poly16x4_t __b) -{ - __builtin_neon_vst1v4hi ((__builtin_neon_hi *) __a, (int16x4_t) __b); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_p64 (poly64_t * __a, poly64x2_t __b) -{ - __builtin_neon_vst1v2di ((__builtin_neon_di *) __a, (int64x2_t) __b); -} - -#endif -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_s8 (int8_t * __a, int8x16_t __b) -{ - __builtin_neon_vst1v16qi ((__builtin_neon_qi *) __a, __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_s16 (int16_t * __a, int16x8_t __b) -{ - __builtin_neon_vst1v8hi ((__builtin_neon_hi *) __a, __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_s32 (int32_t * __a, int32x4_t __b) -{ - __builtin_neon_vst1v4si ((__builtin_neon_si *) __a, __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_s64 (int64_t * __a, int64x2_t __b) -{ - __builtin_neon_vst1v2di ((__builtin_neon_di *) __a, __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_f32 (float32_t * __a, float32x4_t __b) -{ - __builtin_neon_vst1v4sf ((__builtin_neon_sf *) __a, __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_u8 (uint8_t * __a, uint8x16_t __b) -{ - __builtin_neon_vst1v16qi ((__builtin_neon_qi *) __a, (int8x16_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_u16 (uint16_t * __a, uint16x8_t __b) -{ - __builtin_neon_vst1v8hi ((__builtin_neon_hi *) __a, (int16x8_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_u32 (uint32_t * __a, uint32x4_t __b) -{ - __builtin_neon_vst1v4si ((__builtin_neon_si *) __a, (int32x4_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_u64 (uint64_t * __a, uint64x2_t __b) -{ - __builtin_neon_vst1v2di ((__builtin_neon_di *) __a, (int64x2_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_p8 (poly8_t * __a, poly8x16_t __b) -{ - __builtin_neon_vst1v16qi ((__builtin_neon_qi *) __a, (int8x16_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_p16 (poly16_t * __a, poly16x8_t __b) -{ - __builtin_neon_vst1v8hi ((__builtin_neon_hi *) __a, (int16x8_t) __b); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_s8 (int8_t * __a, int8x8_t __b, const int __c) -{ - __builtin_neon_vst1_lanev8qi ((__builtin_neon_qi *) __a, __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_s16 (int16_t * __a, int16x4_t __b, const int __c) -{ - __builtin_neon_vst1_lanev4hi ((__builtin_neon_hi *) __a, __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_s32 (int32_t * __a, int32x2_t __b, const int __c) -{ - __builtin_neon_vst1_lanev2si ((__builtin_neon_si *) __a, __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_f32 (float32_t * __a, float32x2_t __b, const int __c) -{ - __builtin_neon_vst1_lanev2sf ((__builtin_neon_sf *) __a, __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_u8 (uint8_t * __a, uint8x8_t __b, const int __c) -{ - __builtin_neon_vst1_lanev8qi ((__builtin_neon_qi *) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_u16 (uint16_t * __a, uint16x4_t __b, const int __c) -{ - __builtin_neon_vst1_lanev4hi ((__builtin_neon_hi *) __a, (int16x4_t) __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_u32 (uint32_t * __a, uint32x2_t __b, const int __c) -{ - __builtin_neon_vst1_lanev2si ((__builtin_neon_si *) __a, (int32x2_t) __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_p8 (poly8_t * __a, poly8x8_t __b, const int __c) -{ - __builtin_neon_vst1_lanev8qi ((__builtin_neon_qi *) __a, (int8x8_t) __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_p16 (poly16_t * __a, poly16x4_t __b, const int __c) -{ - __builtin_neon_vst1_lanev4hi ((__builtin_neon_hi *) __a, (int16x4_t) __b, __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_p64 (poly64_t * __a, poly64x1_t __b, const int __c) -{ - __builtin_neon_vst1_lanedi ((__builtin_neon_di *) __a, __b, __c); -} - -#endif -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_s64 (int64_t * __a, int64x1_t __b, const int __c) -{ - __builtin_neon_vst1_lanedi ((__builtin_neon_di *) __a, __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1_lane_u64 (uint64_t * __a, uint64x1_t __b, const int __c) -{ - __builtin_neon_vst1_lanedi ((__builtin_neon_di *) __a, (int64x1_t) __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_s8 (int8_t * __a, int8x16_t __b, const int __c) -{ - __builtin_neon_vst1_lanev16qi ((__builtin_neon_qi *) __a, __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_s16 (int16_t * __a, int16x8_t __b, const int __c) -{ - __builtin_neon_vst1_lanev8hi ((__builtin_neon_hi *) __a, __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_s32 (int32_t * __a, int32x4_t __b, const int __c) -{ - __builtin_neon_vst1_lanev4si ((__builtin_neon_si *) __a, __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_f32 (float32_t * __a, float32x4_t __b, const int __c) -{ - __builtin_neon_vst1_lanev4sf ((__builtin_neon_sf *) __a, __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_u8 (uint8_t * __a, uint8x16_t __b, const int __c) -{ - __builtin_neon_vst1_lanev16qi ((__builtin_neon_qi *) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_u16 (uint16_t * __a, uint16x8_t __b, const int __c) -{ - __builtin_neon_vst1_lanev8hi ((__builtin_neon_hi *) __a, (int16x8_t) __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_u32 (uint32_t * __a, uint32x4_t __b, const int __c) -{ - __builtin_neon_vst1_lanev4si ((__builtin_neon_si *) __a, (int32x4_t) __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_p8 (poly8_t * __a, poly8x16_t __b, const int __c) -{ - __builtin_neon_vst1_lanev16qi ((__builtin_neon_qi *) __a, (int8x16_t) __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_p16 (poly16_t * __a, poly16x8_t __b, const int __c) -{ - __builtin_neon_vst1_lanev8hi ((__builtin_neon_hi *) __a, (int16x8_t) __b, __c); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_p64 (poly64_t * __a, poly64x2_t __b, const int __c) -{ - __builtin_neon_vst1_lanev2di ((__builtin_neon_di *) __a, (int64x2_t) __b, __c); -} - -#endif -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_s64 (int64_t * __a, int64x2_t __b, const int __c) -{ - __builtin_neon_vst1_lanev2di ((__builtin_neon_di *) __a, __b, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst1q_lane_u64 (uint64_t * __a, uint64x2_t __b, const int __c) -{ - __builtin_neon_vst1_lanev2di ((__builtin_neon_di *) __a, (int64x2_t) __b, __c); -} - -__extension__ static __inline int8x8x2_t __attribute__ ((__always_inline__)) -vld2_s8 (const int8_t * __a) -{ - union { int8x8x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2v8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline int16x4x2_t __attribute__ ((__always_inline__)) -vld2_s16 (const int16_t * __a) -{ - union { int16x4x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2v4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int32x2x2_t __attribute__ ((__always_inline__)) -vld2_s32 (const int32_t * __a) -{ - union { int32x2x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2v2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline float32x2x2_t __attribute__ ((__always_inline__)) -vld2_f32 (const float32_t * __a) -{ - union { float32x2x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2v2sf ((const __builtin_neon_sf *) __a); - return __rv.__i; -} - -__extension__ static __inline uint8x8x2_t __attribute__ ((__always_inline__)) -vld2_u8 (const uint8_t * __a) -{ - union { uint8x8x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2v8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint16x4x2_t __attribute__ ((__always_inline__)) -vld2_u16 (const uint16_t * __a) -{ - union { uint16x4x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2v4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint32x2x2_t __attribute__ ((__always_inline__)) -vld2_u32 (const uint32_t * __a) -{ - union { uint32x2x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2v2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline poly8x8x2_t __attribute__ ((__always_inline__)) -vld2_p8 (const poly8_t * __a) -{ - union { poly8x8x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2v8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline poly16x4x2_t __attribute__ ((__always_inline__)) -vld2_p16 (const poly16_t * __a) -{ - union { poly16x4x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2v4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1x2_t __attribute__ ((__always_inline__)) -vld2_p64 (const poly64_t * __a) -{ - union { poly64x1x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2di ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -#endif -__extension__ static __inline int64x1x2_t __attribute__ ((__always_inline__)) -vld2_s64 (const int64_t * __a) -{ - union { int64x1x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2di ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline uint64x1x2_t __attribute__ ((__always_inline__)) -vld2_u64 (const uint64_t * __a) -{ - union { uint64x1x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2di ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline int8x16x2_t __attribute__ ((__always_inline__)) -vld2q_s8 (const int8_t * __a) -{ - union { int8x16x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2v16qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline int16x8x2_t __attribute__ ((__always_inline__)) -vld2q_s16 (const int16_t * __a) -{ - union { int16x8x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2v8hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int32x4x2_t __attribute__ ((__always_inline__)) -vld2q_s32 (const int32_t * __a) -{ - union { int32x4x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2v4si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline float32x4x2_t __attribute__ ((__always_inline__)) -vld2q_f32 (const float32_t * __a) -{ - union { float32x4x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2v4sf ((const __builtin_neon_sf *) __a); - return __rv.__i; -} - -__extension__ static __inline uint8x16x2_t __attribute__ ((__always_inline__)) -vld2q_u8 (const uint8_t * __a) -{ - union { uint8x16x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2v16qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint16x8x2_t __attribute__ ((__always_inline__)) -vld2q_u16 (const uint16_t * __a) -{ - union { uint16x8x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2v8hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint32x4x2_t __attribute__ ((__always_inline__)) -vld2q_u32 (const uint32_t * __a) -{ - union { uint32x4x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2v4si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline poly8x16x2_t __attribute__ ((__always_inline__)) -vld2q_p8 (const poly8_t * __a) -{ - union { poly8x16x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2v16qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline poly16x8x2_t __attribute__ ((__always_inline__)) -vld2q_p16 (const poly16_t * __a) -{ - union { poly16x8x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2v8hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int8x8x2_t __attribute__ ((__always_inline__)) -vld2_lane_s8 (const int8_t * __a, int8x8x2_t __b, const int __c) -{ - union { int8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - union { int8x8x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int16x4x2_t __attribute__ ((__always_inline__)) -vld2_lane_s16 (const int16_t * __a, int16x4x2_t __b, const int __c) -{ - union { int16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - union { int16x4x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int32x2x2_t __attribute__ ((__always_inline__)) -vld2_lane_s32 (const int32_t * __a, int32x2x2_t __b, const int __c) -{ - union { int32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - union { int32x2x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline float32x2x2_t __attribute__ ((__always_inline__)) -vld2_lane_f32 (const float32_t * __a, float32x2x2_t __b, const int __c) -{ - union { float32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - union { float32x2x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev2sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint8x8x2_t __attribute__ ((__always_inline__)) -vld2_lane_u8 (const uint8_t * __a, uint8x8x2_t __b, const int __c) -{ - union { uint8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - union { uint8x8x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint16x4x2_t __attribute__ ((__always_inline__)) -vld2_lane_u16 (const uint16_t * __a, uint16x4x2_t __b, const int __c) -{ - union { uint16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - union { uint16x4x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint32x2x2_t __attribute__ ((__always_inline__)) -vld2_lane_u32 (const uint32_t * __a, uint32x2x2_t __b, const int __c) -{ - union { uint32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - union { uint32x2x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline poly8x8x2_t __attribute__ ((__always_inline__)) -vld2_lane_p8 (const poly8_t * __a, poly8x8x2_t __b, const int __c) -{ - union { poly8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - union { poly8x8x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline poly16x4x2_t __attribute__ ((__always_inline__)) -vld2_lane_p16 (const poly16_t * __a, poly16x4x2_t __b, const int __c) -{ - union { poly16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - union { poly16x4x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int16x8x2_t __attribute__ ((__always_inline__)) -vld2q_lane_s16 (const int16_t * __a, int16x8x2_t __b, const int __c) -{ - union { int16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { int16x8x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int32x4x2_t __attribute__ ((__always_inline__)) -vld2q_lane_s32 (const int32_t * __a, int32x4x2_t __b, const int __c) -{ - union { int32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { int32x4x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline float32x4x2_t __attribute__ ((__always_inline__)) -vld2q_lane_f32 (const float32_t * __a, float32x4x2_t __b, const int __c) -{ - union { float32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { float32x4x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev4sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint16x8x2_t __attribute__ ((__always_inline__)) -vld2q_lane_u16 (const uint16_t * __a, uint16x8x2_t __b, const int __c) -{ - union { uint16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { uint16x8x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint32x4x2_t __attribute__ ((__always_inline__)) -vld2q_lane_u32 (const uint32_t * __a, uint32x4x2_t __b, const int __c) -{ - union { uint32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { uint32x4x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline poly16x8x2_t __attribute__ ((__always_inline__)) -vld2q_lane_p16 (const poly16_t * __a, poly16x8x2_t __b, const int __c) -{ - union { poly16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { poly16x8x2_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld2_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int8x8x2_t __attribute__ ((__always_inline__)) -vld2_dup_s8 (const int8_t * __a) -{ - union { int8x8x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupv8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline int16x4x2_t __attribute__ ((__always_inline__)) -vld2_dup_s16 (const int16_t * __a) -{ - union { int16x4x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupv4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int32x2x2_t __attribute__ ((__always_inline__)) -vld2_dup_s32 (const int32_t * __a) -{ - union { int32x2x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupv2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline float32x2x2_t __attribute__ ((__always_inline__)) -vld2_dup_f32 (const float32_t * __a) -{ - union { float32x2x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupv2sf ((const __builtin_neon_sf *) __a); - return __rv.__i; -} - -__extension__ static __inline uint8x8x2_t __attribute__ ((__always_inline__)) -vld2_dup_u8 (const uint8_t * __a) -{ - union { uint8x8x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupv8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint16x4x2_t __attribute__ ((__always_inline__)) -vld2_dup_u16 (const uint16_t * __a) -{ - union { uint16x4x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupv4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint32x2x2_t __attribute__ ((__always_inline__)) -vld2_dup_u32 (const uint32_t * __a) -{ - union { uint32x2x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupv2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline poly8x8x2_t __attribute__ ((__always_inline__)) -vld2_dup_p8 (const poly8_t * __a) -{ - union { poly8x8x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupv8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline poly16x4x2_t __attribute__ ((__always_inline__)) -vld2_dup_p16 (const poly16_t * __a) -{ - union { poly16x4x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupv4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1x2_t __attribute__ ((__always_inline__)) -vld2_dup_p64 (const poly64_t * __a) -{ - union { poly64x1x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupdi ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -#endif -__extension__ static __inline int64x1x2_t __attribute__ ((__always_inline__)) -vld2_dup_s64 (const int64_t * __a) -{ - union { int64x1x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupdi ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline uint64x1x2_t __attribute__ ((__always_inline__)) -vld2_dup_u64 (const uint64_t * __a) -{ - union { uint64x1x2_t __i; __builtin_neon_ti __o; } __rv; - __rv.__o = __builtin_neon_vld2_dupdi ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_s8 (int8_t * __a, int8x8x2_t __b) -{ - union { int8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2v8qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_s16 (int16_t * __a, int16x4x2_t __b) -{ - union { int16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2v4hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_s32 (int32_t * __a, int32x2x2_t __b) -{ - union { int32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2v2si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_f32 (float32_t * __a, float32x2x2_t __b) -{ - union { float32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2v2sf ((__builtin_neon_sf *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_u8 (uint8_t * __a, uint8x8x2_t __b) -{ - union { uint8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2v8qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_u16 (uint16_t * __a, uint16x4x2_t __b) -{ - union { uint16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2v4hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_u32 (uint32_t * __a, uint32x2x2_t __b) -{ - union { uint32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2v2si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_p8 (poly8_t * __a, poly8x8x2_t __b) -{ - union { poly8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2v8qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_p16 (poly16_t * __a, poly16x4x2_t __b) -{ - union { poly16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2v4hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_p64 (poly64_t * __a, poly64x1x2_t __b) -{ - union { poly64x1x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2di ((__builtin_neon_di *) __a, __bu.__o); -} - -#endif -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_s64 (int64_t * __a, int64x1x2_t __b) -{ - union { int64x1x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2di ((__builtin_neon_di *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_u64 (uint64_t * __a, uint64x1x2_t __b) -{ - union { uint64x1x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2di ((__builtin_neon_di *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_s8 (int8_t * __a, int8x16x2_t __b) -{ - union { int8x16x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2v16qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_s16 (int16_t * __a, int16x8x2_t __b) -{ - union { int16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2v8hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_s32 (int32_t * __a, int32x4x2_t __b) -{ - union { int32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2v4si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_f32 (float32_t * __a, float32x4x2_t __b) -{ - union { float32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2v4sf ((__builtin_neon_sf *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_u8 (uint8_t * __a, uint8x16x2_t __b) -{ - union { uint8x16x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2v16qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_u16 (uint16_t * __a, uint16x8x2_t __b) -{ - union { uint16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2v8hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_u32 (uint32_t * __a, uint32x4x2_t __b) -{ - union { uint32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2v4si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_p8 (poly8_t * __a, poly8x16x2_t __b) -{ - union { poly8x16x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2v16qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_p16 (poly16_t * __a, poly16x8x2_t __b) -{ - union { poly16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2v8hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_lane_s8 (int8_t * __a, int8x8x2_t __b, const int __c) -{ - union { int8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_lane_s16 (int16_t * __a, int16x4x2_t __b, const int __c) -{ - union { int16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_lane_s32 (int32_t * __a, int32x2x2_t __b, const int __c) -{ - union { int32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_lane_f32 (float32_t * __a, float32x2x2_t __b, const int __c) -{ - union { float32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2_lanev2sf ((__builtin_neon_sf *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_lane_u8 (uint8_t * __a, uint8x8x2_t __b, const int __c) -{ - union { uint8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_lane_u16 (uint16_t * __a, uint16x4x2_t __b, const int __c) -{ - union { uint16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_lane_u32 (uint32_t * __a, uint32x2x2_t __b, const int __c) -{ - union { uint32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_lane_p8 (poly8_t * __a, poly8x8x2_t __b, const int __c) -{ - union { poly8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2_lane_p16 (poly16_t * __a, poly16x4x2_t __b, const int __c) -{ - union { poly16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; - __builtin_neon_vst2_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_lane_s16 (int16_t * __a, int16x8x2_t __b, const int __c) -{ - union { int16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_lane_s32 (int32_t * __a, int32x4x2_t __b, const int __c) -{ - union { int32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_lane_f32 (float32_t * __a, float32x4x2_t __b, const int __c) -{ - union { float32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2_lanev4sf ((__builtin_neon_sf *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_lane_u16 (uint16_t * __a, uint16x8x2_t __b, const int __c) -{ - union { uint16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_lane_u32 (uint32_t * __a, uint32x4x2_t __b, const int __c) -{ - union { uint32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst2q_lane_p16 (poly16_t * __a, poly16x8x2_t __b, const int __c) -{ - union { poly16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst2_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline int8x8x3_t __attribute__ ((__always_inline__)) -vld3_s8 (const int8_t * __a) -{ - union { int8x8x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3v8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline int16x4x3_t __attribute__ ((__always_inline__)) -vld3_s16 (const int16_t * __a) -{ - union { int16x4x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3v4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int32x2x3_t __attribute__ ((__always_inline__)) -vld3_s32 (const int32_t * __a) -{ - union { int32x2x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3v2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline float32x2x3_t __attribute__ ((__always_inline__)) -vld3_f32 (const float32_t * __a) -{ - union { float32x2x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3v2sf ((const __builtin_neon_sf *) __a); - return __rv.__i; -} - -__extension__ static __inline uint8x8x3_t __attribute__ ((__always_inline__)) -vld3_u8 (const uint8_t * __a) -{ - union { uint8x8x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3v8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint16x4x3_t __attribute__ ((__always_inline__)) -vld3_u16 (const uint16_t * __a) -{ - union { uint16x4x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3v4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint32x2x3_t __attribute__ ((__always_inline__)) -vld3_u32 (const uint32_t * __a) -{ - union { uint32x2x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3v2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline poly8x8x3_t __attribute__ ((__always_inline__)) -vld3_p8 (const poly8_t * __a) -{ - union { poly8x8x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3v8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline poly16x4x3_t __attribute__ ((__always_inline__)) -vld3_p16 (const poly16_t * __a) -{ - union { poly16x4x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3v4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1x3_t __attribute__ ((__always_inline__)) -vld3_p64 (const poly64_t * __a) -{ - union { poly64x1x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3di ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -#endif -__extension__ static __inline int64x1x3_t __attribute__ ((__always_inline__)) -vld3_s64 (const int64_t * __a) -{ - union { int64x1x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3di ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline uint64x1x3_t __attribute__ ((__always_inline__)) -vld3_u64 (const uint64_t * __a) -{ - union { uint64x1x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3di ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline int8x16x3_t __attribute__ ((__always_inline__)) -vld3q_s8 (const int8_t * __a) -{ - union { int8x16x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3v16qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline int16x8x3_t __attribute__ ((__always_inline__)) -vld3q_s16 (const int16_t * __a) -{ - union { int16x8x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3v8hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int32x4x3_t __attribute__ ((__always_inline__)) -vld3q_s32 (const int32_t * __a) -{ - union { int32x4x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3v4si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline float32x4x3_t __attribute__ ((__always_inline__)) -vld3q_f32 (const float32_t * __a) -{ - union { float32x4x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3v4sf ((const __builtin_neon_sf *) __a); - return __rv.__i; -} - -__extension__ static __inline uint8x16x3_t __attribute__ ((__always_inline__)) -vld3q_u8 (const uint8_t * __a) -{ - union { uint8x16x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3v16qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint16x8x3_t __attribute__ ((__always_inline__)) -vld3q_u16 (const uint16_t * __a) -{ - union { uint16x8x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3v8hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint32x4x3_t __attribute__ ((__always_inline__)) -vld3q_u32 (const uint32_t * __a) -{ - union { uint32x4x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3v4si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline poly8x16x3_t __attribute__ ((__always_inline__)) -vld3q_p8 (const poly8_t * __a) -{ - union { poly8x16x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3v16qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline poly16x8x3_t __attribute__ ((__always_inline__)) -vld3q_p16 (const poly16_t * __a) -{ - union { poly16x8x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3v8hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int8x8x3_t __attribute__ ((__always_inline__)) -vld3_lane_s8 (const int8_t * __a, int8x8x3_t __b, const int __c) -{ - union { int8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - union { int8x8x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int16x4x3_t __attribute__ ((__always_inline__)) -vld3_lane_s16 (const int16_t * __a, int16x4x3_t __b, const int __c) -{ - union { int16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - union { int16x4x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int32x2x3_t __attribute__ ((__always_inline__)) -vld3_lane_s32 (const int32_t * __a, int32x2x3_t __b, const int __c) -{ - union { int32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - union { int32x2x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline float32x2x3_t __attribute__ ((__always_inline__)) -vld3_lane_f32 (const float32_t * __a, float32x2x3_t __b, const int __c) -{ - union { float32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - union { float32x2x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev2sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint8x8x3_t __attribute__ ((__always_inline__)) -vld3_lane_u8 (const uint8_t * __a, uint8x8x3_t __b, const int __c) -{ - union { uint8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - union { uint8x8x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint16x4x3_t __attribute__ ((__always_inline__)) -vld3_lane_u16 (const uint16_t * __a, uint16x4x3_t __b, const int __c) -{ - union { uint16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - union { uint16x4x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint32x2x3_t __attribute__ ((__always_inline__)) -vld3_lane_u32 (const uint32_t * __a, uint32x2x3_t __b, const int __c) -{ - union { uint32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - union { uint32x2x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline poly8x8x3_t __attribute__ ((__always_inline__)) -vld3_lane_p8 (const poly8_t * __a, poly8x8x3_t __b, const int __c) -{ - union { poly8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - union { poly8x8x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline poly16x4x3_t __attribute__ ((__always_inline__)) -vld3_lane_p16 (const poly16_t * __a, poly16x4x3_t __b, const int __c) -{ - union { poly16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - union { poly16x4x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int16x8x3_t __attribute__ ((__always_inline__)) -vld3q_lane_s16 (const int16_t * __a, int16x8x3_t __b, const int __c) -{ - union { int16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - union { int16x8x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int32x4x3_t __attribute__ ((__always_inline__)) -vld3q_lane_s32 (const int32_t * __a, int32x4x3_t __b, const int __c) -{ - union { int32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - union { int32x4x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline float32x4x3_t __attribute__ ((__always_inline__)) -vld3q_lane_f32 (const float32_t * __a, float32x4x3_t __b, const int __c) -{ - union { float32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - union { float32x4x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev4sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint16x8x3_t __attribute__ ((__always_inline__)) -vld3q_lane_u16 (const uint16_t * __a, uint16x8x3_t __b, const int __c) -{ - union { uint16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - union { uint16x8x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint32x4x3_t __attribute__ ((__always_inline__)) -vld3q_lane_u32 (const uint32_t * __a, uint32x4x3_t __b, const int __c) -{ - union { uint32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - union { uint32x4x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline poly16x8x3_t __attribute__ ((__always_inline__)) -vld3q_lane_p16 (const poly16_t * __a, poly16x8x3_t __b, const int __c) -{ - union { poly16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - union { poly16x8x3_t __i; __builtin_neon_ci __o; } __rv; - __rv.__o = __builtin_neon_vld3_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int8x8x3_t __attribute__ ((__always_inline__)) -vld3_dup_s8 (const int8_t * __a) -{ - union { int8x8x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupv8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline int16x4x3_t __attribute__ ((__always_inline__)) -vld3_dup_s16 (const int16_t * __a) -{ - union { int16x4x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupv4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int32x2x3_t __attribute__ ((__always_inline__)) -vld3_dup_s32 (const int32_t * __a) -{ - union { int32x2x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupv2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline float32x2x3_t __attribute__ ((__always_inline__)) -vld3_dup_f32 (const float32_t * __a) -{ - union { float32x2x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupv2sf ((const __builtin_neon_sf *) __a); - return __rv.__i; -} - -__extension__ static __inline uint8x8x3_t __attribute__ ((__always_inline__)) -vld3_dup_u8 (const uint8_t * __a) -{ - union { uint8x8x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupv8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint16x4x3_t __attribute__ ((__always_inline__)) -vld3_dup_u16 (const uint16_t * __a) -{ - union { uint16x4x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupv4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint32x2x3_t __attribute__ ((__always_inline__)) -vld3_dup_u32 (const uint32_t * __a) -{ - union { uint32x2x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupv2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline poly8x8x3_t __attribute__ ((__always_inline__)) -vld3_dup_p8 (const poly8_t * __a) -{ - union { poly8x8x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupv8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline poly16x4x3_t __attribute__ ((__always_inline__)) -vld3_dup_p16 (const poly16_t * __a) -{ - union { poly16x4x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupv4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1x3_t __attribute__ ((__always_inline__)) -vld3_dup_p64 (const poly64_t * __a) -{ - union { poly64x1x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupdi ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -#endif -__extension__ static __inline int64x1x3_t __attribute__ ((__always_inline__)) -vld3_dup_s64 (const int64_t * __a) -{ - union { int64x1x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupdi ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline uint64x1x3_t __attribute__ ((__always_inline__)) -vld3_dup_u64 (const uint64_t * __a) -{ - union { uint64x1x3_t __i; __builtin_neon_ei __o; } __rv; - __rv.__o = __builtin_neon_vld3_dupdi ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_s8 (int8_t * __a, int8x8x3_t __b) -{ - union { int8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3v8qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_s16 (int16_t * __a, int16x4x3_t __b) -{ - union { int16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3v4hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_s32 (int32_t * __a, int32x2x3_t __b) -{ - union { int32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3v2si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_f32 (float32_t * __a, float32x2x3_t __b) -{ - union { float32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3v2sf ((__builtin_neon_sf *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_u8 (uint8_t * __a, uint8x8x3_t __b) -{ - union { uint8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3v8qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_u16 (uint16_t * __a, uint16x4x3_t __b) -{ - union { uint16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3v4hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_u32 (uint32_t * __a, uint32x2x3_t __b) -{ - union { uint32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3v2si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_p8 (poly8_t * __a, poly8x8x3_t __b) -{ - union { poly8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3v8qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_p16 (poly16_t * __a, poly16x4x3_t __b) -{ - union { poly16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3v4hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_p64 (poly64_t * __a, poly64x1x3_t __b) -{ - union { poly64x1x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3di ((__builtin_neon_di *) __a, __bu.__o); -} - -#endif -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_s64 (int64_t * __a, int64x1x3_t __b) -{ - union { int64x1x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3di ((__builtin_neon_di *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_u64 (uint64_t * __a, uint64x1x3_t __b) -{ - union { uint64x1x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3di ((__builtin_neon_di *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_s8 (int8_t * __a, int8x16x3_t __b) -{ - union { int8x16x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3v16qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_s16 (int16_t * __a, int16x8x3_t __b) -{ - union { int16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3v8hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_s32 (int32_t * __a, int32x4x3_t __b) -{ - union { int32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3v4si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_f32 (float32_t * __a, float32x4x3_t __b) -{ - union { float32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3v4sf ((__builtin_neon_sf *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_u8 (uint8_t * __a, uint8x16x3_t __b) -{ - union { uint8x16x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3v16qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_u16 (uint16_t * __a, uint16x8x3_t __b) -{ - union { uint16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3v8hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_u32 (uint32_t * __a, uint32x4x3_t __b) -{ - union { uint32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3v4si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_p8 (poly8_t * __a, poly8x16x3_t __b) -{ - union { poly8x16x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3v16qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_p16 (poly16_t * __a, poly16x8x3_t __b) -{ - union { poly16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3v8hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_lane_s8 (int8_t * __a, int8x8x3_t __b, const int __c) -{ - union { int8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_lane_s16 (int16_t * __a, int16x4x3_t __b, const int __c) -{ - union { int16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_lane_s32 (int32_t * __a, int32x2x3_t __b, const int __c) -{ - union { int32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_lane_f32 (float32_t * __a, float32x2x3_t __b, const int __c) -{ - union { float32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3_lanev2sf ((__builtin_neon_sf *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_lane_u8 (uint8_t * __a, uint8x8x3_t __b, const int __c) -{ - union { uint8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_lane_u16 (uint16_t * __a, uint16x4x3_t __b, const int __c) -{ - union { uint16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_lane_u32 (uint32_t * __a, uint32x2x3_t __b, const int __c) -{ - union { uint32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_lane_p8 (poly8_t * __a, poly8x8x3_t __b, const int __c) -{ - union { poly8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3_lane_p16 (poly16_t * __a, poly16x4x3_t __b, const int __c) -{ - union { poly16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; - __builtin_neon_vst3_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_lane_s16 (int16_t * __a, int16x8x3_t __b, const int __c) -{ - union { int16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_lane_s32 (int32_t * __a, int32x4x3_t __b, const int __c) -{ - union { int32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_lane_f32 (float32_t * __a, float32x4x3_t __b, const int __c) -{ - union { float32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3_lanev4sf ((__builtin_neon_sf *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_lane_u16 (uint16_t * __a, uint16x8x3_t __b, const int __c) -{ - union { uint16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_lane_u32 (uint32_t * __a, uint32x4x3_t __b, const int __c) -{ - union { uint32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst3q_lane_p16 (poly16_t * __a, poly16x8x3_t __b, const int __c) -{ - union { poly16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; - __builtin_neon_vst3_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline int8x8x4_t __attribute__ ((__always_inline__)) -vld4_s8 (const int8_t * __a) -{ - union { int8x8x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4v8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline int16x4x4_t __attribute__ ((__always_inline__)) -vld4_s16 (const int16_t * __a) -{ - union { int16x4x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4v4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int32x2x4_t __attribute__ ((__always_inline__)) -vld4_s32 (const int32_t * __a) -{ - union { int32x2x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4v2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline float32x2x4_t __attribute__ ((__always_inline__)) -vld4_f32 (const float32_t * __a) -{ - union { float32x2x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4v2sf ((const __builtin_neon_sf *) __a); - return __rv.__i; -} - -__extension__ static __inline uint8x8x4_t __attribute__ ((__always_inline__)) -vld4_u8 (const uint8_t * __a) -{ - union { uint8x8x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4v8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint16x4x4_t __attribute__ ((__always_inline__)) -vld4_u16 (const uint16_t * __a) -{ - union { uint16x4x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4v4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint32x2x4_t __attribute__ ((__always_inline__)) -vld4_u32 (const uint32_t * __a) -{ - union { uint32x2x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4v2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline poly8x8x4_t __attribute__ ((__always_inline__)) -vld4_p8 (const poly8_t * __a) -{ - union { poly8x8x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4v8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline poly16x4x4_t __attribute__ ((__always_inline__)) -vld4_p16 (const poly16_t * __a) -{ - union { poly16x4x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4v4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1x4_t __attribute__ ((__always_inline__)) -vld4_p64 (const poly64_t * __a) -{ - union { poly64x1x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4di ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -#endif -__extension__ static __inline int64x1x4_t __attribute__ ((__always_inline__)) -vld4_s64 (const int64_t * __a) -{ - union { int64x1x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4di ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline uint64x1x4_t __attribute__ ((__always_inline__)) -vld4_u64 (const uint64_t * __a) -{ - union { uint64x1x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4di ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline int8x16x4_t __attribute__ ((__always_inline__)) -vld4q_s8 (const int8_t * __a) -{ - union { int8x16x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4v16qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline int16x8x4_t __attribute__ ((__always_inline__)) -vld4q_s16 (const int16_t * __a) -{ - union { int16x8x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4v8hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int32x4x4_t __attribute__ ((__always_inline__)) -vld4q_s32 (const int32_t * __a) -{ - union { int32x4x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4v4si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline float32x4x4_t __attribute__ ((__always_inline__)) -vld4q_f32 (const float32_t * __a) -{ - union { float32x4x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4v4sf ((const __builtin_neon_sf *) __a); - return __rv.__i; -} - -__extension__ static __inline uint8x16x4_t __attribute__ ((__always_inline__)) -vld4q_u8 (const uint8_t * __a) -{ - union { uint8x16x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4v16qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint16x8x4_t __attribute__ ((__always_inline__)) -vld4q_u16 (const uint16_t * __a) -{ - union { uint16x8x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4v8hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint32x4x4_t __attribute__ ((__always_inline__)) -vld4q_u32 (const uint32_t * __a) -{ - union { uint32x4x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4v4si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline poly8x16x4_t __attribute__ ((__always_inline__)) -vld4q_p8 (const poly8_t * __a) -{ - union { poly8x16x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4v16qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline poly16x8x4_t __attribute__ ((__always_inline__)) -vld4q_p16 (const poly16_t * __a) -{ - union { poly16x8x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4v8hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int8x8x4_t __attribute__ ((__always_inline__)) -vld4_lane_s8 (const int8_t * __a, int8x8x4_t __b, const int __c) -{ - union { int8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { int8x8x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int16x4x4_t __attribute__ ((__always_inline__)) -vld4_lane_s16 (const int16_t * __a, int16x4x4_t __b, const int __c) -{ - union { int16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { int16x4x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int32x2x4_t __attribute__ ((__always_inline__)) -vld4_lane_s32 (const int32_t * __a, int32x2x4_t __b, const int __c) -{ - union { int32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { int32x2x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline float32x2x4_t __attribute__ ((__always_inline__)) -vld4_lane_f32 (const float32_t * __a, float32x2x4_t __b, const int __c) -{ - union { float32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { float32x2x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev2sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint8x8x4_t __attribute__ ((__always_inline__)) -vld4_lane_u8 (const uint8_t * __a, uint8x8x4_t __b, const int __c) -{ - union { uint8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { uint8x8x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint16x4x4_t __attribute__ ((__always_inline__)) -vld4_lane_u16 (const uint16_t * __a, uint16x4x4_t __b, const int __c) -{ - union { uint16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { uint16x4x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint32x2x4_t __attribute__ ((__always_inline__)) -vld4_lane_u32 (const uint32_t * __a, uint32x2x4_t __b, const int __c) -{ - union { uint32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { uint32x2x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline poly8x8x4_t __attribute__ ((__always_inline__)) -vld4_lane_p8 (const poly8_t * __a, poly8x8x4_t __b, const int __c) -{ - union { poly8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { poly8x8x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline poly16x4x4_t __attribute__ ((__always_inline__)) -vld4_lane_p16 (const poly16_t * __a, poly16x4x4_t __b, const int __c) -{ - union { poly16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - union { poly16x4x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int16x8x4_t __attribute__ ((__always_inline__)) -vld4q_lane_s16 (const int16_t * __a, int16x8x4_t __b, const int __c) -{ - union { int16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - union { int16x8x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int32x4x4_t __attribute__ ((__always_inline__)) -vld4q_lane_s32 (const int32_t * __a, int32x4x4_t __b, const int __c) -{ - union { int32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - union { int32x4x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline float32x4x4_t __attribute__ ((__always_inline__)) -vld4q_lane_f32 (const float32_t * __a, float32x4x4_t __b, const int __c) -{ - union { float32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - union { float32x4x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev4sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint16x8x4_t __attribute__ ((__always_inline__)) -vld4q_lane_u16 (const uint16_t * __a, uint16x8x4_t __b, const int __c) -{ - union { uint16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - union { uint16x8x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline uint32x4x4_t __attribute__ ((__always_inline__)) -vld4q_lane_u32 (const uint32_t * __a, uint32x4x4_t __b, const int __c) -{ - union { uint32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - union { uint32x4x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline poly16x8x4_t __attribute__ ((__always_inline__)) -vld4q_lane_p16 (const poly16_t * __a, poly16x8x4_t __b, const int __c) -{ - union { poly16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - union { poly16x8x4_t __i; __builtin_neon_xi __o; } __rv; - __rv.__o = __builtin_neon_vld4_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); - return __rv.__i; -} - -__extension__ static __inline int8x8x4_t __attribute__ ((__always_inline__)) -vld4_dup_s8 (const int8_t * __a) -{ - union { int8x8x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupv8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline int16x4x4_t __attribute__ ((__always_inline__)) -vld4_dup_s16 (const int16_t * __a) -{ - union { int16x4x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupv4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline int32x2x4_t __attribute__ ((__always_inline__)) -vld4_dup_s32 (const int32_t * __a) -{ - union { int32x2x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupv2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline float32x2x4_t __attribute__ ((__always_inline__)) -vld4_dup_f32 (const float32_t * __a) -{ - union { float32x2x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupv2sf ((const __builtin_neon_sf *) __a); - return __rv.__i; -} - -__extension__ static __inline uint8x8x4_t __attribute__ ((__always_inline__)) -vld4_dup_u8 (const uint8_t * __a) -{ - union { uint8x8x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupv8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint16x4x4_t __attribute__ ((__always_inline__)) -vld4_dup_u16 (const uint16_t * __a) -{ - union { uint16x4x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupv4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -__extension__ static __inline uint32x2x4_t __attribute__ ((__always_inline__)) -vld4_dup_u32 (const uint32_t * __a) -{ - union { uint32x2x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupv2si ((const __builtin_neon_si *) __a); - return __rv.__i; -} - -__extension__ static __inline poly8x8x4_t __attribute__ ((__always_inline__)) -vld4_dup_p8 (const poly8_t * __a) -{ - union { poly8x8x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupv8qi ((const __builtin_neon_qi *) __a); - return __rv.__i; -} - -__extension__ static __inline poly16x4x4_t __attribute__ ((__always_inline__)) -vld4_dup_p16 (const poly16_t * __a) -{ - union { poly16x4x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupv4hi ((const __builtin_neon_hi *) __a); - return __rv.__i; -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1x4_t __attribute__ ((__always_inline__)) -vld4_dup_p64 (const poly64_t * __a) -{ - union { poly64x1x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupdi ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -#endif -__extension__ static __inline int64x1x4_t __attribute__ ((__always_inline__)) -vld4_dup_s64 (const int64_t * __a) -{ - union { int64x1x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupdi ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline uint64x1x4_t __attribute__ ((__always_inline__)) -vld4_dup_u64 (const uint64_t * __a) -{ - union { uint64x1x4_t __i; __builtin_neon_oi __o; } __rv; - __rv.__o = __builtin_neon_vld4_dupdi ((const __builtin_neon_di *) __a); - return __rv.__i; -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_s8 (int8_t * __a, int8x8x4_t __b) -{ - union { int8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4v8qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_s16 (int16_t * __a, int16x4x4_t __b) -{ - union { int16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4v4hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_s32 (int32_t * __a, int32x2x4_t __b) -{ - union { int32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4v2si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_f32 (float32_t * __a, float32x2x4_t __b) -{ - union { float32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4v2sf ((__builtin_neon_sf *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_u8 (uint8_t * __a, uint8x8x4_t __b) -{ - union { uint8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4v8qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_u16 (uint16_t * __a, uint16x4x4_t __b) -{ - union { uint16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4v4hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_u32 (uint32_t * __a, uint32x2x4_t __b) -{ - union { uint32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4v2si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_p8 (poly8_t * __a, poly8x8x4_t __b) -{ - union { poly8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4v8qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_p16 (poly16_t * __a, poly16x4x4_t __b) -{ - union { poly16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4v4hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_p64 (poly64_t * __a, poly64x1x4_t __b) -{ - union { poly64x1x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4di ((__builtin_neon_di *) __a, __bu.__o); -} - -#endif -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_s64 (int64_t * __a, int64x1x4_t __b) -{ - union { int64x1x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4di ((__builtin_neon_di *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_u64 (uint64_t * __a, uint64x1x4_t __b) -{ - union { uint64x1x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4di ((__builtin_neon_di *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_s8 (int8_t * __a, int8x16x4_t __b) -{ - union { int8x16x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4v16qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_s16 (int16_t * __a, int16x8x4_t __b) -{ - union { int16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4v8hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_s32 (int32_t * __a, int32x4x4_t __b) -{ - union { int32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4v4si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_f32 (float32_t * __a, float32x4x4_t __b) -{ - union { float32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4v4sf ((__builtin_neon_sf *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_u8 (uint8_t * __a, uint8x16x4_t __b) -{ - union { uint8x16x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4v16qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_u16 (uint16_t * __a, uint16x8x4_t __b) -{ - union { uint16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4v8hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_u32 (uint32_t * __a, uint32x4x4_t __b) -{ - union { uint32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4v4si ((__builtin_neon_si *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_p8 (poly8_t * __a, poly8x16x4_t __b) -{ - union { poly8x16x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4v16qi ((__builtin_neon_qi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_p16 (poly16_t * __a, poly16x8x4_t __b) -{ - union { poly16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4v8hi ((__builtin_neon_hi *) __a, __bu.__o); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_lane_s8 (int8_t * __a, int8x8x4_t __b, const int __c) -{ - union { int8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_lane_s16 (int16_t * __a, int16x4x4_t __b, const int __c) -{ - union { int16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_lane_s32 (int32_t * __a, int32x2x4_t __b, const int __c) -{ - union { int32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_lane_f32 (float32_t * __a, float32x2x4_t __b, const int __c) -{ - union { float32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev2sf ((__builtin_neon_sf *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_lane_u8 (uint8_t * __a, uint8x8x4_t __b, const int __c) -{ - union { uint8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_lane_u16 (uint16_t * __a, uint16x4x4_t __b, const int __c) -{ - union { uint16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_lane_u32 (uint32_t * __a, uint32x2x4_t __b, const int __c) -{ - union { uint32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_lane_p8 (poly8_t * __a, poly8x8x4_t __b, const int __c) -{ - union { poly8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4_lane_p16 (poly16_t * __a, poly16x4x4_t __b, const int __c) -{ - union { poly16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_lane_s16 (int16_t * __a, int16x8x4_t __b, const int __c) -{ - union { int16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_lane_s32 (int32_t * __a, int32x4x4_t __b, const int __c) -{ - union { int32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_lane_f32 (float32_t * __a, float32x4x4_t __b, const int __c) -{ - union { float32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev4sf ((__builtin_neon_sf *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_lane_u16 (uint16_t * __a, uint16x8x4_t __b, const int __c) -{ - union { uint16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_lane_u32 (uint32_t * __a, uint32x4x4_t __b, const int __c) -{ - union { uint32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vst4q_lane_p16 (poly16_t * __a, poly16x8x4_t __b, const int __c) -{ - union { poly16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; - __builtin_neon_vst4_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vand_s8 (int8x8_t __a, int8x8_t __b) -{ - return __a & __b; -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vand_s16 (int16x4_t __a, int16x4_t __b) -{ - return __a & __b; -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vand_s32 (int32x2_t __a, int32x2_t __b) -{ - return __a & __b; -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vand_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return __a & __b; -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vand_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return __a & __b; -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vand_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return __a & __b; -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vand_s64 (int64x1_t __a, int64x1_t __b) -{ - return __a & __b; -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vand_u64 (uint64x1_t __a, uint64x1_t __b) -{ - return __a & __b; -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vandq_s8 (int8x16_t __a, int8x16_t __b) -{ - return __a & __b; -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vandq_s16 (int16x8_t __a, int16x8_t __b) -{ - return __a & __b; -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vandq_s32 (int32x4_t __a, int32x4_t __b) -{ - return __a & __b; -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vandq_s64 (int64x2_t __a, int64x2_t __b) -{ - return __a & __b; -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vandq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return __a & __b; -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vandq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return __a & __b; -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vandq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return __a & __b; -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vandq_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return __a & __b; -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vorr_s8 (int8x8_t __a, int8x8_t __b) -{ - return __a | __b; -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vorr_s16 (int16x4_t __a, int16x4_t __b) -{ - return __a | __b; -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vorr_s32 (int32x2_t __a, int32x2_t __b) -{ - return __a | __b; -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vorr_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return __a | __b; -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vorr_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return __a | __b; -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vorr_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return __a | __b; -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vorr_s64 (int64x1_t __a, int64x1_t __b) -{ - return __a | __b; -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vorr_u64 (uint64x1_t __a, uint64x1_t __b) -{ - return __a | __b; -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vorrq_s8 (int8x16_t __a, int8x16_t __b) -{ - return __a | __b; -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vorrq_s16 (int16x8_t __a, int16x8_t __b) -{ - return __a | __b; -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vorrq_s32 (int32x4_t __a, int32x4_t __b) -{ - return __a | __b; -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vorrq_s64 (int64x2_t __a, int64x2_t __b) -{ - return __a | __b; -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vorrq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return __a | __b; -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vorrq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return __a | __b; -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vorrq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return __a | __b; -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vorrq_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return __a | __b; -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -veor_s8 (int8x8_t __a, int8x8_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -veor_s16 (int16x4_t __a, int16x4_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -veor_s32 (int32x2_t __a, int32x2_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -veor_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -veor_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -veor_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -veor_s64 (int64x1_t __a, int64x1_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -veor_u64 (uint64x1_t __a, uint64x1_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -veorq_s8 (int8x16_t __a, int8x16_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -veorq_s16 (int16x8_t __a, int16x8_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -veorq_s32 (int32x4_t __a, int32x4_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -veorq_s64 (int64x2_t __a, int64x2_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -veorq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -veorq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -veorq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -veorq_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return __a ^ __b; -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vbic_s8 (int8x8_t __a, int8x8_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vbic_s16 (int16x4_t __a, int16x4_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vbic_s32 (int32x2_t __a, int32x2_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vbic_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vbic_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vbic_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vbic_s64 (int64x1_t __a, int64x1_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vbic_u64 (uint64x1_t __a, uint64x1_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vbicq_s8 (int8x16_t __a, int8x16_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vbicq_s16 (int16x8_t __a, int16x8_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vbicq_s32 (int32x4_t __a, int32x4_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vbicq_s64 (int64x2_t __a, int64x2_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vbicq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vbicq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vbicq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vbicq_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return __a & ~__b; -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vorn_s8 (int8x8_t __a, int8x8_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vorn_s16 (int16x4_t __a, int16x4_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vorn_s32 (int32x2_t __a, int32x2_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vorn_u8 (uint8x8_t __a, uint8x8_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vorn_u16 (uint16x4_t __a, uint16x4_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vorn_u32 (uint32x2_t __a, uint32x2_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vorn_s64 (int64x1_t __a, int64x1_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vorn_u64 (uint64x1_t __a, uint64x1_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vornq_s8 (int8x16_t __a, int8x16_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vornq_s16 (int16x8_t __a, int16x8_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vornq_s32 (int32x4_t __a, int32x4_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vornq_s64 (int64x2_t __a, int64x2_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vornq_u8 (uint8x16_t __a, uint8x16_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vornq_u16 (uint16x8_t __a, uint16x8_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vornq_u32 (uint32x4_t __a, uint32x4_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vornq_u64 (uint64x2_t __a, uint64x2_t __b) -{ - return __a | ~__b; -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_p16 (poly16x4_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_f32 (float32x2_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qiv2sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_p64 (poly64x1_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qidi (__a); -} - -#endif -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_s64 (int64x1_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qidi (__a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_u64 (uint64x1_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qidi ((int64x1_t) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_s8 (int8x8_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qiv8qi (__a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_s16 (int16x4_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qiv4hi (__a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_s32 (int32x2_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qiv2si (__a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_u8 (uint8x8_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_u16 (uint16x4_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline poly8x8_t __attribute__ ((__always_inline__)) -vreinterpret_p8_u32 (uint32x2_t __a) -{ - return (poly8x8_t)__builtin_neon_vreinterpretv8qiv2si ((int32x2_t) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_p8 (poly8x8_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_f32 (float32x2_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hiv2sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_p64 (poly64x1_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hidi (__a); -} - -#endif -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_s64 (int64x1_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hidi (__a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_u64 (uint64x1_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hidi ((int64x1_t) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_s8 (int8x8_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hiv8qi (__a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_s16 (int16x4_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hiv4hi (__a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_s32 (int32x2_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hiv2si (__a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_u8 (uint8x8_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_u16 (uint16x4_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline poly16x4_t __attribute__ ((__always_inline__)) -vreinterpret_p16_u32 (uint32x2_t __a) -{ - return (poly16x4_t)__builtin_neon_vreinterpretv4hiv2si ((int32x2_t) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_p8 (poly8x8_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfv8qi ((int8x8_t) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_p16 (poly16x4_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfv4hi ((int16x4_t) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_p64 (poly64x1_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfdi (__a); -} - -#endif -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_s64 (int64x1_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfdi (__a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_u64 (uint64x1_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfdi ((int64x1_t) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_s8 (int8x8_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfv8qi (__a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_s16 (int16x4_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfv4hi (__a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_s32 (int32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfv2si (__a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_u8 (uint8x8_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfv8qi ((int8x8_t) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_u16 (uint16x4_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfv4hi ((int16x4_t) __a); -} - -__extension__ static __inline float32x2_t __attribute__ ((__always_inline__)) -vreinterpret_f32_u32 (uint32x2_t __a) -{ - return (float32x2_t)__builtin_neon_vreinterpretv2sfv2si ((int32x2_t) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_p8 (poly8x8_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdiv8qi ((int8x8_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_p16 (poly16x4_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdiv4hi ((int16x4_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_f32 (float32x2_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdiv2sf (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_s64 (int64x1_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdidi (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_u64 (uint64x1_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdidi ((int64x1_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_s8 (int8x8_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdiv8qi (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_s16 (int16x4_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdiv4hi (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_s32 (int32x2_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdiv2si (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_u8 (uint8x8_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdiv8qi ((int8x8_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_u16 (uint16x4_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdiv4hi ((int16x4_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x1_t __attribute__ ((__always_inline__)) -vreinterpret_p64_u32 (uint32x2_t __a) -{ - return (poly64x1_t)__builtin_neon_vreinterpretdiv2si ((int32x2_t) __a); -} - -#endif -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_p8 (poly8x8_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_p16 (poly16x4_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_f32 (float32x2_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdiv2sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_p64 (poly64x1_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdidi (__a); -} - -#endif -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_u64 (uint64x1_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdidi ((int64x1_t) __a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_s8 (int8x8_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdiv8qi (__a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_s16 (int16x4_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdiv4hi (__a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_s32 (int32x2_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdiv2si (__a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_u8 (uint8x8_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_u16 (uint16x4_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline int64x1_t __attribute__ ((__always_inline__)) -vreinterpret_s64_u32 (uint32x2_t __a) -{ - return (int64x1_t)__builtin_neon_vreinterpretdiv2si ((int32x2_t) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_p8 (poly8x8_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_p16 (poly16x4_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_f32 (float32x2_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdiv2sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_p64 (poly64x1_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdidi (__a); -} - -#endif -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_s64 (int64x1_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdidi (__a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_s8 (int8x8_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdiv8qi (__a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_s16 (int16x4_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdiv4hi (__a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_s32 (int32x2_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdiv2si (__a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_u8 (uint8x8_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_u16 (uint16x4_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vreinterpret_u64_u32 (uint32x2_t __a) -{ - return (uint64x1_t)__builtin_neon_vreinterpretdiv2si ((int32x2_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_p8 (poly8x8_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_p16 (poly16x4_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_f32 (float32x2_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qiv2sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_p64 (poly64x1_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qidi (__a); -} - -#endif -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_s64 (int64x1_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qidi (__a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_u64 (uint64x1_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qidi ((int64x1_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_s16 (int16x4_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qiv4hi (__a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_s32 (int32x2_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qiv2si (__a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_u8 (uint8x8_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_u16 (uint16x4_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline int8x8_t __attribute__ ((__always_inline__)) -vreinterpret_s8_u32 (uint32x2_t __a) -{ - return (int8x8_t)__builtin_neon_vreinterpretv8qiv2si ((int32x2_t) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_p8 (poly8x8_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_p16 (poly16x4_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_f32 (float32x2_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hiv2sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_p64 (poly64x1_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hidi (__a); -} - -#endif -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_s64 (int64x1_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hidi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_u64 (uint64x1_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hidi ((int64x1_t) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_s8 (int8x8_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hiv8qi (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_s32 (int32x2_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hiv2si (__a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_u8 (uint8x8_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_u16 (uint16x4_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline int16x4_t __attribute__ ((__always_inline__)) -vreinterpret_s16_u32 (uint32x2_t __a) -{ - return (int16x4_t)__builtin_neon_vreinterpretv4hiv2si ((int32x2_t) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_p8 (poly8x8_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2siv8qi ((int8x8_t) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_p16 (poly16x4_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2siv4hi ((int16x4_t) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_f32 (float32x2_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2siv2sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_p64 (poly64x1_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2sidi (__a); -} - -#endif -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_s64 (int64x1_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2sidi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_u64 (uint64x1_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2sidi ((int64x1_t) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_s8 (int8x8_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2siv8qi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_s16 (int16x4_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2siv4hi (__a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_u8 (uint8x8_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2siv8qi ((int8x8_t) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_u16 (uint16x4_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2siv4hi ((int16x4_t) __a); -} - -__extension__ static __inline int32x2_t __attribute__ ((__always_inline__)) -vreinterpret_s32_u32 (uint32x2_t __a) -{ - return (int32x2_t)__builtin_neon_vreinterpretv2siv2si ((int32x2_t) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_p8 (poly8x8_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_p16 (poly16x4_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_f32 (float32x2_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qiv2sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_p64 (poly64x1_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qidi (__a); -} - -#endif -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_s64 (int64x1_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qidi (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_u64 (uint64x1_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qidi ((int64x1_t) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_s8 (int8x8_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qiv8qi (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_s16 (int16x4_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qiv4hi (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_s32 (int32x2_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qiv2si (__a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_u16 (uint16x4_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline uint8x8_t __attribute__ ((__always_inline__)) -vreinterpret_u8_u32 (uint32x2_t __a) -{ - return (uint8x8_t)__builtin_neon_vreinterpretv8qiv2si ((int32x2_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_p8 (poly8x8_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_p16 (poly16x4_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hiv4hi ((int16x4_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_f32 (float32x2_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hiv2sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_p64 (poly64x1_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hidi (__a); -} - -#endif -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_s64 (int64x1_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hidi (__a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_u64 (uint64x1_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hidi ((int64x1_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_s8 (int8x8_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hiv8qi (__a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_s16 (int16x4_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hiv4hi (__a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_s32 (int32x2_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hiv2si (__a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_u8 (uint8x8_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hiv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint16x4_t __attribute__ ((__always_inline__)) -vreinterpret_u16_u32 (uint32x2_t __a) -{ - return (uint16x4_t)__builtin_neon_vreinterpretv4hiv2si ((int32x2_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_p8 (poly8x8_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2siv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_p16 (poly16x4_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2siv4hi ((int16x4_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_f32 (float32x2_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2siv2sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_p64 (poly64x1_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2sidi (__a); -} - -#endif -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_s64 (int64x1_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2sidi (__a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_u64 (uint64x1_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2sidi ((int64x1_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_s8 (int8x8_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2siv8qi (__a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_s16 (int16x4_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2siv4hi (__a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_s32 (int32x2_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2siv2si (__a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_u8 (uint8x8_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2siv8qi ((int8x8_t) __a); -} - -__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__)) -vreinterpret_u32_u16 (uint16x4_t __a) -{ - return (uint32x2_t)__builtin_neon_vreinterpretv2siv4hi ((int16x4_t) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_p16 (poly16x8_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv8hi ((int16x8_t) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_f32 (float32x4_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv4sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_p64 (poly64x2_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_p128 (poly128_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_s64 (int64x2_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv2di (__a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_u64 (uint64x2_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv2di ((int64x2_t) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_s8 (int8x16_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv16qi (__a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_s16 (int16x8_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv8hi (__a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_s32 (int32x4_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv4si (__a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_u8 (uint8x16_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv16qi ((int8x16_t) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_u16 (uint16x8_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv8hi ((int16x8_t) __a); -} - -__extension__ static __inline poly8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_p8_u32 (uint32x4_t __a) -{ - return (poly8x16_t)__builtin_neon_vreinterpretv16qiv4si ((int32x4_t) __a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_p8 (poly8x16_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv16qi ((int8x16_t) __a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_f32 (float32x4_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv4sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_p64 (poly64x2_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_p128 (poly128_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_s64 (int64x2_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv2di (__a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_u64 (uint64x2_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv2di ((int64x2_t) __a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_s8 (int8x16_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv16qi (__a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_s16 (int16x8_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv8hi (__a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_s32 (int32x4_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv4si (__a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_u8 (uint8x16_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv16qi ((int8x16_t) __a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_u16 (uint16x8_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv8hi ((int16x8_t) __a); -} - -__extension__ static __inline poly16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_p16_u32 (uint32x4_t __a) -{ - return (poly16x8_t)__builtin_neon_vreinterpretv8hiv4si ((int32x4_t) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_p8 (poly8x16_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv16qi ((int8x16_t) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_p16 (poly16x8_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv8hi ((int16x8_t) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_p64 (poly64x2_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_p128 (poly128_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_s64 (int64x2_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv2di (__a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_u64 (uint64x2_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv2di ((int64x2_t) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_s8 (int8x16_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv16qi (__a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_s16 (int16x8_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv8hi (__a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_s32 (int32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv4si (__a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_u8 (uint8x16_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv16qi ((int8x16_t) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_u16 (uint16x8_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv8hi ((int16x8_t) __a); -} - -__extension__ static __inline float32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_f32_u32 (uint32x4_t __a) -{ - return (float32x4_t)__builtin_neon_vreinterpretv4sfv4si ((int32x4_t) __a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_p8 (poly8x16_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div16qi ((int8x16_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_p16 (poly16x8_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div8hi ((int16x8_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_f32 (float32x4_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div4sf (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_p128 (poly128_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2diti ((__builtin_neon_ti) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_s64 (int64x2_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div2di (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_u64 (uint64x2_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_s8 (int8x16_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div16qi (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_s16 (int16x8_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div8hi (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_s32 (int32x4_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div4si (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_u8 (uint8x16_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div16qi ((int8x16_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_u16 (uint16x8_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div8hi ((int16x8_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_p64_u32 (uint32x4_t __a) -{ - return (poly64x2_t)__builtin_neon_vreinterpretv2div4si ((int32x4_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_p8 (poly8x16_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv16qi ((int8x16_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_p16 (poly16x8_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv8hi ((int16x8_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_f32 (float32x4_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv4sf (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_p64 (poly64x2_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_s64 (int64x2_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv2di (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_u64 (uint64x2_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_s8 (int8x16_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv16qi (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_s16 (int16x8_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv8hi (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_s32 (int32x4_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv4si (__a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_u8 (uint8x16_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv16qi ((int8x16_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_u16 (uint16x8_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv8hi ((int16x8_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vreinterpretq_p128_u32 (uint32x4_t __a) -{ - return (poly128_t)__builtin_neon_vreinterprettiv4si ((int32x4_t) __a); -} - -#endif -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_p8 (poly8x16_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div16qi ((int8x16_t) __a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_p16 (poly16x8_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div8hi ((int16x8_t) __a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_f32 (float32x4_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div4sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_p64 (poly64x2_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_p128 (poly128_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2diti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_u64 (uint64x2_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div2di ((int64x2_t) __a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_s8 (int8x16_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div16qi (__a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_s16 (int16x8_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div8hi (__a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_s32 (int32x4_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div4si (__a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_u8 (uint8x16_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div16qi ((int8x16_t) __a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_u16 (uint16x8_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div8hi ((int16x8_t) __a); -} - -__extension__ static __inline int64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_s64_u32 (uint32x4_t __a) -{ - return (int64x2_t)__builtin_neon_vreinterpretv2div4si ((int32x4_t) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_p8 (poly8x16_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_p16 (poly16x8_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_f32 (float32x4_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div4sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_p64 (poly64x2_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_p128 (poly128_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2diti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_s64 (int64x2_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div2di (__a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_s8 (int8x16_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div16qi (__a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_s16 (int16x8_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div8hi (__a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_s32 (int32x4_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div4si (__a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_u8 (uint8x16_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_u16 (uint16x8_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_u32 (uint32x4_t __a) -{ - return (uint64x2_t)__builtin_neon_vreinterpretv2div4si ((int32x4_t) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_p8 (poly8x16_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv16qi ((int8x16_t) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_p16 (poly16x8_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv8hi ((int16x8_t) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_f32 (float32x4_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv4sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_p64 (poly64x2_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_p128 (poly128_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_s64 (int64x2_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv2di (__a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_u64 (uint64x2_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv2di ((int64x2_t) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_s16 (int16x8_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv8hi (__a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_s32 (int32x4_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv4si (__a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_u8 (uint8x16_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv16qi ((int8x16_t) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_u16 (uint16x8_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv8hi ((int16x8_t) __a); -} - -__extension__ static __inline int8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_s8_u32 (uint32x4_t __a) -{ - return (int8x16_t)__builtin_neon_vreinterpretv16qiv4si ((int32x4_t) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_p8 (poly8x16_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv16qi ((int8x16_t) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_p16 (poly16x8_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv8hi ((int16x8_t) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_f32 (float32x4_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv4sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_p64 (poly64x2_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_p128 (poly128_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_s64 (int64x2_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv2di (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_u64 (uint64x2_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv2di ((int64x2_t) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_s8 (int8x16_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv16qi (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_s32 (int32x4_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv4si (__a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_u8 (uint8x16_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv16qi ((int8x16_t) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_u16 (uint16x8_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv8hi ((int16x8_t) __a); -} - -__extension__ static __inline int16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_s16_u32 (uint32x4_t __a) -{ - return (int16x8_t)__builtin_neon_vreinterpretv8hiv4si ((int32x4_t) __a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_p8 (poly8x16_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv16qi ((int8x16_t) __a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_p16 (poly16x8_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv8hi ((int16x8_t) __a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_f32 (float32x4_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv4sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_p64 (poly64x2_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_p128 (poly128_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_s64 (int64x2_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv2di (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_u64 (uint64x2_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv2di ((int64x2_t) __a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_s8 (int8x16_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv16qi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_s16 (int16x8_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv8hi (__a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_u8 (uint8x16_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv16qi ((int8x16_t) __a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_u16 (uint16x8_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv8hi ((int16x8_t) __a); -} - -__extension__ static __inline int32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_s32_u32 (uint32x4_t __a) -{ - return (int32x4_t)__builtin_neon_vreinterpretv4siv4si ((int32x4_t) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_p8 (poly8x16_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_p16 (poly16x8_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_f32 (float32x4_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv4sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_p64 (poly64x2_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_p128 (poly128_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_s64 (int64x2_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv2di (__a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_u64 (uint64x2_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv2di ((int64x2_t) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_s8 (int8x16_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv16qi (__a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_s16 (int16x8_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv8hi (__a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_s32 (int32x4_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv4si (__a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_u16 (uint16x8_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vreinterpretq_u8_u32 (uint32x4_t __a) -{ - return (uint8x16_t)__builtin_neon_vreinterpretv16qiv4si ((int32x4_t) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_p8 (poly8x16_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_p16 (poly16x8_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_f32 (float32x4_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv4sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_p64 (poly64x2_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_p128 (poly128_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_s64 (int64x2_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv2di (__a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_u64 (uint64x2_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv2di ((int64x2_t) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_s8 (int8x16_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv16qi (__a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_s16 (int16x8_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv8hi (__a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_s32 (int32x4_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv4si (__a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_u8 (uint8x16_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint16x8_t __attribute__ ((__always_inline__)) -vreinterpretq_u16_u32 (uint32x4_t __a) -{ - return (uint16x8_t)__builtin_neon_vreinterpretv8hiv4si ((int32x4_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_p8 (poly8x16_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_p16 (poly16x8_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv8hi ((int16x8_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_f32 (float32x4_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv4sf (__a); -} - -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_p64 (poly64x2_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv2di ((int64x2_t) __a); -} - -#endif -#ifdef __ARM_FEATURE_CRYPTO -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_p128 (poly128_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siti ((__builtin_neon_ti) __a); -} - -#endif -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_s64 (int64x2_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv2di (__a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_u64 (uint64x2_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv2di ((int64x2_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_s8 (int8x16_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv16qi (__a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_s16 (int16x8_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv8hi (__a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_s32 (int32x4_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv4si (__a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_u8 (uint8x16_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv16qi ((int8x16_t) __a); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vreinterpretq_u32_u16 (uint16x8_t __a) -{ - return (uint32x4_t)__builtin_neon_vreinterpretv4siv8hi ((int16x8_t) __a); -} - - -#ifdef __ARM_FEATURE_CRYPTO - -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vldrq_p128 (poly128_t const * __ptr) -{ -#ifdef __ARM_BIG_ENDIAN - poly64_t* __ptmp = (poly64_t*) __ptr; - poly64_t __d0 = vld1_p64 (__ptmp); - poly64_t __d1 = vld1_p64 (__ptmp + 1); - return vreinterpretq_p128_p64 (vcombine_p64 (__d1, __d0)); -#else - return vreinterpretq_p128_p64 (vld1q_p64 ((poly64_t*) __ptr)); -#endif -} - -__extension__ static __inline void __attribute__ ((__always_inline__)) -vstrq_p128 (poly128_t * __ptr, poly128_t __val) -{ -#ifdef __ARM_BIG_ENDIAN - poly64x2_t __tmp = vreinterpretq_p64_p128 (__val); - poly64_t __d0 = vget_high_p64 (__tmp); - poly64_t __d1 = vget_low_p64 (__tmp); - vst1q_p64 ((poly64_t*) __ptr, vcombine_p64 (__d0, __d1)); -#else - vst1q_p64 ((poly64_t*) __ptr, vreinterpretq_p64_p128 (__val)); -#endif -} - -/* The vceq_p64 intrinsic does not map to a single instruction. - Instead we emulate it by performing a 32-bit variant of the vceq - and applying a pairwise min reduction to the result. - vceq_u32 will produce two 32-bit halves, each of which will contain either - all ones or all zeros depending on whether the corresponding 32-bit - halves of the poly64_t were equal. The whole poly64_t values are equal - if and only if both halves are equal, i.e. vceq_u32 returns all ones. - If the result is all zeroes for any half then the whole result is zeroes. - This is what the pairwise min reduction achieves. */ - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vceq_p64 (poly64x1_t __a, poly64x1_t __b) -{ - uint32x2_t __t_a = vreinterpret_u32_p64 (__a); - uint32x2_t __t_b = vreinterpret_u32_p64 (__b); - uint32x2_t __c = vceq_u32 (__t_a, __t_b); - uint32x2_t __m = vpmin_u32 (__c, __c); - return vreinterpret_u64_u32 (__m); -} - -/* The vtst_p64 intrinsic does not map to a single instruction. - We emulate it in way similar to vceq_p64 above but here we do - a reduction with max since if any two corresponding bits - in the two poly64_t's match, then the whole result must be all ones. */ - -__extension__ static __inline uint64x1_t __attribute__ ((__always_inline__)) -vtst_p64 (poly64x1_t __a, poly64x1_t __b) -{ - uint32x2_t __t_a = vreinterpret_u32_p64 (__a); - uint32x2_t __t_b = vreinterpret_u32_p64 (__b); - uint32x2_t __c = vtst_u32 (__t_a, __t_b); - uint32x2_t __m = vpmax_u32 (__c, __c); - return vreinterpret_u64_u32 (__m); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vaeseq_u8 (uint8x16_t __data, uint8x16_t __key) -{ - return __builtin_arm_crypto_aese (__data, __key); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vaesdq_u8 (uint8x16_t __data, uint8x16_t __key) -{ - return __builtin_arm_crypto_aesd (__data, __key); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vaesmcq_u8 (uint8x16_t __data) -{ - return __builtin_arm_crypto_aesmc (__data); -} - -__extension__ static __inline uint8x16_t __attribute__ ((__always_inline__)) -vaesimcq_u8 (uint8x16_t __data) -{ - return __builtin_arm_crypto_aesimc (__data); -} - -__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) -vsha1h_u32 (uint32_t __hash_e) -{ - uint32x4_t __t = vdupq_n_u32 (0); - __t = vsetq_lane_u32 (__hash_e, __t, 0); - __t = __builtin_arm_crypto_sha1h (__t); - return vgetq_lane_u32 (__t, 0); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsha1cq_u32 (uint32x4_t __hash_abcd, uint32_t __hash_e, uint32x4_t __wk) -{ - uint32x4_t __t = vdupq_n_u32 (0); - __t = vsetq_lane_u32 (__hash_e, __t, 0); - return __builtin_arm_crypto_sha1c (__hash_abcd, __t, __wk); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsha1pq_u32 (uint32x4_t __hash_abcd, uint32_t __hash_e, uint32x4_t __wk) -{ - uint32x4_t __t = vdupq_n_u32 (0); - __t = vsetq_lane_u32 (__hash_e, __t, 0); - return __builtin_arm_crypto_sha1p (__hash_abcd, __t, __wk); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsha1mq_u32 (uint32x4_t __hash_abcd, uint32_t __hash_e, uint32x4_t __wk) -{ - uint32x4_t __t = vdupq_n_u32 (0); - __t = vsetq_lane_u32 (__hash_e, __t, 0); - return __builtin_arm_crypto_sha1m (__hash_abcd, __t, __wk); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsha1su0q_u32 (uint32x4_t __w0_3, uint32x4_t __w4_7, uint32x4_t __w8_11) -{ - return __builtin_arm_crypto_sha1su0 (__w0_3, __w4_7, __w8_11); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsha1su1q_u32 (uint32x4_t __tw0_3, uint32x4_t __w12_15) -{ - return __builtin_arm_crypto_sha1su1 (__tw0_3, __w12_15); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsha256hq_u32 (uint32x4_t __hash_abcd, uint32x4_t __hash_efgh, uint32x4_t __wk) -{ - return __builtin_arm_crypto_sha256h (__hash_abcd, __hash_efgh, __wk); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsha256h2q_u32 (uint32x4_t __hash_abcd, uint32x4_t __hash_efgh, uint32x4_t __wk) -{ - return __builtin_arm_crypto_sha256h2 (__hash_abcd, __hash_efgh, __wk); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsha256su0q_u32 (uint32x4_t __w0_3, uint32x4_t __w4_7) -{ - return __builtin_arm_crypto_sha256su0 (__w0_3, __w4_7); -} - -__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__)) -vsha256su1q_u32 (uint32x4_t __tw0_3, uint32x4_t __w8_11, uint32x4_t __w12_15) -{ - return __builtin_arm_crypto_sha256su1 (__tw0_3, __w8_11, __w12_15); -} - -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vmull_p64 (poly64_t __a, poly64_t __b) -{ - return (poly128_t) __builtin_arm_crypto_vmullp64 ((uint64_t) __a, (uint64_t) __b); -} - -__extension__ static __inline poly128_t __attribute__ ((__always_inline__)) -vmull_high_p64 (poly64x2_t __a, poly64x2_t __b) -{ - poly64_t __t1 = vget_high_p64 (__a); - poly64_t __t2 = vget_high_p64 (__b); - - return (poly128_t) __builtin_arm_crypto_vmullp64 ((uint64_t) __t1, (uint64_t) __t2); -} - -#endif -#ifdef __cplusplus -} -#endif -#endif -#endif diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/float.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/float.h deleted file mode 100644 index 805b84d34..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/float.h +++ /dev/null @@ -1,265 +0,0 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - -/* - * ISO C Standard: 5.2.4.2.2 Characteristics of floating types - */ - -#ifndef _FLOAT_H___ -#define _FLOAT_H___ - -/* Radix of exponent representation, b. */ -#undef FLT_RADIX -#define FLT_RADIX __FLT_RADIX__ - -/* Number of base-FLT_RADIX digits in the significand, p. */ -#undef FLT_MANT_DIG -#undef DBL_MANT_DIG -#undef LDBL_MANT_DIG -#define FLT_MANT_DIG __FLT_MANT_DIG__ -#define DBL_MANT_DIG __DBL_MANT_DIG__ -#define LDBL_MANT_DIG __LDBL_MANT_DIG__ - -/* Number of decimal digits, q, such that any floating-point number with q - decimal digits can be rounded into a floating-point number with p radix b - digits and back again without change to the q decimal digits, - - p * log10(b) if b is a power of 10 - floor((p - 1) * log10(b)) otherwise -*/ -#undef FLT_DIG -#undef DBL_DIG -#undef LDBL_DIG -#define FLT_DIG __FLT_DIG__ -#define DBL_DIG __DBL_DIG__ -#define LDBL_DIG __LDBL_DIG__ - -/* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */ -#undef FLT_MIN_EXP -#undef DBL_MIN_EXP -#undef LDBL_MIN_EXP -#define FLT_MIN_EXP __FLT_MIN_EXP__ -#define DBL_MIN_EXP __DBL_MIN_EXP__ -#define LDBL_MIN_EXP __LDBL_MIN_EXP__ - -/* Minimum negative integer such that 10 raised to that power is in the - range of normalized floating-point numbers, - - ceil(log10(b) * (emin - 1)) -*/ -#undef FLT_MIN_10_EXP -#undef DBL_MIN_10_EXP -#undef LDBL_MIN_10_EXP -#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__ -#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__ -#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__ - -/* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */ -#undef FLT_MAX_EXP -#undef DBL_MAX_EXP -#undef LDBL_MAX_EXP -#define FLT_MAX_EXP __FLT_MAX_EXP__ -#define DBL_MAX_EXP __DBL_MAX_EXP__ -#define LDBL_MAX_EXP __LDBL_MAX_EXP__ - -/* Maximum integer such that 10 raised to that power is in the range of - representable finite floating-point numbers, - - floor(log10((1 - b**-p) * b**emax)) -*/ -#undef FLT_MAX_10_EXP -#undef DBL_MAX_10_EXP -#undef LDBL_MAX_10_EXP -#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__ -#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__ -#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__ - -/* Maximum representable finite floating-point number, - - (1 - b**-p) * b**emax -*/ -#undef FLT_MAX -#undef DBL_MAX -#undef LDBL_MAX -#define FLT_MAX __FLT_MAX__ -#define DBL_MAX __DBL_MAX__ -#define LDBL_MAX __LDBL_MAX__ - -/* The difference between 1 and the least value greater than 1 that is - representable in the given floating point type, b**1-p. */ -#undef FLT_EPSILON -#undef DBL_EPSILON -#undef LDBL_EPSILON -#define FLT_EPSILON __FLT_EPSILON__ -#define DBL_EPSILON __DBL_EPSILON__ -#define LDBL_EPSILON __LDBL_EPSILON__ - -/* Minimum normalized positive floating-point number, b**(emin - 1). */ -#undef FLT_MIN -#undef DBL_MIN -#undef LDBL_MIN -#define FLT_MIN __FLT_MIN__ -#define DBL_MIN __DBL_MIN__ -#define LDBL_MIN __LDBL_MIN__ - -/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */ -/* ??? This is supposed to change with calls to fesetround in . */ -#undef FLT_ROUNDS -#define FLT_ROUNDS 1 - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -/* The floating-point expression evaluation method. - -1 indeterminate - 0 evaluate all operations and constants just to the range and - precision of the type - 1 evaluate operations and constants of type float and double - to the range and precision of the double type, evaluate - long double operations and constants to the range and - precision of the long double type - 2 evaluate all operations and constants to the range and - precision of the long double type - - ??? This ought to change with the setting of the fp control word; - the value provided by the compiler assumes the widest setting. */ -#undef FLT_EVAL_METHOD -#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ - -/* Number of decimal digits, n, such that any floating-point number in the - widest supported floating type with pmax radix b digits can be rounded - to a floating-point number with n decimal digits and back again without - change to the value, - - pmax * log10(b) if b is a power of 10 - ceil(1 + pmax * log10(b)) otherwise -*/ -#undef DECIMAL_DIG -#define DECIMAL_DIG __DECIMAL_DIG__ - -#endif /* C99 */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L -/* Versions of DECIMAL_DIG for each floating-point type. */ -#undef FLT_DECIMAL_DIG -#undef DBL_DECIMAL_DIG -#undef LDBL_DECIMAL_DIG -#define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__ -#define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__ -#define LDBL_DECIMAL_DIG __DECIMAL_DIG__ - -/* Whether types support subnormal numbers. */ -#undef FLT_HAS_SUBNORM -#undef DBL_HAS_SUBNORM -#undef LDBL_HAS_SUBNORM -#define FLT_HAS_SUBNORM __FLT_HAS_DENORM__ -#define DBL_HAS_SUBNORM __DBL_HAS_DENORM__ -#define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__ - -/* Minimum positive values, including subnormals. */ -#undef FLT_TRUE_MIN -#undef DBL_TRUE_MIN -#undef LDBL_TRUE_MIN -#define FLT_TRUE_MIN __FLT_DENORM_MIN__ -#define DBL_TRUE_MIN __DBL_DENORM_MIN__ -#define LDBL_TRUE_MIN __LDBL_DENORM_MIN__ - -#endif /* C11 */ - -#ifdef __STDC_WANT_DEC_FP__ -/* Draft Technical Report 24732, extension for decimal floating-point - arithmetic: Characteristic of decimal floating types . */ - -/* Number of base-FLT_RADIX digits in the significand, p. */ -#undef DEC32_MANT_DIG -#undef DEC64_MANT_DIG -#undef DEC128_MANT_DIG -#define DEC32_MANT_DIG __DEC32_MANT_DIG__ -#define DEC64_MANT_DIG __DEC64_MANT_DIG__ -#define DEC128_MANT_DIG __DEC128_MANT_DIG__ - -/* Minimum exponent. */ -#undef DEC32_MIN_EXP -#undef DEC64_MIN_EXP -#undef DEC128_MIN_EXP -#define DEC32_MIN_EXP __DEC32_MIN_EXP__ -#define DEC64_MIN_EXP __DEC64_MIN_EXP__ -#define DEC128_MIN_EXP __DEC128_MIN_EXP__ - -/* Maximum exponent. */ -#undef DEC32_MAX_EXP -#undef DEC64_MAX_EXP -#undef DEC128_MAX_EXP -#define DEC32_MAX_EXP __DEC32_MAX_EXP__ -#define DEC64_MAX_EXP __DEC64_MAX_EXP__ -#define DEC128_MAX_EXP __DEC128_MAX_EXP__ - -/* Maximum representable finite decimal floating-point number - (there are 6, 15, and 33 9s after the decimal points respectively). */ -#undef DEC32_MAX -#undef DEC64_MAX -#undef DEC128_MAX -#define DEC32_MAX __DEC32_MAX__ -#define DEC64_MAX __DEC64_MAX__ -#define DEC128_MAX __DEC128_MAX__ - -/* The difference between 1 and the least value greater than 1 that is - representable in the given floating point type. */ -#undef DEC32_EPSILON -#undef DEC64_EPSILON -#undef DEC128_EPSILON -#define DEC32_EPSILON __DEC32_EPSILON__ -#define DEC64_EPSILON __DEC64_EPSILON__ -#define DEC128_EPSILON __DEC128_EPSILON__ - -/* Minimum normalized positive floating-point number. */ -#undef DEC32_MIN -#undef DEC64_MIN -#undef DEC128_MIN -#define DEC32_MIN __DEC32_MIN__ -#define DEC64_MIN __DEC64_MIN__ -#define DEC128_MIN __DEC128_MIN__ - -/* Minimum subnormal positive floating-point number. */ -#undef DEC32_SUBNORMAL_MIN -#undef DEC64_SUBNORMAL_MIN -#undef DEC128_SUBNORMAL_MIN -#define DEC32_SUBNORMAL_MIN __DEC32_SUBNORMAL_MIN__ -#define DEC64_SUBNORMAL_MIN __DEC64_SUBNORMAL_MIN__ -#define DEC128_SUBNORMAL_MIN __DEC128_SUBNORMAL_MIN__ - -/* The floating-point expression evaluation method. - -1 indeterminate - 0 evaluate all operations and constants just to the range and - precision of the type - 1 evaluate operations and constants of type _Decimal32 - and _Decimal64 to the range and precision of the _Decimal64 - type, evaluate _Decimal128 operations and constants to the - range and precision of the _Decimal128 type; - 2 evaluate all operations and constants to the range and - precision of the _Decimal128 type. */ - -#undef DEC_EVAL_METHOD -#define DEC_EVAL_METHOD __DEC_EVAL_METHOD__ - -#endif /* __STDC_WANT_DEC_FP__ */ - -#endif /* _FLOAT_H___ */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/NXConstStr.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/NXConstStr.h deleted file mode 100644 index 537887970..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/NXConstStr.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Interface for the NXConstantString class for Objective-C. - Copyright (C) 1995-2015 Free Software Foundation, Inc. - Contributed by Pieter J. Schoenmakers - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3, or (at your option) any -later version. - -GCC is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - - -#ifndef __nxconstantstring_INCLUDE_GNU -#define __nxconstantstring_INCLUDE_GNU - -#include "Object.h" - -#ifdef __cplusplus -extern "C" { -#endif - -@interface NXConstantString: Object -{ - char *c_string; - unsigned int len; -} - --(const char *) cString; --(unsigned int) length; - -@end - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/Object.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/Object.h deleted file mode 100644 index 7ef325e2e..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/Object.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Interface for the Object class for Objective-C. - Copyright (C) 1993-2015 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3, or (at your option) any -later version. - -GCC is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - - -#ifndef __object_INCLUDE_GNU -#define __object_INCLUDE_GNU - -#include "objc.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* The Object class is a very minimal root class included with the - runtime. It is used as superclass for the two classes included - with the runtime, Protocol and NXConstantString. - - Because Objective-C allows multiple root classes, you can define - your own root class, different from Object. - - In particular, a Foundation library (such as GNUstep Base) is - expected to provide its own root class (typically called NSObject), - fully integrated with the library's own high-level features. It is - expected that you should always use and interact with NSObject, and - mostly ignore Object. */ - -/* All classes are derived from Object. As such, this is the overhead - tacked onto those objects. */ -@interface Object -{ - Class isa; /* A pointer to the instance's class structure. */ -} -- (Class)class; -- (BOOL)isEqual: (id)anObject; -@end - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/Protocol.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/Protocol.h deleted file mode 100644 index 851aa775c..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/Protocol.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Declare the class Protocol for Objective C programs. - Copyright (C) 1993-2015 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - - -#ifndef __Protocol_INCLUDE_GNU -#define __Protocol_INCLUDE_GNU - -#include "Object.h" - -#ifdef __cplusplus -extern "C" { -#endif - -@interface Protocol : Object -{ -@private - char *protocol_name; - struct objc_protocol_list *protocol_list; - struct objc_method_description_list *instance_methods, *class_methods; -} -@end - -/* The Protocol methods have been replaced by - protocol_getName() - protocol_conformsToProtocol() - protocol_getMethodDescription() -*/ - -#ifdef __cplusplus -} -#endif - -#endif /* not __Protocol_INCLUDE_GNU */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/message.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/message.h deleted file mode 100644 index 4b14edcff..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/message.h +++ /dev/null @@ -1,119 +0,0 @@ -/* GNU Objective C Runtime messaging declarations - Copyright (C) 1993-2015 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - -#ifndef __objc_message_INCLUDE_GNU -#define __objc_message_INCLUDE_GNU - -#include "objc.h" -#include "objc-decls.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* This file includes declarations of the messaging functions and - types. */ - -/* Compatibility note: the messaging function is one area where the - GNU runtime and the Apple/NeXT runtime differ significantly. If - you can, it is recommended that you use higher-level facilities - (provided by a Foundation library such as GNUstep Base) to perform - forwarding or other advanced messaging tricks. */ - -/* This function returns the IMP (C function implementing a method) to - use to invoke the method with selector 'op' of receiver 'receiver'. - - This is the function used by the compiler when compiling method - invocations with the GNU runtime. For example, the method call - - result = [receiver method]; - - is compiled by the compiler (with the GNU runtime) into the - equivalent of: - - { - IMP function = objc_msg_lookup (receiver, @selector (method)); - result = function (receiver, @selector (method)); - } - - so, a call to objc_msg_lookup() determines the IMP (the C function - implementing the method) to call. Then, the function is called. - If the method takes or returns different arguments, the compiler - will cast 'function' to the right type before invoking it, making - sure arguments and return value are handled correctly. - - objc_msg_lookup() must always return a valid function that can be - called with the required method signature (otherwise the - compiler-generated code shown above could segfault). If 'receiver' - is NULL, objc_msg_lookup() returns a C function that does nothing, - ignores all its arguments, and returns NULL (see nil_method.c). If - 'receiver' does not respond to the selector 'op', objc_msg_lookup() - will try to call +resolveClassMethod: or resolveInstanceMethod: as - appropriate, and if they return YES, it will try the lookup again - (+resolveClassMethod: and +resolveInstanceMethod: can thus install - dynamically methods as they are requested). If - +resolveClassMethod: or +resolveInstanceMethod: are either not - available, or return NO, or return YES but 'receiver' still doesn't - implement the 'selector' after calling them, the runtime returns a - generic "forwarding" function that can be called with the required - method signature and which can process the method invocation - according to the forwarding API. There are two runtime hooks that - allow Foundation libraries (such as GNUstep-Base) to return their - own forwarding function in preference to the runtime ones. When - that happens, the Foundation library effectively takes complete - control of the forwarding process; any method invocation where the - selector is not implemented by the receiver will end up calling a - forwarding function chosen by the Foundation library. */ -objc_EXPORT IMP objc_msg_lookup (id receiver, SEL op); - -/* Structure used when a message is send to a class's super class. - The compiler generates one of these structures and passes it to - objc_msg_lookup_super() when a [super method] call is compiled. */ - -/* Modern API. */ -struct objc_super -{ - id self; /* The receiver of the message. */ - Class super_class; /* The superclass of the receiver. */ -}; - -/* This is used by the compiler instead of objc_msg_lookup () when - compiling a call to 'super', such as [super method]. This requires - sending a message to super->self, but looking up the method as if - super->self was in class super->super_class. */ -objc_EXPORT IMP objc_msg_lookup_super (struct objc_super *super, SEL sel); - -/* Hooks for method forwarding. They make it easy to substitute the - built-in forwarding with one based on a library, such as ffi, that - implement closures, thereby avoiding gcc's __builtin_apply - problems. __objc_msg_forward2's result will be preferred over that - of __objc_msg_forward if both are set and return non-NULL. */ -objc_EXPORT IMP (*__objc_msg_forward)(SEL); -objc_EXPORT IMP (*__objc_msg_forward2)(id, SEL); - -#ifdef __cplusplus -} -#endif - -#endif /* not __objc_message_INCLUDE_GNU */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc-decls.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc-decls.h deleted file mode 100644 index 648295d5c..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc-decls.h +++ /dev/null @@ -1,46 +0,0 @@ -/* GNU Objective-C Extern helpers for Win32. - Copyright (C) 2004-2015 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3, or (at your option) any -later version. - -GCC is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - - -#ifndef __objc_decls_INCLUDE_GNU -#define __objc_decls_INCLUDE_GNU - -#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32) - -# ifdef DLL_EXPORT /* defined by libtool (if required) */ -# define objc_EXPORT -# define objc_DECLARE -# else -# define objc_EXPORT extern __declspec(dllimport) -# define objc_DECLARE extern __declspec(dllimport) -# endif - -#else - -# define objc_EXPORT extern -# define objc_DECLARE - -#endif - -#endif /* __objc_decls_INCLUDE_GNU */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc-exception.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc-exception.h deleted file mode 100644 index 16f715496..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc-exception.h +++ /dev/null @@ -1,109 +0,0 @@ -/* GNU Objective C Runtime native exceptions - Copyright (C) 2010-2015 Free Software Foundation, Inc. - Contributed by Nicola Pero - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - -#ifndef __objc_exception_INCLUDE_GNU -#define __objc_exception_INCLUDE_GNU - -#include "objc.h" -#include "objc-decls.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* 'objc_exception_throw' throws the exception 'exception', which is - an exception object. - - Calls to 'objc_exception_throw' are automatically generated by the - compiler: an Objective-C "@throw exception;" statement gets - compiled into the equivalent of "objc_exception_throw - (exception);". - - 'objc_exception_throw' searches for a @catch() that can catch the - exception. By default, @catch (MyClass object) will catch all - exception objects that are of class MyClass or of a subclass of - MyClass; if the exception object is 'nil', then the exception can - only be caught with a catch-all exception handler where no - exception class is specified (such as @catch(id object)). This - behaviour can be customized by setting an 'objc_exception_matcher' - function (using objc_set_exception_matcher(), see below); if one is - set, it is used instead of the default one. - - If the exception is uncaught (there is no @catch() to catch it), - the program aborts. It is possible to customize this behaviour by - setting an 'objc_uncaught_exception_handler' function (using - objc_set_uncaught_exception_handler(), see below); if one is set, - it is executed before abort() is called. An uncaught exception - handler is expected to never return. */ -objc_EXPORT void objc_exception_throw (id exception); - -/* Compatibility note: the Apple/NeXT runtime seems to also have - objc_exception_rethrow(), objc_begin_catch() and objc_end_catch(). - Currently the GNU runtime does not use them. */ - -/* The following functions allow customizing to a certain extent the - exception handling. They are not thread safe and should be called - during the program initialization before threads are started. They - are mostly reserved for "Foundation" libraries; in the case of - GNUstep, GNUstep Base may be using these functions to improve the - standard exception handling. You probably shouldn't use these - functions unless you are writing your own Foundation library. */ - -/* Compatibility note: objc_set_exception_preprocessor() (available on - the Apple/NeXT runtime) is not available on the GNU runtime. */ - -/* An 'objc_exception_matcher' function is used to match an exception - to a @catch clause. 'catch_class' is the class of objects caught - by the @catch clause (for example, in "@catch (Object *o)", the - catch_class is Object). It should return 1 if the exception should - be caught by a @catch with a catch_class argument, and 0 if - not. */ -typedef int (*objc_exception_matcher)(Class catch_class, id exception); - -/* Sets a new exception matcher function, and returns the previous - exception matcher function. This function is not safe to call in a - multi-threaded environment because other threads may be trying to - invoke the exception matcher while you change it! */ -objc_EXPORT objc_exception_matcher -objc_setExceptionMatcher (objc_exception_matcher new_matcher); - - -/* An 'objc_uncaught_exception_handler' function is a function that - handles uncaught exceptions. It should never return. */ -typedef void (*objc_uncaught_exception_handler)(id exception); - -/* Sets a new uncaught exception handler function, and returns the - previous exception handler function. This function is not safe to - call in a multi-threaded environment because other threads may be - trying to invoke the uncaught exception handler while you change - it. */ -objc_EXPORT objc_uncaught_exception_handler -objc_setUncaughtExceptionHandler (objc_uncaught_exception_handler new_handler); - -#ifdef __cplusplus -} -#endif - -#endif /* not __objc_exception_INCLUDE_GNU */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc-sync.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc-sync.h deleted file mode 100644 index 69cd38b09..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc-sync.h +++ /dev/null @@ -1,69 +0,0 @@ -/* GNU Objective C Runtime @synchronized implementation - Copyright (C) 2010-2015 Free Software Foundation, Inc. - Contributed by Nicola Pero - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - -#ifndef __objc_sync_INCLUDE_GNU -#define __objc_sync_INCLUDE_GNU - -#include "objc.h" -#include "objc-decls.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* These functions are automatically called by @synchronized(). */ - -/* 'objc_sync_enter' is automatically called when entering a - @synchronized() block. It locks the recursive lock associated with - 'object'. If 'object' is nil, it does nothing. It returns - OBJC_SYNC_SUCCESS on success; see the enumeration below for error - values. - - Note that you should not rely on the behaviour when 'object' is nil - because it could change. */ -objc_EXPORT int objc_sync_enter (id object); - -/* 'objc_sync_exit' is automatically called when exiting from a - @synchronized() block. It unlocks the recursive lock associated - with 'object'. If 'object' is nil, it does nothing. It returns - OBJC_SYNC_SUCCESS on success; see the enumeration below for error - values. */ -objc_EXPORT int objc_sync_exit (id object); - -/* All the possible return values for objc_sync_enter() and - objc_sync_exit(). - */ -enum { - OBJC_SYNC_SUCCESS = 0, - OBJC_SYNC_NOT_OWNING_THREAD_ERROR = -1, - OBJC_SYNC_TIMED_OUT = -2, - OBJC_SYNC_NOT_INITIALIZED = -3 -}; - -#ifdef __cplusplus -} -#endif - -#endif /* not __objc_sync_INCLUDE_GNU */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc.h deleted file mode 100644 index a5cfd8533..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/objc.h +++ /dev/null @@ -1,151 +0,0 @@ -/* Basic data types for Objective C. - Copyright (C) 1993-2015 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - -#ifndef __objc_INCLUDE_GNU -#define __objc_INCLUDE_GNU - -/* This file contains the definition of the basic types used by the - Objective-C language. It needs to be included to do almost - anything with Objective-C. */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* The current version of the GNU Objective-C Runtime library in - compressed ISO date format. This should be updated any time a new - version is released with changes to the public API (there is no - need to update it if there were no API changes since the previous - release). This macro is only defined starting with the GNU - Objective-C Runtime shipped with GCC 4.6.0. If it is not defined, - it is either an older version of the runtime, or another runtime. */ -#define __GNU_LIBOBJC__ 20110608 - -/* Definition of the boolean type. - - Compatibility note: the Apple/NeXT runtime defines a BOOL as a - 'signed char'. The GNU runtime uses an 'unsigned char'. - - Important: this could change and we could switch to 'typedef bool - BOOL' in the future. Do not depend on the type of BOOL. */ -#undef BOOL -typedef unsigned char BOOL; - -#define YES (BOOL)1 -#define NO (BOOL)0 - -/* The basic Objective-C types (SEL, Class, id) are defined as pointer - to opaque structures. The details of the structures are private to - the runtime and may potentially change from one version to the - other. */ - -/* A SEL (selector) represents an abstract method (in the - object-oriented sense) and includes all the details of how to - invoke the method (which means its name, arguments and return - types) but provides no implementation of its own. You can check - whether a class implements a selector or not, and if you have a - selector and know that the class implements it, you can use it to - call the method for an object in the class. */ -typedef const struct objc_selector *SEL; - -/* A Class is a class (in the object-oriented sense). In Objective-C - there is the complication that each Class is an object itself, and - so belongs to a class too. This class that a class belongs to is - called its 'meta class'. */ -typedef struct objc_class *Class; - -/* An 'id' is an object of an unknown class. The way the object data - is stored inside the object is private and what you see here is - only the beginning of the actual struct. The first field is always - a pointer to the Class that the object belongs to. */ -typedef struct objc_object -{ - /* 'class_pointer' is the Class that the object belongs to. In case - of a Class object, this pointer points to the meta class. - - Compatibility Note: The Apple/NeXT runtime calls this field - 'isa'. To access this field, use object_getClass() from - runtime.h, which is an inline function so does not add any - overhead and is also portable to other runtimes. */ - Class class_pointer; -} *id; - -/* 'IMP' is a C function that implements a method. When retrieving - the implementation of a method from the runtime, this is the type - of the pointer returned. The idea of the definition of IMP is to - represent a 'pointer to a general function taking an id, a SEL, - followed by other unspecified arguments'. You must always cast an - IMP to a pointer to a function taking the appropriate, specific - types for that function, before calling it - to make sure the - appropriate arguments are passed to it. The code generated by the - compiler to perform method calls automatically does this cast - inside method calls. */ -typedef id (*IMP)(id, SEL, ...); - -/* 'nil' is the null object. Messages to nil do nothing and always - return 0. */ -#define nil (id)0 - -/* 'Nil' is the null class. Since classes are objects too, this is - actually the same object as 'nil' (and behaves in the same way), - but it has a type of Class, so it is good to use it instead of - 'nil' if you are comparing a Class object to nil as it enables the - compiler to do some type-checking. */ -#define Nil (Class)0 - -/* TODO: Move the 'Protocol' declaration into objc/runtime.h. A - Protocol is simply an object, not a basic Objective-C type. The - Apple runtime defines Protocol in objc/runtime.h too, so it's good - to move it there for API compatibility. */ - -/* A 'Protocol' is a formally defined list of selectors (normally - created using the @protocol Objective-C syntax). It is mostly used - at compile-time to check that classes implement all the methods - that they are supposed to. Protocols are also available in the - runtime system as Protocol objects. */ -#ifndef __OBJC__ - /* Once we stop including the deprecated struct_objc_protocol.h - there is no reason to even define a 'struct objc_protocol'. As - all the structure details will be hidden, a Protocol basically is - simply an object (as it should be). */ - typedef struct objc_object Protocol; -#else /* __OBJC__ */ - @class Protocol; -#endif - -/* Compatibility note: the Apple/NeXT runtime defines sel_getName(), - sel_registerName(), object_getClassName(), object_getIndexedIvars() - in this file while the GNU runtime defines them in runtime.h. - - The reason the GNU runtime does not define them here is that they - are not basic Objective-C types (defined in this file), but are - part of the runtime API (defined in runtime.h). */ - -#ifdef __cplusplus -} -#endif - -#endif /* not __objc_INCLUDE_GNU */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/runtime.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/runtime.h deleted file mode 100644 index a0004aa48..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/runtime.h +++ /dev/null @@ -1,1143 +0,0 @@ -/* GNU Objective-C Runtime API - Modern API - Copyright (C) 2010-2015 Free Software Foundation, Inc. - Contributed by Nicola Pero - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3, or (at your option) any -later version. - -GCC is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - -#ifndef __objc_runtime_INCLUDE_GNU -#define __objc_runtime_INCLUDE_GNU - -/* - This file declares the "modern" GNU Objective-C Runtime API. - - This API replaced the "traditional" GNU Objective-C Runtime API - (which used to be declared in objc/objc-api.h) which is the one - supported by older versions of the GNU Objective-C Runtime. The - "modern" API is very similar to the API used by the modern - Apple/NeXT runtime. -*/ -#include "objc.h" -#include "objc-decls.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* An 'Ivar' represents an instance variable. It holds information - about the name, type and offset of the instance variable. */ -typedef struct objc_ivar *Ivar; - -/* A 'Property' represents a property. It holds information about the - name of the property, and its attributes. - - Compatibility Note: the Apple/NeXT runtime defines this as - objc_property_t, so we define it that way as well, but obviously - Property is the right name. */ -typedef struct objc_property *Property; -typedef struct objc_property *objc_property_t; - -/* A 'Method' represents a method. It holds information about the - name, types and the IMP of the method. */ -typedef struct objc_method *Method; - -/* A 'Category' represents a category. It holds information about the - name of the category, the class it belongs to, and the methods, - protocols and such like provided by the category. */ -typedef struct objc_category *Category; - -/* 'Protocol' is defined in objc/objc.h (which is included by this - file). */ - -/* Method descriptor returned by introspective Object methods. At the - moment, this is really just the first part of the more complete - objc_method structure used internally by the runtime. (PS: In the - GNU Objective-C Runtime, selectors already include a type, so an - objc_method_description does not add much to a SEL. But in other - runtimes, that is not the case, which is why - objc_method_description exists). */ -struct objc_method_description -{ - SEL name; /* Selector (name and signature) */ - char *types; /* Type encoding */ -}; - -/* The following are used in encode strings to describe the type of - Ivars and Methods. */ -#define _C_ID '@' -#define _C_CLASS '#' -#define _C_SEL ':' -#define _C_CHR 'c' -#define _C_UCHR 'C' -#define _C_SHT 's' -#define _C_USHT 'S' -#define _C_INT 'i' -#define _C_UINT 'I' -#define _C_LNG 'l' -#define _C_ULNG 'L' -#define _C_LNG_LNG 'q' -#define _C_ULNG_LNG 'Q' -#define _C_FLT 'f' -#define _C_DBL 'd' -#define _C_LNG_DBL 'D' -#define _C_BFLD 'b' -#define _C_BOOL 'B' -#define _C_VOID 'v' -#define _C_UNDEF '?' -#define _C_PTR '^' -#define _C_CHARPTR '*' -#define _C_ARY_B '[' -#define _C_ARY_E ']' -#define _C_UNION_B '(' -#define _C_UNION_E ')' -#define _C_STRUCT_B '{' -#define _C_STRUCT_E '}' -#define _C_VECTOR '!' -#define _C_COMPLEX 'j' - -/* _C_ATOM is never generated by the compiler. You can treat it as - equivalent to "*". */ -#define _C_ATOM '%' - -/* The following are used in encode strings to describe some - qualifiers of method and ivar types. */ -#define _C_CONST 'r' -#define _C_IN 'n' -#define _C_INOUT 'N' -#define _C_OUT 'o' -#define _C_BYCOPY 'O' -#define _C_BYREF 'R' -#define _C_ONEWAY 'V' -#define _C_GCINVISIBLE '|' - -/* The same when used as flags. */ -#define _F_CONST 0x01 -#define _F_IN 0x01 -#define _F_OUT 0x02 -#define _F_INOUT 0x03 -#define _F_BYCOPY 0x04 -#define _F_BYREF 0x08 -#define _F_ONEWAY 0x10 -#define _F_GCINVISIBLE 0x20 - - -/** Implementation: the following functions are defined inline. */ - -/* Return the class of 'object', or Nil if the object is nil. If - 'object' is a class, the meta class is returned; if 'object' is a - meta class, the root meta class is returned (note that this is - different from the traditional GNU Objective-C Runtime API function - object_get_class(), which for a meta class would return the meta - class itself). This function is inline, so it is really fast and - should be used instead of accessing object->class_pointer - directly. */ -static inline Class -object_getClass (id object) -{ - if (object != nil) - return object->class_pointer; - else - return Nil; -} - - -/** Implementation: the following functions are in selector.c. */ - -/* Return the name of a given selector. If 'selector' is NULL, return - "". */ -objc_EXPORT const char *sel_getName (SEL selector); - -/* Return the type of a given selector. Return NULL if selector is - NULL. - - Compatibility Note: the Apple/NeXT runtime has untyped selectors, - so it does not have this function, which is specific to the GNU - Runtime. */ -objc_EXPORT const char *sel_getTypeEncoding (SEL selector); - -/* This is the same as sel_registerName (). Please use - sel_registerName () instead. */ -objc_EXPORT SEL sel_getUid (const char *name); - -/* Register a selector with a given name (but unspecified types). If - you know the types, it is better to call sel_registerTypedName(). - If a selector with this name and no types already exists, it is - returned. Note that this function should really be called - 'objc_registerSelector'. Return NULL if 'name' is NULL. */ -objc_EXPORT SEL sel_registerName (const char *name); - -/* Register a selector with a given name and types. If a selector - with this name and types already exists, it is returned. Note that - this function should really be called 'objc_registerTypedSelector', - and it's called 'sel_registerTypedName' only for consistency with - 'sel_registerName'. Return NULL if 'name' is NULL. - - Compatibility Note: the Apple/NeXT runtime has untyped selectors, - so it does not have this function, which is specific to the GNU - Runtime. */ -objc_EXPORT SEL sel_registerTypedName (const char *name, const char *type); - -/* Return YES if first_selector is the same as second_selector, and NO - if not. */ -objc_EXPORT BOOL sel_isEqual (SEL first_selector, SEL second_selector); - -/* Return all the selectors with the supplied name. In the GNU - runtime, selectors are typed and there may be multiple selectors - with the same name but a different type. The return value of the - function is a pointer to an area, allocated with malloc(), that - contains all the selectors with the supplier name known to the - runtime. The list is terminated by NULL. Optionally, if you pass - a non-NULL 'numberOfReturnedSelectors' pointer, the unsigned int - that it points to will be filled with the number of selectors - returned. - - Compatibility Note: the Apple/NeXT runtime has untyped selectors, - so it does not have this function, which is specific to the GNU - Runtime. */ -objc_EXPORT SEL * sel_copyTypedSelectorList (const char *name, - unsigned int *numberOfReturnedSelectors); - -/* Return a selector with name 'name' and a non-zero type encoding, if - there is a single selector with a type, and with that name, - registered with the runtime. If there is no such selector, or if - there are multiple selectors with the same name but conflicting - types, NULL is returned. Return NULL if 'name' is NULL. - - This is useful if you have the name of the selector, and would - really like to get a selector for it that includes the type - encoding. Unfortunately, if the program contains multiple selector - with the same name but different types, sel_getTypedSelector can - not possibly know which one you need, and so will return NULL. - - Compatibility Note: the Apple/NeXT runtime has untyped selectors, - so it does not have this function, which is specific to the GNU - Runtime. */ -objc_EXPORT SEL sel_getTypedSelector (const char *name); - - -/** Implementation: the following functions are in objects.c. */ - -/* Create an instance of class 'class_', adding extraBytes to the size - of the returned object. This method allocates the appropriate - amount of memory for the instance, initializes it to zero, then - calls all the C++ constructors on appropriate C++ instance - variables of the instance (if any) (TODO: The C++ constructors bit - is not implemented yet). */ -objc_EXPORT id class_createInstance (Class class_, size_t extraBytes); - -/* Copy an object and return the copy. extraBytes should be identical - to the extraBytes parameter that was passed when creating the - original object. */ -objc_EXPORT id object_copy (id object, size_t extraBytes); - -/* Dispose of an object. This method calls the appropriate C++ - destructors on appropriate C++ instance variables of the instance - (if any) (TODO: This is not implemented yet), then frees the memory - for the instance. */ -objc_EXPORT id object_dispose (id object); - -/* Return the name of the class of 'object'. If 'object' is 'nil', - returns "Nil". */ -objc_EXPORT const char * object_getClassName (id object); - -/* Change the class of object to be class_. Return the previous class - of object. This is currently not really thread-safe. */ -objc_EXPORT Class object_setClass (id object, Class class_); - - -/** Implementation: the following functions are in ivars.c. */ - -/* Return an instance variable given the class and the instance - variable name. This is an expensive function to call, so try to - reuse the returned Ivar if you can. */ -objc_EXPORT Ivar class_getInstanceVariable (Class class_, const char *name); - -/* Return a class variable given the class and the class variable - name. This is an expensive function to call, so try to reuse the - returned Ivar if you can. - - This function always returns NULL since class variables are - currently unavailable in Objective-C. */ -objc_EXPORT Ivar class_getClassVariable (Class class_, const char *name); - -/* If the object was created in class_createInstance() with some - extraBytes, returns a pointer to them. If it was not, then the - returned pointer may make no sense. */ -objc_EXPORT void * object_getIndexedIvars (id object); - -/* Get the value of an instance variable of type 'id'. The function - returns the instance variable. To get the value of the instance - variable, you should pass as 'returnValue' a pointer to an 'id'; - the value will be copied there. Note that 'returnValue' is really - a 'void *', not a 'void **'. This function really works only with - instance variables of type 'id'; for other types of instance - variables, access directly the data at (char *)object + - ivar_getOffset (ivar). */ -objc_EXPORT Ivar object_getInstanceVariable (id object, const char *name, void **returnValue); - -/* Set the value of an instance variable. The value to set is passed - in 'newValue' (which really is an 'id', not a 'void *'). The - function returns the instance variable. This function really works - only with instance variables of type 'id'; for other types of - instance variables, access directly the data at (char *)object + - ivar_getOffset (ivar). */ -objc_EXPORT Ivar object_setInstanceVariable (id object, const char *name, void *newValue); - -/* Get the value of an instance variable of type 'id' of the object - 'object'. This is faster than object_getInstanceVariable if you - already have the instance variable because it avoids the expensive - call to class_getInstanceVariable that is done by - object_getInstanceVariable. */ -objc_EXPORT id object_getIvar (id object, Ivar variable); - -/* Set the value of an instance variable of type 'id' of the object - 'object'. This is faster than object_setInstanceVariable if you - already have the instance variable because it avoids the expensive - call to class_getInstanceVariable that is done by - object_setInstanceVariable. */ -objc_EXPORT void object_setIvar (id object, Ivar variable, id value); - -/* Return the name of the instance variable. Return NULL if - 'variable' is NULL. */ -objc_EXPORT const char * ivar_getName (Ivar variable); - -/* Return the offset of the instance variable from the start of the - object data. Return 0 if 'variable' is NULL. */ -objc_EXPORT ptrdiff_t ivar_getOffset (Ivar variable); - -/* Return the type encoding of the variable. Return NULL if - 'variable' is NULL. */ -objc_EXPORT const char * ivar_getTypeEncoding (Ivar variable); - -/* Return all the instance variables of the class. The return value - of the function is a pointer to an area, allocated with malloc(), - that contains all the instance variables of the class. It does not - include instance variables of superclasses. The list is terminated - by NULL. Optionally, if you pass a non-NULL - 'numberOfReturnedIvars' pointer, the unsigned int that it points to - will be filled with the number of instance variables returned. - Return NULL for classes still in construction (ie, allocated using - objc_allocatedClassPair() but not yet registered with the runtime - using objc_registerClassPair()). */ -objc_EXPORT Ivar * class_copyIvarList (Class class_, unsigned int *numberOfReturnedIvars); - -/* Add an instance variable with name 'ivar_name' to class 'class_', - where 'class_' is a class in construction that has been created - using objc_allocateClassPair() and has not been registered with the - runtime using objc_registerClassPair() yet. You can not add - instance variables to classes already registered with the runtime. - 'size' is the size of the instance variable, 'log_2_of_alignment' - the alignment as a power of 2 (so 0 means alignment to a 1 byte - boundary, 1 means alignment to a 2 byte boundary, 2 means alignment - to a 4 byte boundary, etc), and 'type' the type encoding of the - variable type. You can use sizeof(), log2(__alignof__()) and - @encode() to determine the right 'size', 'alignment' and 'type' for - your instance variable. For example, to add an instance variable - name "my_variable" and of type 'id', you can use: - - class_addIvar (class, "my_variable", sizeof (id), log2 ( __alignof__ (id)), - @encode (id)); - - Return YES if the variable was added, and NO if not. In - particular, return NO if 'class_' is Nil, or a meta-class or a - class not in construction. Return Nil also if 'ivar_name' or - 'type' is NULL, or 'size' is 0. - */ -objc_EXPORT BOOL class_addIvar (Class class_, const char * ivar_name, size_t size, - unsigned char log_2_of_alignment, const char *type); - -/* Return the name of the property. Return NULL if 'property' is - NULL. */ -objc_EXPORT const char * property_getName (Property property); - -/* Return the attributes of the property as a string. Return NULL if - 'property' is NULL. */ -objc_EXPORT const char * property_getAttributes (Property property); - -/* Return the property with name 'propertyName' of the class 'class_'. - This function returns NULL if the required property can not be - found. Return NULL if 'class_' or 'propertyName' is NULL. - - Note that the traditional ABI does not store the list of properties - of a class in a compiled module, so the traditional ABI will always - return NULL. */ -objc_EXPORT Property class_getProperty (Class class_, const char *propertyName); - -/* Return all the properties of the class. The return value - of the function is a pointer to an area, allocated with malloc(), - that contains all the properties of the class. It does not - include properties of superclasses. The list is terminated - by NULL. Optionally, if you pass a non-NULL - 'numberOfReturnedIvars' pointer, the unsigned int that it points to - will be filled with the number of properties returned. - - Note that the traditional ABI does not store the list of properties - of a class in a compiled module, so the traditional ABI will always - return an empty list. */ -objc_EXPORT Property * class_copyPropertyList -(Class class_, unsigned int *numberOfReturnedProperties); - -/* Return the ivar layout for class 'class_'. - - At the moment this function always returns NULL. */ -objc_EXPORT const char * class_getIvarLayout (Class class_); - -/* Return the weak ivar layout for class 'class_'. - - At the moment this function always returns NULL. */ -objc_EXPORT const char * class_getWeakIvarLayout (Class class_); - -/* Set the ivar layout for class 'class_'. - - At the moment, this function does nothing. */ -objc_EXPORT void class_setIvarLayout (Class class_, const char *layout); - -/* Set the weak ivar layout for class 'class_'. - - At the moment, this function does nothing. With the GNU runtime, - you should use class_ivar_set_gcinvisible () to hide variables from - the Garbage Collector. */ -objc_EXPORT void class_setWeakIvarLayout (Class class_, const char *layout); - - -/** Implementation: the following functions are in class.c. */ - -/* Compatibility Note: The Apple/NeXT runtime does not have - objc_get_unknown_class_handler and - objc_setGetUnknownClassHandler(). They provide functionality that - the traditional GNU Objective-C Runtime API used to provide via the - _objc_lookup_class hook. */ - -/* An 'objc_get_unknown_class_handler' function is used by - objc_getClass() to get a class that is currently unknown to the - compiler. You could use it for example to have the class loaded by - dynamically loading a library. 'class_name' is the name of the - class. The function should return the Class object if it manages to - load the class, and Nil if not. */ -typedef Class (*objc_get_unknown_class_handler)(const char *class_name); - -/* Sets a new handler function for getting unknown classes (to be used - by objc_getClass () and related), and returns the previous one. - This function is not safe to call in a multi-threaded environment - because other threads may be trying to use the get unknown class - handler while you change it! */ -objc_EXPORT -objc_get_unknown_class_handler -objc_setGetUnknownClassHandler (objc_get_unknown_class_handler new_handler); - -/* Return the class with name 'name', if it is already registered with - the runtime. If it is not registered, and - objc_setGetUnknownClassHandler() has been called to set a handler - for unknown classes, the handler is called to give it a chance to - load the class in some other way. If the class is not known to the - runtime and the handler is not set or returns Nil, objc_getClass() - returns Nil. */ -objc_EXPORT Class objc_getClass (const char *name); - -/* Return the class with name 'name', if it is already registered with - the runtime. Return Nil if not. This function does not call the - objc_get_unknown_class_handler function if the class is not - found. */ -objc_EXPORT Class objc_lookUpClass (const char *name); - -/* Return the meta class associated to the class with name 'name', if - it is already registered with the runtime. First, it finds the - class using objc_getClass(). Then, it returns the associated meta - class. If the class could not be found using objc_getClass(), - returns Nil. */ -objc_EXPORT Class objc_getMetaClass (const char *name); - -/* This is identical to objc_getClass(), but if the class is not found, - it aborts the process instead of returning Nil. */ -objc_EXPORT Class objc_getRequiredClass (const char *name); - -/* If 'returnValue' is NULL, 'objc_getClassList' returns the number of - classes currently registered with the runtime. If 'returnValue' is - not NULL, it should be a (Class *) pointer to an area of memory - which can contain up to 'maxNumberOfClassesToReturn' Class records. - 'objc_getClassList' will fill the area pointed to by 'returnValue' - with all the Classes registered with the runtime (or up to - maxNumberOfClassesToReturn if there are more than - maxNumberOfClassesToReturn). The function return value is the - number of classes actually returned in 'returnValue'. */ -objc_EXPORT int objc_getClassList (Class *returnValue, int maxNumberOfClassesToReturn); - -/* Compatibility Note: The Apple/NeXT runtime also has - - Class objc_getFutureClass (const char *name); - void objc_setFutureClass (Class class_, const char *name); - - the documentation is unclear on what they are supposed to do, and - the GNU Objective-C Runtime currently does not provide them. */ - -/* Return the name of the class 'class_', or the string "nil" if the - class_ is Nil. */ -objc_EXPORT const char * class_getName (Class class_); - -/* Return YES if 'class_' is a meta class, and NO if not. If 'class_' - is Nil, return NO. */ -objc_EXPORT BOOL class_isMetaClass (Class class_); - -/* Return the superclass of 'class_'. If 'class_' is Nil, or it is a - root class, return Nil. This function also works if 'class_' is a - class being constructed, that is, a class returned by - objc_allocateClassPair() but before it has been registered with the - runtime using objc_registerClassPair(). */ -objc_EXPORT Class class_getSuperclass (Class class_); - -/* Return the 'version' number of the class, which is an integer that - can be used to track changes in the class API, methods and - variables. If class_ is Nil, return 0. If class_ is not Nil, the - version is 0 unless class_setVersion() has been called to set a - different one. - - Please note that internally the version is a long, but the API only - allows you to set and retrieve int values. */ -objc_EXPORT int class_getVersion (Class class_); - -/* Set the 'version' number of the class, which is an integer that can - be used to track changes in the class API, methods and variables. - If 'class_' is Nil, does nothing. - - This is typically used internally by "Foundation" libraries such as - GNUstep Base to support serialization / deserialization of objects - that work across changes in the classes. If you are using such a - library, you probably want to use their versioning API, which may - be based on this one, but is integrated with the rest of the - library. - - Please note that internally the version is a long, but the API only - allows you to set and retrieve int values. */ -objc_EXPORT void class_setVersion (Class class_, int version); - -/* Return the size in bytes (a byte is the size of a char) of an - instance of the class. If class_ is Nil, return 0; else it return - a non-zero number (since the 'isa' instance variable is required - for all classes). */ -objc_EXPORT size_t class_getInstanceSize (Class class_); - -/* Change the implementation of the method. It also searches all - classes for any class implementing the method, and replaces the - existing implementation with the new one. For that to work, - 'method' must be a method returned by class_getInstanceMethod() or - class_getClassMethod() as the matching is done by comparing the - pointers; in that case, only the implementation in the class is - modified. Return the previous implementation that has been - replaced. If method or implementation is NULL, do nothing and - return NULL. */ -objc_EXPORT IMP -method_setImplementation (Method method, IMP implementation); - -/* Swap the implementation of two methods in a single, atomic - operation. This is equivalent to getting the implementation of - each method and then calling method_setImplementation() on the - other one. For this to work, the two methods must have been - returned by class_getInstanceMethod() or class_getClassMethod(). - If 'method_a' or 'method_b' is NULL, do nothing. */ -objc_EXPORT void -method_exchangeImplementations (Method method_a, Method method_b); - -/* Create a new class/meta-class pair. This function is called to - create a new class at runtime. The class is created with - superclass 'superclass' (use 'Nil' to create a new root class) and - name 'class_name'. 'extraBytes' can be used to specify some extra - space for indexed variables to be added at the end of the class and - meta-class objects (it is recommended that you set extraBytes to - 0). Once you have created the class, it is not usable yet. You - need to add any instance variables (by using class_addIvar()), any - instance methods (by using class_addMethod()) and any class methods - (by using class_addMethod() on the meta-class, as in - class_addMethod (object_getClass (class), method)) that are - required, and then you need to call objc_registerClassPair() to - activate the class. If you need to create a hierarchy of classes, - you need to create and register them one at a time. You can not - create a new class using another class in construction as - superclass. Return Nil if 'class-name' is NULL or if a class with - that name already exists or 'superclass' is a class still in - construction. - - Implementation Note: in the GNU runtime, allocating a class pair - only creates the structures for the class pair, but does not - register anything with the runtime. The class is registered with - the runtime only when objc_registerClassPair() is called. In - particular, if a class is in construction, objc_getClass() will not - find it, the superclass will not know about it, - class_getSuperclass() will return Nil and another thread may - allocate a class pair with the same name; the conflict will only be - detected when the classes are registered with the runtime. - */ -objc_EXPORT Class -objc_allocateClassPair (Class super_class, const char *class_name, - size_t extraBytes); - -/* Register a class pair that was created with - objc_allocateClassPair(). After you register a class, you can no - longer make changes to its instance variables, but you can start - creating instances of it. Do nothing if 'class_' is NULL or if it - is not a class allocated by objc_allocateClassPair() and still in - construction. */ -objc_EXPORT void -objc_registerClassPair (Class class_); - -/* Dispose of a class pair created using objc_allocateClassPair(). - Call this function if you started creating a new class with - objc_allocateClassPair() but then want to abort the process. You - should not access 'class_' after calling this method. Note that if - 'class_' has already been registered with the runtime via - objc_registerClassPair(), this function does nothing; you can only - dispose of class pairs that are still being constructed. Do - nothing if class is 'Nil' or if 'class_' is not a class being - constructed. */ -objc_EXPORT void -objc_disposeClassPair (Class class_); - -/* Compatibility Note: The Apple/NeXT runtime has the function - objc_duplicateClass () but it's undocumented. The GNU runtime does - not have it. */ - - -/** Implementation: the following functions are in sendmsg.c. */ - -/* Return the instance method with selector 'selector' of class - 'class_', or NULL if the class (or one of its superclasses) does - not implement the method. Return NULL if class_ is Nil or selector - is NULL. Calling this function may trigger a call to - +resolveInstanceMethod:, but does not return a forwarding - function. */ -objc_EXPORT Method class_getInstanceMethod (Class class_, SEL selector); - -/* Return the class method with selector 'selector' of class 'class_', - or NULL if the class (or one of its superclasses) does not - implement the method. Return NULL if class_ is Nil or selector is - NULL. Calling this function may trigger a call to - +resolveClassMethod:, but does not return a forwarding - function. */ -objc_EXPORT Method class_getClassMethod (Class class_, SEL selector); - -/* Return the IMP (pointer to the function implementing a method) for - the instance method with selector 'selector' in class 'class_'. - This is the same routine that is used while messaging, and should - be very fast. Note that you most likely would need to cast the - return function pointer to a function pointer with the appropriate - arguments and return type before calling it. To get a class - method, you can pass the meta-class as the class_ argument (ie, use - class_getMethodImplementation (object_getClass (class_), - selector)). Return NULL if class_ is Nil or selector is NULL. - This function first looks for an existing method; if it is not - found, it calls +resolveClassMethod: or +resolveInstanceMethod: - (depending on whether a class or instance method is being looked - up) if it is implemented. If the method returns YES, then it tries - the look up again (the assumption being that +resolveClassMethod: - or resolveInstanceMethod: will add the method using - class_addMethod()). If it is still not found, it returns a - forwarding function. */ -objc_EXPORT IMP class_getMethodImplementation (Class class_, SEL selector); - -/* Compatibility Note: the Apple/NeXT runtime has the function - class_getMethodImplementation_stret () which currently does not - exist on the GNU runtime because the messaging implementation is - different. */ - -/* Return YES if class 'class_' has an instance method implementing - selector 'selector', and NO if not. Return NO if class_ is Nil or - selector is NULL. If you need to check a class method, use the - meta-class as the class_ argument (ie, use class_respondsToSelector - (object_getClass (class_), selector)). */ -objc_EXPORT BOOL class_respondsToSelector (Class class_, SEL selector); - -/* Add a method to a class. Use this function to add a new method to - a class (potentially overriding a method with the same selector in - the superclass); if you want to modify an existing method, use - method_setImplementation() instead (or class_replaceMethod ()). - This method adds an instance method to 'class_'; to add a class - method, get the meta class first, then add the method to the meta - class, that is, use - - class_addMethod (object_getClass (class_), selector, - implementation, type); - - Return YES if the method was added, and NO if not. Do nothing if - one of the arguments is NULL. */ -objc_EXPORT BOOL class_addMethod (Class class_, SEL selector, IMP implementation, - const char *method_types); - -/* Replace a method in a class. If the class already have a method - with this 'selector', find it and use method_setImplementation() to - replace the implementation with 'implementation' (method_types is - ignored in that case). If the class does not already have a method - with this 'selector', call 'class_addMethod() to add it. - - Return the previous implementation of the method, or NULL if none - was found. Return NULL if any of the arguments is NULL. */ -objc_EXPORT IMP class_replaceMethod (Class class_, SEL selector, IMP implementation, - const char *method_types); - - -/** Implementation: the following functions are in methods.c. */ - -/* Return the selector for method 'method'. Return NULL if 'method' - is NULL. - - This function is misnamed; it should be called - 'method_getSelector'. To get the actual name, get the selector, - then the name from the selector (ie, use sel_getName - (method_getName (method))). */ -objc_EXPORT SEL method_getName (Method method); - -/* Return the IMP of the method. Return NULL if 'method' is NULL. */ -objc_EXPORT IMP method_getImplementation (Method method); - -/* Return the type encoding of the method. Return NULL if 'method' is - NULL. */ -objc_EXPORT const char * method_getTypeEncoding (Method method); - -/* Return a method description for the method. Return NULL if - 'method' is NULL. */ -objc_EXPORT struct objc_method_description * method_getDescription (Method method); - -/* Return all the instance methods of the class. The return value of - the function is a pointer to an area, allocated with malloc(), that - contains all the instance methods of the class. It does not - include instance methods of superclasses. The list is terminated - by NULL. Optionally, if you pass a non-NULL - 'numberOfReturnedMethods' pointer, the unsigned int that it points - to will be filled with the number of instance methods returned. To - get the list of class methods, pass the meta-class in the 'class_' - argument, (ie, use class_copyMethodList (object_getClass (class_), - &numberOfReturnedMethods)). */ -objc_EXPORT Method * class_copyMethodList (Class class_, unsigned int *numberOfReturnedMethods); - - -/** Implementation: the following functions are in encoding.c. */ - -/* Return the number of arguments that the method 'method' expects. - Note that all methods need two implicit arguments ('self' for the - receiver, and '_cmd' for the selector). Return 0 if 'method' is - NULL. */ -objc_EXPORT unsigned int method_getNumberOfArguments (Method method); - -/* Return the string encoding for the return type of method 'method'. - The string is a standard zero-terminated string in an area of - memory allocated with malloc(); you should free it with free() when - you finish using it. Return an empty string if method is NULL. */ -objc_EXPORT char * method_copyReturnType (Method method); - -/* Return the string encoding for the argument type of method - 'method', argument number 'argumentNumber' ('argumentNumber' is 0 - for self, 1 for _cmd, and 2 or more for the additional arguments if - any). The string is a standard zero-terminated string in an area - of memory allocated with malloc(); you should free it with free() - when you finish using it. Return an empty string if method is NULL - or if 'argumentNumber' refers to a non-existing argument. */ -objc_EXPORT char * method_copyArgumentType (Method method, unsigned int argumentNumber); - -/* Return the string encoding for the return type of method 'method'. - The string is returned by copying it into the supplied - 'returnValue' string, which is of size 'returnValueSize'. No more - than 'returnValueSize' characters are copied; if the encoding is - smaller than 'returnValueSize', the rest of 'returnValue' is filled - with zeros. If it is bigger, it is truncated (and would not be - zero-terminated). You should supply a big enough - 'returnValueSize'. If the method is NULL, returnValue is set to a - string of zeros. */ -objc_EXPORT void method_getReturnType (Method method, char *returnValue, - size_t returnValueSize); - -/* Return the string encoding for the argument type of method - 'method', argument number 'argumentNumber' ('argumentNumber' is 0 - for self, 1 for _cmd, and 2 or more for the additional arguments if - any). The string is returned by copying it into the supplied - 'returnValue' string, which is of size 'returnValueSize'. No more - than 'returnValueSize' characters are copied; if the encoding is - smaller than 'returnValueSize', the rest of 'returnValue' is filled - with zeros. If it is bigger, it is truncated (and would not be - zero-terminated). You should supply a big enough - 'returnValueSize'. If the method is NULL, returnValue is set to a - string of zeros. */ -objc_EXPORT void method_getArgumentType (Method method, unsigned int argumentNumber, - char *returnValue, size_t returnValueSize); - - -/** Implementation: the following functions are in protocols.c. */ - -/* Return the protocol with name 'name', or nil if it the protocol is - not known to the runtime. */ -objc_EXPORT Protocol *objc_getProtocol (const char *name); - -/* Return all the protocols known to the runtime. The return value of - the function is a pointer to an area, allocated with malloc(), that - contains all the protocols known to the runtime; the list is - terminated by NULL. You should free this area using free() once - you no longer need it. Optionally, if you pass a non-NULL - 'numberOfReturnedProtocols' pointer, the unsigned int that it - points to will be filled with the number of protocols returned. If - there are no protocols known to the runtime, NULL is returned. */ -objc_EXPORT Protocol **objc_copyProtocolList (unsigned int *numberOfReturnedProtocols); - -/* Add a protocol to a class, and return YES if it was done - successfully, and NO if not. At the moment, NO should only happen - if class_ or protocol are nil, if the protocol is not a Protocol - object or if the class already conforms to the protocol. */ -objc_EXPORT BOOL class_addProtocol (Class class_, Protocol *protocol); - -/* Return YES if the class 'class_' conforms to Protocol 'protocol', - and NO if not. This function does not check superclasses; if you - want to check for superclasses (in the way that [NSObject - +conformsToProtocol:] does) you need to iterate over the class - hierarchy using class_getSuperclass(), and call - class_conformsToProtocol() for each of them. */ -objc_EXPORT BOOL class_conformsToProtocol (Class class_, Protocol *protocol); - -/* Return all the protocols that the class conforms to. The return - value of the function is a pointer to an area, allocated with - malloc(), that contains all the protocols formally adopted by the - class. It does not include protocols adopted by superclasses. The - list is terminated by NULL. Optionally, if you pass a non-NULL - 'numberOfReturnedProtocols' pointer, the unsigned int that it - points to will be filled with the number of protocols returned. - This function does not return protocols that superclasses conform - to. */ -objc_EXPORT Protocol **class_copyProtocolList (Class class_, unsigned int *numberOfReturnedProtocols); - -/* Return YES if protocol 'protocol' conforms to protocol - 'anotherProtocol', and NO if not. Note that if one of the two - protocols is nil, it returns NO. */ -objc_EXPORT BOOL protocol_conformsToProtocol (Protocol *protocol, Protocol *anotherProtocol); - -/* Return YES if protocol 'protocol' is the same as protocol - 'anotherProtocol', and 'NO' if not. Note that it returns YES if - the two protocols are both nil. */ -objc_EXPORT BOOL protocol_isEqual (Protocol *protocol, Protocol *anotherProtocol); - -/* Return the name of protocol 'protocol'. If 'protocol' is nil or is - not a Protocol, return NULL. */ -objc_EXPORT const char *protocol_getName (Protocol *protocol); - -/* Return the method description for the method with selector - 'selector' in protocol 'protocol'; if 'requiredMethod' is YES, the - function searches the list of required methods; if NO, the list of - optional methods. If 'instanceMethod' is YES, the function search - for an instance method; if NO, for a class method. If there is no - matching method, an objc_method_description structure with both - name and types set to NULL is returned. This function will only - find methods that are directly declared in the protocol itself, not - in other protocols that this protocol adopts. - - Note that the traditional ABI does not store the list of optional - methods of a protocol in a compiled module, so the traditional ABI - will always return (NULL, NULL) when requiredMethod == NO. */ -objc_EXPORT struct objc_method_description protocol_getMethodDescription (Protocol *protocol, - SEL selector, - BOOL requiredMethod, - BOOL instanceMethod); - -/* Return the method descriptions of all the methods of the protocol. - The return value of the function is a pointer to an area, allocated - with malloc(), that contains all the method descriptions of the - methods of the protocol. It does not recursively include methods - of the protocols adopted by this protocol. The list is terminated - by a NULL objc_method_description (one with both fields set to - NULL). Optionally, if you pass a non-NULL - 'numberOfReturnedMethods' pointer, the unsigned int that it points - to will be filled with the number of properties returned. - - Note that the traditional ABI does not store the list of optional - methods of a protocol in a compiled module, so the traditional ABI - will always return an empty list if requiredMethod is set to - NO. */ -objc_EXPORT struct objc_method_description *protocol_copyMethodDescriptionList (Protocol *protocol, - BOOL requiredMethod, - BOOL instanceMethod, - unsigned int *numberOfReturnedMethods); - -/* Return the property with name 'propertyName' of the protocol - 'protocol'. If 'requiredProperty' is YES, the function searches - the list of required properties; if NO, the list of optional - properties. If 'instanceProperty' is YES, the function searches - the list of instance properties; if NO, the list of class - properties. At the moment, optional properties and class - properties are not part of the Objective-C language, so both - 'requiredProperty' and 'instanceProperty' should be set to YES. - This function returns NULL if the required property can not be - found. - - Note that the traditional ABI does not store the list of properties - of a protocol in a compiled module, so the traditional ABI will - always return NULL. */ -objc_EXPORT Property protocol_getProperty (Protocol *protocol, const char *propertyName, - BOOL requiredProperty, BOOL instanceProperty); - -/* Return all the properties of the protocol. The return value of the - function is a pointer to an area, allocated with malloc(), that - contains all the properties of the protocol. It does not - recursively include properties of the protocols adopted by this - protocol. The list is terminated by NULL. Optionally, if you pass - a non-NULL 'numberOfReturnedProperties' pointer, the unsigned int - that it points to will be filled with the number of properties - returned. - - Note that the traditional ABI does not store the list of properties - of a protocol in a compiled module, so the traditional ABI will - always return NULL and store 0 in numberOfReturnedProperties. */ -objc_EXPORT Property *protocol_copyPropertyList (Protocol *protocol, unsigned int *numberOfReturnedProperties); - -/* Return all the protocols that the protocol conforms to. The return - value of the function is a pointer to an area, allocated with - malloc(), that contains all the protocols formally adopted by the - protocol. It does not recursively include protocols adopted by the - protocols adopted by this protocol. The list is terminated by - NULL. Optionally, if you pass a non-NULL - 'numberOfReturnedProtocols' pointer, the unsigned int that it - points to will be filled with the number of protocols returned. */ -objc_EXPORT Protocol **protocol_copyProtocolList (Protocol *protocol, unsigned int *numberOfReturnedProtocols); - - -/** Implementation: the following hook is in init.c. */ - -/* This is a hook which is called by __objc_exec_class every time a - class or a category is loaded into the runtime. This may e.g. help - a dynamic loader determine the classes that have been loaded when - an object file is dynamically linked in. */ -objc_EXPORT void (*_objc_load_callback)(Class _class, struct objc_category *category); - - -/** Implementation: the following functions are in objc-foreach.c. */ - -/* 'objc_enumerationMutation()' is called when a collection is - mutated while being "fast enumerated". That is a hard error, and - objc_enumerationMutation is called to deal with it. 'collection' - is the collection object that was mutated during an enumeration. - - objc_enumerationMutation() will invoke the mutation handler if any - is set. Then, it will abort the program. - - Compatibility note: the Apple runtime will not abort the program - after calling the mutation handler. */ -objc_EXPORT void objc_enumerationMutation (id collection); - -/* 'objc_set_enumeration_mutation_handler' can be used to set a - function that will be called (instead of aborting) when a fast - enumeration is mutated during enumeration. The handler will be - called with the 'collection' being mutated as the only argument and - it should not return; it should either exit the program, or could - throw an exception. The recommended implementation is to throw an - exception - the user can then use exception handlers to deal with - it. - - This function is not thread safe (other threads may be trying to - invoke the enumeration mutation handler while you are changing it!) - and should be called during during the program initialization - before threads are started. It is mostly reserved for "Foundation" - libraries; in the case of GNUstep, GNUstep Base may be using this - function to improve the standard enumeration mutation handling. - You probably shouldn't use this function unless you are writing - your own Foundation library. */ -objc_EXPORT void objc_setEnumerationMutationHandler (void (*handler)(id)); - -/* This structure (used during fast enumeration) is automatically - defined by the compiler (it is as if this definition was always - included in all Objective-C files). Note that it is usually - defined again with the name of NSFastEnumeration by "Foundation" - libraries such as GNUstep Base. And if NSFastEnumeration is - defined, the compiler will use it instead of - __objcFastEnumerationState when doing fast enumeration. */ -/* -struct __objcFastEnumerationState -{ - unsigned long state; - id *itemsPtr; - unsigned long *mutationsPtr; - unsigned long extra[5]; -}; -*/ - - -/* Compatibility Note: The Apple/NeXT runtime has the functions - objc_copyImageNames (), class_getImageName () and - objc_copyClassNamesForImage () but they are undocumented. The GNU - runtime does not have them at the moment. */ - -/* Compatibility Note: The Apple/NeXT runtime has the functions - objc_setAssociatedObject (), objc_getAssociatedObject (), - objc_removeAssociatedObjects () and the objc_AssociationPolicy type - and related enum. The GNU runtime does not have them yet. - TODO: Implement them. */ - -/* Compatibility Note: The Apple/NeXT runtime has the function - objc_setForwardHandler (). The GNU runtime does not have it - because messaging (and, in particular, forwarding) works in a - different (incompatible) way with the GNU runtime. If you need to - customize message forwarding at the Objective-C runtime level (that - is, if you are implementing your own "Foundation" library such as - GNUstep Base on top of the Objective-C runtime), in objc/message.h - there are hooks (that work in the framework of the GNU runtime) to - do so. */ - - -/** Implementation: the following functions are in memory.c. */ - -/* Traditional GNU Objective-C Runtime functions that are used for - memory allocation and disposal. These functions are used in the - same way as you use malloc, realloc, calloc and free and make sure - that memory allocation works properly with the garbage - collector. - - Compatibility Note: these functions are not available with the - Apple/NeXT runtime. */ - -objc_EXPORT void *objc_malloc(size_t size); - -/* FIXME: Shouldn't the following be called objc_malloc_atomic ? The - GC function is GC_malloc_atomic() which makes sense. - */ -objc_EXPORT void *objc_atomic_malloc(size_t size); - -objc_EXPORT void *objc_realloc(void *mem, size_t size); - -objc_EXPORT void *objc_calloc(size_t nelem, size_t size); - -objc_EXPORT void objc_free(void *mem); - - -/** Implementation: the following functions are in gc.c. */ - -/* The GNU Objective-C Runtime has a different implementation of - garbage collection. - - Compatibility Note: these functions are not available with the - Apple/NeXT runtime. */ - -/* Mark the instance variable as inaccessible to the garbage - collector. */ -objc_EXPORT void class_ivar_set_gcinvisible (Class _class, - const char* ivarname, - BOOL gcInvisible); - - -/** Implementation: the following functions are in encoding.c. */ - -/* Traditional GNU Objective-C Runtime functions that are currently - used to implement method forwarding. - - Compatibility Note: these functions are not available with the - Apple/NeXT runtime. */ - -/* Return the size of a variable which has the specified 'type' - encoding. */ -objc_EXPORT int objc_sizeof_type (const char *type); - -/* Return the align of a variable which has the specified 'type' - encoding. */ -objc_EXPORT int objc_alignof_type (const char *type); - -/* Return the aligned size of a variable which has the specified - 'type' encoding. The aligned size is the size rounded up to the - nearest alignment. */ -objc_EXPORT int objc_aligned_size (const char *type); - -/* Return the promoted size of a variable which has the specified - 'type' encoding. This is the size rounded up to the nearest - integral of the wordsize, taken to be the size of a void *. */ -objc_EXPORT int objc_promoted_size (const char *type); - - -/* The following functions are used when parsing the type encoding of - methods, to skip over parts that are ignored. They take as - argument a pointer to a location inside the type encoding of a - method (which is a string) and return a new pointer, pointing to a - new location inside the string after having skipped the unwanted - information. */ - -/* Skip some type qualifiers (_C_CONST, _C_IN, etc). These may - eventually precede typespecs occurring in method prototype - encodings. */ -objc_EXPORT const char *objc_skip_type_qualifiers (const char *type); - -/* Skip one typespec element (_C_CLASS, _C_SEL, etc). If the typespec - is prepended by type qualifiers, these are skipped as well. */ -objc_EXPORT const char *objc_skip_typespec (const char *type); - -/* Skip an offset. */ -objc_EXPORT const char *objc_skip_offset (const char *type); - -/* Skip an argument specification (ie, skipping a typespec, which may - include qualifiers, and an offset too). */ -objc_EXPORT const char *objc_skip_argspec (const char *type); - -/* Read type qualifiers (_C_CONST, _C_IN, etc) from string 'type' - (stopping at the first non-type qualifier found) and return an - unsigned int which is the logical OR of all the corresponding flags - (_F_CONST, _F_IN etc). */ -objc_EXPORT unsigned objc_get_type_qualifiers (const char *type); - - -/* Note that the following functions work for very simple structures, - but get easily confused by more complicated ones (for example, - containing vectors). A better solution is required. These - functions are likely to change in the next GCC release. */ - -/* The following three functions can be used to determine how a - structure is laid out by the compiler. For example: - - struct objc_struct_layout layout; - int i; - - objc_layout_structure (type, &layout); - while (objc_layout_structure_next_member (&layout)) - { - int position, align; - const char *type; - - objc_layout_structure_get_info (&layout, &position, &align, &type); - printf ("element %d has offset %d, alignment %d\n", - i++, position, align); - } - - These functions are used by objc_sizeof_type and objc_alignof_type - functions to compute the size and alignment of structures. The - previous method of computing the size and alignment of a structure - was not working on some architectures, particularly on AIX, and in - the presence of bitfields inside the structure. */ -struct objc_struct_layout -{ - const char *original_type; - const char *type; - const char *prev_type; - unsigned int record_size; - unsigned int record_align; -}; - -objc_EXPORT void objc_layout_structure (const char *type, - struct objc_struct_layout *layout); -objc_EXPORT BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout); -objc_EXPORT void objc_layout_finish_structure (struct objc_struct_layout *layout, - unsigned int *size, - unsigned int *align); -objc_EXPORT void objc_layout_structure_get_info (struct objc_struct_layout *layout, - unsigned int *offset, - unsigned int *align, - const char **type); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/thr.h b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/thr.h deleted file mode 100644 index 1dc3254ef..000000000 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/objc/thr.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Thread and mutex controls for Objective C. - Copyright (C) 1996-2015 Free Software Foundation, Inc. - Contributed by Galen C. Hunt (gchunt@cs.rochester.edu) - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -. */ - -#ifndef __thread_INCLUDE_GNU -#define __thread_INCLUDE_GNU - -#include "objc.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/************************************************************************* - * Universal static variables: - */ -extern int __objc_thread_exit_status; /* Global exit status. */ - -/******** - * Thread safe implementation types and functions. - */ - -/* Thread priorities */ -#define OBJC_THREAD_INTERACTIVE_PRIORITY 2 -#define OBJC_THREAD_BACKGROUND_PRIORITY 1 -#define OBJC_THREAD_LOW_PRIORITY 0 - -/* A thread */ -typedef void * objc_thread_t; - -/* This structure represents a single mutual exclusion lock. */ -struct objc_mutex -{ - volatile objc_thread_t owner; /* Id of thread that owns. */ - volatile int depth; /* # of acquires. */ - void * backend; /* Specific to backend */ -}; -typedef struct objc_mutex *objc_mutex_t; - -/* This structure represents a single condition mutex */ -struct objc_condition -{ - void * backend; /* Specific to backend */ -}; -typedef struct objc_condition *objc_condition_t; - -/* Frontend mutex functions */ -objc_mutex_t objc_mutex_allocate (void); -int objc_mutex_deallocate (objc_mutex_t mutex); -int objc_mutex_lock (objc_mutex_t mutex); -int objc_mutex_unlock (objc_mutex_t mutex); -int objc_mutex_trylock (objc_mutex_t mutex); - -/* Frontend condition mutex functions */ -objc_condition_t objc_condition_allocate (void); -int objc_condition_deallocate (objc_condition_t condition); -int objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex); -int objc_condition_signal (objc_condition_t condition); -int objc_condition_broadcast (objc_condition_t condition); - -/* Frontend thread functions */ -objc_thread_t objc_thread_detach (SEL selector, id object, id argument); -void objc_thread_yield (void); -int objc_thread_exit (void); -int objc_thread_set_priority (int priority); -int objc_thread_get_priority (void); -void * objc_thread_get_data (void); -int objc_thread_set_data (void *value); -objc_thread_t objc_thread_id (void); -void objc_thread_add (void); -void objc_thread_remove (void); - -/* - Use this to set the hook function that will be called when the - runtime initially becomes multi threaded. - The hook function is only called once, meaning only when the - 2nd thread is spawned, not for each and every thread. - - It returns the previous hook function or NULL if there is none. - - A program outside of the runtime could set this to some function so - it can be informed; for example, the GNUstep Base Library sets it - so it can implement the NSBecomingMultiThreaded notification. - */ -typedef void (*objc_thread_callback) (void); -objc_thread_callback objc_set_thread_callback (objc_thread_callback func); - -/* Backend initialization functions */ -int __objc_init_thread_system (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* not __thread_INCLUDE_GNU */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/libgcc.a b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/libgcc.a deleted file mode 100644 index 9884b8b7f..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/libgcc.a and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/libgcov.a b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/libgcov.a deleted file mode 100644 index d746a162d..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/libgcov.a and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crtbegin.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crtbegin.o deleted file mode 100644 index f880e55a8..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crtbegin.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crtend.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crtend.o deleted file mode 100644 index 2990acdd2..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crtend.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crti.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crti.o deleted file mode 100644 index 6234d74e8..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crti.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crtn.o b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crtn.o deleted file mode 100644 index f50404fc4..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/crtn.o and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/libgcc.a b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/libgcc.a deleted file mode 100644 index c44ce8f84..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/libgcc.a and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/libgcov.a b/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/libgcov.a deleted file mode 100644 index 97f1b3c13..000000000 Binary files a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/thumb/libgcov.a and /dev/null differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtbegin.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtbegin.o new file mode 100644 index 000000000..1fadaa216 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtbegin.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtend.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtend.o new file mode 100644 index 000000000..ec84ccaf3 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtend.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtfastmath.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtfastmath.o new file mode 100644 index 000000000..3b28d613b Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtfastmath.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crti.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crti.o new file mode 100644 index 000000000..17f657632 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crti.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtn.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtn.o new file mode 100644 index 000000000..312c31fbf Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/crtn.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/libgcc.a b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/libgcc.a new file mode 100644 index 000000000..4616bffcc Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/libgcc.a differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/libgcov.a b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/libgcov.a new file mode 100644 index 000000000..459be813e Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/armv6k/fpu/libgcov.a differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtbegin.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtbegin.o new file mode 100644 index 000000000..7d73dddcc Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtbegin.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtend.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtend.o new file mode 100644 index 000000000..f9c88a8cc Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtend.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtfastmath.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtfastmath.o new file mode 100644 index 000000000..3187c2c46 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtfastmath.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crti.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crti.o new file mode 100644 index 000000000..8213d822e Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crti.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtn.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtn.o new file mode 100644 index 000000000..df148da3f Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/crtn.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/libgcc.a b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/libgcc.a new file mode 100644 index 000000000..803d3a969 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/libgcc.a differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/libgcov.a b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/libgcov.a new file mode 100644 index 000000000..644306bbf Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/be/libgcov.a differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtbegin.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtbegin.o new file mode 100644 index 000000000..cd38cc520 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtbegin.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtend.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtend.o new file mode 100644 index 000000000..f75c2c7a9 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtend.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtfastmath.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtfastmath.o new file mode 100644 index 000000000..6e60c2b02 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtfastmath.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crti.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crti.o new file mode 100644 index 000000000..265a3c26e Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crti.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtn.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtn.o new file mode 100644 index 000000000..7d1c7a05d Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/crtn.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include-fixed/README b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include-fixed/README similarity index 100% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include-fixed/README rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include-fixed/README diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/include/limits.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include-fixed/limits.h similarity index 86% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/include/limits.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include-fixed/limits.h index aa2189f85..743481d78 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/include/limits.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include-fixed/limits.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2015 Free Software Foundation, Inc. +/* Copyright (C) 1992-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Use "..." so that we find syslimits.h only in this same directory. */ #include "syslimits.h" #endif -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -158,6 +158,32 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) #endif +#ifdef __STDC_WANT_IEC_60559_BFP_EXT__ +/* TS 18661-1 widths of integer types. */ +# undef CHAR_WIDTH +# define CHAR_WIDTH __SCHAR_WIDTH__ +# undef SCHAR_WIDTH +# define SCHAR_WIDTH __SCHAR_WIDTH__ +# undef UCHAR_WIDTH +# define UCHAR_WIDTH __SCHAR_WIDTH__ +# undef SHRT_WIDTH +# define SHRT_WIDTH __SHRT_WIDTH__ +# undef USHRT_WIDTH +# define USHRT_WIDTH __SHRT_WIDTH__ +# undef INT_WIDTH +# define INT_WIDTH __INT_WIDTH__ +# undef UINT_WIDTH +# define UINT_WIDTH __INT_WIDTH__ +# undef LONG_WIDTH +# define LONG_WIDTH __LONG_WIDTH__ +# undef ULONG_WIDTH +# define ULONG_WIDTH __LONG_WIDTH__ +# undef LLONG_WIDTH +# define LLONG_WIDTH __LONG_LONG_WIDTH__ +# undef ULLONG_WIDTH +# define ULLONG_WIDTH __LONG_LONG_WIDTH__ +#endif + #endif /* _LIMITS_H___ */ /* This administrivia gets added to the end of limits.h if the system has its own version of limits.h. */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include-fixed/syslimits.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include-fixed/syslimits.h similarity index 100% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include-fixed/syslimits.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include-fixed/syslimits.h diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_acle.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_acle.h new file mode 100644 index 000000000..972e28edb --- /dev/null +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_acle.h @@ -0,0 +1,241 @@ +/* ARM Non-NEON ACLE intrinsics include file. + + Copyright (C) 2013-2017 Free Software Foundation, Inc. + Contributed by ARM Ltd. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +#ifndef _GCC_ARM_ACLE_H +#define _GCC_ARM_ACLE_H + +#include +#ifdef __cplusplus +extern "C" { +#endif + +#if (!__thumb__ || __thumb2__) && __ARM_ARCH >= 4 +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_cdp (const unsigned int __coproc, const unsigned int __opc1, + const unsigned int __CRd, const unsigned int __CRn, + const unsigned int __CRm, const unsigned int __opc2) +{ + return __builtin_arm_cdp (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); +} + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_ldc (const unsigned int __coproc, const unsigned int __CRd, + const void * __p) +{ + return __builtin_arm_ldc (__coproc, __CRd, __p); +} + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_ldcl (const unsigned int __coproc, const unsigned int __CRd, + const void * __p) +{ + return __builtin_arm_ldcl (__coproc, __CRd, __p); +} + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_stc (const unsigned int __coproc, const unsigned int __CRd, + void * __p) +{ + return __builtin_arm_stc (__coproc, __CRd, __p); +} + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_stcl (const unsigned int __coproc, const unsigned int __CRd, + void * __p) +{ + return __builtin_arm_stcl (__coproc, __CRd, __p); +} + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_mcr (const unsigned int __coproc, const unsigned int __opc1, + uint32_t __value, const unsigned int __CRn, const unsigned int __CRm, + const unsigned int __opc2) +{ + return __builtin_arm_mcr (__coproc, __opc1, __value, __CRn, __CRm, __opc2); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +__arm_mrc (const unsigned int __coproc, const unsigned int __opc1, + const unsigned int __CRn, const unsigned int __CRm, + const unsigned int __opc2) +{ + return __builtin_arm_mrc (__coproc, __opc1, __CRn, __CRm, __opc2); +} +#if __ARM_ARCH >= 5 +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_cdp2 (const unsigned int __coproc, const unsigned int __opc1, + const unsigned int __CRd, const unsigned int __CRn, + const unsigned int __CRm, const unsigned int __opc2) +{ + return __builtin_arm_cdp2 (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2); +} + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_ldc2 (const unsigned int __coproc, const unsigned int __CRd, + const void * __p) +{ + return __builtin_arm_ldc2 (__coproc, __CRd, __p); +} + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_ldc2l (const unsigned int __coproc, const unsigned int __CRd, + const void * __p) +{ + return __builtin_arm_ldc2l (__coproc, __CRd, __p); +} + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_stc2 (const unsigned int __coproc, const unsigned int __CRd, + void * __p) +{ + return __builtin_arm_stc2 (__coproc, __CRd, __p); +} + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_stc2l (const unsigned int __coproc, const unsigned int __CRd, + void * __p) +{ + return __builtin_arm_stc2l (__coproc, __CRd, __p); +} + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_mcr2 (const unsigned int __coproc, const unsigned int __opc1, + uint32_t __value, const unsigned int __CRn, + const unsigned int __CRm, const unsigned int __opc2) +{ + return __builtin_arm_mcr2 (__coproc, __opc1, __value, __CRn, __CRm, __opc2); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +__arm_mrc2 (const unsigned int __coproc, const unsigned int __opc1, + const unsigned int __CRn, const unsigned int __CRm, + const unsigned int __opc2) +{ + return __builtin_arm_mrc2 (__coproc, __opc1, __CRn, __CRm, __opc2); +} + +#if __ARM_ARCH >= 6 || defined (__ARM_ARCH_5TE__) + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_mcrr (const unsigned int __coproc, const unsigned int __opc1, + uint64_t __value, const unsigned int __CRm) +{ + return __builtin_arm_mcrr (__coproc, __opc1, __value, __CRm); +} + +__extension__ static __inline uint64_t __attribute__ ((__always_inline__)) +__arm_mrrc (const unsigned int __coproc, const unsigned int __opc1, + const unsigned int __CRm) +{ + return __builtin_arm_mrrc (__coproc, __opc1, __CRm); +} + +#if __ARM_ARCH >= 6 + +__extension__ static __inline void __attribute__ ((__always_inline__)) +__arm_mcrr2 (const unsigned int __coproc, const unsigned int __opc1, + uint64_t __value, const unsigned int __CRm) +{ + return __builtin_arm_mcrr2 (__coproc, __opc1, __value, __CRm); +} + +__extension__ static __inline uint64_t __attribute__ ((__always_inline__)) +__arm_mrrc2 (const unsigned int __coproc, const unsigned int __opc1, + const unsigned int __CRm) +{ + return __builtin_arm_mrrc2 (__coproc, __opc1, __CRm); +} +#endif /* __ARM_ARCH >= 6. */ +#endif /* __ARM_ARCH >= 6 || defined (__ARM_ARCH_5TE__). */ +#endif /* __ARM_ARCH >= 5. */ +#endif /* (!__thumb__ || __thumb2__) && __ARM_ARCH >= 4. */ + +#ifdef __ARM_FEATURE_CRC32 +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +__crc32b (uint32_t __a, uint8_t __b) +{ + return __builtin_arm_crc32b (__a, __b); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +__crc32h (uint32_t __a, uint16_t __b) +{ + return __builtin_arm_crc32h (__a, __b); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +__crc32w (uint32_t __a, uint32_t __b) +{ + return __builtin_arm_crc32w (__a, __b); +} + +#ifdef __ARM_32BIT_STATE +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +__crc32d (uint32_t __a, uint64_t __b) +{ + uint32_t __d; + + __d = __crc32w (__crc32w (__a, __b & 0xffffffffULL), __b >> 32); + return __d; +} +#endif + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +__crc32cb (uint32_t __a, uint8_t __b) +{ + return __builtin_arm_crc32cb (__a, __b); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +__crc32ch (uint32_t __a, uint16_t __b) +{ + return __builtin_arm_crc32ch (__a, __b); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +__crc32cw (uint32_t __a, uint32_t __b) +{ + return __builtin_arm_crc32cw (__a, __b); +} + +#ifdef __ARM_32BIT_STATE +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +__crc32cd (uint32_t __a, uint64_t __b) +{ + uint32_t __d; + + __d = __crc32cw (__crc32cw (__a, __b & 0xffffffffULL), __b >> 32); + return __d; +} +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_cmse.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_cmse.h new file mode 100644 index 000000000..8fde2736a --- /dev/null +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_cmse.h @@ -0,0 +1,199 @@ +/* ARMv8-M Secure Extensions intrinsics include file. + + Copyright (C) 2015-2017 Free Software Foundation, Inc. + Contributed by ARM Ltd. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + + +#ifndef _GCC_ARM_CMSE_H +#define _GCC_ARM_CMSE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if __ARM_FEATURE_CMSE & 1 + +#include +#include + +#ifdef __ARM_BIG_ENDIAN + +typedef union { + struct cmse_address_info { +#if __ARM_FEATURE_CMSE & 2 + unsigned idau_region:8; + unsigned idau_region_valid:1; + unsigned secure:1; + unsigned nonsecure_readwrite_ok:1; + unsigned nonsecure_read_ok:1; +#else + unsigned :12; +#endif + unsigned readwrite_ok:1; + unsigned read_ok:1; +#if __ARM_FEATURE_CMSE & 2 + unsigned sau_region_valid:1; +#else + unsigned :1; +#endif + unsigned mpu_region_valid:1; +#if __ARM_FEATURE_CMSE & 2 + unsigned sau_region:8; +#else + unsigned :8; +#endif + unsigned mpu_region:8; + } flags; + unsigned value; +} cmse_address_info_t; + +#else + +typedef union { + struct cmse_address_info { + unsigned mpu_region:8; +#if __ARM_FEATURE_CMSE & 2 + unsigned sau_region:8; +#else + unsigned :8; +#endif + unsigned mpu_region_valid:1; +#if __ARM_FEATURE_CMSE & 2 + unsigned sau_region_valid:1; +#else + unsigned :1; +#endif + unsigned read_ok:1; + unsigned readwrite_ok:1; +#if __ARM_FEATURE_CMSE & 2 + unsigned nonsecure_read_ok:1; + unsigned nonsecure_readwrite_ok:1; + unsigned secure:1; + unsigned idau_region_valid:1; + unsigned idau_region:8; +#else + unsigned :12; +#endif + } flags; + unsigned value; +} cmse_address_info_t; + +#endif /* __ARM_BIG_ENDIAN */ + +#define cmse_TT_fptr(p) (__cmse_TT_fptr ((__cmse_fptr)(p))) + +typedef void (*__cmse_fptr)(void); + +#define __CMSE_TT_ASM(flags) \ +{ \ + cmse_address_info_t __result; \ + __asm__ ("tt" # flags " %0,%1" \ + : "=r"(__result) \ + : "r"(__p) \ + : "memory"); \ + return __result; \ +} + +__extension__ static __inline __attribute__ ((__always_inline__)) +cmse_address_info_t +__cmse_TT_fptr (__cmse_fptr __p) +__CMSE_TT_ASM () + +__extension__ static __inline __attribute__ ((__always_inline__)) +cmse_address_info_t +cmse_TT (void *__p) +__CMSE_TT_ASM () + +#define cmse_TTT_fptr(p) (__cmse_TTT_fptr ((__cmse_fptr)(p))) + +__extension__ static __inline __attribute__ ((__always_inline__)) +cmse_address_info_t +__cmse_TTT_fptr (__cmse_fptr __p) +__CMSE_TT_ASM (t) + +__extension__ static __inline __attribute__ ((__always_inline__)) +cmse_address_info_t +cmse_TTT (void *__p) +__CMSE_TT_ASM (t) + +#if __ARM_FEATURE_CMSE & 2 + +#define cmse_TTA_fptr(p) (__cmse_TTA_fptr ((__cmse_fptr)(p))) + +__extension__ static __inline __attribute__ ((__always_inline__)) +cmse_address_info_t +__cmse_TTA_fptr (__cmse_fptr __p) +__CMSE_TT_ASM (a) + +__extension__ static __inline __attribute__ ((__always_inline__)) +cmse_address_info_t +cmse_TTA (void *__p) +__CMSE_TT_ASM (a) + +#define cmse_TTAT_fptr(p) (__cmse_TTAT_fptr ((__cmse_fptr)(p))) + +__extension__ static __inline cmse_address_info_t +__attribute__ ((__always_inline__)) +__cmse_TTAT_fptr (__cmse_fptr __p) +__CMSE_TT_ASM (at) + +__extension__ static __inline cmse_address_info_t +__attribute__ ((__always_inline__)) +cmse_TTAT (void *__p) +__CMSE_TT_ASM (at) + +/* FIXME: diagnose use outside cmse_nonsecure_entry functions. */ +__extension__ static __inline int __attribute__ ((__always_inline__)) +cmse_nonsecure_caller (void) +{ + return __builtin_arm_cmse_nonsecure_caller (); +} + +#define CMSE_AU_NONSECURE 2 +#define CMSE_MPU_NONSECURE 16 +#define CMSE_NONSECURE 18 + +#define cmse_nsfptr_create(p) ((typeof ((p))) ((intptr_t) (p) & ~1)) + +#define cmse_is_nsfptr(p) (!((intptr_t) (p) & 1)) + +#endif /* __ARM_FEATURE_CMSE & 2 */ + +#define CMSE_MPU_UNPRIV 4 +#define CMSE_MPU_READWRITE 1 +#define CMSE_MPU_READ 8 + +__extension__ void * +cmse_check_address_range (void *, size_t, int); + +#define cmse_check_pointed_object(p, f) \ + ((typeof ((p))) cmse_check_address_range ((p), sizeof (*(p)), (f))) + +#endif /* __ARM_FEATURE_CMSE & 1 */ + +#ifdef __cplusplus +} +#endif + +#endif /* _GCC_ARM_CMSE_H */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_fp16.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_fp16.h new file mode 100644 index 000000000..36d1d033d --- /dev/null +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_fp16.h @@ -0,0 +1,255 @@ +/* ARM FP16 intrinsics include file. + + Copyright (C) 2016-2017 Free Software Foundation, Inc. + Contributed by ARM Ltd. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +#ifndef _GCC_ARM_FP16_H +#define _GCC_ARM_FP16_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* Intrinsics for FP16 instructions. */ +#pragma GCC push_options +#pragma GCC target ("fpu=fp-armv8") + +#if defined (__ARM_FEATURE_FP16_SCALAR_ARITHMETIC) + +typedef __fp16 float16_t; + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vabsh_f16 (float16_t __a) +{ + return __builtin_neon_vabshf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vaddh_f16 (float16_t __a, float16_t __b) +{ + return __a + __b; +} + +__extension__ static __inline int32_t __attribute__ ((__always_inline__)) +vcvtah_s32_f16 (float16_t __a) +{ + return __builtin_neon_vcvtahssi (__a); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +vcvtah_u32_f16 (float16_t __a) +{ + return __builtin_neon_vcvtahusi (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vcvth_f16_s32 (int32_t __a) +{ + return __builtin_neon_vcvthshf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vcvth_f16_u32 (uint32_t __a) +{ + return __builtin_neon_vcvthuhf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vcvth_n_f16_s32 (int32_t __a, const int __b) +{ + return __builtin_neon_vcvths_nhf (__a, __b); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vcvth_n_f16_u32 (uint32_t __a, const int __b) +{ + return __builtin_neon_vcvthu_nhf ((int32_t)__a, __b); +} + +__extension__ static __inline int32_t __attribute__ ((__always_inline__)) +vcvth_n_s32_f16 (float16_t __a, const int __b) +{ + return __builtin_neon_vcvths_nsi (__a, __b); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +vcvth_n_u32_f16 (float16_t __a, const int __b) +{ + return (uint32_t)__builtin_neon_vcvthu_nsi (__a, __b); +} + +__extension__ static __inline int32_t __attribute__ ((__always_inline__)) +vcvth_s32_f16 (float16_t __a) +{ + return __builtin_neon_vcvthssi (__a); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +vcvth_u32_f16 (float16_t __a) +{ + return __builtin_neon_vcvthusi (__a); +} + +__extension__ static __inline int32_t __attribute__ ((__always_inline__)) +vcvtmh_s32_f16 (float16_t __a) +{ + return __builtin_neon_vcvtmhssi (__a); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +vcvtmh_u32_f16 (float16_t __a) +{ + return __builtin_neon_vcvtmhusi (__a); +} + +__extension__ static __inline int32_t __attribute__ ((__always_inline__)) +vcvtnh_s32_f16 (float16_t __a) +{ + return __builtin_neon_vcvtnhssi (__a); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +vcvtnh_u32_f16 (float16_t __a) +{ + return __builtin_neon_vcvtnhusi (__a); +} + +__extension__ static __inline int32_t __attribute__ ((__always_inline__)) +vcvtph_s32_f16 (float16_t __a) +{ + return __builtin_neon_vcvtphssi (__a); +} + +__extension__ static __inline uint32_t __attribute__ ((__always_inline__)) +vcvtph_u32_f16 (float16_t __a) +{ + return __builtin_neon_vcvtphusi (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vdivh_f16 (float16_t __a, float16_t __b) +{ + return __a / __b; +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vfmah_f16 (float16_t __a, float16_t __b, float16_t __c) +{ + return __builtin_neon_vfmahf (__a, __b, __c); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vfmsh_f16 (float16_t __a, float16_t __b, float16_t __c) +{ + return __builtin_neon_vfmshf (__a, __b, __c); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vmaxnmh_f16 (float16_t __a, float16_t __b) +{ + return __builtin_neon_vmaxnmhf (__a, __b); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vminnmh_f16 (float16_t __a, float16_t __b) +{ + return __builtin_neon_vminnmhf (__a, __b); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vmulh_f16 (float16_t __a, float16_t __b) +{ + return __a * __b; +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vnegh_f16 (float16_t __a) +{ + return - __a; +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vrndah_f16 (float16_t __a) +{ + return __builtin_neon_vrndahf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vrndh_f16 (float16_t __a) +{ + return __builtin_neon_vrndhf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vrndih_f16 (float16_t __a) +{ + return __builtin_neon_vrndihf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vrndmh_f16 (float16_t __a) +{ + return __builtin_neon_vrndmhf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vrndnh_f16 (float16_t __a) +{ + return __builtin_neon_vrndnhf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vrndph_f16 (float16_t __a) +{ + return __builtin_neon_vrndphf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vrndxh_f16 (float16_t __a) +{ + return __builtin_neon_vrndxhf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vsqrth_f16 (float16_t __a) +{ + return __builtin_neon_vsqrthf (__a); +} + +__extension__ static __inline float16_t __attribute__ ((__always_inline__)) +vsubh_f16 (float16_t __a, float16_t __b) +{ + return __a - __b; +} + +#endif /* __ARM_FEATURE_FP16_SCALAR_ARITHMETIC */ +#pragma GCC pop_options + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_neon.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_neon.h new file mode 100644 index 000000000..f81d77ef7 --- /dev/null +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/arm_neon.h @@ -0,0 +1,18020 @@ +/* ARM NEON intrinsics include file. + + Copyright (C) 2006-2017 Free Software Foundation, Inc. + Contributed by CodeSourcery. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +#ifndef _GCC_ARM_NEON_H +#define _GCC_ARM_NEON_H 1 + +#ifndef __ARM_FP +#error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softp or -mfloat-abi=hard" +#else + +#pragma GCC push_options +#pragma GCC target ("fpu=neon") + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +typedef __simd64_int8_t int8x8_t; +typedef __simd64_int16_t int16x4_t; +typedef __simd64_int32_t int32x2_t; +typedef __builtin_neon_di int64x1_t; +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +typedef __fp16 float16_t; +typedef __simd64_float16_t float16x4_t; +#endif +typedef __simd64_float32_t float32x2_t; +typedef __simd64_poly8_t poly8x8_t; +typedef __simd64_poly16_t poly16x4_t; +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +typedef __builtin_neon_poly64 poly64x1_t; +#pragma GCC pop_options +typedef __simd64_uint8_t uint8x8_t; +typedef __simd64_uint16_t uint16x4_t; +typedef __simd64_uint32_t uint32x2_t; +typedef __builtin_neon_udi uint64x1_t; + +typedef __simd128_int8_t int8x16_t; +typedef __simd128_int16_t int16x8_t; +typedef __simd128_int32_t int32x4_t; +typedef __simd128_int64_t int64x2_t; +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +typedef __simd128_float16_t float16x8_t; +#endif +typedef __simd128_float32_t float32x4_t; +typedef __simd128_poly8_t poly8x16_t; +typedef __simd128_poly16_t poly16x8_t; +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +typedef __builtin_neon_poly64 poly64x2_t __attribute__ ((__vector_size__ (16))); +#pragma GCC pop_options + +typedef __simd128_uint8_t uint8x16_t; +typedef __simd128_uint16_t uint16x8_t; +typedef __simd128_uint32_t uint32x4_t; +typedef __simd128_uint64_t uint64x2_t; + +typedef float float32_t; + +/* The Poly types are user visible and live in their own world, + keep them that way. */ +typedef __builtin_neon_poly8 poly8_t; +typedef __builtin_neon_poly16 poly16_t; +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +typedef __builtin_neon_poly64 poly64_t; +typedef __builtin_neon_poly128 poly128_t; +#pragma GCC pop_options + +typedef struct int8x8x2_t +{ + int8x8_t val[2]; +} int8x8x2_t; + +typedef struct int8x16x2_t +{ + int8x16_t val[2]; +} int8x16x2_t; + +typedef struct int16x4x2_t +{ + int16x4_t val[2]; +} int16x4x2_t; + +typedef struct int16x8x2_t +{ + int16x8_t val[2]; +} int16x8x2_t; + +typedef struct int32x2x2_t +{ + int32x2_t val[2]; +} int32x2x2_t; + +typedef struct int32x4x2_t +{ + int32x4_t val[2]; +} int32x4x2_t; + +typedef struct int64x1x2_t +{ + int64x1_t val[2]; +} int64x1x2_t; + +typedef struct int64x2x2_t +{ + int64x2_t val[2]; +} int64x2x2_t; + +typedef struct uint8x8x2_t +{ + uint8x8_t val[2]; +} uint8x8x2_t; + +typedef struct uint8x16x2_t +{ + uint8x16_t val[2]; +} uint8x16x2_t; + +typedef struct uint16x4x2_t +{ + uint16x4_t val[2]; +} uint16x4x2_t; + +typedef struct uint16x8x2_t +{ + uint16x8_t val[2]; +} uint16x8x2_t; + +typedef struct uint32x2x2_t +{ + uint32x2_t val[2]; +} uint32x2x2_t; + +typedef struct uint32x4x2_t +{ + uint32x4_t val[2]; +} uint32x4x2_t; + +typedef struct uint64x1x2_t +{ + uint64x1_t val[2]; +} uint64x1x2_t; + +typedef struct uint64x2x2_t +{ + uint64x2_t val[2]; +} uint64x2x2_t; + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +typedef struct float16x4x2_t +{ + float16x4_t val[2]; +} float16x4x2_t; +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +typedef struct float16x8x2_t +{ + float16x8_t val[2]; +} float16x8x2_t; +#endif + +typedef struct float32x2x2_t +{ + float32x2_t val[2]; +} float32x2x2_t; + +typedef struct float32x4x2_t +{ + float32x4_t val[2]; +} float32x4x2_t; + +typedef struct poly8x8x2_t +{ + poly8x8_t val[2]; +} poly8x8x2_t; + +typedef struct poly8x16x2_t +{ + poly8x16_t val[2]; +} poly8x16x2_t; + +typedef struct poly16x4x2_t +{ + poly16x4_t val[2]; +} poly16x4x2_t; + +typedef struct poly16x8x2_t +{ + poly16x8_t val[2]; +} poly16x8x2_t; + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +typedef struct poly64x1x2_t +{ + poly64x1_t val[2]; +} poly64x1x2_t; + + +typedef struct poly64x2x2_t +{ + poly64x2_t val[2]; +} poly64x2x2_t; +#pragma GCC pop_options + + +typedef struct int8x8x3_t +{ + int8x8_t val[3]; +} int8x8x3_t; + +typedef struct int8x16x3_t +{ + int8x16_t val[3]; +} int8x16x3_t; + +typedef struct int16x4x3_t +{ + int16x4_t val[3]; +} int16x4x3_t; + +typedef struct int16x8x3_t +{ + int16x8_t val[3]; +} int16x8x3_t; + +typedef struct int32x2x3_t +{ + int32x2_t val[3]; +} int32x2x3_t; + +typedef struct int32x4x3_t +{ + int32x4_t val[3]; +} int32x4x3_t; + +typedef struct int64x1x3_t +{ + int64x1_t val[3]; +} int64x1x3_t; + +typedef struct int64x2x3_t +{ + int64x2_t val[3]; +} int64x2x3_t; + +typedef struct uint8x8x3_t +{ + uint8x8_t val[3]; +} uint8x8x3_t; + +typedef struct uint8x16x3_t +{ + uint8x16_t val[3]; +} uint8x16x3_t; + +typedef struct uint16x4x3_t +{ + uint16x4_t val[3]; +} uint16x4x3_t; + +typedef struct uint16x8x3_t +{ + uint16x8_t val[3]; +} uint16x8x3_t; + +typedef struct uint32x2x3_t +{ + uint32x2_t val[3]; +} uint32x2x3_t; + +typedef struct uint32x4x3_t +{ + uint32x4_t val[3]; +} uint32x4x3_t; + +typedef struct uint64x1x3_t +{ + uint64x1_t val[3]; +} uint64x1x3_t; + +typedef struct uint64x2x3_t +{ + uint64x2_t val[3]; +} uint64x2x3_t; + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +typedef struct float16x4x3_t +{ + float16x4_t val[3]; +} float16x4x3_t; +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +typedef struct float16x8x3_t +{ + float16x8_t val[3]; +} float16x8x3_t; +#endif + +typedef struct float32x2x3_t +{ + float32x2_t val[3]; +} float32x2x3_t; + +typedef struct float32x4x3_t +{ + float32x4_t val[3]; +} float32x4x3_t; + +typedef struct poly8x8x3_t +{ + poly8x8_t val[3]; +} poly8x8x3_t; + +typedef struct poly8x16x3_t +{ + poly8x16_t val[3]; +} poly8x16x3_t; + +typedef struct poly16x4x3_t +{ + poly16x4_t val[3]; +} poly16x4x3_t; + +typedef struct poly16x8x3_t +{ + poly16x8_t val[3]; +} poly16x8x3_t; + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +typedef struct poly64x1x3_t +{ + poly64x1_t val[3]; +} poly64x1x3_t; + + +typedef struct poly64x2x3_t +{ + poly64x2_t val[3]; +} poly64x2x3_t; +#pragma GCC pop_options + + +typedef struct int8x8x4_t +{ + int8x8_t val[4]; +} int8x8x4_t; + +typedef struct int8x16x4_t +{ + int8x16_t val[4]; +} int8x16x4_t; + +typedef struct int16x4x4_t +{ + int16x4_t val[4]; +} int16x4x4_t; + +typedef struct int16x8x4_t +{ + int16x8_t val[4]; +} int16x8x4_t; + +typedef struct int32x2x4_t +{ + int32x2_t val[4]; +} int32x2x4_t; + +typedef struct int32x4x4_t +{ + int32x4_t val[4]; +} int32x4x4_t; + +typedef struct int64x1x4_t +{ + int64x1_t val[4]; +} int64x1x4_t; + +typedef struct int64x2x4_t +{ + int64x2_t val[4]; +} int64x2x4_t; + +typedef struct uint8x8x4_t +{ + uint8x8_t val[4]; +} uint8x8x4_t; + +typedef struct uint8x16x4_t +{ + uint8x16_t val[4]; +} uint8x16x4_t; + +typedef struct uint16x4x4_t +{ + uint16x4_t val[4]; +} uint16x4x4_t; + +typedef struct uint16x8x4_t +{ + uint16x8_t val[4]; +} uint16x8x4_t; + +typedef struct uint32x2x4_t +{ + uint32x2_t val[4]; +} uint32x2x4_t; + +typedef struct uint32x4x4_t +{ + uint32x4_t val[4]; +} uint32x4x4_t; + +typedef struct uint64x1x4_t +{ + uint64x1_t val[4]; +} uint64x1x4_t; + +typedef struct uint64x2x4_t +{ + uint64x2_t val[4]; +} uint64x2x4_t; + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +typedef struct float16x4x4_t +{ + float16x4_t val[4]; +} float16x4x4_t; +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +typedef struct float16x8x4_t +{ + float16x8_t val[4]; +} float16x8x4_t; +#endif + +typedef struct float32x2x4_t +{ + float32x2_t val[4]; +} float32x2x4_t; + +typedef struct float32x4x4_t +{ + float32x4_t val[4]; +} float32x4x4_t; + +typedef struct poly8x8x4_t +{ + poly8x8_t val[4]; +} poly8x8x4_t; + +typedef struct poly8x16x4_t +{ + poly8x16_t val[4]; +} poly8x16x4_t; + +typedef struct poly16x4x4_t +{ + poly16x4_t val[4]; +} poly16x4x4_t; + +typedef struct poly16x8x4_t +{ + poly16x8_t val[4]; +} poly16x8x4_t; + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +typedef struct poly64x1x4_t +{ + poly64x1_t val[4]; +} poly64x1x4_t; + + +typedef struct poly64x2x4_t +{ + poly64x2_t val[4]; +} poly64x2x4_t; +#pragma GCC pop_options + +/* vadd */ +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vadd_s8 (int8x8_t __a, int8x8_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vadd_s16 (int16x4_t __a, int16x4_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vadd_s32 (int32x2_t __a, int32x2_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vadd_f32 (float32x2_t __a, float32x2_t __b) +{ +#ifdef __FAST_MATH__ + return __a + __b; +#else + return (float32x2_t) __builtin_neon_vaddv2sf (__a, __b); +#endif +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vadd_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vadd_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vadd_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vadd_s64 (int64x1_t __a, int64x1_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vadd_u64 (uint64x1_t __a, uint64x1_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddq_s8 (int8x16_t __a, int8x16_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddq_s16 (int16x8_t __a, int16x8_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddq_s32 (int32x4_t __a, int32x4_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddq_s64 (int64x2_t __a, int64x2_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddq_f32 (float32x4_t __a, float32x4_t __b) +{ +#ifdef __FAST_MATH__ + return __a + __b; +#else + return (float32x4_t) __builtin_neon_vaddv4sf (__a, __b); +#endif +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddq_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return __a + __b; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddl_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int16x8_t)__builtin_neon_vaddlsv8qi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddl_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int32x4_t)__builtin_neon_vaddlsv4hi (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddl_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int64x2_t)__builtin_neon_vaddlsv2si (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddl_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vaddluv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddl_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vaddluv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddl_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vaddluv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddw_s8 (int16x8_t __a, int8x8_t __b) +{ + return (int16x8_t)__builtin_neon_vaddwsv8qi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddw_s16 (int32x4_t __a, int16x4_t __b) +{ + return (int32x4_t)__builtin_neon_vaddwsv4hi (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddw_s32 (int64x2_t __a, int32x2_t __b) +{ + return (int64x2_t)__builtin_neon_vaddwsv2si (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddw_u8 (uint16x8_t __a, uint8x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vaddwuv8qi ((int16x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddw_u16 (uint32x4_t __a, uint16x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vaddwuv4hi ((int32x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddw_u32 (uint64x2_t __a, uint32x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vaddwuv2si ((int64x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhadd_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vhaddsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhadd_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vhaddsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhadd_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vhaddsv2si (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhadd_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vhadduv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhadd_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vhadduv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhadd_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vhadduv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhaddq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vhaddsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhaddq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vhaddsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhaddq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vhaddsv4si (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhaddq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vhadduv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhaddq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vhadduv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhaddq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vhadduv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhadd_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vrhaddsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhadd_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vrhaddsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhadd_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vrhaddsv2si (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhadd_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vrhadduv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhadd_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vrhadduv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhadd_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vrhadduv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhaddq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vrhaddsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhaddq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vrhaddsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhaddq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vrhaddsv4si (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhaddq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vrhadduv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhaddq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vrhadduv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrhaddq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vrhadduv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqadd_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vqaddsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqadd_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vqaddsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqadd_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vqaddsv2si (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqadd_s64 (int64x1_t __a, int64x1_t __b) +{ + return (int64x1_t)__builtin_neon_vqaddsdi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqadd_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vqadduv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqadd_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vqadduv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqadd_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vqadduv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqadd_u64 (uint64x1_t __a, uint64x1_t __b) +{ + return (uint64x1_t)__builtin_neon_vqaddudi ((int64x1_t) __a, (int64x1_t) __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqaddq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vqaddsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqaddq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vqaddsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqaddq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vqaddsv4si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqaddq_s64 (int64x2_t __a, int64x2_t __b) +{ + return (int64x2_t)__builtin_neon_vqaddsv2di (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqaddq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vqadduv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqaddq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vqadduv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqaddq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vqadduv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqaddq_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vqadduv2di ((int64x2_t) __a, (int64x2_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddhn_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int8x8_t)__builtin_neon_vaddhnv8hi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddhn_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int16x4_t)__builtin_neon_vaddhnv4si (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddhn_s64 (int64x2_t __a, int64x2_t __b) +{ + return (int32x2_t)__builtin_neon_vaddhnv2di (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddhn_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vaddhnv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddhn_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vaddhnv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddhn_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vaddhnv2di ((int64x2_t) __a, (int64x2_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vraddhn_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int8x8_t)__builtin_neon_vraddhnv8hi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vraddhn_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int16x4_t)__builtin_neon_vraddhnv4si (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vraddhn_s64 (int64x2_t __a, int64x2_t __b) +{ + return (int32x2_t)__builtin_neon_vraddhnv2di (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vraddhn_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vraddhnv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vraddhn_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vraddhnv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vraddhn_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vraddhnv2di ((int64x2_t) __a, (int64x2_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_s8 (int8x8_t __a, int8x8_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_s16 (int16x4_t __a, int16x4_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_s32 (int32x2_t __a, int32x2_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_f32 (float32x2_t __a, float32x2_t __b) +{ +#ifdef __FAST_MATH__ + return __a * __b; +#else + return (float32x2_t) __builtin_neon_vmulfv2sf (__a, __b); +#endif + +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_s8 (int8x16_t __a, int8x16_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_s16 (int16x8_t __a, int16x8_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_s32 (int32x4_t __a, int32x4_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_f32 (float32x4_t __a, float32x4_t __b) +{ +#ifdef __FAST_MATH__ + return __a * __b; +#else + return (float32x4_t) __builtin_neon_vmulfv4sf (__a, __b); +#endif +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return __a * __b; +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_p8 (poly8x8_t __a, poly8x8_t __b) +{ + return (poly8x8_t)__builtin_neon_vmulpv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_p8 (poly8x16_t __a, poly8x16_t __b) +{ + return (poly8x16_t)__builtin_neon_vmulpv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulh_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vqdmulhv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulh_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vqdmulhv2si (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulhq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vqdmulhv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulhq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vqdmulhv4si (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulh_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vqrdmulhv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulh_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vqrdmulhv2si (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulhq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vqrdmulhv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulhq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vqrdmulhv4si (__a, __b); +} + +#ifdef __ARM_FEATURE_QRDMX +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlah_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int16x4_t)__builtin_neon_vqrdmlahv4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlah_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int32x2_t)__builtin_neon_vqrdmlahv2si (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlahq_s16 (int16x8_t __a, int16x8_t __b, int16x8_t __c) +{ + return (int16x8_t)__builtin_neon_vqrdmlahv8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlahq_s32 (int32x4_t __a, int32x4_t __b, int32x4_t __c) +{ + return (int32x4_t)__builtin_neon_vqrdmlahv4si (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlsh_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int16x4_t)__builtin_neon_vqrdmlshv4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlsh_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int32x2_t)__builtin_neon_vqrdmlshv2si (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlshq_s16 (int16x8_t __a, int16x8_t __b, int16x8_t __c) +{ + return (int16x8_t)__builtin_neon_vqrdmlshv8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlshq_s32 (int32x4_t __a, int32x4_t __b, int32x4_t __c) +{ + return (int32x4_t)__builtin_neon_vqrdmlshv4si (__a, __b, __c); +} +#endif + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int16x8_t)__builtin_neon_vmullsv8qi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int32x4_t)__builtin_neon_vmullsv4hi (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int64x2_t)__builtin_neon_vmullsv2si (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vmulluv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vmulluv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vmulluv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_p8 (poly8x8_t __a, poly8x8_t __b) +{ + return (poly16x8_t)__builtin_neon_vmullpv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmull_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int32x4_t)__builtin_neon_vqdmullv4hi (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmull_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int64x2_t)__builtin_neon_vqdmullv2si (__a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_s8 (int8x8_t __a, int8x8_t __b, int8x8_t __c) +{ + return (int8x8_t)__builtin_neon_vmlav8qi (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int16x4_t)__builtin_neon_vmlav4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int32x2_t)__builtin_neon_vmlav2si (__a, __b, __c); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c) +{ + return (float32x2_t)__builtin_neon_vmlav2sf (__a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_u8 (uint8x8_t __a, uint8x8_t __b, uint8x8_t __c) +{ + return (uint8x8_t)__builtin_neon_vmlav8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c) +{ + return (uint16x4_t)__builtin_neon_vmlav4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c) +{ + return (uint32x2_t)__builtin_neon_vmlav2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_s8 (int8x16_t __a, int8x16_t __b, int8x16_t __c) +{ + return (int8x16_t)__builtin_neon_vmlav16qi (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_s16 (int16x8_t __a, int16x8_t __b, int16x8_t __c) +{ + return (int16x8_t)__builtin_neon_vmlav8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_s32 (int32x4_t __a, int32x4_t __b, int32x4_t __c) +{ + return (int32x4_t)__builtin_neon_vmlav4si (__a, __b, __c); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_f32 (float32x4_t __a, float32x4_t __b, float32x4_t __c) +{ + return (float32x4_t)__builtin_neon_vmlav4sf (__a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_u8 (uint8x16_t __a, uint8x16_t __b, uint8x16_t __c) +{ + return (uint8x16_t)__builtin_neon_vmlav16qi ((int8x16_t) __a, (int8x16_t) __b, (int8x16_t) __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_u16 (uint16x8_t __a, uint16x8_t __b, uint16x8_t __c) +{ + return (uint16x8_t)__builtin_neon_vmlav8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x8_t) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_u32 (uint32x4_t __a, uint32x4_t __b, uint32x4_t __c) +{ + return (uint32x4_t)__builtin_neon_vmlav4si ((int32x4_t) __a, (int32x4_t) __b, (int32x4_t) __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_s8 (int16x8_t __a, int8x8_t __b, int8x8_t __c) +{ + return (int16x8_t)__builtin_neon_vmlalsv8qi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int32x4_t)__builtin_neon_vmlalsv4hi (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int64x2_t)__builtin_neon_vmlalsv2si (__a, __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_u8 (uint16x8_t __a, uint8x8_t __b, uint8x8_t __c) +{ + return (uint16x8_t)__builtin_neon_vmlaluv8qi ((int16x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_u16 (uint32x4_t __a, uint16x4_t __b, uint16x4_t __c) +{ + return (uint32x4_t)__builtin_neon_vmlaluv4hi ((int32x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_u32 (uint64x2_t __a, uint32x2_t __b, uint32x2_t __c) +{ + return (uint64x2_t)__builtin_neon_vmlaluv2si ((int64x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlal_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int32x4_t)__builtin_neon_vqdmlalv4hi (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlal_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int64x2_t)__builtin_neon_vqdmlalv2si (__a, __b, __c); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_s8 (int8x8_t __a, int8x8_t __b, int8x8_t __c) +{ + return (int8x8_t)__builtin_neon_vmlsv8qi (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int16x4_t)__builtin_neon_vmlsv4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int32x2_t)__builtin_neon_vmlsv2si (__a, __b, __c); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c) +{ + return (float32x2_t)__builtin_neon_vmlsv2sf (__a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_u8 (uint8x8_t __a, uint8x8_t __b, uint8x8_t __c) +{ + return (uint8x8_t)__builtin_neon_vmlsv8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c) +{ + return (uint16x4_t)__builtin_neon_vmlsv4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c) +{ + return (uint32x2_t)__builtin_neon_vmlsv2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_s8 (int8x16_t __a, int8x16_t __b, int8x16_t __c) +{ + return (int8x16_t)__builtin_neon_vmlsv16qi (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_s16 (int16x8_t __a, int16x8_t __b, int16x8_t __c) +{ + return (int16x8_t)__builtin_neon_vmlsv8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_s32 (int32x4_t __a, int32x4_t __b, int32x4_t __c) +{ + return (int32x4_t)__builtin_neon_vmlsv4si (__a, __b, __c); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_f32 (float32x4_t __a, float32x4_t __b, float32x4_t __c) +{ + return (float32x4_t)__builtin_neon_vmlsv4sf (__a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_u8 (uint8x16_t __a, uint8x16_t __b, uint8x16_t __c) +{ + return (uint8x16_t)__builtin_neon_vmlsv16qi ((int8x16_t) __a, (int8x16_t) __b, (int8x16_t) __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_u16 (uint16x8_t __a, uint16x8_t __b, uint16x8_t __c) +{ + return (uint16x8_t)__builtin_neon_vmlsv8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x8_t) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_u32 (uint32x4_t __a, uint32x4_t __b, uint32x4_t __c) +{ + return (uint32x4_t)__builtin_neon_vmlsv4si ((int32x4_t) __a, (int32x4_t) __b, (int32x4_t) __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_s8 (int16x8_t __a, int8x8_t __b, int8x8_t __c) +{ + return (int16x8_t)__builtin_neon_vmlslsv8qi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int32x4_t)__builtin_neon_vmlslsv4hi (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int64x2_t)__builtin_neon_vmlslsv2si (__a, __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_u8 (uint16x8_t __a, uint8x8_t __b, uint8x8_t __c) +{ + return (uint16x8_t)__builtin_neon_vmlsluv8qi ((int16x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_u16 (uint32x4_t __a, uint16x4_t __b, uint16x4_t __c) +{ + return (uint32x4_t)__builtin_neon_vmlsluv4hi ((int32x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_u32 (uint64x2_t __a, uint32x2_t __b, uint32x2_t __c) +{ + return (uint64x2_t)__builtin_neon_vmlsluv2si ((int64x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlsl_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int32x4_t)__builtin_neon_vqdmlslv4hi (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlsl_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int64x2_t)__builtin_neon_vqdmlslv2si (__a, __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=neon-vfpv4") +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vfma_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c) +{ + return (float32x2_t)__builtin_neon_vfmav2sf (__a, __b, __c); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vfmaq_f32 (float32x4_t __a, float32x4_t __b, float32x4_t __c) +{ + return (float32x4_t)__builtin_neon_vfmav4sf (__a, __b, __c); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vfms_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c) +{ + return (float32x2_t)__builtin_neon_vfmsv2sf (__a, __b, __c); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vfmsq_f32 (float32x4_t __a, float32x4_t __b, float32x4_t __c) +{ + return (float32x4_t)__builtin_neon_vfmsv4sf (__a, __b, __c); +} +#pragma GCC pop_options + +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndn_f32 (float32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vrintnv2sf (__a); +} + +#endif +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndnq_f32 (float32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vrintnv4sf (__a); +} + +#endif +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrnda_f32 (float32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vrintav2sf (__a); +} + +#endif +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndaq_f32 (float32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vrintav4sf (__a); +} + +#endif +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndp_f32 (float32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vrintpv2sf (__a); +} + +#endif +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndpq_f32 (float32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vrintpv4sf (__a); +} + +#endif +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndm_f32 (float32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vrintmv2sf (__a); +} + +#endif +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndmq_f32 (float32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vrintmv4sf (__a); +} + +#endif + +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndx_f32 (float32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vrintxv2sf (__a); +} + +#endif + +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndxq_f32 (float32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vrintxv4sf (__a); +} + +#endif + +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrnd_f32 (float32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vrintzv2sf (__a); +} + +#endif +#if __ARM_ARCH >= 8 +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndq_f32 (float32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vrintzv4sf (__a); +} + +#endif + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsub_s8 (int8x8_t __a, int8x8_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsub_s16 (int16x4_t __a, int16x4_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsub_s32 (int32x2_t __a, int32x2_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsub_f32 (float32x2_t __a, float32x2_t __b) +{ +#ifdef __FAST_MATH__ + return __a - __b; +#else + return (float32x2_t) __builtin_neon_vsubv2sf (__a, __b); +#endif +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsub_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsub_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsub_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsub_s64 (int64x1_t __a, int64x1_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsub_u64 (uint64x1_t __a, uint64x1_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubq_s8 (int8x16_t __a, int8x16_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubq_s16 (int16x8_t __a, int16x8_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubq_s32 (int32x4_t __a, int32x4_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubq_s64 (int64x2_t __a, int64x2_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubq_f32 (float32x4_t __a, float32x4_t __b) +{ +#ifdef __FAST_MATH__ + return __a - __b; +#else + return (float32x4_t) __builtin_neon_vsubv4sf (__a, __b); +#endif +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubq_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return __a - __b; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubl_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int16x8_t)__builtin_neon_vsublsv8qi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubl_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int32x4_t)__builtin_neon_vsublsv4hi (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubl_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int64x2_t)__builtin_neon_vsublsv2si (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubl_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vsubluv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubl_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vsubluv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubl_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vsubluv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubw_s8 (int16x8_t __a, int8x8_t __b) +{ + return (int16x8_t)__builtin_neon_vsubwsv8qi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubw_s16 (int32x4_t __a, int16x4_t __b) +{ + return (int32x4_t)__builtin_neon_vsubwsv4hi (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubw_s32 (int64x2_t __a, int32x2_t __b) +{ + return (int64x2_t)__builtin_neon_vsubwsv2si (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubw_u8 (uint16x8_t __a, uint8x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vsubwuv8qi ((int16x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubw_u16 (uint32x4_t __a, uint16x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vsubwuv4hi ((int32x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubw_u32 (uint64x2_t __a, uint32x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vsubwuv2si ((int64x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsub_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vhsubsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsub_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vhsubsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsub_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vhsubsv2si (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsub_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vhsubuv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsub_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vhsubuv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsub_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vhsubuv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsubq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vhsubsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsubq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vhsubsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsubq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vhsubsv4si (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsubq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vhsubuv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsubq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vhsubuv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vhsubq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vhsubuv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsub_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vqsubsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsub_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vqsubsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsub_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vqsubsv2si (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsub_s64 (int64x1_t __a, int64x1_t __b) +{ + return (int64x1_t)__builtin_neon_vqsubsdi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsub_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vqsubuv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsub_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vqsubuv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsub_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vqsubuv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsub_u64 (uint64x1_t __a, uint64x1_t __b) +{ + return (uint64x1_t)__builtin_neon_vqsubudi ((int64x1_t) __a, (int64x1_t) __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsubq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vqsubsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsubq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vqsubsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsubq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vqsubsv4si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsubq_s64 (int64x2_t __a, int64x2_t __b) +{ + return (int64x2_t)__builtin_neon_vqsubsv2di (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsubq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vqsubuv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsubq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vqsubuv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsubq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vqsubuv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqsubq_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vqsubuv2di ((int64x2_t) __a, (int64x2_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubhn_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int8x8_t)__builtin_neon_vsubhnv8hi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubhn_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int16x4_t)__builtin_neon_vsubhnv4si (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubhn_s64 (int64x2_t __a, int64x2_t __b) +{ + return (int32x2_t)__builtin_neon_vsubhnv2di (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubhn_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vsubhnv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubhn_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vsubhnv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubhn_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vsubhnv2di ((int64x2_t) __a, (int64x2_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsubhn_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int8x8_t)__builtin_neon_vrsubhnv8hi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsubhn_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int16x4_t)__builtin_neon_vrsubhnv4si (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsubhn_s64 (int64x2_t __a, int64x2_t __b) +{ + return (int32x2_t)__builtin_neon_vrsubhnv2di (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsubhn_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vrsubhnv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsubhn_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vrsubhnv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsubhn_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vrsubhnv2di ((int64x2_t) __a, (int64x2_t) __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceq_s8 (int8x8_t __a, int8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vceqv8qi (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceq_s16 (int16x4_t __a, int16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vceqv4hi (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceq_s32 (int32x2_t __a, int32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vceqv2si (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceq_f32 (float32x2_t __a, float32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vceqv2sf (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceq_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vceqv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceq_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vceqv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceq_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vceqv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceq_p8 (poly8x8_t __a, poly8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vceqv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vceqv16qi (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vceqv8hi (__a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vceqv4si (__a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vceqv4sf (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vceqv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vceqv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vceqv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqq_p8 (poly8x16_t __a, poly8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vceqv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcge_s8 (int8x8_t __a, int8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vcgev8qi (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcge_s16 (int16x4_t __a, int16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcgev4hi (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcge_s32 (int32x2_t __a, int32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgev2si (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcge_f32 (float32x2_t __a, float32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgev2sf (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcge_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vcgeuv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcge_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcgeuv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcge_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgeuv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgeq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vcgev16qi (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgeq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcgev8hi (__a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgeq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgev4si (__a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgeq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgev4sf (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgeq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vcgeuv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgeq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcgeuv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgeq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgeuv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcle_s8 (int8x8_t __a, int8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vcgev8qi (__b, __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcle_s16 (int16x4_t __a, int16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcgev4hi (__b, __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcle_s32 (int32x2_t __a, int32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgev2si (__b, __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcle_f32 (float32x2_t __a, float32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgev2sf (__b, __a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcle_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vcgeuv8qi ((int8x8_t) __b, (int8x8_t) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcle_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcgeuv4hi ((int16x4_t) __b, (int16x4_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcle_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgeuv2si ((int32x2_t) __b, (int32x2_t) __a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcleq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vcgev16qi (__b, __a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcleq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcgev8hi (__b, __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcleq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgev4si (__b, __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcleq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgev4sf (__b, __a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcleq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vcgeuv16qi ((int8x16_t) __b, (int8x16_t) __a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcleq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcgeuv8hi ((int16x8_t) __b, (int16x8_t) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcleq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgeuv4si ((int32x4_t) __b, (int32x4_t) __a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgt_s8 (int8x8_t __a, int8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vcgtv8qi (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgt_s16 (int16x4_t __a, int16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcgtv4hi (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgt_s32 (int32x2_t __a, int32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgtv2si (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgt_f32 (float32x2_t __a, float32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgtv2sf (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgt_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vcgtuv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgt_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcgtuv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgt_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgtuv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgtq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vcgtv16qi (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgtq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcgtv8hi (__a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgtq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgtv4si (__a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgtq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgtv4sf (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgtq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vcgtuv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgtq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcgtuv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgtq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgtuv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclt_s8 (int8x8_t __a, int8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vcgtv8qi (__b, __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclt_s16 (int16x4_t __a, int16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcgtv4hi (__b, __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclt_s32 (int32x2_t __a, int32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgtv2si (__b, __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclt_f32 (float32x2_t __a, float32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgtv2sf (__b, __a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclt_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vcgtuv8qi ((int8x8_t) __b, (int8x8_t) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclt_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcgtuv4hi ((int16x4_t) __b, (int16x4_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclt_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcgtuv2si ((int32x2_t) __b, (int32x2_t) __a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcltq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vcgtv16qi (__b, __a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcltq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcgtv8hi (__b, __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcltq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgtv4si (__b, __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcltq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgtv4sf (__b, __a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcltq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vcgtuv16qi ((int8x16_t) __b, (int8x16_t) __a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcltq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcgtuv8hi ((int16x8_t) __b, (int16x8_t) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcltq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcgtuv4si ((int32x4_t) __b, (int32x4_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcage_f32 (float32x2_t __a, float32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcagev2sf (__a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcageq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcagev4sf (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcale_f32 (float32x2_t __a, float32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcagev2sf (__b, __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcaleq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcagev4sf (__b, __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcagt_f32 (float32x2_t __a, float32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcagtv2sf (__a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcagtq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcagtv4sf (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcalt_f32 (float32x2_t __a, float32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vcagtv2sf (__b, __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcaltq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vcagtv4sf (__b, __a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtst_s8 (int8x8_t __a, int8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vtstv8qi (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtst_s16 (int16x4_t __a, int16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vtstv4hi (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtst_s32 (int32x2_t __a, int32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vtstv2si (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtst_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vtstv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtst_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vtstv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtst_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vtstv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtst_p8 (poly8x8_t __a, poly8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vtstv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtst_p16 (poly16x4_t __a, poly16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vtstv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtstq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vtstv16qi (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtstq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vtstv8hi (__a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtstq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vtstv4si (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtstq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vtstv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtstq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vtstv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtstq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vtstv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtstq_p8 (poly8x16_t __a, poly8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vtstv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtstq_p16 (poly16x8_t __a, poly16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vtstv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabd_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vabdsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabd_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vabdsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabd_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vabdsv2si (__a, __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabd_f32 (float32x2_t __a, float32x2_t __b) +{ + return (float32x2_t)__builtin_neon_vabdfv2sf (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabd_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vabduv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabd_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vabduv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabd_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vabduv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vabdsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vabdsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vabdsv4si (__a, __b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (float32x4_t)__builtin_neon_vabdfv4sf (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vabduv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vabduv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vabduv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdl_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int16x8_t)__builtin_neon_vabdlsv8qi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdl_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int32x4_t)__builtin_neon_vabdlsv4hi (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdl_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int64x2_t)__builtin_neon_vabdlsv2si (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdl_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vabdluv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdl_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vabdluv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdl_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vabdluv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaba_s8 (int8x8_t __a, int8x8_t __b, int8x8_t __c) +{ + return (int8x8_t)__builtin_neon_vabasv8qi (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaba_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int16x4_t)__builtin_neon_vabasv4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaba_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int32x2_t)__builtin_neon_vabasv2si (__a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaba_u8 (uint8x8_t __a, uint8x8_t __b, uint8x8_t __c) +{ + return (uint8x8_t)__builtin_neon_vabauv8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaba_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c) +{ + return (uint16x4_t)__builtin_neon_vabauv4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaba_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c) +{ + return (uint32x2_t)__builtin_neon_vabauv2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabaq_s8 (int8x16_t __a, int8x16_t __b, int8x16_t __c) +{ + return (int8x16_t)__builtin_neon_vabasv16qi (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabaq_s16 (int16x8_t __a, int16x8_t __b, int16x8_t __c) +{ + return (int16x8_t)__builtin_neon_vabasv8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabaq_s32 (int32x4_t __a, int32x4_t __b, int32x4_t __c) +{ + return (int32x4_t)__builtin_neon_vabasv4si (__a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabaq_u8 (uint8x16_t __a, uint8x16_t __b, uint8x16_t __c) +{ + return (uint8x16_t)__builtin_neon_vabauv16qi ((int8x16_t) __a, (int8x16_t) __b, (int8x16_t) __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabaq_u16 (uint16x8_t __a, uint16x8_t __b, uint16x8_t __c) +{ + return (uint16x8_t)__builtin_neon_vabauv8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x8_t) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabaq_u32 (uint32x4_t __a, uint32x4_t __b, uint32x4_t __c) +{ + return (uint32x4_t)__builtin_neon_vabauv4si ((int32x4_t) __a, (int32x4_t) __b, (int32x4_t) __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabal_s8 (int16x8_t __a, int8x8_t __b, int8x8_t __c) +{ + return (int16x8_t)__builtin_neon_vabalsv8qi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabal_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int32x4_t)__builtin_neon_vabalsv4hi (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabal_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int64x2_t)__builtin_neon_vabalsv2si (__a, __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabal_u8 (uint16x8_t __a, uint8x8_t __b, uint8x8_t __c) +{ + return (uint16x8_t)__builtin_neon_vabaluv8qi ((int16x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabal_u16 (uint32x4_t __a, uint16x4_t __b, uint16x4_t __c) +{ + return (uint32x4_t)__builtin_neon_vabaluv4hi ((int32x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabal_u32 (uint64x2_t __a, uint32x2_t __b, uint32x2_t __c) +{ + return (uint64x2_t)__builtin_neon_vabaluv2si ((int64x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmax_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vmaxsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmax_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vmaxsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmax_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vmaxsv2si (__a, __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmax_f32 (float32x2_t __a, float32x2_t __b) +{ + return (float32x2_t)__builtin_neon_vmaxfv2sf (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmax_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vmaxuv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmax_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vmaxuv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmax_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vmaxuv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vmaxsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vmaxsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vmaxsv4si (__a, __b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (float32x4_t)__builtin_neon_vmaxfv4sf (__a, __b); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=neon-fp-armv8") +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxnm_f32 (float32x2_t a, float32x2_t b) +{ + return (float32x2_t)__builtin_neon_vmaxnmv2sf (a, b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxnmq_f32 (float32x4_t a, float32x4_t b) +{ + return (float32x4_t)__builtin_neon_vmaxnmv4sf (a, b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminnm_f32 (float32x2_t a, float32x2_t b) +{ + return (float32x2_t)__builtin_neon_vminnmv2sf (a, b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminnmq_f32 (float32x4_t a, float32x4_t b) +{ + return (float32x4_t)__builtin_neon_vminnmv4sf (a, b); +} +#pragma GCC pop_options + + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vmaxuv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vmaxuv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vmaxuv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmin_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vminsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmin_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vminsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmin_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vminsv2si (__a, __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmin_f32 (float32x2_t __a, float32x2_t __b) +{ + return (float32x2_t)__builtin_neon_vminfv2sf (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmin_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vminuv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmin_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vminuv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmin_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vminuv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vminsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vminsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vminsv4si (__a, __b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (float32x4_t)__builtin_neon_vminfv4sf (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vminuv16qi ((int8x16_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vminuv8hi ((int16x8_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vminuv4si ((int32x4_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadd_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vpaddv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadd_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vpaddv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadd_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vpaddv2si (__a, __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadd_f32 (float32x2_t __a, float32x2_t __b) +{ + return (float32x2_t)__builtin_neon_vpaddv2sf (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadd_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vpaddv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadd_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vpaddv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadd_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vpaddv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddl_s8 (int8x8_t __a) +{ + return (int16x4_t)__builtin_neon_vpaddlsv8qi (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddl_s16 (int16x4_t __a) +{ + return (int32x2_t)__builtin_neon_vpaddlsv4hi (__a); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddl_s32 (int32x2_t __a) +{ + return (int64x1_t)__builtin_neon_vpaddlsv2si (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddl_u8 (uint8x8_t __a) +{ + return (uint16x4_t)__builtin_neon_vpaddluv8qi ((int8x8_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddl_u16 (uint16x4_t __a) +{ + return (uint32x2_t)__builtin_neon_vpaddluv4hi ((int16x4_t) __a); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddl_u32 (uint32x2_t __a) +{ + return (uint64x1_t)__builtin_neon_vpaddluv2si ((int32x2_t) __a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddlq_s8 (int8x16_t __a) +{ + return (int16x8_t)__builtin_neon_vpaddlsv16qi (__a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddlq_s16 (int16x8_t __a) +{ + return (int32x4_t)__builtin_neon_vpaddlsv8hi (__a); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddlq_s32 (int32x4_t __a) +{ + return (int64x2_t)__builtin_neon_vpaddlsv4si (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddlq_u8 (uint8x16_t __a) +{ + return (uint16x8_t)__builtin_neon_vpaddluv16qi ((int8x16_t) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddlq_u16 (uint16x8_t __a) +{ + return (uint32x4_t)__builtin_neon_vpaddluv8hi ((int16x8_t) __a); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpaddlq_u32 (uint32x4_t __a) +{ + return (uint64x2_t)__builtin_neon_vpaddluv4si ((int32x4_t) __a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadal_s8 (int16x4_t __a, int8x8_t __b) +{ + return (int16x4_t)__builtin_neon_vpadalsv8qi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadal_s16 (int32x2_t __a, int16x4_t __b) +{ + return (int32x2_t)__builtin_neon_vpadalsv4hi (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadal_s32 (int64x1_t __a, int32x2_t __b) +{ + return (int64x1_t)__builtin_neon_vpadalsv2si (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadal_u8 (uint16x4_t __a, uint8x8_t __b) +{ + return (uint16x4_t)__builtin_neon_vpadaluv8qi ((int16x4_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadal_u16 (uint32x2_t __a, uint16x4_t __b) +{ + return (uint32x2_t)__builtin_neon_vpadaluv4hi ((int32x2_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadal_u32 (uint64x1_t __a, uint32x2_t __b) +{ + return (uint64x1_t)__builtin_neon_vpadaluv2si ((int64x1_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadalq_s8 (int16x8_t __a, int8x16_t __b) +{ + return (int16x8_t)__builtin_neon_vpadalsv16qi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadalq_s16 (int32x4_t __a, int16x8_t __b) +{ + return (int32x4_t)__builtin_neon_vpadalsv8hi (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadalq_s32 (int64x2_t __a, int32x4_t __b) +{ + return (int64x2_t)__builtin_neon_vpadalsv4si (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadalq_u8 (uint16x8_t __a, uint8x16_t __b) +{ + return (uint16x8_t)__builtin_neon_vpadaluv16qi ((int16x8_t) __a, (int8x16_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadalq_u16 (uint32x4_t __a, uint16x8_t __b) +{ + return (uint32x4_t)__builtin_neon_vpadaluv8hi ((int32x4_t) __a, (int16x8_t) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadalq_u32 (uint64x2_t __a, uint32x4_t __b) +{ + return (uint64x2_t)__builtin_neon_vpadaluv4si ((int64x2_t) __a, (int32x4_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmax_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vpmaxsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmax_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vpmaxsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmax_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vpmaxsv2si (__a, __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmax_f32 (float32x2_t __a, float32x2_t __b) +{ + return (float32x2_t)__builtin_neon_vpmaxfv2sf (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmax_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vpmaxuv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmax_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vpmaxuv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmax_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vpmaxuv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmin_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vpminsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmin_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vpminsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmin_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vpminsv2si (__a, __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmin_f32 (float32x2_t __a, float32x2_t __b) +{ + return (float32x2_t)__builtin_neon_vpminfv2sf (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmin_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vpminuv8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmin_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vpminuv4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmin_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vpminuv2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrecps_f32 (float32x2_t __a, float32x2_t __b) +{ + return (float32x2_t)__builtin_neon_vrecpsv2sf (__a, __b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrecpsq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (float32x4_t)__builtin_neon_vrecpsv4sf (__a, __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsqrts_f32 (float32x2_t __a, float32x2_t __b) +{ + return (float32x2_t)__builtin_neon_vrsqrtsv2sf (__a, __b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsqrtsq_f32 (float32x4_t __a, float32x4_t __b) +{ + return (float32x4_t)__builtin_neon_vrsqrtsv4sf (__a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vshlsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vshlsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vshlsv2si (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_s64 (int64x1_t __a, int64x1_t __b) +{ + return (int64x1_t)__builtin_neon_vshlsdi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_u8 (uint8x8_t __a, int8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vshluv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_u16 (uint16x4_t __a, int16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vshluv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_u32 (uint32x2_t __a, int32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vshluv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_u64 (uint64x1_t __a, int64x1_t __b) +{ + return (uint64x1_t)__builtin_neon_vshludi ((int64x1_t) __a, __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vshlsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vshlsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vshlsv4si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_s64 (int64x2_t __a, int64x2_t __b) +{ + return (int64x2_t)__builtin_neon_vshlsv2di (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_u8 (uint8x16_t __a, int8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vshluv16qi ((int8x16_t) __a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_u16 (uint16x8_t __a, int16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vshluv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_u32 (uint32x4_t __a, int32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vshluv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_u64 (uint64x2_t __a, int64x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vshluv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshl_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vrshlsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshl_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vrshlsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshl_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vrshlsv2si (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshl_s64 (int64x1_t __a, int64x1_t __b) +{ + return (int64x1_t)__builtin_neon_vrshlsdi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshl_u8 (uint8x8_t __a, int8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vrshluv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshl_u16 (uint16x4_t __a, int16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vrshluv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshl_u32 (uint32x2_t __a, int32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vrshluv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshl_u64 (uint64x1_t __a, int64x1_t __b) +{ + return (uint64x1_t)__builtin_neon_vrshludi ((int64x1_t) __a, __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshlq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vrshlsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshlq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vrshlsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshlq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vrshlsv4si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshlq_s64 (int64x2_t __a, int64x2_t __b) +{ + return (int64x2_t)__builtin_neon_vrshlsv2di (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshlq_u8 (uint8x16_t __a, int8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vrshluv16qi ((int8x16_t) __a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshlq_u16 (uint16x8_t __a, int16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vrshluv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshlq_u32 (uint32x4_t __a, int32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vrshluv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshlq_u64 (uint64x2_t __a, int64x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vrshluv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vqshlsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vqshlsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vqshlsv2si (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_s64 (int64x1_t __a, int64x1_t __b) +{ + return (int64x1_t)__builtin_neon_vqshlsdi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_u8 (uint8x8_t __a, int8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vqshluv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_u16 (uint16x4_t __a, int16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vqshluv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_u32 (uint32x2_t __a, int32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vqshluv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_u64 (uint64x1_t __a, int64x1_t __b) +{ + return (uint64x1_t)__builtin_neon_vqshludi ((int64x1_t) __a, __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vqshlsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vqshlsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vqshlsv4si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_s64 (int64x2_t __a, int64x2_t __b) +{ + return (int64x2_t)__builtin_neon_vqshlsv2di (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_u8 (uint8x16_t __a, int8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vqshluv16qi ((int8x16_t) __a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_u16 (uint16x8_t __a, int16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vqshluv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_u32 (uint32x4_t __a, int32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vqshluv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_u64 (uint64x2_t __a, int64x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vqshluv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshl_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vqrshlsv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshl_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x4_t)__builtin_neon_vqrshlsv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshl_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x2_t)__builtin_neon_vqrshlsv2si (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshl_s64 (int64x1_t __a, int64x1_t __b) +{ + return (int64x1_t)__builtin_neon_vqrshlsdi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshl_u8 (uint8x8_t __a, int8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vqrshluv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshl_u16 (uint16x4_t __a, int16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vqrshluv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshl_u32 (uint32x2_t __a, int32x2_t __b) +{ + return (uint32x2_t)__builtin_neon_vqrshluv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshl_u64 (uint64x1_t __a, int64x1_t __b) +{ + return (uint64x1_t)__builtin_neon_vqrshludi ((int64x1_t) __a, __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshlq_s8 (int8x16_t __a, int8x16_t __b) +{ + return (int8x16_t)__builtin_neon_vqrshlsv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshlq_s16 (int16x8_t __a, int16x8_t __b) +{ + return (int16x8_t)__builtin_neon_vqrshlsv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshlq_s32 (int32x4_t __a, int32x4_t __b) +{ + return (int32x4_t)__builtin_neon_vqrshlsv4si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshlq_s64 (int64x2_t __a, int64x2_t __b) +{ + return (int64x2_t)__builtin_neon_vqrshlsv2di (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshlq_u8 (uint8x16_t __a, int8x16_t __b) +{ + return (uint8x16_t)__builtin_neon_vqrshluv16qi ((int8x16_t) __a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshlq_u16 (uint16x8_t __a, int16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vqrshluv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshlq_u32 (uint32x4_t __a, int32x4_t __b) +{ + return (uint32x4_t)__builtin_neon_vqrshluv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshlq_u64 (uint64x2_t __a, int64x2_t __b) +{ + return (uint64x2_t)__builtin_neon_vqrshluv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshr_n_s8 (int8x8_t __a, const int __b) +{ + return (int8x8_t)__builtin_neon_vshrs_nv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshr_n_s16 (int16x4_t __a, const int __b) +{ + return (int16x4_t)__builtin_neon_vshrs_nv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshr_n_s32 (int32x2_t __a, const int __b) +{ + return (int32x2_t)__builtin_neon_vshrs_nv2si (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshr_n_s64 (int64x1_t __a, const int __b) +{ + return (int64x1_t)__builtin_neon_vshrs_ndi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshr_n_u8 (uint8x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vshru_nv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshr_n_u16 (uint16x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vshru_nv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshr_n_u32 (uint32x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vshru_nv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshr_n_u64 (uint64x1_t __a, const int __b) +{ + return (uint64x1_t)__builtin_neon_vshru_ndi ((int64x1_t) __a, __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrq_n_s8 (int8x16_t __a, const int __b) +{ + return (int8x16_t)__builtin_neon_vshrs_nv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrq_n_s16 (int16x8_t __a, const int __b) +{ + return (int16x8_t)__builtin_neon_vshrs_nv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrq_n_s32 (int32x4_t __a, const int __b) +{ + return (int32x4_t)__builtin_neon_vshrs_nv4si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrq_n_s64 (int64x2_t __a, const int __b) +{ + return (int64x2_t)__builtin_neon_vshrs_nv2di (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrq_n_u8 (uint8x16_t __a, const int __b) +{ + return (uint8x16_t)__builtin_neon_vshru_nv16qi ((int8x16_t) __a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrq_n_u16 (uint16x8_t __a, const int __b) +{ + return (uint16x8_t)__builtin_neon_vshru_nv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrq_n_u32 (uint32x4_t __a, const int __b) +{ + return (uint32x4_t)__builtin_neon_vshru_nv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrq_n_u64 (uint64x2_t __a, const int __b) +{ + return (uint64x2_t)__builtin_neon_vshru_nv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshr_n_s8 (int8x8_t __a, const int __b) +{ + return (int8x8_t)__builtin_neon_vrshrs_nv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshr_n_s16 (int16x4_t __a, const int __b) +{ + return (int16x4_t)__builtin_neon_vrshrs_nv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshr_n_s32 (int32x2_t __a, const int __b) +{ + return (int32x2_t)__builtin_neon_vrshrs_nv2si (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshr_n_s64 (int64x1_t __a, const int __b) +{ + return (int64x1_t)__builtin_neon_vrshrs_ndi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshr_n_u8 (uint8x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vrshru_nv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshr_n_u16 (uint16x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vrshru_nv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshr_n_u32 (uint32x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vrshru_nv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshr_n_u64 (uint64x1_t __a, const int __b) +{ + return (uint64x1_t)__builtin_neon_vrshru_ndi ((int64x1_t) __a, __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrq_n_s8 (int8x16_t __a, const int __b) +{ + return (int8x16_t)__builtin_neon_vrshrs_nv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrq_n_s16 (int16x8_t __a, const int __b) +{ + return (int16x8_t)__builtin_neon_vrshrs_nv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrq_n_s32 (int32x4_t __a, const int __b) +{ + return (int32x4_t)__builtin_neon_vrshrs_nv4si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrq_n_s64 (int64x2_t __a, const int __b) +{ + return (int64x2_t)__builtin_neon_vrshrs_nv2di (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrq_n_u8 (uint8x16_t __a, const int __b) +{ + return (uint8x16_t)__builtin_neon_vrshru_nv16qi ((int8x16_t) __a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrq_n_u16 (uint16x8_t __a, const int __b) +{ + return (uint16x8_t)__builtin_neon_vrshru_nv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrq_n_u32 (uint32x4_t __a, const int __b) +{ + return (uint32x4_t)__builtin_neon_vrshru_nv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrq_n_u64 (uint64x2_t __a, const int __b) +{ + return (uint64x2_t)__builtin_neon_vrshru_nv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrn_n_s16 (int16x8_t __a, const int __b) +{ + return (int8x8_t)__builtin_neon_vshrn_nv8hi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrn_n_s32 (int32x4_t __a, const int __b) +{ + return (int16x4_t)__builtin_neon_vshrn_nv4si (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrn_n_s64 (int64x2_t __a, const int __b) +{ + return (int32x2_t)__builtin_neon_vshrn_nv2di (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrn_n_u16 (uint16x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vshrn_nv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrn_n_u32 (uint32x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vshrn_nv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshrn_n_u64 (uint64x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vshrn_nv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrn_n_s16 (int16x8_t __a, const int __b) +{ + return (int8x8_t)__builtin_neon_vrshrn_nv8hi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrn_n_s32 (int32x4_t __a, const int __b) +{ + return (int16x4_t)__builtin_neon_vrshrn_nv4si (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrn_n_s64 (int64x2_t __a, const int __b) +{ + return (int32x2_t)__builtin_neon_vrshrn_nv2di (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrn_n_u16 (uint16x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vrshrn_nv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrn_n_u32 (uint32x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vrshrn_nv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrshrn_n_u64 (uint64x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vrshrn_nv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshrn_n_s16 (int16x8_t __a, const int __b) +{ + return (int8x8_t)__builtin_neon_vqshrns_nv8hi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshrn_n_s32 (int32x4_t __a, const int __b) +{ + return (int16x4_t)__builtin_neon_vqshrns_nv4si (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshrn_n_s64 (int64x2_t __a, const int __b) +{ + return (int32x2_t)__builtin_neon_vqshrns_nv2di (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshrn_n_u16 (uint16x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vqshrnu_nv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshrn_n_u32 (uint32x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vqshrnu_nv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshrn_n_u64 (uint64x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vqshrnu_nv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshrn_n_s16 (int16x8_t __a, const int __b) +{ + return (int8x8_t)__builtin_neon_vqrshrns_nv8hi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshrn_n_s32 (int32x4_t __a, const int __b) +{ + return (int16x4_t)__builtin_neon_vqrshrns_nv4si (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshrn_n_s64 (int64x2_t __a, const int __b) +{ + return (int32x2_t)__builtin_neon_vqrshrns_nv2di (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshrn_n_u16 (uint16x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vqrshrnu_nv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshrn_n_u32 (uint32x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vqrshrnu_nv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshrn_n_u64 (uint64x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vqrshrnu_nv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshrun_n_s16 (int16x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vqshrun_nv8hi (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshrun_n_s32 (int32x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vqshrun_nv4si (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshrun_n_s64 (int64x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vqshrun_nv2di (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshrun_n_s16 (int16x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vqrshrun_nv8hi (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshrun_n_s32 (int32x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vqrshrun_nv4si (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrshrun_n_s64 (int64x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vqrshrun_nv2di (__a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_n_s8 (int8x8_t __a, const int __b) +{ + return (int8x8_t)__builtin_neon_vshl_nv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_n_s16 (int16x4_t __a, const int __b) +{ + return (int16x4_t)__builtin_neon_vshl_nv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_n_s32 (int32x2_t __a, const int __b) +{ + return (int32x2_t)__builtin_neon_vshl_nv2si (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_n_s64 (int64x1_t __a, const int __b) +{ + return (int64x1_t)__builtin_neon_vshl_ndi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_n_u8 (uint8x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vshl_nv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_n_u16 (uint16x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vshl_nv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_n_u32 (uint32x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vshl_nv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshl_n_u64 (uint64x1_t __a, const int __b) +{ + return (uint64x1_t)__builtin_neon_vshl_ndi ((int64x1_t) __a, __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_n_s8 (int8x16_t __a, const int __b) +{ + return (int8x16_t)__builtin_neon_vshl_nv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_n_s16 (int16x8_t __a, const int __b) +{ + return (int16x8_t)__builtin_neon_vshl_nv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_n_s32 (int32x4_t __a, const int __b) +{ + return (int32x4_t)__builtin_neon_vshl_nv4si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_n_s64 (int64x2_t __a, const int __b) +{ + return (int64x2_t)__builtin_neon_vshl_nv2di (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_n_u8 (uint8x16_t __a, const int __b) +{ + return (uint8x16_t)__builtin_neon_vshl_nv16qi ((int8x16_t) __a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_n_u16 (uint16x8_t __a, const int __b) +{ + return (uint16x8_t)__builtin_neon_vshl_nv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_n_u32 (uint32x4_t __a, const int __b) +{ + return (uint32x4_t)__builtin_neon_vshl_nv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshlq_n_u64 (uint64x2_t __a, const int __b) +{ + return (uint64x2_t)__builtin_neon_vshl_nv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_n_s8 (int8x8_t __a, const int __b) +{ + return (int8x8_t)__builtin_neon_vqshl_s_nv8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_n_s16 (int16x4_t __a, const int __b) +{ + return (int16x4_t)__builtin_neon_vqshl_s_nv4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_n_s32 (int32x2_t __a, const int __b) +{ + return (int32x2_t)__builtin_neon_vqshl_s_nv2si (__a, __b); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_n_s64 (int64x1_t __a, const int __b) +{ + return (int64x1_t)__builtin_neon_vqshl_s_ndi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_n_u8 (uint8x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vqshl_u_nv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_n_u16 (uint16x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vqshl_u_nv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_n_u32 (uint32x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vqshl_u_nv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshl_n_u64 (uint64x1_t __a, const int __b) +{ + return (uint64x1_t)__builtin_neon_vqshl_u_ndi ((int64x1_t) __a, __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_n_s8 (int8x16_t __a, const int __b) +{ + return (int8x16_t)__builtin_neon_vqshl_s_nv16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_n_s16 (int16x8_t __a, const int __b) +{ + return (int16x8_t)__builtin_neon_vqshl_s_nv8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_n_s32 (int32x4_t __a, const int __b) +{ + return (int32x4_t)__builtin_neon_vqshl_s_nv4si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_n_s64 (int64x2_t __a, const int __b) +{ + return (int64x2_t)__builtin_neon_vqshl_s_nv2di (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_n_u8 (uint8x16_t __a, const int __b) +{ + return (uint8x16_t)__builtin_neon_vqshl_u_nv16qi ((int8x16_t) __a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_n_u16 (uint16x8_t __a, const int __b) +{ + return (uint16x8_t)__builtin_neon_vqshl_u_nv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_n_u32 (uint32x4_t __a, const int __b) +{ + return (uint32x4_t)__builtin_neon_vqshl_u_nv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlq_n_u64 (uint64x2_t __a, const int __b) +{ + return (uint64x2_t)__builtin_neon_vqshl_u_nv2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlu_n_s8 (int8x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vqshlu_nv8qi (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlu_n_s16 (int16x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vqshlu_nv4hi (__a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlu_n_s32 (int32x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vqshlu_nv2si (__a, __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshlu_n_s64 (int64x1_t __a, const int __b) +{ + return (uint64x1_t)__builtin_neon_vqshlu_ndi (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshluq_n_s8 (int8x16_t __a, const int __b) +{ + return (uint8x16_t)__builtin_neon_vqshlu_nv16qi (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshluq_n_s16 (int16x8_t __a, const int __b) +{ + return (uint16x8_t)__builtin_neon_vqshlu_nv8hi (__a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshluq_n_s32 (int32x4_t __a, const int __b) +{ + return (uint32x4_t)__builtin_neon_vqshlu_nv4si (__a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqshluq_n_s64 (int64x2_t __a, const int __b) +{ + return (uint64x2_t)__builtin_neon_vqshlu_nv2di (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshll_n_s8 (int8x8_t __a, const int __b) +{ + return (int16x8_t)__builtin_neon_vshlls_nv8qi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshll_n_s16 (int16x4_t __a, const int __b) +{ + return (int32x4_t)__builtin_neon_vshlls_nv4hi (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshll_n_s32 (int32x2_t __a, const int __b) +{ + return (int64x2_t)__builtin_neon_vshlls_nv2si (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshll_n_u8 (uint8x8_t __a, const int __b) +{ + return (uint16x8_t)__builtin_neon_vshllu_nv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshll_n_u16 (uint16x4_t __a, const int __b) +{ + return (uint32x4_t)__builtin_neon_vshllu_nv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vshll_n_u32 (uint32x2_t __a, const int __b) +{ + return (uint64x2_t)__builtin_neon_vshllu_nv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsra_n_s8 (int8x8_t __a, int8x8_t __b, const int __c) +{ + return (int8x8_t)__builtin_neon_vsras_nv8qi (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsra_n_s16 (int16x4_t __a, int16x4_t __b, const int __c) +{ + return (int16x4_t)__builtin_neon_vsras_nv4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsra_n_s32 (int32x2_t __a, int32x2_t __b, const int __c) +{ + return (int32x2_t)__builtin_neon_vsras_nv2si (__a, __b, __c); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsra_n_s64 (int64x1_t __a, int64x1_t __b, const int __c) +{ + return (int64x1_t)__builtin_neon_vsras_ndi (__a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsra_n_u8 (uint8x8_t __a, uint8x8_t __b, const int __c) +{ + return (uint8x8_t)__builtin_neon_vsrau_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsra_n_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) +{ + return (uint16x4_t)__builtin_neon_vsrau_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsra_n_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) +{ + return (uint32x2_t)__builtin_neon_vsrau_nv2si ((int32x2_t) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsra_n_u64 (uint64x1_t __a, uint64x1_t __b, const int __c) +{ + return (uint64x1_t)__builtin_neon_vsrau_ndi ((int64x1_t) __a, (int64x1_t) __b, __c); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsraq_n_s8 (int8x16_t __a, int8x16_t __b, const int __c) +{ + return (int8x16_t)__builtin_neon_vsras_nv16qi (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsraq_n_s16 (int16x8_t __a, int16x8_t __b, const int __c) +{ + return (int16x8_t)__builtin_neon_vsras_nv8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsraq_n_s32 (int32x4_t __a, int32x4_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vsras_nv4si (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsraq_n_s64 (int64x2_t __a, int64x2_t __b, const int __c) +{ + return (int64x2_t)__builtin_neon_vsras_nv2di (__a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsraq_n_u8 (uint8x16_t __a, uint8x16_t __b, const int __c) +{ + return (uint8x16_t)__builtin_neon_vsrau_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsraq_n_u16 (uint16x8_t __a, uint16x8_t __b, const int __c) +{ + return (uint16x8_t)__builtin_neon_vsrau_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsraq_n_u32 (uint32x4_t __a, uint32x4_t __b, const int __c) +{ + return (uint32x4_t)__builtin_neon_vsrau_nv4si ((int32x4_t) __a, (int32x4_t) __b, __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsraq_n_u64 (uint64x2_t __a, uint64x2_t __b, const int __c) +{ + return (uint64x2_t)__builtin_neon_vsrau_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsra_n_s8 (int8x8_t __a, int8x8_t __b, const int __c) +{ + return (int8x8_t)__builtin_neon_vrsras_nv8qi (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsra_n_s16 (int16x4_t __a, int16x4_t __b, const int __c) +{ + return (int16x4_t)__builtin_neon_vrsras_nv4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsra_n_s32 (int32x2_t __a, int32x2_t __b, const int __c) +{ + return (int32x2_t)__builtin_neon_vrsras_nv2si (__a, __b, __c); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsra_n_s64 (int64x1_t __a, int64x1_t __b, const int __c) +{ + return (int64x1_t)__builtin_neon_vrsras_ndi (__a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsra_n_u8 (uint8x8_t __a, uint8x8_t __b, const int __c) +{ + return (uint8x8_t)__builtin_neon_vrsrau_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsra_n_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) +{ + return (uint16x4_t)__builtin_neon_vrsrau_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsra_n_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) +{ + return (uint32x2_t)__builtin_neon_vrsrau_nv2si ((int32x2_t) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsra_n_u64 (uint64x1_t __a, uint64x1_t __b, const int __c) +{ + return (uint64x1_t)__builtin_neon_vrsrau_ndi ((int64x1_t) __a, (int64x1_t) __b, __c); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsraq_n_s8 (int8x16_t __a, int8x16_t __b, const int __c) +{ + return (int8x16_t)__builtin_neon_vrsras_nv16qi (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsraq_n_s16 (int16x8_t __a, int16x8_t __b, const int __c) +{ + return (int16x8_t)__builtin_neon_vrsras_nv8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsraq_n_s32 (int32x4_t __a, int32x4_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vrsras_nv4si (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsraq_n_s64 (int64x2_t __a, int64x2_t __b, const int __c) +{ + return (int64x2_t)__builtin_neon_vrsras_nv2di (__a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsraq_n_u8 (uint8x16_t __a, uint8x16_t __b, const int __c) +{ + return (uint8x16_t)__builtin_neon_vrsrau_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsraq_n_u16 (uint16x8_t __a, uint16x8_t __b, const int __c) +{ + return (uint16x8_t)__builtin_neon_vrsrau_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsraq_n_u32 (uint32x4_t __a, uint32x4_t __b, const int __c) +{ + return (uint32x4_t)__builtin_neon_vrsrau_nv4si ((int32x4_t) __a, (int32x4_t) __b, __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsraq_n_u64 (uint64x2_t __a, uint64x2_t __b, const int __c) +{ + return (uint64x2_t)__builtin_neon_vrsrau_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_p64 (poly64x1_t __a, poly64x1_t __b, const int __c) +{ + return (poly64x1_t)__builtin_neon_vsri_ndi (__a, __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_s8 (int8x8_t __a, int8x8_t __b, const int __c) +{ + return (int8x8_t)__builtin_neon_vsri_nv8qi (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_s16 (int16x4_t __a, int16x4_t __b, const int __c) +{ + return (int16x4_t)__builtin_neon_vsri_nv4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_s32 (int32x2_t __a, int32x2_t __b, const int __c) +{ + return (int32x2_t)__builtin_neon_vsri_nv2si (__a, __b, __c); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_s64 (int64x1_t __a, int64x1_t __b, const int __c) +{ + return (int64x1_t)__builtin_neon_vsri_ndi (__a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_u8 (uint8x8_t __a, uint8x8_t __b, const int __c) +{ + return (uint8x8_t)__builtin_neon_vsri_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) +{ + return (uint16x4_t)__builtin_neon_vsri_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) +{ + return (uint32x2_t)__builtin_neon_vsri_nv2si ((int32x2_t) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_u64 (uint64x1_t __a, uint64x1_t __b, const int __c) +{ + return (uint64x1_t)__builtin_neon_vsri_ndi ((int64x1_t) __a, (int64x1_t) __b, __c); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_p8 (poly8x8_t __a, poly8x8_t __b, const int __c) +{ + return (poly8x8_t)__builtin_neon_vsri_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsri_n_p16 (poly16x4_t __a, poly16x4_t __b, const int __c) +{ + return (poly16x4_t)__builtin_neon_vsri_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_p64 (poly64x2_t __a, poly64x2_t __b, const int __c) +{ + return (poly64x2_t)__builtin_neon_vsri_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_s8 (int8x16_t __a, int8x16_t __b, const int __c) +{ + return (int8x16_t)__builtin_neon_vsri_nv16qi (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_s16 (int16x8_t __a, int16x8_t __b, const int __c) +{ + return (int16x8_t)__builtin_neon_vsri_nv8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_s32 (int32x4_t __a, int32x4_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vsri_nv4si (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_s64 (int64x2_t __a, int64x2_t __b, const int __c) +{ + return (int64x2_t)__builtin_neon_vsri_nv2di (__a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_u8 (uint8x16_t __a, uint8x16_t __b, const int __c) +{ + return (uint8x16_t)__builtin_neon_vsri_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_u16 (uint16x8_t __a, uint16x8_t __b, const int __c) +{ + return (uint16x8_t)__builtin_neon_vsri_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_u32 (uint32x4_t __a, uint32x4_t __b, const int __c) +{ + return (uint32x4_t)__builtin_neon_vsri_nv4si ((int32x4_t) __a, (int32x4_t) __b, __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_u64 (uint64x2_t __a, uint64x2_t __b, const int __c) +{ + return (uint64x2_t)__builtin_neon_vsri_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_p8 (poly8x16_t __a, poly8x16_t __b, const int __c) +{ + return (poly8x16_t)__builtin_neon_vsri_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsriq_n_p16 (poly16x8_t __a, poly16x8_t __b, const int __c) +{ + return (poly16x8_t)__builtin_neon_vsri_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_p64 (poly64x1_t __a, poly64x1_t __b, const int __c) +{ + return (poly64x1_t)__builtin_neon_vsli_ndi (__a, __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_s8 (int8x8_t __a, int8x8_t __b, const int __c) +{ + return (int8x8_t)__builtin_neon_vsli_nv8qi (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_s16 (int16x4_t __a, int16x4_t __b, const int __c) +{ + return (int16x4_t)__builtin_neon_vsli_nv4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_s32 (int32x2_t __a, int32x2_t __b, const int __c) +{ + return (int32x2_t)__builtin_neon_vsli_nv2si (__a, __b, __c); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_s64 (int64x1_t __a, int64x1_t __b, const int __c) +{ + return (int64x1_t)__builtin_neon_vsli_ndi (__a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_u8 (uint8x8_t __a, uint8x8_t __b, const int __c) +{ + return (uint8x8_t)__builtin_neon_vsli_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) +{ + return (uint16x4_t)__builtin_neon_vsli_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) +{ + return (uint32x2_t)__builtin_neon_vsli_nv2si ((int32x2_t) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_u64 (uint64x1_t __a, uint64x1_t __b, const int __c) +{ + return (uint64x1_t)__builtin_neon_vsli_ndi ((int64x1_t) __a, (int64x1_t) __b, __c); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_p8 (poly8x8_t __a, poly8x8_t __b, const int __c) +{ + return (poly8x8_t)__builtin_neon_vsli_nv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsli_n_p16 (poly16x4_t __a, poly16x4_t __b, const int __c) +{ + return (poly16x4_t)__builtin_neon_vsli_nv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_p64 (poly64x2_t __a, poly64x2_t __b, const int __c) +{ + return (poly64x2_t)__builtin_neon_vsli_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_s8 (int8x16_t __a, int8x16_t __b, const int __c) +{ + return (int8x16_t)__builtin_neon_vsli_nv16qi (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_s16 (int16x8_t __a, int16x8_t __b, const int __c) +{ + return (int16x8_t)__builtin_neon_vsli_nv8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_s32 (int32x4_t __a, int32x4_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vsli_nv4si (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_s64 (int64x2_t __a, int64x2_t __b, const int __c) +{ + return (int64x2_t)__builtin_neon_vsli_nv2di (__a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_u8 (uint8x16_t __a, uint8x16_t __b, const int __c) +{ + return (uint8x16_t)__builtin_neon_vsli_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_u16 (uint16x8_t __a, uint16x8_t __b, const int __c) +{ + return (uint16x8_t)__builtin_neon_vsli_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_u32 (uint32x4_t __a, uint32x4_t __b, const int __c) +{ + return (uint32x4_t)__builtin_neon_vsli_nv4si ((int32x4_t) __a, (int32x4_t) __b, __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_u64 (uint64x2_t __a, uint64x2_t __b, const int __c) +{ + return (uint64x2_t)__builtin_neon_vsli_nv2di ((int64x2_t) __a, (int64x2_t) __b, __c); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_p8 (poly8x16_t __a, poly8x16_t __b, const int __c) +{ + return (poly8x16_t)__builtin_neon_vsli_nv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsliq_n_p16 (poly16x8_t __a, poly16x8_t __b, const int __c) +{ + return (poly16x8_t)__builtin_neon_vsli_nv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabs_s8 (int8x8_t __a) +{ + return (int8x8_t)__builtin_neon_vabsv8qi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabs_s16 (int16x4_t __a) +{ + return (int16x4_t)__builtin_neon_vabsv4hi (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabs_s32 (int32x2_t __a) +{ + return (int32x2_t)__builtin_neon_vabsv2si (__a); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabs_f32 (float32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vabsv2sf (__a); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabsq_s8 (int8x16_t __a) +{ + return (int8x16_t)__builtin_neon_vabsv16qi (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabsq_s16 (int16x8_t __a) +{ + return (int16x8_t)__builtin_neon_vabsv8hi (__a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabsq_s32 (int32x4_t __a) +{ + return (int32x4_t)__builtin_neon_vabsv4si (__a); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabsq_f32 (float32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vabsv4sf (__a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqabs_s8 (int8x8_t __a) +{ + return (int8x8_t)__builtin_neon_vqabsv8qi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqabs_s16 (int16x4_t __a) +{ + return (int16x4_t)__builtin_neon_vqabsv4hi (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqabs_s32 (int32x2_t __a) +{ + return (int32x2_t)__builtin_neon_vqabsv2si (__a); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqabsq_s8 (int8x16_t __a) +{ + return (int8x16_t)__builtin_neon_vqabsv16qi (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqabsq_s16 (int16x8_t __a) +{ + return (int16x8_t)__builtin_neon_vqabsv8hi (__a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqabsq_s32 (int32x4_t __a) +{ + return (int32x4_t)__builtin_neon_vqabsv4si (__a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vneg_s8 (int8x8_t __a) +{ + return (int8x8_t)__builtin_neon_vnegv8qi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vneg_s16 (int16x4_t __a) +{ + return (int16x4_t)__builtin_neon_vnegv4hi (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vneg_s32 (int32x2_t __a) +{ + return (int32x2_t)__builtin_neon_vnegv2si (__a); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vneg_f32 (float32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vnegv2sf (__a); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vnegq_s8 (int8x16_t __a) +{ + return (int8x16_t)__builtin_neon_vnegv16qi (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vnegq_s16 (int16x8_t __a) +{ + return (int16x8_t)__builtin_neon_vnegv8hi (__a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vnegq_s32 (int32x4_t __a) +{ + return (int32x4_t)__builtin_neon_vnegv4si (__a); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vnegq_f32 (float32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vnegv4sf (__a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqneg_s8 (int8x8_t __a) +{ + return (int8x8_t)__builtin_neon_vqnegv8qi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqneg_s16 (int16x4_t __a) +{ + return (int16x4_t)__builtin_neon_vqnegv4hi (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqneg_s32 (int32x2_t __a) +{ + return (int32x2_t)__builtin_neon_vqnegv2si (__a); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqnegq_s8 (int8x16_t __a) +{ + return (int8x16_t)__builtin_neon_vqnegv16qi (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqnegq_s16 (int16x8_t __a) +{ + return (int16x8_t)__builtin_neon_vqnegv8hi (__a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqnegq_s32 (int32x4_t __a) +{ + return (int32x4_t)__builtin_neon_vqnegv4si (__a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvn_s8 (int8x8_t __a) +{ + return (int8x8_t)__builtin_neon_vmvnv8qi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvn_s16 (int16x4_t __a) +{ + return (int16x4_t)__builtin_neon_vmvnv4hi (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvn_s32 (int32x2_t __a) +{ + return (int32x2_t)__builtin_neon_vmvnv2si (__a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvn_u8 (uint8x8_t __a) +{ + return (uint8x8_t)__builtin_neon_vmvnv8qi ((int8x8_t) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvn_u16 (uint16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vmvnv4hi ((int16x4_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvn_u32 (uint32x2_t __a) +{ + return (uint32x2_t)__builtin_neon_vmvnv2si ((int32x2_t) __a); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvn_p8 (poly8x8_t __a) +{ + return (poly8x8_t)__builtin_neon_vmvnv8qi ((int8x8_t) __a); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvnq_s8 (int8x16_t __a) +{ + return (int8x16_t)__builtin_neon_vmvnv16qi (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvnq_s16 (int16x8_t __a) +{ + return (int16x8_t)__builtin_neon_vmvnv8hi (__a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvnq_s32 (int32x4_t __a) +{ + return (int32x4_t)__builtin_neon_vmvnv4si (__a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvnq_u8 (uint8x16_t __a) +{ + return (uint8x16_t)__builtin_neon_vmvnv16qi ((int8x16_t) __a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvnq_u16 (uint16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vmvnv8hi ((int16x8_t) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvnq_u32 (uint32x4_t __a) +{ + return (uint32x4_t)__builtin_neon_vmvnv4si ((int32x4_t) __a); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmvnq_p8 (poly8x16_t __a) +{ + return (poly8x16_t)__builtin_neon_vmvnv16qi ((int8x16_t) __a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcls_s8 (int8x8_t __a) +{ + return (int8x8_t)__builtin_neon_vclsv8qi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcls_s16 (int16x4_t __a) +{ + return (int16x4_t)__builtin_neon_vclsv4hi (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcls_s32 (int32x2_t __a) +{ + return (int32x2_t)__builtin_neon_vclsv2si (__a); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclsq_s8 (int8x16_t __a) +{ + return (int8x16_t)__builtin_neon_vclsv16qi (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclsq_s16 (int16x8_t __a) +{ + return (int16x8_t)__builtin_neon_vclsv8hi (__a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclsq_s32 (int32x4_t __a) +{ + return (int32x4_t)__builtin_neon_vclsv4si (__a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclz_s8 (int8x8_t __a) +{ + return (int8x8_t)__builtin_neon_vclzv8qi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclz_s16 (int16x4_t __a) +{ + return (int16x4_t)__builtin_neon_vclzv4hi (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclz_s32 (int32x2_t __a) +{ + return (int32x2_t)__builtin_neon_vclzv2si (__a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclz_u8 (uint8x8_t __a) +{ + return (uint8x8_t)__builtin_neon_vclzv8qi ((int8x8_t) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclz_u16 (uint16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vclzv4hi ((int16x4_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclz_u32 (uint32x2_t __a) +{ + return (uint32x2_t)__builtin_neon_vclzv2si ((int32x2_t) __a); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclzq_s8 (int8x16_t __a) +{ + return (int8x16_t)__builtin_neon_vclzv16qi (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclzq_s16 (int16x8_t __a) +{ + return (int16x8_t)__builtin_neon_vclzv8hi (__a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclzq_s32 (int32x4_t __a) +{ + return (int32x4_t)__builtin_neon_vclzv4si (__a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclzq_u8 (uint8x16_t __a) +{ + return (uint8x16_t)__builtin_neon_vclzv16qi ((int8x16_t) __a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclzq_u16 (uint16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vclzv8hi ((int16x8_t) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclzq_u32 (uint32x4_t __a) +{ + return (uint32x4_t)__builtin_neon_vclzv4si ((int32x4_t) __a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcnt_s8 (int8x8_t __a) +{ + return (int8x8_t)__builtin_neon_vcntv8qi (__a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcnt_u8 (uint8x8_t __a) +{ + return (uint8x8_t)__builtin_neon_vcntv8qi ((int8x8_t) __a); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcnt_p8 (poly8x8_t __a) +{ + return (poly8x8_t)__builtin_neon_vcntv8qi ((int8x8_t) __a); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcntq_s8 (int8x16_t __a) +{ + return (int8x16_t)__builtin_neon_vcntv16qi (__a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcntq_u8 (uint8x16_t __a) +{ + return (uint8x16_t)__builtin_neon_vcntv16qi ((int8x16_t) __a); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcntq_p8 (poly8x16_t __a) +{ + return (poly8x16_t)__builtin_neon_vcntv16qi ((int8x16_t) __a); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrecpe_f32 (float32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vrecpev2sf (__a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrecpe_u32 (uint32x2_t __a) +{ + return (uint32x2_t)__builtin_neon_vrecpev2si ((int32x2_t) __a); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrecpeq_f32 (float32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vrecpev4sf (__a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrecpeq_u32 (uint32x4_t __a) +{ + return (uint32x4_t)__builtin_neon_vrecpev4si ((int32x4_t) __a); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsqrte_f32 (float32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vrsqrtev2sf (__a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsqrte_u32 (uint32x2_t __a) +{ + return (uint32x2_t)__builtin_neon_vrsqrtev2si ((int32x2_t) __a); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsqrteq_f32 (float32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vrsqrtev4sf (__a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsqrteq_u32 (uint32x4_t __a) +{ + return (uint32x4_t)__builtin_neon_vrsqrtev4si ((int32x4_t) __a); +} + +__extension__ extern __inline int8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_s8 (int8x8_t __a, const int __b) +{ + return (int8_t)__builtin_neon_vget_lanev8qi (__a, __b); +} + +__extension__ extern __inline int16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_s16 (int16x4_t __a, const int __b) +{ + return (int16_t)__builtin_neon_vget_lanev4hi (__a, __b); +} + +__extension__ extern __inline int32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_s32 (int32x2_t __a, const int __b) +{ + return (int32_t)__builtin_neon_vget_lanev2si (__a, __b); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +/* Functions cannot accept or return __FP16 types. Even if the function + were marked always-inline so there were no call sites, the declaration + would nonetheless raise an error. Hence, we must use a macro instead. */ + + /* For big-endian, GCC's vector indices are reversed within each 64 + bits compared to the architectural lane indices used by Neon + intrinsics. */ +#ifdef __ARM_BIG_ENDIAN +#define __ARM_NUM_LANES(__v) (sizeof (__v) / sizeof (__v[0])) +#define __arm_lane(__vec, __idx) (__idx ^ (__ARM_NUM_LANES(__vec) - 1)) +#define __arm_laneq(__vec, __idx) (__idx ^ (__ARM_NUM_LANES(__vec)/2 - 1)) +#else +#define __arm_lane(__vec, __idx) __idx +#define __arm_laneq(__vec, __idx) __idx +#endif + +#define vget_lane_f16(__v, __idx) \ + __extension__ \ + ({ \ + float16x4_t __vec = (__v); \ + __builtin_arm_lane_check (4, __idx); \ + float16_t __res = __vec[__arm_lane(__vec, __idx)]; \ + __res; \ + }) +#endif + +__extension__ extern __inline float32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_f32 (float32x2_t __a, const int __b) +{ + return (float32_t)__builtin_neon_vget_lanev2sf (__a, __b); +} + +__extension__ extern __inline uint8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_u8 (uint8x8_t __a, const int __b) +{ + return (uint8_t)__builtin_neon_vget_laneuv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_u16 (uint16x4_t __a, const int __b) +{ + return (uint16_t)__builtin_neon_vget_laneuv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_u32 (uint32x2_t __a, const int __b) +{ + return (uint32_t)__builtin_neon_vget_laneuv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline poly8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_p8 (poly8x8_t __a, const int __b) +{ + return (poly8_t)__builtin_neon_vget_laneuv8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline poly16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_p16 (poly16x4_t __a, const int __b) +{ + return (poly16_t)__builtin_neon_vget_laneuv4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline int64_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_s64 (int64x1_t __a, const int __b) +{ + return (int64_t)__builtin_neon_vget_lanedi (__a, __b); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_p64 (poly64x1_t __a, const int __b) +{ + return (poly64_t)__builtin_neon_vget_lanedi ((int64x1_t) __a, __b); +} + +#pragma GCC pop_options +__extension__ extern __inline uint64_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_lane_u64 (uint64x1_t __a, const int __b) +{ + return (uint64_t)__builtin_neon_vget_lanedi ((int64x1_t) __a, __b); +} + +__extension__ extern __inline int8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_s8 (int8x16_t __a, const int __b) +{ + return (int8_t)__builtin_neon_vget_lanev16qi (__a, __b); +} + +__extension__ extern __inline int16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_s16 (int16x8_t __a, const int __b) +{ + return (int16_t)__builtin_neon_vget_lanev8hi (__a, __b); +} + +__extension__ extern __inline int32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_s32 (int32x4_t __a, const int __b) +{ + return (int32_t)__builtin_neon_vget_lanev4si (__a, __b); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +#define vgetq_lane_f16(__v, __idx) \ + __extension__ \ + ({ \ + float16x8_t __vec = (__v); \ + __builtin_arm_lane_check (8, __idx); \ + float16_t __res = __vec[__arm_laneq(__vec, __idx)]; \ + __res; \ + }) +#endif + +__extension__ extern __inline float32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_f32 (float32x4_t __a, const int __b) +{ + return (float32_t)__builtin_neon_vget_lanev4sf (__a, __b); +} + +__extension__ extern __inline uint8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_u8 (uint8x16_t __a, const int __b) +{ + return (uint8_t)__builtin_neon_vget_laneuv16qi ((int8x16_t) __a, __b); +} + +__extension__ extern __inline uint16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_u16 (uint16x8_t __a, const int __b) +{ + return (uint16_t)__builtin_neon_vget_laneuv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline uint32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_u32 (uint32x4_t __a, const int __b) +{ + return (uint32_t)__builtin_neon_vget_laneuv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline poly8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_p8 (poly8x16_t __a, const int __b) +{ + return (poly8_t)__builtin_neon_vget_laneuv16qi ((int8x16_t) __a, __b); +} + +__extension__ extern __inline poly16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_p16 (poly16x8_t __a, const int __b) +{ + return (poly16_t)__builtin_neon_vget_laneuv8hi ((int16x8_t) __a, __b); +} + +__extension__ extern __inline int64_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_s64 (int64x2_t __a, const int __b) +{ + return (int64_t)__builtin_neon_vget_lanev2di (__a, __b); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_p64 (poly64x2_t __a, const int __b) +{ + return (poly64_t)__builtin_neon_vget_lanev2di ((int64x2_t) __a, __b); +} + +#pragma GCC pop_options +__extension__ extern __inline uint64_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vgetq_lane_u64 (uint64x2_t __a, const int __b) +{ + return (uint64_t)__builtin_neon_vget_lanev2di ((int64x2_t) __a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_s8 (int8_t __a, int8x8_t __b, const int __c) +{ + return (int8x8_t)__builtin_neon_vset_lanev8qi ((__builtin_neon_qi) __a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_s16 (int16_t __a, int16x4_t __b, const int __c) +{ + return (int16x4_t)__builtin_neon_vset_lanev4hi ((__builtin_neon_hi) __a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_s32 (int32_t __a, int32x2_t __b, const int __c) +{ + return (int32x2_t)__builtin_neon_vset_lanev2si ((__builtin_neon_si) __a, __b, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +#define vset_lane_f16(__e, __v, __idx) \ + __extension__ \ + ({ \ + float16_t __elem = (__e); \ + float16x4_t __vec = (__v); \ + __builtin_arm_lane_check (4, __idx); \ + __vec[__arm_lane (__vec, __idx)] = __elem; \ + __vec; \ + }) +#endif + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_f32 (float32_t __a, float32x2_t __b, const int __c) +{ + return (float32x2_t)__builtin_neon_vset_lanev2sf ((__builtin_neon_sf) __a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_u8 (uint8_t __a, uint8x8_t __b, const int __c) +{ + return (uint8x8_t)__builtin_neon_vset_lanev8qi ((__builtin_neon_qi) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_u16 (uint16_t __a, uint16x4_t __b, const int __c) +{ + return (uint16x4_t)__builtin_neon_vset_lanev4hi ((__builtin_neon_hi) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_u32 (uint32_t __a, uint32x2_t __b, const int __c) +{ + return (uint32x2_t)__builtin_neon_vset_lanev2si ((__builtin_neon_si) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_p8 (poly8_t __a, poly8x8_t __b, const int __c) +{ + return (poly8x8_t)__builtin_neon_vset_lanev8qi ((__builtin_neon_qi) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_p16 (poly16_t __a, poly16x4_t __b, const int __c) +{ + return (poly16x4_t)__builtin_neon_vset_lanev4hi ((__builtin_neon_hi) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_s64 (int64_t __a, int64x1_t __b, const int __c) +{ + return (int64x1_t)__builtin_neon_vset_lanedi ((__builtin_neon_di) __a, __b, __c); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_u64 (uint64_t __a, uint64x1_t __b, const int __c) +{ + return (uint64x1_t)__builtin_neon_vset_lanedi ((__builtin_neon_di) __a, (int64x1_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vset_lane_p64 (poly64_t __a, poly64x1_t __b, const int __c) +{ + return (poly64x1_t)__builtin_neon_vset_lanedi ((__builtin_neon_di) __a, (int64x1_t) __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_s8 (int8_t __a, int8x16_t __b, const int __c) +{ + return (int8x16_t)__builtin_neon_vset_lanev16qi ((__builtin_neon_qi) __a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_s16 (int16_t __a, int16x8_t __b, const int __c) +{ + return (int16x8_t)__builtin_neon_vset_lanev8hi ((__builtin_neon_hi) __a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_s32 (int32_t __a, int32x4_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vset_lanev4si ((__builtin_neon_si) __a, __b, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +#define vsetq_lane_f16(__e, __v, __idx) \ + __extension__ \ + ({ \ + float16_t __elem = (__e); \ + float16x8_t __vec = (__v); \ + __builtin_arm_lane_check (8, __idx); \ + __vec[__arm_laneq (__vec, __idx)] = __elem; \ + __vec; \ + }) +#endif + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_f32 (float32_t __a, float32x4_t __b, const int __c) +{ + return (float32x4_t)__builtin_neon_vset_lanev4sf ((__builtin_neon_sf) __a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_u8 (uint8_t __a, uint8x16_t __b, const int __c) +{ + return (uint8x16_t)__builtin_neon_vset_lanev16qi ((__builtin_neon_qi) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_u16 (uint16_t __a, uint16x8_t __b, const int __c) +{ + return (uint16x8_t)__builtin_neon_vset_lanev8hi ((__builtin_neon_hi) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_u32 (uint32_t __a, uint32x4_t __b, const int __c) +{ + return (uint32x4_t)__builtin_neon_vset_lanev4si ((__builtin_neon_si) __a, (int32x4_t) __b, __c); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_p8 (poly8_t __a, poly8x16_t __b, const int __c) +{ + return (poly8x16_t)__builtin_neon_vset_lanev16qi ((__builtin_neon_qi) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_p16 (poly16_t __a, poly16x8_t __b, const int __c) +{ + return (poly16x8_t)__builtin_neon_vset_lanev8hi ((__builtin_neon_hi) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_s64 (int64_t __a, int64x2_t __b, const int __c) +{ + return (int64x2_t)__builtin_neon_vset_lanev2di ((__builtin_neon_di) __a, __b, __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_u64 (uint64_t __a, uint64x2_t __b, const int __c) +{ + return (uint64x2_t)__builtin_neon_vset_lanev2di ((__builtin_neon_di) __a, (int64x2_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsetq_lane_p64 (poly64_t __a, poly64x2_t __b, const int __c) +{ + return (poly64x2_t)__builtin_neon_vset_lanev2di ((__builtin_neon_di) __a, (int64x2_t) __b, __c); +} + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_p64 (uint64_t __a) +{ + return (poly64x1_t)__builtin_neon_vcreatedi ((__builtin_neon_di) __a); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_s8 (uint64_t __a) +{ + return (int8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_s16 (uint64_t __a) +{ + return (int16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_s32 (uint64_t __a) +{ + return (int32x2_t)__builtin_neon_vcreatev2si ((__builtin_neon_di) __a); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_s64 (uint64_t __a) +{ + return (int64x1_t)__builtin_neon_vcreatedi ((__builtin_neon_di) __a); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_f16 (uint64_t __a) +{ + return (float16x4_t) __a; +} +#endif + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_f32 (uint64_t __a) +{ + return (float32x2_t)__builtin_neon_vcreatev2sf ((__builtin_neon_di) __a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_u8 (uint64_t __a) +{ + return (uint8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_u16 (uint64_t __a) +{ + return (uint16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_u32 (uint64_t __a) +{ + return (uint32x2_t)__builtin_neon_vcreatev2si ((__builtin_neon_di) __a); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_u64 (uint64_t __a) +{ + return (uint64x1_t)__builtin_neon_vcreatedi ((__builtin_neon_di) __a); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_p8 (uint64_t __a) +{ + return (poly8x8_t)__builtin_neon_vcreatev8qi ((__builtin_neon_di) __a); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcreate_p16 (uint64_t __a) +{ + return (poly16x4_t)__builtin_neon_vcreatev4hi ((__builtin_neon_di) __a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_s8 (int8_t __a) +{ + return (int8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_s16 (int16_t __a) +{ + return (int16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_s32 (int32_t __a) +{ + return (int32x2_t)__builtin_neon_vdup_nv2si ((__builtin_neon_si) __a); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_f32 (float32_t __a) +{ + return (float32x2_t)__builtin_neon_vdup_nv2sf ((__builtin_neon_sf) __a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_u8 (uint8_t __a) +{ + return (uint8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_u16 (uint16_t __a) +{ + return (uint16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_u32 (uint32_t __a) +{ + return (uint32x2_t)__builtin_neon_vdup_nv2si ((__builtin_neon_si) __a); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_p8 (poly8_t __a) +{ + return (poly8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_p16 (poly16_t __a) +{ + return (poly16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_p64 (poly64_t __a) +{ + return (poly64x1_t)__builtin_neon_vdup_ndi ((__builtin_neon_di) __a); +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_s64 (int64_t __a) +{ + return (int64x1_t)__builtin_neon_vdup_ndi ((__builtin_neon_di) __a); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_u64 (uint64_t __a) +{ + return (uint64x1_t)__builtin_neon_vdup_ndi ((__builtin_neon_di) __a); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_p64 (poly64_t __a) +{ + return (poly64x2_t)__builtin_neon_vdup_nv2di ((__builtin_neon_di) __a); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_s8 (int8_t __a) +{ + return (int8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_s16 (int16_t __a) +{ + return (int16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_s32 (int32_t __a) +{ + return (int32x4_t)__builtin_neon_vdup_nv4si ((__builtin_neon_si) __a); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_f32 (float32_t __a) +{ + return (float32x4_t)__builtin_neon_vdup_nv4sf ((__builtin_neon_sf) __a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_u8 (uint8_t __a) +{ + return (uint8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_u16 (uint16_t __a) +{ + return (uint16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_u32 (uint32_t __a) +{ + return (uint32x4_t)__builtin_neon_vdup_nv4si ((__builtin_neon_si) __a); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_p8 (poly8_t __a) +{ + return (poly8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_p16 (poly16_t __a) +{ + return (poly16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_s64 (int64_t __a) +{ + return (int64x2_t)__builtin_neon_vdup_nv2di ((__builtin_neon_di) __a); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_u64 (uint64_t __a) +{ + return (uint64x2_t)__builtin_neon_vdup_nv2di ((__builtin_neon_di) __a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_s8 (int8_t __a) +{ + return (int8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_s16 (int16_t __a) +{ + return (int16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_s32 (int32_t __a) +{ + return (int32x2_t)__builtin_neon_vdup_nv2si ((__builtin_neon_si) __a); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_f32 (float32_t __a) +{ + return (float32x2_t)__builtin_neon_vdup_nv2sf ((__builtin_neon_sf) __a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_u8 (uint8_t __a) +{ + return (uint8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_u16 (uint16_t __a) +{ + return (uint16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_u32 (uint32_t __a) +{ + return (uint32x2_t)__builtin_neon_vdup_nv2si ((__builtin_neon_si) __a); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_p8 (poly8_t __a) +{ + return (poly8x8_t)__builtin_neon_vdup_nv8qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_p16 (poly16_t __a) +{ + return (poly16x4_t)__builtin_neon_vdup_nv4hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_s64 (int64_t __a) +{ + return (int64x1_t)__builtin_neon_vdup_ndi ((__builtin_neon_di) __a); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_u64 (uint64_t __a) +{ + return (uint64x1_t)__builtin_neon_vdup_ndi ((__builtin_neon_di) __a); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_s8 (int8_t __a) +{ + return (int8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_s16 (int16_t __a) +{ + return (int16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_s32 (int32_t __a) +{ + return (int32x4_t)__builtin_neon_vdup_nv4si ((__builtin_neon_si) __a); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_f32 (float32_t __a) +{ + return (float32x4_t)__builtin_neon_vdup_nv4sf ((__builtin_neon_sf) __a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_u8 (uint8_t __a) +{ + return (uint8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_u16 (uint16_t __a) +{ + return (uint16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_u32 (uint32_t __a) +{ + return (uint32x4_t)__builtin_neon_vdup_nv4si ((__builtin_neon_si) __a); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_p8 (poly8_t __a) +{ + return (poly8x16_t)__builtin_neon_vdup_nv16qi ((__builtin_neon_qi) __a); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_p16 (poly16_t __a) +{ + return (poly16x8_t)__builtin_neon_vdup_nv8hi ((__builtin_neon_hi) __a); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_s64 (int64_t __a) +{ + return (int64x2_t)__builtin_neon_vdup_nv2di ((__builtin_neon_di) __a); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_u64 (uint64_t __a) +{ + return (uint64x2_t)__builtin_neon_vdup_nv2di ((__builtin_neon_di) __a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_s8 (int8x8_t __a, const int __b) +{ + return (int8x8_t)__builtin_neon_vdup_lanev8qi (__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_s16 (int16x4_t __a, const int __b) +{ + return (int16x4_t)__builtin_neon_vdup_lanev4hi (__a, __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_s32 (int32x2_t __a, const int __b) +{ + return (int32x2_t)__builtin_neon_vdup_lanev2si (__a, __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_f32 (float32x2_t __a, const int __b) +{ + return (float32x2_t)__builtin_neon_vdup_lanev2sf (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_u8 (uint8x8_t __a, const int __b) +{ + return (uint8x8_t)__builtin_neon_vdup_lanev8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_u16 (uint16x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vdup_lanev4hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_u32 (uint32x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vdup_lanev2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_p8 (poly8x8_t __a, const int __b) +{ + return (poly8x8_t)__builtin_neon_vdup_lanev8qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_p16 (poly16x4_t __a, const int __b) +{ + return (poly16x4_t)__builtin_neon_vdup_lanev4hi ((int16x4_t) __a, __b); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_p64 (poly64x1_t __a, const int __b) +{ + return (poly64x1_t)__builtin_neon_vdup_lanedi (__a, __b); +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_s64 (int64x1_t __a, const int __b) +{ + return (int64x1_t)__builtin_neon_vdup_lanedi (__a, __b); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_u64 (uint64x1_t __a, const int __b) +{ + return (uint64x1_t)__builtin_neon_vdup_lanedi ((int64x1_t) __a, __b); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_s8 (int8x8_t __a, const int __b) +{ + return (int8x16_t)__builtin_neon_vdup_lanev16qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_s16 (int16x4_t __a, const int __b) +{ + return (int16x8_t)__builtin_neon_vdup_lanev8hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_s32 (int32x2_t __a, const int __b) +{ + return (int32x4_t)__builtin_neon_vdup_lanev4si (__a, __b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_f32 (float32x2_t __a, const int __b) +{ + return (float32x4_t)__builtin_neon_vdup_lanev4sf (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_u8 (uint8x8_t __a, const int __b) +{ + return (uint8x16_t)__builtin_neon_vdup_lanev16qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_u16 (uint16x4_t __a, const int __b) +{ + return (uint16x8_t)__builtin_neon_vdup_lanev8hi ((int16x4_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_u32 (uint32x2_t __a, const int __b) +{ + return (uint32x4_t)__builtin_neon_vdup_lanev4si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_p8 (poly8x8_t __a, const int __b) +{ + return (poly8x16_t)__builtin_neon_vdup_lanev16qi ((int8x8_t) __a, __b); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_p16 (poly16x4_t __a, const int __b) +{ + return (poly16x8_t)__builtin_neon_vdup_lanev8hi ((int16x4_t) __a, __b); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_p64 (poly64x1_t __a, const int __b) +{ + return (poly64x2_t)__builtin_neon_vdup_lanev2di (__a, __b); +} + +#pragma GCC pop_options +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_s64 (int64x1_t __a, const int __b) +{ + return (int64x2_t)__builtin_neon_vdup_lanev2di (__a, __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_u64 (uint64x1_t __a, const int __b) +{ + return (uint64x2_t)__builtin_neon_vdup_lanev2di ((int64x1_t) __a, __b); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_p64 (poly64x1_t __a, poly64x1_t __b) +{ + return (poly64x2_t)__builtin_neon_vcombinedi (__a, __b); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x16_t)__builtin_neon_vcombinev8qi (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_s16 (int16x4_t __a, int16x4_t __b) +{ + return (int16x8_t)__builtin_neon_vcombinev4hi (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_s32 (int32x2_t __a, int32x2_t __b) +{ + return (int32x4_t)__builtin_neon_vcombinev2si (__a, __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_s64 (int64x1_t __a, int64x1_t __b) +{ + return (int64x2_t)__builtin_neon_vcombinedi (__a, __b); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vcombinev4hf (__a, __b); +} +#endif + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_f32 (float32x2_t __a, float32x2_t __b) +{ + return (float32x4_t)__builtin_neon_vcombinev2sf (__a, __b); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x16_t)__builtin_neon_vcombinev8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return (uint16x8_t)__builtin_neon_vcombinev4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return (uint32x4_t)__builtin_neon_vcombinev2si ((int32x2_t) __a, (int32x2_t) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_u64 (uint64x1_t __a, uint64x1_t __b) +{ + return (uint64x2_t)__builtin_neon_vcombinedi ((int64x1_t) __a, (int64x1_t) __b); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_p8 (poly8x8_t __a, poly8x8_t __b) +{ + return (poly8x16_t)__builtin_neon_vcombinev8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcombine_p16 (poly16x4_t __a, poly16x4_t __b) +{ + return (poly16x8_t)__builtin_neon_vcombinev4hi ((int16x4_t) __a, (int16x4_t) __b); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_p64 (poly64x2_t __a) +{ + return (poly64x1_t)__builtin_neon_vget_highv2di ((int64x2_t) __a); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_s8 (int8x16_t __a) +{ + return (int8x8_t)__builtin_neon_vget_highv16qi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_s16 (int16x8_t __a) +{ + return (int16x4_t)__builtin_neon_vget_highv8hi (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_s32 (int32x4_t __a) +{ + return (int32x2_t)__builtin_neon_vget_highv4si (__a); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_s64 (int64x2_t __a) +{ + return (int64x1_t)__builtin_neon_vget_highv2di (__a); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_f16 (float16x8_t __a) +{ + return __builtin_neon_vget_highv8hf (__a); +} +#endif + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_f32 (float32x4_t __a) +{ + return (float32x2_t)__builtin_neon_vget_highv4sf (__a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_u8 (uint8x16_t __a) +{ + return (uint8x8_t)__builtin_neon_vget_highv16qi ((int8x16_t) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_u16 (uint16x8_t __a) +{ + return (uint16x4_t)__builtin_neon_vget_highv8hi ((int16x8_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_u32 (uint32x4_t __a) +{ + return (uint32x2_t)__builtin_neon_vget_highv4si ((int32x4_t) __a); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_u64 (uint64x2_t __a) +{ + return (uint64x1_t)__builtin_neon_vget_highv2di ((int64x2_t) __a); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_p8 (poly8x16_t __a) +{ + return (poly8x8_t)__builtin_neon_vget_highv16qi ((int8x16_t) __a); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_high_p16 (poly16x8_t __a) +{ + return (poly16x4_t)__builtin_neon_vget_highv8hi ((int16x8_t) __a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_s8 (int8x16_t __a) +{ + return (int8x8_t)__builtin_neon_vget_lowv16qi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_s16 (int16x8_t __a) +{ + return (int16x4_t)__builtin_neon_vget_lowv8hi (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_s32 (int32x4_t __a) +{ + return (int32x2_t)__builtin_neon_vget_lowv4si (__a); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_f16 (float16x8_t __a) +{ + return __builtin_neon_vget_lowv8hf (__a); +} +#endif + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_f32 (float32x4_t __a) +{ + return (float32x2_t)__builtin_neon_vget_lowv4sf (__a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_u8 (uint8x16_t __a) +{ + return (uint8x8_t)__builtin_neon_vget_lowv16qi ((int8x16_t) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_u16 (uint16x8_t __a) +{ + return (uint16x4_t)__builtin_neon_vget_lowv8hi ((int16x8_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_u32 (uint32x4_t __a) +{ + return (uint32x2_t)__builtin_neon_vget_lowv4si ((int32x4_t) __a); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_p8 (poly8x16_t __a) +{ + return (poly8x8_t)__builtin_neon_vget_lowv16qi ((int8x16_t) __a); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_p16 (poly16x8_t __a) +{ + return (poly16x4_t)__builtin_neon_vget_lowv8hi ((int16x8_t) __a); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_p64 (poly64x2_t __a) +{ + return (poly64x1_t)__builtin_neon_vget_lowv2di ((int64x2_t) __a); +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_s64 (int64x2_t __a) +{ + return (int64x1_t)__builtin_neon_vget_lowv2di (__a); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vget_low_u64 (uint64x2_t __a) +{ + return (uint64x1_t)__builtin_neon_vget_lowv2di ((int64x2_t) __a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_s32_f32 (float32x2_t __a) +{ + return (int32x2_t)__builtin_neon_vcvtsv2sf (__a); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_f32_s32 (int32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vcvtsv2si (__a); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_f32_u32 (uint32x2_t __a) +{ + return (float32x2_t)__builtin_neon_vcvtuv2si ((int32x2_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_u32_f32 (float32x2_t __a) +{ + return (uint32x2_t)__builtin_neon_vcvtuv2sf (__a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_s32_f32 (float32x4_t __a) +{ + return (int32x4_t)__builtin_neon_vcvtsv4sf (__a); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_f32_s32 (int32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vcvtsv4si (__a); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_f32_u32 (uint32x4_t __a) +{ + return (float32x4_t)__builtin_neon_vcvtuv4si ((int32x4_t) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_u32_f32 (float32x4_t __a) +{ + return (uint32x4_t)__builtin_neon_vcvtuv4sf (__a); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=neon-fp16") +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_f16_f32 (float32x4_t __a) +{ + return (float16x4_t)__builtin_neon_vcvtv4hfv4sf (__a); +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_f32_f16 (float16x4_t __a) +{ + return (float32x4_t)__builtin_neon_vcvtv4sfv4hf (__a); +} +#endif +#pragma GCC pop_options + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_n_s32_f32 (float32x2_t __a, const int __b) +{ + return (int32x2_t)__builtin_neon_vcvts_nv2sf (__a, __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_n_f32_s32 (int32x2_t __a, const int __b) +{ + return (float32x2_t)__builtin_neon_vcvts_nv2si (__a, __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_n_f32_u32 (uint32x2_t __a, const int __b) +{ + return (float32x2_t)__builtin_neon_vcvtu_nv2si ((int32x2_t) __a, __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_n_u32_f32 (float32x2_t __a, const int __b) +{ + return (uint32x2_t)__builtin_neon_vcvtu_nv2sf (__a, __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_n_s32_f32 (float32x4_t __a, const int __b) +{ + return (int32x4_t)__builtin_neon_vcvts_nv4sf (__a, __b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_n_f32_s32 (int32x4_t __a, const int __b) +{ + return (float32x4_t)__builtin_neon_vcvts_nv4si (__a, __b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_n_f32_u32 (uint32x4_t __a, const int __b) +{ + return (float32x4_t)__builtin_neon_vcvtu_nv4si ((int32x4_t) __a, __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_n_u32_f32 (float32x4_t __a, const int __b) +{ + return (uint32x4_t)__builtin_neon_vcvtu_nv4sf (__a, __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovn_s16 (int16x8_t __a) +{ + return (int8x8_t)__builtin_neon_vmovnv8hi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovn_s32 (int32x4_t __a) +{ + return (int16x4_t)__builtin_neon_vmovnv4si (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovn_s64 (int64x2_t __a) +{ + return (int32x2_t)__builtin_neon_vmovnv2di (__a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovn_u16 (uint16x8_t __a) +{ + return (uint8x8_t)__builtin_neon_vmovnv8hi ((int16x8_t) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovn_u32 (uint32x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vmovnv4si ((int32x4_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovn_u64 (uint64x2_t __a) +{ + return (uint32x2_t)__builtin_neon_vmovnv2di ((int64x2_t) __a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqmovn_s16 (int16x8_t __a) +{ + return (int8x8_t)__builtin_neon_vqmovnsv8hi (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqmovn_s32 (int32x4_t __a) +{ + return (int16x4_t)__builtin_neon_vqmovnsv4si (__a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqmovn_s64 (int64x2_t __a) +{ + return (int32x2_t)__builtin_neon_vqmovnsv2di (__a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqmovn_u16 (uint16x8_t __a) +{ + return (uint8x8_t)__builtin_neon_vqmovnuv8hi ((int16x8_t) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqmovn_u32 (uint32x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vqmovnuv4si ((int32x4_t) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqmovn_u64 (uint64x2_t __a) +{ + return (uint32x2_t)__builtin_neon_vqmovnuv2di ((int64x2_t) __a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqmovun_s16 (int16x8_t __a) +{ + return (uint8x8_t)__builtin_neon_vqmovunv8hi (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqmovun_s32 (int32x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vqmovunv4si (__a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqmovun_s64 (int64x2_t __a) +{ + return (uint32x2_t)__builtin_neon_vqmovunv2di (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovl_s8 (int8x8_t __a) +{ + return (int16x8_t)__builtin_neon_vmovlsv8qi (__a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovl_s16 (int16x4_t __a) +{ + return (int32x4_t)__builtin_neon_vmovlsv4hi (__a); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovl_s32 (int32x2_t __a) +{ + return (int64x2_t)__builtin_neon_vmovlsv2si (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovl_u8 (uint8x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vmovluv8qi ((int8x8_t) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovl_u16 (uint16x4_t __a) +{ + return (uint32x4_t)__builtin_neon_vmovluv4hi ((int16x4_t) __a); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovl_u32 (uint32x2_t __a) +{ + return (uint64x2_t)__builtin_neon_vmovluv2si ((int32x2_t) __a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl1_s8 (int8x8_t __a, int8x8_t __b) +{ + return (int8x8_t)__builtin_neon_vtbl1v8qi (__a, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl1_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return (uint8x8_t)__builtin_neon_vtbl1v8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl1_p8 (poly8x8_t __a, uint8x8_t __b) +{ + return (poly8x8_t)__builtin_neon_vtbl1v8qi ((int8x8_t) __a, (int8x8_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl2_s8 (int8x8x2_t __a, int8x8_t __b) +{ + union { int8x8x2_t __i; __builtin_neon_ti __o; } __au = { __a }; + return (int8x8_t)__builtin_neon_vtbl2v8qi (__au.__o, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl2_u8 (uint8x8x2_t __a, uint8x8_t __b) +{ + union { uint8x8x2_t __i; __builtin_neon_ti __o; } __au = { __a }; + return (uint8x8_t)__builtin_neon_vtbl2v8qi (__au.__o, (int8x8_t) __b); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl2_p8 (poly8x8x2_t __a, uint8x8_t __b) +{ + union { poly8x8x2_t __i; __builtin_neon_ti __o; } __au = { __a }; + return (poly8x8_t)__builtin_neon_vtbl2v8qi (__au.__o, (int8x8_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl3_s8 (int8x8x3_t __a, int8x8_t __b) +{ + union { int8x8x3_t __i; __builtin_neon_ei __o; } __au = { __a }; + return (int8x8_t)__builtin_neon_vtbl3v8qi (__au.__o, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl3_u8 (uint8x8x3_t __a, uint8x8_t __b) +{ + union { uint8x8x3_t __i; __builtin_neon_ei __o; } __au = { __a }; + return (uint8x8_t)__builtin_neon_vtbl3v8qi (__au.__o, (int8x8_t) __b); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl3_p8 (poly8x8x3_t __a, uint8x8_t __b) +{ + union { poly8x8x3_t __i; __builtin_neon_ei __o; } __au = { __a }; + return (poly8x8_t)__builtin_neon_vtbl3v8qi (__au.__o, (int8x8_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl4_s8 (int8x8x4_t __a, int8x8_t __b) +{ + union { int8x8x4_t __i; __builtin_neon_oi __o; } __au = { __a }; + return (int8x8_t)__builtin_neon_vtbl4v8qi (__au.__o, __b); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl4_u8 (uint8x8x4_t __a, uint8x8_t __b) +{ + union { uint8x8x4_t __i; __builtin_neon_oi __o; } __au = { __a }; + return (uint8x8_t)__builtin_neon_vtbl4v8qi (__au.__o, (int8x8_t) __b); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbl4_p8 (poly8x8x4_t __a, uint8x8_t __b) +{ + union { poly8x8x4_t __i; __builtin_neon_oi __o; } __au = { __a }; + return (poly8x8_t)__builtin_neon_vtbl4v8qi (__au.__o, (int8x8_t) __b); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx1_s8 (int8x8_t __a, int8x8_t __b, int8x8_t __c) +{ + return (int8x8_t)__builtin_neon_vtbx1v8qi (__a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx1_u8 (uint8x8_t __a, uint8x8_t __b, uint8x8_t __c) +{ + return (uint8x8_t)__builtin_neon_vtbx1v8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx1_p8 (poly8x8_t __a, poly8x8_t __b, uint8x8_t __c) +{ + return (poly8x8_t)__builtin_neon_vtbx1v8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx2_s8 (int8x8_t __a, int8x8x2_t __b, int8x8_t __c) +{ + union { int8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + return (int8x8_t)__builtin_neon_vtbx2v8qi (__a, __bu.__o, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx2_u8 (uint8x8_t __a, uint8x8x2_t __b, uint8x8_t __c) +{ + union { uint8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + return (uint8x8_t)__builtin_neon_vtbx2v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx2_p8 (poly8x8_t __a, poly8x8x2_t __b, uint8x8_t __c) +{ + union { poly8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + return (poly8x8_t)__builtin_neon_vtbx2v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx3_s8 (int8x8_t __a, int8x8x3_t __b, int8x8_t __c) +{ + union { int8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + return (int8x8_t)__builtin_neon_vtbx3v8qi (__a, __bu.__o, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx3_u8 (uint8x8_t __a, uint8x8x3_t __b, uint8x8_t __c) +{ + union { uint8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + return (uint8x8_t)__builtin_neon_vtbx3v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx3_p8 (poly8x8_t __a, poly8x8x3_t __b, uint8x8_t __c) +{ + union { poly8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + return (poly8x8_t)__builtin_neon_vtbx3v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx4_s8 (int8x8_t __a, int8x8x4_t __b, int8x8_t __c) +{ + union { int8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + return (int8x8_t)__builtin_neon_vtbx4v8qi (__a, __bu.__o, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx4_u8 (uint8x8_t __a, uint8x8x4_t __b, uint8x8_t __c) +{ + union { uint8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + return (uint8x8_t)__builtin_neon_vtbx4v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtbx4_p8 (poly8x8_t __a, poly8x8x4_t __b, uint8x8_t __c) +{ + union { poly8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + return (poly8x8_t)__builtin_neon_vtbx4v8qi ((int8x8_t) __a, __bu.__o, (int8x8_t) __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_lane_s16 (int16x4_t __a, int16x4_t __b, const int __c) +{ + return (int16x4_t)__builtin_neon_vmul_lanev4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_lane_s32 (int32x2_t __a, int32x2_t __b, const int __c) +{ + return (int32x2_t)__builtin_neon_vmul_lanev2si (__a, __b, __c); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_lane_f32 (float32x2_t __a, float32x2_t __b, const int __c) +{ + return (float32x2_t)__builtin_neon_vmul_lanev2sf (__a, __b, __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_lane_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) +{ + return (uint16x4_t)__builtin_neon_vmul_lanev4hi ((int16x4_t) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_lane_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) +{ + return (uint32x2_t)__builtin_neon_vmul_lanev2si ((int32x2_t) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_lane_s16 (int16x8_t __a, int16x4_t __b, const int __c) +{ + return (int16x8_t)__builtin_neon_vmul_lanev8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_lane_s32 (int32x4_t __a, int32x2_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vmul_lanev4si (__a, __b, __c); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_lane_f32 (float32x4_t __a, float32x2_t __b, const int __c) +{ + return (float32x4_t)__builtin_neon_vmul_lanev4sf (__a, __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_lane_u16 (uint16x8_t __a, uint16x4_t __b, const int __c) +{ + return (uint16x8_t)__builtin_neon_vmul_lanev8hi ((int16x8_t) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_lane_u32 (uint32x4_t __a, uint32x2_t __b, const int __c) +{ + return (uint32x4_t)__builtin_neon_vmul_lanev4si ((int32x4_t) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_lane_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) +{ + return (int16x4_t)__builtin_neon_vmla_lanev4hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_lane_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) +{ + return (int32x2_t)__builtin_neon_vmla_lanev2si (__a, __b, __c, __d); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_lane_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c, const int __d) +{ + return (float32x2_t)__builtin_neon_vmla_lanev2sf (__a, __b, __c, __d); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_lane_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c, const int __d) +{ + return (uint16x4_t)__builtin_neon_vmla_lanev4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c, __d); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_lane_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c, const int __d) +{ + return (uint32x2_t)__builtin_neon_vmla_lanev2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c, __d); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_lane_s16 (int16x8_t __a, int16x8_t __b, int16x4_t __c, const int __d) +{ + return (int16x8_t)__builtin_neon_vmla_lanev8hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_lane_s32 (int32x4_t __a, int32x4_t __b, int32x2_t __c, const int __d) +{ + return (int32x4_t)__builtin_neon_vmla_lanev4si (__a, __b, __c, __d); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_lane_f32 (float32x4_t __a, float32x4_t __b, float32x2_t __c, const int __d) +{ + return (float32x4_t)__builtin_neon_vmla_lanev4sf (__a, __b, __c, __d); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_lane_u16 (uint16x8_t __a, uint16x8_t __b, uint16x4_t __c, const int __d) +{ + return (uint16x8_t)__builtin_neon_vmla_lanev8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x4_t) __c, __d); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_lane_u32 (uint32x4_t __a, uint32x4_t __b, uint32x2_t __c, const int __d) +{ + return (uint32x4_t)__builtin_neon_vmla_lanev4si ((int32x4_t) __a, (int32x4_t) __b, (int32x2_t) __c, __d); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_lane_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) +{ + return (int32x4_t)__builtin_neon_vmlals_lanev4hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_lane_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) +{ + return (int64x2_t)__builtin_neon_vmlals_lanev2si (__a, __b, __c, __d); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_lane_u16 (uint32x4_t __a, uint16x4_t __b, uint16x4_t __c, const int __d) +{ + return (uint32x4_t)__builtin_neon_vmlalu_lanev4hi ((int32x4_t) __a, (int16x4_t) __b, (int16x4_t) __c, __d); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_lane_u32 (uint64x2_t __a, uint32x2_t __b, uint32x2_t __c, const int __d) +{ + return (uint64x2_t)__builtin_neon_vmlalu_lanev2si ((int64x2_t) __a, (int32x2_t) __b, (int32x2_t) __c, __d); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlal_lane_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) +{ + return (int32x4_t)__builtin_neon_vqdmlal_lanev4hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlal_lane_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) +{ + return (int64x2_t)__builtin_neon_vqdmlal_lanev2si (__a, __b, __c, __d); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_lane_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) +{ + return (int16x4_t)__builtin_neon_vmls_lanev4hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_lane_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) +{ + return (int32x2_t)__builtin_neon_vmls_lanev2si (__a, __b, __c, __d); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_lane_f32 (float32x2_t __a, float32x2_t __b, float32x2_t __c, const int __d) +{ + return (float32x2_t)__builtin_neon_vmls_lanev2sf (__a, __b, __c, __d); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_lane_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c, const int __d) +{ + return (uint16x4_t)__builtin_neon_vmls_lanev4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c, __d); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_lane_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c, const int __d) +{ + return (uint32x2_t)__builtin_neon_vmls_lanev2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c, __d); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_lane_s16 (int16x8_t __a, int16x8_t __b, int16x4_t __c, const int __d) +{ + return (int16x8_t)__builtin_neon_vmls_lanev8hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_lane_s32 (int32x4_t __a, int32x4_t __b, int32x2_t __c, const int __d) +{ + return (int32x4_t)__builtin_neon_vmls_lanev4si (__a, __b, __c, __d); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_lane_f32 (float32x4_t __a, float32x4_t __b, float32x2_t __c, const int __d) +{ + return (float32x4_t)__builtin_neon_vmls_lanev4sf (__a, __b, __c, __d); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_lane_u16 (uint16x8_t __a, uint16x8_t __b, uint16x4_t __c, const int __d) +{ + return (uint16x8_t)__builtin_neon_vmls_lanev8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x4_t) __c, __d); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_lane_u32 (uint32x4_t __a, uint32x4_t __b, uint32x2_t __c, const int __d) +{ + return (uint32x4_t)__builtin_neon_vmls_lanev4si ((int32x4_t) __a, (int32x4_t) __b, (int32x2_t) __c, __d); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_lane_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) +{ + return (int32x4_t)__builtin_neon_vmlsls_lanev4hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_lane_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) +{ + return (int64x2_t)__builtin_neon_vmlsls_lanev2si (__a, __b, __c, __d); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_lane_u16 (uint32x4_t __a, uint16x4_t __b, uint16x4_t __c, const int __d) +{ + return (uint32x4_t)__builtin_neon_vmlslu_lanev4hi ((int32x4_t) __a, (int16x4_t) __b, (int16x4_t) __c, __d); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_lane_u32 (uint64x2_t __a, uint32x2_t __b, uint32x2_t __c, const int __d) +{ + return (uint64x2_t)__builtin_neon_vmlslu_lanev2si ((int64x2_t) __a, (int32x2_t) __b, (int32x2_t) __c, __d); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlsl_lane_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) +{ + return (int32x4_t)__builtin_neon_vqdmlsl_lanev4hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlsl_lane_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) +{ + return (int64x2_t)__builtin_neon_vqdmlsl_lanev2si (__a, __b, __c, __d); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_lane_s16 (int16x4_t __a, int16x4_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vmulls_lanev4hi (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_lane_s32 (int32x2_t __a, int32x2_t __b, const int __c) +{ + return (int64x2_t)__builtin_neon_vmulls_lanev2si (__a, __b, __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_lane_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) +{ + return (uint32x4_t)__builtin_neon_vmullu_lanev4hi ((int16x4_t) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_lane_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) +{ + return (uint64x2_t)__builtin_neon_vmullu_lanev2si ((int32x2_t) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmull_lane_s16 (int16x4_t __a, int16x4_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vqdmull_lanev4hi (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmull_lane_s32 (int32x2_t __a, int32x2_t __b, const int __c) +{ + return (int64x2_t)__builtin_neon_vqdmull_lanev2si (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulhq_lane_s16 (int16x8_t __a, int16x4_t __b, const int __c) +{ + return (int16x8_t)__builtin_neon_vqdmulh_lanev8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulhq_lane_s32 (int32x4_t __a, int32x2_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vqdmulh_lanev4si (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulh_lane_s16 (int16x4_t __a, int16x4_t __b, const int __c) +{ + return (int16x4_t)__builtin_neon_vqdmulh_lanev4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulh_lane_s32 (int32x2_t __a, int32x2_t __b, const int __c) +{ + return (int32x2_t)__builtin_neon_vqdmulh_lanev2si (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulhq_lane_s16 (int16x8_t __a, int16x4_t __b, const int __c) +{ + return (int16x8_t)__builtin_neon_vqrdmulh_lanev8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulhq_lane_s32 (int32x4_t __a, int32x2_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vqrdmulh_lanev4si (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulh_lane_s16 (int16x4_t __a, int16x4_t __b, const int __c) +{ + return (int16x4_t)__builtin_neon_vqrdmulh_lanev4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulh_lane_s32 (int32x2_t __a, int32x2_t __b, const int __c) +{ + return (int32x2_t)__builtin_neon_vqrdmulh_lanev2si (__a, __b, __c); +} + +#ifdef __ARM_FEATURE_QRDMX +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlahq_lane_s16 (int16x8_t __a, int16x8_t __b, int16x4_t __c, const int __d) +{ + return (int16x8_t)__builtin_neon_vqrdmlah_lanev8hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlahq_lane_s32 (int32x4_t __a, int32x4_t __b, int32x2_t __c, const int __d) +{ + return (int32x4_t)__builtin_neon_vqrdmlah_lanev4si (__a, __b, __c, __d); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlah_lane_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) +{ + return (int16x4_t)__builtin_neon_vqrdmlah_lanev4hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlah_lane_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) +{ + return (int32x2_t)__builtin_neon_vqrdmlah_lanev2si (__a, __b, __c, __d); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlshq_lane_s16 (int16x8_t __a, int16x8_t __b, int16x4_t __c, const int __d) +{ + return (int16x8_t)__builtin_neon_vqrdmlsh_lanev8hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlshq_lane_s32 (int32x4_t __a, int32x4_t __b, int32x2_t __c, const int __d) +{ + return (int32x4_t)__builtin_neon_vqrdmlsh_lanev4si (__a, __b, __c, __d); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlsh_lane_s16 (int16x4_t __a, int16x4_t __b, int16x4_t __c, const int __d) +{ + return (int16x4_t)__builtin_neon_vqrdmlsh_lanev4hi (__a, __b, __c, __d); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmlsh_lane_s32 (int32x2_t __a, int32x2_t __b, int32x2_t __c, const int __d) +{ + return (int32x2_t)__builtin_neon_vqrdmlsh_lanev2si (__a, __b, __c, __d); +} +#endif + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_n_s16 (int16x4_t __a, int16_t __b) +{ + return (int16x4_t)__builtin_neon_vmul_nv4hi (__a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_n_s32 (int32x2_t __a, int32_t __b) +{ + return (int32x2_t)__builtin_neon_vmul_nv2si (__a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_n_f32 (float32x2_t __a, float32_t __b) +{ + return (float32x2_t)__builtin_neon_vmul_nv2sf (__a, (__builtin_neon_sf) __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_n_u16 (uint16x4_t __a, uint16_t __b) +{ + return (uint16x4_t)__builtin_neon_vmul_nv4hi ((int16x4_t) __a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_n_u32 (uint32x2_t __a, uint32_t __b) +{ + return (uint32x2_t)__builtin_neon_vmul_nv2si ((int32x2_t) __a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_n_s16 (int16x8_t __a, int16_t __b) +{ + return (int16x8_t)__builtin_neon_vmul_nv8hi (__a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_n_s32 (int32x4_t __a, int32_t __b) +{ + return (int32x4_t)__builtin_neon_vmul_nv4si (__a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_n_f32 (float32x4_t __a, float32_t __b) +{ + return (float32x4_t)__builtin_neon_vmul_nv4sf (__a, (__builtin_neon_sf) __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_n_u16 (uint16x8_t __a, uint16_t __b) +{ + return (uint16x8_t)__builtin_neon_vmul_nv8hi ((int16x8_t) __a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_n_u32 (uint32x4_t __a, uint32_t __b) +{ + return (uint32x4_t)__builtin_neon_vmul_nv4si ((int32x4_t) __a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_n_s16 (int16x4_t __a, int16_t __b) +{ + return (int32x4_t)__builtin_neon_vmulls_nv4hi (__a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_n_s32 (int32x2_t __a, int32_t __b) +{ + return (int64x2_t)__builtin_neon_vmulls_nv2si (__a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_n_u16 (uint16x4_t __a, uint16_t __b) +{ + return (uint32x4_t)__builtin_neon_vmullu_nv4hi ((int16x4_t) __a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_n_u32 (uint32x2_t __a, uint32_t __b) +{ + return (uint64x2_t)__builtin_neon_vmullu_nv2si ((int32x2_t) __a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmull_n_s16 (int16x4_t __a, int16_t __b) +{ + return (int32x4_t)__builtin_neon_vqdmull_nv4hi (__a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmull_n_s32 (int32x2_t __a, int32_t __b) +{ + return (int64x2_t)__builtin_neon_vqdmull_nv2si (__a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulhq_n_s16 (int16x8_t __a, int16_t __b) +{ + return (int16x8_t)__builtin_neon_vqdmulh_nv8hi (__a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulhq_n_s32 (int32x4_t __a, int32_t __b) +{ + return (int32x4_t)__builtin_neon_vqdmulh_nv4si (__a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulh_n_s16 (int16x4_t __a, int16_t __b) +{ + return (int16x4_t)__builtin_neon_vqdmulh_nv4hi (__a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmulh_n_s32 (int32x2_t __a, int32_t __b) +{ + return (int32x2_t)__builtin_neon_vqdmulh_nv2si (__a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulhq_n_s16 (int16x8_t __a, int16_t __b) +{ + return (int16x8_t)__builtin_neon_vqrdmulh_nv8hi (__a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulhq_n_s32 (int32x4_t __a, int32_t __b) +{ + return (int32x4_t)__builtin_neon_vqrdmulh_nv4si (__a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulh_n_s16 (int16x4_t __a, int16_t __b) +{ + return (int16x4_t)__builtin_neon_vqrdmulh_nv4hi (__a, (__builtin_neon_hi) __b); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqrdmulh_n_s32 (int32x2_t __a, int32_t __b) +{ + return (int32x2_t)__builtin_neon_vqrdmulh_nv2si (__a, (__builtin_neon_si) __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_n_s16 (int16x4_t __a, int16x4_t __b, int16_t __c) +{ + return (int16x4_t)__builtin_neon_vmla_nv4hi (__a, __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_n_s32 (int32x2_t __a, int32x2_t __b, int32_t __c) +{ + return (int32x2_t)__builtin_neon_vmla_nv2si (__a, __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_n_f32 (float32x2_t __a, float32x2_t __b, float32_t __c) +{ + return (float32x2_t)__builtin_neon_vmla_nv2sf (__a, __b, (__builtin_neon_sf) __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_n_u16 (uint16x4_t __a, uint16x4_t __b, uint16_t __c) +{ + return (uint16x4_t)__builtin_neon_vmla_nv4hi ((int16x4_t) __a, (int16x4_t) __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmla_n_u32 (uint32x2_t __a, uint32x2_t __b, uint32_t __c) +{ + return (uint32x2_t)__builtin_neon_vmla_nv2si ((int32x2_t) __a, (int32x2_t) __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_n_s16 (int16x8_t __a, int16x8_t __b, int16_t __c) +{ + return (int16x8_t)__builtin_neon_vmla_nv8hi (__a, __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_n_s32 (int32x4_t __a, int32x4_t __b, int32_t __c) +{ + return (int32x4_t)__builtin_neon_vmla_nv4si (__a, __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_n_f32 (float32x4_t __a, float32x4_t __b, float32_t __c) +{ + return (float32x4_t)__builtin_neon_vmla_nv4sf (__a, __b, (__builtin_neon_sf) __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_n_u16 (uint16x8_t __a, uint16x8_t __b, uint16_t __c) +{ + return (uint16x8_t)__builtin_neon_vmla_nv8hi ((int16x8_t) __a, (int16x8_t) __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlaq_n_u32 (uint32x4_t __a, uint32x4_t __b, uint32_t __c) +{ + return (uint32x4_t)__builtin_neon_vmla_nv4si ((int32x4_t) __a, (int32x4_t) __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_n_s16 (int32x4_t __a, int16x4_t __b, int16_t __c) +{ + return (int32x4_t)__builtin_neon_vmlals_nv4hi (__a, __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_n_s32 (int64x2_t __a, int32x2_t __b, int32_t __c) +{ + return (int64x2_t)__builtin_neon_vmlals_nv2si (__a, __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_n_u16 (uint32x4_t __a, uint16x4_t __b, uint16_t __c) +{ + return (uint32x4_t)__builtin_neon_vmlalu_nv4hi ((int32x4_t) __a, (int16x4_t) __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlal_n_u32 (uint64x2_t __a, uint32x2_t __b, uint32_t __c) +{ + return (uint64x2_t)__builtin_neon_vmlalu_nv2si ((int64x2_t) __a, (int32x2_t) __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlal_n_s16 (int32x4_t __a, int16x4_t __b, int16_t __c) +{ + return (int32x4_t)__builtin_neon_vqdmlal_nv4hi (__a, __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlal_n_s32 (int64x2_t __a, int32x2_t __b, int32_t __c) +{ + return (int64x2_t)__builtin_neon_vqdmlal_nv2si (__a, __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_n_s16 (int16x4_t __a, int16x4_t __b, int16_t __c) +{ + return (int16x4_t)__builtin_neon_vmls_nv4hi (__a, __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_n_s32 (int32x2_t __a, int32x2_t __b, int32_t __c) +{ + return (int32x2_t)__builtin_neon_vmls_nv2si (__a, __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_n_f32 (float32x2_t __a, float32x2_t __b, float32_t __c) +{ + return (float32x2_t)__builtin_neon_vmls_nv2sf (__a, __b, (__builtin_neon_sf) __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_n_u16 (uint16x4_t __a, uint16x4_t __b, uint16_t __c) +{ + return (uint16x4_t)__builtin_neon_vmls_nv4hi ((int16x4_t) __a, (int16x4_t) __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmls_n_u32 (uint32x2_t __a, uint32x2_t __b, uint32_t __c) +{ + return (uint32x2_t)__builtin_neon_vmls_nv2si ((int32x2_t) __a, (int32x2_t) __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_n_s16 (int16x8_t __a, int16x8_t __b, int16_t __c) +{ + return (int16x8_t)__builtin_neon_vmls_nv8hi (__a, __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_n_s32 (int32x4_t __a, int32x4_t __b, int32_t __c) +{ + return (int32x4_t)__builtin_neon_vmls_nv4si (__a, __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_n_f32 (float32x4_t __a, float32x4_t __b, float32_t __c) +{ + return (float32x4_t)__builtin_neon_vmls_nv4sf (__a, __b, (__builtin_neon_sf) __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_n_u16 (uint16x8_t __a, uint16x8_t __b, uint16_t __c) +{ + return (uint16x8_t)__builtin_neon_vmls_nv8hi ((int16x8_t) __a, (int16x8_t) __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsq_n_u32 (uint32x4_t __a, uint32x4_t __b, uint32_t __c) +{ + return (uint32x4_t)__builtin_neon_vmls_nv4si ((int32x4_t) __a, (int32x4_t) __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_n_s16 (int32x4_t __a, int16x4_t __b, int16_t __c) +{ + return (int32x4_t)__builtin_neon_vmlsls_nv4hi (__a, __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_n_s32 (int64x2_t __a, int32x2_t __b, int32_t __c) +{ + return (int64x2_t)__builtin_neon_vmlsls_nv2si (__a, __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_n_u16 (uint32x4_t __a, uint16x4_t __b, uint16_t __c) +{ + return (uint32x4_t)__builtin_neon_vmlslu_nv4hi ((int32x4_t) __a, (int16x4_t) __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmlsl_n_u32 (uint64x2_t __a, uint32x2_t __b, uint32_t __c) +{ + return (uint64x2_t)__builtin_neon_vmlslu_nv2si ((int64x2_t) __a, (int32x2_t) __b, (__builtin_neon_si) __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlsl_n_s16 (int32x4_t __a, int16x4_t __b, int16_t __c) +{ + return (int32x4_t)__builtin_neon_vqdmlsl_nv4hi (__a, __b, (__builtin_neon_hi) __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vqdmlsl_n_s32 (int64x2_t __a, int32x2_t __b, int32_t __c) +{ + return (int64x2_t)__builtin_neon_vqdmlsl_nv2si (__a, __b, (__builtin_neon_si) __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_p64 (poly64x1_t __a, poly64x1_t __b, const int __c) +{ + return (poly64x1_t)__builtin_neon_vextdi (__a, __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_s8 (int8x8_t __a, int8x8_t __b, const int __c) +{ + return (int8x8_t)__builtin_neon_vextv8qi (__a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_s16 (int16x4_t __a, int16x4_t __b, const int __c) +{ + return (int16x4_t)__builtin_neon_vextv4hi (__a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_s32 (int32x2_t __a, int32x2_t __b, const int __c) +{ + return (int32x2_t)__builtin_neon_vextv2si (__a, __b, __c); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_s64 (int64x1_t __a, int64x1_t __b, const int __c) +{ + return (int64x1_t)__builtin_neon_vextdi (__a, __b, __c); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_f32 (float32x2_t __a, float32x2_t __b, const int __c) +{ + return (float32x2_t)__builtin_neon_vextv2sf (__a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_u8 (uint8x8_t __a, uint8x8_t __b, const int __c) +{ + return (uint8x8_t)__builtin_neon_vextv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_u16 (uint16x4_t __a, uint16x4_t __b, const int __c) +{ + return (uint16x4_t)__builtin_neon_vextv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_u32 (uint32x2_t __a, uint32x2_t __b, const int __c) +{ + return (uint32x2_t)__builtin_neon_vextv2si ((int32x2_t) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_u64 (uint64x1_t __a, uint64x1_t __b, const int __c) +{ + return (uint64x1_t)__builtin_neon_vextdi ((int64x1_t) __a, (int64x1_t) __b, __c); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_p8 (poly8x8_t __a, poly8x8_t __b, const int __c) +{ + return (poly8x8_t)__builtin_neon_vextv8qi ((int8x8_t) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_p16 (poly16x4_t __a, poly16x4_t __b, const int __c) +{ + return (poly16x4_t)__builtin_neon_vextv4hi ((int16x4_t) __a, (int16x4_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_p64 (poly64x2_t __a, poly64x2_t __b, const int __c) +{ + return (poly64x2_t)__builtin_neon_vextv2di ((int64x2_t) __a, (int64x2_t) __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_s8 (int8x16_t __a, int8x16_t __b, const int __c) +{ + return (int8x16_t)__builtin_neon_vextv16qi (__a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_s16 (int16x8_t __a, int16x8_t __b, const int __c) +{ + return (int16x8_t)__builtin_neon_vextv8hi (__a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_s32 (int32x4_t __a, int32x4_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vextv4si (__a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_s64 (int64x2_t __a, int64x2_t __b, const int __c) +{ + return (int64x2_t)__builtin_neon_vextv2di (__a, __b, __c); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_f32 (float32x4_t __a, float32x4_t __b, const int __c) +{ + return (float32x4_t)__builtin_neon_vextv4sf (__a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_u8 (uint8x16_t __a, uint8x16_t __b, const int __c) +{ + return (uint8x16_t)__builtin_neon_vextv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_u16 (uint16x8_t __a, uint16x8_t __b, const int __c) +{ + return (uint16x8_t)__builtin_neon_vextv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_u32 (uint32x4_t __a, uint32x4_t __b, const int __c) +{ + return (uint32x4_t)__builtin_neon_vextv4si ((int32x4_t) __a, (int32x4_t) __b, __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_u64 (uint64x2_t __a, uint64x2_t __b, const int __c) +{ + return (uint64x2_t)__builtin_neon_vextv2di ((int64x2_t) __a, (int64x2_t) __b, __c); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_p8 (poly8x16_t __a, poly8x16_t __b, const int __c) +{ + return (poly8x16_t)__builtin_neon_vextv16qi ((int8x16_t) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_p16 (poly16x8_t __a, poly16x8_t __b, const int __c) +{ + return (poly16x8_t)__builtin_neon_vextv8hi ((int16x8_t) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64_s8 (int8x8_t __a) +{ + return (int8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 7, 6, 5, 4, 3, 2, 1, 0 }); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64_s16 (int16x4_t __a) +{ + return (int16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 3, 2, 1, 0 }); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64_s32 (int32x2_t __a) +{ + return (int32x2_t) __builtin_shuffle (__a, (uint32x2_t) { 1, 0 }); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64_f32 (float32x2_t __a) +{ + return (float32x2_t) __builtin_shuffle (__a, (uint32x2_t) { 1, 0 }); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64_u8 (uint8x8_t __a) +{ + return (uint8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 7, 6, 5, 4, 3, 2, 1, 0 }); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64_u16 (uint16x4_t __a) +{ + return (uint16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 3, 2, 1, 0 }); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64_u32 (uint32x2_t __a) +{ + return (uint32x2_t) __builtin_shuffle (__a, (uint32x2_t) { 1, 0 }); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64_p8 (poly8x8_t __a) +{ + return (poly8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 7, 6, 5, 4, 3, 2, 1, 0 }); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64_p16 (poly16x4_t __a) +{ + return (poly16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 3, 2, 1, 0 }); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64q_s8 (int8x16_t __a) +{ + return (int8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64q_s16 (int16x8_t __a) +{ + return (int16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64q_s32 (int32x4_t __a) +{ + return (int32x4_t) __builtin_shuffle (__a, (uint32x4_t) { 1, 0, 3, 2 }); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64q_f32 (float32x4_t __a) +{ + return (float32x4_t) __builtin_shuffle (__a, (uint32x4_t) { 1, 0, 3, 2 }); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64q_u8 (uint8x16_t __a) +{ + return (uint8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64q_u16 (uint16x8_t __a) +{ + return (uint16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64q_u32 (uint32x4_t __a) +{ + return (uint32x4_t) __builtin_shuffle (__a, (uint32x4_t) { 1, 0, 3, 2 }); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64q_p8 (poly8x16_t __a) +{ + return (poly8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64q_p16 (poly16x8_t __a) +{ + return (poly16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32_s8 (int8x8_t __a) +{ + return (int8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32_s16 (int16x4_t __a) +{ + return (int16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 1, 0, 3, 2 }); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32_u8 (uint8x8_t __a) +{ + return (uint8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32_u16 (uint16x4_t __a) +{ + return (uint16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 1, 0, 3, 2 }); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32_p8 (poly8x8_t __a) +{ + return (poly8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 3, 2, 1, 0, 7, 6, 5, 4 }); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32_p16 (poly16x4_t __a) +{ + return (poly16x4_t) __builtin_shuffle (__a, (uint16x4_t) { 1, 0, 3, 2 }); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32q_s8 (int8x16_t __a) +{ + return (int8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32q_s16 (int16x8_t __a) +{ + return (int16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32q_u8 (uint8x16_t __a) +{ + return (uint8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32q_u16 (uint16x8_t __a) +{ + return (uint16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32q_p8 (poly8x16_t __a) +{ + return (poly8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev32q_p16 (poly16x8_t __a) +{ + return (poly16x8_t) __builtin_shuffle (__a, (uint16x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev16_s8 (int8x8_t __a) +{ + return (int8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev16_u8 (uint8x8_t __a) +{ + return (uint8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev16_p8 (poly8x8_t __a) +{ + return (poly8x8_t) __builtin_shuffle (__a, (uint8x8_t) { 1, 0, 3, 2, 5, 4, 7, 6 }); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev16q_s8 (int8x16_t __a) +{ + return (int8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 }); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev16q_u8 (uint8x16_t __a) +{ + return (uint8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 }); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev16q_p8 (poly8x16_t __a) +{ + return (poly8x16_t) __builtin_shuffle (__a, (uint8x16_t) { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 }); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_p64 (uint64x1_t __a, poly64x1_t __b, poly64x1_t __c) +{ + return (poly64x1_t)__builtin_neon_vbsldi ((int64x1_t) __a, __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_s8 (uint8x8_t __a, int8x8_t __b, int8x8_t __c) +{ + return (int8x8_t)__builtin_neon_vbslv8qi ((int8x8_t) __a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_s16 (uint16x4_t __a, int16x4_t __b, int16x4_t __c) +{ + return (int16x4_t)__builtin_neon_vbslv4hi ((int16x4_t) __a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_s32 (uint32x2_t __a, int32x2_t __b, int32x2_t __c) +{ + return (int32x2_t)__builtin_neon_vbslv2si ((int32x2_t) __a, __b, __c); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_s64 (uint64x1_t __a, int64x1_t __b, int64x1_t __c) +{ + return (int64x1_t)__builtin_neon_vbsldi ((int64x1_t) __a, __b, __c); +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_f32 (uint32x2_t __a, float32x2_t __b, float32x2_t __c) +{ + return (float32x2_t)__builtin_neon_vbslv2sf ((int32x2_t) __a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_u8 (uint8x8_t __a, uint8x8_t __b, uint8x8_t __c) +{ + return (uint8x8_t)__builtin_neon_vbslv8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_u16 (uint16x4_t __a, uint16x4_t __b, uint16x4_t __c) +{ + return (uint16x4_t)__builtin_neon_vbslv4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_u32 (uint32x2_t __a, uint32x2_t __b, uint32x2_t __c) +{ + return (uint32x2_t)__builtin_neon_vbslv2si ((int32x2_t) __a, (int32x2_t) __b, (int32x2_t) __c); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_u64 (uint64x1_t __a, uint64x1_t __b, uint64x1_t __c) +{ + return (uint64x1_t)__builtin_neon_vbsldi ((int64x1_t) __a, (int64x1_t) __b, (int64x1_t) __c); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_p8 (uint8x8_t __a, poly8x8_t __b, poly8x8_t __c) +{ + return (poly8x8_t)__builtin_neon_vbslv8qi ((int8x8_t) __a, (int8x8_t) __b, (int8x8_t) __c); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_p16 (uint16x4_t __a, poly16x4_t __b, poly16x4_t __c) +{ + return (poly16x4_t)__builtin_neon_vbslv4hi ((int16x4_t) __a, (int16x4_t) __b, (int16x4_t) __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_p64 (uint64x2_t __a, poly64x2_t __b, poly64x2_t __c) +{ + return (poly64x2_t)__builtin_neon_vbslv2di ((int64x2_t) __a, (int64x2_t) __b, (int64x2_t) __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_s8 (uint8x16_t __a, int8x16_t __b, int8x16_t __c) +{ + return (int8x16_t)__builtin_neon_vbslv16qi ((int8x16_t) __a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_s16 (uint16x8_t __a, int16x8_t __b, int16x8_t __c) +{ + return (int16x8_t)__builtin_neon_vbslv8hi ((int16x8_t) __a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_s32 (uint32x4_t __a, int32x4_t __b, int32x4_t __c) +{ + return (int32x4_t)__builtin_neon_vbslv4si ((int32x4_t) __a, __b, __c); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_s64 (uint64x2_t __a, int64x2_t __b, int64x2_t __c) +{ + return (int64x2_t)__builtin_neon_vbslv2di ((int64x2_t) __a, __b, __c); +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_f32 (uint32x4_t __a, float32x4_t __b, float32x4_t __c) +{ + return (float32x4_t)__builtin_neon_vbslv4sf ((int32x4_t) __a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_u8 (uint8x16_t __a, uint8x16_t __b, uint8x16_t __c) +{ + return (uint8x16_t)__builtin_neon_vbslv16qi ((int8x16_t) __a, (int8x16_t) __b, (int8x16_t) __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_u16 (uint16x8_t __a, uint16x8_t __b, uint16x8_t __c) +{ + return (uint16x8_t)__builtin_neon_vbslv8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x8_t) __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_u32 (uint32x4_t __a, uint32x4_t __b, uint32x4_t __c) +{ + return (uint32x4_t)__builtin_neon_vbslv4si ((int32x4_t) __a, (int32x4_t) __b, (int32x4_t) __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_u64 (uint64x2_t __a, uint64x2_t __b, uint64x2_t __c) +{ + return (uint64x2_t)__builtin_neon_vbslv2di ((int64x2_t) __a, (int64x2_t) __b, (int64x2_t) __c); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_p8 (uint8x16_t __a, poly8x16_t __b, poly8x16_t __c) +{ + return (poly8x16_t)__builtin_neon_vbslv16qi ((int8x16_t) __a, (int8x16_t) __b, (int8x16_t) __c); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_p16 (uint16x8_t __a, poly16x8_t __b, poly16x8_t __c) +{ + return (poly16x8_t)__builtin_neon_vbslv8hi ((int16x8_t) __a, (int16x8_t) __b, (int16x8_t) __c); +} + +/* For big-endian, the shuffle masks for ZIP, UZP and TRN must be changed as + follows. (nelt = the number of elements within a vector.) + + Firstly, a value of N within a mask, becomes (N ^ (nelt - 1)), as gcc vector + extension's indexing scheme is reversed *within each vector* (relative to the + neon intrinsics view), but without changing which of the two vectors. + + Secondly, the elements within each mask are reversed, as the mask is itself a + vector, and will itself be loaded in reverse order (again, relative to the + neon intrinsics view, i.e. that would result from a "vld1" instruction). */ + +__extension__ extern __inline int8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrn_s8 (int8x8_t __a, int8x8_t __b) +{ + int8x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 9, 1, 11, 3, 13, 5, 15, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 8, 0, 10, 2, 12, 4, 14, 6 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 0, 8, 2, 10, 4, 12, 6, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 1, 9, 3, 11, 5, 13, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline int16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrn_s16 (int16x4_t __a, int16x4_t __b) +{ + int16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 1, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 6, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 2, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 5, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline uint8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrn_u8 (uint8x8_t __a, uint8x8_t __b) +{ + uint8x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 9, 1, 11, 3, 13, 5, 15, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 8, 0, 10, 2, 12, 4, 14, 6 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 0, 8, 2, 10, 4, 12, 6, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 1, 9, 3, 11, 5, 13, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline uint16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrn_u16 (uint16x4_t __a, uint16x4_t __b) +{ + uint16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 1, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 6, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 2, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 5, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline poly8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrn_p8 (poly8x8_t __a, poly8x8_t __b) +{ + poly8x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 9, 1, 11, 3, 13, 5, 15, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 8, 0, 10, 2, 12, 4, 14, 6 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 0, 8, 2, 10, 4, 12, 6, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 1, 9, 3, 11, 5, 13, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline poly16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrn_p16 (poly16x4_t __a, poly16x4_t __b) +{ + poly16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 1, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 6, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 2, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 5, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline int32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrn_s32 (int32x2_t __a, int32x2_t __b) +{ + int32x2x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); +#endif + return __rv; +} + +__extension__ extern __inline float32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrn_f32 (float32x2_t __a, float32x2_t __b) +{ + float32x2x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); +#endif + return __rv; +} + +__extension__ extern __inline uint32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrn_u32 (uint32x2_t __a, uint32x2_t __b) +{ + uint32x2x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); +#endif + return __rv; +} + +__extension__ extern __inline int8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrnq_s8 (int8x16_t __a, int8x16_t __b) +{ + int8x16x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 17, 1, 19, 3, 21, 5, 23, 7, 25, 9, 27, 11, 29, 13, 31, 15 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 16, 0, 18, 2, 20, 4, 22, 6, 24, 8, 26, 10, 28, 12, 30, 14 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 30 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 1, 17, 3, 19, 5, 21, 7, 23, 9, 25, 11, 27, 13, 29, 15, 31 }); +#endif + return __rv; +} + +__extension__ extern __inline int16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrnq_s16 (int16x8_t __a, int16x8_t __b) +{ + int16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 9, 1, 11, 3, 13, 5, 15, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 8, 0, 10, 2, 12, 4, 14, 6 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 0, 8, 2, 10, 4, 12, 6, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 1, 9, 3, 11, 5, 13, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline int32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrnq_s32 (int32x4_t __a, int32x4_t __b) +{ + int32x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 1, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 0, 6, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 2, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 5, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline float32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrnq_f32 (float32x4_t __a, float32x4_t __b) +{ + float32x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 1, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 0, 6, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 2, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 5, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline uint8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrnq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + uint8x16x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 17, 1, 19, 3, 21, 5, 23, 7, 25, 9, 27, 11, 29, 13, 31, 15 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 16, 0, 18, 2, 20, 4, 22, 6, 24, 8, 26, 10, 28, 12, 30, 14 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 30 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 1, 17, 3, 19, 5, 21, 7, 23, 9, 25, 11, 27, 13, 29, 15, 31 }); +#endif + return __rv; +} + +__extension__ extern __inline uint16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrnq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + uint16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 9, 1, 11, 3, 13, 5, 15, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 8, 0, 10, 2, 12, 4, 14, 6 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 0, 8, 2, 10, 4, 12, 6, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 1, 9, 3, 11, 5, 13, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline uint32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrnq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + uint32x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 1, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 4, 0, 6, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 2, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 5, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline poly8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrnq_p8 (poly8x16_t __a, poly8x16_t __b) +{ + poly8x16x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 17, 1, 19, 3, 21, 5, 23, 7, 25, 9, 27, 11, 29, 13, 31, 15 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 16, 0, 18, 2, 20, 4, 22, 6, 24, 8, 26, 10, 28, 12, 30, 14 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 30 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 1, 17, 3, 19, 5, 21, 7, 23, 9, 25, 11, 27, 13, 29, 15, 31 }); +#endif + return __rv; +} + +__extension__ extern __inline poly16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrnq_p16 (poly16x8_t __a, poly16x8_t __b) +{ + poly16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 9, 1, 11, 3, 13, 5, 15, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 8, 0, 10, 2, 12, 4, 14, 6 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 0, 8, 2, 10, 4, 12, 6, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 1, 9, 3, 11, 5, 13, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline int8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzip_s8 (int8x8_t __a, int8x8_t __b) +{ + int8x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 12, 4, 13, 5, 14, 6, 15, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 8, 0, 9, 1, 10, 2, 11, 3 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 0, 8, 1, 9, 2, 10, 3, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 4, 12, 5, 13, 6, 14, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline int16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzip_s16 (int16x4_t __a, int16x4_t __b) +{ + int16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 6, 2, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 5, 1 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 1, 5 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 2, 6, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline uint8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzip_u8 (uint8x8_t __a, uint8x8_t __b) +{ + uint8x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 12, 4, 13, 5, 14, 6, 15, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 8, 0, 9, 1, 10, 2, 11, 3 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 0, 8, 1, 9, 2, 10, 3, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 4, 12, 5, 13, 6, 14, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline uint16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzip_u16 (uint16x4_t __a, uint16x4_t __b) +{ + uint16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 6, 2, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 5, 1 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 1, 5 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 2, 6, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline poly8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzip_p8 (poly8x8_t __a, poly8x8_t __b) +{ + poly8x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 12, 4, 13, 5, 14, 6, 15, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 8, 0, 9, 1, 10, 2, 11, 3 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 0, 8, 1, 9, 2, 10, 3, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 4, 12, 5, 13, 6, 14, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline poly16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzip_p16 (poly16x4_t __a, poly16x4_t __b) +{ + poly16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 6, 2, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 0, 5, 1 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 4, 1, 5 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 2, 6, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline int32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzip_s32 (int32x2_t __a, int32x2_t __b) +{ + int32x2x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); +#endif + return __rv; +} + +__extension__ extern __inline float32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzip_f32 (float32x2_t __a, float32x2_t __b) +{ + float32x2x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); +#endif + return __rv; +} + +__extension__ extern __inline uint32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzip_u32 (uint32x2_t __a, uint32x2_t __b) +{ + uint32x2x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); +#endif + return __rv; +} + +__extension__ extern __inline int8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzipq_s8 (int8x16_t __a, int8x16_t __b) +{ + int8x16x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 20, 4, 21, 5, 22, 6, 23, 7, 16, 0, 17, 1, 18, 2, 19, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 28, 12, 29, 13, 30, 14, 31, 15, 24, 8, 25, 9, 26, 10, 27, 11 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31 }); +#endif + return __rv; +} + +__extension__ extern __inline int16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzipq_s16 (int16x8_t __a, int16x8_t __b) +{ + int16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 10, 2, 11, 3, 8, 0, 9, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 14, 6, 15, 7, 12, 4, 13, 5 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 0, 8, 1, 9, 2, 10, 3, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 4, 12, 5, 13, 6, 14, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline int32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzipq_s32 (int32x4_t __a, int32x4_t __b) +{ + int32x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 1, 4, 0 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 7, 3, 6, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 1, 5 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 2, 6, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline float32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzipq_f32 (float32x4_t __a, float32x4_t __b) +{ + float32x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 1, 4, 0 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 7, 3, 6, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 1, 5 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 2, 6, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline uint8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzipq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + uint8x16x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 20, 4, 21, 5, 22, 6, 23, 7, 16, 0, 17, 1, 18, 2, 19, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 28, 12, 29, 13, 30, 14, 31, 15, 24, 8, 25, 9, 26, 10, 27, 11 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31 }); +#endif + return __rv; +} + +__extension__ extern __inline uint16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzipq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + uint16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 10, 2, 11, 3, 8, 0, 9, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 14, 6, 15, 7, 12, 4, 13, 5 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 0, 8, 1, 9, 2, 10, 3, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 4, 12, 5, 13, 6, 14, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline uint32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzipq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + uint32x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 5, 1, 4, 0 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 7, 3, 6, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 4, 1, 5 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 2, 6, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline poly8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzipq_p8 (poly8x16_t __a, poly8x16_t __b) +{ + poly8x16x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 20, 4, 21, 5, 22, 6, 23, 7, 16, 0, 17, 1, 18, 2, 19, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 28, 12, 29, 13, 30, 14, 31, 15, 24, 8, 25, 9, 26, 10, 27, 11 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31 }); +#endif + return __rv; +} + +__extension__ extern __inline poly16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzipq_p16 (poly16x8_t __a, poly16x8_t __b) +{ + poly16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 10, 2, 11, 3, 8, 0, 9, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 14, 6, 15, 7, 12, 4, 13, 5 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 0, 8, 1, 9, 2, 10, 3, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 4, 12, 5, 13, 6, 14, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline int8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzp_s8 (int8x8_t __a, int8x8_t __b) +{ + int8x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 9, 11, 13, 15, 1, 3, 5, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 8, 10, 12, 14, 0, 2, 4, 6 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 0, 2, 4, 6, 8, 10, 12, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 1, 3, 5, 7, 9, 11, 13, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline int16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzp_s16 (int16x4_t __a, int16x4_t __b) +{ + int16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 7, 1, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 6, 0, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 2, 4, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 3, 5, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline int32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzp_s32 (int32x2_t __a, int32x2_t __b) +{ + int32x2x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); +#endif + return __rv; +} + +__extension__ extern __inline float32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzp_f32 (float32x2_t __a, float32x2_t __b) +{ + float32x2x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); +#endif + return __rv; +} + +__extension__ extern __inline uint8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzp_u8 (uint8x8_t __a, uint8x8_t __b) +{ + uint8x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 9, 11, 13, 15, 1, 3, 5, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 8, 10, 12, 14, 0, 2, 4, 6 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 0, 2, 4, 6, 8, 10, 12, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 1, 3, 5, 7, 9, 11, 13, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline uint16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzp_u16 (uint16x4_t __a, uint16x4_t __b) +{ + uint16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 7, 1, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 6, 0, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 2, 4, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 3, 5, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline uint32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzp_u32 (uint32x2_t __a, uint32x2_t __b) +{ + uint32x2x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 3, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 2, 0 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x2_t) { 0, 2 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x2_t) { 1, 3 }); +#endif + return __rv; +} + +__extension__ extern __inline poly8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzp_p8 (poly8x8_t __a, poly8x8_t __b) +{ + poly8x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 9, 11, 13, 15, 1, 3, 5, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 8, 10, 12, 14, 0, 2, 4, 6 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 0, 2, 4, 6, 8, 10, 12, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x8_t) + { 1, 3, 5, 7, 9, 11, 13, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline poly16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzp_p16 (poly16x4_t __a, poly16x4_t __b) +{ + poly16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 5, 7, 1, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 4, 6, 0, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t) { 0, 2, 4, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t) { 1, 3, 5, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline int8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzpq_s8 (int8x16_t __a, int8x16_t __b) +{ + int8x16x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 9, 11, 13, 15, 1, 3, 5, 7, 25, 27, 29, 31, 17, 19, 21, 23 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 8, 10, 12, 14, 0, 2, 4, 6, 24, 26, 28, 30, 16, 18, 20, 22 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 }); +#endif + return __rv; +} + +__extension__ extern __inline int16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzpq_s16 (int16x8_t __a, int16x8_t __b) +{ + int16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 5, 7, 1, 3, 13, 15, 9, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 4, 6, 0, 2, 12, 14, 8, 10 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 0, 2, 4, 6, 8, 10, 12, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 1, 3, 5, 7, 9, 11, 13, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline int32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzpq_s32 (int32x4_t __a, int32x4_t __b) +{ + int32x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 3, 1, 7, 5 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 2, 0, 6, 4 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 2, 4, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 3, 5, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline float32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzpq_f32 (float32x4_t __a, float32x4_t __b) +{ + float32x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 3, 1, 7, 5 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 2, 0, 6, 4 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 2, 4, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 3, 5, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline uint8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzpq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + uint8x16x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 9, 11, 13, 15, 1, 3, 5, 7, 25, 27, 29, 31, 17, 19, 21, 23 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 8, 10, 12, 14, 0, 2, 4, 6, 24, 26, 28, 30, 16, 18, 20, 22 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 }); +#endif + return __rv; +} + +__extension__ extern __inline uint16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzpq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + uint16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 5, 7, 1, 3, 13, 15, 9, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 4, 6, 0, 2, 12, 14, 8, 10 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 0, 2, 4, 6, 8, 10, 12, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 1, 3, 5, 7, 9, 11, 13, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline uint32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzpq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + uint32x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 3, 1, 7, 5 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 2, 0, 6, 4 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint32x4_t) { 0, 2, 4, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint32x4_t) { 1, 3, 5, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline poly8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzpq_p8 (poly8x16_t __a, poly8x16_t __b) +{ + poly8x16x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 9, 11, 13, 15, 1, 3, 5, 7, 25, 27, 29, 31, 17, 19, 21, 23 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 8, 10, 12, 14, 0, 2, 4, 6, 24, 26, 28, 30, 16, 18, 20, 22 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint8x16_t) + { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 }); +#endif + return __rv; +} + +__extension__ extern __inline poly16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzpq_p16 (poly16x8_t __a, poly16x8_t __b) +{ + poly16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 5, 7, 1, 3, 13, 15, 9, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 4, 6, 0, 2, 12, 14, 8, 10 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 0, 2, 4, 6, 8, 10, 12, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 1, 3, 5, 7, 9, 11, 13, 15 }); +#endif + return __rv; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_p64 (const poly64_t * __a) +{ + return (poly64x1_t)__builtin_neon_vld1di ((const __builtin_neon_di *) __a); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_s8 (const int8_t * __a) +{ + return (int8x8_t)__builtin_neon_vld1v8qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_s16 (const int16_t * __a) +{ + return (int16x4_t)__builtin_neon_vld1v4hi ((const __builtin_neon_hi *) __a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_s32 (const int32_t * __a) +{ + return (int32x2_t)__builtin_neon_vld1v2si ((const __builtin_neon_si *) __a); +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_s64 (const int64_t * __a) +{ + return (int64x1_t)__builtin_neon_vld1di ((const __builtin_neon_di *) __a); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_f16 (const float16_t * __a) +{ + return __builtin_neon_vld1v4hf (__a); +} +#endif + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_f32 (const float32_t * __a) +{ + return (float32x2_t)__builtin_neon_vld1v2sf ((const __builtin_neon_sf *) __a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_u8 (const uint8_t * __a) +{ + return (uint8x8_t)__builtin_neon_vld1v8qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_u16 (const uint16_t * __a) +{ + return (uint16x4_t)__builtin_neon_vld1v4hi ((const __builtin_neon_hi *) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_u32 (const uint32_t * __a) +{ + return (uint32x2_t)__builtin_neon_vld1v2si ((const __builtin_neon_si *) __a); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_u64 (const uint64_t * __a) +{ + return (uint64x1_t)__builtin_neon_vld1di ((const __builtin_neon_di *) __a); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_p8 (const poly8_t * __a) +{ + return (poly8x8_t)__builtin_neon_vld1v8qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_p16 (const poly16_t * __a) +{ + return (poly16x4_t)__builtin_neon_vld1v4hi ((const __builtin_neon_hi *) __a); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_p64 (const poly64_t * __a) +{ + return (poly64x2_t)__builtin_neon_vld1v2di ((const __builtin_neon_di *) __a); +} + +#pragma GCC pop_options +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_s8 (const int8_t * __a) +{ + return (int8x16_t)__builtin_neon_vld1v16qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_s16 (const int16_t * __a) +{ + return (int16x8_t)__builtin_neon_vld1v8hi ((const __builtin_neon_hi *) __a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_s32 (const int32_t * __a) +{ + return (int32x4_t)__builtin_neon_vld1v4si ((const __builtin_neon_si *) __a); +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_s64 (const int64_t * __a) +{ + return (int64x2_t)__builtin_neon_vld1v2di ((const __builtin_neon_di *) __a); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_f16 (const float16_t * __a) +{ + return __builtin_neon_vld1v8hf (__a); +} +#endif + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_f32 (const float32_t * __a) +{ + return (float32x4_t)__builtin_neon_vld1v4sf ((const __builtin_neon_sf *) __a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_u8 (const uint8_t * __a) +{ + return (uint8x16_t)__builtin_neon_vld1v16qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_u16 (const uint16_t * __a) +{ + return (uint16x8_t)__builtin_neon_vld1v8hi ((const __builtin_neon_hi *) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_u32 (const uint32_t * __a) +{ + return (uint32x4_t)__builtin_neon_vld1v4si ((const __builtin_neon_si *) __a); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_u64 (const uint64_t * __a) +{ + return (uint64x2_t)__builtin_neon_vld1v2di ((const __builtin_neon_di *) __a); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_p8 (const poly8_t * __a) +{ + return (poly8x16_t)__builtin_neon_vld1v16qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_p16 (const poly16_t * __a) +{ + return (poly16x8_t)__builtin_neon_vld1v8hi ((const __builtin_neon_hi *) __a); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_s8 (const int8_t * __a, int8x8_t __b, const int __c) +{ + return (int8x8_t)__builtin_neon_vld1_lanev8qi ((const __builtin_neon_qi *) __a, __b, __c); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_s16 (const int16_t * __a, int16x4_t __b, const int __c) +{ + return (int16x4_t)__builtin_neon_vld1_lanev4hi ((const __builtin_neon_hi *) __a, __b, __c); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_s32 (const int32_t * __a, int32x2_t __b, const int __c) +{ + return (int32x2_t)__builtin_neon_vld1_lanev2si ((const __builtin_neon_si *) __a, __b, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_f16 (const float16_t * __a, float16x4_t __b, const int __c) +{ + return vset_lane_f16 (*__a, __b, __c); +} +#endif + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_f32 (const float32_t * __a, float32x2_t __b, const int __c) +{ + return (float32x2_t)__builtin_neon_vld1_lanev2sf ((const __builtin_neon_sf *) __a, __b, __c); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_u8 (const uint8_t * __a, uint8x8_t __b, const int __c) +{ + return (uint8x8_t)__builtin_neon_vld1_lanev8qi ((const __builtin_neon_qi *) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_u16 (const uint16_t * __a, uint16x4_t __b, const int __c) +{ + return (uint16x4_t)__builtin_neon_vld1_lanev4hi ((const __builtin_neon_hi *) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_u32 (const uint32_t * __a, uint32x2_t __b, const int __c) +{ + return (uint32x2_t)__builtin_neon_vld1_lanev2si ((const __builtin_neon_si *) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_p8 (const poly8_t * __a, poly8x8_t __b, const int __c) +{ + return (poly8x8_t)__builtin_neon_vld1_lanev8qi ((const __builtin_neon_qi *) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_p16 (const poly16_t * __a, poly16x4_t __b, const int __c) +{ + return (poly16x4_t)__builtin_neon_vld1_lanev4hi ((const __builtin_neon_hi *) __a, (int16x4_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_p64 (const poly64_t * __a, poly64x1_t __b, const int __c) +{ + return (poly64x1_t)__builtin_neon_vld1_lanedi ((const __builtin_neon_di *) __a, __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_s64 (const int64_t * __a, int64x1_t __b, const int __c) +{ + return (int64x1_t)__builtin_neon_vld1_lanedi ((const __builtin_neon_di *) __a, __b, __c); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_lane_u64 (const uint64_t * __a, uint64x1_t __b, const int __c) +{ + return (uint64x1_t)__builtin_neon_vld1_lanedi ((const __builtin_neon_di *) __a, (int64x1_t) __b, __c); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_s8 (const int8_t * __a, int8x16_t __b, const int __c) +{ + return (int8x16_t)__builtin_neon_vld1_lanev16qi ((const __builtin_neon_qi *) __a, __b, __c); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_s16 (const int16_t * __a, int16x8_t __b, const int __c) +{ + return (int16x8_t)__builtin_neon_vld1_lanev8hi ((const __builtin_neon_hi *) __a, __b, __c); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_s32 (const int32_t * __a, int32x4_t __b, const int __c) +{ + return (int32x4_t)__builtin_neon_vld1_lanev4si ((const __builtin_neon_si *) __a, __b, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_f16 (const float16_t * __a, float16x8_t __b, const int __c) +{ + return vsetq_lane_f16 (*__a, __b, __c); +} +#endif + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_f32 (const float32_t * __a, float32x4_t __b, const int __c) +{ + return (float32x4_t)__builtin_neon_vld1_lanev4sf ((const __builtin_neon_sf *) __a, __b, __c); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_u8 (const uint8_t * __a, uint8x16_t __b, const int __c) +{ + return (uint8x16_t)__builtin_neon_vld1_lanev16qi ((const __builtin_neon_qi *) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_u16 (const uint16_t * __a, uint16x8_t __b, const int __c) +{ + return (uint16x8_t)__builtin_neon_vld1_lanev8hi ((const __builtin_neon_hi *) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_u32 (const uint32_t * __a, uint32x4_t __b, const int __c) +{ + return (uint32x4_t)__builtin_neon_vld1_lanev4si ((const __builtin_neon_si *) __a, (int32x4_t) __b, __c); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_p8 (const poly8_t * __a, poly8x16_t __b, const int __c) +{ + return (poly8x16_t)__builtin_neon_vld1_lanev16qi ((const __builtin_neon_qi *) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_p16 (const poly16_t * __a, poly16x8_t __b, const int __c) +{ + return (poly16x8_t)__builtin_neon_vld1_lanev8hi ((const __builtin_neon_hi *) __a, (int16x8_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_p64 (const poly64_t * __a, poly64x2_t __b, const int __c) +{ + return (poly64x2_t)__builtin_neon_vld1_lanev2di ((const __builtin_neon_di *) __a, (int64x2_t) __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_s64 (const int64_t * __a, int64x2_t __b, const int __c) +{ + return (int64x2_t)__builtin_neon_vld1_lanev2di ((const __builtin_neon_di *) __a, __b, __c); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_lane_u64 (const uint64_t * __a, uint64x2_t __b, const int __c) +{ + return (uint64x2_t)__builtin_neon_vld1_lanev2di ((const __builtin_neon_di *) __a, (int64x2_t) __b, __c); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_s8 (const int8_t * __a) +{ + return (int8x8_t)__builtin_neon_vld1_dupv8qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_s16 (const int16_t * __a) +{ + return (int16x4_t)__builtin_neon_vld1_dupv4hi ((const __builtin_neon_hi *) __a); +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_s32 (const int32_t * __a) +{ + return (int32x2_t)__builtin_neon_vld1_dupv2si ((const __builtin_neon_si *) __a); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_f16 (const float16_t * __a) +{ + float16_t __f = *__a; + return (float16x4_t) { __f, __f, __f, __f }; +} +#endif + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_f32 (const float32_t * __a) +{ + return (float32x2_t)__builtin_neon_vld1_dupv2sf ((const __builtin_neon_sf *) __a); +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_u8 (const uint8_t * __a) +{ + return (uint8x8_t)__builtin_neon_vld1_dupv8qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_u16 (const uint16_t * __a) +{ + return (uint16x4_t)__builtin_neon_vld1_dupv4hi ((const __builtin_neon_hi *) __a); +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_u32 (const uint32_t * __a) +{ + return (uint32x2_t)__builtin_neon_vld1_dupv2si ((const __builtin_neon_si *) __a); +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_p8 (const poly8_t * __a) +{ + return (poly8x8_t)__builtin_neon_vld1_dupv8qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_p16 (const poly16_t * __a) +{ + return (poly16x4_t)__builtin_neon_vld1_dupv4hi ((const __builtin_neon_hi *) __a); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_p64 (const poly64_t * __a) +{ + return (poly64x1_t)__builtin_neon_vld1_dupdi ((const __builtin_neon_di *) __a); +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_s64 (const int64_t * __a) +{ + return (int64x1_t)__builtin_neon_vld1_dupdi ((const __builtin_neon_di *) __a); +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1_dup_u64 (const uint64_t * __a) +{ + return (uint64x1_t)__builtin_neon_vld1_dupdi ((const __builtin_neon_di *) __a); +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_s8 (const int8_t * __a) +{ + return (int8x16_t)__builtin_neon_vld1_dupv16qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_s16 (const int16_t * __a) +{ + return (int16x8_t)__builtin_neon_vld1_dupv8hi ((const __builtin_neon_hi *) __a); +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_s32 (const int32_t * __a) +{ + return (int32x4_t)__builtin_neon_vld1_dupv4si ((const __builtin_neon_si *) __a); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_f16 (const float16_t * __a) +{ + float16_t __f = *__a; + return (float16x8_t) { __f, __f, __f, __f, __f, __f, __f, __f }; +} +#endif + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_f32 (const float32_t * __a) +{ + return (float32x4_t)__builtin_neon_vld1_dupv4sf ((const __builtin_neon_sf *) __a); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_u8 (const uint8_t * __a) +{ + return (uint8x16_t)__builtin_neon_vld1_dupv16qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_u16 (const uint16_t * __a) +{ + return (uint16x8_t)__builtin_neon_vld1_dupv8hi ((const __builtin_neon_hi *) __a); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_u32 (const uint32_t * __a) +{ + return (uint32x4_t)__builtin_neon_vld1_dupv4si ((const __builtin_neon_si *) __a); +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_p8 (const poly8_t * __a) +{ + return (poly8x16_t)__builtin_neon_vld1_dupv16qi ((const __builtin_neon_qi *) __a); +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_p16 (const poly16_t * __a) +{ + return (poly16x8_t)__builtin_neon_vld1_dupv8hi ((const __builtin_neon_hi *) __a); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_p64 (const poly64_t * __a) +{ + return (poly64x2_t)__builtin_neon_vld1_dupv2di ((const __builtin_neon_di *) __a); +} + +#pragma GCC pop_options +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_s64 (const int64_t * __a) +{ + return (int64x2_t)__builtin_neon_vld1_dupv2di ((const __builtin_neon_di *) __a); +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld1q_dup_u64 (const uint64_t * __a) +{ + return (uint64x2_t)__builtin_neon_vld1_dupv2di ((const __builtin_neon_di *) __a); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_p64 (poly64_t * __a, poly64x1_t __b) +{ + __builtin_neon_vst1di ((__builtin_neon_di *) __a, __b); +} + +#pragma GCC pop_options +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_s8 (int8_t * __a, int8x8_t __b) +{ + __builtin_neon_vst1v8qi ((__builtin_neon_qi *) __a, __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_s16 (int16_t * __a, int16x4_t __b) +{ + __builtin_neon_vst1v4hi ((__builtin_neon_hi *) __a, __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_s32 (int32_t * __a, int32x2_t __b) +{ + __builtin_neon_vst1v2si ((__builtin_neon_si *) __a, __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_s64 (int64_t * __a, int64x1_t __b) +{ + __builtin_neon_vst1di ((__builtin_neon_di *) __a, __b); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_f16 (float16_t * __a, float16x4_t __b) +{ + __builtin_neon_vst1v4hf (__a, __b); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_f32 (float32_t * __a, float32x2_t __b) +{ + __builtin_neon_vst1v2sf ((__builtin_neon_sf *) __a, __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_u8 (uint8_t * __a, uint8x8_t __b) +{ + __builtin_neon_vst1v8qi ((__builtin_neon_qi *) __a, (int8x8_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_u16 (uint16_t * __a, uint16x4_t __b) +{ + __builtin_neon_vst1v4hi ((__builtin_neon_hi *) __a, (int16x4_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_u32 (uint32_t * __a, uint32x2_t __b) +{ + __builtin_neon_vst1v2si ((__builtin_neon_si *) __a, (int32x2_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_u64 (uint64_t * __a, uint64x1_t __b) +{ + __builtin_neon_vst1di ((__builtin_neon_di *) __a, (int64x1_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_p8 (poly8_t * __a, poly8x8_t __b) +{ + __builtin_neon_vst1v8qi ((__builtin_neon_qi *) __a, (int8x8_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_p16 (poly16_t * __a, poly16x4_t __b) +{ + __builtin_neon_vst1v4hi ((__builtin_neon_hi *) __a, (int16x4_t) __b); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_p64 (poly64_t * __a, poly64x2_t __b) +{ + __builtin_neon_vst1v2di ((__builtin_neon_di *) __a, (int64x2_t) __b); +} + +#pragma GCC pop_options +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_s8 (int8_t * __a, int8x16_t __b) +{ + __builtin_neon_vst1v16qi ((__builtin_neon_qi *) __a, __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_s16 (int16_t * __a, int16x8_t __b) +{ + __builtin_neon_vst1v8hi ((__builtin_neon_hi *) __a, __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_s32 (int32_t * __a, int32x4_t __b) +{ + __builtin_neon_vst1v4si ((__builtin_neon_si *) __a, __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_s64 (int64_t * __a, int64x2_t __b) +{ + __builtin_neon_vst1v2di ((__builtin_neon_di *) __a, __b); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_f16 (float16_t * __a, float16x8_t __b) +{ + __builtin_neon_vst1v8hf (__a, __b); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_f32 (float32_t * __a, float32x4_t __b) +{ + __builtin_neon_vst1v4sf ((__builtin_neon_sf *) __a, __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_u8 (uint8_t * __a, uint8x16_t __b) +{ + __builtin_neon_vst1v16qi ((__builtin_neon_qi *) __a, (int8x16_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_u16 (uint16_t * __a, uint16x8_t __b) +{ + __builtin_neon_vst1v8hi ((__builtin_neon_hi *) __a, (int16x8_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_u32 (uint32_t * __a, uint32x4_t __b) +{ + __builtin_neon_vst1v4si ((__builtin_neon_si *) __a, (int32x4_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_u64 (uint64_t * __a, uint64x2_t __b) +{ + __builtin_neon_vst1v2di ((__builtin_neon_di *) __a, (int64x2_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_p8 (poly8_t * __a, poly8x16_t __b) +{ + __builtin_neon_vst1v16qi ((__builtin_neon_qi *) __a, (int8x16_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_p16 (poly16_t * __a, poly16x8_t __b) +{ + __builtin_neon_vst1v8hi ((__builtin_neon_hi *) __a, (int16x8_t) __b); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_s8 (int8_t * __a, int8x8_t __b, const int __c) +{ + __builtin_neon_vst1_lanev8qi ((__builtin_neon_qi *) __a, __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_s16 (int16_t * __a, int16x4_t __b, const int __c) +{ + __builtin_neon_vst1_lanev4hi ((__builtin_neon_hi *) __a, __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_s32 (int32_t * __a, int32x2_t __b, const int __c) +{ + __builtin_neon_vst1_lanev2si ((__builtin_neon_si *) __a, __b, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_f16 (float16_t * __a, float16x4_t __b, const int __c) +{ + __builtin_neon_vst1_lanev4hf (__a, __b, __c); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_f32 (float32_t * __a, float32x2_t __b, const int __c) +{ + __builtin_neon_vst1_lanev2sf ((__builtin_neon_sf *) __a, __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_u8 (uint8_t * __a, uint8x8_t __b, const int __c) +{ + __builtin_neon_vst1_lanev8qi ((__builtin_neon_qi *) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_u16 (uint16_t * __a, uint16x4_t __b, const int __c) +{ + __builtin_neon_vst1_lanev4hi ((__builtin_neon_hi *) __a, (int16x4_t) __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_u32 (uint32_t * __a, uint32x2_t __b, const int __c) +{ + __builtin_neon_vst1_lanev2si ((__builtin_neon_si *) __a, (int32x2_t) __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_p8 (poly8_t * __a, poly8x8_t __b, const int __c) +{ + __builtin_neon_vst1_lanev8qi ((__builtin_neon_qi *) __a, (int8x8_t) __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_p16 (poly16_t * __a, poly16x4_t __b, const int __c) +{ + __builtin_neon_vst1_lanev4hi ((__builtin_neon_hi *) __a, (int16x4_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_p64 (poly64_t * __a, poly64x1_t __b, const int __c) +{ + __builtin_neon_vst1_lanedi ((__builtin_neon_di *) __a, __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_s64 (int64_t * __a, int64x1_t __b, const int __c) +{ + __builtin_neon_vst1_lanedi ((__builtin_neon_di *) __a, __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1_lane_u64 (uint64_t * __a, uint64x1_t __b, const int __c) +{ + __builtin_neon_vst1_lanedi ((__builtin_neon_di *) __a, (int64x1_t) __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_s8 (int8_t * __a, int8x16_t __b, const int __c) +{ + __builtin_neon_vst1_lanev16qi ((__builtin_neon_qi *) __a, __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_s16 (int16_t * __a, int16x8_t __b, const int __c) +{ + __builtin_neon_vst1_lanev8hi ((__builtin_neon_hi *) __a, __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_s32 (int32_t * __a, int32x4_t __b, const int __c) +{ + __builtin_neon_vst1_lanev4si ((__builtin_neon_si *) __a, __b, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_f16 (float16_t * __a, float16x8_t __b, const int __c) +{ + __builtin_neon_vst1_lanev8hf (__a, __b, __c); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_f32 (float32_t * __a, float32x4_t __b, const int __c) +{ + __builtin_neon_vst1_lanev4sf ((__builtin_neon_sf *) __a, __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_u8 (uint8_t * __a, uint8x16_t __b, const int __c) +{ + __builtin_neon_vst1_lanev16qi ((__builtin_neon_qi *) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_u16 (uint16_t * __a, uint16x8_t __b, const int __c) +{ + __builtin_neon_vst1_lanev8hi ((__builtin_neon_hi *) __a, (int16x8_t) __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_u32 (uint32_t * __a, uint32x4_t __b, const int __c) +{ + __builtin_neon_vst1_lanev4si ((__builtin_neon_si *) __a, (int32x4_t) __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_p8 (poly8_t * __a, poly8x16_t __b, const int __c) +{ + __builtin_neon_vst1_lanev16qi ((__builtin_neon_qi *) __a, (int8x16_t) __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_p16 (poly16_t * __a, poly16x8_t __b, const int __c) +{ + __builtin_neon_vst1_lanev8hi ((__builtin_neon_hi *) __a, (int16x8_t) __b, __c); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_p64 (poly64_t * __a, poly64x2_t __b, const int __c) +{ + __builtin_neon_vst1_lanev2di ((__builtin_neon_di *) __a, (int64x2_t) __b, __c); +} + +#pragma GCC pop_options +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_s64 (int64_t * __a, int64x2_t __b, const int __c) +{ + __builtin_neon_vst1_lanev2di ((__builtin_neon_di *) __a, __b, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst1q_lane_u64 (uint64_t * __a, uint64x2_t __b, const int __c) +{ + __builtin_neon_vst1_lanev2di ((__builtin_neon_di *) __a, (int64x2_t) __b, __c); +} + +__extension__ extern __inline int8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_s8 (const int8_t * __a) +{ + union { int8x8x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2v8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_s16 (const int16_t * __a) +{ + union { int16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2v4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_s32 (const int32_t * __a) +{ + union { int32x2x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2v2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_f16 (const float16_t * __a) +{ + union { float16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2v4hf (__a); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_f32 (const float32_t * __a) +{ + union { float32x2x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2v2sf ((const __builtin_neon_sf *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_u8 (const uint8_t * __a) +{ + union { uint8x8x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2v8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_u16 (const uint16_t * __a) +{ + union { uint16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2v4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_u32 (const uint32_t * __a) +{ + union { uint32x2x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2v2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_p8 (const poly8_t * __a) +{ + union { poly8x8x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2v8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_p16 (const poly16_t * __a) +{ + union { poly16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2v4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_p64 (const poly64_t * __a) +{ + union { poly64x1x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2di ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_s64 (const int64_t * __a) +{ + union { int64x1x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2di ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint64x1x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_u64 (const uint64_t * __a) +{ + union { uint64x1x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2di ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline int8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_s8 (const int8_t * __a) +{ + union { int8x16x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2v16qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_s16 (const int16_t * __a) +{ + union { int16x8x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2v8hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_s32 (const int32_t * __a) +{ + union { int32x4x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2v4si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_f16 (const float16_t * __a) +{ + union { float16x8x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2v8hf (__a); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_f32 (const float32_t * __a) +{ + union { float32x4x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2v4sf ((const __builtin_neon_sf *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_u8 (const uint8_t * __a) +{ + union { uint8x16x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2v16qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_u16 (const uint16_t * __a) +{ + union { uint16x8x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2v8hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_u32 (const uint32_t * __a) +{ + union { uint32x4x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2v4si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly8x16x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_p8 (const poly8_t * __a) +{ + union { poly8x16x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2v16qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_p16 (const poly16_t * __a) +{ + union { poly16x8x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2v8hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_lane_s8 (const int8_t * __a, int8x8x2_t __b, const int __c) +{ + union { int8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + union { int8x8x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_lane_s16 (const int16_t * __a, int16x4x2_t __b, const int __c) +{ + union { int16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + union { int16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_lane_s32 (const int32_t * __a, int32x2x2_t __b, const int __c) +{ + union { int32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + union { int32x2x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_lane_f16 (const float16_t * __a, float16x4x2_t __b, const int __c) +{ + union { float16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + union { float16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev4hf ( __a, __bu.__o, __c); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_lane_f32 (const float32_t * __a, float32x2x2_t __b, const int __c) +{ + union { float32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + union { float32x2x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev2sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_lane_u8 (const uint8_t * __a, uint8x8x2_t __b, const int __c) +{ + union { uint8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + union { uint8x8x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_lane_u16 (const uint16_t * __a, uint16x4x2_t __b, const int __c) +{ + union { uint16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + union { uint16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_lane_u32 (const uint32_t * __a, uint32x2x2_t __b, const int __c) +{ + union { uint32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + union { uint32x2x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline poly8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_lane_p8 (const poly8_t * __a, poly8x8x2_t __b, const int __c) +{ + union { poly8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + union { poly8x8x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline poly16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_lane_p16 (const poly16_t * __a, poly16x4x2_t __b, const int __c) +{ + union { poly16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + union { poly16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_lane_s16 (const int16_t * __a, int16x8x2_t __b, const int __c) +{ + union { int16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { int16x8x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_lane_s32 (const int32_t * __a, int32x4x2_t __b, const int __c) +{ + union { int32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { int32x4x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_lane_f16 (const float16_t * __a, float16x8x2_t __b, const int __c) +{ + union { float16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { float16x8x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev8hf (__a, __bu.__o, __c); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_lane_f32 (const float32_t * __a, float32x4x2_t __b, const int __c) +{ + union { float32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { float32x4x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev4sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_lane_u16 (const uint16_t * __a, uint16x8x2_t __b, const int __c) +{ + union { uint16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { uint16x8x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint32x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_lane_u32 (const uint32_t * __a, uint32x4x2_t __b, const int __c) +{ + union { uint32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { uint32x4x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline poly16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2q_lane_p16 (const poly16_t * __a, poly16x8x2_t __b, const int __c) +{ + union { poly16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { poly16x8x2_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld2_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_s8 (const int8_t * __a) +{ + union { int8x8x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupv8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_s16 (const int16_t * __a) +{ + union { int16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupv4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_s32 (const int32_t * __a) +{ + union { int32x2x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupv2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_f16 (const float16_t * __a) +{ + union { float16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupv4hf (__a); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_f32 (const float32_t * __a) +{ + union { float32x2x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupv2sf ((const __builtin_neon_sf *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_u8 (const uint8_t * __a) +{ + union { uint8x8x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupv8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_u16 (const uint16_t * __a) +{ + union { uint16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupv4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint32x2x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_u32 (const uint32_t * __a) +{ + union { uint32x2x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupv2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly8x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_p8 (const poly8_t * __a) +{ + union { poly8x8x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupv8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_p16 (const poly16_t * __a) +{ + union { poly16x4x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupv4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_p64 (const poly64_t * __a) +{ + union { poly64x1x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupdi ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_s64 (const int64_t * __a) +{ + union { int64x1x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupdi ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint64x1x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld2_dup_u64 (const uint64_t * __a) +{ + union { uint64x1x2_t __i; __builtin_neon_ti __o; } __rv; + __rv.__o = __builtin_neon_vld2_dupdi ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_s8 (int8_t * __a, int8x8x2_t __b) +{ + union { int8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2v8qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_s16 (int16_t * __a, int16x4x2_t __b) +{ + union { int16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2v4hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_s32 (int32_t * __a, int32x2x2_t __b) +{ + union { int32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2v2si ((__builtin_neon_si *) __a, __bu.__o); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_f16 (float16_t * __a, float16x4x2_t __b) +{ + union { float16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2v4hf (__a, __bu.__o); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_f32 (float32_t * __a, float32x2x2_t __b) +{ + union { float32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2v2sf ((__builtin_neon_sf *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_u8 (uint8_t * __a, uint8x8x2_t __b) +{ + union { uint8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2v8qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_u16 (uint16_t * __a, uint16x4x2_t __b) +{ + union { uint16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2v4hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_u32 (uint32_t * __a, uint32x2x2_t __b) +{ + union { uint32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2v2si ((__builtin_neon_si *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_p8 (poly8_t * __a, poly8x8x2_t __b) +{ + union { poly8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2v8qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_p16 (poly16_t * __a, poly16x4x2_t __b) +{ + union { poly16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2v4hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_p64 (poly64_t * __a, poly64x1x2_t __b) +{ + union { poly64x1x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2di ((__builtin_neon_di *) __a, __bu.__o); +} + +#pragma GCC pop_options +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_s64 (int64_t * __a, int64x1x2_t __b) +{ + union { int64x1x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2di ((__builtin_neon_di *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_u64 (uint64_t * __a, uint64x1x2_t __b) +{ + union { uint64x1x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2di ((__builtin_neon_di *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_s8 (int8_t * __a, int8x16x2_t __b) +{ + union { int8x16x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2v16qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_s16 (int16_t * __a, int16x8x2_t __b) +{ + union { int16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2v8hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_s32 (int32_t * __a, int32x4x2_t __b) +{ + union { int32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2v4si ((__builtin_neon_si *) __a, __bu.__o); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_f16 (float16_t * __a, float16x8x2_t __b) +{ + union { float16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2v8hf (__a, __bu.__o); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_f32 (float32_t * __a, float32x4x2_t __b) +{ + union { float32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2v4sf ((__builtin_neon_sf *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_u8 (uint8_t * __a, uint8x16x2_t __b) +{ + union { uint8x16x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2v16qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_u16 (uint16_t * __a, uint16x8x2_t __b) +{ + union { uint16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2v8hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_u32 (uint32_t * __a, uint32x4x2_t __b) +{ + union { uint32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2v4si ((__builtin_neon_si *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_p8 (poly8_t * __a, poly8x16x2_t __b) +{ + union { poly8x16x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2v16qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_p16 (poly16_t * __a, poly16x8x2_t __b) +{ + union { poly16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2v8hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_lane_s8 (int8_t * __a, int8x8x2_t __b, const int __c) +{ + union { int8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_lane_s16 (int16_t * __a, int16x4x2_t __b, const int __c) +{ + union { int16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_lane_s32 (int32_t * __a, int32x2x2_t __b, const int __c) +{ + union { int32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_lane_f16 (float16_t * __a, float16x4x2_t __b, const int __c) +{ + union { float16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2_lanev4hf (__a, __bu.__o, __c); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_lane_f32 (float32_t * __a, float32x2x2_t __b, const int __c) +{ + union { float32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2_lanev2sf ((__builtin_neon_sf *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_lane_u8 (uint8_t * __a, uint8x8x2_t __b, const int __c) +{ + union { uint8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_lane_u16 (uint16_t * __a, uint16x4x2_t __b, const int __c) +{ + union { uint16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_lane_u32 (uint32_t * __a, uint32x2x2_t __b, const int __c) +{ + union { uint32x2x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_lane_p8 (poly8_t * __a, poly8x8x2_t __b, const int __c) +{ + union { poly8x8x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2_lane_p16 (poly16_t * __a, poly16x4x2_t __b, const int __c) +{ + union { poly16x4x2_t __i; __builtin_neon_ti __o; } __bu = { __b }; + __builtin_neon_vst2_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_lane_s16 (int16_t * __a, int16x8x2_t __b, const int __c) +{ + union { int16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_lane_s32 (int32_t * __a, int32x4x2_t __b, const int __c) +{ + union { int32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_lane_f16 (float16_t * __a, float16x8x2_t __b, const int __c) +{ + union { float16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2_lanev8hf (__a, __bu.__o, __c); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_lane_f32 (float32_t * __a, float32x4x2_t __b, const int __c) +{ + union { float32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2_lanev4sf ((__builtin_neon_sf *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_lane_u16 (uint16_t * __a, uint16x8x2_t __b, const int __c) +{ + union { uint16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_lane_u32 (uint32_t * __a, uint32x4x2_t __b, const int __c) +{ + union { uint32x4x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst2q_lane_p16 (poly16_t * __a, poly16x8x2_t __b, const int __c) +{ + union { poly16x8x2_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst2_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline int8x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_s8 (const int8_t * __a) +{ + union { int8x8x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3v8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_s16 (const int16_t * __a) +{ + union { int16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3v4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int32x2x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_s32 (const int32_t * __a) +{ + union { int32x2x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3v2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_f16 (const float16_t * __a) +{ + union { float16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3v4hf (__a); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x2x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_f32 (const float32_t * __a) +{ + union { float32x2x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3v2sf ((const __builtin_neon_sf *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint8x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_u8 (const uint8_t * __a) +{ + union { uint8x8x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3v8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_u16 (const uint16_t * __a) +{ + union { uint16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3v4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint32x2x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_u32 (const uint32_t * __a) +{ + union { uint32x2x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3v2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly8x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_p8 (const poly8_t * __a) +{ + union { poly8x8x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3v8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_p16 (const poly16_t * __a) +{ + union { poly16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3v4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_p64 (const poly64_t * __a) +{ + union { poly64x1x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3di ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_s64 (const int64_t * __a) +{ + union { int64x1x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3di ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint64x1x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_u64 (const uint64_t * __a) +{ + union { uint64x1x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3di ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline int8x16x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_s8 (const int8_t * __a) +{ + union { int8x16x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3v16qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int16x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_s16 (const int16_t * __a) +{ + union { int16x8x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3v8hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int32x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_s32 (const int32_t * __a) +{ + union { int32x4x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3v4si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_f16 (const float16_t * __a) +{ + union { float16x8x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3v8hf (__a); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_f32 (const float32_t * __a) +{ + union { float32x4x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3v4sf ((const __builtin_neon_sf *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint8x16x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_u8 (const uint8_t * __a) +{ + union { uint8x16x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3v16qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint16x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_u16 (const uint16_t * __a) +{ + union { uint16x8x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3v8hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint32x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_u32 (const uint32_t * __a) +{ + union { uint32x4x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3v4si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly8x16x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_p8 (const poly8_t * __a) +{ + union { poly8x16x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3v16qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly16x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_p16 (const poly16_t * __a) +{ + union { poly16x8x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3v8hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int8x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_lane_s8 (const int8_t * __a, int8x8x3_t __b, const int __c) +{ + union { int8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + union { int8x8x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_lane_s16 (const int16_t * __a, int16x4x3_t __b, const int __c) +{ + union { int16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + union { int16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int32x2x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_lane_s32 (const int32_t * __a, int32x2x3_t __b, const int __c) +{ + union { int32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + union { int32x2x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_lane_f16 (const float16_t * __a, float16x4x3_t __b, const int __c) +{ + union { float16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + union { float16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev4hf (__a, __bu.__o, __c); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x2x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_lane_f32 (const float32_t * __a, float32x2x3_t __b, const int __c) +{ + union { float32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + union { float32x2x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev2sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint8x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_lane_u8 (const uint8_t * __a, uint8x8x3_t __b, const int __c) +{ + union { uint8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + union { uint8x8x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_lane_u16 (const uint16_t * __a, uint16x4x3_t __b, const int __c) +{ + union { uint16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + union { uint16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint32x2x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_lane_u32 (const uint32_t * __a, uint32x2x3_t __b, const int __c) +{ + union { uint32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + union { uint32x2x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline poly8x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_lane_p8 (const poly8_t * __a, poly8x8x3_t __b, const int __c) +{ + union { poly8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + union { poly8x8x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline poly16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_lane_p16 (const poly16_t * __a, poly16x4x3_t __b, const int __c) +{ + union { poly16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + union { poly16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int16x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_lane_s16 (const int16_t * __a, int16x8x3_t __b, const int __c) +{ + union { int16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + union { int16x8x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int32x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_lane_s32 (const int32_t * __a, int32x4x3_t __b, const int __c) +{ + union { int32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + union { int32x4x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_lane_f16 (const float16_t * __a, float16x8x3_t __b, const int __c) +{ + union { float16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + union { float16x8x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev8hf (__a, __bu.__o, __c); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_lane_f32 (const float32_t * __a, float32x4x3_t __b, const int __c) +{ + union { float32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + union { float32x4x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev4sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint16x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_lane_u16 (const uint16_t * __a, uint16x8x3_t __b, const int __c) +{ + union { uint16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + union { uint16x8x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint32x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_lane_u32 (const uint32_t * __a, uint32x4x3_t __b, const int __c) +{ + union { uint32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + union { uint32x4x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline poly16x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3q_lane_p16 (const poly16_t * __a, poly16x8x3_t __b, const int __c) +{ + union { poly16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + union { poly16x8x3_t __i; __builtin_neon_ci __o; } __rv; + __rv.__o = __builtin_neon_vld3_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int8x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_s8 (const int8_t * __a) +{ + union { int8x8x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupv8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_s16 (const int16_t * __a) +{ + union { int16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupv4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int32x2x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_s32 (const int32_t * __a) +{ + union { int32x2x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupv2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_f16 (const float16_t * __a) +{ + union { float16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupv4hf (__a); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x2x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_f32 (const float32_t * __a) +{ + union { float32x2x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupv2sf ((const __builtin_neon_sf *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint8x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_u8 (const uint8_t * __a) +{ + union { uint8x8x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupv8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_u16 (const uint16_t * __a) +{ + union { uint16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupv4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint32x2x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_u32 (const uint32_t * __a) +{ + union { uint32x2x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupv2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly8x8x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_p8 (const poly8_t * __a) +{ + union { poly8x8x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupv8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly16x4x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_p16 (const poly16_t * __a) +{ + union { poly16x4x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupv4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_p64 (const poly64_t * __a) +{ + union { poly64x1x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupdi ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_s64 (const int64_t * __a) +{ + union { int64x1x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupdi ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint64x1x3_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld3_dup_u64 (const uint64_t * __a) +{ + union { uint64x1x3_t __i; __builtin_neon_ei __o; } __rv; + __rv.__o = __builtin_neon_vld3_dupdi ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_s8 (int8_t * __a, int8x8x3_t __b) +{ + union { int8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3v8qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_s16 (int16_t * __a, int16x4x3_t __b) +{ + union { int16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3v4hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_s32 (int32_t * __a, int32x2x3_t __b) +{ + union { int32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3v2si ((__builtin_neon_si *) __a, __bu.__o); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_f16 (float16_t * __a, float16x4x3_t __b) +{ + union { float16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3v4hf (__a, __bu.__o); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_f32 (float32_t * __a, float32x2x3_t __b) +{ + union { float32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3v2sf ((__builtin_neon_sf *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_u8 (uint8_t * __a, uint8x8x3_t __b) +{ + union { uint8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3v8qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_u16 (uint16_t * __a, uint16x4x3_t __b) +{ + union { uint16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3v4hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_u32 (uint32_t * __a, uint32x2x3_t __b) +{ + union { uint32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3v2si ((__builtin_neon_si *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_p8 (poly8_t * __a, poly8x8x3_t __b) +{ + union { poly8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3v8qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_p16 (poly16_t * __a, poly16x4x3_t __b) +{ + union { poly16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3v4hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_p64 (poly64_t * __a, poly64x1x3_t __b) +{ + union { poly64x1x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3di ((__builtin_neon_di *) __a, __bu.__o); +} + +#pragma GCC pop_options +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_s64 (int64_t * __a, int64x1x3_t __b) +{ + union { int64x1x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3di ((__builtin_neon_di *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_u64 (uint64_t * __a, uint64x1x3_t __b) +{ + union { uint64x1x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3di ((__builtin_neon_di *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_s8 (int8_t * __a, int8x16x3_t __b) +{ + union { int8x16x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3v16qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_s16 (int16_t * __a, int16x8x3_t __b) +{ + union { int16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3v8hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_s32 (int32_t * __a, int32x4x3_t __b) +{ + union { int32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3v4si ((__builtin_neon_si *) __a, __bu.__o); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_f16 (float16_t * __a, float16x8x3_t __b) +{ + union { float16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3v8hf (__a, __bu.__o); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_f32 (float32_t * __a, float32x4x3_t __b) +{ + union { float32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3v4sf ((__builtin_neon_sf *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_u8 (uint8_t * __a, uint8x16x3_t __b) +{ + union { uint8x16x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3v16qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_u16 (uint16_t * __a, uint16x8x3_t __b) +{ + union { uint16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3v8hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_u32 (uint32_t * __a, uint32x4x3_t __b) +{ + union { uint32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3v4si ((__builtin_neon_si *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_p8 (poly8_t * __a, poly8x16x3_t __b) +{ + union { poly8x16x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3v16qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_p16 (poly16_t * __a, poly16x8x3_t __b) +{ + union { poly16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3v8hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_lane_s8 (int8_t * __a, int8x8x3_t __b, const int __c) +{ + union { int8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_lane_s16 (int16_t * __a, int16x4x3_t __b, const int __c) +{ + union { int16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_lane_s32 (int32_t * __a, int32x2x3_t __b, const int __c) +{ + union { int32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_lane_f16 (float16_t * __a, float16x4x3_t __b, const int __c) +{ + union { float16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3_lanev4hf (__a, __bu.__o, __c); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_lane_f32 (float32_t * __a, float32x2x3_t __b, const int __c) +{ + union { float32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3_lanev2sf ((__builtin_neon_sf *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_lane_u8 (uint8_t * __a, uint8x8x3_t __b, const int __c) +{ + union { uint8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_lane_u16 (uint16_t * __a, uint16x4x3_t __b, const int __c) +{ + union { uint16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_lane_u32 (uint32_t * __a, uint32x2x3_t __b, const int __c) +{ + union { uint32x2x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_lane_p8 (poly8_t * __a, poly8x8x3_t __b, const int __c) +{ + union { poly8x8x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3_lane_p16 (poly16_t * __a, poly16x4x3_t __b, const int __c) +{ + union { poly16x4x3_t __i; __builtin_neon_ei __o; } __bu = { __b }; + __builtin_neon_vst3_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_lane_s16 (int16_t * __a, int16x8x3_t __b, const int __c) +{ + union { int16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_lane_s32 (int32_t * __a, int32x4x3_t __b, const int __c) +{ + union { int32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_lane_f16 (float16_t * __a, float16x8x3_t __b, const int __c) +{ + union { float16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3_lanev8hf (__a, __bu.__o, __c); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_lane_f32 (float32_t * __a, float32x4x3_t __b, const int __c) +{ + union { float32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3_lanev4sf ((__builtin_neon_sf *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_lane_u16 (uint16_t * __a, uint16x8x3_t __b, const int __c) +{ + union { uint16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_lane_u32 (uint32_t * __a, uint32x4x3_t __b, const int __c) +{ + union { uint32x4x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst3q_lane_p16 (poly16_t * __a, poly16x8x3_t __b, const int __c) +{ + union { poly16x8x3_t __i; __builtin_neon_ci __o; } __bu = { __b }; + __builtin_neon_vst3_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline int8x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_s8 (const int8_t * __a) +{ + union { int8x8x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4v8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_s16 (const int16_t * __a) +{ + union { int16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4v4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int32x2x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_s32 (const int32_t * __a) +{ + union { int32x2x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4v2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_f16 (const float16_t * __a) +{ + union { float16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4v4hf (__a); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x2x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_f32 (const float32_t * __a) +{ + union { float32x2x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4v2sf ((const __builtin_neon_sf *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint8x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_u8 (const uint8_t * __a) +{ + union { uint8x8x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4v8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_u16 (const uint16_t * __a) +{ + union { uint16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4v4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint32x2x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_u32 (const uint32_t * __a) +{ + union { uint32x2x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4v2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly8x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_p8 (const poly8_t * __a) +{ + union { poly8x8x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4v8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_p16 (const poly16_t * __a) +{ + union { poly16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4v4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_p64 (const poly64_t * __a) +{ + union { poly64x1x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4di ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_s64 (const int64_t * __a) +{ + union { int64x1x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4di ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint64x1x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_u64 (const uint64_t * __a) +{ + union { uint64x1x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4di ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline int8x16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_s8 (const int8_t * __a) +{ + union { int8x16x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4v16qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int16x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_s16 (const int16_t * __a) +{ + union { int16x8x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4v8hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int32x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_s32 (const int32_t * __a) +{ + union { int32x4x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4v4si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_f16 (const float16_t * __a) +{ + union { float16x8x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4v8hf (__a); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_f32 (const float32_t * __a) +{ + union { float32x4x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4v4sf ((const __builtin_neon_sf *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint8x16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_u8 (const uint8_t * __a) +{ + union { uint8x16x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4v16qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint16x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_u16 (const uint16_t * __a) +{ + union { uint16x8x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4v8hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint32x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_u32 (const uint32_t * __a) +{ + union { uint32x4x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4v4si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly8x16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_p8 (const poly8_t * __a) +{ + union { poly8x16x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4v16qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly16x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_p16 (const poly16_t * __a) +{ + union { poly16x8x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4v8hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int8x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_lane_s8 (const int8_t * __a, int8x8x4_t __b, const int __c) +{ + union { int8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { int8x8x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_lane_s16 (const int16_t * __a, int16x4x4_t __b, const int __c) +{ + union { int16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { int16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int32x2x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_lane_s32 (const int32_t * __a, int32x2x4_t __b, const int __c) +{ + union { int32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { int32x2x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_lane_f16 (const float16_t * __a, float16x4x4_t __b, const int __c) +{ + union { float16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { float16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev4hf (__a, + __bu.__o, __c); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x2x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_lane_f32 (const float32_t * __a, float32x2x4_t __b, const int __c) +{ + union { float32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { float32x2x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev2sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint8x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_lane_u8 (const uint8_t * __a, uint8x8x4_t __b, const int __c) +{ + union { uint8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { uint8x8x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_lane_u16 (const uint16_t * __a, uint16x4x4_t __b, const int __c) +{ + union { uint16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { uint16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint32x2x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_lane_u32 (const uint32_t * __a, uint32x2x4_t __b, const int __c) +{ + union { uint32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { uint32x2x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev2si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline poly8x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_lane_p8 (const poly8_t * __a, poly8x8x4_t __b, const int __c) +{ + union { poly8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { poly8x8x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev8qi ((const __builtin_neon_qi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline poly16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_lane_p16 (const poly16_t * __a, poly16x4x4_t __b, const int __c) +{ + union { poly16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + union { poly16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev4hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int16x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_lane_s16 (const int16_t * __a, int16x8x4_t __b, const int __c) +{ + union { int16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + union { int16x8x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int32x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_lane_s32 (const int32_t * __a, int32x4x4_t __b, const int __c) +{ + union { int32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + union { int32x4x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_lane_f16 (const float16_t * __a, float16x8x4_t __b, const int __c) +{ + union { float16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + union { float16x8x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev8hf (__a, + __bu.__o, __c); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_lane_f32 (const float32_t * __a, float32x4x4_t __b, const int __c) +{ + union { float32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + union { float32x4x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev4sf ((const __builtin_neon_sf *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint16x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_lane_u16 (const uint16_t * __a, uint16x8x4_t __b, const int __c) +{ + union { uint16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + union { uint16x8x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline uint32x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_lane_u32 (const uint32_t * __a, uint32x4x4_t __b, const int __c) +{ + union { uint32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + union { uint32x4x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev4si ((const __builtin_neon_si *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline poly16x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4q_lane_p16 (const poly16_t * __a, poly16x8x4_t __b, const int __c) +{ + union { poly16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + union { poly16x8x4_t __i; __builtin_neon_xi __o; } __rv; + __rv.__o = __builtin_neon_vld4_lanev8hi ((const __builtin_neon_hi *) __a, __bu.__o, __c); + return __rv.__i; +} + +__extension__ extern __inline int8x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_s8 (const int8_t * __a) +{ + union { int8x8x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupv8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_s16 (const int16_t * __a) +{ + union { int16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupv4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline int32x2x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_s32 (const int32_t * __a) +{ + union { int32x2x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupv2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_f16 (const float16_t * __a) +{ + union { float16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupv4hf (__a); + return __rv.__i; +} +#endif + +__extension__ extern __inline float32x2x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_f32 (const float32_t * __a) +{ + union { float32x2x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupv2sf ((const __builtin_neon_sf *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint8x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_u8 (const uint8_t * __a) +{ + union { uint8x8x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupv8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_u16 (const uint16_t * __a) +{ + union { uint16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupv4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint32x2x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_u32 (const uint32_t * __a) +{ + union { uint32x2x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupv2si ((const __builtin_neon_si *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly8x8x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_p8 (const poly8_t * __a) +{ + union { poly8x8x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupv8qi ((const __builtin_neon_qi *) __a); + return __rv.__i; +} + +__extension__ extern __inline poly16x4x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_p16 (const poly16_t * __a) +{ + union { poly16x4x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupv4hi ((const __builtin_neon_hi *) __a); + return __rv.__i; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_p64 (const poly64_t * __a) +{ + union { poly64x1x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupdi ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_s64 (const int64_t * __a) +{ + union { int64x1x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupdi ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline uint64x1x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vld4_dup_u64 (const uint64_t * __a) +{ + union { uint64x1x4_t __i; __builtin_neon_oi __o; } __rv; + __rv.__o = __builtin_neon_vld4_dupdi ((const __builtin_neon_di *) __a); + return __rv.__i; +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_s8 (int8_t * __a, int8x8x4_t __b) +{ + union { int8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4v8qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_s16 (int16_t * __a, int16x4x4_t __b) +{ + union { int16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4v4hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_s32 (int32_t * __a, int32x2x4_t __b) +{ + union { int32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4v2si ((__builtin_neon_si *) __a, __bu.__o); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_f16 (float16_t * __a, float16x4x4_t __b) +{ + union { float16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4v4hf (__a, __bu.__o); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_f32 (float32_t * __a, float32x2x4_t __b) +{ + union { float32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4v2sf ((__builtin_neon_sf *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_u8 (uint8_t * __a, uint8x8x4_t __b) +{ + union { uint8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4v8qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_u16 (uint16_t * __a, uint16x4x4_t __b) +{ + union { uint16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4v4hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_u32 (uint32_t * __a, uint32x2x4_t __b) +{ + union { uint32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4v2si ((__builtin_neon_si *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_p8 (poly8_t * __a, poly8x8x4_t __b) +{ + union { poly8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4v8qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_p16 (poly16_t * __a, poly16x4x4_t __b) +{ + union { poly16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4v4hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_p64 (poly64_t * __a, poly64x1x4_t __b) +{ + union { poly64x1x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4di ((__builtin_neon_di *) __a, __bu.__o); +} + +#pragma GCC pop_options +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_s64 (int64_t * __a, int64x1x4_t __b) +{ + union { int64x1x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4di ((__builtin_neon_di *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_u64 (uint64_t * __a, uint64x1x4_t __b) +{ + union { uint64x1x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4di ((__builtin_neon_di *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_s8 (int8_t * __a, int8x16x4_t __b) +{ + union { int8x16x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4v16qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_s16 (int16_t * __a, int16x8x4_t __b) +{ + union { int16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4v8hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_s32 (int32_t * __a, int32x4x4_t __b) +{ + union { int32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4v4si ((__builtin_neon_si *) __a, __bu.__o); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_f16 (float16_t * __a, float16x8x4_t __b) +{ + union { float16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4v8hf (__a, __bu.__o); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_f32 (float32_t * __a, float32x4x4_t __b) +{ + union { float32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4v4sf ((__builtin_neon_sf *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_u8 (uint8_t * __a, uint8x16x4_t __b) +{ + union { uint8x16x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4v16qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_u16 (uint16_t * __a, uint16x8x4_t __b) +{ + union { uint16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4v8hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_u32 (uint32_t * __a, uint32x4x4_t __b) +{ + union { uint32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4v4si ((__builtin_neon_si *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_p8 (poly8_t * __a, poly8x16x4_t __b) +{ + union { poly8x16x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4v16qi ((__builtin_neon_qi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_p16 (poly16_t * __a, poly16x8x4_t __b) +{ + union { poly16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4v8hi ((__builtin_neon_hi *) __a, __bu.__o); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_lane_s8 (int8_t * __a, int8x8x4_t __b, const int __c) +{ + union { int8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_lane_s16 (int16_t * __a, int16x4x4_t __b, const int __c) +{ + union { int16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_lane_s32 (int32_t * __a, int32x2x4_t __b, const int __c) +{ + union { int32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_lane_f16 (float16_t * __a, float16x4x4_t __b, const int __c) +{ + union { float16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev4hf (__a, __bu.__o, __c); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_lane_f32 (float32_t * __a, float32x2x4_t __b, const int __c) +{ + union { float32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev2sf ((__builtin_neon_sf *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_lane_u8 (uint8_t * __a, uint8x8x4_t __b, const int __c) +{ + union { uint8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_lane_u16 (uint16_t * __a, uint16x4x4_t __b, const int __c) +{ + union { uint16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_lane_u32 (uint32_t * __a, uint32x2x4_t __b, const int __c) +{ + union { uint32x2x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev2si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_lane_p8 (poly8_t * __a, poly8x8x4_t __b, const int __c) +{ + union { poly8x8x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev8qi ((__builtin_neon_qi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4_lane_p16 (poly16_t * __a, poly16x4x4_t __b, const int __c) +{ + union { poly16x4x4_t __i; __builtin_neon_oi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev4hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_lane_s16 (int16_t * __a, int16x8x4_t __b, const int __c) +{ + union { int16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_lane_s32 (int32_t * __a, int32x4x4_t __b, const int __c) +{ + union { int32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_lane_f16 (float16_t * __a, float16x8x4_t __b, const int __c) +{ + union { float16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev8hf (__a, __bu.__o, __c); +} +#endif + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_lane_f32 (float32_t * __a, float32x4x4_t __b, const int __c) +{ + union { float32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev4sf ((__builtin_neon_sf *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_lane_u16 (uint16_t * __a, uint16x8x4_t __b, const int __c) +{ + union { uint16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_lane_u32 (uint32_t * __a, uint32x4x4_t __b, const int __c) +{ + union { uint32x4x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev4si ((__builtin_neon_si *) __a, __bu.__o, __c); +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vst4q_lane_p16 (poly16_t * __a, poly16x8x4_t __b, const int __c) +{ + union { poly16x8x4_t __i; __builtin_neon_xi __o; } __bu = { __b }; + __builtin_neon_vst4_lanev8hi ((__builtin_neon_hi *) __a, __bu.__o, __c); +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vand_s8 (int8x8_t __a, int8x8_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vand_s16 (int16x4_t __a, int16x4_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vand_s32 (int32x2_t __a, int32x2_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vand_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vand_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vand_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vand_s64 (int64x1_t __a, int64x1_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vand_u64 (uint64x1_t __a, uint64x1_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vandq_s8 (int8x16_t __a, int8x16_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vandq_s16 (int16x8_t __a, int16x8_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vandq_s32 (int32x4_t __a, int32x4_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vandq_s64 (int64x2_t __a, int64x2_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vandq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vandq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vandq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vandq_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return __a & __b; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorr_s8 (int8x8_t __a, int8x8_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorr_s16 (int16x4_t __a, int16x4_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorr_s32 (int32x2_t __a, int32x2_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorr_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorr_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorr_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorr_s64 (int64x1_t __a, int64x1_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorr_u64 (uint64x1_t __a, uint64x1_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorrq_s8 (int8x16_t __a, int8x16_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorrq_s16 (int16x8_t __a, int16x8_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorrq_s32 (int32x4_t __a, int32x4_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorrq_s64 (int64x2_t __a, int64x2_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorrq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorrq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorrq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorrq_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return __a | __b; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veor_s8 (int8x8_t __a, int8x8_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veor_s16 (int16x4_t __a, int16x4_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veor_s32 (int32x2_t __a, int32x2_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veor_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veor_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veor_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veor_s64 (int64x1_t __a, int64x1_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veor_u64 (uint64x1_t __a, uint64x1_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veorq_s8 (int8x16_t __a, int8x16_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veorq_s16 (int16x8_t __a, int16x8_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veorq_s32 (int32x4_t __a, int32x4_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veorq_s64 (int64x2_t __a, int64x2_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veorq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veorq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veorq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +veorq_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return __a ^ __b; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbic_s8 (int8x8_t __a, int8x8_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbic_s16 (int16x4_t __a, int16x4_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbic_s32 (int32x2_t __a, int32x2_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbic_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbic_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbic_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbic_s64 (int64x1_t __a, int64x1_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbic_u64 (uint64x1_t __a, uint64x1_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbicq_s8 (int8x16_t __a, int8x16_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbicq_s16 (int16x8_t __a, int16x8_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbicq_s32 (int32x4_t __a, int32x4_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbicq_s64 (int64x2_t __a, int64x2_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbicq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbicq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbicq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbicq_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return __a & ~__b; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorn_s8 (int8x8_t __a, int8x8_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorn_s16 (int16x4_t __a, int16x4_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorn_s32 (int32x2_t __a, int32x2_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorn_u8 (uint8x8_t __a, uint8x8_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorn_u16 (uint16x4_t __a, uint16x4_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorn_u32 (uint32x2_t __a, uint32x2_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorn_s64 (int64x1_t __a, int64x1_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vorn_u64 (uint64x1_t __a, uint64x1_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vornq_s8 (int8x16_t __a, int8x16_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vornq_s16 (int16x8_t __a, int16x8_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vornq_s32 (int32x4_t __a, int32x4_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vornq_s64 (int64x2_t __a, int64x2_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vornq_u8 (uint8x16_t __a, uint8x16_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vornq_u16 (uint16x8_t __a, uint16x8_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vornq_u32 (uint32x4_t __a, uint32x4_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vornq_u64 (uint64x2_t __a, uint64x2_t __b) +{ + return __a | ~__b; +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_p16 (poly16x4_t __a) +{ + return (poly8x8_t) __a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_f16 (float16x4_t __a) +{ + return (poly8x8_t) __a; +} +#endif + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_f32 (float32x2_t __a) +{ + return (poly8x8_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_p64 (poly64x1_t __a) +{ + return (poly8x8_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_s64 (int64x1_t __a) +{ + return (poly8x8_t)__a; +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_u64 (uint64x1_t __a) +{ + return (poly8x8_t)__a; +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_s8 (int8x8_t __a) +{ + return (poly8x8_t)__a; +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_s16 (int16x4_t __a) +{ + return (poly8x8_t)__a; +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_s32 (int32x2_t __a) +{ + return (poly8x8_t)__a; +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_u8 (uint8x8_t __a) +{ + return (poly8x8_t)__a; +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_u16 (uint16x4_t __a) +{ + return (poly8x8_t)__a; +} + +__extension__ extern __inline poly8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p8_u32 (uint32x2_t __a) +{ + return (poly8x8_t)__a; +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_p8 (poly8x8_t __a) +{ + return (poly16x4_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_f16 (float16x4_t __a) +{ + return (poly16x4_t) __a; +} +#endif + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_f32 (float32x2_t __a) +{ + return (poly16x4_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_p64 (poly64x1_t __a) +{ + return (poly16x4_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_s64 (int64x1_t __a) +{ + return (poly16x4_t)__a; +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_u64 (uint64x1_t __a) +{ + return (poly16x4_t)__a; +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_s8 (int8x8_t __a) +{ + return (poly16x4_t)__a; +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_s16 (int16x4_t __a) +{ + return (poly16x4_t)__a; +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_s32 (int32x2_t __a) +{ + return (poly16x4_t)__a; +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_u8 (uint8x8_t __a) +{ + return (poly16x4_t)__a; +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_u16 (uint16x4_t __a) +{ + return (poly16x4_t)__a; +} + +__extension__ extern __inline poly16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p16_u32 (uint32x2_t __a) +{ + return (poly16x4_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_p8 (poly8x8_t __a) +{ + return (float16x4_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_p16 (poly16x4_t __a) +{ + return (float16x4_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_f32 (float32x2_t __a) +{ + return (float16x4_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_p64 (poly64x1_t __a) +{ + return (float16x4_t) __a; +} +#pragma GCC pop_options +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_s64 (int64x1_t __a) +{ + return (float16x4_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_u64 (uint64x1_t __a) +{ + return (float16x4_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_s8 (int8x8_t __a) +{ + return (float16x4_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_s16 (int16x4_t __a) +{ + return (float16x4_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_s32 (int32x2_t __a) +{ + return (float16x4_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_u8 (uint8x8_t __a) +{ + return (float16x4_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_u16 (uint16x4_t __a) +{ + return (float16x4_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f16_u32 (uint32x2_t __a) +{ + return (float16x4_t) __a; +} +#endif + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_p8 (poly8x8_t __a) +{ + return (float32x2_t)__a; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_p16 (poly16x4_t __a) +{ + return (float32x2_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_f16 (float16x4_t __a) +{ + return (float32x2_t) __a; +} +#endif + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_p64 (poly64x1_t __a) +{ + return (float32x2_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_s64 (int64x1_t __a) +{ + return (float32x2_t)__a; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_u64 (uint64x1_t __a) +{ + return (float32x2_t)__a; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_s8 (int8x8_t __a) +{ + return (float32x2_t)__a; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_s16 (int16x4_t __a) +{ + return (float32x2_t)__a; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_s32 (int32x2_t __a) +{ + return (float32x2_t)__a; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_u8 (uint8x8_t __a) +{ + return (float32x2_t)__a; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_u16 (uint16x4_t __a) +{ + return (float32x2_t)__a; +} + +__extension__ extern __inline float32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_f32_u32 (uint32x2_t __a) +{ + return (float32x2_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_p8 (poly8x8_t __a) +{ + return (poly64x1_t)__a; +} + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_p16 (poly16x4_t __a) +{ + return (poly64x1_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_f16 (float16x4_t __a) +{ + return (poly64x1_t) __a; +} +#endif + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_f32 (float32x2_t __a) +{ + return (poly64x1_t)__a; +} + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_s64 (int64x1_t __a) +{ + return (poly64x1_t)__a; +} + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_u64 (uint64x1_t __a) +{ + return (poly64x1_t)__a; +} + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_s8 (int8x8_t __a) +{ + return (poly64x1_t)__a; +} + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_s16 (int16x4_t __a) +{ + return (poly64x1_t)__a; +} + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_s32 (int32x2_t __a) +{ + return (poly64x1_t)__a; +} + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_u8 (uint8x8_t __a) +{ + return (poly64x1_t)__a; +} + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_u16 (uint16x4_t __a) +{ + return (poly64x1_t)__a; +} + +__extension__ extern __inline poly64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_p64_u32 (uint32x2_t __a) +{ + return (poly64x1_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_p8 (poly8x8_t __a) +{ + return (int64x1_t)__a; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_p16 (poly16x4_t __a) +{ + return (int64x1_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_f16 (float16x4_t __a) +{ + return (int64x1_t) __a; +} +#endif + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_f32 (float32x2_t __a) +{ + return (int64x1_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_p64 (poly64x1_t __a) +{ + return (int64x1_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_u64 (uint64x1_t __a) +{ + return (int64x1_t)__a; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_s8 (int8x8_t __a) +{ + return (int64x1_t)__a; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_s16 (int16x4_t __a) +{ + return (int64x1_t)__a; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_s32 (int32x2_t __a) +{ + return (int64x1_t)__a; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_u8 (uint8x8_t __a) +{ + return (int64x1_t)__a; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_u16 (uint16x4_t __a) +{ + return (int64x1_t)__a; +} + +__extension__ extern __inline int64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s64_u32 (uint32x2_t __a) +{ + return (int64x1_t)__a; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_p8 (poly8x8_t __a) +{ + return (uint64x1_t)__a; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_p16 (poly16x4_t __a) +{ + return (uint64x1_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_f16 (float16x4_t __a) +{ + return (uint64x1_t) __a; +} +#endif + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_f32 (float32x2_t __a) +{ + return (uint64x1_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_p64 (poly64x1_t __a) +{ + return (uint64x1_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_s64 (int64x1_t __a) +{ + return (uint64x1_t)__a; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_s8 (int8x8_t __a) +{ + return (uint64x1_t)__a; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_s16 (int16x4_t __a) +{ + return (uint64x1_t)__a; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_s32 (int32x2_t __a) +{ + return (uint64x1_t)__a; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_u8 (uint8x8_t __a) +{ + return (uint64x1_t)__a; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_u16 (uint16x4_t __a) +{ + return (uint64x1_t)__a; +} + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u64_u32 (uint32x2_t __a) +{ + return (uint64x1_t)__a; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_p8 (poly8x8_t __a) +{ + return (int8x8_t)__a; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_p16 (poly16x4_t __a) +{ + return (int8x8_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_f16 (float16x4_t __a) +{ + return (int8x8_t) __a; +} +#endif + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_f32 (float32x2_t __a) +{ + return (int8x8_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_p64 (poly64x1_t __a) +{ + return (int8x8_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_s64 (int64x1_t __a) +{ + return (int8x8_t)__a; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_u64 (uint64x1_t __a) +{ + return (int8x8_t)__a; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_s16 (int16x4_t __a) +{ + return (int8x8_t)__a; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_s32 (int32x2_t __a) +{ + return (int8x8_t)__a; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_u8 (uint8x8_t __a) +{ + return (int8x8_t)__a; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_u16 (uint16x4_t __a) +{ + return (int8x8_t)__a; +} + +__extension__ extern __inline int8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s8_u32 (uint32x2_t __a) +{ + return (int8x8_t)__a; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_p8 (poly8x8_t __a) +{ + return (int16x4_t)__a; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_p16 (poly16x4_t __a) +{ + return (int16x4_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_f16 (float16x4_t __a) +{ + return (int16x4_t) __a; +} +#endif + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_f32 (float32x2_t __a) +{ + return (int16x4_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_p64 (poly64x1_t __a) +{ + return (int16x4_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_s64 (int64x1_t __a) +{ + return (int16x4_t)__a; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_u64 (uint64x1_t __a) +{ + return (int16x4_t)__a; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_s8 (int8x8_t __a) +{ + return (int16x4_t)__a; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_s32 (int32x2_t __a) +{ + return (int16x4_t)__a; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_u8 (uint8x8_t __a) +{ + return (int16x4_t)__a; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_u16 (uint16x4_t __a) +{ + return (int16x4_t)__a; +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s16_u32 (uint32x2_t __a) +{ + return (int16x4_t)__a; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_p8 (poly8x8_t __a) +{ + return (int32x2_t)__a; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_p16 (poly16x4_t __a) +{ + return (int32x2_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_f16 (float16x4_t __a) +{ + return (int32x2_t) __a; +} +#endif + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_f32 (float32x2_t __a) +{ + return (int32x2_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_p64 (poly64x1_t __a) +{ + return (int32x2_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_s64 (int64x1_t __a) +{ + return (int32x2_t)__a; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_u64 (uint64x1_t __a) +{ + return (int32x2_t)__a; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_s8 (int8x8_t __a) +{ + return (int32x2_t)__a; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_s16 (int16x4_t __a) +{ + return (int32x2_t)__a; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_u8 (uint8x8_t __a) +{ + return (int32x2_t)__a; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_u16 (uint16x4_t __a) +{ + return (int32x2_t)__a; +} + +__extension__ extern __inline int32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_s32_u32 (uint32x2_t __a) +{ + return (int32x2_t)__a; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_p8 (poly8x8_t __a) +{ + return (uint8x8_t)__a; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_p16 (poly16x4_t __a) +{ + return (uint8x8_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_f16 (float16x4_t __a) +{ + return (uint8x8_t) __a; +} +#endif + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_f32 (float32x2_t __a) +{ + return (uint8x8_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_p64 (poly64x1_t __a) +{ + return (uint8x8_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_s64 (int64x1_t __a) +{ + return (uint8x8_t)__a; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_u64 (uint64x1_t __a) +{ + return (uint8x8_t)__a; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_s8 (int8x8_t __a) +{ + return (uint8x8_t)__a; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_s16 (int16x4_t __a) +{ + return (uint8x8_t)__a; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_s32 (int32x2_t __a) +{ + return (uint8x8_t)__a; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_u16 (uint16x4_t __a) +{ + return (uint8x8_t)__a; +} + +__extension__ extern __inline uint8x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u8_u32 (uint32x2_t __a) +{ + return (uint8x8_t)__a; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_p8 (poly8x8_t __a) +{ + return (uint16x4_t)__a; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_p16 (poly16x4_t __a) +{ + return (uint16x4_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_f16 (float16x4_t __a) +{ + return (uint16x4_t) __a; +} +#endif + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_f32 (float32x2_t __a) +{ + return (uint16x4_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_p64 (poly64x1_t __a) +{ + return (uint16x4_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_s64 (int64x1_t __a) +{ + return (uint16x4_t)__a; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_u64 (uint64x1_t __a) +{ + return (uint16x4_t)__a; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_s8 (int8x8_t __a) +{ + return (uint16x4_t)__a; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_s16 (int16x4_t __a) +{ + return (uint16x4_t)__a; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_s32 (int32x2_t __a) +{ + return (uint16x4_t)__a; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_u8 (uint8x8_t __a) +{ + return (uint16x4_t)__a; +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u16_u32 (uint32x2_t __a) +{ + return (uint16x4_t)__a; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_p8 (poly8x8_t __a) +{ + return (uint32x2_t)__a; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_p16 (poly16x4_t __a) +{ + return (uint32x2_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_f16 (float16x4_t __a) +{ + return (uint32x2_t) __a; +} +#endif + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_f32 (float32x2_t __a) +{ + return (uint32x2_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_p64 (poly64x1_t __a) +{ + return (uint32x2_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_s64 (int64x1_t __a) +{ + return (uint32x2_t)__a; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_u64 (uint64x1_t __a) +{ + return (uint32x2_t)__a; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_s8 (int8x8_t __a) +{ + return (uint32x2_t)__a; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_s16 (int16x4_t __a) +{ + return (uint32x2_t)__a; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_s32 (int32x2_t __a) +{ + return (uint32x2_t)__a; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_u8 (uint8x8_t __a) +{ + return (uint32x2_t)__a; +} + +__extension__ extern __inline uint32x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpret_u32_u16 (uint16x4_t __a) +{ + return (uint32x2_t)__a; +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_p16 (poly16x8_t __a) +{ + return (poly8x16_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_f16 (float16x8_t __a) +{ + return (poly8x16_t) __a; +} +#endif + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_f32 (float32x4_t __a) +{ + return (poly8x16_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_p64 (poly64x2_t __a) +{ + return (poly8x16_t)__a; +} + + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_p128 (poly128_t __a) +{ + return (poly8x16_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_s64 (int64x2_t __a) +{ + return (poly8x16_t)__a; +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_u64 (uint64x2_t __a) +{ + return (poly8x16_t)__a; +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_s8 (int8x16_t __a) +{ + return (poly8x16_t)__a; +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_s16 (int16x8_t __a) +{ + return (poly8x16_t)__a; +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_s32 (int32x4_t __a) +{ + return (poly8x16_t)__a; +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_u8 (uint8x16_t __a) +{ + return (poly8x16_t)__a; +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_u16 (uint16x8_t __a) +{ + return (poly8x16_t)__a; +} + +__extension__ extern __inline poly8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p8_u32 (uint32x4_t __a) +{ + return (poly8x16_t)__a; +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_p8 (poly8x16_t __a) +{ + return (poly16x8_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_f16 (float16x8_t __a) +{ + return (poly16x8_t) __a; +} +#endif + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_f32 (float32x4_t __a) +{ + return (poly16x8_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_p64 (poly64x2_t __a) +{ + return (poly16x8_t)__a; +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_p128 (poly128_t __a) +{ + return (poly16x8_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_s64 (int64x2_t __a) +{ + return (poly16x8_t)__a; +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_u64 (uint64x2_t __a) +{ + return (poly16x8_t)__a; +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_s8 (int8x16_t __a) +{ + return (poly16x8_t)__a; +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_s16 (int16x8_t __a) +{ + return (poly16x8_t)__a; +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_s32 (int32x4_t __a) +{ + return (poly16x8_t)__a; +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_u8 (uint8x16_t __a) +{ + return (poly16x8_t)__a; +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_u16 (uint16x8_t __a) +{ + return (poly16x8_t)__a; +} + +__extension__ extern __inline poly16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p16_u32 (uint32x4_t __a) +{ + return (poly16x8_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_p8 (poly8x16_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_p16 (poly16x8_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_f32 (float32x4_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_p64 (poly64x2_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_p128 (poly128_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#pragma GCC pop_options + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_s64 (int64x2_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_u64 (uint64x2_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_s8 (int8x16_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_s16 (int16x8_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_s32 (int32x4_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_u8 (uint8x16_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_u16 (uint16x8_t __a) +{ + return (float16x8_t) __a; +} +#endif + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f16_u32 (uint32x4_t __a) +{ + return (float16x8_t) __a; +} +#endif + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_p8 (poly8x16_t __a) +{ + return (float32x4_t)__a; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_p16 (poly16x8_t __a) +{ + return (float32x4_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_f16 (float16x8_t __a) +{ + return (float32x4_t) __a; +} +#endif + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_p64 (poly64x2_t __a) +{ + return (float32x4_t)__a; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_p128 (poly128_t __a) +{ + return (float32x4_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_s64 (int64x2_t __a) +{ + return (float32x4_t)__a; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_u64 (uint64x2_t __a) +{ + return (float32x4_t)__a; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_s8 (int8x16_t __a) +{ + return (float32x4_t)__a; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_s16 (int16x8_t __a) +{ + return (float32x4_t)__a; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_s32 (int32x4_t __a) +{ + return (float32x4_t)__a; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_u8 (uint8x16_t __a) +{ + return (float32x4_t)__a; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_u16 (uint16x8_t __a) +{ + return (float32x4_t)__a; +} + +__extension__ extern __inline float32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_f32_u32 (uint32x4_t __a) +{ + return (float32x4_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_p8 (poly8x16_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_p16 (poly16x8_t __a) +{ + return (poly64x2_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_f16 (float16x8_t __a) +{ + return (poly64x2_t) __a; +} +#endif + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_f32 (float32x4_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_p128 (poly128_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_s64 (int64x2_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_u64 (uint64x2_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_s8 (int8x16_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_s16 (int16x8_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_s32 (int32x4_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_u8 (uint8x16_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_u16 (uint16x8_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p64_u32 (uint32x4_t __a) +{ + return (poly64x2_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_p8 (poly8x16_t __a) +{ + return (poly128_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_p16 (poly16x8_t __a) +{ + return (poly128_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_f16 (float16x8_t __a) +{ + return (poly128_t) __a; +} +#endif + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_f32 (float32x4_t __a) +{ + return (poly128_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_p64 (poly64x2_t __a) +{ + return (poly128_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_s64 (int64x2_t __a) +{ + return (poly128_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_u64 (uint64x2_t __a) +{ + return (poly128_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_s8 (int8x16_t __a) +{ + return (poly128_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_s16 (int16x8_t __a) +{ + return (poly128_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_s32 (int32x4_t __a) +{ + return (poly128_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_u8 (uint8x16_t __a) +{ + return (poly128_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_u16 (uint16x8_t __a) +{ + return (poly128_t)__a; +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_p128_u32 (uint32x4_t __a) +{ + return (poly128_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_p8 (poly8x16_t __a) +{ + return (int64x2_t)__a; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_p16 (poly16x8_t __a) +{ + return (int64x2_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_f16 (float16x8_t __a) +{ + return (int64x2_t) __a; +} +#endif + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_f32 (float32x4_t __a) +{ + return (int64x2_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_p64 (poly64x2_t __a) +{ + return (int64x2_t)__a; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_p128 (poly128_t __a) +{ + return (int64x2_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_u64 (uint64x2_t __a) +{ + return (int64x2_t)__a; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_s8 (int8x16_t __a) +{ + return (int64x2_t)__a; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_s16 (int16x8_t __a) +{ + return (int64x2_t)__a; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_s32 (int32x4_t __a) +{ + return (int64x2_t)__a; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_u8 (uint8x16_t __a) +{ + return (int64x2_t)__a; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_u16 (uint16x8_t __a) +{ + return (int64x2_t)__a; +} + +__extension__ extern __inline int64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s64_u32 (uint32x4_t __a) +{ + return (int64x2_t)__a; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_p8 (poly8x16_t __a) +{ + return (uint64x2_t)__a; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_p16 (poly16x8_t __a) +{ + return (uint64x2_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_f16 (float16x8_t __a) +{ + return (uint64x2_t) __a; +} +#endif + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_f32 (float32x4_t __a) +{ + return (uint64x2_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_p64 (poly64x2_t __a) +{ + return (uint64x2_t)__a; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_p128 (poly128_t __a) +{ + return (uint64x2_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_s64 (int64x2_t __a) +{ + return (uint64x2_t)__a; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_s8 (int8x16_t __a) +{ + return (uint64x2_t)__a; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_s16 (int16x8_t __a) +{ + return (uint64x2_t)__a; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_s32 (int32x4_t __a) +{ + return (uint64x2_t)__a; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_u8 (uint8x16_t __a) +{ + return (uint64x2_t)__a; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_u16 (uint16x8_t __a) +{ + return (uint64x2_t)__a; +} + +__extension__ extern __inline uint64x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u64_u32 (uint32x4_t __a) +{ + return (uint64x2_t)__a; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_p8 (poly8x16_t __a) +{ + return (int8x16_t)__a; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_p16 (poly16x8_t __a) +{ + return (int8x16_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_f16 (float16x8_t __a) +{ + return (int8x16_t) __a; +} +#endif + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_f32 (float32x4_t __a) +{ + return (int8x16_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_p64 (poly64x2_t __a) +{ + return (int8x16_t)__a; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_p128 (poly128_t __a) +{ + return (int8x16_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_s64 (int64x2_t __a) +{ + return (int8x16_t)__a; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_u64 (uint64x2_t __a) +{ + return (int8x16_t)__a; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_s16 (int16x8_t __a) +{ + return (int8x16_t)__a; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_s32 (int32x4_t __a) +{ + return (int8x16_t)__a; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_u8 (uint8x16_t __a) +{ + return (int8x16_t)__a; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_u16 (uint16x8_t __a) +{ + return (int8x16_t)__a; +} + +__extension__ extern __inline int8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s8_u32 (uint32x4_t __a) +{ + return (int8x16_t)__a; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_p8 (poly8x16_t __a) +{ + return (int16x8_t)__a; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_p16 (poly16x8_t __a) +{ + return (int16x8_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_f16 (float16x8_t __a) +{ + return (int16x8_t) __a; +} +#endif + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_f32 (float32x4_t __a) +{ + return (int16x8_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_p64 (poly64x2_t __a) +{ + return (int16x8_t)__a; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_p128 (poly128_t __a) +{ + return (int16x8_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_s64 (int64x2_t __a) +{ + return (int16x8_t)__a; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_u64 (uint64x2_t __a) +{ + return (int16x8_t)__a; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_s8 (int8x16_t __a) +{ + return (int16x8_t)__a; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_s32 (int32x4_t __a) +{ + return (int16x8_t)__a; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_u8 (uint8x16_t __a) +{ + return (int16x8_t)__a; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_u16 (uint16x8_t __a) +{ + return (int16x8_t)__a; +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s16_u32 (uint32x4_t __a) +{ + return (int16x8_t)__a; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_p8 (poly8x16_t __a) +{ + return (int32x4_t)__a; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_p16 (poly16x8_t __a) +{ + return (int32x4_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_f16 (float16x8_t __a) +{ + return (int32x4_t)__a; +} +#endif + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_f32 (float32x4_t __a) +{ + return (int32x4_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_p64 (poly64x2_t __a) +{ + return (int32x4_t)__a; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_p128 (poly128_t __a) +{ + return (int32x4_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_s64 (int64x2_t __a) +{ + return (int32x4_t)__a; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_u64 (uint64x2_t __a) +{ + return (int32x4_t)__a; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_s8 (int8x16_t __a) +{ + return (int32x4_t)__a; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_s16 (int16x8_t __a) +{ + return (int32x4_t)__a; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_u8 (uint8x16_t __a) +{ + return (int32x4_t)__a; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_u16 (uint16x8_t __a) +{ + return (int32x4_t)__a; +} + +__extension__ extern __inline int32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_s32_u32 (uint32x4_t __a) +{ + return (int32x4_t)__a; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_p8 (poly8x16_t __a) +{ + return (uint8x16_t)__a; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_p16 (poly16x8_t __a) +{ + return (uint8x16_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_f16 (float16x8_t __a) +{ + return (uint8x16_t) __a; +} +#endif + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_f32 (float32x4_t __a) +{ + return (uint8x16_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_p64 (poly64x2_t __a) +{ + return (uint8x16_t)__a; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_p128 (poly128_t __a) +{ + return (uint8x16_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_s64 (int64x2_t __a) +{ + return (uint8x16_t)__a; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_u64 (uint64x2_t __a) +{ + return (uint8x16_t)__a; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_s8 (int8x16_t __a) +{ + return (uint8x16_t)__a; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_s16 (int16x8_t __a) +{ + return (uint8x16_t)__a; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_s32 (int32x4_t __a) +{ + return (uint8x16_t)__a; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_u16 (uint16x8_t __a) +{ + return (uint8x16_t)__a; +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u8_u32 (uint32x4_t __a) +{ + return (uint8x16_t)__a; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_p8 (poly8x16_t __a) +{ + return (uint16x8_t)__a; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_p16 (poly16x8_t __a) +{ + return (uint16x8_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_f16 (float16x8_t __a) +{ + return (uint16x8_t) __a; +} +#endif + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_f32 (float32x4_t __a) +{ + return (uint16x8_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_p64 (poly64x2_t __a) +{ + return (uint16x8_t)__a; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_p128 (poly128_t __a) +{ + return (uint16x8_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_s64 (int64x2_t __a) +{ + return (uint16x8_t)__a; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_u64 (uint64x2_t __a) +{ + return (uint16x8_t)__a; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_s8 (int8x16_t __a) +{ + return (uint16x8_t)__a; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_s16 (int16x8_t __a) +{ + return (uint16x8_t)__a; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_s32 (int32x4_t __a) +{ + return (uint16x8_t)__a; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_u8 (uint8x16_t __a) +{ + return (uint16x8_t)__a; +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u16_u32 (uint32x4_t __a) +{ + return (uint16x8_t)__a; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_p8 (poly8x16_t __a) +{ + return (uint32x4_t)__a; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_p16 (poly16x8_t __a) +{ + return (uint32x4_t)__a; +} + +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_f16 (float16x8_t __a) +{ + return (uint32x4_t) __a; +} +#endif + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_f32 (float32x4_t __a) +{ + return (uint32x4_t)__a; +} + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_p64 (poly64x2_t __a) +{ + return (uint32x4_t)__a; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_p128 (poly128_t __a) +{ + return (uint32x4_t)__a; +} + +#pragma GCC pop_options +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_s64 (int64x2_t __a) +{ + return (uint32x4_t)__a; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_u64 (uint64x2_t __a) +{ + return (uint32x4_t)__a; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_s8 (int8x16_t __a) +{ + return (uint32x4_t)__a; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_s16 (int16x8_t __a) +{ + return (uint32x4_t)__a; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_s32 (int32x4_t __a) +{ + return (uint32x4_t)__a; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_u8 (uint8x16_t __a) +{ + return (uint32x4_t)__a; +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vreinterpretq_u32_u16 (uint16x8_t __a) +{ + return (uint32x4_t)__a; +} + + +#pragma GCC push_options +#pragma GCC target ("fpu=crypto-neon-fp-armv8") +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vldrq_p128 (poly128_t const * __ptr) +{ +#ifdef __ARM_BIG_ENDIAN + poly64_t* __ptmp = (poly64_t*) __ptr; + poly64_t __d0 = vld1_p64 (__ptmp); + poly64_t __d1 = vld1_p64 (__ptmp + 1); + return vreinterpretq_p128_p64 (vcombine_p64 (__d1, __d0)); +#else + return vreinterpretq_p128_p64 (vld1q_p64 ((poly64_t*) __ptr)); +#endif +} + +__extension__ extern __inline void +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vstrq_p128 (poly128_t * __ptr, poly128_t __val) +{ +#ifdef __ARM_BIG_ENDIAN + poly64x2_t __tmp = vreinterpretq_p64_p128 (__val); + poly64_t __d0 = vget_high_p64 (__tmp); + poly64_t __d1 = vget_low_p64 (__tmp); + vst1q_p64 ((poly64_t*) __ptr, vcombine_p64 (__d0, __d1)); +#else + vst1q_p64 ((poly64_t*) __ptr, vreinterpretq_p64_p128 (__val)); +#endif +} + +/* The vceq_p64 intrinsic does not map to a single instruction. + Instead we emulate it by performing a 32-bit variant of the vceq + and applying a pairwise min reduction to the result. + vceq_u32 will produce two 32-bit halves, each of which will contain either + all ones or all zeros depending on whether the corresponding 32-bit + halves of the poly64_t were equal. The whole poly64_t values are equal + if and only if both halves are equal, i.e. vceq_u32 returns all ones. + If the result is all zeroes for any half then the whole result is zeroes. + This is what the pairwise min reduction achieves. */ + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceq_p64 (poly64x1_t __a, poly64x1_t __b) +{ + uint32x2_t __t_a = vreinterpret_u32_p64 (__a); + uint32x2_t __t_b = vreinterpret_u32_p64 (__b); + uint32x2_t __c = vceq_u32 (__t_a, __t_b); + uint32x2_t __m = vpmin_u32 (__c, __c); + return vreinterpret_u64_u32 (__m); +} + +/* The vtst_p64 intrinsic does not map to a single instruction. + We emulate it in way similar to vceq_p64 above but here we do + a reduction with max since if any two corresponding bits + in the two poly64_t's match, then the whole result must be all ones. */ + +__extension__ extern __inline uint64x1_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtst_p64 (poly64x1_t __a, poly64x1_t __b) +{ + uint32x2_t __t_a = vreinterpret_u32_p64 (__a); + uint32x2_t __t_b = vreinterpret_u32_p64 (__b); + uint32x2_t __c = vtst_u32 (__t_a, __t_b); + uint32x2_t __m = vpmax_u32 (__c, __c); + return vreinterpret_u64_u32 (__m); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaeseq_u8 (uint8x16_t __data, uint8x16_t __key) +{ + return __builtin_arm_crypto_aese (__data, __key); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaesdq_u8 (uint8x16_t __data, uint8x16_t __key) +{ + return __builtin_arm_crypto_aesd (__data, __key); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaesmcq_u8 (uint8x16_t __data) +{ + return __builtin_arm_crypto_aesmc (__data); +} + +__extension__ extern __inline uint8x16_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaesimcq_u8 (uint8x16_t __data) +{ + return __builtin_arm_crypto_aesimc (__data); +} + +__extension__ extern __inline uint32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsha1h_u32 (uint32_t __hash_e) +{ + uint32x4_t __t = vdupq_n_u32 (0); + __t = vsetq_lane_u32 (__hash_e, __t, 0); + __t = __builtin_arm_crypto_sha1h (__t); + return vgetq_lane_u32 (__t, 0); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsha1cq_u32 (uint32x4_t __hash_abcd, uint32_t __hash_e, uint32x4_t __wk) +{ + uint32x4_t __t = vdupq_n_u32 (0); + __t = vsetq_lane_u32 (__hash_e, __t, 0); + return __builtin_arm_crypto_sha1c (__hash_abcd, __t, __wk); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsha1pq_u32 (uint32x4_t __hash_abcd, uint32_t __hash_e, uint32x4_t __wk) +{ + uint32x4_t __t = vdupq_n_u32 (0); + __t = vsetq_lane_u32 (__hash_e, __t, 0); + return __builtin_arm_crypto_sha1p (__hash_abcd, __t, __wk); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsha1mq_u32 (uint32x4_t __hash_abcd, uint32_t __hash_e, uint32x4_t __wk) +{ + uint32x4_t __t = vdupq_n_u32 (0); + __t = vsetq_lane_u32 (__hash_e, __t, 0); + return __builtin_arm_crypto_sha1m (__hash_abcd, __t, __wk); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsha1su0q_u32 (uint32x4_t __w0_3, uint32x4_t __w4_7, uint32x4_t __w8_11) +{ + return __builtin_arm_crypto_sha1su0 (__w0_3, __w4_7, __w8_11); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsha1su1q_u32 (uint32x4_t __tw0_3, uint32x4_t __w12_15) +{ + return __builtin_arm_crypto_sha1su1 (__tw0_3, __w12_15); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsha256hq_u32 (uint32x4_t __hash_abcd, uint32x4_t __hash_efgh, uint32x4_t __wk) +{ + return __builtin_arm_crypto_sha256h (__hash_abcd, __hash_efgh, __wk); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsha256h2q_u32 (uint32x4_t __hash_abcd, uint32x4_t __hash_efgh, uint32x4_t __wk) +{ + return __builtin_arm_crypto_sha256h2 (__hash_abcd, __hash_efgh, __wk); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsha256su0q_u32 (uint32x4_t __w0_3, uint32x4_t __w4_7) +{ + return __builtin_arm_crypto_sha256su0 (__w0_3, __w4_7); +} + +__extension__ extern __inline uint32x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsha256su1q_u32 (uint32x4_t __tw0_3, uint32x4_t __w8_11, uint32x4_t __w12_15) +{ + return __builtin_arm_crypto_sha256su1 (__tw0_3, __w8_11, __w12_15); +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_p64 (poly64_t __a, poly64_t __b) +{ + return (poly128_t) __builtin_arm_crypto_vmullp64 ((uint64_t) __a, (uint64_t) __b); +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_high_p64 (poly64x2_t __a, poly64x2_t __b) +{ + poly64_t __t1 = vget_high_p64 (__a); + poly64_t __t2 = vget_high_p64 (__b); + + return (poly128_t) __builtin_arm_crypto_vmullp64 ((uint64_t) __t1, (uint64_t) __t2); +} + +#pragma GCC pop_options + + /* Intrinsics for FP16 instructions. */ +#pragma GCC push_options +#pragma GCC target ("fpu=neon-fp-armv8") +#if defined (__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabd_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vabdv4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabdq_f16 (float16x8_t __a, float16x8_t __b) +{ + return __builtin_neon_vabdv8hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabs_f16 (float16x4_t __a) +{ + return __builtin_neon_vabsv4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vabsq_f16 (float16x8_t __a) +{ + return __builtin_neon_vabsv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vadd_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vaddv4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vaddq_f16 (float16x8_t __a, float16x8_t __b) +{ + return __builtin_neon_vaddv8hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcage_f16 (float16x4_t __a, float16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcagev4hf (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcageq_f16 (float16x8_t __a, float16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcagev8hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcagt_f16 (float16x4_t __a, float16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcagtv4hf (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcagtq_f16 (float16x8_t __a, float16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcagtv8hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcale_f16 (float16x4_t __a, float16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcalev4hf (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcaleq_f16 (float16x8_t __a, float16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcalev8hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcalt_f16 (float16x4_t __a, float16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcaltv4hf (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcaltq_f16 (float16x8_t __a, float16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcaltv8hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceq_f16 (float16x4_t __a, float16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vceqv4hf (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqq_f16 (float16x8_t __a, float16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vceqv8hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqz_f16 (float16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vceqzv4hf (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vceqzq_f16 (float16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vceqzv8hf (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcge_f16 (float16x4_t __a, float16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcgev4hf (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgeq_f16 (float16x8_t __a, float16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcgev8hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgez_f16 (float16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vcgezv4hf (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgezq_f16 (float16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vcgezv8hf (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgt_f16 (float16x4_t __a, float16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcgtv4hf (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgtq_f16 (float16x8_t __a, float16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcgtv8hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgtz_f16 (float16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vcgtzv4hf (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcgtzq_f16 (float16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vcgtzv8hf (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcle_f16 (float16x4_t __a, float16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vclev4hf (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcleq_f16 (float16x8_t __a, float16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vclev8hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclez_f16 (float16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vclezv4hf (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclezq_f16 (float16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vclezv8hf (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vclt_f16 (float16x4_t __a, float16x4_t __b) +{ + return (uint16x4_t)__builtin_neon_vcltv4hf (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcltq_f16 (float16x8_t __a, float16x8_t __b) +{ + return (uint16x8_t)__builtin_neon_vcltv8hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcltz_f16 (float16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vcltzv4hf (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcltzq_f16 (float16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vcltzv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_f16_s16 (int16x4_t __a) +{ + return (float16x4_t)__builtin_neon_vcvtsv4hi (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_f16_u16 (uint16x4_t __a) +{ + return (float16x4_t)__builtin_neon_vcvtuv4hi ((int16x4_t)__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_s16_f16 (float16x4_t __a) +{ + return (int16x4_t)__builtin_neon_vcvtsv4hf (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_u16_f16 (float16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vcvtuv4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_f16_s16 (int16x8_t __a) +{ + return (float16x8_t)__builtin_neon_vcvtsv8hi (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_f16_u16 (uint16x8_t __a) +{ + return (float16x8_t)__builtin_neon_vcvtuv8hi ((int16x8_t)__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_s16_f16 (float16x8_t __a) +{ + return (int16x8_t)__builtin_neon_vcvtsv8hf (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_u16_f16 (float16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vcvtuv8hf (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvta_s16_f16 (float16x4_t __a) +{ + return __builtin_neon_vcvtasv4hf (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvta_u16_f16 (float16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vcvtauv4hf (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtaq_s16_f16 (float16x8_t __a) +{ + return __builtin_neon_vcvtasv8hf (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtaq_u16_f16 (float16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vcvtauv8hf (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtm_s16_f16 (float16x4_t __a) +{ + return __builtin_neon_vcvtmsv4hf (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtm_u16_f16 (float16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vcvtmuv4hf (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtmq_s16_f16 (float16x8_t __a) +{ + return __builtin_neon_vcvtmsv8hf (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtmq_u16_f16 (float16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vcvtmuv8hf (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtn_s16_f16 (float16x4_t __a) +{ + return __builtin_neon_vcvtnsv4hf (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtn_u16_f16 (float16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vcvtnuv4hf (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtnq_s16_f16 (float16x8_t __a) +{ + return __builtin_neon_vcvtnsv8hf (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtnq_u16_f16 (float16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vcvtnuv8hf (__a); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtp_s16_f16 (float16x4_t __a) +{ + return __builtin_neon_vcvtpsv4hf (__a); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtp_u16_f16 (float16x4_t __a) +{ + return (uint16x4_t)__builtin_neon_vcvtpuv4hf (__a); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtpq_s16_f16 (float16x8_t __a) +{ + return __builtin_neon_vcvtpsv8hf (__a); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtpq_u16_f16 (float16x8_t __a) +{ + return (uint16x8_t)__builtin_neon_vcvtpuv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_n_f16_s16 (int16x4_t __a, const int __b) +{ + return __builtin_neon_vcvts_nv4hi (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_n_f16_u16 (uint16x4_t __a, const int __b) +{ + return __builtin_neon_vcvtu_nv4hi ((int16x4_t)__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_n_f16_s16 (int16x8_t __a, const int __b) +{ + return __builtin_neon_vcvts_nv8hi (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_n_f16_u16 (uint16x8_t __a, const int __b) +{ + return __builtin_neon_vcvtu_nv8hi ((int16x8_t)__a, __b); +} + +__extension__ extern __inline int16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_n_s16_f16 (float16x4_t __a, const int __b) +{ + return __builtin_neon_vcvts_nv4hf (__a, __b); +} + +__extension__ extern __inline uint16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvt_n_u16_f16 (float16x4_t __a, const int __b) +{ + return (uint16x4_t)__builtin_neon_vcvtu_nv4hf (__a, __b); +} + +__extension__ extern __inline int16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_n_s16_f16 (float16x8_t __a, const int __b) +{ + return __builtin_neon_vcvts_nv8hf (__a, __b); +} + +__extension__ extern __inline uint16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vcvtq_n_u16_f16 (float16x8_t __a, const int __b) +{ + return (uint16x8_t)__builtin_neon_vcvtu_nv8hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vfma_f16 (float16x4_t __a, float16x4_t __b, float16x4_t __c) +{ + return __builtin_neon_vfmav4hf (__a, __b, __c); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vfmaq_f16 (float16x8_t __a, float16x8_t __b, float16x8_t __c) +{ + return __builtin_neon_vfmav8hf (__a, __b, __c); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vfms_f16 (float16x4_t __a, float16x4_t __b, float16x4_t __c) +{ + return __builtin_neon_vfmsv4hf (__a, __b, __c); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vfmsq_f16 (float16x8_t __a, float16x8_t __b, float16x8_t __c) +{ + return __builtin_neon_vfmsv8hf (__a, __b, __c); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmax_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vmaxfv4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxq_f16 (float16x8_t __a, float16x8_t __b) +{ + return __builtin_neon_vmaxfv8hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxnm_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vmaxnmv4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmaxnmq_f16 (float16x8_t __a, float16x8_t __b) +{ + return __builtin_neon_vmaxnmv8hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmin_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vminfv4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminq_f16 (float16x8_t __a, float16x8_t __b) +{ + return __builtin_neon_vminfv8hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminnm_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vminnmv4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vminnmq_f16 (float16x8_t __a, float16x8_t __b) +{ + return __builtin_neon_vminnmv8hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vmulfv4hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_lane_f16 (float16x4_t __a, float16x4_t __b, const int __c) +{ + return __builtin_neon_vmul_lanev4hf (__a, __b, __c); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmul_n_f16 (float16x4_t __a, float16_t __b) +{ + return __builtin_neon_vmul_nv4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_f16 (float16x8_t __a, float16x8_t __b) +{ + return __builtin_neon_vmulfv8hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_lane_f16 (float16x8_t __a, float16x4_t __b, const int __c) +{ + return __builtin_neon_vmul_lanev8hf (__a, __b, __c); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmulq_n_f16 (float16x8_t __a, float16_t __b) +{ + return __builtin_neon_vmul_nv8hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vneg_f16 (float16x4_t __a) +{ + return __builtin_neon_vnegv4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vnegq_f16 (float16x8_t __a) +{ + return __builtin_neon_vnegv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpadd_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vpaddv4hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmax_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vpmaxfv4hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vpmin_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vpminfv4hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrecpe_f16 (float16x4_t __a) +{ + return __builtin_neon_vrecpev4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrecpeq_f16 (float16x8_t __a) +{ + return __builtin_neon_vrecpev8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrnd_f16 (float16x4_t __a) +{ + return __builtin_neon_vrndv4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndq_f16 (float16x8_t __a) +{ + return __builtin_neon_vrndv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrnda_f16 (float16x4_t __a) +{ + return __builtin_neon_vrndav4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndaq_f16 (float16x8_t __a) +{ + return __builtin_neon_vrndav8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndm_f16 (float16x4_t __a) +{ + return __builtin_neon_vrndmv4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndmq_f16 (float16x8_t __a) +{ + return __builtin_neon_vrndmv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndn_f16 (float16x4_t __a) +{ + return __builtin_neon_vrndnv4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndnq_f16 (float16x8_t __a) +{ + return __builtin_neon_vrndnv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndp_f16 (float16x4_t __a) +{ + return __builtin_neon_vrndpv4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndpq_f16 (float16x8_t __a) +{ + return __builtin_neon_vrndpv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndx_f16 (float16x4_t __a) +{ + return __builtin_neon_vrndxv4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrndxq_f16 (float16x8_t __a) +{ + return __builtin_neon_vrndxv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsqrte_f16 (float16x4_t __a) +{ + return __builtin_neon_vrsqrtev4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsqrteq_f16 (float16x8_t __a) +{ + return __builtin_neon_vrsqrtev8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrecps_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vrecpsv4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrecpsq_f16 (float16x8_t __a, float16x8_t __b) +{ + return __builtin_neon_vrecpsv8hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsqrts_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vrsqrtsv4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrsqrtsq_f16 (float16x8_t __a, float16x8_t __b) +{ + return __builtin_neon_vrsqrtsv8hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsub_f16 (float16x4_t __a, float16x4_t __b) +{ + return __builtin_neon_vsubv4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vsubq_f16 (float16x8_t __a, float16x8_t __b) +{ + return __builtin_neon_vsubv8hf (__a, __b); +} + +#endif /* __ARM_FEATURE_VECTOR_FP16_ARITHMETIC. */ +#pragma GCC pop_options + + /* Half-precision data processing intrinsics. */ +#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE) + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbsl_f16 (uint16x4_t __a, float16x4_t __b, float16x4_t __c) +{ + return __builtin_neon_vbslv4hf ((int16x4_t)__a, __b, __c); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vbslq_f16 (uint16x8_t __a, float16x8_t __b, float16x8_t __c) +{ + return __builtin_neon_vbslv8hf ((int16x8_t)__a, __b, __c); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_n_f16 (float16_t __a) +{ + return __builtin_neon_vdup_nv4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_n_f16 (float16_t __a) +{ + return __builtin_neon_vdup_nv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdup_lane_f16 (float16x4_t __a, const int __b) +{ + return __builtin_neon_vdup_lanev4hf (__a, __b); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vdupq_lane_f16 (float16x4_t __a, const int __b) +{ + return __builtin_neon_vdup_lanev8hf (__a, __b); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vext_f16 (float16x4_t __a, float16x4_t __b, const int __c) +{ + return __builtin_neon_vextv4hf (__a, __b, __c); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vextq_f16 (float16x8_t __a, float16x8_t __b, const int __c) +{ + return __builtin_neon_vextv8hf (__a, __b, __c); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmov_n_f16 (float16_t __a) +{ + return __builtin_neon_vdup_nv4hf (__a); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmovq_n_f16 (float16_t __a) +{ + return __builtin_neon_vdup_nv8hf (__a); +} + +__extension__ extern __inline float16x4_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64_f16 (float16x4_t __a) +{ + return (float16x4_t)__builtin_shuffle (__a, (uint16x4_t){ 3, 2, 1, 0 }); +} + +__extension__ extern __inline float16x8_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vrev64q_f16 (float16x8_t __a) +{ + return + (float16x8_t)__builtin_shuffle (__a, + (uint16x8_t){ 3, 2, 1, 0, 7, 6, 5, 4 }); +} + +__extension__ extern __inline float16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrn_f16 (float16x4_t __a, float16x4_t __b) +{ + float16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t){ 5, 1, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t){ 4, 0, 6, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t){ 0, 4, 2, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t){ 1, 5, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline float16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vtrnq_f16 (float16x8_t __a, float16x8_t __b) +{ + float16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, + (uint16x8_t){ 9, 1, 11, 3, 13, 5, 15, 7 }); + __rv.val[1] = __builtin_shuffle (__a, __b, + (uint16x8_t){ 8, 0, 10, 2, 12, 4, 14, 6 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, + (uint16x8_t){ 0, 8, 2, 10, 4, 12, 6, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, + (uint16x8_t){ 1, 9, 3, 11, 5, 13, 7, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline float16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzp_f16 (float16x4_t __a, float16x4_t __b) +{ + float16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t){ 5, 7, 1, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t){ 4, 6, 0, 2 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t){ 0, 2, 4, 6 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t){ 1, 3, 5, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline float16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vuzpq_f16 (float16x8_t __a, float16x8_t __b) +{ + float16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 5, 7, 1, 3, 13, 15, 9, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 4, 6, 0, 2, 12, 14, 8, 10 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, + (uint16x8_t){ 0, 2, 4, 6, 8, 10, 12, 14 }); + __rv.val[1] = __builtin_shuffle (__a, __b, + (uint16x8_t){ 1, 3, 5, 7, 9, 11, 13, 15 }); +#endif + return __rv; +} + +__extension__ extern __inline float16x4x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzip_f16 (float16x4_t __a, float16x4_t __b) +{ + float16x4x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t){ 6, 2, 7, 3 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t){ 4, 0, 5, 1 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x4_t){ 0, 4, 1, 5 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x4_t){ 2, 6, 3, 7 }); +#endif + return __rv; +} + +__extension__ extern __inline float16x8x2_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vzipq_f16 (float16x8_t __a, float16x8_t __b) +{ + float16x8x2_t __rv; +#ifdef __ARM_BIG_ENDIAN + __rv.val[0] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 10, 2, 11, 3, 8, 0, 9, 1 }); + __rv.val[1] = __builtin_shuffle (__a, __b, (uint16x8_t) + { 14, 6, 15, 7, 12, 4, 13, 5 }); +#else + __rv.val[0] = __builtin_shuffle (__a, __b, + (uint16x8_t){ 0, 8, 1, 9, 2, 10, 3, 11 }); + __rv.val[1] = __builtin_shuffle (__a, __b, + (uint16x8_t){ 4, 12, 5, 13, 6, 14, 7, 15 }); +#endif + return __rv; +} + +#endif + +#ifdef __cplusplus +} +#endif + +#pragma GCC pop_options + +#endif +#endif diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/float.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/float.h new file mode 100644 index 000000000..658017fd6 --- /dev/null +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/float.h @@ -0,0 +1,506 @@ +/* Copyright (C) 2002-2017 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +/* + * ISO C Standard: 5.2.4.2.2 Characteristics of floating types + */ + +#ifndef _FLOAT_H___ +#define _FLOAT_H___ + +/* Radix of exponent representation, b. */ +#undef FLT_RADIX +#define FLT_RADIX __FLT_RADIX__ + +/* Number of base-FLT_RADIX digits in the significand, p. */ +#undef FLT_MANT_DIG +#undef DBL_MANT_DIG +#undef LDBL_MANT_DIG +#define FLT_MANT_DIG __FLT_MANT_DIG__ +#define DBL_MANT_DIG __DBL_MANT_DIG__ +#define LDBL_MANT_DIG __LDBL_MANT_DIG__ + +/* Number of decimal digits, q, such that any floating-point number with q + decimal digits can be rounded into a floating-point number with p radix b + digits and back again without change to the q decimal digits, + + p * log10(b) if b is a power of 10 + floor((p - 1) * log10(b)) otherwise +*/ +#undef FLT_DIG +#undef DBL_DIG +#undef LDBL_DIG +#define FLT_DIG __FLT_DIG__ +#define DBL_DIG __DBL_DIG__ +#define LDBL_DIG __LDBL_DIG__ + +/* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */ +#undef FLT_MIN_EXP +#undef DBL_MIN_EXP +#undef LDBL_MIN_EXP +#define FLT_MIN_EXP __FLT_MIN_EXP__ +#define DBL_MIN_EXP __DBL_MIN_EXP__ +#define LDBL_MIN_EXP __LDBL_MIN_EXP__ + +/* Minimum negative integer such that 10 raised to that power is in the + range of normalized floating-point numbers, + + ceil(log10(b) * (emin - 1)) +*/ +#undef FLT_MIN_10_EXP +#undef DBL_MIN_10_EXP +#undef LDBL_MIN_10_EXP +#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__ +#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__ +#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__ + +/* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */ +#undef FLT_MAX_EXP +#undef DBL_MAX_EXP +#undef LDBL_MAX_EXP +#define FLT_MAX_EXP __FLT_MAX_EXP__ +#define DBL_MAX_EXP __DBL_MAX_EXP__ +#define LDBL_MAX_EXP __LDBL_MAX_EXP__ + +/* Maximum integer such that 10 raised to that power is in the range of + representable finite floating-point numbers, + + floor(log10((1 - b**-p) * b**emax)) +*/ +#undef FLT_MAX_10_EXP +#undef DBL_MAX_10_EXP +#undef LDBL_MAX_10_EXP +#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__ +#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__ +#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__ + +/* Maximum representable finite floating-point number, + + (1 - b**-p) * b**emax +*/ +#undef FLT_MAX +#undef DBL_MAX +#undef LDBL_MAX +#define FLT_MAX __FLT_MAX__ +#define DBL_MAX __DBL_MAX__ +#define LDBL_MAX __LDBL_MAX__ + +/* The difference between 1 and the least value greater than 1 that is + representable in the given floating point type, b**1-p. */ +#undef FLT_EPSILON +#undef DBL_EPSILON +#undef LDBL_EPSILON +#define FLT_EPSILON __FLT_EPSILON__ +#define DBL_EPSILON __DBL_EPSILON__ +#define LDBL_EPSILON __LDBL_EPSILON__ + +/* Minimum normalized positive floating-point number, b**(emin - 1). */ +#undef FLT_MIN +#undef DBL_MIN +#undef LDBL_MIN +#define FLT_MIN __FLT_MIN__ +#define DBL_MIN __DBL_MIN__ +#define LDBL_MIN __LDBL_MIN__ + +/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */ +/* ??? This is supposed to change with calls to fesetround in . */ +#undef FLT_ROUNDS +#define FLT_ROUNDS 1 + +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ + || (defined (__cplusplus) && __cplusplus >= 201103L) +/* The floating-point expression evaluation method. The precise + definitions of these values are generalised to include support for + the interchange and extended types defined in ISO/IEC TS 18661-3. + Prior to this (for C99/C11) the definitions were: + + -1 indeterminate + 0 evaluate all operations and constants just to the range and + precision of the type + 1 evaluate operations and constants of type float and double + to the range and precision of the double type, evaluate + long double operations and constants to the range and + precision of the long double type + 2 evaluate all operations and constants to the range and + precision of the long double type + + The TS 18661-3 definitions are: + + -1 indeterminate + 0 evaluate all operations and constants, whose semantic type has + at most the range and precision of float, to the range and + precision of float; evaluate all other operations and constants + to the range and precision of the semantic type. + 1 evaluate all operations and constants, whose semantic type has + at most the range and precision of double, to the range and + precision of double; evaluate all other operations and constants + to the range and precision of the semantic type. + 2 evaluate all operations and constants, whose semantic type has + at most the range and precision of long double, to the range and + precision of long double; evaluate all other operations and + constants to the range and precision of the semantic type. + N where _FloatN is a supported interchange floating type + evaluate all operations and constants, whose semantic type has + at most the range and precision of the _FloatN type, to the + range and precision of the _FloatN type; evaluate all other + operations and constants to the range and precision of the + semantic type. + N + 1, where _FloatNx is a supported extended floating type + evaluate operations and constants, whose semantic type has at + most the range and precision of the _FloatNx type, to the range + and precision of the _FloatNx type; evaluate all other + operations and constants to the range and precision of the + semantic type. + + The compiler predefines two macros: + + __FLT_EVAL_METHOD__ + Which, depending on the value given for + -fpermitted-flt-eval-methods, may be limited to only those values + for FLT_EVAL_METHOD defined in C99/C11. + + __FLT_EVAL_METHOD_TS_18661_3__ + Which always permits the values for FLT_EVAL_METHOD defined in + ISO/IEC TS 18661-3. + + Here we want to use __FLT_EVAL_METHOD__, unless + __STDC_WANT_IEC_60559_TYPES_EXT__ is defined, in which case the user + is specifically asking for the ISO/IEC TS 18661-3 types, so we use + __FLT_EVAL_METHOD_TS_18661_3__. + + ??? This ought to change with the setting of the fp control word; + the value provided by the compiler assumes the widest setting. */ +#undef FLT_EVAL_METHOD +#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__ +#define FLT_EVAL_METHOD __FLT_EVAL_METHOD_TS_18661_3__ +#else +#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ +#endif + +/* Number of decimal digits, n, such that any floating-point number in the + widest supported floating type with pmax radix b digits can be rounded + to a floating-point number with n decimal digits and back again without + change to the value, + + pmax * log10(b) if b is a power of 10 + ceil(1 + pmax * log10(b)) otherwise +*/ +#undef DECIMAL_DIG +#define DECIMAL_DIG __DECIMAL_DIG__ + +#endif /* C99 */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +/* Versions of DECIMAL_DIG for each floating-point type. */ +#undef FLT_DECIMAL_DIG +#undef DBL_DECIMAL_DIG +#undef LDBL_DECIMAL_DIG +#define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__ +#define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__ +#define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__ + +/* Whether types support subnormal numbers. */ +#undef FLT_HAS_SUBNORM +#undef DBL_HAS_SUBNORM +#undef LDBL_HAS_SUBNORM +#define FLT_HAS_SUBNORM __FLT_HAS_DENORM__ +#define DBL_HAS_SUBNORM __DBL_HAS_DENORM__ +#define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__ + +/* Minimum positive values, including subnormals. */ +#undef FLT_TRUE_MIN +#undef DBL_TRUE_MIN +#undef LDBL_TRUE_MIN +#define FLT_TRUE_MIN __FLT_DENORM_MIN__ +#define DBL_TRUE_MIN __DBL_DENORM_MIN__ +#define LDBL_TRUE_MIN __LDBL_DENORM_MIN__ + +#endif /* C11 */ + +#ifdef __STDC_WANT_IEC_60559_BFP_EXT__ +/* Number of decimal digits for which conversions between decimal + character strings and binary formats, in both directions, are + correctly rounded. */ +#define CR_DECIMAL_DIG __UINTMAX_MAX__ +#endif + +#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__ +/* Constants for _FloatN and _FloatNx types from TS 18661-3. See + comments above for their semantics. */ + +#ifdef __FLT16_MANT_DIG__ +#undef FLT16_MANT_DIG +#define FLT16_MANT_DIG __FLT16_MANT_DIG__ +#undef FLT16_DIG +#define FLT16_DIG __FLT16_DIG__ +#undef FLT16_MIN_EXP +#define FLT16_MIN_EXP __FLT16_MIN_EXP__ +#undef FLT16_MIN_10_EXP +#define FLT16_MIN_10_EXP __FLT16_MIN_10_EXP__ +#undef FLT16_MAX_EXP +#define FLT16_MAX_EXP __FLT16_MAX_EXP__ +#undef FLT16_MAX_10_EXP +#define FLT16_MAX_10_EXP __FLT16_MAX_10_EXP__ +#undef FLT16_MAX +#define FLT16_MAX __FLT16_MAX__ +#undef FLT16_EPSILON +#define FLT16_EPSILON __FLT16_EPSILON__ +#undef FLT16_MIN +#define FLT16_MIN __FLT16_MIN__ +#undef FLT16_DECIMAL_DIG +#define FLT16_DECIMAL_DIG __FLT16_DECIMAL_DIG__ +#undef FLT16_TRUE_MIN +#define FLT16_TRUE_MIN __FLT16_DENORM_MIN__ +#endif /* __FLT16_MANT_DIG__. */ + +#ifdef __FLT32_MANT_DIG__ +#undef FLT32_MANT_DIG +#define FLT32_MANT_DIG __FLT32_MANT_DIG__ +#undef FLT32_DIG +#define FLT32_DIG __FLT32_DIG__ +#undef FLT32_MIN_EXP +#define FLT32_MIN_EXP __FLT32_MIN_EXP__ +#undef FLT32_MIN_10_EXP +#define FLT32_MIN_10_EXP __FLT32_MIN_10_EXP__ +#undef FLT32_MAX_EXP +#define FLT32_MAX_EXP __FLT32_MAX_EXP__ +#undef FLT32_MAX_10_EXP +#define FLT32_MAX_10_EXP __FLT32_MAX_10_EXP__ +#undef FLT32_MAX +#define FLT32_MAX __FLT32_MAX__ +#undef FLT32_EPSILON +#define FLT32_EPSILON __FLT32_EPSILON__ +#undef FLT32_MIN +#define FLT32_MIN __FLT32_MIN__ +#undef FLT32_DECIMAL_DIG +#define FLT32_DECIMAL_DIG __FLT32_DECIMAL_DIG__ +#undef FLT32_TRUE_MIN +#define FLT32_TRUE_MIN __FLT32_DENORM_MIN__ +#endif /* __FLT32_MANT_DIG__. */ + +#ifdef __FLT64_MANT_DIG__ +#undef FLT64_MANT_DIG +#define FLT64_MANT_DIG __FLT64_MANT_DIG__ +#undef FLT64_DIG +#define FLT64_DIG __FLT64_DIG__ +#undef FLT64_MIN_EXP +#define FLT64_MIN_EXP __FLT64_MIN_EXP__ +#undef FLT64_MIN_10_EXP +#define FLT64_MIN_10_EXP __FLT64_MIN_10_EXP__ +#undef FLT64_MAX_EXP +#define FLT64_MAX_EXP __FLT64_MAX_EXP__ +#undef FLT64_MAX_10_EXP +#define FLT64_MAX_10_EXP __FLT64_MAX_10_EXP__ +#undef FLT64_MAX +#define FLT64_MAX __FLT64_MAX__ +#undef FLT64_EPSILON +#define FLT64_EPSILON __FLT64_EPSILON__ +#undef FLT64_MIN +#define FLT64_MIN __FLT64_MIN__ +#undef FLT64_DECIMAL_DIG +#define FLT64_DECIMAL_DIG __FLT64_DECIMAL_DIG__ +#undef FLT64_TRUE_MIN +#define FLT64_TRUE_MIN __FLT64_DENORM_MIN__ +#endif /* __FLT64_MANT_DIG__. */ + +#ifdef __FLT128_MANT_DIG__ +#undef FLT128_MANT_DIG +#define FLT128_MANT_DIG __FLT128_MANT_DIG__ +#undef FLT128_DIG +#define FLT128_DIG __FLT128_DIG__ +#undef FLT128_MIN_EXP +#define FLT128_MIN_EXP __FLT128_MIN_EXP__ +#undef FLT128_MIN_10_EXP +#define FLT128_MIN_10_EXP __FLT128_MIN_10_EXP__ +#undef FLT128_MAX_EXP +#define FLT128_MAX_EXP __FLT128_MAX_EXP__ +#undef FLT128_MAX_10_EXP +#define FLT128_MAX_10_EXP __FLT128_MAX_10_EXP__ +#undef FLT128_MAX +#define FLT128_MAX __FLT128_MAX__ +#undef FLT128_EPSILON +#define FLT128_EPSILON __FLT128_EPSILON__ +#undef FLT128_MIN +#define FLT128_MIN __FLT128_MIN__ +#undef FLT128_DECIMAL_DIG +#define FLT128_DECIMAL_DIG __FLT128_DECIMAL_DIG__ +#undef FLT128_TRUE_MIN +#define FLT128_TRUE_MIN __FLT128_DENORM_MIN__ +#endif /* __FLT128_MANT_DIG__. */ + +#ifdef __FLT32X_MANT_DIG__ +#undef FLT32X_MANT_DIG +#define FLT32X_MANT_DIG __FLT32X_MANT_DIG__ +#undef FLT32X_DIG +#define FLT32X_DIG __FLT32X_DIG__ +#undef FLT32X_MIN_EXP +#define FLT32X_MIN_EXP __FLT32X_MIN_EXP__ +#undef FLT32X_MIN_10_EXP +#define FLT32X_MIN_10_EXP __FLT32X_MIN_10_EXP__ +#undef FLT32X_MAX_EXP +#define FLT32X_MAX_EXP __FLT32X_MAX_EXP__ +#undef FLT32X_MAX_10_EXP +#define FLT32X_MAX_10_EXP __FLT32X_MAX_10_EXP__ +#undef FLT32X_MAX +#define FLT32X_MAX __FLT32X_MAX__ +#undef FLT32X_EPSILON +#define FLT32X_EPSILON __FLT32X_EPSILON__ +#undef FLT32X_MIN +#define FLT32X_MIN __FLT32X_MIN__ +#undef FLT32X_DECIMAL_DIG +#define FLT32X_DECIMAL_DIG __FLT32X_DECIMAL_DIG__ +#undef FLT32X_TRUE_MIN +#define FLT32X_TRUE_MIN __FLT32X_DENORM_MIN__ +#endif /* __FLT32X_MANT_DIG__. */ + +#ifdef __FLT64X_MANT_DIG__ +#undef FLT64X_MANT_DIG +#define FLT64X_MANT_DIG __FLT64X_MANT_DIG__ +#undef FLT64X_DIG +#define FLT64X_DIG __FLT64X_DIG__ +#undef FLT64X_MIN_EXP +#define FLT64X_MIN_EXP __FLT64X_MIN_EXP__ +#undef FLT64X_MIN_10_EXP +#define FLT64X_MIN_10_EXP __FLT64X_MIN_10_EXP__ +#undef FLT64X_MAX_EXP +#define FLT64X_MAX_EXP __FLT64X_MAX_EXP__ +#undef FLT64X_MAX_10_EXP +#define FLT64X_MAX_10_EXP __FLT64X_MAX_10_EXP__ +#undef FLT64X_MAX +#define FLT64X_MAX __FLT64X_MAX__ +#undef FLT64X_EPSILON +#define FLT64X_EPSILON __FLT64X_EPSILON__ +#undef FLT64X_MIN +#define FLT64X_MIN __FLT64X_MIN__ +#undef FLT64X_DECIMAL_DIG +#define FLT64X_DECIMAL_DIG __FLT64X_DECIMAL_DIG__ +#undef FLT64X_TRUE_MIN +#define FLT64X_TRUE_MIN __FLT64X_DENORM_MIN__ +#endif /* __FLT64X_MANT_DIG__. */ + +#ifdef __FLT128X_MANT_DIG__ +#undef FLT128X_MANT_DIG +#define FLT128X_MANT_DIG __FLT128X_MANT_DIG__ +#undef FLT128X_DIG +#define FLT128X_DIG __FLT128X_DIG__ +#undef FLT128X_MIN_EXP +#define FLT128X_MIN_EXP __FLT128X_MIN_EXP__ +#undef FLT128X_MIN_10_EXP +#define FLT128X_MIN_10_EXP __FLT128X_MIN_10_EXP__ +#undef FLT128X_MAX_EXP +#define FLT128X_MAX_EXP __FLT128X_MAX_EXP__ +#undef FLT128X_MAX_10_EXP +#define FLT128X_MAX_10_EXP __FLT128X_MAX_10_EXP__ +#undef FLT128X_MAX +#define FLT128X_MAX __FLT128X_MAX__ +#undef FLT128X_EPSILON +#define FLT128X_EPSILON __FLT128X_EPSILON__ +#undef FLT128X_MIN +#define FLT128X_MIN __FLT128X_MIN__ +#undef FLT128X_DECIMAL_DIG +#define FLT128X_DECIMAL_DIG __FLT128X_DECIMAL_DIG__ +#undef FLT128X_TRUE_MIN +#define FLT128X_TRUE_MIN __FLT128X_DENORM_MIN__ +#endif /* __FLT128X_MANT_DIG__. */ + +#endif /* __STDC_WANT_IEC_60559_TYPES_EXT__. */ + +#ifdef __STDC_WANT_DEC_FP__ +/* Draft Technical Report 24732, extension for decimal floating-point + arithmetic: Characteristic of decimal floating types . */ + +/* Number of base-FLT_RADIX digits in the significand, p. */ +#undef DEC32_MANT_DIG +#undef DEC64_MANT_DIG +#undef DEC128_MANT_DIG +#define DEC32_MANT_DIG __DEC32_MANT_DIG__ +#define DEC64_MANT_DIG __DEC64_MANT_DIG__ +#define DEC128_MANT_DIG __DEC128_MANT_DIG__ + +/* Minimum exponent. */ +#undef DEC32_MIN_EXP +#undef DEC64_MIN_EXP +#undef DEC128_MIN_EXP +#define DEC32_MIN_EXP __DEC32_MIN_EXP__ +#define DEC64_MIN_EXP __DEC64_MIN_EXP__ +#define DEC128_MIN_EXP __DEC128_MIN_EXP__ + +/* Maximum exponent. */ +#undef DEC32_MAX_EXP +#undef DEC64_MAX_EXP +#undef DEC128_MAX_EXP +#define DEC32_MAX_EXP __DEC32_MAX_EXP__ +#define DEC64_MAX_EXP __DEC64_MAX_EXP__ +#define DEC128_MAX_EXP __DEC128_MAX_EXP__ + +/* Maximum representable finite decimal floating-point number + (there are 6, 15, and 33 9s after the decimal points respectively). */ +#undef DEC32_MAX +#undef DEC64_MAX +#undef DEC128_MAX +#define DEC32_MAX __DEC32_MAX__ +#define DEC64_MAX __DEC64_MAX__ +#define DEC128_MAX __DEC128_MAX__ + +/* The difference between 1 and the least value greater than 1 that is + representable in the given floating point type. */ +#undef DEC32_EPSILON +#undef DEC64_EPSILON +#undef DEC128_EPSILON +#define DEC32_EPSILON __DEC32_EPSILON__ +#define DEC64_EPSILON __DEC64_EPSILON__ +#define DEC128_EPSILON __DEC128_EPSILON__ + +/* Minimum normalized positive floating-point number. */ +#undef DEC32_MIN +#undef DEC64_MIN +#undef DEC128_MIN +#define DEC32_MIN __DEC32_MIN__ +#define DEC64_MIN __DEC64_MIN__ +#define DEC128_MIN __DEC128_MIN__ + +/* Minimum subnormal positive floating-point number. */ +#undef DEC32_SUBNORMAL_MIN +#undef DEC64_SUBNORMAL_MIN +#undef DEC128_SUBNORMAL_MIN +#define DEC32_SUBNORMAL_MIN __DEC32_SUBNORMAL_MIN__ +#define DEC64_SUBNORMAL_MIN __DEC64_SUBNORMAL_MIN__ +#define DEC128_SUBNORMAL_MIN __DEC128_SUBNORMAL_MIN__ + +/* The floating-point expression evaluation method. + -1 indeterminate + 0 evaluate all operations and constants just to the range and + precision of the type + 1 evaluate operations and constants of type _Decimal32 + and _Decimal64 to the range and precision of the _Decimal64 + type, evaluate _Decimal128 operations and constants to the + range and precision of the _Decimal128 type; + 2 evaluate all operations and constants to the range and + precision of the _Decimal128 type. */ + +#undef DEC_EVAL_METHOD +#define DEC_EVAL_METHOD __DEC_EVAL_METHOD__ + +#endif /* __STDC_WANT_DEC_FP__ */ + +#endif /* _FLOAT_H___ */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/gcov.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/gcov.h new file mode 100644 index 000000000..0333ecca8 --- /dev/null +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/gcov.h @@ -0,0 +1,41 @@ +/* GCOV interface routines. + Copyright (C) 2017 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 3, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +#ifndef GCC_GCOV_H +#define GCC_GCOV_H + +/* Set all counters to zero. */ + +extern void __gcov_reset (void); + +/* Write profile information to a file. */ + +extern void __gcov_dump (void); + +/* Write profile information to a file and reset counters to zero. + The function does operations under a mutex. */ + +extern void __gcov_flush (void); + +#endif /* GCC_GCOV_H */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/iso646.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/iso646.h similarity index 95% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/iso646.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/iso646.h index 73c677f13..5a6b50335 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/iso646.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/iso646.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/mmintrin.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/mmintrin.h similarity index 99% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/mmintrin.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/mmintrin.h index a4045afa0..704b54f21 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/mmintrin.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/mmintrin.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. +/* Copyright (C) 2002-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdalign.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdalign.h similarity index 95% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdalign.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdalign.h index 1615657ea..243d40e54 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdalign.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdalign.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2015 Free Software Foundation, Inc. +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdarg.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdarg.h similarity index 97% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdarg.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdarg.h index afc1cc5af..aa248be5d 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdarg.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdarg.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1989-2015 Free Software Foundation, Inc. +/* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -47,7 +47,8 @@ typedef __builtin_va_list __gnuc_va_list; #define va_start(v,l) __builtin_va_start(v,l) #define va_end(v) __builtin_va_end(v) #define va_arg(v,l) __builtin_va_arg(v,l) -#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L || defined(__GXX_EXPERIMENTAL_CXX0X__) +#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L \ + || __cplusplus + 0 >= 201103L #define va_copy(d,s) __builtin_va_copy(d,s) #endif #define __va_copy(d,s) __builtin_va_copy(d,s) diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdatomic.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdatomic.h similarity index 93% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdatomic.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdatomic.h index b961da217..fb29a142f 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdatomic.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdatomic.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2015 Free Software Foundation, Inc. +/* Copyright (C) 2013-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -77,12 +77,10 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t; #define ATOMIC_VAR_INIT(VALUE) (VALUE) -#define atomic_init(PTR, VAL) \ - do \ - { \ - *(PTR) = (VAL); \ - } \ - while (0) + +/* Initialize an atomic object pointed to by PTR with VAL. */ +#define atomic_init(PTR, VAL) \ + atomic_store_explicit (PTR, VAL, __ATOMIC_RELAXED) #define kill_dependency(Y) \ __extension__ \ @@ -91,7 +89,9 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t; __kill_dependency_tmp; \ }) +extern void atomic_thread_fence (memory_order); #define atomic_thread_fence(MO) __atomic_thread_fence (MO) +extern void atomic_signal_fence (memory_order); #define atomic_signal_fence(MO) __atomic_signal_fence (MO) #define atomic_is_lock_free(OBJ) __atomic_is_lock_free (sizeof (*(OBJ)), (OBJ)) @@ -227,12 +227,17 @@ typedef _Atomic struct #define ATOMIC_FLAG_INIT { 0 } +extern _Bool atomic_flag_test_and_set (volatile atomic_flag *); #define atomic_flag_test_and_set(PTR) \ __atomic_test_and_set ((PTR), __ATOMIC_SEQ_CST) +extern _Bool atomic_flag_test_and_set_explicit (volatile atomic_flag *, + memory_order); #define atomic_flag_test_and_set_explicit(PTR, MO) \ __atomic_test_and_set ((PTR), (MO)) +extern void atomic_flag_clear (volatile atomic_flag *); #define atomic_flag_clear(PTR) __atomic_clear ((PTR), __ATOMIC_SEQ_CST) +extern void atomic_flag_clear_explicit (volatile atomic_flag *, memory_order); #define atomic_flag_clear_explicit(PTR, MO) __atomic_clear ((PTR), (MO)) #endif /* _STDATOMIC_H */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdbool.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdbool.h similarity index 96% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdbool.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdbool.h index a95151028..a69fc3a44 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdbool.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdbool.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2015 Free Software Foundation, Inc. +/* Copyright (C) 1998-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stddef.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stddef.h similarity index 96% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stddef.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stddef.h index f20a41ba7..872f451ca 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stddef.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stddef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1989-2015 Free Software Foundation, Inc. +/* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -426,6 +426,14 @@ typedef __WINT_TYPE__ wint_t; typedef struct { long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); + /* _Float128 is defined as a basic type, so max_align_t must be + sufficiently aligned for it. This code must work in C++, so we + use __float128 here; that is only available on some + architectures, but only on i386 is extra alignment needed for + __float128. */ +#ifdef __i386__ + __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128)))); +#endif } max_align_t; #endif #endif /* C11 or C++11. */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdfix.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdfix.h similarity index 99% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdfix.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdfix.h index 5429fb877..9de1b72dc 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdfix.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdfix.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2015 Free Software Foundation, Inc. +/* Copyright (C) 2007-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdint-gcc.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdint-gcc.h similarity index 73% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdint-gcc.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdint-gcc.h index 9129427bb..0ee7e3523 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdint-gcc.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdint-gcc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2015 Free Software Foundation, Inc. +/* Copyright (C) 2008-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -260,4 +260,105 @@ typedef __UINTMAX_TYPE__ uintmax_t; #endif /* (!defined __cplusplus || __cplusplus >= 201103L || defined __STDC_CONSTANT_MACROS) */ +#ifdef __STDC_WANT_IEC_60559_BFP_EXT__ +/* TS 18661-1 widths of integer types. */ + +#ifdef __INT8_TYPE__ +# undef INT8_WIDTH +# define INT8_WIDTH 8 +#endif +#ifdef __UINT8_TYPE__ +# undef UINT8_WIDTH +# define UINT8_WIDTH 8 +#endif +#ifdef __INT16_TYPE__ +# undef INT16_WIDTH +# define INT16_WIDTH 16 +#endif +#ifdef __UINT16_TYPE__ +# undef UINT16_WIDTH +# define UINT16_WIDTH 16 +#endif +#ifdef __INT32_TYPE__ +# undef INT32_WIDTH +# define INT32_WIDTH 32 +#endif +#ifdef __UINT32_TYPE__ +# undef UINT32_WIDTH +# define UINT32_WIDTH 32 +#endif +#ifdef __INT64_TYPE__ +# undef INT64_WIDTH +# define INT64_WIDTH 64 +#endif +#ifdef __UINT64_TYPE__ +# undef UINT64_WIDTH +# define UINT64_WIDTH 64 +#endif + +#undef INT_LEAST8_WIDTH +#define INT_LEAST8_WIDTH __INT_LEAST8_WIDTH__ +#undef UINT_LEAST8_WIDTH +#define UINT_LEAST8_WIDTH __INT_LEAST8_WIDTH__ +#undef INT_LEAST16_WIDTH +#define INT_LEAST16_WIDTH __INT_LEAST16_WIDTH__ +#undef UINT_LEAST16_WIDTH +#define UINT_LEAST16_WIDTH __INT_LEAST16_WIDTH__ +#undef INT_LEAST32_WIDTH +#define INT_LEAST32_WIDTH __INT_LEAST32_WIDTH__ +#undef UINT_LEAST32_WIDTH +#define UINT_LEAST32_WIDTH __INT_LEAST32_WIDTH__ +#undef INT_LEAST64_WIDTH +#define INT_LEAST64_WIDTH __INT_LEAST64_WIDTH__ +#undef UINT_LEAST64_WIDTH +#define UINT_LEAST64_WIDTH __INT_LEAST64_WIDTH__ + +#undef INT_FAST8_WIDTH +#define INT_FAST8_WIDTH __INT_FAST8_WIDTH__ +#undef UINT_FAST8_WIDTH +#define UINT_FAST8_WIDTH __INT_FAST8_WIDTH__ +#undef INT_FAST16_WIDTH +#define INT_FAST16_WIDTH __INT_FAST16_WIDTH__ +#undef UINT_FAST16_WIDTH +#define UINT_FAST16_WIDTH __INT_FAST16_WIDTH__ +#undef INT_FAST32_WIDTH +#define INT_FAST32_WIDTH __INT_FAST32_WIDTH__ +#undef UINT_FAST32_WIDTH +#define UINT_FAST32_WIDTH __INT_FAST32_WIDTH__ +#undef INT_FAST64_WIDTH +#define INT_FAST64_WIDTH __INT_FAST64_WIDTH__ +#undef UINT_FAST64_WIDTH +#define UINT_FAST64_WIDTH __INT_FAST64_WIDTH__ + +#ifdef __INTPTR_TYPE__ +# undef INTPTR_WIDTH +# define INTPTR_WIDTH __INTPTR_WIDTH__ +#endif +#ifdef __UINTPTR_TYPE__ +# undef UINTPTR_WIDTH +# define UINTPTR_WIDTH __INTPTR_WIDTH__ +#endif + +#undef INTMAX_WIDTH +#define INTMAX_WIDTH __INTMAX_WIDTH__ +#undef UINTMAX_WIDTH +#define UINTMAX_WIDTH __INTMAX_WIDTH__ + +#undef PTRDIFF_WIDTH +#define PTRDIFF_WIDTH __PTRDIFF_WIDTH__ + +#undef SIG_ATOMIC_WIDTH +#define SIG_ATOMIC_WIDTH __SIG_ATOMIC_WIDTH__ + +#undef SIZE_WIDTH +#define SIZE_WIDTH __SIZE_WIDTH__ + +#undef WCHAR_WIDTH +#define WCHAR_WIDTH __WCHAR_WIDTH__ + +#undef WINT_WIDTH +#define WINT_WIDTH __WINT_WIDTH__ + +#endif + #endif /* _GCC_STDINT_H */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdint.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdint.h similarity index 100% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdint.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdint.h diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdnoreturn.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdnoreturn.h similarity index 94% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdnoreturn.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdnoreturn.h index 8137eee0c..739c2e31f 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/stdnoreturn.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/stdnoreturn.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2015 Free Software Foundation, Inc. +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/tgmath.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/tgmath.h similarity index 99% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/tgmath.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/tgmath.h index dac0db2ce..be3f5be9d 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/tgmath.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/tgmath.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2015 Free Software Foundation, Inc. +/* Copyright (C) 2004-2017 Free Software Foundation, Inc. Contributed by Apple, Inc. This file is part of GCC. diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/unwind-arm-common.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/unwind-arm-common.h similarity index 99% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/unwind-arm-common.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/unwind-arm-common.h index 833786f01..abf50bafe 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/unwind-arm-common.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/unwind-arm-common.h @@ -1,5 +1,5 @@ /* Header file for the ARM EABI and C6X unwinders - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2017 Free Software Foundation, Inc. Contributed by Paul Brook This file is free software; you can redistribute it and/or modify it diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/unwind.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/unwind.h similarity index 98% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/unwind.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/unwind.h index f1f789c70..9fb854fd9 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/unwind.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/unwind.h @@ -1,5 +1,5 @@ /* Header file for the ARM EABI unwinder - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2017 Free Software Foundation, Inc. Contributed by Paul Brook This file is free software; you can redistribute it and/or modify it diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/varargs.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/varargs.h similarity index 100% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include/varargs.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/include/varargs.h diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/fixinc_list b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/fixinc_list similarity index 100% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/fixinc_list rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/fixinc_list diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/gsyslimits.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/gsyslimits.h similarity index 100% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/gsyslimits.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/gsyslimits.h diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/include/README b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/include/README similarity index 100% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/include/README rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/include/README diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include-fixed/limits.h b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/include/limits.h similarity index 86% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/include-fixed/limits.h rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/include/limits.h index aa2189f85..743481d78 100644 --- a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/include-fixed/limits.h +++ b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/include/limits.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2015 Free Software Foundation, Inc. +/* Copyright (C) 1992-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Use "..." so that we find syslimits.h only in this same directory. */ #include "syslimits.h" #endif -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -158,6 +158,32 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) #endif +#ifdef __STDC_WANT_IEC_60559_BFP_EXT__ +/* TS 18661-1 widths of integer types. */ +# undef CHAR_WIDTH +# define CHAR_WIDTH __SCHAR_WIDTH__ +# undef SCHAR_WIDTH +# define SCHAR_WIDTH __SCHAR_WIDTH__ +# undef UCHAR_WIDTH +# define UCHAR_WIDTH __SCHAR_WIDTH__ +# undef SHRT_WIDTH +# define SHRT_WIDTH __SHRT_WIDTH__ +# undef USHRT_WIDTH +# define USHRT_WIDTH __SHRT_WIDTH__ +# undef INT_WIDTH +# define INT_WIDTH __INT_WIDTH__ +# undef UINT_WIDTH +# define UINT_WIDTH __INT_WIDTH__ +# undef LONG_WIDTH +# define LONG_WIDTH __LONG_WIDTH__ +# undef ULONG_WIDTH +# define ULONG_WIDTH __LONG_WIDTH__ +# undef LLONG_WIDTH +# define LLONG_WIDTH __LONG_LONG_WIDTH__ +# undef ULLONG_WIDTH +# define ULLONG_WIDTH __LONG_LONG_WIDTH__ +#endif + #endif /* _LIMITS_H___ */ /* This administrivia gets added to the end of limits.h if the system has its own version of limits.h. */ diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/macro_list b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/macro_list similarity index 100% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/macro_list rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/macro_list diff --git a/devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/mkheaders.conf b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/mkheaders.conf similarity index 100% rename from devkitARM/lib/gcc/arm-none-eabi/5.3.0/install-tools/mkheaders.conf rename to devkitARM/lib/gcc/arm-none-eabi/7.1.0/install-tools/mkheaders.conf diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/libgcc.a b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/libgcc.a new file mode 100644 index 000000000..22706d250 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/libgcc.a differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/libgcov.a b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/libgcov.a new file mode 100644 index 000000000..6eaa754ec Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/libgcov.a differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtbegin.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtbegin.o new file mode 100644 index 000000000..d2c179b2c Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtbegin.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtend.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtend.o new file mode 100644 index 000000000..f9c88a8cc Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtend.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtfastmath.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtfastmath.o new file mode 100644 index 000000000..ef9c9748b Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtfastmath.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crti.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crti.o new file mode 100644 index 000000000..34d36b680 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crti.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtn.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtn.o new file mode 100644 index 000000000..d0adfb0cb Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/crtn.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/libgcc.a b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/libgcc.a new file mode 100644 index 000000000..4d8f1af57 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/libgcc.a differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/libgcov.a b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/libgcov.a new file mode 100644 index 000000000..2fc1b8f59 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/be/libgcov.a differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtbegin.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtbegin.o new file mode 100644 index 000000000..a9d29a535 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtbegin.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtend.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtend.o new file mode 100644 index 000000000..f75c2c7a9 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtend.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtfastmath.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtfastmath.o new file mode 100644 index 000000000..92c776ef3 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtfastmath.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crti.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crti.o new file mode 100644 index 000000000..90b090888 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crti.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtn.o b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtn.o new file mode 100644 index 000000000..352f8c92a Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/crtn.o differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/libgcc.a b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/libgcc.a new file mode 100644 index 000000000..e9a6fa48f Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/libgcc.a differ diff --git a/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/libgcov.a b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/libgcov.a new file mode 100644 index 000000000..38c7ea724 Binary files /dev/null and b/devkitARM/lib/gcc/arm-none-eabi/7.1.0/thumb/libgcov.a differ diff --git a/devkitARM/lib/libarm-none-eabi-sim.a b/devkitARM/lib/libarm-none-eabi-sim.a index 3083e2a75..c2f1849dd 100644 Binary files a/devkitARM/lib/libarm-none-eabi-sim.a and b/devkitARM/lib/libarm-none-eabi-sim.a differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1obj.exe b/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1obj.exe deleted file mode 100644 index ce14856d7..000000000 Binary files a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1obj.exe and /dev/null differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/collect2.exe b/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/collect2.exe deleted file mode 100644 index 39c46bf3d..000000000 Binary files a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/collect2.exe and /dev/null differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/fixincl.exe b/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/fixincl.exe deleted file mode 100644 index f73536010..000000000 Binary files a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/fixincl.exe and /dev/null differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/liblto_plugin-0.dll b/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/liblto_plugin-0.dll deleted file mode 100644 index 1a30b1645..000000000 Binary files a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/liblto_plugin-0.dll and /dev/null differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/lto-wrapper.exe b/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/lto-wrapper.exe deleted file mode 100644 index cc490aa6b..000000000 Binary files a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/lto-wrapper.exe and /dev/null differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/lto1.exe b/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/lto1.exe deleted file mode 100644 index d40d2d80e..000000000 Binary files a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/lto1.exe and /dev/null differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1plus.exe b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/cc1.exe similarity index 67% rename from devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1plus.exe rename to devkitARM/libexec/gcc/arm-none-eabi/7.1.0/cc1.exe index c709854ff..c6e0a2321 100644 Binary files a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1plus.exe and b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/cc1.exe differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1objplus.exe b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/cc1plus.exe similarity index 67% rename from devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1objplus.exe rename to devkitARM/libexec/gcc/arm-none-eabi/7.1.0/cc1plus.exe index 81a81d503..e4fb5f674 100644 Binary files a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1objplus.exe and b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/cc1plus.exe differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/collect2.exe b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/collect2.exe new file mode 100644 index 000000000..40229a46d Binary files /dev/null and b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/collect2.exe differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/fixinc.sh b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/fixinc.sh similarity index 99% rename from devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/fixinc.sh rename to devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/fixinc.sh index f7b8d8f1e..15cbaa235 100644 --- a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/fixinc.sh +++ b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/fixinc.sh @@ -41,7 +41,7 @@ shift # Make sure it exists. if [ ! -d $LIB ]; then - mkdir $LIB || { + mkdir -p $LIB || { echo fixincludes: output dir '`'$LIB"' cannot be created" exit 1 } diff --git a/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/fixincl.exe b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/fixincl.exe new file mode 100644 index 000000000..3ef9eb1a4 Binary files /dev/null and b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/fixincl.exe differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/mkheaders b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/mkheaders similarity index 99% rename from devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/mkheaders rename to devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/mkheaders index c1fcddbed..ecddba3a7 100644 --- a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/mkheaders +++ b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/mkheaders @@ -21,7 +21,7 @@ # Basic information target=arm-none-eabi target_noncanonical=arm-none-eabi -version=5.3.0 +version=7.1.0 VERBOSE=0 while [ x$1 = x-v ] ; do diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/mkinstalldirs b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/mkinstalldirs similarity index 100% rename from devkitARM/libexec/gcc/arm-none-eabi/5.3.0/install-tools/mkinstalldirs rename to devkitARM/libexec/gcc/arm-none-eabi/7.1.0/install-tools/mkinstalldirs diff --git a/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/liblto_plugin-0.dll b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/liblto_plugin-0.dll new file mode 100644 index 000000000..8fb9d5a59 Binary files /dev/null and b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/liblto_plugin-0.dll differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/liblto_plugin.dll.a b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/liblto_plugin.dll.a similarity index 80% rename from devkitARM/libexec/gcc/arm-none-eabi/5.3.0/liblto_plugin.dll.a rename to devkitARM/libexec/gcc/arm-none-eabi/7.1.0/liblto_plugin.dll.a index 4793466a3..5c8705234 100644 Binary files a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/liblto_plugin.dll.a and b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/liblto_plugin.dll.a differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/liblto_plugin.la b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/liblto_plugin.la similarity index 98% rename from devkitARM/libexec/gcc/arm-none-eabi/5.3.0/liblto_plugin.la rename to devkitARM/libexec/gcc/arm-none-eabi/7.1.0/liblto_plugin.la index 38383dc56..5caffbb16 100644 --- a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/liblto_plugin.la +++ b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/liblto_plugin.la @@ -38,4 +38,4 @@ dlopen='' dlpreopen='' # Directory that this library needs to be installed in: -libdir='/opt/devkitpro/i686-w64-mingw32/devkitARM/libexec/gcc/arm-none-eabi/5.3.0' +libdir='/opt/devkitpro/i686-w64-mingw32/devkitARM/libexec/gcc/arm-none-eabi/7.1.0' diff --git a/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/lto-wrapper.exe b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/lto-wrapper.exe new file mode 100644 index 000000000..76946e8dc Binary files /dev/null and b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/lto-wrapper.exe differ diff --git a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1.exe b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/lto1.exe similarity index 66% rename from devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1.exe rename to devkitARM/libexec/gcc/arm-none-eabi/7.1.0/lto1.exe index 294f53176..2d9e1f8ca 100644 Binary files a/devkitARM/libexec/gcc/arm-none-eabi/5.3.0/cc1.exe and b/devkitARM/libexec/gcc/arm-none-eabi/7.1.0/lto1.exe differ diff --git a/devkitARM/share/gcc-5.3.0/python/libstdcxx/__init__.py b/devkitARM/share/gcc-7.1.0/python/libstdcxx/__init__.py similarity index 100% rename from devkitARM/share/gcc-5.3.0/python/libstdcxx/__init__.py rename to devkitARM/share/gcc-7.1.0/python/libstdcxx/__init__.py diff --git a/devkitARM/share/gcc-5.3.0/python/libstdcxx/v6/__init__.py b/devkitARM/share/gcc-7.1.0/python/libstdcxx/v6/__init__.py similarity index 95% rename from devkitARM/share/gcc-5.3.0/python/libstdcxx/v6/__init__.py rename to devkitARM/share/gcc-7.1.0/python/libstdcxx/v6/__init__.py index d8e060c80..7c89f3c45 100644 --- a/devkitARM/share/gcc-5.3.0/python/libstdcxx/v6/__init__.py +++ b/devkitARM/share/gcc-7.1.0/python/libstdcxx/v6/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014-2015 Free Software Foundation, Inc. +# Copyright (C) 2014-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/devkitARM/share/gcc-5.3.0/python/libstdcxx/v6/printers.py b/devkitARM/share/gcc-7.1.0/python/libstdcxx/v6/printers.py similarity index 80% rename from devkitARM/share/gcc-5.3.0/python/libstdcxx/v6/printers.py rename to devkitARM/share/gcc-7.1.0/python/libstdcxx/v6/printers.py index 51bd03a3a..a67b27ab7 100644 --- a/devkitARM/share/gcc-5.3.0/python/libstdcxx/v6/printers.py +++ b/devkitARM/share/gcc-7.1.0/python/libstdcxx/v6/printers.py @@ -1,6 +1,6 @@ # Pretty-printers for libstdc++. -# Copyright (C) 2008-2015 Free Software Foundation, Inc. +# Copyright (C) 2008-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -85,9 +85,8 @@ except ImportError: def find_type(orig, name): typ = orig.strip_typedefs() while True: - # Use typ.name here instead of str(typ) to discard any const,etc. - # qualifiers. PR 67440. - search = typ.name + '::' + name + # Strip cv-qualifiers. PR 67440. + search = '%s::%s' % (typ.unqualified(), name) try: return gdb.lookup_type(search) except RuntimeError: @@ -100,11 +99,26 @@ def find_type(orig, name): raise ValueError("Cannot find type %s::%s" % (str(orig), name)) typ = field.type +_versioned_namespace = '__7::' + +# Test if a type is a given template instantiation. +def is_specialization_of(type, template_name): + global _versioned_namespace + if _versioned_namespace: + return re.match('^std::(%s)?%s<.*>$' % (_versioned_namespace, template_name), type) is not None + return re.match('^std::%s<.*>$' % template_name, type) is not None + +def strip_versioned_namespace(typename): + global _versioned_namespace + if _versioned_namespace: + return typename.replace(_versioned_namespace, '') + return typename + class SharedPointerPrinter: "Print a shared_ptr or weak_ptr" def __init__ (self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val def to_string (self): @@ -126,9 +140,34 @@ class UniquePointerPrinter: self.val = val def to_string (self): - v = self.val['_M_t']['_M_head_impl'] - return ('std::unique_ptr<%s> containing %s' % (str(v.type.target()), - str(v))) + impl_type = self.val.type.fields()[0].type.tag + if is_specialization_of(impl_type, '__uniq_ptr_impl'): # New implementation + v = self.val['_M_t']['_M_t']['_M_head_impl'] + elif is_specialization_of(impl_type, 'tuple'): + v = self.val['_M_t']['_M_head_impl'] + else: + raise ValueError("Unsupported implementation for unique_ptr: %s" % self.val.type.fields()[0].type.tag) + return 'std::unique_ptr<%s> containing %s' % (str(v.type.target()), + str(v)) + +def get_value_from_aligned_membuf(buf, valtype): + """Returns the value held in a __gnu_cxx::__aligned_membuf.""" + return buf['_M_storage'].address.cast(valtype.pointer()).dereference() + +def get_value_from_list_node(node): + """Returns the value held in an _List_node<_Val>""" + try: + member = node.type.fields()[1].name + if member == '_M_data': + # C++03 implementation, node contains the value as a member + return node['_M_data'] + elif member == '_M_storage': + # C++11 implementation, node stores value in __aligned_membuf + valtype = node.type.template_argument(0) + return get_value_from_aligned_membuf(node['_M_storage'], valtype) + except: + pass + raise ValueError("Unsupported implementation for %s" % str(node.type)) class StdListPrinter: "Print a std::list" @@ -150,10 +189,11 @@ class StdListPrinter: self.base = elt['_M_next'] count = self.count self.count = self.count + 1 - return ('[%d]' % count, elt['_M_data']) + val = get_value_from_list_node(elt) + return ('[%d]' % count, val) def __init__(self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val def children(self): @@ -174,9 +214,12 @@ class StdListIteratorPrinter: self.typename = typename def to_string(self): + if not self.val['_M_node']: + return 'non-dereferenceable iterator for std::list' nodetype = find_type(self.val.type, '_Node') nodetype = nodetype.strip_typedefs().pointer() - return self.val['_M_node'].cast(nodetype).dereference()['_M_data'] + node = self.val['_M_node'].cast(nodetype).dereference() + return str(get_value_from_list_node(node)) class StdSlistPrinter: "Print a __gnu_cxx::slist" @@ -219,9 +262,11 @@ class StdSlistIteratorPrinter: self.val = val def to_string(self): + if not self.val['_M_node']: + return 'non-dereferenceable iterator for __gnu_cxx::slist' nodetype = find_type(self.val.type, '_Node') nodetype = nodetype.strip_typedefs().pointer() - return self.val['_M_node'].cast(nodetype).dereference()['_M_data'] + return str(self.val['_M_node'].cast(nodetype).dereference()['_M_data']) class StdVectorPrinter: "Print a std::vector" @@ -268,7 +313,7 @@ class StdVectorPrinter: return ('[%d]' % count, elt) def __init__(self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val self.is_bool = val.type.template_argument(0).code == gdb.TYPE_CODE_BOOL @@ -306,7 +351,9 @@ class StdVectorIteratorPrinter: self.val = val def to_string(self): - return self.val['_M_current'].dereference() + if not self.val['_M_current']: + return 'non-dereferenceable iterator for std::vector' + return str(self.val['_M_current'].dereference()) class StdTuplePrinter: "Print a std::tuple" @@ -370,7 +417,7 @@ class StdTuplePrinter: return ('[%d]' % self.count, impl['_M_head_impl']) def __init__ (self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val; def children (self): @@ -385,7 +432,7 @@ class StdStackOrQueuePrinter: "Print a std::stack or std::queue" def __init__ (self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.visualizer = gdb.default_visualizer(val['c']) def children (self): @@ -401,6 +448,11 @@ class StdStackOrQueuePrinter: return None class RbtreeIterator(Iterator): + """ + Turn an RB-tree-based container (std::map, std::set etc.) into + a Python iterable object. + """ + def __init__(self, rbtree): self.size = rbtree['_M_t']['_M_impl']['_M_node_count'] self.node = rbtree['_M_t']['_M_impl']['_M_header']['_M_left'] @@ -442,10 +494,9 @@ def get_value_from_Rb_tree_node(node): # C++03 implementation, node contains the value as a member return node['_M_value_field'] elif member == '_M_storage': - # C++11 implementation, node stores value in __aligned_buffer - p = node['_M_storage']['_M_storage'].address - p = p.cast(node.type.template_argument(0).pointer()) - return p.dereference() + # C++11 implementation, node stores value in __aligned_membuf + valtype = node.type.template_argument(0) + return get_value_from_aligned_membuf(node['_M_storage'], valtype) except: pass raise ValueError("Unsupported implementation for %s" % str(node.type)) @@ -454,17 +505,22 @@ def get_value_from_Rb_tree_node(node): # std::map::iterator), and has nothing to do with the RbtreeIterator # class above. class StdRbtreeIteratorPrinter: - "Print std::map::iterator" + "Print std::map::iterator, std::set::iterator, etc." def __init__ (self, typename, val): self.val = val valtype = self.val.type.template_argument(0).strip_typedefs() - nodetype = gdb.lookup_type('std::_Rb_tree_node<' + str(valtype) + '>') + nodetype = '_Rb_tree_node<' + str(valtype) + '>' + if _versioned_namespace and typename.startswith('std::' + _versioned_namespace): + nodetype = _versioned_namespace + nodetype + nodetype = gdb.lookup_type('std::' + nodetype) self.link_type = nodetype.strip_typedefs().pointer() def to_string (self): + if not self.val['_M_node']: + return 'non-dereferenceable iterator for associative container' node = self.val['_M_node'].cast(self.link_type).dereference() - return get_value_from_Rb_tree_node(node) + return str(get_value_from_Rb_tree_node(node)) class StdDebugIteratorPrinter: "Print a debug enabled version of an iterator" @@ -475,8 +531,16 @@ class StdDebugIteratorPrinter: # Just strip away the encapsulating __gnu_debug::_Safe_iterator # and return the wrapped iterator value. def to_string (self): + base_type = gdb.lookup_type('__gnu_debug::_Safe_iterator_base') + safe_seq = self.val.cast(base_type)['_M_sequence'] + if not safe_seq or self.val['_M_version'] != safe_seq['_M_version']: + return "invalid iterator" itype = self.val.type.template_argument(0) - return self.val.cast(itype) + return str(self.val.cast(itype)) + +def num_elements(num): + """Return either "1 element" or "N elements" depending on the argument.""" + return '1 element' if num == 1 else '%d elements' % num class StdMapPrinter: "Print a std::map or std::multimap" @@ -505,12 +569,12 @@ class StdMapPrinter: return result def __init__ (self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val def to_string (self): - return '%s with %d elements' % (self.typename, - len (RbtreeIterator (self.val))) + return '%s with %s' % (self.typename, + num_elements(len(RbtreeIterator (self.val)))) def children (self): rep_type = find_type(self.val.type, '_Rep_type') @@ -545,12 +609,12 @@ class StdSetPrinter: return result def __init__ (self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val def to_string (self): - return '%s with %d elements' % (self.typename, - len (RbtreeIterator (self.val))) + return '%s with %s' % (self.typename, + num_elements(len(RbtreeIterator (self.val)))) def children (self): rep_type = find_type(self.val.type, '_Rep_type') @@ -562,7 +626,7 @@ class StdBitsetPrinter: "Print a std::bitset" def __init__(self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val def to_string (self): @@ -632,7 +696,7 @@ class StdDequePrinter: return result def __init__(self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val self.elttype = val.type.template_argument(0) size = self.elttype.sizeof @@ -651,7 +715,7 @@ class StdDequePrinter: size = self.buffer_size * delta_n + delta_s + delta_e - return '%s with %d elements' % (self.typename, long (size)) + return '%s with %s' % (self.typename, num_elements(long(size))) def children(self): start = self.val['_M_impl']['_M_start'] @@ -669,7 +733,9 @@ class StdDequeIteratorPrinter: self.val = val def to_string(self): - return self.val['_M_cur'].dereference() + if not self.val['_M_cur']: + return 'non-dereferenceable iterator for std::deque' + return str(self.val['_M_cur'].dereference()) class StdStringPrinter: "Print a std::basic_string of some kind" @@ -756,7 +822,7 @@ class Tr1UnorderedSetPrinter: "Print a tr1::unordered_set" def __init__ (self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val def hashtable (self): @@ -765,7 +831,8 @@ class Tr1UnorderedSetPrinter: return self.val['_M_h'] def to_string (self): - return '%s with %d elements' % (self.typename, self.hashtable()['_M_element_count']) + count = self.hashtable()['_M_element_count'] + return '%s with %s' % (self.typename, num_elements(count)) @staticmethod def format_count (i): @@ -781,7 +848,7 @@ class Tr1UnorderedMapPrinter: "Print a tr1::unordered_map" def __init__ (self, typename, val): - self.typename = typename + self.typename = strip_versioned_namespace(typename) self.val = val def hashtable (self): @@ -790,7 +857,8 @@ class Tr1UnorderedMapPrinter: return self.val['_M_h'] def to_string (self): - return '%s with %d elements' % (self.typename, self.hashtable()['_M_element_count']) + count = self.hashtable()['_M_element_count'] + return '%s with %s' % (self.typename, num_elements(count)) @staticmethod def flatten (list): @@ -846,7 +914,7 @@ class StdForwardListPrinter: def __init__(self, typename, val): self.val = val - self.typename = typename + self.typename = strip_versioned_namespace(typename) def children(self): nodetype = find_type(self.val.type, '_Node') @@ -855,15 +923,16 @@ class StdForwardListPrinter: def to_string(self): if self.val['_M_impl']['_M_head']['_M_next'] == 0: - return 'empty %s' % (self.typename) - return '%s' % (self.typename) + return 'empty %s' % self.typename + return '%s' % self.typename class SingleObjContainerPrinter(object): "Base class for printers of containers of single objects" - def __init__ (self, val, viz): + def __init__ (self, val, viz, hint = None): self.contained_value = val self.visualizer = viz + self.hint = hint def _recognize(self, type): """Return TYPE as a string after applying type printers""" @@ -898,14 +967,14 @@ class SingleObjContainerPrinter(object): # if contained value is a map we want to display in the same way if hasattr (self.visualizer, 'children') and hasattr (self.visualizer, 'display_hint'): return self.visualizer.display_hint () - return None - + return self.hint class StdExpAnyPrinter(SingleObjContainerPrinter): - "Print a std::experimental::any" + "Print a std::any or std::experimental::any" def __init__ (self, typename, val): - self.typename = 'std::experimental::any' + self.typename = re.sub('^std::experimental::fundamentals_v\d::', 'std::experimental::', typename, 1) + self.typename = strip_versioned_namespace(self.typename) self.val = val self.contained_type = None contained_value = None @@ -914,14 +983,17 @@ class StdExpAnyPrinter(SingleObjContainerPrinter): if mgr != 0: func = gdb.block_for_pc(int(mgr.cast(gdb.lookup_type('intptr_t')))) if not func: - raise ValueError("Invalid function pointer in std::experimental::any") + raise ValueError("Invalid function pointer in %s" % self.typename) rx = r"""({0}::_Manager_\w+<.*>)::_S_manage\({0}::_Op, {0} const\*, {0}::_Arg\*\)""".format(typename) m = re.match(rx, func.function.name) if not m: - raise ValueError("Unknown manager function in std::experimental::any") + raise ValueError("Unknown manager function in %s" % self.typename) + mgrname = m.group(1) # FIXME need to expand 'std::string' so that gdb.lookup_type works - mgrname = re.sub("std::string(?!\w)", str(gdb.lookup_type('std::string').strip_typedefs()), m.group(1)) + if 'std::string' in mgrname: + mgrname = re.sub("std::string(?!\w)", str(gdb.lookup_type('std::string').strip_typedefs()), m.group(1)) + mgrtype = gdb.lookup_type(mgrname) self.contained_type = mgrtype.template_argument(0) valptr = None @@ -929,12 +1001,8 @@ class StdExpAnyPrinter(SingleObjContainerPrinter): valptr = self.val['_M_storage']['_M_buffer'].address elif '::_Manager_external' in mgrname: valptr = self.val['_M_storage']['_M_ptr'] - elif '::_Manager_alloc' in mgrname: - datatype = gdb.lookup_type(mgrname + '::_Data') - valptr = self.val['_M_storage']['_M_ptr'].cast(datatype.pointer()) - valptr = valptr.dereference()['_M_data'].address else: - raise ValueError("Unknown manager function in std::experimental::any") + raise ValueError("Unknown manager function in %s" % self.typename) contained_value = valptr.cast(self.contained_type.pointer()).dereference() visualizer = gdb.default_visualizer(contained_value) super(StdExpAnyPrinter, self).__init__ (contained_value, visualizer) @@ -946,14 +1014,17 @@ class StdExpAnyPrinter(SingleObjContainerPrinter): if hasattr (self.visualizer, 'children'): return desc + self.visualizer.to_string () valtype = self._recognize (self.contained_type) - return desc + valtype + return desc + strip_versioned_namespace(str(valtype)) class StdExpOptionalPrinter(SingleObjContainerPrinter): - "Print a std::experimental::optional" + "Print a std::optional or std::experimental::optional" def __init__ (self, typename, val): valtype = self._recognize (val.type.template_argument(0)) - self.typename = "std::experimental::optional<%s>" % valtype + self.typename = re.sub('^std::(experimental::|)(fundamentals_v\d::|)(.*)', r'std::\1\3<%s>' % valtype, typename, 1) + self.typename = strip_versioned_namespace(self.typename) + if not self.typename.startswith('std::experimental'): + val = val['_M_payload'] self.val = val contained_value = val['_M_payload'] if self.val['_M_engaged'] else None visualizer = gdb.default_visualizer (val['_M_payload']) @@ -961,13 +1032,93 @@ class StdExpOptionalPrinter(SingleObjContainerPrinter): def to_string (self): if self.contained_value is None: - return self.typename + " [no contained value]" + return "%s [no contained value]" % self.typename if hasattr (self.visualizer, 'children'): - return self.typename + " containing " + self.visualizer.to_string () + return "%s containing %s" % (self.typename, + self.visualizer.to_string()) return self.typename +class StdVariantPrinter(SingleObjContainerPrinter): + "Print a std::variant" + + def __init__(self, typename, val): + alternatives = self._template_args(val) + self.typename = "%s<%s>" % (typename, ', '.join([self._recognize(alt) for alt in alternatives])) + self.typename = strip_versioned_namespace(self.typename) + self.index = val['_M_index'] + if self.index >= len(alternatives): + self.contained_type = None + contained_value = None + visualizer = None + else: + self.contained_type = alternatives[int(self.index)] + addr = val['_M_u']['_M_first']['_M_storage'].address + contained_value = addr.cast(self.contained_type.pointer()).dereference() + visualizer = gdb.default_visualizer(contained_value) + super (StdVariantPrinter, self).__init__(contained_value, visualizer, 'array') + + @staticmethod + def _template_args(val): + n = 0 + args = [] + while True: + try: + args.append(val.type.template_argument(n)) + except: + return args + n += 1 + + def to_string(self): + if self.contained_value is None: + return "%s [no contained value]" % self.typename + if hasattr(self.visualizer, 'children'): + return "%s [index %d] containing %s" % (self.typename, self.index, + self.visualizer.to_string()) + return "%s [index %d]" % (self.typename, self.index) + +class StdNodeHandlePrinter(SingleObjContainerPrinter): + "Print a container node handle" + + def __init__(self, typename, val): + self.value_type = val.type.template_argument(1) + nodetype = val.type.template_argument(2).template_argument(0) + self.is_rb_tree_node = is_specialization_of(nodetype.name, '_Rb_tree_node') + self.is_map_node = val.type.template_argument(0) != self.value_type + nodeptr = val['_M_ptr'] + if nodeptr: + if self.is_rb_tree_node: + contained_value = get_value_from_Rb_tree_node(nodeptr.dereference()) + else: + contained_value = get_value_from_aligned_membuf(nodeptr['_M_storage'], + self.value_type) + visualizer = gdb.default_visualizer(contained_value) + else: + contained_value = None + visualizer = None + optalloc = val['_M_alloc'] + self.alloc = optalloc['_M_payload'] if optalloc['_M_engaged'] else None + super(StdNodeHandlePrinter, self).__init__(contained_value, visualizer, + 'array') + + def to_string(self): + desc = 'node handle for ' + if not self.is_rb_tree_node: + desc += 'unordered ' + if self.is_map_node: + desc += 'map'; + else: + desc += 'set'; + + if self.contained_value: + desc += ' with element' + if hasattr(self.visualizer, 'children'): + return "%s = %s" % (desc, self.visualizer.to_string()) + return desc + else: + return 'empty %s' % desc + class StdExpStringViewPrinter: - "Print a std::experimental::basic_string_view" + "Print a std::basic_string_view or std::experimental::basic_string_view" def __init__ (self, typename, val): self.val = val @@ -1075,7 +1226,8 @@ class Printer(object): # Add a name using _GLIBCXX_BEGIN_NAMESPACE_VERSION. def add_version(self, base, name, function): self.add(base + name, function) - self.add(base + '__7::' + name, function) + if _versioned_namespace: + self.add(base + _versioned_namespace + name, function) # Add a name using _GLIBCXX_BEGIN_NAMESPACE_CONTAINER. def add_container(self, base, name, function): @@ -1119,7 +1271,8 @@ class Printer(object): libstdcxx_printer = None class TemplateTypePrinter(object): - r"""A type printer for class templates. + r""" + A type printer for class templates. Recognizes type names that match a regular expression. Replaces them with a formatted string which can use replacement field @@ -1166,8 +1319,14 @@ class TemplateTypePrinter(object): return self._recognizer(self.pattern, self.subst) def add_one_template_type_printer(obj, name, match, subst): - printer = TemplateTypePrinter(name, '^std::' + match + '$', 'std::' + subst) + match = '^std::' + match + '$' + printer = TemplateTypePrinter(name, match, 'std::' + subst) gdb.types.register_type_printer(obj, printer) + if _versioned_namespace: + # Add second type printer for same type in versioned namespace: + match = match.replace('std::', 'std::' + _versioned_namespace) + printer = TemplateTypePrinter(name, match, 'std::' + subst) + gdb.types.register_type_printer(obj, printer) class FilteringTypePrinter(object): def __init__(self, match, name): @@ -1194,7 +1353,7 @@ class FilteringTypePrinter(object): except: pass if self.type_obj == type_obj: - return self.name + return strip_versioned_namespace(self.name) return None def instantiate(self): @@ -1203,6 +1362,9 @@ class FilteringTypePrinter(object): def add_one_type_printer(obj, match, name): printer = FilteringTypePrinter(match, 'std::' + name) gdb.types.register_type_printer(obj, printer) + if _versioned_namespace: + printer = FilteringTypePrinter(match, 'std::' + _versioned_namespace + name) + gdb.types.register_type_printer(obj, printer) def register_type_printers(obj): global _use_type_printing @@ -1212,6 +1374,7 @@ def register_type_printers(obj): for pfx in ('', 'w'): add_one_type_printer(obj, 'basic_string', pfx + 'string') + add_one_type_printer(obj, 'basic_string_view', pfx + 'string_view') add_one_type_printer(obj, 'basic_ios', pfx + 'ios') add_one_type_printer(obj, 'basic_streambuf', pfx + 'streambuf') add_one_type_printer(obj, 'basic_istream', pfx + 'istream') @@ -1243,8 +1406,11 @@ def register_type_printers(obj): # Note that we can't have a printer for std::wstreampos, because # it shares the same underlying type as std::streampos. add_one_type_printer(obj, 'fpos', 'streampos') + add_one_type_printer(obj, 'basic_string', 'u16string') add_one_type_printer(obj, 'basic_string', 'u32string') + add_one_type_printer(obj, 'basic_string_view', 'u16string_view') + add_one_type_printer(obj, 'basic_string_view', 'u32string_view') for dur in ('nanoseconds', 'microseconds', 'milliseconds', 'seconds', 'minutes', 'hours'): @@ -1265,6 +1431,10 @@ def register_type_printers(obj): 'unique_ptr<(.*), std::default_delete<\\1 ?> >', 'unique_ptr<{1}>') + add_one_template_type_printer(obj, 'basic_string', + 'basic_string<((un)?signed char), std::char_traits<\\1 ?>, std::allocator<\\1 ?> >', + 'basic_string<{1}>') + add_one_template_type_printer(obj, 'deque', 'deque<(.*), std::allocator<\\1 ?> >', 'deque<{1}>') @@ -1303,11 +1473,14 @@ def register_type_printers(obj): 'unordered_multiset<{1}>') # strip the "fundamentals_v1" inline namespace from these types + add_one_template_type_printer(obj, 'any', + 'experimental::fundamentals_v\d::any<(.*)>', + 'experimental::any<\\1>') add_one_template_type_printer(obj, 'optional', - 'experimental::fundamentals_v1::optional<(.*)>', + 'experimental::fundamentals_v\d::optional<(.*)>', 'experimental::optional<\\1>') add_one_template_type_printer(obj, 'basic_string_view', - 'experimental::fundamentals_v1::basic_string_view<(.*), std::char_traits<\\1> >', + 'experimental::fundamentals_v\d::basic_string_view<(.*), std::char_traits<\\1> >', 'experimental::basic_string_view<\\1>') def register_libstdcxx_printers (obj): @@ -1330,11 +1503,6 @@ def build_libstdcxx_dictionary (): libstdcxx_printer = Printer("libstdc++-v6") - # For _GLIBCXX_BEGIN_NAMESPACE_VERSION. - vers = '(__7::)?' - # For _GLIBCXX_BEGIN_NAMESPACE_CONTAINER. - container = '(__cxx1998::' + vers + ')?' - # libstdc++ objects requiring pretty-printing. # In order from: # http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01847.html @@ -1343,6 +1511,7 @@ def build_libstdcxx_dictionary (): libstdcxx_printer.add_container('std::', 'bitset', StdBitsetPrinter) libstdcxx_printer.add_container('std::', 'deque', StdDequePrinter) libstdcxx_printer.add_container('std::', 'list', StdListPrinter) + libstdcxx_printer.add_container('std::__cxx11::', 'list', StdListPrinter) libstdcxx_printer.add_container('std::', 'map', StdMapPrinter) libstdcxx_printer.add_container('std::', 'multimap', StdMapPrinter) libstdcxx_printer.add_container('std::', 'multiset', StdSetPrinter) @@ -1371,7 +1540,7 @@ def build_libstdcxx_dictionary (): libstdcxx_printer.add('std::__debug::unique_ptr', UniquePointerPrinter) libstdcxx_printer.add('std::__debug::vector', StdVectorPrinter) - # These are the TR1 and C++0x printers. + # These are the TR1 and C++11 printers. # For array - the default GDB pretty-printer seems reasonable. libstdcxx_printer.add_version('std::', 'shared_ptr', SharedPointerPrinter) libstdcxx_printer.add_version('std::', 'weak_ptr', SharedPointerPrinter) @@ -1397,9 +1566,9 @@ def build_libstdcxx_dictionary (): libstdcxx_printer.add_version('std::tr1::', 'unordered_multiset', Tr1UnorderedSetPrinter) - # These are the C++0x printer registrations for -D_GLIBCXX_DEBUG cases. - # The tr1 namespace printers do not seem to have any debug - # equivalents, so do no register them. + # These are the C++11 printer registrations for -D_GLIBCXX_DEBUG cases. + # The tr1 namespace containers do not have any debug equivalents, + # so do not register printers for them. libstdcxx_printer.add('std::__debug::unordered_map', Tr1UnorderedMapPrinter) libstdcxx_printer.add('std::__debug::unordered_set', @@ -1424,6 +1593,18 @@ def build_libstdcxx_dictionary (): libstdcxx_printer.add_version('std::experimental::filesystem::v1::__cxx11::', 'path', StdExpPathPrinter) + # C++17 components + libstdcxx_printer.add_version('std::', + 'any', StdExpAnyPrinter) + libstdcxx_printer.add_version('std::', + 'optional', StdExpOptionalPrinter) + libstdcxx_printer.add_version('std::', + 'basic_string_view', StdExpStringViewPrinter) + libstdcxx_printer.add_version('std::', + 'variant', StdVariantPrinter) + libstdcxx_printer.add_version('std::', + '_Node_handle', StdNodeHandlePrinter) + # Extensions. libstdcxx_printer.add_version('__gnu_cxx::', 'slist', StdSlistPrinter) diff --git a/devkitARM/share/gcc-5.3.0/python/libstdcxx/v6/xmethods.py b/devkitARM/share/gcc-7.1.0/python/libstdcxx/v6/xmethods.py similarity index 73% rename from devkitARM/share/gcc-5.3.0/python/libstdcxx/v6/xmethods.py rename to devkitARM/share/gcc-7.1.0/python/libstdcxx/v6/xmethods.py index 6db0e163e..02feab66a 100644 --- a/devkitARM/share/gcc-5.3.0/python/libstdcxx/v6/xmethods.py +++ b/devkitARM/share/gcc-7.1.0/python/libstdcxx/v6/xmethods.py @@ -1,6 +1,6 @@ # Xmethods for libstdc++. -# Copyright (C) 2014-2015 Free Software Foundation, Inc. +# Copyright (C) 2014-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -148,7 +148,7 @@ class ArrayMethodsMatcher(gdb.xmethod.XMethodMatcher): self.methods = [self._method_dict[m] for m in self._method_dict] def match(self, class_type, method_name): - if not re.match('^std::array<.*>$', class_type.tag): + if not re.match('^std::(__\d+::)?array<.*>$', class_type.tag): return None method = self._method_dict.get(method_name) if method is None or not method.enabled: @@ -165,7 +165,7 @@ class ArrayMethodsMatcher(gdb.xmethod.XMethodMatcher): class DequeWorkerBase(gdb.xmethod.XMethodWorker): def __init__(self, val_type): self._val_type = val_type - self._bufsize = (512 / val_type.sizeof) or 1 + self._bufsize = 512 // val_type.sizeof or 1 def size(self, obj): first_node = obj['_M_impl']['_M_start']['_M_node'] @@ -174,10 +174,10 @@ class DequeWorkerBase(gdb.xmethod.XMethodWorker): first = obj['_M_impl']['_M_finish']['_M_first'] return (last_node - first_node) * self._bufsize + (cur - first) - def index(self, obj, index): + def index(self, obj, idx): first_node = obj['_M_impl']['_M_start']['_M_node'] - index_node = first_node + index / self._bufsize - return index_node[0][index % self._bufsize] + index_node = first_node + int(idx) // self._bufsize + return index_node[0][idx % self._bufsize] class DequeEmptyWorker(DequeWorkerBase): def get_arg_types(self): @@ -265,7 +265,7 @@ class DequeMethodsMatcher(gdb.xmethod.XMethodMatcher): self.methods = [self._method_dict[m] for m in self._method_dict] def match(self, class_type, method_name): - if not re.match('^std::deque<.*>$', class_type.tag): + if not re.match('^std::(__\d+::)?deque<.*>$', class_type.tag): return None method = self._method_dict.get(method_name) if method is None or not method.enabled: @@ -309,7 +309,7 @@ class ForwardListMethodsMatcher(gdb.xmethod.XMethodMatcher): self.methods = [self._method_dict[m] for m in self._method_dict] def match(self, class_type, method_name): - if not re.match('^std::forward_list<.*>$', class_type.tag): + if not re.match('^std::(__\d+::)?forward_list<.*>$', class_type.tag): return None method = self._method_dict.get(method_name) if method is None or not method.enabled: @@ -328,6 +328,15 @@ class ListWorkerBase(gdb.xmethod.XMethodWorker): def get_arg_types(self): return None + def get_value_from_node(self, node): + node = node.dereference() + if node.type.fields()[1].name == '_M_data': + # C++03 implementation, node contains the value as a member + return node['_M_data'] + # C++11 implementation, node stores value in __aligned_membuf + addr = node['_M_storage'].address + return addr.cast(self._val_type.pointer()).dereference() + class ListEmptyWorker(ListWorkerBase): def get_result_type(self, obj): return get_bool_type() @@ -358,7 +367,7 @@ class ListFrontWorker(ListWorkerBase): def __call__(self, obj): node = obj['_M_impl']['_M_node']['_M_next'].cast(self._node_type) - return node['_M_data'] + return self.get_value_from_node(node) class ListBackWorker(ListWorkerBase): def get_result_type(self, obj): @@ -366,7 +375,7 @@ class ListBackWorker(ListWorkerBase): def __call__(self, obj): prev_node = obj['_M_impl']['_M_node']['_M_prev'].cast(self._node_type) - return prev_node['_M_data'] + return self.get_value_from_node(prev_node) class ListMethodsMatcher(gdb.xmethod.XMethodMatcher): def __init__(self): @@ -381,7 +390,7 @@ class ListMethodsMatcher(gdb.xmethod.XMethodMatcher): self.methods = [self._method_dict[m] for m in self._method_dict] def match(self, class_type, method_name): - if not re.match('^std::list<.*>$', class_type.tag): + if not re.match('^std::(__\d+::)?(__cxx11::)?list<.*>$', class_type.tag): return None method = self._method_dict.get(method_name) if method is None or not method.enabled: @@ -410,7 +419,7 @@ class VectorWorkerBase(gdb.xmethod.XMethodWorker): if self._val_type.code == gdb.TYPE_CODE_BOOL: start = obj['_M_impl']['_M_start']['_M_p'] bit_size = start.dereference().type.sizeof * 8 - valp = start + index / bit_size + valp = start + index // bit_size offset = index % bit_size return (valp.dereference() & (1 << offset)) > 0 else: @@ -496,7 +505,7 @@ class VectorMethodsMatcher(gdb.xmethod.XMethodMatcher): self.methods = [self._method_dict[m] for m in self._method_dict] def match(self, class_type, method_name): - if not re.match('^std::vector<.*>$', class_type.tag): + if not re.match('^std::(__\d+::)?vector<.*>$', class_type.tag): return None method = self._method_dict.get(method_name) if method is None or not method.enabled: @@ -545,7 +554,7 @@ class AssociativeContainerMethodsMatcher(gdb.xmethod.XMethodMatcher): self.methods = [self._method_dict[m] for m in self._method_dict] def match(self, class_type, method_name): - if not re.match('^std::%s<.*>$' % self._name, class_type.tag): + if not re.match('^std::(__\d+::)?%s<.*>$' % self._name, class_type.tag): return None method = self._method_dict.get(method_name) if method is None or not method.enabled: @@ -556,8 +565,14 @@ class AssociativeContainerMethodsMatcher(gdb.xmethod.XMethodMatcher): # Xmethods for std::unique_ptr class UniquePtrGetWorker(gdb.xmethod.XMethodWorker): + "Implements std::unique_ptr::get() and std::unique_ptr::operator->()" + def __init__(self, elem_type): - self._elem_type = elem_type + self._is_array = elem_type.code == gdb.TYPE_CODE_ARRAY + if self._is_array: + self._elem_type = elem_type.target() + else: + self._elem_type = elem_type def get_arg_types(self): return None @@ -565,36 +580,193 @@ class UniquePtrGetWorker(gdb.xmethod.XMethodWorker): def get_result_type(self, obj): return self._elem_type.pointer() + def _supports(self, method_name): + "operator-> is not supported for unique_ptr" + return method_name == 'get' or not self._is_array + def __call__(self, obj): - return obj['_M_t']['_M_head_impl'] + impl_type = obj.dereference().type.fields()[0].type.tag + if re.match('^std::(__\d+::)?__uniq_ptr_impl<.*>$', impl_type): # New implementation + return obj['_M_t']['_M_t']['_M_head_impl'] + elif re.match('^std::(__\d+::)?tuple<.*>$', impl_type): + return obj['_M_t']['_M_head_impl'] + return None class UniquePtrDerefWorker(UniquePtrGetWorker): + "Implements std::unique_ptr::operator*()" + def __init__(self, elem_type): UniquePtrGetWorker.__init__(self, elem_type) def get_result_type(self, obj): return self._elem_type + def _supports(self, method_name): + "operator* is not supported for unique_ptr" + return not self._is_array + def __call__(self, obj): return UniquePtrGetWorker.__call__(self, obj).dereference() +class UniquePtrSubscriptWorker(UniquePtrGetWorker): + "Implements std::unique_ptr::operator[](size_t)" + + def __init__(self, elem_type): + UniquePtrGetWorker.__init__(self, elem_type) + + def get_arg_types(self): + return get_std_size_type() + + def get_result_type(self, obj, index): + return self._elem_type + + def _supports(self, method_name): + "operator[] is only supported for unique_ptr" + return self._is_array + + def __call__(self, obj, index): + return UniquePtrGetWorker.__call__(self, obj)[index] + class UniquePtrMethodsMatcher(gdb.xmethod.XMethodMatcher): def __init__(self): gdb.xmethod.XMethodMatcher.__init__(self, matcher_name_prefix + 'unique_ptr') self._method_dict = { 'get': LibStdCxxXMethod('get', UniquePtrGetWorker), + 'operator->': LibStdCxxXMethod('operator->', UniquePtrGetWorker), 'operator*': LibStdCxxXMethod('operator*', UniquePtrDerefWorker), + 'operator[]': LibStdCxxXMethod('operator[]', UniquePtrSubscriptWorker), } self.methods = [self._method_dict[m] for m in self._method_dict] def match(self, class_type, method_name): - if not re.match('^std::unique_ptr<.*>$', class_type.tag): + if not re.match('^std::(__\d+::)?unique_ptr<.*>$', class_type.tag): return None method = self._method_dict.get(method_name) if method is None or not method.enabled: return None - return method.worker_class(class_type.template_argument(0)) + worker = method.worker_class(class_type.template_argument(0)) + if worker._supports(method_name): + return worker + return None + +# Xmethods for std::shared_ptr + +class SharedPtrGetWorker(gdb.xmethod.XMethodWorker): + "Implements std::shared_ptr::get() and std::shared_ptr::operator->()" + + def __init__(self, elem_type): + self._is_array = elem_type.code == gdb.TYPE_CODE_ARRAY + if self._is_array: + self._elem_type = elem_type.target() + else: + self._elem_type = elem_type + + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return self._elem_type.pointer() + + def _supports(self, method_name): + "operator-> is not supported for shared_ptr" + return method_name == 'get' or not self._is_array + + def __call__(self, obj): + return obj['_M_ptr'] + +class SharedPtrDerefWorker(SharedPtrGetWorker): + "Implements std::shared_ptr::operator*()" + + def __init__(self, elem_type): + SharedPtrGetWorker.__init__(self, elem_type) + + def get_result_type(self, obj): + return self._elem_type + + def _supports(self, method_name): + "operator* is not supported for shared_ptr" + return not self._is_array + + def __call__(self, obj): + return SharedPtrGetWorker.__call__(self, obj).dereference() + +class SharedPtrSubscriptWorker(SharedPtrGetWorker): + "Implements std::shared_ptr::operator[](size_t)" + + def __init__(self, elem_type): + SharedPtrGetWorker.__init__(self, elem_type) + + def get_arg_types(self): + return get_std_size_type() + + def get_result_type(self, obj, index): + return self._elem_type + + def _supports(self, method_name): + "operator[] is only supported for shared_ptr" + return self._is_array + + def __call__(self, obj, index): + # Check bounds if _elem_type is an array of known bound + m = re.match('.*\[(\d+)]$', str(self._elem_type)) + if m and index >= int(m.group(1)): + raise IndexError('shared_ptr<%s> index "%d" should not be >= %d.' % + (self._elem_type, int(index), int(m.group(1)))) + return SharedPtrGetWorker.__call__(self, obj)[index] + +class SharedPtrUseCountWorker(gdb.xmethod.XMethodWorker): + "Implements std::shared_ptr::use_count()" + + def __init__(self, elem_type): + SharedPtrUseCountWorker.__init__(self, elem_type) + + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return gdb.lookup_type('long') + + def __call__(self, obj): + refcounts = ['_M_refcount']['_M_pi'] + return refcounts['_M_use_count'] if refcounts else 0 + +class SharedPtrUniqueWorker(SharedPtrUseCountWorker): + "Implements std::shared_ptr::unique()" + + def __init__(self, elem_type): + SharedPtrUseCountWorker.__init__(self, elem_type) + + def get_result_type(self, obj): + return gdb.lookup_type('bool') + + def __call__(self, obj): + return SharedPtrUseCountWorker.__call__(self, obj) == 1 + +class SharedPtrMethodsMatcher(gdb.xmethod.XMethodMatcher): + def __init__(self): + gdb.xmethod.XMethodMatcher.__init__(self, + matcher_name_prefix + 'shared_ptr') + self._method_dict = { + 'get': LibStdCxxXMethod('get', SharedPtrGetWorker), + 'operator->': LibStdCxxXMethod('operator->', SharedPtrGetWorker), + 'operator*': LibStdCxxXMethod('operator*', SharedPtrDerefWorker), + 'operator[]': LibStdCxxXMethod('operator[]', SharedPtrSubscriptWorker), + 'use_count': LibStdCxxXMethod('use_count', SharedPtrUseCountWorker), + 'unique': LibStdCxxXMethod('unique', SharedPtrUniqueWorker), + } + self.methods = [self._method_dict[m] for m in self._method_dict] + + def match(self, class_type, method_name): + if not re.match('^std::(__\d+::)?shared_ptr<.*>$', class_type.tag): + return None + method = self._method_dict.get(method_name) + if method is None or not method.enabled: + return None + worker = method.worker_class(class_type.template_argument(0)) + if worker._supports(method_name): + return worker + return None def register_libstdcxx_xmethods(locus): gdb.xmethod.register_xmethod_matcher(locus, ArrayMethodsMatcher()) @@ -619,3 +791,4 @@ def register_libstdcxx_xmethods(locus): gdb.xmethod.register_xmethod_matcher( locus, AssociativeContainerMethodsMatcher('unordered_multimap')) gdb.xmethod.register_xmethod_matcher(locus, UniquePtrMethodsMatcher()) + gdb.xmethod.register_xmethod_matcher(locus, SharedPtrMethodsMatcher()) diff --git a/devkitARM/share/gdb/syscalls/aarch64-linux.xml b/devkitARM/share/gdb/syscalls/aarch64-linux.xml index 537d7891c..c2fd59b99 100644 --- a/devkitARM/share/gdb/syscalls/aarch64-linux.xml +++ b/devkitARM/share/gdb/syscalls/aarch64-linux.xml @@ -1,112 +1,110 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - + + + - + @@ -138,17 +136,17 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -195,75 +193,75 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + - - - + + + diff --git a/devkitARM/share/gdb/syscalls/amd64-linux.xml b/devkitARM/share/gdb/syscalls/amd64-linux.xml index 171ca92c8..7e0225277 100644 --- a/devkitARM/share/gdb/syscalls/amd64-linux.xml +++ b/devkitARM/share/gdb/syscalls/amd64-linux.xml @@ -1,114 +1,111 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -141,18 +138,18 @@ - - - - - - - - + + + + + + + + - - + + @@ -163,26 +160,26 @@ - - - - + + + + - + - + - + - + - - - - + + + + @@ -193,7 +190,7 @@ - + @@ -201,20 +198,20 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -227,15 +224,15 @@ - + - - + + - - + + @@ -245,15 +242,15 @@ - - - - - + + + + + - - - + + + @@ -261,54 +258,54 @@ - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/arm-3ds.xml b/devkitARM/share/gdb/syscalls/arm-3ds.xml new file mode 100644 index 000000000..48780b7bd --- /dev/null +++ b/devkitARM/share/gdb/syscalls/arm-3ds.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/arm-linux.xml b/devkitARM/share/gdb/syscalls/arm-linux.xml index 5f7a35a6a..3f7ad76d9 100644 --- a/devkitARM/share/gdb/syscalls/arm-linux.xml +++ b/devkitARM/share/gdb/syscalls/arm-linux.xml @@ -1,95 +1,92 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + - - + + - - - + + + - + - - - - - - + + + + + + - + - + - - + + - - + + - + - + - - - + + + - - + + @@ -98,78 +95,78 @@ - - - - - - + + + + + + - - - - - - - + + + + + + + - - + + - + - - - + + + - - + + - - - - + + + + - - + + - + - + - - - - - - - + + + + + + + - + - - - - + + + + @@ -179,40 +176,40 @@ - + - + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - - - - - + + + + + + + @@ -221,37 +218,37 @@ - + - + - - - - - + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -260,12 +257,12 @@ - + - - - - + + + + @@ -276,10 +273,10 @@ - - - - + + + + @@ -290,106 +287,106 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + - + diff --git a/devkitARM/share/gdb/syscalls/freebsd.xml b/devkitARM/share/gdb/syscalls/freebsd.xml new file mode 100644 index 000000000..e01bc05d8 --- /dev/null +++ b/devkitARM/share/gdb/syscalls/freebsd.xml @@ -0,0 +1,410 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/gdb-syscalls.dtd b/devkitARM/share/gdb/syscalls/gdb-syscalls.dtd index b05976eb9..96721e9fa 100644 --- a/devkitARM/share/gdb/syscalls/gdb-syscalls.dtd +++ b/devkitARM/share/gdb/syscalls/gdb-syscalls.dtd @@ -1,4 +1,4 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + - - + + - - - + + + - + - - - - - - + + + + + + - + - + - - + + - - + + - + - + - - - + + + - - + + @@ -96,78 +93,78 @@ - - - - - - + + + + + + - - - - - - - + + + + + + + - - + + - + - - - + + + - - + + - - - - + + + + - - + + - + - + - - - - - - - + + + + + + + - + - - - - + + + + @@ -177,42 +174,42 @@ - + - + - - - - - - - - - - - + + + + + + + + + + + - - + + - + - - - - - - - + + + + + + + @@ -221,38 +218,38 @@ - + - + - - - + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -263,13 +260,13 @@ - - + + - - - - + + + + @@ -280,15 +277,15 @@ - - - - - + + + + + - - - + + + @@ -296,45 +293,45 @@ - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/mips-n32-linux.xml b/devkitARM/share/gdb/syscalls/mips-n32-linux.xml index 5cf33bf4b..1be378b97 100644 --- a/devkitARM/share/gdb/syscalls/mips-n32-linux.xml +++ b/devkitARM/share/gdb/syscalls/mips-n32-linux.xml @@ -1,112 +1,109 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -139,17 +136,17 @@ - - - - - - - + + + + + + + - - + + @@ -160,24 +157,24 @@ - - - - + + + + - + - + - + - - - - + + + + @@ -186,27 +183,27 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -219,21 +216,21 @@ - + - - - - - - + + + + + + - - - - - + + + + + @@ -243,11 +240,11 @@ - - - - - + + + + + @@ -255,65 +252,65 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/mips-n64-linux.xml b/devkitARM/share/gdb/syscalls/mips-n64-linux.xml index 3c89c2a3d..7de6f7750 100644 --- a/devkitARM/share/gdb/syscalls/mips-n64-linux.xml +++ b/devkitARM/share/gdb/syscalls/mips-n64-linux.xml @@ -1,112 +1,109 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -139,17 +136,17 @@ - - - - - - - + + + + + + + - - + + @@ -160,24 +157,24 @@ - - - - + + + + - + - + - + - - - - + + + + @@ -186,26 +183,26 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -217,17 +214,17 @@ - + - - - - - + + + + + - - + + @@ -237,11 +234,11 @@ - - - - - + + + + + @@ -249,64 +246,64 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/mips-o32-linux.xml b/devkitARM/share/gdb/syscalls/mips-o32-linux.xml index ef8e42101..726cb4fc5 100644 --- a/devkitARM/share/gdb/syscalls/mips-o32-linux.xml +++ b/devkitARM/share/gdb/syscalls/mips-o32-linux.xml @@ -1,90 +1,87 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + - - + + - - + + - + - - - - - - + + + + + + - + - + - - + + - - + + - + - + - - - + + + - - + + @@ -93,78 +90,78 @@ - - - - + + + + - - - - - - - + + + + + + + - - + + - + - - - + + + - - + + - - - - + + + + - - + + - + - + - - - - - - - + + + + + + + - + - - - - + + + + @@ -174,76 +171,76 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -252,17 +249,17 @@ - + - - - - + + + + - - - + + + @@ -272,11 +269,11 @@ - - - - - + + + + + @@ -284,64 +281,64 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/ppc-linux.xml b/devkitARM/share/gdb/syscalls/ppc-linux.xml index ce2d34fdd..0fd1c6850 100644 --- a/devkitARM/share/gdb/syscalls/ppc-linux.xml +++ b/devkitARM/share/gdb/syscalls/ppc-linux.xml @@ -1,93 +1,90 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + - - + + - - - + + + - + - - - - - - + + + + + + - + - + - - + + - - + + - + - + - - - + + + - - + + @@ -96,78 +93,78 @@ - - - - - - + + + + + + - - - - - - - + + + + + + + - - + + - + - - - + + + - - + + - - - - + + + + - - + + - + - + - - - - - - - + + + + + + + - + - - - - + + + + @@ -177,82 +174,82 @@ - + - + - - - - - - - - - - - + + + + + + + + + + + - - + + - + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - + + - - - - + + + + @@ -263,16 +260,16 @@ - - - - - + + + + + - - - + + + @@ -283,28 +280,28 @@ - + - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/ppc64-linux.xml b/devkitARM/share/gdb/syscalls/ppc64-linux.xml index a45631703..23aa29b78 100644 --- a/devkitARM/share/gdb/syscalls/ppc64-linux.xml +++ b/devkitARM/share/gdb/syscalls/ppc64-linux.xml @@ -1,93 +1,90 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + - - + + - - - + + + - + - - - - - - + + + + + + - + - + - - + + - - + + - + - + - - - + + + - - + + @@ -96,78 +93,78 @@ - - - - - - + + + + + + - - - - - - - + + + + + + + - - + + - + - - - + + + - - + + - - - - + + + + - - + + - + - + - - - - - - - + + + + + + + - + - - - - + + + + @@ -177,57 +174,57 @@ - + - + - - - - - - - - - - - + + + + + + + + + + + - - + + - + - + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -238,13 +235,13 @@ - - + + - - - - + + + + @@ -255,15 +252,15 @@ - - - - + + + + - - - + + + @@ -274,22 +271,22 @@ - + - - - + + + - - - - - - - - - - + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/s390-linux.xml b/devkitARM/share/gdb/syscalls/s390-linux.xml index a45011e2a..3d48d478b 100644 --- a/devkitARM/share/gdb/syscalls/s390-linux.xml +++ b/devkitARM/share/gdb/syscalls/s390-linux.xml @@ -1,79 +1,76 @@ - - - - - - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - + + - - - + + + - - - - - - + + + + + + - + - + - - - - + + + + - + - + - + - - + + @@ -82,72 +79,72 @@ - - - - + + + + - - - - - - - + + + + + + + - - + + - + - - - + + + - - + + - - - - + + + + - - + + - + - + - - - - - - - + + + + + + + - + - - - - + + + + @@ -157,41 +154,41 @@ - + - + - - - - - - - - - - - + + + + + + + + + + + - - + + - + - - - - - - - + + + + + + + @@ -200,52 +197,52 @@ - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - + - - - - + + + + - + @@ -255,10 +252,13 @@ - - - - + + + + + + + @@ -269,66 +269,68 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + - - + + - + @@ -339,4 +341,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/s390x-linux.xml b/devkitARM/share/gdb/syscalls/s390x-linux.xml index f2c046c48..df894b626 100644 --- a/devkitARM/share/gdb/syscalls/s390x-linux.xml +++ b/devkitARM/share/gdb/syscalls/s390x-linux.xml @@ -1,134 +1,131 @@ - - - - - - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + - + - + - - - + + + - - - - + + + + - - - - - - + + + + + + - - - + + + - - - + + + - - + + - - - - + + + + - - + + - + - + - - - - - - + + + + + + - + - - - - + + + + @@ -138,30 +135,30 @@ - + - + - - - - - - - - - - + + + + + + + + + + - - + + - + - + @@ -170,50 +167,50 @@ - + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - + - - - - + + + + - + @@ -223,9 +220,12 @@ - - - + + + + + + @@ -236,66 +236,68 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + - - + + - + @@ -306,4 +308,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/sparc-linux.xml b/devkitARM/share/gdb/syscalls/sparc-linux.xml index a711e7215..e27d005f9 100644 --- a/devkitARM/share/gdb/syscalls/sparc-linux.xml +++ b/devkitARM/share/gdb/syscalls/sparc-linux.xml @@ -1,238 +1,235 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - + - - - - - - + + + + + + - + - - - - - - + + + + + + - + - + - + - + - - - - + + + + - - - + + + - - - - + + + + - + - - - + + + - - + + - - + + - + - - + + - + - - - + + + - - - - - - - + + + + + + + - - + + - - - - + + + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + - + - + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - + + + - + @@ -242,17 +239,17 @@ - + - + - - - - - - - + + + + + + + @@ -262,12 +259,12 @@ - + - + - + @@ -291,54 +288,54 @@ - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/syscalls/sparc64-linux.xml b/devkitARM/share/gdb/syscalls/sparc64-linux.xml index c7c149de4..746b8749d 100644 --- a/devkitARM/share/gdb/syscalls/sparc64-linux.xml +++ b/devkitARM/share/gdb/syscalls/sparc64-linux.xml @@ -1,221 +1,218 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - + - - - - + + + + - - - - - - + + + + + + - + - + - + - + - - - + + + - - - + + + - - - - - - - - + + + + + + + + - + - + - - - - + + + + - - - + + + - - - - - - - + + + + + + + - - + + - - - - + + + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - - - - + + + + + + + + + - + - + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - + + + - + @@ -225,16 +222,16 @@ - - + + - - - - - - - + + + + + + + @@ -244,12 +241,12 @@ - + - + - + @@ -273,54 +270,54 @@ - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/devkitARM/share/gdb/system-gdbinit/elinos.py b/devkitARM/share/gdb/system-gdbinit/elinos.py index 5944abc9f..38ea8263c 100644 --- a/devkitARM/share/gdb/system-gdbinit/elinos.py +++ b/devkitARM/share/gdb/system-gdbinit/elinos.py @@ -1,4 +1,4 @@ -# Copyright (C) 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2011-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/devkitARM/share/gdb/system-gdbinit/wrs-linux.py b/devkitARM/share/gdb/system-gdbinit/wrs-linux.py index b3453896a..bc9f3c6a3 100644 --- a/devkitARM/share/gdb/system-gdbinit/wrs-linux.py +++ b/devkitARM/share/gdb/system-gdbinit/wrs-linux.py @@ -1,4 +1,4 @@ -# Copyright (C) 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2011-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/devkitARM/share/info/annotate.info b/devkitARM/share/info/annotate.info index 082cd2505..9237d3d2d 100644 --- a/devkitARM/share/info/annotate.info +++ b/devkitARM/share/info/annotate.info @@ -1,7 +1,7 @@ This is annotate.info, produced by makeinfo version 5.2 from annotate.texinfo. -Copyright (C) 1994-2015 Free Software Foundation, Inc. +Copyright (C) 1994-2017 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -16,7 +16,7 @@ END-INFO-DIR-ENTRY This file documents GDB's obsolete annotations. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2017 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or diff --git a/devkitARM/share/info/as.info b/devkitARM/share/info/as.info index b3d29d638..ca4fa5b50 100644 --- a/devkitARM/share/info/as.info +++ b/devkitARM/share/info/as.info @@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY This file documents the GNU Assembler "as". - Copyright (C) 1991-2014 Free Software Foundation, Inc. + Copyright (C) 1991-2017 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -24,7 +24,7 @@ Using as ******** This file is a user guide to the GNU assembler `as' (GNU Binutils) -version 2.25.1. +version 2.28. This document is distributed under the terms of the GNU Free Documentation License. A copy of the license is included in the @@ -64,11 +64,16 @@ Command-Line Options: Invoking. [-help] [-I DIR] [-J] [-K] [-L] [-listing-lhs-width=NUM] [-listing-lhs-width2=NUM] [-listing-rhs-width=NUM] - [-listing-cont-lines=NUM] [-keep-locals] [-o - OBJFILE] [-R] [-reduce-memory-overheads] [-statistics] - [-v] [-version] [-version] [-W] [-warn] - [-fatal-warnings] [-w] [-x] [-Z] [@FILE] - [-size-check=[error|warning]] + [-listing-cont-lines=NUM] [-keep-locals] + [-no-pad-sections] + [-o OBJFILE] [-R] + [-hash-size=NUM] [-reduce-memory-overheads] + [-statistics] + [-v] [-version] [-version] + [-W] [-warn] [-fatal-warnings] [-w] [-x] + [-Z] [@FILE] + [-sectname-subst] [-size-check=[error|warning]] + [-elf-stt-common=[no|yes]] [-target-help] [TARGET-OPTIONS] [-|FILES ...] @@ -84,7 +89,10 @@ Command-Line Options: Invoking. [-F] [-32addr] _Target ARC options:_ - [-marc[5|6|7|8]] + [-mcpu=CPU] + [-mA6|-mARC600|-mARC601|-mA7|-mARC700|-mEM|-mHS] + [-mcode-density] + [-mrelax] [-EB|-EL] _Target ARM options:_ @@ -182,6 +190,7 @@ Command-Line Options: Invoking. [-mips32r3] [-mips32r5] [-mips32r6] [-mips64] [-mips64r2] [-mips64r3] [-mips64r5] [-mips64r6] [-construct-floats] [-no-construct-floats] + [-mignore-branch-isa] [-mno-ignore-branch-isa] [-mnan=ENCODING] [-trap] [-no-break] [-break] [-no-trap] [-mips16] [-no-mips16] @@ -191,6 +200,7 @@ Command-Line Options: Invoking. [-mdmx] [-no-mdmx] [-mdsp] [-mno-dsp] [-mdspr2] [-mno-dspr2] + [-mdspr3] [-mno-dspr3] [-mmsa] [-mno-msa] [-mxpa] [-mno-xpa] [-mmt] [-mno-mt] @@ -237,7 +247,8 @@ Command-Line Options: Invoking. -m440|-m464|-m476|-m7400|-m7410|-m7450|-m7455|-m750cl|-mppc64| -m620|-me500|-e500x2|-me500mc|-me500mc64|-me5500|-me6500|-mppc64bridge| -mbooke|-mpower4|-mpwr4|-mpower5|-mpwr5|-mpwr5x|-mpower6|-mpwr6| - -mpower7|-mpwr7|-mpower8|-mpwr8|-ma2|-mcell|-mspe|-mtitan|-me300|-mcom] + -mpower7|-mpwr7|-mpower8|-mpwr8|-mpower9|-mpwr9-ma2| + -mcell|-mspe|-mtitan|-me300|-mcom] [-many] [-maltivec|-mvsx|-mhtm|-mvle] [-mregnames|-mno-regnames] [-mrelocatable|-mrelocatable-lib|-K PIC] [-memb] @@ -259,6 +270,10 @@ Command-Line Options: Invoking. [-mint-register=NUMBER] [-mgcc-abi|-mrx-abi] + _Target RISC-V options:_ + [-march=ISA] + [-mabi=ABI] + _Target s390 options:_ [-m31|-m64] [-mesa|-mzarch] [-march=CPU] [-mregnames|-mno-regnames] @@ -271,16 +286,26 @@ Command-Line Options: Invoking. [-USE_R1][-KPIC][-O0][-G NUM][-V] _Target SPARC options:_ - [-Av6|-Av7|-Av8|-Asparclet|-Asparclite - -Av8plus|-Av8plusa|-Av9|-Av9a] - [-xarch=v8plus|-xarch=v8plusa] [-bump] + [-Av6|-Av7|-Av8|-Aleon|-Asparclet|-Asparclite + -Av8plus|-Av8plusa|-Av8plusb|-Av8plusc|-Av8plusd + -Av8plusv|-Av8plusm|-Av9|-Av9a|-Av9b|-Av9c + -Av9d|-Av9e|-Av9v|-Av9m|-Asparc|-Asparcvis + -Asparcvis2|-Asparcfmaf|-Asparcima|-Asparcvis3 + -Asparcvisr|-Asparc5] + [-xarch=v8plus|-xarch=v8plusa]|-xarch=v8plusb|-xarch=v8plusc + -xarch=v8plusd|-xarch=v8plusv|-xarch=v8plusm|-xarch=v9 + -xarch=v9a|-xarch=v9b|-xarch=v9c|-xarch=v9d|-xarch=v9e + -xarch=v9v|-xarch=v9m|-xarch=sparc|-xarch=sparcvis + -xarch=sparcvis2|-xarch=sparcfmaf|-xarch=sparcima + -xarch=sparcvis3|-xarch=sparcvisr|-xarch=sparc5 + -bump] [-32|-64] + [-enforce-aligned-data][-dcti-couples-detect] _Target TIC54X options:_ [-mcpu=54[123589]|-mcpu=54[56]lp] [-mfar-mode|-mf] [-merrors-to-file |-me ] - _Target TIC6X options:_ [-march=ARCH] [-mbig-endian|-mlittle-endian] [-mdsbt|-mno-dsbt] [-mpid=no|-mpid=near|-mpid=far] @@ -289,15 +314,17 @@ Command-Line Options: Invoking. _Target TILE-Gx options:_ [-m32|-m64][-EB][-EL] + _Target Visium options:_ + [-mtune=ARCH] _Target Xtensa options:_ - [-[no-]text-section-literals] [-[no-]absolute-literals] + [-[no-]text-section-literals] [-[no-]auto-litpools] + [-[no-]absolute-literals] [-[no-]target-align] [-[no-]longcalls] [-[no-]transform] [-rename-section OLDNAME=NEWNAME] [-[no-]trampolines] - _Target Z80 options:_ [-z80] [-r800] [ -ignore-undocumented-instructions] [-Wnud] @@ -360,12 +387,29 @@ Command-Line Options: Invoking. Begin in alternate macro mode. *Note `.altmacro': Altmacro. `--compress-debug-sections' - Compress DWARF debug sections using zlib. The debug sections are - renamed to begin with `.zdebug', and the resulting object file may - not be compatible with older linkers and object file utilities. + Compress DWARF debug sections using zlib with SHF_COMPRESSED from + the ELF ABI. The resulting object file may not be compatible with + older linkers and object file utilities. Note if compression + would make a given section _larger_ then it is not compressed. + +`--compress-debug-sections=none' +`--compress-debug-sections=zlib' +`--compress-debug-sections=zlib-gnu' +`--compress-debug-sections=zlib-gabi' + These options control how DWARF debug sections are compressed. + `--compress-debug-sections=none' is equivalent to + `--nocompress-debug-sections'. `--compress-debug-sections=zlib' + and `--compress-debug-sections=zlib-gabi' are equivalent to + `--compress-debug-sections'. `--compress-debug-sections=zlib-gnu' + compresses DWARF debug sections using zlib. The debug sections + are renamed to begin with `.zdebug'. Note if compression would + make a given section _larger_ then it is not compressed nor + renamed. `--nocompress-debug-sections' - Do not compress DWARF debug sections. This is the default. + Do not compress DWARF debug sections. This is usually the default + for all targets except the x86/x86_64, but a configure time option + can be used to override this. `-D' Ignored. This option is accepted for script compatibility with @@ -423,6 +467,12 @@ Command-Line Options: Invoking. `--size-check=warning' Issue an error or warning for invalid ELF .size directive. +`--elf-stt-common=no' +`--elf-stt-common=yes' + These options control whether the ELF assembler should generate + common symbols with the `STT_COMMON' type. The default can be + controlled by a configure option `--enable-elf-stt-common'. + `--help' Print a summary of the command line options and exit. @@ -462,12 +512,19 @@ Command-Line Options: Invoking. Set the maximum number of lines printed in a listing for a single line of input to NUMBER + 1. +`--no-pad-sections' + Stop the assembler for padding the ends of output sections to the + alignment of that section. The default is to pad the sections, + but this can waste space which might be needed on targets which + have tight memory constraints. + `-o OBJFILE' Name the object-file output from `as' OBJFILE. `-R' Fold the data section into the text section. +`--hash-size=NUMBER' Set the default size of GAS's hash tables to a prime number close to NUMBER. Increasing this value can reduce the length of time it takes the assembler to perform its tasks, at the expense of @@ -481,6 +538,10 @@ Command-Line Options: Invoking. synonym for `--hash-size=4051', but in the future it may have other effects as well. +`--sectname-subst' + Honor substitution sequences in section names. *Note `.section + NAME': Section Name Substitutions. + `--statistics' Print the maximum space (in bytes) and total time (in seconds) used by assembly. @@ -527,12 +588,15 @@ configured for an Alpha processor. The following options are available when as is configured for an ARC processor. -`-marc[5|6|7|8]' +`-mcpu=CPU' This option selects the core processor variant. `-EB | -EL' Select either big-endian (-EB) or little-endian (-EL) output. +`-mcode-density' + Enable Code Density extenssion instructions. + The following options are available when as is configured for the ARM processor family. @@ -937,8 +1001,15 @@ processor. `-mdspr2' `-mno-dspr2' Generate code for the DSP Release 2 Application Specific Extension. - This option implies -mdsp. This tells the assembler to accept DSP - Release 2 instructions. `-mno-dspr2' turns off this option. + This option implies `-mdsp'. This tells the assembler to accept + DSP Release 2 instructions. `-mno-dspr2' turns off this option. + +`-mdspr3' +`-mno-dspr3' + Generate code for the DSP Release 3 Application Specific Extension. + This option implies `-mdsp' and `-mdspr2'. This tells the + assembler to accept DSP Release 3 instructions. `-mno-dspr3' + turns off this option. `-mmsa' `-mno-msa' @@ -989,6 +1060,18 @@ processor. branches. By default `--no-relax-branch' is selected, causing any out-of-range branches to produce an error. +`-mignore-branch-isa' +`-mno-ignore-branch-isa' + Ignore branch checks for invalid transitions between ISA modes. + The semantics of branches does not provide for an ISA mode switch, + so in most cases the ISA mode a branch has been encoded for has to + be the same as the ISA mode of the branch's target label. + Therefore GAS has checks implemented that verify in branch + assembly that the two ISA modes match. `-mignore-branch-isa' + disables these checks. By default `-mno-ignore-branch-isa' is + selected, causing any invalid branch requiring a transition + between ISA modes to produce an error. + `-mnan=ENCODING' Select between the IEEE 754-2008 (`-mnan=2008') or the legacy (`-mnan=legacy') NaN encoding format. The latter is the default. @@ -1063,6 +1146,9 @@ configured for a NDS32 processor. *Note PowerPC-Opts::, for the options available when as is configured for a PowerPC processor. + *Note RISC-V-Opts::, for the options available when as is configured +for a RISC-V processor. + See the info pages for documentation of the RX-specific options. The following options are available when as is configured for the @@ -1079,8 +1165,10 @@ s390 processor family. Architecture (esa) or the z/Architecture mode (zarch). `-march=PROCESSOR' - Specify which s390 processor variant is the target, `g6', `g6', - `z900', `z990', `z9-109', `z9-ec', `z10', `z196', or `zEC12'. + Specify which s390 processor variant is the target, `g5' (or + `arch3'), `g6', `z900' (or `arch5'), `z990' (or `arch6'), + `z9-109', `z9-ec' (or `arch7'), `z10' (or `arch8'), `z196' (or + `arch9'), `zEC12' (or `arch10'), `z13' (or `arch11'), or `arch12'. `-mregnames' `-mno-regnames' @@ -1096,6 +1184,9 @@ configured for a TMS320C6000 processor. *Note TILE-Gx Options::, for the options available when as is configured for a TILE-Gx processor. + *Note Visium Options::, for the options available when as is +configured for a Visium processor. + *Note Xtensa Options::, for the options available when as is configured for an Xtensa processor. @@ -1317,16 +1408,32 @@ that stops the assembly. file_name:NNN:Warning Message Text -(where NNN is a line number). If a logical file name has been given -(*note `.file': File.) it is used for the filename, otherwise the name -of the current input file is used. If a logical line number was given -(*note `.line': Line.) then it is used to calculate the number printed, -otherwise the actual line in the current source file is printed. The -message text is intended to be self explanatory (in the grand Unix -tradition). +(where NNN is a line number). If both a logical file name (*note +`.file': File.) and a logical line number (*note `.line': Line.) have +been given then they will be used, otherwise the file name and line +number in the current assembler source file will be used. The message +text is intended to be self explanatory (in the grand Unix tradition). + + Note the file name must be set via the logical version of the `.file' +directive, not the DWARF2 version of the `.file' directive. For +example: + + .file 2 "bar.c" + error_assembler_source + .file "foo.c" + .line 30 + error_c_source + + produces this output: + + Assembler messages: + asm.s:2: Error: no such instruction: `error_assembler_source' + foo.c:31: Error: no such instruction: `error_c_source' Error messages have the format + file_name:NNN:FATAL:Error Message Text + The file name and line number are derived as for warning messages. The actual message text may be rather less explanatory because many of them aren't supposed to happen. @@ -1372,6 +1479,7 @@ pass, including the assembler.) * listing:: --listing-XXX to configure listing output * M:: -M or --mri to assemble in MRI compatibility mode * MD:: --MD for dependency tracking +* no-pad-sections:: --no-pad-sections to stop section padding * o:: -o to name the object file * R:: -R to join data and text sections * statistics:: --statistics to see statistics about assembly @@ -1665,7 +1773,7 @@ supported in future releases.  -File: as.info, Node: MD, Next: o, Prev: M, Up: Invoking +File: as.info, Node: MD, Next: no-pad-sections, Prev: M, Up: Invoking 2.10 Dependency Tracking: `--MD' ================================ @@ -1679,9 +1787,20 @@ dependencies of the main source file. This feature is used in the automatic updating of makefiles.  -File: as.info, Node: o, Next: R, Prev: MD, Up: Invoking +File: as.info, Node: no-pad-sections, Next: o, Prev: MD, Up: Invoking -2.11 Name the Object File: `-o' +2.11 Output Section Padding +=========================== + +Normally the assembler will pad the end of each output section up to its +alignment boundary. But this can waste space, which can be significant +on memory constrained targets. So the `--no-pad-sections' option will +disable this behaviour. + + +File: as.info, Node: o, Next: R, Prev: no-pad-sections, Up: Invoking + +2.12 Name the Object File: `-o' =============================== There is always one object file output when you run `as'. By default @@ -1695,7 +1814,7 @@ file of the same name.  File: as.info, Node: R, Next: statistics, Prev: o, Up: Invoking -2.12 Join Data and Text Sections: `-R' +2.13 Join Data and Text Sections: `-R' ====================================== `-R' tells `as' to write the object file as if all data-section data @@ -1719,7 +1838,7 @@ generates a warning from `as'.  File: as.info, Node: statistics, Next: traditional-format, Prev: R, Up: Invoking -2.13 Display Assembly Statistics: `--statistics' +2.14 Display Assembly Statistics: `--statistics' ================================================ Use `--statistics' to display two statistics about the resources used by @@ -1730,7 +1849,7 @@ seconds).  File: as.info, Node: traditional-format, Next: v, Prev: statistics, Up: Invoking -2.14 Compatible Output: `--traditional-format' +2.15 Compatible Output: `--traditional-format' ============================================== For some targets, the output of `as' is different in some ways from the @@ -1743,7 +1862,7 @@ the traditional format instead.  File: as.info, Node: v, Next: W, Prev: traditional-format, Up: Invoking -2.15 Announce Version: `-v' +2.16 Announce Version: `-v' =========================== You can find out what version of as is running by including the option @@ -1752,7 +1871,7 @@ You can find out what version of as is running by including the option  File: as.info, Node: W, Next: Z, Prev: v, Up: Invoking -2.16 Control Warnings: `-W', `--warn', `--no-warn', `--fatal-warnings' +2.17 Control Warnings: `-W', `--warn', `--no-warn', `--fatal-warnings' ====================================================================== `as' should never give a warning or error message when assembling @@ -1774,7 +1893,7 @@ causes warnings to be output as usual.  File: as.info, Node: Z, Prev: W, Up: Invoking -2.17 Generate Object File in Spite of Errors: `-Z' +2.18 Generate Object File in Spite of Errors: `-Z' ================================================== After an error message, `as' normally produces no output. If for some @@ -1825,7 +1944,7 @@ else you may get from your C compiler's preprocessor. You can do include file processing with the `.include' directive (*note `.include': Include.). You can use the GNU C compiler driver to get other "CPP" style preprocessing by giving the input file a `.S' suffix. -*Note Options Controlling the Kind of Output: (gcc.info)Overall +*Note Options Controlling the Kind of Output: (gcc info)Overall Options. Excess whitespace, comments, and character constants cannot be used @@ -1910,11 +2029,16 @@ A "symbol" is one or more characters chosen from the set of all letters (both upper and lower case), digits and the three characters `_.$'. On most machines, you can also use `$' in symbol names; exceptions are noted in *Note Machine Dependencies::. No symbol may begin with a -digit. Case is significant. There is no length limit: all characters +digit. Case is significant. There is no length limit; all characters are significant. Multibyte characters are supported. Symbols are delimited by characters not in that set, or by the beginning of a file (since the source program must end with a newline, the end of a file is -not a possible symbol delimiter). *Note Symbols::. +not a possible symbol delimiter). *Note Symbols::. + +Symbol names may also be enclosed in double quote `"' characters. In +such cases any characters are allowed, except for the NUL character. +If a double quote character is to be included in the symbol name it +must be preceeded by a backslash `\' character.  File: as.info, Node: Statements, Next: Constants, Prev: Symbol Intro, Up: Syntax @@ -2013,7 +2137,7 @@ of escapes follows. `\b' Mnemonic for backspace; for ASCII this is octal code 010. -`\f' +`backslash-f' Mnemonic for FormFeed; for ASCII this is octal code 014. `\n' @@ -2062,15 +2186,16 @@ File: as.info, Node: Chars, Prev: Strings, Up: Characters .................. A single character may be written as a single quote immediately -followed by that character. The same escapes apply to characters as to -strings. So if you want to write the character backslash, you must -write `'\\' where the first `\' escapes the second `\'. As you can -see, the quote is an acute accent, not a grave accent. A newline -immediately following an acute accent is taken as a literal character -and does not count as the end of a statement. The value of a character -constant in a numeric expression is the machine's byte-wide code for -that character. `as' assumes your character code is ASCII: `'A' means -65, `'B' means 66, and so on. +followed by that character. Some backslash escapes apply to +characters, `\b', `\f', `\n', `\r', `\t', and `\"' with the same meaning +as for strings, plus `\'' for a single quote. So if you want to write +the character backslash, you must write `'\\' where the first `\' +escapes the second `\'. As you can see, the quote is an acute accent, +not a grave accent. A newline immediately following an acute accent is +taken as a literal character and does not count as the end of a +statement. The value of a character constant in a numeric expression +is the machine's byte-wide code for that character. `as' assumes your +character code is ASCII: `'A' means 65, `'B' means 66, and so on.  File: as.info, Node: Numbers, Prev: Characters, Up: Constants @@ -2533,6 +2658,9 @@ particular target machine), and underscores. Case of letters is significant: `foo' is a different symbol name than `Foo'. + Symbol names do not start with a digit. An exception to this rule +is made for Local Labels. See below. + Multibyte characters are supported. To generate a symbol name containing multibyte characters enclose it within double quotes and use escape codes. cf *Note Strings::. Generating a multibyte symbol name @@ -2553,19 +2681,20 @@ of local label prefixes. On the HPPA local symbols begin with `L$'. Local symbols are defined and used within the assembler, but they are normally not saved in object files. Thus, they are not visible when debugging. You may use the `-L' option (*note Include Local Symbols: -`-L': L.) to retain the local symbols in the object files. +L.) to retain the local symbols in the object files. Local Labels ------------ -Local labels help compilers and programmers use names temporarily. -They create symbols which are guaranteed to be unique over the entire -scope of the input source code and which can be referred to by a simple -notation. To define a local label, write a label of the form `N:' -(where N represents any positive integer). To refer to the most recent +Local labels are different from local symbols. Local labels help +compilers and programmers use names temporarily. They create symbols +which are guaranteed to be unique over the entire scope of the input +source code and which can be referred to by a simple notation. To +define a local label, write a label of the form `N:' (where N +represents any non-negative integer). To refer to the most recent previous definition of that label write `Nb', using the same number as when you defined the label. To refer to the next definition of a local -label, write `Nf'--the `b' stands for "backwards" and the `f' stands +label, write `Nf'. The `b' stands for "backwards" and the `f' stands for "forwards". There is no restriction on how you can use these labels, and you can @@ -2628,12 +2757,12 @@ names are constructed using these parts: Dollar Local Labels ------------------- -`as' also supports an even more local form of local labels called -dollar labels. These labels go out of scope (i.e., they become -undefined) as soon as a non-local label is defined. Thus they remain -valid for only a small region of the input source code. Normal local -labels, by contrast, remain in scope for the entire file, or until they -are redefined by another occurrence of the same local label. +On some targets `as' also supports an even more local form of local +labels called dollar labels. These labels go out of scope (i.e., they +become undefined) as soon as a non-local label is defined. Thus they +remain valid for only a small region of the input source code. Normal +local labels, by contrast, remain in scope for the entire file, or +until they are redefined by another occurrence of the same local label. Dollar labels are defined in exactly the same way as ordinary local labels, except that they have a dollar sign suffix to their numeric @@ -2987,7 +3116,8 @@ File: as.info, Node: Pseudo Ops, Next: Object Attributes, Prev: Expressions, ********************** All assembler directives have names that begin with a period (`.'). -The rest of the name is letters, usually in lower case. +The names are case insensitive for most targets, and usually written in +lower case. This chapter discusses directives that are available regardless of the target machine configuration for the GNU assembler. Some machine @@ -3005,7 +3135,7 @@ Dependencies::. * Ascii:: `.ascii "STRING"'... * Asciz:: `.asciz "STRING"'... * Balign:: `.balign ABS-EXPR , ABS-EXPR' -* Bundle directives:: `.bundle_align_mode ABS-EXPR', `.bundle_lock', `.bundle_unlock' +* Bundle directives:: `.bundle_align_mode ABS-EXPR', etc * Byte:: `.byte EXPRESSIONS' * CFI directives:: `.cfi_startproc [simple]', `.cfi_endproc', etc. * Comm:: `.comm SYMBOL , LENGTH ' @@ -3141,6 +3271,8 @@ Dependencies::. * Weak:: `.weak NAMES' * Weakref:: `.weakref ALIAS, SYMBOL' * Word:: `.word EXPRESSIONS' + +* Zero:: `.zero SIZE' * Deprecated:: Deprecated Directives  @@ -3305,8 +3437,11 @@ bytes depends upon the endianness of the processor). If it skips 1 or  File: as.info, Node: Bundle directives, Next: Byte, Prev: Balign, Up: Pseudo Ops -7.8 `.bundle_align_mode ABS-EXPR' -================================= +7.8 Bundle directives +===================== + +7.8.1 `.bundle_align_mode ABS-EXPR' +----------------------------------- `.bundle_align_mode' enables or disables "aligned instruction bundle" mode. In this mode, sequences of adjacent instructions are grouped @@ -3327,8 +3462,8 @@ at the end of that bundle is filled with no-op instructions so the instruction starts in the next bundle. As a corollary, it's an error if any single instruction's encoding is longer than the bundle size. -7.9 `.bundle_lock' and `.bundle_unlock' -======================================= +7.8.2 `.bundle_lock' and `.bundle_unlock' +----------------------------------------- The `.bundle_lock' and directive `.bundle_unlock' directives allow explicit control over instruction bundle padding. These directives are @@ -3359,8 +3494,8 @@ by another closing `.bundle_unlock' so that there is the same number of  File: as.info, Node: Byte, Next: CFI directives, Prev: Bundle directives, Up: Pseudo Ops -7.10 `.byte EXPRESSIONS' -======================== +7.9 `.byte EXPRESSIONS' +======================= `.byte' expects zero or more expressions, separated by commas. Each expression is assembled into the next byte. @@ -3368,8 +3503,11 @@ expression is assembled into the next byte.  File: as.info, Node: CFI directives, Next: Comm, Prev: Byte, Up: Pseudo Ops -7.11 `.cfi_sections SECTION_LIST' -================================= +7.10 CFI directives +=================== + +7.10.1 `.cfi_sections SECTION_LIST' +----------------------------------- `.cfi_sections' may be used to specify whether CFI directives should emit `.eh_frame' section and/or `.debug_frame' section. If @@ -3378,8 +3516,19 @@ SECTION_LIST is `.eh_frame', `.eh_frame' is emitted, if SECTION_LIST is `.eh_frame, .debug_frame'. The default if this directive is not used is `.cfi_sections .eh_frame'. -7.12 `.cfi_startproc [simple]' -============================== + On targets that support compact unwinding tables these can be +generated by specifying `.eh_frame_entry' instead of `.eh_frame'. + + Some targets may support an additional name, such as `.c6xabi.exidx' +which is used by the target. + + The `.cfi_sections' directive can be repeated, with the same or +different arguments, provided that CFI generation has not yet started. +Once CFI generation has started however the section list is fixed and +any attempts to redefine it will result in an error. + +7.10.2 `.cfi_startproc [simple]' +-------------------------------- `.cfi_startproc' is used at the beginning of each function that should have an entry in `.eh_frame'. It initializes some internal data @@ -3388,15 +3537,15 @@ structures. Don't forget to close the function by `.cfi_endproc'. Unless `.cfi_startproc' is used along with parameter `simple' it also emits some architecture dependent initial CFI instructions. -7.13 `.cfi_endproc' -=================== +7.10.3 `.cfi_endproc' +--------------------- `.cfi_endproc' is used at the end of a function where it closes its unwind entry previously opened by `.cfi_startproc', and emits it to `.eh_frame'. -7.14 `.cfi_personality ENCODING [, EXP]' -======================================== +7.10.4 `.cfi_personality ENCODING [, EXP]' +------------------------------------------ `.cfi_personality' defines personality routine and its encoding. ENCODING must be a constant determining how the personality should be @@ -3407,109 +3556,188 @@ location where personality can be loaded from, not the personality routine itself. The default after `.cfi_startproc' is `.cfi_personality 0xff', no personality routine. -7.15 `.cfi_lsda ENCODING [, EXP]' -================================= +7.10.5 `.cfi_personality_id ID' +------------------------------- + +`cfi_personality_id' defines a personality routine by its index as +defined in a compact unwinding format. Only valid when generating +compact EH frames (i.e. with `.cfi_sections eh_frame_entry'. + +7.10.6 `.cfi_fde_data [OPCODE1 [, ...]]' +---------------------------------------- + +`cfi_fde_data' is used to describe the compact unwind opcodes to be +used for the current function. These are emitted inline in the +`.eh_frame_entry' section if small enough and there is no LSDA, or in +the `.gnu.extab' section otherwise. Only valid when generating compact +EH frames (i.e. with `.cfi_sections eh_frame_entry'. + +7.10.7 `.cfi_lsda ENCODING [, EXP]' +----------------------------------- `.cfi_lsda' defines LSDA and its encoding. ENCODING must be a constant determining how the LSDA should be encoded. If it is 255 -(`DW_EH_PE_omit'), second argument is not present, otherwise second -argument should be a constant or a symbol name. The default after -`.cfi_startproc' is `.cfi_lsda 0xff', no LSDA. +(`DW_EH_PE_omit'), the second argument is not present, otherwise the +second argument should be a constant or a symbol name. The default +after `.cfi_startproc' is `.cfi_lsda 0xff', meaning that no LSDA is +present. -7.16 `.cfi_def_cfa REGISTER, OFFSET' -==================================== +7.10.8 `.cfi_inline_lsda' [ALIGN] +--------------------------------- + +`.cfi_inline_lsda' marks the start of a LSDA data section and switches +to the corresponding `.gnu.extab' section. Must be preceded by a CFI +block containing a `.cfi_lsda' directive. Only valid when generating +compact EH frames (i.e. with `.cfi_sections eh_frame_entry'. + + The table header and unwinding opcodes will be generated at this +point, so that they are immediately followed by the LSDA data. The +symbol referenced by the `.cfi_lsda' directive should still be defined +in case a fallback FDE based encoding is used. The LSDA data is +terminated by a section directive. + + The optional ALIGN argument specifies the alignment required. The +alignment is specified as a power of two, as with the `.p2align' +directive. + +7.10.9 `.cfi_def_cfa REGISTER, OFFSET' +-------------------------------------- `.cfi_def_cfa' defines a rule for computing CFA as: take address from REGISTER and add OFFSET to it. -7.17 `.cfi_def_cfa_register REGISTER' -===================================== +7.10.10 `.cfi_def_cfa_register REGISTER' +---------------------------------------- `.cfi_def_cfa_register' modifies a rule for computing CFA. From now on REGISTER will be used instead of the old one. Offset remains the same. -7.18 `.cfi_def_cfa_offset OFFSET' -================================= +7.10.11 `.cfi_def_cfa_offset OFFSET' +------------------------------------ `.cfi_def_cfa_offset' modifies a rule for computing CFA. Register remains the same, but OFFSET is new. Note that it is the absolute offset that will be added to a defined register to compute CFA address. -7.19 `.cfi_adjust_cfa_offset OFFSET' -==================================== +7.10.12 `.cfi_adjust_cfa_offset OFFSET' +--------------------------------------- Same as `.cfi_def_cfa_offset' but OFFSET is a relative value that is added/substracted from the previous offset. -7.20 `.cfi_offset REGISTER, OFFSET' -=================================== +7.10.13 `.cfi_offset REGISTER, OFFSET' +-------------------------------------- Previous value of REGISTER is saved at offset OFFSET from CFA. -7.21 `.cfi_rel_offset REGISTER, OFFSET' -======================================= +7.10.14 `.cfi_val_offset REGISTER, OFFSET' +------------------------------------------ + +Previous value of REGISTER is CFA + OFFSET. + +7.10.15 `.cfi_rel_offset REGISTER, OFFSET' +------------------------------------------ Previous value of REGISTER is saved at offset OFFSET from the current CFA register. This is transformed to `.cfi_offset' using the known displacement of the CFA register from the CFA. This is often easier to use, because the number will match the code it's annotating. -7.22 `.cfi_register REGISTER1, REGISTER2' -========================================= +7.10.16 `.cfi_register REGISTER1, REGISTER2' +-------------------------------------------- Previous value of REGISTER1 is saved in register REGISTER2. -7.23 `.cfi_restore REGISTER' -============================ +7.10.17 `.cfi_restore REGISTER' +------------------------------- `.cfi_restore' says that the rule for REGISTER is now the same as it was at the beginning of the function, after all initial instruction added by `.cfi_startproc' were executed. -7.24 `.cfi_undefined REGISTER' -============================== +7.10.18 `.cfi_undefined REGISTER' +--------------------------------- From now on the previous value of REGISTER can't be restored anymore. -7.25 `.cfi_same_value REGISTER' -=============================== +7.10.19 `.cfi_same_value REGISTER' +---------------------------------- Current value of REGISTER is the same like in the previous frame, i.e. no restoration needed. -7.26 `.cfi_remember_state', -=========================== +7.10.20 `.cfi_remember_state' and `.cfi_restore_state' +------------------------------------------------------ -First save all current rules for all registers by `.cfi_remember_state', -then totally screw them up by subsequent `.cfi_*' directives and when -everything is hopelessly bad, use `.cfi_restore_state' to restore the -previous saved state. +`.cfi_remember_state' pushes the set of rules for every register onto an +implicit stack, while `.cfi_restore_state' pops them off the stack and +places them in the current row. This is useful for situations where +you have multiple `.cfi_*' directives that need to be undone due to the +control flow of the program. For example, we could have something like +this (assuming the CFA is the value of `rbp'): -7.27 `.cfi_return_column REGISTER' -================================== + je label + popq %rbx + .cfi_restore %rbx + popq %r12 + .cfi_restore %r12 + popq %rbp + .cfi_restore %rbp + .cfi_def_cfa %rsp, 8 + ret + label: + /* Do something else */ + + Here, we want the `.cfi' directives to affect only the rows +corresponding to the instructions before `label'. This means we'd have +to add multiple `.cfi' directives after `label' to recreate the +original save locations of the registers, as well as setting the CFA +back to the value of `rbp'. This would be clumsy, and result in a +larger binary size. Instead, we can write: + + je label + popq %rbx + .cfi_remember_state + .cfi_restore %rbx + popq %r12 + .cfi_restore %r12 + popq %rbp + .cfi_restore %rbp + .cfi_def_cfa %rsp, 8 + ret + label: + .cfi_restore_state + /* Do something else */ + + That way, the rules for the instructions after `label' will be the +same as before the first `.cfi_restore' without having to use multiple +`.cfi' directives. + +7.10.21 `.cfi_return_column REGISTER' +------------------------------------- Change return column REGISTER, i.e. the return address is either directly in REGISTER or can be accessed by rules for REGISTER. -7.28 `.cfi_signal_frame' -======================== +7.10.22 `.cfi_signal_frame' +--------------------------- Mark current function as signal trampoline. -7.29 `.cfi_window_save' -======================= +7.10.23 `.cfi_window_save' +-------------------------- SPARC register window has been saved. -7.30 `.cfi_escape' EXPRESSION[, ...] -==================================== +7.10.24 `.cfi_escape' EXPRESSION[, ...] +--------------------------------------- Allows the user to add arbitrary bytes to the unwind info. One might use this to add OS-specific CFI opcodes, or generic CFI opcodes that GAS does not yet support. -7.31 `.cfi_val_encoded_addr REGISTER, ENCODING, LABEL' -====================================================== +7.10.25 `.cfi_val_encoded_addr REGISTER, ENCODING, LABEL' +--------------------------------------------------------- The current value of REGISTER is LABEL. The value of LABEL will be encoded in the output file according to ENCODING; see the description @@ -3524,7 +3752,7 @@ another register.  File: as.info, Node: Comm, Next: Data, Prev: CFI directives, Up: Pseudo Ops -7.32 `.comm SYMBOL , LENGTH ' +7.11 `.comm SYMBOL , LENGTH ' ============================= `.comm' declares a common symbol named SYMBOL. When linking, a common @@ -3564,7 +3792,7 @@ strictly aligned.  File: as.info, Node: Data, Next: Def, Prev: Comm, Up: Pseudo Ops -7.33 `.data SUBSECTION' +7.12 `.data SUBSECTION' ======================= `.data' tells `as' to assemble the following statements onto the end of @@ -3574,7 +3802,7 @@ expression). If SUBSECTION is omitted, it defaults to zero.  File: as.info, Node: Def, Next: Desc, Prev: Data, Up: Pseudo Ops -7.34 `.def NAME' +7.13 `.def NAME' ================ Begin defining debugging information for a symbol NAME; the definition @@ -3583,7 +3811,7 @@ extends until the `.endef' directive is encountered.  File: as.info, Node: Desc, Next: Dim, Prev: Def, Up: Pseudo Ops -7.35 `.desc SYMBOL, ABS-EXPRESSION' +7.14 `.desc SYMBOL, ABS-EXPRESSION' =================================== This directive sets the descriptor of the symbol (*note Symbol @@ -3597,7 +3825,7 @@ configured for COFF.  File: as.info, Node: Dim, Next: Double, Prev: Desc, Up: Pseudo Ops -7.36 `.dim' +7.15 `.dim' =========== This directive is generated by compilers to include auxiliary debugging @@ -3607,7 +3835,7 @@ information in the symbol table. It is only permitted inside  File: as.info, Node: Double, Next: Eject, Prev: Dim, Up: Pseudo Ops -7.37 `.double FLONUMS' +7.16 `.double FLONUMS' ====================== `.double' expects zero or more flonums, separated by commas. It @@ -3618,7 +3846,7 @@ Dependencies::.  File: as.info, Node: Eject, Next: Else, Prev: Double, Up: Pseudo Ops -7.38 `.eject' +7.17 `.eject' ============= Force a page break at this point, when generating assembly listings. @@ -3626,7 +3854,7 @@ Force a page break at this point, when generating assembly listings.  File: as.info, Node: Else, Next: Elseif, Prev: Eject, Up: Pseudo Ops -7.39 `.else' +7.18 `.else' ============ `.else' is part of the `as' support for conditional assembly; see *Note @@ -3636,7 +3864,7 @@ if the condition for the preceding `.if' was false.  File: as.info, Node: Elseif, Next: End, Prev: Else, Up: Pseudo Ops -7.40 `.elseif' +7.19 `.elseif' ============== `.elseif' is part of the `as' support for conditional assembly; see @@ -3646,7 +3874,7 @@ would otherwise fill the entire `.else' section.  File: as.info, Node: End, Next: Endef, Prev: Elseif, Up: Pseudo Ops -7.41 `.end' +7.20 `.end' =========== `.end' marks the end of the assembly file. `as' does not process @@ -3655,7 +3883,7 @@ anything in the file past the `.end' directive.  File: as.info, Node: Endef, Next: Endfunc, Prev: End, Up: Pseudo Ops -7.42 `.endef' +7.21 `.endef' ============= This directive flags the end of a symbol definition begun with `.def'. @@ -3663,7 +3891,7 @@ This directive flags the end of a symbol definition begun with `.def'.  File: as.info, Node: Endfunc, Next: Endif, Prev: Endef, Up: Pseudo Ops -7.43 `.endfunc' +7.22 `.endfunc' =============== `.endfunc' marks the end of a function specified with `.func'. @@ -3671,7 +3899,7 @@ File: as.info, Node: Endfunc, Next: Endif, Prev: Endef, Up: Pseudo Ops  File: as.info, Node: Endif, Next: Equ, Prev: Endfunc, Up: Pseudo Ops -7.44 `.endif' +7.23 `.endif' ============= `.endif' is part of the `as' support for conditional assembly; it marks @@ -3681,7 +3909,7 @@ the end of a block of code that is only assembled conditionally. *Note  File: as.info, Node: Equ, Next: Equiv, Prev: Endif, Up: Pseudo Ops -7.45 `.equ SYMBOL, EXPRESSION' +7.24 `.equ SYMBOL, EXPRESSION' ============================== This directive sets the value of SYMBOL to EXPRESSION. It is @@ -3696,7 +3924,7 @@ protected from later redefinition. Compare *Note Equiv::.  File: as.info, Node: Equiv, Next: Eqv, Prev: Equ, Up: Pseudo Ops -7.46 `.equiv SYMBOL, EXPRESSION' +7.25 `.equiv SYMBOL, EXPRESSION' ================================ The `.equiv' directive is like `.equ' and `.set', except that the @@ -3715,7 +3943,7 @@ equivalent to  File: as.info, Node: Eqv, Next: Err, Prev: Equiv, Up: Pseudo Ops -7.47 `.eqv SYMBOL, EXPRESSION' +7.26 `.eqv SYMBOL, EXPRESSION' ============================== The `.eqv' directive is like `.equiv', but no attempt is made to @@ -3726,7 +3954,7 @@ current value is taken.  File: as.info, Node: Err, Next: Error, Prev: Eqv, Up: Pseudo Ops -7.48 `.err' +7.27 `.err' =========== If `as' assembles a `.err' directive, it will print an error message @@ -3737,7 +3965,7 @@ code.  File: as.info, Node: Error, Next: Exitm, Prev: Err, Up: Pseudo Ops -7.49 `.error "STRING"' +7.28 `.error "STRING"' ====================== Similarly to `.err', this directive emits an error, but you can specify @@ -3750,7 +3978,7 @@ source file"'. *Note Error and Warning Messages: Errors.  File: as.info, Node: Exitm, Next: Extern, Prev: Error, Up: Pseudo Ops -7.50 `.exitm' +7.29 `.exitm' ============= Exit early from the current macro definition. *Note Macro::. @@ -3758,7 +3986,7 @@ Exit early from the current macro definition. *Note Macro::.  File: as.info, Node: Extern, Next: Fail, Prev: Exitm, Up: Pseudo Ops -7.51 `.extern' +7.30 `.extern' ============== `.extern' is accepted in the source program--for compatibility with @@ -3768,7 +3996,7 @@ as external.  File: as.info, Node: Fail, Next: File, Prev: Extern, Up: Pseudo Ops -7.52 `.fail EXPRESSION' +7.31 `.fail EXPRESSION' ======================= Generates an error or a warning. If the value of the EXPRESSION is 500 @@ -3780,7 +4008,7 @@ nested macros or conditional assembly.  File: as.info, Node: File, Next: Fill, Prev: Fail, Up: Pseudo Ops -7.53 `.file' +7.32 `.file' ============ There are two different versions of the `.file' directive. Targets @@ -3821,7 +4049,7 @@ that table entries will have.  File: as.info, Node: Fill, Next: Float, Prev: File, Up: Pseudo Ops -7.54 `.fill REPEAT , SIZE , VALUE' +7.33 `.fill REPEAT , SIZE , VALUE' ================================== REPEAT, SIZE and VALUE are absolute expressions. This emits REPEAT @@ -3842,7 +4070,7 @@ are absent, SIZE is assumed to be 1.  File: as.info, Node: Float, Next: Func, Prev: Fill, Up: Pseudo Ops -7.55 `.float FLONUMS' +7.34 `.float FLONUMS' ===================== This directive assembles zero or more flonums, separated by commas. It @@ -3853,7 +4081,7 @@ Dependencies::.  File: as.info, Node: Func, Next: Global, Prev: Float, Up: Pseudo Ops -7.56 `.func NAME[,LABEL]' +7.35 `.func NAME[,LABEL]' ========================= `.func' emits debugging information to denote function NAME, and is @@ -3867,7 +4095,7 @@ function must be terminated with `.endfunc'.  File: as.info, Node: Global, Next: Gnu_attribute, Prev: Func, Up: Pseudo Ops -7.57 `.global SYMBOL', `.globl SYMBOL' +7.36 `.global SYMBOL', `.globl SYMBOL' ====================================== `.global' makes the symbol visible to `ld'. If you define SYMBOL in @@ -3886,7 +4114,7 @@ as well. *Note HPPA Assembler Directives: HPPA Directives.  File: as.info, Node: Gnu_attribute, Next: Hidden, Prev: Global, Up: Pseudo Ops -7.58 `.gnu_attribute TAG,VALUE' +7.37 `.gnu_attribute TAG,VALUE' =============================== Record a GNU object attribute for this file. *Note Object Attributes::. @@ -3894,7 +4122,7 @@ Record a GNU object attribute for this file. *Note Object Attributes::.  File: as.info, Node: Hidden, Next: hword, Prev: Gnu_attribute, Up: Pseudo Ops -7.59 `.hidden NAMES' +7.38 `.hidden NAMES' ==================== This is one of the ELF visibility directives. The other two are @@ -3910,7 +4138,7 @@ to other components. Such symbols are always considered to be  File: as.info, Node: hword, Next: Ident, Prev: Hidden, Up: Pseudo Ops -7.60 `.hword EXPRESSIONS' +7.39 `.hword EXPRESSIONS' ========================= This expects zero or more EXPRESSIONS, and emits a 16 bit number for @@ -3922,7 +4150,7 @@ architecture, it may also be a synonym for `.word'.  File: as.info, Node: Ident, Next: If, Prev: hword, Up: Pseudo Ops -7.61 `.ident' +7.40 `.ident' ============= This directive is used by some assemblers to place tags in object @@ -3936,7 +4164,7 @@ using ELF, comments are emitted to the `.comment' section.  File: as.info, Node: If, Next: Incbin, Prev: Ident, Up: Pseudo Ops -7.62 `.if ABSOLUTE EXPRESSION' +7.41 `.if ABSOLUTE EXPRESSION' ============================== `.if' marks the beginning of a section of code which is only considered @@ -4017,7 +4245,7 @@ each subsequent `.else' block.  File: as.info, Node: Incbin, Next: Include, Prev: If, Up: Pseudo Ops -7.63 `.incbin "FILE"[,SKIP[,COUNT]]' +7.42 `.incbin "FILE"[,SKIP[,COUNT]]' ==================================== The `incbin' directive includes FILE verbatim at the current location. @@ -4034,7 +4262,7 @@ before and after the `incbin' directive.  File: as.info, Node: Include, Next: Int, Prev: Incbin, Up: Pseudo Ops -7.64 `.include "FILE"' +7.43 `.include "FILE"' ====================== This directive provides a way to include supporting files at specified @@ -4048,7 +4276,7 @@ FILE.  File: as.info, Node: Int, Next: Internal, Prev: Include, Up: Pseudo Ops -7.65 `.int EXPRESSIONS' +7.44 `.int EXPRESSIONS' ======================= Expect zero or more EXPRESSIONS, of any section, separated by commas. @@ -4059,7 +4287,7 @@ what kind of target the assembly is for.  File: as.info, Node: Internal, Next: Irp, Prev: Int, Up: Pseudo Ops -7.66 `.internal NAMES' +7.45 `.internal NAMES' ====================== This is one of the ELF visibility directives. The other two are @@ -4076,7 +4304,7 @@ upon the symbols as well.  File: as.info, Node: Irp, Next: Irpc, Prev: Internal, Up: Pseudo Ops -7.67 `.irp SYMBOL,VALUES'... +7.46 `.irp SYMBOL,VALUES'... ============================ Evaluate a sequence of statements assigning different values to SYMBOL. @@ -4104,7 +4332,7 @@ statements, use \SYMBOL.  File: as.info, Node: Irpc, Next: Lcomm, Prev: Irp, Up: Pseudo Ops -7.68 `.irpc SYMBOL,VALUES'... +7.47 `.irpc SYMBOL,VALUES'... ============================= Evaluate a sequence of statements assigning different values to SYMBOL. @@ -4133,7 +4361,7 @@ at *Note Macro::.  File: as.info, Node: Lcomm, Next: Lflags, Prev: Irpc, Up: Pseudo Ops -7.69 `.lcomm SYMBOL , LENGTH' +7.48 `.lcomm SYMBOL , LENGTH' ============================= Reserve LENGTH (an absolute expression) bytes for a local common @@ -4152,7 +4380,7 @@ section.  File: as.info, Node: Lflags, Next: Line, Prev: Lcomm, Up: Pseudo Ops -7.70 `.lflags' +7.49 `.lflags' ============== `as' accepts this directive, for compatibility with other assemblers, @@ -4161,7 +4389,7 @@ but ignores it.  File: as.info, Node: Line, Next: Linkonce, Prev: Lflags, Up: Pseudo Ops -7.71 `.line LINE-NUMBER' +7.50 `.line LINE-NUMBER' ======================== Change the logical line number. LINE-NUMBER must be an absolute @@ -4182,7 +4410,7 @@ compilers to generate auxiliary symbol information for debugging.  File: as.info, Node: Linkonce, Next: List, Prev: Line, Up: Pseudo Ops -7.72 `.linkonce [TYPE]' +7.51 `.linkonce [TYPE]' ======================= Mark the current section so that the linker only includes a single copy @@ -4217,7 +4445,7 @@ following strings. For example:  File: as.info, Node: List, Next: Ln, Prev: Linkonce, Up: Pseudo Ops -7.73 `.list' +7.52 `.list' ============ Control (in conjunction with the `.nolist' directive) whether or not @@ -4233,7 +4461,7 @@ initial value of the listing counter is one.  File: as.info, Node: Ln, Next: Loc, Prev: List, Up: Pseudo Ops -7.74 `.ln LINE-NUMBER' +7.53 `.ln LINE-NUMBER' ====================== `.ln' is a synonym for `.line'. @@ -4241,7 +4469,7 @@ File: as.info, Node: Ln, Next: Loc, Prev: List, Up: Pseudo Ops  File: as.info, Node: Loc, Next: Loc_mark_labels, Prev: Ln, Up: Pseudo Ops -7.75 `.loc FILENO LINENO [COLUMN] [OPTIONS]' +7.54 `.loc FILENO LINENO [COLUMN] [OPTIONS]' ============================================ When emitting DWARF2 line number information, the `.loc' directive will @@ -4281,7 +4509,7 @@ machine before the row is added.  File: as.info, Node: Loc_mark_labels, Next: Local, Prev: Loc, Up: Pseudo Ops -7.76 `.loc_mark_labels ENABLE' +7.55 `.loc_mark_labels ENABLE' ============================== When emitting DWARF2 line number information, the `.loc_mark_labels' @@ -4293,7 +4521,7 @@ or 0, to enable or disable this function respectively.  File: as.info, Node: Local, Next: Long, Prev: Loc_mark_labels, Up: Pseudo Ops -7.77 `.local NAMES' +7.56 `.local NAMES' =================== This directive, which is available for ELF targets, marks each symbol in @@ -4309,7 +4537,7 @@ Comm::) to define aligned local common data.  File: as.info, Node: Long, Next: Macro, Prev: Local, Up: Pseudo Ops -7.78 `.long EXPRESSIONS' +7.57 `.long EXPRESSIONS' ======================== `.long' is the same as `.int'. *Note `.int': Int. @@ -4317,7 +4545,7 @@ File: as.info, Node: Long, Next: Macro, Prev: Local, Up: Pseudo Ops  File: as.info, Node: Macro, Next: MRI, Prev: Long, Up: Pseudo Ops -7.79 `.macro' +7.58 `.macro' ============= The commands `.macro' and `.endm' allow you to define macros that @@ -4470,7 +4698,7 @@ With that definition, `SUM 0,5' is equivalent to this assembly input:  File: as.info, Node: MRI, Next: Noaltmacro, Prev: Macro, Up: Pseudo Ops -7.80 `.mri VAL' +7.59 `.mri VAL' =============== If VAL is non-zero, this tells `as' to enter MRI mode. If VAL is zero, @@ -4481,7 +4709,7 @@ MRI mode: M.  File: as.info, Node: Noaltmacro, Next: Nolist, Prev: MRI, Up: Pseudo Ops -7.81 `.noaltmacro' +7.60 `.noaltmacro' ================== Disable alternate macro mode. *Note Altmacro::. @@ -4489,7 +4717,7 @@ Disable alternate macro mode. *Note Altmacro::.  File: as.info, Node: Nolist, Next: Octa, Prev: Noaltmacro, Up: Pseudo Ops -7.82 `.nolist' +7.61 `.nolist' ============== Control (in conjunction with the `.list' directive) whether or not @@ -4501,7 +4729,7 @@ whenever the counter is greater than zero.  File: as.info, Node: Octa, Next: Offset, Prev: Nolist, Up: Pseudo Ops -7.83 `.octa BIGNUMS' +7.62 `.octa BIGNUMS' ==================== This directive expects zero or more bignums, separated by commas. For @@ -4513,7 +4741,7 @@ hence _octa_-word for 16 bytes.  File: as.info, Node: Offset, Next: Org, Prev: Octa, Up: Pseudo Ops -7.84 `.offset LOC' +7.63 `.offset LOC' ================== Set the location counter to LOC in the absolute section. LOC must be @@ -4524,7 +4752,7 @@ directive.  File: as.info, Node: Org, Next: P2align, Prev: Offset, Up: Pseudo Ops -7.85 `.org NEW-LC , FILL' +7.64 `.org NEW-LC , FILL' ========================= Advance the location counter of the current section to NEW-LC. NEW-LC @@ -4553,7 +4781,7 @@ expression. If the comma and FILL are omitted, FILL defaults to zero.  File: as.info, Node: P2align, Next: PopSection, Prev: Org, Up: Pseudo Ops -7.86 `.p2align[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR' +7.65 `.p2align[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR' ================================================ Pad the location counter (in the current subsection) to a particular @@ -4590,7 +4818,7 @@ bytes depends upon the endianness of the processor). If it skips 1 or  File: as.info, Node: PopSection, Next: Previous, Prev: P2align, Up: Pseudo Ops -7.87 `.popsection' +7.66 `.popsection' ================== This is one of the ELF section stack manipulation directives. The @@ -4605,7 +4833,7 @@ popped off the stack.  File: as.info, Node: Previous, Next: Print, Prev: PopSection, Up: Pseudo Ops -7.88 `.previous' +7.67 `.previous' ================ This is one of the ELF section stack manipulation directives. The @@ -4653,7 +4881,7 @@ section with the top section on the section stack.  File: as.info, Node: Print, Next: Protected, Prev: Previous, Up: Pseudo Ops -7.89 `.print STRING' +7.68 `.print STRING' ==================== `as' will print STRING on the standard output during assembly. You @@ -4662,7 +4890,7 @@ must put STRING in double quotes.  File: as.info, Node: Protected, Next: Psize, Prev: Print, Up: Pseudo Ops -7.90 `.protected NAMES' +7.69 `.protected NAMES' ======================= This is one of the ELF visibility directives. The other two are @@ -4678,7 +4906,7 @@ component would normally preempt this.  File: as.info, Node: Psize, Next: Purgem, Prev: Protected, Up: Pseudo Ops -7.91 `.psize LINES , COLUMNS' +7.70 `.psize LINES , COLUMNS' ============================= Use this directive to declare the number of lines--and, optionally, the @@ -4697,7 +4925,7 @@ explicitly specified with `.eject'.  File: as.info, Node: Purgem, Next: PushSection, Prev: Psize, Up: Pseudo Ops -7.92 `.purgem NAME' +7.71 `.purgem NAME' =================== Undefine the macro NAME, so that later uses of the string will not be @@ -4706,7 +4934,7 @@ expanded. *Note Macro::.  File: as.info, Node: PushSection, Next: Quad, Prev: Purgem, Up: Pseudo Ops -7.93 `.pushsection NAME [, SUBSECTION] [, "FLAGS"[, @TYPE[,ARGUMENTS]]]' +7.72 `.pushsection NAME [, SUBSECTION] [, "FLAGS"[, @TYPE[,ARGUMENTS]]]' ======================================================================== This is one of the ELF section stack manipulation directives. The @@ -4723,7 +4951,7 @@ Section::) directive.  File: as.info, Node: Quad, Next: Reloc, Prev: PushSection, Up: Pseudo Ops -7.94 `.quad BIGNUMS' +7.73 `.quad BIGNUMS' ==================== `.quad' expects zero or more bignums, separated by commas. For each @@ -4737,7 +4965,7 @@ hence _quad_-word for 8 bytes.  File: as.info, Node: Reloc, Next: Rept, Prev: Quad, Up: Pseudo Ops -7.95 `.reloc OFFSET, RELOC_NAME[, EXPRESSION]' +7.74 `.reloc OFFSET, RELOC_NAME[, EXPRESSION]' ============================================== Generate a relocation at OFFSET of type RELOC_NAME with value @@ -4753,7 +4981,7 @@ support addends stored in the section.  File: as.info, Node: Rept, Next: Sbttl, Prev: Reloc, Up: Pseudo Ops -7.96 `.rept COUNT' +7.75 `.rept COUNT' ================== Repeat the sequence of lines between the `.rept' directive and the next @@ -4774,7 +5002,7 @@ Repeat the sequence of lines between the `.rept' directive and the next  File: as.info, Node: Sbttl, Next: Scl, Prev: Rept, Up: Pseudo Ops -7.97 `.sbttl "SUBHEADING"' +7.76 `.sbttl "SUBHEADING"' ========================== Use SUBHEADING as the title (third line, immediately after the title @@ -4786,7 +5014,7 @@ if it appears within ten lines of the top of a page.  File: as.info, Node: Scl, Next: Section, Prev: Sbttl, Up: Pseudo Ops -7.98 `.scl CLASS' +7.77 `.scl CLASS' ================= Set the storage-class value for a symbol. This directive may only be @@ -4797,7 +5025,7 @@ debugging information.  File: as.info, Node: Section, Next: Set, Prev: Scl, Up: Pseudo Ops -7.99 `.section NAME' +7.78 `.section NAME' ==================== Use the `.section' directive to assemble the following code into a @@ -4819,6 +5047,7 @@ following ways: If the optional argument is quoted, it is taken as flags to use for the section. Each flag is a single character. The following flags are recognized: + `b' bss section (uninitialized data) @@ -4874,8 +5103,36 @@ PushSection::), `.popsection' (*note PopSection::), and `.previous' .section NAME [, "FLAGS"[, @TYPE[,FLAG_SPECIFIC_ARGUMENTS]]] + If the `--sectname-subst' command-line option is provided, the NAME +argument may contain a substitution sequence. Only `%S' is supported at +the moment, and substitutes the current section name. For example: + + .macro exception_code + .section %S.exception + [exception code here] + .previous + .endm + + .text + [code] + exception_code + [...] + + .section .init + [init code] + exception_code + [...] + + The two `exception_code' invocations above would create the +`.text.exception' and `.init.exception' sections respectively. This is +useful e.g. to discriminate between anciliary sections that are tied to +setup code to be discarded after use from anciliary sections that need +to stay resident without having to define multiple `exception_code' +macros just for that purpose. + The optional FLAGS argument is a quoted string which may contain any combination of the following characters: + `a' section is allocatable @@ -4904,8 +5161,25 @@ combination of the following characters: section is a member of the previously-current section's group, if any +``'' + a numeric value indicating the bits to be set in the ELF section + header's flags field. Note - if one or more of the alphabetic + characters described above is also included in the flags field, + their bit values will be ORed into the resulting value. + +``'' + some targets extend this list with their own flag characters + + Note - once a section's flags have been set they cannot be changed. +There are a few exceptions to this rule however. Processor and +application specific flags can be added to an already defined section. +The `.interp', `.strtab' and `.symtab' sections can have the allocate +flag (`a') set after they are initially defined, and the +`.note-GNU-stack' section may have the executable (`x') flag added. + The optional TYPE argument may contain one of the following constants: + `@progbits' section contains data @@ -4925,12 +5199,23 @@ constants: `@preinit_array' section contains an array of pointers to pre-init functions - Many targets only support the first three section types. +`@`'' + a numeric value to be set as the ELF section header's type field. + +`@`'' + some targets extend this list with their own types + + Many targets only support the first three section types. The type +may be enclosed in double quotes if necessary. Note on targets where the `@' character is the start of a comment (eg ARM) then another character is used instead. For example the ARM port uses the `%' character. + Note - some sections, eg `.text' and `.data' are considered to be +special and have fixed types. Any attempt to declare them with a +different type will generate an error from the assembler. + If FLAGS contains the `M' symbol then the TYPE argument must be specified as well as an extra argument--ENTSIZE--like this: @@ -4954,6 +5239,7 @@ present along with an additional field like this: The GROUPNAME field specifies the name of the section group to which this particular section belongs. The optional linkage field can contain: + `comdat' indicates that only one copy of this section should be retained @@ -4984,6 +5270,7 @@ directive for compatibility with the Solaris assembler: Note that the section name is quoted. There may be a sequence of comma separated flags: + `#alloc' section is allocatable @@ -5007,14 +5294,22 @@ directives work.  File: as.info, Node: Set, Next: Short, Prev: Section, Up: Pseudo Ops -7.100 `.set SYMBOL, EXPRESSION' -=============================== +7.79 `.set SYMBOL, EXPRESSION' +============================== Set the value of SYMBOL to EXPRESSION. This changes SYMBOL's value and type to conform to EXPRESSION. If SYMBOL was flagged as external, it remains flagged (*note Symbol Attributes::). - You may `.set' a symbol many times in the same assembly. + You may `.set' a symbol many times in the same assembly provided +that the values given to the symbol are constants. Values that are +based on expressions involving other symbols are allowed, but some +targets may restrict this to only being done once per assembly. This +is because those targets do not set the addresses of symbols at +assembly time, but rather delay the assignment until a final link is +performed. This allows the linker a chance to change the code in the +files, changing the location of, and the relative distance between, +various different symbols. If you `.set' a global symbol, the value stored in the object file is the last value stored into it. @@ -5025,8 +5320,8 @@ instead.  File: as.info, Node: Short, Next: Single, Prev: Set, Up: Pseudo Ops -7.101 `.short EXPRESSIONS' -========================== +7.80 `.short EXPRESSIONS' +========================= `.short' is normally the same as `.word'. *Note `.word': Word. @@ -5036,8 +5331,8 @@ numbers of different lengths. *Note Machine Dependencies::.  File: as.info, Node: Single, Next: Size, Prev: Short, Up: Pseudo Ops -7.102 `.single FLONUMS' -======================= +7.81 `.single FLONUMS' +====================== This directive assembles zero or more flonums, separated by commas. It has the same effect as `.float'. The exact kind of floating point @@ -5047,8 +5342,8 @@ Dependencies::.  File: as.info, Node: Size, Next: Skip, Prev: Single, Up: Pseudo Ops -7.103 `.size' -============= +7.82 `.size' +============ This directive is used to set the size associated with a symbol. @@ -5075,8 +5370,8 @@ function symbols.  File: as.info, Node: Skip, Next: Sleb128, Prev: Size, Up: Pseudo Ops -7.104 `.skip SIZE , FILL' -========================= +7.83 `.skip SIZE , FILL' +======================== This directive emits SIZE bytes, each of value FILL. Both SIZE and FILL are absolute expressions. If the comma and FILL are omitted, FILL @@ -5085,8 +5380,8 @@ is assumed to be zero. This is the same as `.space'.  File: as.info, Node: Sleb128, Next: Space, Prev: Skip, Up: Pseudo Ops -7.105 `.sleb128 EXPRESSIONS' -============================ +7.84 `.sleb128 EXPRESSIONS' +=========================== SLEB128 stands for "signed little endian base 128." This is a compact, variable length representation of numbers used by the DWARF symbolic @@ -5095,8 +5390,8 @@ debugging format. *Note `.uleb128': Uleb128.  File: as.info, Node: Space, Next: Stab, Prev: Sleb128, Up: Pseudo Ops -7.106 `.space SIZE , FILL' -========================== +7.85 `.space SIZE , FILL' +========================= This directive emits SIZE bytes, each of value FILL. Both SIZE and FILL are absolute expressions. If the comma and FILL are omitted, FILL @@ -5111,8 +5406,8 @@ is assumed to be zero. This is the same as `.skip'.  File: as.info, Node: Stab, Next: String, Prev: Space, Up: Pseudo Ops -7.107 `.stabd, .stabn, .stabs' -============================== +7.86 `.stabd, .stabn, .stabs' +============================= There are three directives that begin `.stab'. All emit symbols (*note Symbols::), for use by symbolic debuggers. The symbols are not entered @@ -5165,8 +5460,8 @@ earlier assemblers!  File: as.info, Node: String, Next: Struct, Prev: Stab, Up: Pseudo Ops -7.108 `.string' "STR", `.string8' "STR", `.string16' -==================================================== +7.87 `.string' "STR", `.string8' "STR", `.string16' +=================================================== "STR", `.string32' "STR", `.string64' "STR" @@ -5190,8 +5485,8 @@ are stored in target endianness byte order.  File: as.info, Node: Struct, Next: SubSection, Prev: String, Up: Pseudo Ops -7.109 `.struct EXPRESSION' -========================== +7.88 `.struct EXPRESSION' +========================= Switch to the absolute section, and set the section offset to EXPRESSION, which must be an absolute expression. You might use this @@ -5211,8 +5506,8 @@ section before further assembly.  File: as.info, Node: SubSection, Next: Symver, Prev: Struct, Up: Pseudo Ops -7.110 `.subsection NAME' -======================== +7.89 `.subsection NAME' +======================= This is one of the ELF section stack manipulation directives. The others are `.section' (*note Section::), `.pushsection' (*note @@ -5226,8 +5521,8 @@ the section stack in place of the then current top of stack subsection.  File: as.info, Node: Symver, Next: Tag, Prev: SubSection, Up: Pseudo Ops -7.111 `.symver' -=============== +7.90 `.symver' +============== Use the `.symver' directive to bind symbols to specific version nodes within a source file. This is only supported on ELF platforms, and is @@ -5275,8 +5570,8 @@ assembled, the symbol name, NAME, will be changed to NAME2@@NODENAME.  File: as.info, Node: Tag, Next: Text, Prev: Symver, Up: Pseudo Ops -7.112 `.tag STRUCTNAME' -======================= +7.91 `.tag STRUCTNAME' +====================== This directive is generated by compilers to include auxiliary debugging information in the symbol table. It is only permitted inside @@ -5286,8 +5581,8 @@ the symbol table with instances of those structures.  File: as.info, Node: Text, Next: Title, Prev: Tag, Up: Pseudo Ops -7.113 `.text SUBSECTION' -======================== +7.92 `.text SUBSECTION' +======================= Tells `as' to assemble the following statements onto the end of the text subsection numbered SUBSECTION, which is an absolute expression. @@ -5296,8 +5591,8 @@ If SUBSECTION is omitted, subsection number zero is used.  File: as.info, Node: Title, Next: Type, Prev: Text, Up: Pseudo Ops -7.114 `.title "HEADING"' -======================== +7.93 `.title "HEADING"' +======================= Use HEADING as the title (second line, immediately after the source file name and pagenumber) when generating assembly listings. @@ -5308,8 +5603,8 @@ if it appears within ten lines of the top of a page.  File: as.info, Node: Type, Next: Uleb128, Prev: Title, Up: Pseudo Ops -7.115 `.type' -============= +7.94 `.type' +============ This directive is used to set the type of a symbol. @@ -5393,8 +5688,8 @@ above.  File: as.info, Node: Uleb128, Next: Val, Prev: Type, Up: Pseudo Ops -7.116 `.uleb128 EXPRESSIONS' -============================ +7.95 `.uleb128 EXPRESSIONS' +=========================== ULEB128 stands for "unsigned little endian base 128." This is a compact, variable length representation of numbers used by the DWARF @@ -5403,8 +5698,8 @@ symbolic debugging format. *Note `.sleb128': Sleb128.  File: as.info, Node: Val, Next: Version, Prev: Uleb128, Up: Pseudo Ops -7.117 `.val ADDR' -================= +7.96 `.val ADDR' +================ This directive, permitted only within `.def'/`.endef' pairs, records the address ADDR as the value attribute of a symbol table entry. @@ -5412,8 +5707,8 @@ the address ADDR as the value attribute of a symbol table entry.  File: as.info, Node: Version, Next: VTableEntry, Prev: Val, Up: Pseudo Ops -7.118 `.version "STRING"' -========================= +7.97 `.version "STRING"' +======================== This directive creates a `.note' section and places into it an ELF formatted note of type NT_VERSION. The note's name is set to `string'. @@ -5421,8 +5716,8 @@ formatted note of type NT_VERSION. The note's name is set to `string'.  File: as.info, Node: VTableEntry, Next: VTableInherit, Prev: Version, Up: Pseudo Ops -7.119 `.vtable_entry TABLE, OFFSET' -=================================== +7.98 `.vtable_entry TABLE, OFFSET' +================================== This directive finds or creates a symbol `table' and creates a `VTABLE_ENTRY' relocation for it with an addend of `offset'. @@ -5430,8 +5725,8 @@ This directive finds or creates a symbol `table' and creates a  File: as.info, Node: VTableInherit, Next: Warning, Prev: VTableEntry, Up: Pseudo Ops -7.120 `.vtable_inherit CHILD, PARENT' -===================================== +7.99 `.vtable_inherit CHILD, PARENT' +==================================== This directive finds the symbol `child' and finds or creates the symbol `parent' and then creates a `VTABLE_INHERIT' relocation for the parent @@ -5441,7 +5736,7 @@ parent name of `0' is treated as referring to the `*ABS*' section.  File: as.info, Node: Warning, Next: Weak, Prev: VTableInherit, Up: Pseudo Ops -7.121 `.warning "STRING"' +7.100 `.warning "STRING"' ========================= Similar to the directive `.error' (*note `.error "STRING"': Error.), @@ -5450,7 +5745,7 @@ but just emits a warning.  File: as.info, Node: Weak, Next: Weakref, Prev: Warning, Up: Pseudo Ops -7.122 `.weak NAMES' +7.101 `.weak NAMES' =================== This directive sets the weak attribute on the comma separated list of @@ -5469,7 +5764,7 @@ creates an alternate symbol to hold the default value.  File: as.info, Node: Weakref, Next: Word, Prev: Weak, Up: Pseudo Ops -7.123 `.weakref ALIAS, TARGET' +7.102 `.weakref ALIAS, TARGET' ============================== This directive creates an alias to the target symbol that enables the @@ -5490,9 +5785,9 @@ removed. handled within the assembler.  -File: as.info, Node: Word, Next: Deprecated, Prev: Weakref, Up: Pseudo Ops +File: as.info, Node: Word, Next: Zero, Prev: Weakref, Up: Pseudo Ops -7.124 `.word EXPRESSIONS' +7.103 `.word EXPRESSIONS' ========================= This directive expects zero or more EXPRESSIONS, of any section, @@ -5530,9 +5825,21 @@ long-jump to `sym4'; and so on, for as many entries in the original jump table as necessary.  -File: as.info, Node: Deprecated, Prev: Word, Up: Pseudo Ops +File: as.info, Node: Zero, Next: Deprecated, Prev: Word, Up: Pseudo Ops -7.125 Deprecated Directives +7.104 `.zero SIZE' +================== + +This directive emits SIZE 0-valued bytes. SIZE must be an absolute +expression. This directive is actually an alias for the `.skip' +directive so in can take an optional second argument of the value to +store in the bytes instead of zero. Using `.zero' in this way would be +confusing however. + + +File: as.info, Node: Deprecated, Prev: Zero, Up: Pseudo Ops + +7.105 Deprecated Directives =========================== One day these directives won't work. They are included for @@ -5668,6 +5975,18 @@ Tag_GNU_Power_ABI_Vector (8) * 3 for files using SPE registers to pass vectors. +8.1.4 IBM z Systems Attributes +------------------------------ + +Tag_GNU_S390_ABI_Vector (8) + The vector ABI used by this object file. The value will be: + + * 0 for files not affected by the vector ABI. + + * 1 for files using software vector ABI. + + * 2 for files using hardware vector ABI. +  File: as.info, Node: Defining New Object Attributes, Prev: GNU Object Attributes, Up: Object Attributes @@ -5775,9 +6094,6 @@ subject, see the hardware manufacturer's manual. * NS32K-Dependent:: NS32K Dependent Features -* SH-Dependent:: Renesas / SuperH SH Dependent Features -* SH64-Dependent:: SuperH SH64 Dependent Features - * PDP-11-Dependent:: PDP-11 Dependent Features * PJ-Dependent:: picoJava Dependent Features @@ -5786,12 +6102,17 @@ subject, see the hardware manufacturer's manual. * RL78-Dependent:: RL78 Dependent Features +* RISC-V-Dependent:: RISC-V Dependent Features + * RX-Dependent:: RX Dependent Features * S/390-Dependent:: IBM S/390 Dependent Features * SCORE-Dependent:: SCORE Dependent Features +* SH-Dependent:: Renesas / SuperH SH Dependent Features +* SH64-Dependent:: SuperH SH64 Dependent Features + * Sparc-Dependent:: SPARC Dependent Features * TIC54X-Dependent:: TI TMS320C54x Dependent Features @@ -5804,6 +6125,10 @@ subject, see the hardware manufacturer's manual. * V850-Dependent:: V850 Dependent Features +* Vax-Dependent:: VAX Dependent Features + +* Visium-Dependent:: Visium Dependent Features + * XGATE-Dependent:: XGATE Features * XSTORMY16-Dependent:: XStormy16 Dependent Features @@ -5814,8 +6139,6 @@ subject, see the hardware manufacturer's manual. * Z8000-Dependent:: Z8000 Dependent Features -* Vax-Dependent:: VAX Dependent Features -  File: as.info, Node: AArch64-Dependent, Next: Alpha-Dependent, Up: Machine Dependencies @@ -5855,11 +6178,12 @@ File: as.info, Node: AArch64 Options, Next: AArch64 Extensions, Up: AArch64-D This option specifies the target processor. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target processor. The - following processor names are recognized: `cortex-a53', - `cortex-a57', `cortex-a72', `exynos-m1', `xgene1', and `xgene2'. - The special name `all' may be used to allow the assembler to accept - instructions valid for any supported processor, including all - optional extensions. + following processor names are recognized: `cortex-a35', + `cortex-a53', `cortex-a57', `cortex-a72', `cortex-a73', + `exynos-m1', `falkor', `qdf24xx', `thunderx', `vulcan', `xgene1' + and `xgene2'. The special name `all' may be used to allow the + assembler to accept instructions valid for any supported + processor, including all optional extensions. In addition to the basic instruction set, the assembler can be told to accept, or restrict, various extension mnemonics that @@ -5874,7 +6198,8 @@ File: as.info, Node: AArch64 Options, Next: AArch64 Extensions, Up: AArch64-D This option specifies the target architecture. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target architecture. The - only value for ARCHITECTURE is `armv8-a'. + following architecture names are recognized: `armv8-a', + `armv8.1-a', `armv8.2-a' and `armv8.3-a'. If both `-mcpu' and `-march' are specified, the assembler will use the setting for `-mcpu'. If neither are specified, the assembler @@ -5917,13 +6242,34 @@ automatically cause those extensions to be disabled. Extension Minimum Enabled by Description Architecture default ---------------------------------------------------------------------------- -`crc' ARMv8-A No Enable CRC instructions. +`compnum' ARMv8.2-A ARMv8.3-A Enable the complex number SIMD + or later extensions. This implies `fp16' and + `simd'. +`crc' ARMv8-A ARMv8.1-A Enable CRC instructions. + or later `crypto' ARMv8-A No Enable cryptographic extensions. This implies `fp' and `simd'. `fp' ARMv8-A ARMv8-A or Enable floating-point extensions. later +`fp16' ARMv8.2-A ARMv8.2-A Enable ARMv8.2 16-bit floating-point + or later support. This implies `fp'. +`lor' ARMv8-A ARMv8.1-A Enable Limited Ordering Regions + or later extensions. +`lse' ARMv8-A ARMv8.1-A Enable Large System extensions. + or later +`pan' ARMv8-A ARMv8.1-A Enable Privileged Access Never support. + or later +`profile' ARMv8.2-A No Enable statistical profiling + extensions. +`ras' ARMv8-A ARMv8.2-A Enable the Reliability, Availability + or later and Serviceability extension. +`rdma' ARMv8-A ARMv8.1-A Enable ARMv8.1 Advanced SIMD + or later extensions. This implies `simd'. `simd' ARMv8-A ARMv8-A or Enable Advanced SIMD extensions. This later implies `fp'. +`sve' ARMv8.2-A No Enable the Scalable Vector Extensions. + This implies `fp16', `simd' and + `compnum'.  File: as.info, Node: AArch64 Syntax, Next: AArch64 Floating Point, Prev: AArch64 Extensions, Up: AArch64-Dependent @@ -6012,9 +6358,40 @@ File: as.info, Node: AArch64 Directives, Next: AArch64 Opcodes, Prev: AArch64 9.1.5 AArch64 Machine Directives -------------------------------- +`.arch NAME' + Select the target architecture. Valid values for NAME are the + same as for the `-march' commandline option. + + Specifying `.arch' clears any previously selected architecture + extensions. + +`.arch_extension NAME' + Add or remove an architecture extension to the target + architecture. Valid values for NAME are the same as those + accepted as architectural extensions by the `-mcpu' commandline + option. + + `.arch_extension' may be used multiple times to add or remove + extensions incrementally to the architecture being compiled for. + `.bss' This directive switches to the `.bss' section. +`.cpu NAME' + Set the target processor. Valid values for NAME are the same as + those accepted by the `-mcpu=' command line option. + +`.dword EXPRESSIONS' + The `.dword' directive produces 64 bit values. + +`.even' + The `.even' directive aligns the output on the next even byte + boundary. + +`.inst EXPRESSIONS' + Inserts the expressions into the output as if they were + instructions, rather than data. + `.ltorg' This directive causes the current contents of the literal pool to be dumped into the current section (which is assumed to be the @@ -6037,6 +6414,15 @@ File: as.info, Node: AArch64 Directives, Next: AArch64 Opcodes, Prev: AArch64 foo .req w0 +``.tlsdescadd'' + Emits a TLSDESC_ADD reloc on the next instruction. + +``.tlsdesccall'' + Emits a TLSDESC_CALL reloc on the next instruction. + +``.tlsdescldr'' + Emits a TLSDESC_LDR reloc on the next instruction. + `.unreq ALIAS-NAME' This undefines a register alias which was previously defined using the `req' directive. For example: @@ -6048,6 +6434,10 @@ File: as.info, Node: AArch64 Directives, Next: AArch64 Opcodes, Prev: AArch64 can be used to delete builtin in register name aliases (eg 'w0'). This should only be done if it is really necessary. +`.xword EXPRESSIONS' + The `.xword' directive produces 64 bit values. This is the same + as the `.dword' directive. +  File: as.info, Node: AArch64 Opcodes, Next: AArch64 Mapping Symbols, Prev: AArch64 Directives, Up: AArch64-Dependent @@ -6537,8 +6927,9 @@ File: as.info, Node: ARC-Dependent, Next: ARM-Dependent, Prev: Alpha-Dependen * ARC Options:: Options * ARC Syntax:: Syntax -* ARC Floating Point:: Floating Point * ARC Directives:: ARC Machine Directives +* ARC Modifiers:: ARC Assembler Modifiers +* ARC Symbols:: ARC Pre-defined Symbols * ARC Opcodes:: Opcodes  @@ -6547,30 +6938,84 @@ File: as.info, Node: ARC Options, Next: ARC Syntax, Up: ARC-Dependent 9.3.1 Options ------------- -`-marc[5|6|7|8]' - This option selects the core processor variant. Using `-marc' is - the same as `-marc6', which is also the default. +The following options control the type of CPU for which code is +assembled, and generic constraints on the code generated: - `arc5' - Base instruction set. +`-mcpu=CPU' + Set architecture type and register usage for CPU. There are also + shortcut alias options available for backward compatibility and + convenience. Supported values for CPU are - `arc6' - Jump-and-link (jl) instruction. No requirement of an - instruction between setting flags and conditional jump. For - example: + `arc600' + Assemble for ARC 600. Aliases: `-mA6', `-mARC600'. - mov.f r0,r1 - beq foo + `arc600_norm' + Assemble for ARC 600 with norm instructions. - `arc7' - Break (brk) and sleep (sleep) instructions. + `arc600_mul64' + Assemble for ARC 600 with mul64 instructions. - `arc8' - Software interrupt (swi) instruction. + `arc600_mul32x16' + Assemble for ARC 600 with mul32x16 instructions. + + `arc601' + Assemble for ARC 601. Alias: `-mARC601'. + + `arc601_norm' + Assemble for ARC 601 with norm instructions. + + `arc601_mul64' + Assemble for ARC 601 with mul64 instructions. + + `arc601_mul32x16' + Assemble for ARC 601 with mul32x16 instructions. + + `arc700' + Assemble for ARC 700. Aliases: `-mA7', `-mARC700'. + + `arcem' + Assemble for ARC EM. Aliases: `-mEM' + + `em' + Assemble for ARC EM, identical as arcem variant. + + `em4' + Assemble for ARC EM with code-density instructions. + + `em4_dmips' + Assemble for ARC EM with code-density instructions. + + `em4_fpus' + Assemble for ARC EM with code-density instructions. + + `em4_fpuda' + Assemble for ARC EM with code-density, and double-precision + assist instructions. + + `quarkse_em' + Assemble for QuarkSE-EM cpu. + + `archs' + Assemble for ARC HS. Aliases: `-mHS', `-mav2hs'. + + `hs' + Assemble for ARC HS. + + `hs34' + Assemble for ARC HS34. + + `hs38' + Assemble for ARC HS38. + + `hs38_linux' + Assemble for ARC HS38 with floating point support on. + + `nps400' + Assemble for ARC 700 with NPS-400 extended instructions. - Note: the `.option' directive can to be used to select a core - variant from within assembly code. + Note: the `.cpu' directive (*note ARC Directives::) can to be used + to select a core variant from within assembly code. `-EB' This option specifies that the output generated by the assembler @@ -6581,9 +7026,31 @@ File: as.info, Node: ARC Options, Next: ARC Syntax, Up: ARC-Dependent should be marked as being encoded for a little-endian processor - this is the default. +`-mcode-density' + This option turns on Code Density instructions. Only valid for + ARC EM processors. + +`-mrelax' + Enable support for assembly-time relaxation. The assembler will + replace a longer version of an instruction with a shorter one, + whenever it is possible. + +`-mnps400' + Enable support for NPS-400 extended instructions. + +`-mspfp' + Enable support for single-precision floating point instructions. + +`-mdpfp' + Enable support for double-precision floating point instructions. + +`-mfpuda' + Enable support for double-precision assist floating point + instructions. Only valid for ARC EM processors. +  -File: as.info, Node: ARC Syntax, Next: ARC Floating Point, Prev: ARC Options, Up: ARC-Dependent +File: as.info, Node: ARC Syntax, Next: ARC Directives, Prev: ARC Options, Up: ARC-Dependent 9.3.2 Syntax ------------ @@ -6599,13 +7066,34 @@ File: as.info, Node: ARC-Chars, Next: ARC-Regs, Up: ARC Syntax 9.3.2.1 Special Characters .......................... -The presence of a `#' on a line indicates the start of a comment that -extends to the end of the current line. Note that if a line starts -with a `#' character then it can also be a logical line number -directive (*note Comments::) or a preprocessor control command (*note -Preprocessing::). +`%' + A register name can optionally be prefixed by a `%' character. So + register `%r0' is equivalent to `r0' in the assembly code. + +`#' + The presence of a `#' character within a line (but not at the + start of a line) indicates the start of a comment that extends to + the end of the current line. + + _Note:_ if a line starts with a `#' character then it can also be + a logical line number directive (*note Comments::) or a + preprocessor control command (*note Preprocessing::). + +`@' + Prefixing an operand with an `@' specifies that the operand is a + symbol and not a register. This is how the assembler disambiguates + the use of an ARC register name as a symbol. So the instruction + mov r0, @r0 + moves the address of symbol `r0' into register `r0'. + +``' + The ``' (backtick) character is used to separate statements on a + single line. + +`-' + Used as a separator to obtain a sequence of commands from a C + preprocessor macro. - The ARC assembler does not support a line separator character.  File: as.info, Node: ARC-Regs, Prev: ARC-Chars, Up: ARC Syntax @@ -6613,201 +7101,413 @@ File: as.info, Node: ARC-Regs, Prev: ARC-Chars, Up: ARC Syntax 9.3.2.2 Register Names ...................... -*TODO* +The ARC assembler uses the following register names for its core +registers: + +`r0-r31' + The core general registers. Registers `r26' through `r31' have + special functions, and are usually referred to by those synonyms. + +`gp' + The global pointer and a synonym for `r26'. + +`fp' + The frame pointer and a synonym for `r27'. + +`sp' + The stack pointer and a synonym for `r28'. + +`ilink1' + For ARC 600 and ARC 700, the level 1 interrupt link register and a + synonym for `r29'. Not supported for ARCv2. + +`ilink' + For ARCv2, the interrupt link register and a synonym for `r29'. + Not supported for ARC 600 and ARC 700. + +`ilink2' + For ARC 600 and ARC 700, the level 2 interrupt link register and a + synonym for `r30'. Not supported for ARC v2. + +`blink' + The link register and a synonym for `r31'. + +`r32-r59' + The extension core registers. + +`lp_count' + The loop count register. + +`pcl' + The word aligned program counter. + + + In addition the ARC processor has a large number of _auxiliary +registers_. The precise set depends on the extensions being supported, +but the following baseline set are always defined: + +`identity' + Processor Identification register. Auxiliary register address 0x4. + +`pc' + Program Counter. Auxiliary register address 0x6. + +`status32' + Status register. Auxiliary register address 0x0a. + +`bta' + Branch Target Address. Auxiliary register address 0x412. + +`ecr' + Exception Cause Register. Auxiliary register address 0x403. + +`int_vector_base' + Interrupt Vector Base address. Auxiliary register address 0x25. + +`status32_p0' + Stored STATUS32 register on entry to level P0 interrupts. + Auxiliary register address 0xb. + +`aux_user_sp' + Saved User Stack Pointer. Auxiliary register address 0xd. + +`eret' + Exception Return Address. Auxiliary register address 0x400. + +`erbta' + BTA saved on exception entry. Auxiliary register address 0x401. + +`erstatus' + STATUS32 saved on exception. Auxiliary register address 0x402. + +`bcr_ver' + Build Configuration Registers Version. Auxiliary register address + 0x60. + +`bta_link_build' + Build configuration for: BTA Registers. Auxiliary register + address 0x63. + +`vecbase_ac_build' + Build configuration for: Interrupts. Auxiliary register address + 0x68. + +`rf_build' + Build configuration for: Core Registers. Auxiliary register + address 0x6e. + +`dccm_build' + DCCM RAM Configuration Register. Auxiliary register address 0xc1. + + + Additional auxiliary register names are defined according to the +processor architecture version and extensions selected by the options.  -File: as.info, Node: ARC Floating Point, Next: ARC Directives, Prev: ARC Syntax, Up: ARC-Dependent +File: as.info, Node: ARC Directives, Next: ARC Modifiers, Prev: ARC Syntax, Up: ARC-Dependent -9.3.3 Floating Point --------------------- - -The ARC core does not currently have hardware floating point support. -Software floating point support is provided by `GCC' and uses IEEE -floating-point numbers. - - -File: as.info, Node: ARC Directives, Next: ARC Opcodes, Prev: ARC Floating Point, Up: ARC-Dependent - -9.3.4 ARC Machine Directives +9.3.3 ARC Machine Directives ---------------------------- The ARC version of `as' supports the following additional machine directives: -`.2byte EXPRESSIONS' - *TODO* +`.lcomm SYMBOL, LENGTH[, ALIGNMENT]' + Reserve LENGTH (an absolute expression) bytes for a local common + denoted by SYMBOL. The section and value of SYMBOL are those of + the new local common. The addresses are allocated in the bss + section, so that at run-time the bytes start off zeroed. Since + SYMBOL is not declared global, it is normally not visible to `ld'. + The optional third parameter, ALIGNMENT, specifies the desired + alignment of the symbol in the bss section, specified as a byte + boundary (for example, an alignment of 16 means that the least + significant 4 bits of the address should be zero). The alignment + must be an absolute expression, and it must be a power of two. If + no alignment is specified, as will set the alignment to the + largest power of two less than or equal to the size of the symbol, + up to a maximum of 16. -`.3byte EXPRESSIONS' - *TODO* +`.lcommon SYMBOL, LENGTH[, ALIGNMENT]' + The same as `lcomm' directive. -`.4byte EXPRESSIONS' - *TODO* +`.cpu CPU' + The `.cpu' directive must be followed by the desired core version. + Permitted values for CPU are: + `ARC600' + Assemble for the ARC600 instruction set. -`.extAuxRegister NAME,ADDRESS,MODE' - The ARCtangent A4 has extensible auxiliary register space. The - auxiliary registers can be defined in the assembler source code by - using this directive. The first parameter is the NAME of the new - auxiallry register. The second parameter is the ADDRESS of the - register in the auxiliary register memory map for the variant of - the ARC. The third parameter specifies the MODE in which the - register can be operated is and it can be one of: + `arc600_norm' + Assemble for ARC 600 with norm instructions. - `r (readonly)' + `arc600_mul64' + Assemble for ARC 600 with mul64 instructions. - `w (write only)' + `arc600_mul32x16' + Assemble for ARC 600 with mul32x16 instructions. + + `arc601' + Assemble for ARC 601 instruction set. + + `arc601_norm' + Assemble for ARC 601 with norm instructions. + + `arc601_mul64' + Assemble for ARC 601 with mul64 instructions. + + `arc601_mul32x16' + Assemble for ARC 601 with mul32x16 instructions. + + `ARC700' + Assemble for the ARC700 instruction set. + + `NPS400' + Assemble for the NPS400 instruction set. + + `EM' + Assemble for the ARC EM instruction set. + + `arcem' + Assemble for ARC EM instruction set + + `em4' + Assemble for ARC EM with code-density instructions. + + `em4_dmips' + Assemble for ARC EM with code-density instructions. + + `em4_fpus' + Assemble for ARC EM with code-density instructions. + + `em4_fpuda' + Assemble for ARC EM with code-density, and double-precision + assist instructions. + + `quarkse_em' + Assemble for QuarkSE-EM instruction set. + + `HS' + Assemble for the ARC HS instruction set. + + `archs' + Assemble for ARC HS instruction set. + + `hs' + Assemble for ARC HS instruction set. + + `hs34' + Assemble for ARC HS34 instruction set. + + `hs38' + Assemble for ARC HS38 instruction set. + + `hs38_linux' + Assemble for ARC HS38 with floating point support on. + + + Note: the `.cpu' directive overrides the command line option + `-mcpu=CPU'; a warning is emitted when the version is not + consistent between the two. + +`.extAuxRegister NAME, ADDR, MODE' + Auxiliary registers can be defined in the assembler source code by + using this directive. The first parameter, NAME, is the name of + the new auxiliary register. The second parameter, ADDR, is + address the of the auxiliary register. The third parameter, MODE, + specifies whether the register is readable and/or writable and is + one of: + `r' + Read only; + + `w' + Write only; + + `r|w' + Read and write. - `r|w (read or write)' For example: + .extAuxRegister mulhi, 0x12, w + specifies a write only extension auxiliary register, MULHI at + address 0x12. - .extAuxRegister mulhi,0x12,w +`.extCondCode SUFFIX, VAL' + ARC supports extensible condition codes. This directive defines a + new condition code, to be known by the suffix, SUFFIX and will + depend on the value, VAL in the condition code. - This specifies an extension auxiliary register called _mulhi_ - which is at address 0x12 in the memory space and which is only - writable. + For example: + .extCondCode is_busy,0x14 + add.is_busy r1,r2,r3 + will only execute the `add' instruction if the condition code + value is 0x14. -`.extCondCode SUFFIX,VALUE' - The condition codes on the ARCtangent A4 are extensible and can be - specified by means of this assembler directive. They are specified - by the suffix and the value for the condition code. They can be - used to specify extra condition codes with any values. For - example: +`.extCoreRegister NAME, REGNUM, MODE, SHORTCUT' + Specifies an extension core register named NAME as a synonym for + the register numbered REGNUM. The register number must be between + 32 and 59. The third argument, MODE, indicates whether the + register is readable and/or writable and is one of: + `r' + Read only; - .extCondCode is_busy,0x14 + `w' + Write only; - add.is_busy r1,r2,r3 - bis_busy _main + `r|w' + Read and write. -`.extCoreRegister NAME,REGNUM,MODE,SHORTCUT' - Specifies an extension core register NAME for the application. - This allows a register NAME with a valid REGNUM between 0 and 60, - with the following as valid values for MODE - - `_r_ (readonly)' - - `_w_ (write only)' - - `_r|w_ (read or write)' - - The other parameter gives a description of the register having a - SHORTCUT in the pipeline. The valid values are: + The final parameter, SHORTCUT indicates whether the register has a + short cut in the pipeline. The valid values are: `can_shortcut' + The register has a short cut in the pipeline; `cannot_shortcut' + The register does not have a short cut in the pipeline. For example: + .extCoreRegister mlo, 57, r , can_shortcut + defines a read only extension core register, `mlo', which is + register 57, and can short cut the pipeline. - .extCoreRegister mlo,57,r,can_shortcut +`.extInstruction NAME, OPCODE, SUBOPCODE, SUFFIXCLASS, SYNTAXCLASS' + ARC allows the user to specify extension instructions. These + extension instructions are not macros; the assembler creates + encodings for use of these instructions according to the + specification by the user. - This defines an extension core register mlo with the value 57 which - can shortcut the pipeline. + The first argument, NAME, gives the name of the instruction. -`.extInstruction NAME,OPCODE,SUBOPCODE,SUFFIXCLASS,SYNTAXCLASS' - The ARCtangent A4 allows the user to specify extension - instructions. The extension instructions are not macros. The - assembler creates encodings for use of these instructions - according to the specification by the user. The parameters are: + The second argument, OPCODE, is the opcode to be used (bits 31:27 + in the encoding). - * NAME Name of the extension instruction + The third argument, SUBOPCODE, is the sub-opcode to be used, but + the correct value also depends on the fifth argument, SYNTAXCLASS - * OPCODE Opcode to be used. (Bits 27:31 in the encoding). - Valid values 0x10-0x1f or 0x03 + The fourth argument, SUFFIXCLASS, determines the kinds of suffixes + to be allowed. Valid values are: + `SUFFIX_NONE' + No suffixes are permitted; - * SUBOPCODE Subopcode to be used. Valid values are from - 0x09-0x3f. However the correct value also depends on - SYNTAXCLASS + `SUFFIX_COND' + Conditional suffixes are permitted; - * SUFFIXCLASS Determines the kinds of suffixes to be allowed. - Valid values are `SUFFIX_NONE', `SUFFIX_COND', `SUFFIX_FLAG' - which indicates the absence or presence of conditional - suffixes and flag setting by the extension instruction. It - is also possible to specify that an instruction sets the - flags and is conditional by using `SUFFIX_CODE' | - `SUFFIX_FLAG'. + `SUFFIX_FLAG' + Flag setting suffixes are permitted. - * SYNTAXCLASS Determines the syntax class for the instruction. - It can have the following values: - - ``SYNTAX_2OP':' - 2 Operand Instruction - - ``SYNTAX_3OP':' - 3 Operand Instruction - - In addition there could be modifiers for the syntax class as - described below: - - Syntax Class Modifiers are: - - - `OP1_MUST_BE_IMM': Modifies syntax class SYNTAX_3OP, - specifying that the first operand of a three-operand - instruction must be an immediate (i.e., the result is - discarded). OP1_MUST_BE_IMM is used by bitwise ORing it - with SYNTAX_3OP as given in the example below. This - could usually be used to set the flags using specific - instructions and not retain results. - - - `OP1_IMM_IMPLIED': Modifies syntax class SYNTAX_20P, it - specifies that there is an implied immediate destination - operand which does not appear in the syntax. For - example, if the source code contains an instruction like: - - inst r1,r2 - - it really means that the first argument is an implied - immediate (that is, the result is discarded). This is - the same as though the source code were: inst 0,r1,r2. - You use OP1_IMM_IMPLIED by bitwise ORing it with - SYNTAX_20P. + `SUFFIX_COND|SUFFIX_FLAG' + Both conditional and flag setting suffices are permitted. - For example, defining 64-bit multiplier with immediate operands: + The fifth and final argument, SYNTAXCLASS, determines the syntax + class for the instruction. It can have the following values: + `SYNTAX_2OP' + Two Operand Instruction; - .extInstruction mp64,0x14,0x0,SUFFIX_COND | SUFFIX_FLAG , - SYNTAX_3OP|OP1_MUST_BE_IMM + `SYNTAX_3OP' + Three Operand Instruction. - The above specifies an extension instruction called mp64 which has - 3 operands, sets the flags, can be used with a condition code, for - which the first operand is an immediate. (Equivalent to - discarding the result of the operation). + `SYNTAX_1OP' + One Operand Instruction. - .extInstruction mul64,0x14,0x00,SUFFIX_COND, SYNTAX_2OP|OP1_IMM_IMPLIED + `SYNTAX_NOP' + No Operand Instruction. - This describes a 2 operand instruction with an implicit first + The syntax class may be followed by `|' and one of the following + modifiers. + `OP1_MUST_BE_IMM' + Modifies syntax class `SYNTAX_3OP', specifying that the first + operand of a three-operand instruction must be an immediate + (i.e., the result is discarded). This is usually used to set + the flags using specific instructions and not retain results. + + `OP1_IMM_IMPLIED' + Modifies syntax class `SYNTAX_20P', specifying that there is + an implied immediate destination operand which does not + appear in the syntax. + + For example, if the source code contains an instruction like: + inst r1,r2 + the first argument is an implied immediate (that is, the + result is discarded). This is the same as though the source + code were: inst 0,r1,r2. + + + For example, defining a 64-bit multiplier with immediate operands: + .extInstruction mp64, 0x07, 0x2d, SUFFIX_COND|SUFFIX_FLAG, + SYNTAX_3OP|OP1_MUST_BE_IMM + which specifies an extension instruction named `mp64' with 3 + operands. It sets the flags and can be used with a condition code, + for which the first operand is an immediate, i.e. equivalent to + discarding the result of the operation. + + A two operands instruction variant would be: + .extInstruction mul64, 0x07, 0x2d, SUFFIX_COND, + SYNTAX_2OP|OP1_IMM_IMPLIED + which describes a two operand instruction with an implicit first immediate operand. The result of this operation would be discarded. -`.half EXPRESSIONS' - *TODO* -`.long EXPRESSIONS' - *TODO* + +File: as.info, Node: ARC Modifiers, Next: ARC Symbols, Prev: ARC Directives, Up: ARC-Dependent -`.option ARC|ARC5|ARC6|ARC7|ARC8' - The `.option' directive must be followed by the desired core - version. Again `arc' is an alias for `arc6'. +9.3.4 ARC Assembler Modifiers +----------------------------- - Note: the `.option' directive overrides the command line option - `-marc'; a warning is emitted when the version is not consistent - between the two - even for the implicit default core version - (arc6). +The following additional assembler modifiers have been added for +position-independent code. These modifiers are available only with the +ARC 700 and above processors and generate relocation entries, which are +interpreted by the linker as follows: -`.short EXPRESSIONS' - *TODO* +`@pcl(SYMBOL)' + Relative distance of SYMBOL's from the current program counter + location. -`.word EXPRESSIONS' - *TODO* +`@gotpc(SYMBOL)' + Relative distance of SYMBOL's Global Offset Table entry from the + current program counter location. + +`@gotoff(SYMBOL)' + Distance of SYMBOL from the base of the Global Offset Table. + +`@plt(SYMBOL)' + Distance of SYMBOL's Procedure Linkage Table entry from the + current program counter. This is valid only with branch and link + instructions and PC-relative calls. + +`@sda(SYMBOL)' + Relative distance of SYMBOL from the base of the Small Data + Pointer.  -File: as.info, Node: ARC Opcodes, Prev: ARC Directives, Up: ARC-Dependent +File: as.info, Node: ARC Symbols, Next: ARC Opcodes, Prev: ARC Modifiers, Up: ARC-Dependent -9.3.5 Opcodes +9.3.5 ARC Pre-defined Symbols +----------------------------- + +The following assembler symbols will prove useful when developing +position-independent code. These symbols are available only with the +ARC 700 and above processors. + +`__GLOBAL_OFFSET_TABLE__' + Symbol referring to the base of the Global Offset Table. + +`__DYNAMIC__' + An alias for the Global Offset Table + `Base__GLOBAL_OFFSET_TABLE__'. It can be used only with `@gotpc' + modifiers. + + + +File: as.info, Node: ARC Opcodes, Prev: ARC Symbols, Up: ARC-Dependent + +9.3.6 Opcodes ------------- For information on the ARC instruction set, see `ARC Programmers -Reference Manual', ARC International (www.arc.com) +Reference Manual', available where you download the processor IP +library.  File: as.info, Node: ARM-Dependent, Next: AVR-Dependent, Prev: ARC-Dependent, Up: Machine Dependencies @@ -6853,14 +7553,17 @@ File: as.info, Node: ARM Options, Next: ARM Syntax, Up: ARM-Dependent (Faraday FA726TE processor), `arm1136j-s', `arm1136jf-s', `arm1156t2-s', `arm1156t2f-s', `arm1176jz-s', `arm1176jzf-s', `mpcore', `mpcorenovfp', `cortex-a5', `cortex-a7', `cortex-a8', - `cortex-a9', `cortex-a15', `cortex-r4', `cortex-r4f', `cortex-r5', - `cortex-r7', `cortex-m4', `cortex-m3', `cortex-m1', `cortex-m0', - `cortex-m0plus', `ep9312' (ARM920 with Cirrus Maverick - coprocessor), `exynos-m1', `i80200' (Intel XScale processor) - `iwmmxt' (Intel(r) XScale processor with Wireless MMX(tm) - technology coprocessor) and `xscale'. The special name `all' may - be used to allow the assembler to accept instructions valid for - any ARM processor. + `cortex-a9', `cortex-a15', `cortex-a17', `cortex-a32', + `cortex-a35', `cortex-a53', `cortex-a57', `cortex-a72', + `cortex-a73', `cortex-r4', `cortex-r4f', `cortex-r5', `cortex-r7', + `cortex-r8', `cortex-m33', `cortex-m23', `cortex-m7', `cortex-m4', + `cortex-m3', `cortex-m1', `cortex-m0', `cortex-m0plus', + `exynos-m1', `marvell-pj4', `marvell-whitney', `falkor', `qdf24xx', + `xgene1', `xgene2', `ep9312' (ARM920 with Cirrus Maverick + coprocessor), `i80200' (Intel XScale processor) `iwmmxt' (Intel(r) + XScale processor with Wireless MMX(tm) technology coprocessor) and + `xscale'. The special name `all' may be used to allow the + assembler to accept instructions valid for any ARM processor. In addition to the basic instruction set, the assembler can be told to accept various extension mnemonics that extend the @@ -6880,16 +7583,20 @@ File: as.info, Node: ARM Options, Next: ARM Syntax, Up: ARM-Dependent alphabetical order. For example, `-mcpu=ep9312+nomaverick' is equivalent to specifying `-mcpu=arm920'. - The following extensions are currently supported: `crypto' + The following extensions are currently supported: `crc' `crypto' (Cryptography Extensions for v8-A architecture, implies `fp+simd'), `fp' (Floating Point Extensions for v8-A architecture), `idiv' (Integer Divide Extensions for v7-A and v7-R architectures), - `iwmmxt', `iwmmxt2', `maverick', `mp' (Multiprocessing Extensions - for v7-A and v7-R architectures), `os' (Operating System for v6M - architecture), `sec' (Security Extensions for v6K and v7-A - architectures), `simd' (Advanced SIMD Extensions for v8-A + `iwmmxt', `iwmmxt2', `xscale', `maverick', `mp' (Multiprocessing + Extensions for v7-A and v7-R architectures), `os' (Operating + System for v6M architecture), `sec' (Security Extensions for v6K + and v7-A architectures), `simd' (Advanced SIMD Extensions for v8-A architecture, implies `fp'), `virt' (Virtualization Extensions for - v7-A architecture, implies `idiv'), and `xscale'. + v7-A architecture, implies `idiv'), `pan' (Priviliged Access Never + Extensions for v8-A architecture), `ras' (Reliability, + Availability and Serviceability extensions for v8-A architecture), + `rdma' (ARMv8.1 Advanced SIMD extensions for v8-A architecture, + implies `simd') and `xscale'. `-march=ARCHITECTURE[+EXTENSION...]' This option specifies the target architecture. The assembler will @@ -6898,11 +7605,12 @@ File: as.info, Node: ARM Options, Next: ARM Syntax, Up: ARM-Dependent The following architecture names are recognized: `armv1', `armv2', `armv2a', `armv2s', `armv3', `armv3m', `armv4', `armv4xm', `armv4t', `armv4txm', `armv5', `armv5t', `armv5txm', `armv5te', - `armv5texp', `armv6', `armv6j', `armv6k', `armv6z', `armv6zk', + `armv5texp', `armv6', `armv6j', `armv6k', `armv6z', `armv6kz', `armv6-m', `armv6s-m', `armv7', `armv7-a', `armv7ve', `armv7-r', - `armv7-m', `armv7e-m', `armv8-a', `iwmmxt' and `xscale'. If both - `-mcpu' and `-march' are specified, the assembler will use the - setting for `-mcpu'. + `armv7-m', `armv7e-m', `armv8-a', `armv8.1-a', `armv8.2-a', + `armv8.3-a', `iwmmxt' `iwmmxt2' and `xscale'. If both `-mcpu' and + `-march' are specified, the assembler will use the setting for + `-mcpu'. The architecture option can be extended with the same instruction set extension options as the `-mcpu' option. @@ -6916,9 +7624,10 @@ File: as.info, Node: ARM Options, Next: ARM Syntax, Up: ARM-Dependent `arm7500fe', `softvfp', `softvfp+vfp', `vfp', `vfp10', `vfp10-r0', `vfp9', `vfpxd', `vfpv2', `vfpv3', `vfpv3-fp16', `vfpv3-d16', `vfpv3-d16-fp16', `vfpv3xd', `vfpv3xd-d16', `vfpv4', `vfpv4-d16', - `fpv4-sp-d16', `fp-armv8', `arm1020t', `arm1020e', `arm1136jf-s', - `maverick', `neon', `neon-vfpv4', `neon-fp-armv8', and - `crypto-neon-fp-armv8'. + `fpv4-sp-d16', `fpv5-sp-d16', `fpv5-d16', `fp-armv8', `arm1020t', + `arm1020e', `arm1136jf-s', `maverick', `neon', `neon-vfpv4', + `neon-fp-armv8', `crypto-neon-fp-armv8', `neon-fp-armv8.1' and + `crypto-neon-fp-armv8.1'. In addition to determining which instructions are assembled, this option also affects the way in which the `.double' assembler @@ -6991,6 +7700,13 @@ File: as.info, Node: ARM Options, Next: ARM Syntax, Up: ARM-Dependent This option specifies that the output generated by the assembler should be marked as being encoded for a big-endian processor. + Note: If a program is being built for a system with big-endian data + and little-endian instructions then it should be assembled with the + `-EB' option, (all of it, code and data) and then linked with the + `--be8' option. This will reverse the endianness of the + instructions back to little-endian, but leave the data as + big-endian. + `-EL' This option specifies that the output generated by the assembler should be marked as being encoded for a little-endian processor. @@ -7011,6 +7727,11 @@ File: as.info, Node: ARM Options, Next: ARM Syntax, Up: ARM-Dependent `-mccs' Turns on CodeComposer Studio assembly syntax compatibility mode. +`-mwarn-syms' +`-mno-warn-syms' + Enable or disable warnings about symbols that match the names of + ARM instructions. The default is to warn. +  File: as.info, Node: ARM Syntax, Next: ARM Floating Point, Prev: ARM Options, Up: ARM-Dependent @@ -7115,6 +7836,20 @@ For example to load the 32-bit address of foo into r0: MOVW r0, #:lower16:foo MOVT r0, #:upper16:foo + Relocations `R_ARM_THM_ALU_ABS_G0_NC', `R_ARM_THM_ALU_ABS_G1_NC', +`R_ARM_THM_ALU_ABS_G2_NC' and `R_ARM_THM_ALU_ABS_G3_NC' can be +generated by prefixing the value with `#:lower0_7:#', `#:lower8_15:#', +`#:upper0_7:#' and `#:upper8_15:#' respectively. For example to load +the 32-bit address of foo into r0: + + MOVS r0, #:upper8_15:#foo + LSLS r0, r0, #8 + ADDS r0, #:upper0_7:#foo + LSLS r0, r0, #8 + ADDS r0, #:lower8_15:#foo + LSLS r0, r0, #8 + ADDS r0, #:lower0_7:#foo +  File: as.info, Node: ARM-Neon-Alignment, Prev: ARM-Relocations, Up: ARM Syntax @@ -7808,6 +8543,15 @@ File: as.info, Node: AVR Options, Next: AVR Syntax, Up: AVR-Dependent `-mrmw' Accept Read-Modify-Write (`XCH,LAC,LAS,LAT') instructions. +`-mlink-relax' + Enable support for link-time relaxation. This is now on by default + and this flag no longer has any effect. + +`-mno-link-relax' + Disable support for link-time relaxation. The assembler will + resolve relocations when it can, and may be able to better + compress some debug information. +  File: as.info, Node: AVR Syntax, Next: AVR Opcodes, Prev: AVR Options, Up: AVR-Dependent @@ -9454,6 +10198,11 @@ The Renesas H8/300 version of `as' has one machine-dependent option: `-h-tick-hex' Support H'00 style hex constants in addition to 0x00 style. +`-mach=NAME' + Sets the H8300 machine variant. The following machine names are + recognised: `h8300h', `h8300hn', `h8300s', `h8300sn', `h8300sx' and + `h8300sxn'. +  File: as.info, Node: H8/300 Syntax, Next: H8/300 Floating Point, Prev: H8/300 Options, Up: H8/300-Dependent @@ -10337,26 +11086,34 @@ The i386 version of `as' has a few machine dependent options: following processor names are recognized: `i8086', `i186', `i286', `i386', `i486', `i586', `i686', `pentium', `pentiumpro', `pentiumii', `pentiumiii', `pentium4', `prescott', `nocona', - `core', `core2', `corei7', `l1om', `k1om', `k6', `k6_2', `athlon', - `opteron', `k8', `amdfam10', `bdver1', `bdver2', `bdver3', - `bdver4', `btver1', `btver2', `generic32' and `generic64'. + `core', `core2', `corei7', `l1om', `k1om', `iamcu', `k6', `k6_2', + `athlon', `opteron', `k8', `amdfam10', `bdver1', `bdver2', + `bdver3', `bdver4', `znver1', `btver1', `btver2', `generic32' and + `generic64'. In addition to the basic instruction set, the assembler can be told to accept various extension mnemonics. For example, `-march=i686+sse4+vmx' extends I686 with SSE4 and VMX. The following extensions are currently supported: `8087', `287', `387', - `no87', `mmx', `nommx', `sse', `sse2', `sse3', `ssse3', `sse4.1', - `sse4.2', `sse4', `nosse', `avx', `avx2', `adx', `rdseed', - `prfchw', `smap', `mpx', `sha', `prefetchwt1', `clflushopt', `se1', - `clwb', `pcommit', `avx512f', `avx512cd', `avx512er', `avx512pf', - `avx512vl', `avx512bw', `avx512dq', `avx512ifma', `avx512vbmi', - `noavx', `vmx', `vmfunc', `smx', `xsave', `xsaveopt', `xsavec', - `xsaves', `aes', `pclmul', `fsgsbase', `rdrnd', `f16c', `bmi2', - `fma', `movbe', `ept', `lzcnt', `hle', `rtm', `invpcid', `clflush', - `lwp', `fma4', `xop', `cx16', `syscall', `rdtscp', `3dnow', - `3dnowa', `sse4a', `sse5', `svme', `abm' and `padlock'. Note that - rather than extending a basic instruction set, the extension - mnemonics starting with `no' revoke the respective functionality. + `687', `no87', `no287', `no387', `no687', `mmx', `nommx', `sse', + `sse2', `sse3', `ssse3', `sse4.1', `sse4.2', `sse4', `nosse', + `nosse2', `nosse3', `nossse3', `nosse4.1', `nosse4.2', `nosse4', + `avx', `avx2', `noavx', `noavx2', `adx', `rdseed', `prfchw', + `smap', `mpx', `sha', `rdpid', `ptwrite', `prefetchwt1', + `clflushopt', `se1', `clwb', `avx512f', `avx512cd', `avx512er', + `avx512pf', `avx512vl', `avx512bw', `avx512dq', `avx512ifma', + `avx512vbmi', `avx512_4fmaps', `avx512_4vnniw', `avx512_vpopcntdq', + `noavx512f', `noavx512cd', `noavx512er', `noavx512pf', + `noavx512vl', `noavx512bw', `noavx512dq', `noavx512ifma', + `noavx512vbmi', `noavx512_4fmaps', `noavx512_4vnniw', + `noavx512_vpopcntdq', `vmx', `vmfunc', `smx', `xsave', `xsaveopt', + `xsavec', `xsaves', `aes', `pclmul', `fsgsbase', `rdrnd', `f16c', + `bmi2', `fma', `movbe', `ept', `lzcnt', `hle', `rtm', `invpcid', + `clflush', `mwaitx', `clzero', `lwp', `fma4', `xop', `cx16', + `syscall', `rdtscp', `3dnow', `3dnowa', `sse4a', `sse5', `svme', + `abm' and `padlock'. Note that rather than extending a basic + instruction set, the extension mnemonics starting with `no' revoke + the respective functionality. When the `.arch' directive is used with `-march', the `.arch' directive will take precedent. @@ -10430,6 +11187,15 @@ The i386 version of `as' has a few machine dependent options: branches, even if such prefix was not explicitly specified in the source code. +`-mno-shared' + On ELF target, the assembler normally optimizes out non-PLT + relocations against defined non-weak global branch targets with + default visibility. The `-mshared' option tells the assembler to + generate code which may go into a shared library where all + non-weak global branch targets with default visibility can be + preempted. The resulting code is slightly bigger. This option + only affects the handling of branch instructions. + `-mbig-obj' On x86-64 PE/COFF target this option forces the use of big object file format, which allows more than 32768 sections. @@ -10443,6 +11209,25 @@ The i386 version of `as' has a few machine dependent options: omit all lock prefixes. `-momit-lock-prefix=NO' will encode lock prefix as usual, which is the default. +`-mfence-as-lock-add=NO' +`-mfence-as-lock-add=YES' + These options control how the assembler should encode lfence, + mfence and sfence. `-mfence-as-lock-add=YES' will encode lfence, + mfence and sfence as `lock addl $0x0, (%rsp)' in 64-bit mode and + `lock addl $0x0, (%esp)' in 32-bit mode. `-mfence-as-lock-add=NO' + will encode lfence, mfence and sfence as usual, which is the + default. + +`-mrelax-relocations=NO' +`-mrelax-relocations=YES' + These options control whether the assembler should generate relax + relocations, R_386_GOT32X, in 32-bit mode, or R_X86_64_GOTPCRELX + and R_X86_64_REX_GOTPCRELX, in 64-bit mode. + `-mrelax-relocations=YES' will generate relax relocations. + `-mrelax-relocations=NO' will not generate relax relocations. The + default can be controlled by a configure option + `--enable-x86-relax-relocations'. + `-mevexrcig=RNE' `-mevexrcig=RD' `-mevexrcig=RU' @@ -10453,6 +11238,11 @@ The i386 version of `as' has a few machine dependent options: `-mevexrcig=RU' and `-mevexrcig=RZ' will encode SAE-only EVEX instructions with 01, 10 and 11 RC bits, respectively. +`-mamd64' +`-mintel64' + This option specifies that the assembler should accept only AMD64 + or Intel64 ISA in 64-bit mode. The default is to accept both. +  File: as.info, Node: i386-Directives, Next: i386-Syntax, Prev: i386-Options, Up: i386-Dependent @@ -10558,8 +11348,11 @@ line.  File: as.info, Node: i386-Mnemonics, Next: i386-Regs, Prev: i386-Syntax, Up: i386-Dependent -9.15.4 Instruction Naming -------------------------- +9.15.4 i386-Mnemonics +--------------------- + +9.15.4.1 Instruction Naming +........................... Instruction mnemonics are suffixed with one character modifiers which specify the size of operands. The letters `b', `w', `l' and `q' @@ -10614,8 +11407,8 @@ naming. `as' accepts either naming for these instructions. Far call/jump instructions are `lcall' and `ljmp' in AT&T syntax, but are `call far' and `jump far' in Intel convention. -9.15.5 AT&T Mnemonic versus Intel Mnemonic ------------------------------------------- +9.15.4.2 AT&T Mnemonic versus Intel Mnemonic +............................................ `as' supports assembly using Intel mnemonic. `.intel_mnemonic' selects Intel mnemonic with Intel syntax, and `.att_mnemonic' switches back to @@ -10629,7 +11422,7 @@ instructions with AT&T mnemonic.  File: as.info, Node: i386-Regs, Next: i386-Prefixes, Prev: i386-Mnemonics, Up: i386-Dependent -9.15.6 Register Naming +9.15.5 Register Naming ---------------------- Register operands are always prefixed with `%'. The 80386 registers @@ -10649,7 +11442,8 @@ consist of * the 6 section registers `%cs' (code section), `%ds' (data section), `%ss' (stack section), `%es', `%fs', and `%gs'. - * the 3 processor control registers `%cr0', `%cr2', and `%cr3'. + * the 5 processor control registers `%cr0', `%cr2', `%cr3', `%cr4', + and `%cr8'. * the 6 debug registers `%db0', `%db1', `%db2', `%db3', `%db6', and `%db7'. @@ -10662,8 +11456,8 @@ consist of registers `%mm0', `%mm1', `%mm2', `%mm3', `%mm4', `%mm5', `%mm6' and `%mm7'. - * the 8 SSE registers registers `%xmm0', `%xmm1', `%xmm2', `%xmm3', - `%xmm4', `%xmm5', `%xmm6' and `%xmm7'. + * the 8 128-bit SSE registers registers `%xmm0', `%xmm1', `%xmm2', + `%xmm3', `%xmm4', `%xmm5', `%xmm6' and `%xmm7'. The AMD x86-64 architecture extends the register set by: @@ -10673,22 +11467,45 @@ consist of * the 8 extended registers `%r8'-`%r15'. - * the 8 32-bit low ends of the extended registers: `%r8d'-`%r15d' + * the 8 32-bit low ends of the extended registers: `%r8d'-`%r15d'. - * the 8 16-bit low ends of the extended registers: `%r8w'-`%r15w' + * the 8 16-bit low ends of the extended registers: `%r8w'-`%r15w'. - * the 8 8-bit low ends of the extended registers: `%r8b'-`%r15b' + * the 8 8-bit low ends of the extended registers: `%r8b'-`%r15b'. * the 4 8-bit registers: `%sil', `%dil', `%bpl', `%spl'. * the 8 debug registers: `%db8'-`%db15'. - * the 8 SSE registers: `%xmm8'-`%xmm15'. + * the 8 128-bit SSE registers: `%xmm8'-`%xmm15'. + + With the AVX extensions more registers were made available: + + * the 16 256-bit SSE `%ymm0'-`%ymm15' (only the first 8 available in + 32-bit mode). The bottom 128 bits are overlaid with the + `xmm0'-`xmm15' registers. + + + The AVX2 extensions made in 64-bit mode more registers available: + + * the 16 128-bit registers `%xmm16'-`%xmm31' and the 16 256-bit + registers `%ymm16'-`%ymm31'. + + + The AVX512 extensions added the following registers: + + * the 32 512-bit registers `%zmm0'-`%zmm31' (only the first 8 + available in 32-bit mode). The bottom 128 bits are overlaid with + the `%xmm0'-`%xmm31' registers and the first 256 bits are overlaid + with the `%ymm0'-`%ymm31' registers. + + * the 8 mask registers `%k0'-`%k7'. +  File: as.info, Node: i386-Prefixes, Next: i386-Memory, Prev: i386-Regs, Up: i386-Dependent -9.15.7 Instruction Prefixes +9.15.6 Instruction Prefixes --------------------------- Instruction prefixes are used to modify the following instruction. They @@ -10749,7 +11566,7 @@ and will not work with all prefixes.  File: as.info, Node: i386-Memory, Next: i386-Jumps, Prev: i386-Prefixes, Up: i386-Dependent -9.15.8 Memory References +9.15.7 Memory References ------------------------ An Intel syntax indirect memory reference of the form @@ -10819,7 +11636,7 @@ except registers used are 64-bit instead of 32-bit.  File: as.info, Node: i386-Jumps, Next: i386-Float, Prev: i386-Memory, Up: i386-Dependent -9.15.9 Handling of Jump Instructions +9.15.8 Handling of Jump Instructions ------------------------------------ Jump instructions are always optimized to use the smallest possible @@ -10845,8 +11662,8 @@ get around this problem by expanding `jcxz foo' to  File: as.info, Node: i386-Float, Next: i386-SIMD, Prev: i386-Jumps, Up: i386-Dependent -9.15.10 Floating Point ----------------------- +9.15.9 Floating Point +--------------------- All 80387 floating point types except packed BCD are supported. (BCD support may be added without much difficulty). These data types are @@ -10880,7 +11697,7 @@ point format, then stores the result in the 4 byte location `mem')  File: as.info, Node: i386-SIMD, Next: i386-LWP, Prev: i386-Float, Up: i386-Dependent -9.15.11 Intel's MMX and AMD's 3DNow! SIMD Operations +9.15.10 Intel's MMX and AMD's 3DNow! SIMD Operations ---------------------------------------------------- `as' supports Intel's MMX instruction set (SIMD instructions for @@ -10905,7 +11722,7 @@ order in instructions is reversed from the Intel syntax.  File: as.info, Node: i386-LWP, Next: i386-BMI, Prev: i386-SIMD, Up: i386-Dependent -9.15.12 AMD's Lightweight Profiling Instructions +9.15.11 AMD's Lightweight Profiling Instructions ------------------------------------------------ `as' supports AMD's Lightweight Profiling (LWP) instruction set, @@ -10924,7 +11741,7 @@ Specification (http://developer.amd.com/cpu/LWP).  File: as.info, Node: i386-BMI, Next: i386-TBM, Prev: i386-LWP, Up: i386-Dependent -9.15.13 Bit Manipulation Instructions +9.15.12 Bit Manipulation Instructions ------------------------------------- `as' supports the Bit Manipulation (BMI) instruction set. @@ -10936,7 +11753,7 @@ resetting.  File: as.info, Node: i386-TBM, Next: i386-16bit, Prev: i386-BMI, Up: i386-Dependent -9.15.14 AMD's Trailing Bit Manipulation Instructions +9.15.13 AMD's Trailing Bit Manipulation Instructions ---------------------------------------------------- `as' supports AMD's Trailing Bit Manipulation (TBM) instruction set, @@ -10949,7 +11766,7 @@ complementing, and operations on trailing zeros and ones.  File: as.info, Node: i386-16bit, Next: i386-Arch, Prev: i386-TBM, Up: i386-Dependent -9.15.15 Writing 16-bit Code +9.15.14 Writing 16-bit Code --------------------------- While `as' normally writes only "pure" 32-bit i386 code or 64-bit @@ -10988,30 +11805,10 @@ opcode bytes `6a 04' (i.e., without the operand size prefix), which is correct since the processor default operand size is assumed to be 16 bits in a 16-bit code section. - -File: as.info, Node: i386-Bugs, Next: i386-Notes, Prev: i386-Arch, Up: i386-Dependent - -9.15.16 AT&T Syntax bugs ------------------------- - -The UnixWare assembler, and probably other AT&T derived ix86 Unix -assemblers, generate floating point instructions with reversed source -and destination registers in certain cases. Unfortunately, gcc and -possibly many other programs use this reversed syntax, so we're stuck -with it. - - For example - - fsub %st,%st(3) - results in `%st(3)' being updated to `%st - %st(3)' rather than the -expected `%st(3) - %st'. This happens with all the non-commutative -arithmetic floating point operations with two register operands where -the source register is `%st' and the destination register is `%st(i)'. -  File: as.info, Node: i386-Arch, Next: i386-Bugs, Prev: i386-16bit, Up: i386-Dependent -9.15.17 Specifying CPU Architecture +9.15.15 Specifying CPU Architecture ----------------------------------- `as' may be told to assemble for a particular CPU (sub-)architecture @@ -11023,10 +11820,10 @@ specified. The choices for CPU_TYPE are: `i486' `i586' `i686' `pentium' `pentiumpro' `pentiumii' `pentiumiii' `pentium4' `prescott' `nocona' `core' `core2' -`corei7' `l1om' `k1om' +`corei7' `l1om' `k1om' `iamcu' `k6' `k6_2' `athlon' `k8' `amdfam10' `bdver1' `bdver2' `bdver3' -`bdver4' `btver1' `btver2' +`bdver4' `znver1' `btver1' `btver2' `generic32' `generic64' `.mmx' `.sse' `.sse2' `.sse3' `.ssse3' `.sse4.1' `.sse4.2' `.sse4' @@ -11040,11 +11837,12 @@ specified. The choices for CPU_TYPE are: `.clflushopt' `.xsavec' `.xsaves' `.se1' `.avx512f' `.avx512cd' `.avx512er' `.avx512pf' `.avx512vl' `.avx512bw' `.avx512dq' `.avx512ifma' -`.avx512vbmi' `.clwb' `.pcommit' +`.avx512vbmi' `.avx512_4fmaps'`.avx512_4vnniw' +`.avx512_vpopcntdq'`.clwb' `.rdpid' `.ptwrite' `.3dnow' `.3dnowa' `.sse4a' `.sse5' `.syscall' `.rdtscp' `.svme' `.abm' `.lwp' `.fma4' `.xop' `.cx16' -`.padlock' +`.padlock' `.clzero' `.mwaitx' Apart from the warning, there are only two other effects on `as' operation; Firstly, if you specify a CPU other than `i486', then shift @@ -11071,10 +11869,30 @@ byte offset jumps, and warns about file-local conditional jumps that .arch i8086,nojumps + +File: as.info, Node: i386-Bugs, Next: i386-Notes, Prev: i386-Arch, Up: i386-Dependent + +9.15.16 AT&T Syntax bugs +------------------------ + +The UnixWare assembler, and probably other AT&T derived ix86 Unix +assemblers, generate floating point instructions with reversed source +and destination registers in certain cases. Unfortunately, gcc and +possibly many other programs use this reversed syntax, so we're stuck +with it. + + For example + + fsub %st,%st(3) + results in `%st(3)' being updated to `%st - %st(3)' rather than the +expected `%st(3) - %st'. This happens with all the non-commutative +arithmetic floating point operations with two register operands where +the source register is `%st' and the destination register is `%st(i)'. +  File: as.info, Node: i386-Notes, Prev: i386-Bugs, Up: i386-Dependent -9.15.18 Notes +9.15.17 Notes ------------- There is some trickery concerning the `mul' and `imul' instructions @@ -13644,8 +14462,15 @@ The MIPS configurations of GNU `as' support these special options: `-mdspr2' `-mno-dspr2' Generate code for the DSP Release 2 Application Specific Extension. - This option implies -mdsp. This tells the assembler to accept DSP - Release 2 instructions. `-mno-dspr2' turns off this option. + This option implies `-mdsp'. This tells the assembler to accept + DSP Release 2 instructions. `-mno-dspr2' turns off this option. + +`-mdspr3' +`-mno-dspr3' + Generate code for the DSP Release 3 Application Specific Extension. + This option implies `-mdsp' and `-mdspr2'. This tells the + assembler to accept DSP Release 3 instructions. `-mno-dspr3' + turns off this option. `-mmt' `-mno-mt' @@ -13765,9 +14590,10 @@ The MIPS configurations of GNU `as' support these special options: 4kep, 4ksd, m4k, m4kp, m14k, m14kc, m14ke, m14kec, 24kc, 24kf2_1, 24kf, 24kf1_1, 24kec, 24kef2_1, 24kef, 24kef1_1, 34kc, 34kf2_1, 34kf, 34kf1_1, 34kn, 74kc, 74kf2_1, 74kf, - 74kf1_1, 74kf3_2, 1004kc, 1004kf2_1, 1004kf, 1004kf1_1, p5600, - 5kc, 5kf, 20kc, 25kf, sb1, sb1a, loongson2e, loongson2f, - loongson3a, octeon, octeon+, octeon2, xlr, xlp + 74kf1_1, 74kf3_2, 1004kc, 1004kf2_1, 1004kf, 1004kf1_1, + interaptiv, m5100, m5101, p5600, 5kc, 5kf, 20kc, 25kf, sb1, + sb1a, i6400, p6600, loongson2e, loongson2f, loongson3a, + octeon, octeon+, octeon2, octeon3, xlr, xlp For compatibility reasons, `Nx' and `Bfx' are accepted as synonyms for `Nf1_1'. These values are deprecated. @@ -13841,6 +14667,39 @@ The MIPS configurations of GNU `as' support these special options: By default `--no-relax-branch' is selected, causing any out-of-range branches to produce an error. +`-mignore-branch-isa' +`-mno-ignore-branch-isa' + Ignore branch checks for invalid transitions between ISA modes. + + The semantics of branches does not provide for an ISA mode switch, + so in most cases the ISA mode a branch has been encoded for has to + be the same as the ISA mode of the branch's target label. If the + ISA modes do not match, then such a branch, if taken, will cause + the ISA mode to remain unchanged and instructions that follow will + be executed in the wrong ISA mode causing the program to misbehave + or crash. + + In the case of the `BAL' instruction it may be possible to relax + it to an equivalent `JALX' instruction so that the ISA mode is + switched at the run time as required. For other branches no + relaxation is possible and therefore GAS has checks implemented + that verify in branch assembly that the two ISA modes match, and + report an error otherwise so that the problem with code can be + diagnosed at the assembly time rather than at the run time. + + However some assembly code, including generated code produced by + some versions of GCC, may incorrectly include branches to data + labels, which appear to require a mode switch but are either dead + or immediately followed by valid instructions encoded for the same + ISA the branch has been encoded for. While not strictly correct + at the source level such code will execute as intended, so to help + with these cases `-mignore-branch-isa' is supported which disables + ISA mode checks for branches. + + By default `-mno-ignore-branch-isa' is selected, causing any + invalid branch requiring a transition between ISA modes to produce + an error. + `-mnan=ENCODING' This option indicates whether the source code uses the IEEE 2008 NaN encoding (`-mnan=2008') or the original MIPS encoding @@ -14367,6 +15226,12 @@ on in the assembly. This directive implies `.set dsp'. The `.set nodspr2' directive prevents DSP Release 2 instructions from being accepted. + The directive `.set dspr3' makes the assembler accept instructions +from the DSP Release 3 Application Specific Extension from that point +on in the assembly. This directive implies `.set dsp' and `.set +dspr2'. The `.set nodspr3' directive prevents DSP Release 3 +instructions from being accepted. + The directive `.set mt' makes the assembler accept instructions from the MT Application Specific Extension from that point on in the assembly. The `.set nomt' directive prevents MT instructions from @@ -14942,6 +15807,39 @@ File: as.info, Node: MSP430 Options, Next: MSP430 Syntax, Up: MSP430-Dependen this also enables NOP generation unless the `-mN' is also specified. +`-msilicon-errata=NAME[,NAME...]' + Implements a fixup for named silicon errata. Multiple silicon + errata can be specified by multiple uses of the `-msilicon-errata' + option and/or by including the errata names, separated by commas, + on an individual `-msilicon-errata' option. Errata names + currently recognised by the assembler are: + + `cpu4' + `PUSH #4' and `PUSH #8' need longer encodings on the MSP430. + This option is enabled by default, and cannot be disabled. + + `cpu8' + Do not set the `SP' to an odd value. + + `cpu11' + Do not update the `SR' and the `PC' in the same instruction. + + `cpu12' + Do not use the `PC' in a `CMP' or `BIT' instruction. + + `cpu13' + Do not use an arithmetic instruction to modify the `SR'. + + `cpu19' + Insert `NOP' after `CPUOFF'. + +`-msilicon-errata-warn=NAME[,NAME...]' + Like the `-msilicon-errata' option except that instead of fixing + the specified errata, a warning message is issued instead. This + option can be used alongside `-msilicon-errata' to generate + messages whenever a problem is fixed, or on its own in order to + inspect code for potential problems. + `-mP' enables polymorph instructions handler. @@ -15629,6 +16527,13 @@ File: as.info, Node: Nios II Options, Next: Nios II Syntax, Up: NiosII-Depend `-EL' Generate little-endian output. This is the default. +`-march=ARCHITECTURE' + This option specifies the target architecture. The assembler + issues an error message if an attempt is made to assemble an + instruction which will not execute on the target architecture. + The following architecture names are recognized: `r1', `r2'. The + default is `r1'. +  File: as.info, Node: Nios II Syntax, Next: Nios II Relocations, Prev: Nios II Options, Up: NiosII-Dependent @@ -15777,7 +16682,7 @@ File: as.info, Node: Nios II Opcodes, Prev: Nios II Directives, Up: NiosII-De pseudo-instructions.  -File: as.info, Node: NS32K-Dependent, Next: SH-Dependent, Prev: NiosII-Dependent, Up: Machine Dependencies +File: as.info, Node: NS32K-Dependent, Next: PDP-11-Dependent, Prev: NiosII-Dependent, Up: Machine Dependencies 9.32 NS32K Dependent Features ============================= @@ -15818,7 +16723,7 @@ indicate the start of a line comment. line.  -File: as.info, Node: PDP-11-Dependent, Next: PJ-Dependent, Prev: SH64-Dependent, Up: Machine Dependencies +File: as.info, Node: PDP-11-Dependent, Next: PJ-Dependent, Prev: NS32K-Dependent, Up: Machine Dependencies 9.33 PDP-11 Dependent Features ============================== @@ -16262,6 +17167,9 @@ architecture reference manual. `-mpower8, -mpwr8' Generate code for Power8 architecture. +`-mpower9, -mpwr9' + Generate code for Power9 architecture. + `-mcell' `-mcell' @@ -16352,7 +17260,7 @@ be disabled via the `-mno-solaris' command line option. line.  -File: as.info, Node: RL78-Dependent, Next: RX-Dependent, Prev: PPC-Dependent, Up: Machine Dependencies +File: as.info, Node: RL78-Dependent, Next: RISC-V-Dependent, Prev: PPC-Dependent, Up: Machine Dependencies 9.36 RL78 Dependent Features ============================ @@ -16373,10 +17281,22 @@ File: as.info, Node: RL78-Opts, Next: RL78-Modifiers, Up: RL78-Dependent `relax' Enable support for link-time relaxation. +`norelax' + Disable support for link-time relaxation (default). + `mg10' Mark the generated binary as targeting the G10 variant of the RL78 architecture. +`mg13' + Mark the generated binary as targeting the G13 variant of the RL78 + architecture. + +`mg14' +`mrl78' + Mark the generated binary as targeting the G14 variant of the RL78 + architecture. This is the default. + `m32bit-doubles' Mark the generated binary as one that uses 32-bits to hold the `double' floating point type. This is the default. @@ -16467,9 +17387,38 @@ control command (*note Preprocessing::). line.  -File: as.info, Node: RX-Dependent, Next: S/390-Dependent, Prev: RL78-Dependent, Up: Machine Dependencies +File: as.info, Node: RISC-V-Dependent, Next: RX-Dependent, Prev: RL78-Dependent, Up: Machine Dependencies -9.37 RX Dependent Features +9.37 RISC-V Dependent Features +============================== + +* Menu: + +* RISC-V-Opts:: RISC-V Options + + +File: as.info, Node: RISC-V-Opts, Up: RISC-V-Dependent + +9.37.1 Options +-------------- + +The following table lists all availiable RISC-V specific options + +`-march=ISA' + Select the base isa, as specified by ISA. For example + -march=rv32ima. + +`-mabi=ABI' + Selects the ABI, which is either "ilp32" or "lp64", optionally + followed by "f", "d", or "q" to indicate single-precision, + double-precision, or quad-precision floating-point calling + convention, or none to indicate the soft-float calling convention. + + + +File: as.info, Node: RX-Dependent, Next: S/390-Dependent, Prev: RISC-V-Dependent, Up: Machine Dependencies + +9.38 RX Dependent Features ========================== * Menu: @@ -16483,7 +17432,7 @@ File: as.info, Node: RX-Dependent, Next: S/390-Dependent, Prev: RL78-Dependen  File: as.info, Node: RX-Opts, Next: RX-Modifiers, Up: RX-Dependent -9.37.1 RX Options +9.38.1 RX Options ----------------- The Renesas RX port of `as' has a few target specfic command line @@ -16557,15 +17506,30 @@ options: `-mcpu=NAME' This option tells the assembler the target CPU type. Currently the - `rx200', `rx600' and `rx610' are recognised as valid cpu names. - Attempting to assemble an instruction not supported by the - indicated cpu type will result in an error message being generated. + `rx100', `rx200', `rx600', `rx610' and `rxv2' are recognised as + valid cpu names. Attempting to assemble an instruction not + supported by the indicated cpu type will result in an error message + being generated. +`-mno-allow-string-insns' + This option tells the assembler to mark the object file that it is + building as one that does not use the string instructions `SMOVF', + `SCMPU', `SMOVB', `SMOVU', `SUNTIL' `SWHILE' or the `RMPA' + instruction. In addition the mark tells the linker to complain if + an attempt is made to link the binary with another one that does + use any of these instructions. + + Note - the inverse of this option, `-mallow-string-insns', is not + needed. The assembler automatically detects the use of the the + instructions in the source code and labels the resulting object + file appropriately. If no string instructions are detected then + the object file is labelled as being one that can be linked with + either string-using or string-banned object files.  File: as.info, Node: RX-Modifiers, Next: RX-Directives, Prev: RX-Opts, Up: RX-Dependent -9.37.2 Symbolic Operand Modifiers +9.38.2 Symbolic Operand Modifiers --------------------------------- The assembler supports one modifier when using symbol addresses in RX @@ -16599,7 +17563,7 @@ being used at the same time.  File: as.info, Node: RX-Directives, Next: RX-Float, Prev: RX-Modifiers, Up: RX-Dependent -9.37.3 Assembler Directives +9.38.3 Assembler Directives --------------------------- The RX version of `as' has the following specific assembler directives: @@ -16620,7 +17584,7 @@ The RX version of `as' has the following specific assembler directives:  File: as.info, Node: RX-Float, Next: RX-Syntax, Prev: RX-Directives, Up: RX-Dependent -9.37.4 Floating Point +9.38.4 Floating Point --------------------- The floating point formats generated by directives are these. @@ -16640,7 +17604,7 @@ The floating point formats generated by directives are these.  File: as.info, Node: RX-Syntax, Prev: RX-Float, Up: RX-Dependent -9.37.5 Syntax for the RX +9.38.5 Syntax for the RX ------------------------ * Menu: @@ -16650,7 +17614,7 @@ File: as.info, Node: RX-Syntax, Prev: RX-Float, Up: RX-Dependent  File: as.info, Node: RX-Chars, Up: RX-Syntax -9.37.5.1 Special Characters +9.38.5.1 Special Characters ........................... The presence of a `;' appearing anywhere on a line indicates the start @@ -16667,13 +17631,15 @@ line.  File: as.info, Node: S/390-Dependent, Next: SCORE-Dependent, Prev: RX-Dependent, Up: Machine Dependencies -9.38 IBM S/390 Dependent Features +9.39 IBM S/390 Dependent Features ================================= - The s390 version of `as' supports two architectures modes and seven + The s390 version of `as' supports two architectures modes and eleven chip levels. The architecture modes are the Enterprise System Architecture (ESA) and the newer z/Architecture mode. The chip levels -are g5, g6, z900, z990, z9-109, z9-ec, z10, z196, and zEC12. +are g5 (or arch3), g6, z900 (or arch5), z990 (or arch6), z9-109, z9-ec +(or arch7), z10 (or arch8), z196 (or arch9), zEC12 (or arch10), z13 (or +arch11), and arch12. * Menu: @@ -16686,7 +17652,7 @@ are g5, g6, z900, z990, z9-109, z9-ec, z10, z196, and zEC12.  File: as.info, Node: s390 Options, Next: s390 Characters, Up: S/390-Dependent -9.38.1 Options +9.39.1 Options -------------- The following table lists all available s390 specific options: @@ -16710,10 +17676,25 @@ The following table lists all available s390 specific options: `-march=CPU' This option specifies the target processor. The following - processor names are recognized: `g5', `g6', `z900', `z990', - `z9-109', `z9-ec', `z10' and `z196'. Assembling an instruction - that is not supported on the target processor results in an error - message. Do not specify `g5' or `g6' with `-mzarch'. + processor names are recognized: `g5' (or `arch3'), `g6', `z900' + (or `arch5'), `z990' (or `arch6'), `z9-109', `z9-ec' (or `arch7'), + `z10' (or `arch8'), `z196' (or `arch9'), `zEC12' (or `arch10') and + `z13' (or `arch11'). + + Assembling an instruction that is not supported on the target + processor results in an error message. + + The processor names starting with `arch' refer to the edition + number in the Principle of Operations manual. They can be used as + alternate processor names and have been added for compatibility + with the IBM XL compiler. + + `arch3', `g5' and `g6' cannot be used with the `-mzarch' option + since the z/Architecture mode is not supported on these processor + levels. + + There is no `arch4' option supported. `arch4' matches + `-march=arch5 -mesa'. `-mregnames' Allow symbolic names for registers. @@ -16730,7 +17711,7 @@ The following table lists all available s390 specific options:  File: as.info, Node: s390 Characters, Next: s390 Syntax, Prev: s390 Options, Up: S/390-Dependent -9.38.2 Special Characters +9.39.2 Special Characters ------------------------- `#' is the line comment character. @@ -16746,7 +17727,7 @@ statements.  File: as.info, Node: s390 Syntax, Next: s390 Directives, Prev: s390 Characters, Up: S/390-Dependent -9.38.3 Instruction syntax +9.39.3 Instruction syntax ------------------------- The assembler syntax closely follows the syntax outlined in Enterprise @@ -16770,7 +17751,7 @@ the instruction operands. The instruction format varies.  File: as.info, Node: s390 Register, Next: s390 Mnemonics, Up: s390 Syntax -9.38.3.1 Register naming +9.39.3.1 Register naming ........................ The `as' recognizes a number of predefined symbols for the various @@ -16790,7 +17771,7 @@ denotes the type of the register. The register symbols are prefixed with  File: as.info, Node: s390 Mnemonics, Next: s390 Operands, Prev: s390 Register, Up: s390 Syntax -9.38.3.2 Instruction Mnemonics +9.39.3.2 Instruction Mnemonics .............................. All instructions documented in the Principles of Operation are supported @@ -16849,7 +17830,7 @@ in the Principles of Operation.  File: as.info, Node: s390 Operands, Next: s390 Formats, Prev: s390 Mnemonics, Up: s390 Syntax -9.38.3.3 Instruction Operands +9.39.3.3 Instruction Operands ............................. Instruction operands can be grouped into three classes, operands located @@ -16922,7 +17903,7 @@ to the operand field. The notation changes as follows:  File: as.info, Node: s390 Formats, Next: s390 Aliases, Prev: s390 Operands, Up: s390 Syntax -9.38.3.4 Instruction Formats +9.39.3.4 Instruction Formats ............................ The Principles of Operation manuals lists 26 instruction formats where @@ -17135,7 +18116,7 @@ Principles of Operation manuals.  File: as.info, Node: s390 Aliases, Next: s390 Operand Modifier, Prev: s390 Formats, Up: s390 Syntax -9.38.3.5 Instruction Aliases +9.39.3.5 Instruction Aliases ............................ A specific bit pattern can have multiple mnemonics, for example the bit @@ -17231,7 +18212,7 @@ instruction the condition code string can be any of the following:  File: as.info, Node: s390 Operand Modifier, Next: s390 Instruction Marker, Prev: s390 Aliases, Up: s390 Syntax -9.38.3.6 Instruction Operand Modifier +9.39.3.6 Instruction Operand Modifier ..................................... If a symbol modifier is attached to a symbol in an expression for an @@ -17312,7 +18293,7 @@ Handling For Thread-Local Storage'.  File: as.info, Node: s390 Instruction Marker, Next: s390 Literal Pool Entries, Prev: s390 Operand Modifier, Up: s390 Syntax -9.38.3.7 Instruction Marker +9.39.3.7 Instruction Marker ........................... The thread local storage instruction markers are used by the linker to @@ -17340,7 +18321,7 @@ marker and the linker optimizations see the ELF extension documentation  File: as.info, Node: s390 Literal Pool Entries, Prev: s390 Instruction Marker, Up: s390 Syntax -9.38.3.8 Literal Pool Entries +9.39.3.8 Literal Pool Entries ............................. A literal pool is a collection of values. To access the values a pointer @@ -17383,7 +18364,7 @@ entries to the current position.  File: as.info, Node: s390 Directives, Next: s390 Floating Point, Prev: s390 Syntax, Up: S/390-Dependent -9.38.4 Assembler Directives +9.39.4 Assembler Directives --------------------------- `as' for s390 supports all of the standard ELF assembler directives as @@ -17473,15 +18454,21 @@ available for the s390 `as'. be dumped to the current location (*Note s390 Literal Pool Entries::). -`.machine string' - This directive allows you to change the machine for which code is - generated. `string' may be any of the `-march=' selection options - (without the -march=), `push', or `pop'. `.machine push' saves - the currently selected cpu, which may be restored with `.machine - pop'. Be aware that the cpu string has to be put into double - quotes in case it contains characters not appropriate for - identifiers. So you have to write `"z9-109"' instead of just - `z9-109'. +`.machine STRING[+EXTENSION]...' + This directive allows changing the machine for which code is + generated. `string' may be any of the `-march=' selection + options, or `push', or `pop'. `.machine push' saves the currently + selected cpu, which may be restored with `.machine pop'. Be aware + that the cpu string has to be put into double quotes in case it + contains characters not appropriate for identifiers. So you have + to write `"z9-109"' instead of just `z9-109'. Extensions can be + specified after the cpu name, separated by plus charaters. Valid + extensions are: `htm', `nohtm', `vx', `novx'. They extend the + basic instruction set with features from a higher cpu level, or + remove support for a feature from the given cpu level. + + Example: `z13+nohtm' allows all instructions of the z13 cpu except + instructions from the HTM facility. `.machinemode string' This directive allows to change the architecture mode for which @@ -17497,7 +18484,7 @@ available for the s390 `as'.  File: as.info, Node: s390 Floating Point, Prev: s390 Directives, Up: S/390-Dependent -9.38.5 Floating Point +9.39.5 Floating Point --------------------- The assembler recognizes both the IEEE floating-point instruction and @@ -17507,9 +18494,9 @@ format. To assemble hexadecimal floating-point constants the `.long' and `.quad' directives must be used.  -File: as.info, Node: SCORE-Dependent, Next: Sparc-Dependent, Prev: S/390-Dependent, Up: Machine Dependencies +File: as.info, Node: SCORE-Dependent, Next: SH-Dependent, Prev: S/390-Dependent, Up: Machine Dependencies -9.39 SCORE Dependent Features +9.40 SCORE Dependent Features ============================= * Menu: @@ -17521,7 +18508,7 @@ File: as.info, Node: SCORE-Dependent, Next: Sparc-Dependent, Prev: S/390-Depe  File: as.info, Node: SCORE-Opts, Next: SCORE-Pseudo, Up: SCORE-Dependent -9.39.1 Options +9.40.1 Options -------------- The following table lists all available SCORE options. @@ -17579,7 +18566,7 @@ The following table lists all available SCORE options.  File: as.info, Node: SCORE-Pseudo, Next: SCORE-Syntax, Prev: SCORE-Opts, Up: SCORE-Dependent -9.39.2 SCORE Assembler Directives +9.40.2 SCORE Assembler Directives --------------------------------- A number of assembler directives are available for SCORE. The @@ -17640,7 +18627,7 @@ following table is far from complete.  File: as.info, Node: SCORE-Syntax, Prev: SCORE-Pseudo, Up: SCORE-Dependent -9.39.3 SCORE Syntax +9.40.3 SCORE Syntax ------------------- * Menu: @@ -17650,7 +18637,7 @@ File: as.info, Node: SCORE-Syntax, Prev: SCORE-Pseudo, Up: SCORE-Dependent  File: as.info, Node: SCORE-Chars, Up: SCORE-Syntax -9.39.3.1 Special Characters +9.40.3.1 Special Characters ........................... The presence of a `#' appearing anywhere on a line indicates the start @@ -17665,9 +18652,9 @@ control command (*note Preprocessing::). line.  -File: as.info, Node: SH-Dependent, Next: SH64-Dependent, Prev: NS32K-Dependent, Up: Machine Dependencies +File: as.info, Node: SH-Dependent, Next: SH64-Dependent, Prev: SCORE-Dependent, Up: Machine Dependencies -9.40 Renesas / SuperH SH Dependent Features +9.41 Renesas / SuperH SH Dependent Features =========================================== * Menu: @@ -17681,7 +18668,7 @@ File: as.info, Node: SH-Dependent, Next: SH64-Dependent, Prev: NS32K-Dependen  File: as.info, Node: SH Options, Next: SH Syntax, Up: SH-Dependent -9.40.1 Options +9.41.1 Options -------------- `as' has following command-line options for the Renesas (formerly @@ -17731,7 +18718,7 @@ Hitachi) / SuperH SH family.  File: as.info, Node: SH Syntax, Next: SH Floating Point, Prev: SH Options, Up: SH-Dependent -9.40.2 Syntax +9.41.2 Syntax ------------- * Menu: @@ -17743,7 +18730,7 @@ File: as.info, Node: SH Syntax, Next: SH Floating Point, Prev: SH Options, U  File: as.info, Node: SH-Chars, Next: SH-Regs, Up: SH Syntax -9.40.2.1 Special Characters +9.41.2.1 Special Characters ........................... `!' is the line comment character. @@ -17760,7 +18747,7 @@ control command (*note Preprocessing::).  File: as.info, Node: SH-Regs, Next: SH-Addressing, Prev: SH-Chars, Up: SH Syntax -9.40.2.2 Register Names +9.41.2.2 Register Names ....................... You can use the predefined symbols `r0', `r1', `r2', `r3', `r4', `r5', @@ -17791,7 +18778,7 @@ refer to the SH registers.  File: as.info, Node: SH-Addressing, Prev: SH-Regs, Up: SH Syntax -9.40.2.3 Addressing Modes +9.41.2.3 Addressing Modes ......................... `as' understands the following addressing modes for the SH. `RN' in @@ -17835,7 +18822,7 @@ control registers.  File: as.info, Node: SH Floating Point, Next: SH Directives, Prev: SH Syntax, Up: SH-Dependent -9.40.3 Floating Point +9.41.3 Floating Point --------------------- SH2E, SH3E and SH4 groups have on-chip floating-point unit (FPU). Other @@ -17859,7 +18846,7 @@ conventional architectures at the same frequency.  File: as.info, Node: SH Directives, Next: SH Opcodes, Prev: SH Floating Point, Up: SH-Dependent -9.40.4 SH Machine Directives +9.41.4 SH Machine Directives ---------------------------- `uaword' @@ -17872,7 +18859,7 @@ File: as.info, Node: SH Directives, Next: SH Opcodes, Prev: SH Floating Point  File: as.info, Node: SH Opcodes, Prev: SH Directives, Up: SH-Dependent -9.40.5 Opcodes +9.41.5 Opcodes -------------- For detailed information on the SH machine instruction set, see @@ -17971,9 +18958,9 @@ from the program counter: stc SR,Rn  -File: as.info, Node: SH64-Dependent, Next: PDP-11-Dependent, Prev: SH-Dependent, Up: Machine Dependencies +File: as.info, Node: SH64-Dependent, Next: Sparc-Dependent, Prev: SH-Dependent, Up: Machine Dependencies -9.41 SuperH SH64 Dependent Features +9.42 SuperH SH64 Dependent Features =================================== * Menu: @@ -17986,7 +18973,7 @@ File: as.info, Node: SH64-Dependent, Next: PDP-11-Dependent, Prev: SH-Depende  File: as.info, Node: SH64 Options, Next: SH64 Syntax, Up: SH64-Dependent -9.41.1 Options +9.42.1 Options -------------- `-isa=sh4 | sh4a' @@ -18042,7 +19029,7 @@ File: as.info, Node: SH64 Options, Next: SH64 Syntax, Up: SH64-Dependent  File: as.info, Node: SH64 Syntax, Next: SH64 Directives, Prev: SH64 Options, Up: SH64-Dependent -9.41.2 Syntax +9.42.2 Syntax ------------- * Menu: @@ -18054,7 +19041,7 @@ File: as.info, Node: SH64 Syntax, Next: SH64 Directives, Prev: SH64 Options,  File: as.info, Node: SH64-Chars, Next: SH64-Regs, Up: SH64 Syntax -9.41.2.1 Special Characters +9.42.2.1 Special Characters ........................... `!' is the line comment character. @@ -18071,7 +19058,7 @@ control command (*note Preprocessing::).  File: as.info, Node: SH64-Regs, Next: SH64-Addressing, Prev: SH64-Chars, Up: SH64 Syntax -9.41.2.2 Register Names +9.42.2.2 Register Names ....................... You can use the predefined symbols `r0' through `r63' to refer to the @@ -18093,7 +19080,7 @@ counter, and `fpscr' for the floating point status and control register.  File: as.info, Node: SH64-Addressing, Prev: SH64-Regs, Up: SH64 Syntax -9.41.2.3 Addressing Modes +9.42.2.3 Addressing Modes ......................... SH64 operands consist of either a register or immediate value. The @@ -18125,7 +19112,7 @@ of the label, regardless of what type of label it is.  File: as.info, Node: SH64 Directives, Next: SH64 Opcodes, Prev: SH64 Syntax, Up: SH64-Dependent -9.41.3 SH64 Machine Directives +9.42.3 SH64 Machine Directives ------------------------------ In addition to the SH directives, the SH64 provides the following @@ -18150,7 +19137,7 @@ directives:  File: as.info, Node: SH64 Opcodes, Prev: SH64 Directives, Up: SH64-Dependent -9.41.4 Opcodes +9.42.4 Opcodes -------------- For detailed information on the SH64 machine instruction set, see @@ -18171,9 +19158,9 @@ opcodes:  -File: as.info, Node: Sparc-Dependent, Next: TIC54X-Dependent, Prev: SCORE-Dependent, Up: Machine Dependencies +File: as.info, Node: Sparc-Dependent, Next: TIC54X-Dependent, Prev: SH64-Dependent, Up: Machine Dependencies -9.42 SPARC Dependent Features +9.43 SPARC Dependent Features ============================= * Menu: @@ -18187,7 +19174,7 @@ File: as.info, Node: Sparc-Dependent, Next: TIC54X-Dependent, Prev: SCORE-Dep  File: as.info, Node: Sparc-Opts, Next: Sparc-Aligned-Data, Up: Sparc-Dependent -9.42.1 Options +9.43.1 Options -------------- The SPARC chip family includes several successive versions, using the @@ -18210,10 +19197,10 @@ architecture is explicitly requested. SPARC v9 is always incompatible with sparclite. `-Av6 | -Av7 | -Av8 | -Aleon | -Asparclet | -Asparclite' -`-Av8plus | -Av8plusa | -Av8plusb | -Av8plusc | -Av8plusd | -Av8plusv' +`-Av8plus | -Av8plusa | -Av8plusb | -Av8plusc | -Av8plusd | -Av8plusv | -Av8plusm' `-Av9 | -Av9a | -Av9b | -Av9c | -Av9d | -Av9e | -Av9v | -Av9m' `-Asparc | -Asparcvis | -Asparcvis2 | -Asparcfmaf | -Asparcima' -`-Asparcvis3 | -Asparcvis3r' +`-Asparcvis3 | -Asparcvis3r | -Asparc5' Use one of the `-A' options to select one of the SPARC architectures explicitly. If you select an architecture explicitly, `as' reports a fatal error if it encounters an @@ -18274,16 +19261,16 @@ with sparclite. `-Asparc5' is equivalent to `-Av9m'. `-xarch=v8plus | -xarch=v8plusa | -xarch=v8plusb | -xarch=v8plusc' -`-xarch=v8plusd | -xarch=v8plusv | -xarch=v9 | -xarch=v9a' +`-xarch=v8plusd | -xarch=v8plusv | -xarch=v8plusm | -xarch=v9 | -xarch=v9a' `-xarch=v9b | -xarch=v9c | -xarch=v9d | -xarch=v9e | -xarch=v9v | -xarch=v9m' `-xarch=sparc | -xarch=sparcvis | -xarch=sparcvis2' `-xarch=sparcfmaf | -xarch=sparcima | -xarch=sparcvis3' `-xarch=sparcvis3r | -xarch=sparc5' For compatibility with the SunOS v9 assembler. These options are equivalent to -Av8plus, -Av8plusa, -Av8plusb, -Av8plusc, -Av8plusd, - -Av8plusv, -Av9, -Av9a, -Av9b, -Av9c, -Av9d, -Av9e, -Av9v, -Av9m, - -Asparc, -Asparcvis, -Asparcvis2, -Asparcfmaf, -Asparcima, - -Asparcvis3, and -Asparcvis3r, respectively. + -Av8plusv, -Av8plusm, -Av9, -Av9a, -Av9b, -Av9c, -Av9d, -Av9e, + -Av9v, -Av9m, -Asparc, -Asparcvis, -Asparcvis2, -Asparcfmaf, + -Asparcima, -Asparcvis3, and -Asparcvis3r, respectively. `-bump' Warn whenever it is necessary to switch to another level. If an @@ -18296,10 +19283,16 @@ with sparclite. are only available with the ELF object file format, and require that the necessary BFD support has been included. +`--dcti-couples-detect' + Warn if a DCTI (delayed control transfer instruction) couple is + found when generating code for a variant of the SPARC architecture + in which the execution of the couple is unpredictable, or very + slow. This is disabled by default. +  File: as.info, Node: Sparc-Aligned-Data, Next: Sparc-Syntax, Prev: Sparc-Opts, Up: Sparc-Dependent -9.42.2 Enforcing aligned data +9.43.2 Enforcing aligned data ----------------------------- SPARC GAS normally permits data to be misaligned. For example, it @@ -18320,7 +19313,7 @@ structures in your own code.  File: as.info, Node: Sparc-Syntax, Next: Sparc-Float, Prev: Sparc-Aligned-Data, Up: Sparc-Dependent -9.42.3 Sparc Syntax +9.43.3 Sparc Syntax ------------------- The assembler syntax closely follows The Sparc Architecture Manual, @@ -18338,7 +19331,7 @@ UltraSPARC and Niagara line of processors.  File: as.info, Node: Sparc-Chars, Next: Sparc-Regs, Up: Sparc-Syntax -9.42.3.1 Special Characters +9.43.3.1 Special Characters ........................... A `!' character appearing anywhere on a line indicates the start of a @@ -18354,7 +19347,7 @@ control command (*note Preprocessing::).  File: as.info, Node: Sparc-Regs, Next: Sparc-Constants, Prev: Sparc-Chars, Up: Sparc-Syntax -9.42.3.2 Register Names +9.43.3.2 Register Names ....................... The Sparc integer register file is broken down into global, outgoing, @@ -18382,6 +19375,13 @@ double or quad, and thus only even or quad numbered accesses are allowed. For example, `%f34' is a legal floating point register, but `%f35' is not. + Floating point registers accessed as double can also be referred +using the `%dN' notation, where N is even. Similarly, floating point +registers accessed as quad can be referred using the `%qN' notation, +where N is a multiple of 4. For example, `%f4' can be denoted as both +`%d4' and `%q4'. On the other hand, `%f2' can be denoted as `%d2' but +not as `%q2'. + Certain V9 instructions allow access to ancillary state registers. Most simply they can be referred to as `%asrN' where N can be from 16 to 31. However, there are some aliases defined to reference ASR @@ -18420,6 +19420,10 @@ registers defined for various UltraSPARC processors: specification of which set of integer condition codes to test. These are referred to as `%xcc' and `%icc'. + Additionally, GAS supports the so-called "natural" condition codes; +these are referred to as `%ncc' and reference to `%icc' if the word +size is 32, `%xcc' if the word size is 64. + In V9, there are 4 sets of floating point condition codes which are referred to as `%fccN'. @@ -18511,7 +19515,7 @@ referred to as `%fccN'.  File: as.info, Node: Sparc-Constants, Next: Sparc-Relocs, Prev: Sparc-Regs, Up: Sparc-Syntax -9.42.3.3 Constants +9.43.3.3 Constants .................. Several Sparc instructions take an immediate operand field for which @@ -18625,7 +19629,7 @@ available:  File: as.info, Node: Sparc-Relocs, Next: Sparc-Size-Translations, Prev: Sparc-Constants, Up: Sparc-Syntax -9.42.3.4 Relocations +9.43.3.4 Relocations .................... ELF relocations are available as defined in the 32-bit and 64-bit Sparc @@ -18783,7 +19787,7 @@ instead.  File: as.info, Node: Sparc-Size-Translations, Prev: Sparc-Relocs, Up: Sparc-Syntax -9.42.3.5 Size Translations +9.43.3.5 Size Translations .......................... Often it is desirable to write code in an operand size agnostic manner. @@ -18842,7 +19846,7 @@ It is documented in the section on Sparc machine directives.  File: as.info, Node: Sparc-Float, Next: Sparc-Directives, Prev: Sparc-Syntax, Up: Sparc-Dependent -9.42.4 Floating Point +9.43.4 Floating Point --------------------- The Sparc uses IEEE floating-point numbers. @@ -18850,7 +19854,7 @@ The Sparc uses IEEE floating-point numbers.  File: as.info, Node: Sparc-Directives, Prev: Sparc-Float, Up: Sparc-Dependent -9.42.5 Sparc Machine Directives +9.43.5 Sparc Machine Directives ------------------------------- The Sparc version of `as' supports the following additional machine @@ -18909,7 +19913,7 @@ directives:  File: as.info, Node: TIC54X-Dependent, Next: TIC6X-Dependent, Prev: Sparc-Dependent, Up: Machine Dependencies -9.43 TIC54X Dependent Features +9.44 TIC54X Dependent Features ============================== * Menu: @@ -18930,7 +19934,7 @@ File: as.info, Node: TIC54X-Dependent, Next: TIC6X-Dependent, Prev: Sparc-Dep  File: as.info, Node: TIC54X-Opts, Next: TIC54X-Block, Up: TIC54X-Dependent -9.43.1 Options +9.44.1 Options -------------- The TMS320C54X version of `as' has a few machine-dependent options. @@ -18955,7 +19959,7 @@ provide adequate output redirection). This option may be abbreviated to  File: as.info, Node: TIC54X-Block, Next: TIC54X-Env, Prev: TIC54X-Opts, Up: TIC54X-Dependent -9.43.2 Blocking +9.44.2 Blocking --------------- A blocked section or memory block is guaranteed not to cross the @@ -18966,7 +19970,7 @@ the blocking size.  File: as.info, Node: TIC54X-Env, Next: TIC54X-Constants, Prev: TIC54X-Block, Up: TIC54X-Dependent -9.43.3 Environment Settings +9.44.3 Environment Settings --------------------------- `C54XDSP_DIR' and `A_DIR' are semicolon-separated paths which are added @@ -18976,7 +19980,7 @@ files. `C54XDSP_DIR' will override `A_DIR'.  File: as.info, Node: TIC54X-Constants, Next: TIC54X-Subsyms, Prev: TIC54X-Env, Up: TIC54X-Dependent -9.43.4 Constants Syntax +9.44.4 Constants Syntax ----------------------- The TIC54X version of `as' allows the following additional constant @@ -18989,7 +19993,7 @@ formats, using a suffix to indicate the radix:  File: as.info, Node: TIC54X-Subsyms, Next: TIC54X-Locals, Prev: TIC54X-Constants, Up: TIC54X-Dependent -9.43.5 String Substitution +9.44.5 String Substitution -------------------------- A subset of allowable symbols (which we'll call subsyms) may be assigned @@ -19044,7 +20048,7 @@ the following syntax:  File: as.info, Node: TIC54X-Locals, Next: TIC54X-Builtins, Prev: TIC54X-Subsyms, Up: TIC54X-Dependent -9.43.6 Local Labels +9.44.6 Local Labels ------------------- Local labels may be defined in two ways: @@ -19069,7 +20073,7 @@ is encountered:  File: as.info, Node: TIC54X-Builtins, Next: TIC54X-Ext, Prev: TIC54X-Locals, Up: TIC54X-Dependent -9.43.7 Math Builtins +9.44.7 Math Builtins -------------------- The following built-in functions may be used to generate a @@ -19166,7 +20170,7 @@ floating-point value. All return a floating-point value except `$cvi',  File: as.info, Node: TIC54X-Ext, Next: TIC54X-Directives, Prev: TIC54X-Builtins, Up: TIC54X-Dependent -9.43.8 Extended Addressing +9.44.8 Extended Addressing -------------------------- The `LDX' pseudo-op is provided for loading the extended addressing bits @@ -19179,7 +20183,7 @@ extended program memory, the value of `_label' may be loaded as follows:  File: as.info, Node: TIC54X-Directives, Next: TIC54X-Macros, Prev: TIC54X-Ext, Up: TIC54X-Dependent -9.43.9 Directives +9.44.9 Directives ----------------- `.align [SIZE]' @@ -19467,7 +20471,7 @@ File: as.info, Node: TIC54X-Directives, Next: TIC54X-Macros, Prev: TIC54X-Ext  File: as.info, Node: TIC54X-Macros, Next: TIC54X-MMRegs, Prev: TIC54X-Directives, Up: TIC54X-Dependent -9.43.10 Macros +9.44.10 Macros -------------- Macros do not require explicit dereferencing of arguments (i.e., \ARG). @@ -19529,7 +20533,7 @@ replaced by the strings they represent).  File: as.info, Node: TIC54X-MMRegs, Next: TIC54X-Syntax, Prev: TIC54X-Macros, Up: TIC54X-Dependent -9.43.11 Memory-mapped Registers +9.44.11 Memory-mapped Registers ------------------------------- The following symbols are recognized as memory-mapped registers: @@ -19538,7 +20542,7 @@ The following symbols are recognized as memory-mapped registers:  File: as.info, Node: TIC54X-Syntax, Prev: TIC54X-MMRegs, Up: TIC54X-Dependent -9.43.12 TIC54X Syntax +9.44.12 TIC54X Syntax --------------------- * Menu: @@ -19548,7 +20552,7 @@ File: as.info, Node: TIC54X-Syntax, Prev: TIC54X-MMRegs, Up: TIC54X-Dependent  File: as.info, Node: TIC54X-Chars, Up: TIC54X-Syntax -9.43.12.1 Special Characters +9.44.12.1 Special Characters ............................ The presence of a `;' appearing anywhere on a line indicates the start @@ -19568,7 +20572,7 @@ character.  File: as.info, Node: TIC6X-Dependent, Next: TILE-Gx-Dependent, Prev: TIC54X-Dependent, Up: Machine Dependencies -9.44 TIC6X Dependent Features +9.45 TIC6X Dependent Features ============================= * Menu: @@ -19580,7 +20584,7 @@ File: as.info, Node: TIC6X-Dependent, Next: TILE-Gx-Dependent, Prev: TIC54X-D  File: as.info, Node: TIC6X Options, Next: TIC6X Syntax, Up: TIC6X-Dependent -9.44.1 TIC6X Options +9.45.1 TIC6X Options -------------------- `-march=ARCH' @@ -19632,7 +20636,7 @@ File: as.info, Node: TIC6X Options, Next: TIC6X Syntax, Up: TIC6X-Dependent  File: as.info, Node: TIC6X Syntax, Next: TIC6X Directives, Prev: TIC6X Options, Up: TIC6X-Dependent -9.44.2 TIC6X Syntax +9.45.2 TIC6X Syntax ------------------- The presence of a `;' on a line indicates the start of a comment that @@ -19658,7 +20662,7 @@ parentheses.  File: as.info, Node: TIC6X Directives, Prev: TIC6X Syntax, Up: TIC6X-Dependent -9.44.3 TIC6X Directives +9.45.3 TIC6X Directives ----------------------- Directives controlling the set of instructions accepted by the @@ -19722,7 +20726,7 @@ subsequent directive overriding it.  File: as.info, Node: TILE-Gx-Dependent, Next: TILEPro-Dependent, Prev: TIC6X-Dependent, Up: Machine Dependencies -9.45 TILE-Gx Dependent Features +9.46 TILE-Gx Dependent Features =============================== * Menu: @@ -19734,7 +20738,7 @@ File: as.info, Node: TILE-Gx-Dependent, Next: TILEPro-Dependent, Prev: TIC6X-  File: as.info, Node: TILE-Gx Options, Next: TILE-Gx Syntax, Up: TILE-Gx-Dependent -9.45.1 Options +9.46.1 Options -------------- The following table lists all available TILE-Gx specific options: @@ -19750,7 +20754,7 @@ The following table lists all available TILE-Gx specific options:  File: as.info, Node: TILE-Gx Syntax, Next: TILE-Gx Directives, Prev: TILE-Gx Options, Up: TILE-Gx-Dependent -9.45.2 Syntax +9.46.2 Syntax ------------- Block comments are delimited by `/*' and `*/'. End of line comments @@ -19807,7 +20811,7 @@ bundle.  File: as.info, Node: TILE-Gx Opcodes, Next: TILE-Gx Registers, Up: TILE-Gx Syntax -9.45.2.1 Opcode Names +9.46.2.1 Opcode Names ..................... For a complete list of opcodes and descriptions of their semantics, see @@ -19817,7 +20821,7 @@ www.tilera.com.  File: as.info, Node: TILE-Gx Registers, Next: TILE-Gx Modifiers, Prev: TILE-Gx Opcodes, Up: TILE-Gx Syntax -9.45.2.2 Register Names +9.46.2.2 Register Names ....................... General-purpose registers are represented by predefined symbols of the @@ -19863,7 +20867,7 @@ assembler pseudo-op turns off this warning.  File: as.info, Node: TILE-Gx Modifiers, Prev: TILE-Gx Registers, Up: TILE-Gx Syntax -9.45.2.3 Symbolic Operand Modifiers +9.46.2.3 Symbolic Operand Modifiers ................................... The assembler supports several modifiers when using symbol addresses in @@ -20006,7 +21010,7 @@ TILE-Gx instruction operands. The general syntax is the following:  File: as.info, Node: TILE-Gx Directives, Prev: TILE-Gx Syntax, Up: TILE-Gx-Dependent -9.45.3 TILE-Gx Directives +9.46.3 TILE-Gx Directives ------------------------- `.align EXPRESSION [, EXPRESSION]' @@ -20034,7 +21038,7 @@ File: as.info, Node: TILE-Gx Directives, Prev: TILE-Gx Syntax, Up: TILE-Gx-De  File: as.info, Node: TILEPro-Dependent, Next: V850-Dependent, Prev: TILE-Gx-Dependent, Up: Machine Dependencies -9.46 TILEPro Dependent Features +9.47 TILEPro Dependent Features =============================== * Menu: @@ -20046,7 +21050,7 @@ File: as.info, Node: TILEPro-Dependent, Next: V850-Dependent, Prev: TILE-Gx-D  File: as.info, Node: TILEPro Options, Next: TILEPro Syntax, Up: TILEPro-Dependent -9.46.1 Options +9.47.1 Options -------------- `as' has no machine-dependent command-line options for TILEPro. @@ -20054,7 +21058,7 @@ File: as.info, Node: TILEPro Options, Next: TILEPro Syntax, Up: TILEPro-Depen  File: as.info, Node: TILEPro Syntax, Next: TILEPro Directives, Prev: TILEPro Options, Up: TILEPro-Dependent -9.46.2 Syntax +9.47.2 Syntax ------------- Block comments are delimited by `/*' and `*/'. End of line comments @@ -20111,7 +21115,7 @@ bundle.  File: as.info, Node: TILEPro Opcodes, Next: TILEPro Registers, Up: TILEPro Syntax -9.46.2.1 Opcode Names +9.47.2.1 Opcode Names ..................... For a complete list of opcodes and descriptions of their semantics, see @@ -20121,7 +21125,7 @@ www.tilera.com.  File: as.info, Node: TILEPro Registers, Next: TILEPro Modifiers, Prev: TILEPro Opcodes, Up: TILEPro Syntax -9.46.2.2 Register Names +9.47.2.2 Register Names ....................... General-purpose registers are represented by predefined symbols of the @@ -20167,7 +21171,7 @@ it back on.  File: as.info, Node: TILEPro Modifiers, Prev: TILEPro Registers, Up: TILEPro Syntax -9.46.2.3 Symbolic Operand Modifiers +9.47.2.3 Symbolic Operand Modifiers ................................... The assembler supports several modifiers when using symbol addresses in @@ -20296,7 +21300,7 @@ TILEPro instruction operands. The general syntax is the following:  File: as.info, Node: TILEPro Directives, Prev: TILEPro Syntax, Up: TILEPro-Dependent -9.46.3 TILEPro Directives +9.47.3 TILEPro Directives ------------------------- `.align EXPRESSION [, EXPRESSION]' @@ -20322,595 +21326,498 @@ File: as.info, Node: TILEPro Directives, Prev: TILEPro Syntax, Up: TILEPro-De  -File: as.info, Node: Z80-Dependent, Next: Z8000-Dependent, Prev: Xtensa-Dependent, Up: Machine Dependencies +File: as.info, Node: V850-Dependent, Next: Vax-Dependent, Prev: TILEPro-Dependent, Up: Machine Dependencies -9.47 Z80 Dependent Features -=========================== +9.48 v850 Dependent Features +============================ * Menu: -* Z80 Options:: Options -* Z80 Syntax:: Syntax -* Z80 Floating Point:: Floating Point -* Z80 Directives:: Z80 Machine Directives -* Z80 Opcodes:: Opcodes +* V850 Options:: Options +* V850 Syntax:: Syntax +* V850 Floating Point:: Floating Point +* V850 Directives:: V850 Machine Directives +* V850 Opcodes:: Opcodes  -File: as.info, Node: Z80 Options, Next: Z80 Syntax, Up: Z80-Dependent - -9.47.1 Options --------------- - -The Zilog Z80 and Ascii R800 version of `as' have a few machine -dependent options. -`-z80' - Produce code for the Z80 processor. There are additional options to - request warnings and error messages for undocumented instructions. - -`-ignore-undocumented-instructions' -`-Wnud' - Silently assemble undocumented Z80-instructions that have been - adopted as documented R800-instructions. - -`-ignore-unportable-instructions' -`-Wnup' - Silently assemble all undocumented Z80-instructions. - -`-warn-undocumented-instructions' -`-Wud' - Issue warnings for undocumented Z80-instructions that work on - R800, do not assemble other undocumented instructions without - warning. - -`-warn-unportable-instructions' -`-Wup' - Issue warnings for other undocumented Z80-instructions, do not - treat any undocumented instructions as errors. - -`-forbid-undocumented-instructions' -`-Fud' - Treat all undocumented z80-instructions as errors. - -`-forbid-unportable-instructions' -`-Fup' - Treat undocumented z80-instructions that do not work on R800 as - errors. - -`-r800' - Produce code for the R800 processor. The assembler does not support - undocumented instructions for the R800. In line with common - practice, `as' uses Z80 instruction names for the R800 processor, - as far as they exist. - - -File: as.info, Node: Z80 Syntax, Next: Z80 Floating Point, Prev: Z80 Options, Up: Z80-Dependent - -9.47.2 Syntax -------------- - -The assembler syntax closely follows the 'Z80 family CPU User Manual' by -Zilog. In expressions a single `=' may be used as "is equal to" -comparison operator. - - Suffices can be used to indicate the radix of integer constants; `H' -or `h' for hexadecimal, `D' or `d' for decimal, `Q', `O', `q' or `o' -for octal, and `B' for binary. - - The suffix `b' denotes a backreference to local label. - -* Menu: - -* Z80-Chars:: Special Characters -* Z80-Regs:: Register Names -* Z80-Case:: Case Sensitivity - - -File: as.info, Node: Z80-Chars, Next: Z80-Regs, Up: Z80 Syntax - -9.47.2.1 Special Characters -........................... - -The semicolon `;' is the line comment character; - - If a `#' appears as the first character of a line then the whole -line is treated as a comment, but in this case the line could also be a -logical line number directive (*note Comments::) or a preprocessor -control command (*note Preprocessing::). - - The Z80 assembler does not support a line separator character. - - The dollar sign `$' can be used as a prefix for hexadecimal numbers -and as a symbol denoting the current location counter. - - A backslash `\' is an ordinary character for the Z80 assembler. - - The single quote `'' must be followed by a closing quote. If there -is one character in between, it is a character constant, otherwise it is -a string constant. - - -File: as.info, Node: Z80-Regs, Next: Z80-Case, Prev: Z80-Chars, Up: Z80 Syntax - -9.47.2.2 Register Names -....................... - -The registers are referred to with the letters assigned to them by -Zilog. In addition `as' recognizes `ixl' and `ixh' as the least and -most significant octet in `ix', and similarly `iyl' and `iyh' as parts -of `iy'. - - -File: as.info, Node: Z80-Case, Prev: Z80-Regs, Up: Z80 Syntax - -9.47.2.3 Case Sensitivity -......................... - -Upper and lower case are equivalent in register names, opcodes, -condition codes and assembler directives. The case of letters is -significant in labels and symbol names. The case is also important to -distinguish the suffix `b' for a backward reference to a local label -from the suffix `B' for a number in binary notation. - - -File: as.info, Node: Z80 Floating Point, Next: Z80 Directives, Prev: Z80 Syntax, Up: Z80-Dependent - -9.47.3 Floating Point ---------------------- - -Floating-point numbers are not supported. - - -File: as.info, Node: Z80 Directives, Next: Z80 Opcodes, Prev: Z80 Floating Point, Up: Z80-Dependent - -9.47.4 Z80 Assembler Directives -------------------------------- - -`as' for the Z80 supports some additional directives for compatibility -with other assemblers. - - These are the additional directives in `as' for the Z80: - -`db EXPRESSION|STRING[,EXPRESSION|STRING...]' -`defb EXPRESSION|STRING[,EXPRESSION|STRING...]' - For each STRING the characters are copied to the object file, for - each other EXPRESSION the value is stored in one byte. A warning - is issued in case of an overflow. - -`dw EXPRESSION[,EXPRESSION...]' -`defw EXPRESSION[,EXPRESSION...]' - For each EXPRESSION the value is stored in two bytes, ignoring - overflow. - -`d24 EXPRESSION[,EXPRESSION...]' -`def24 EXPRESSION[,EXPRESSION...]' - For each EXPRESSION the value is stored in three bytes, ignoring - overflow. - -`d32 EXPRESSION[,EXPRESSION...]' -`def32 EXPRESSION[,EXPRESSION...]' - For each EXPRESSION the value is stored in four bytes, ignoring - overflow. - -`ds COUNT[, VALUE]' -`defs COUNT[, VALUE]' - Fill COUNT bytes in the object file with VALUE, if VALUE is - omitted it defaults to zero. - -`SYMBOL equ EXPRESSION' -`SYMBOL defl EXPRESSION' - These directives set the value of SYMBOL to EXPRESSION. If `equ' - is used, it is an error if SYMBOL is already defined. Symbols - defined with `equ' are not protected from redefinition. - -`set' - This is a normal instruction on Z80, and not an assembler - directive. - -`psect NAME' - A synonym for *Note Section::, no second argument should be given. - - - -File: as.info, Node: Z80 Opcodes, Prev: Z80 Directives, Up: Z80-Dependent - -9.47.5 Opcodes --------------- - -In line with common practice, Z80 mnemonics are used for both the Z80 -and the R800. - - In many instructions it is possible to use one of the half index -registers (`ixl',`ixh',`iyl',`iyh') in stead of an 8-bit general -purpose register. This yields instructions that are documented on the -R800 and undocumented on the Z80. Similarly `in f,(c)' is documented -on the R800 and undocumented on the Z80. - - The assembler also supports the following undocumented -Z80-instructions, that have not been adopted in the R800 instruction -set: -`out (c),0' - Sends zero to the port pointed to by register c. - -`sli M' - Equivalent to `M = (M<<1)+1', the operand M can be any operand - that is valid for `sla'. One can use `sll' as a synonym for `sli'. - -`OP (ix+D), R' - This is equivalent to - - ld R, (ix+D) - OPC R - ld (ix+D), R - - The operation `OPC' may be any of `res B,', `set B,', `rl', `rlc', - `rr', `rrc', `sla', `sli', `sra' and `srl', and the register `R' - may be any of `a', `b', `c', `d', `e', `h' and `l'. - -`OPC (iy+D), R' - As above, but with `iy' instead of `ix'. - - The web site at `http://www.z80.info' is a good starting place to -find more information on programming the Z80. - - -File: as.info, Node: Z8000-Dependent, Next: Vax-Dependent, Prev: Z80-Dependent, Up: Machine Dependencies - -9.48 Z8000 Dependent Features -============================= - - The Z8000 as supports both members of the Z8000 family: the -unsegmented Z8002, with 16 bit addresses, and the segmented Z8001 with -24 bit addresses. - - When the assembler is in unsegmented mode (specified with the -`unsegm' directive), an address takes up one word (16 bit) sized -register. When the assembler is in segmented mode (specified with the -`segm' directive), a 24-bit address takes up a long (32 bit) register. -*Note Assembler Directives for the Z8000: Z8000 Directives, for a list -of other Z8000 specific assembler directives. - -* Menu: - -* Z8000 Options:: Command-line options for the Z8000 -* Z8000 Syntax:: Assembler syntax for the Z8000 -* Z8000 Directives:: Special directives for the Z8000 -* Z8000 Opcodes:: Opcodes - - -File: as.info, Node: Z8000 Options, Next: Z8000 Syntax, Up: Z8000-Dependent +File: as.info, Node: V850 Options, Next: V850 Syntax, Up: V850-Dependent 9.48.1 Options -------------- -`-z8001' - Generate segmented code by default. +`as' supports the following additional command-line options for the +V850 processor family: + +`-wsigned_overflow' + Causes warnings to be produced when signed immediate values + overflow the space available for then within their opcodes. By + default this option is disabled as it is possible to receive + spurious warnings due to using exact bit patterns as immediate + constants. + +`-wunsigned_overflow' + Causes warnings to be produced when unsigned immediate values + overflow the space available for then within their opcodes. By + default this option is disabled as it is possible to receive + spurious warnings due to using exact bit patterns as immediate + constants. + +`-mv850' + Specifies that the assembled code should be marked as being + targeted at the V850 processor. This allows the linker to detect + attempts to link such code with code assembled for other + processors. + +`-mv850e' + Specifies that the assembled code should be marked as being + targeted at the V850E processor. This allows the linker to detect + attempts to link such code with code assembled for other + processors. + +`-mv850e1' + Specifies that the assembled code should be marked as being + targeted at the V850E1 processor. This allows the linker to + detect attempts to link such code with code assembled for other + processors. + +`-mv850any' + Specifies that the assembled code should be marked as being + targeted at the V850 processor but support instructions that are + specific to the extended variants of the process. This allows the + production of binaries that contain target specific code, but + which are also intended to be used in a generic fashion. For + example libgcc.a contains generic routines used by the code + produced by GCC for all versions of the v850 architecture, + together with support routines only used by the V850E architecture. + +`-mv850e2' + Specifies that the assembled code should be marked as being + targeted at the V850E2 processor. This allows the linker to + detect attempts to link such code with code assembled for other + processors. + +`-mv850e2v3' + Specifies that the assembled code should be marked as being + targeted at the V850E2V3 processor. This allows the linker to + detect attempts to link such code with code assembled for other + processors. + +`-mv850e2v4' + This is an alias for `-mv850e3v5'. + +`-mv850e3v5' + Specifies that the assembled code should be marked as being + targeted at the V850E3V5 processor. This allows the linker to + detect attempts to link such code with code assembled for other + processors. + +`-mrelax' + Enables relaxation. This allows the .longcall and .longjump pseudo + ops to be used in the assembler source code. These ops label + sections of code which are either a long function call or a long + branch. The assembler will then flag these sections of code and + the linker will attempt to relax them. + +`-mgcc-abi' + Marks the generated object file as supporting the old GCC ABI. + +`-mrh850-abi' + Marks the generated object file as supporting the RH850 ABI. This + is the default. + +`-m8byte-align' + Marks the generated object file as supporting a maximum 64-bits of + alignment for variables defined in the source code. + +`-m4byte-align' + Marks the generated object file as supporting a maximum 32-bits of + alignment for variables defined in the source code. This is the + default. + +`-msoft-float' + Marks the generated object file as not using any floating point + instructions - and hence can be linked with other V850 binaries + that do or do not use floating point. This is the default for + binaries for architectures earlier than the `e2v3'. + +`-mhard-float' + Marks the generated object file as one that uses floating point + instructions - and hence can only be linked with other V850 + binaries that use the same kind of floating point instructions, or + with binaries that do not use floating point at all. This is the + default for binaries the `e2v3' and later architectures. -`-z8002' - Generate unsegmented code by default.  -File: as.info, Node: Z8000 Syntax, Next: Z8000 Directives, Prev: Z8000 Options, Up: Z8000-Dependent +File: as.info, Node: V850 Syntax, Next: V850 Floating Point, Prev: V850 Options, Up: V850-Dependent 9.48.2 Syntax ------------- * Menu: -* Z8000-Chars:: Special Characters -* Z8000-Regs:: Register Names -* Z8000-Addressing:: Addressing Modes +* V850-Chars:: Special Characters +* V850-Regs:: Register Names  -File: as.info, Node: Z8000-Chars, Next: Z8000-Regs, Up: Z8000 Syntax +File: as.info, Node: V850-Chars, Next: V850-Regs, Up: V850 Syntax 9.48.2.1 Special Characters ........................... -`!' is the line comment character. +`#' is the line comment character. If a `#' appears as the first +character of a line, the whole line is treated as a comment, but in +this case the line can also be a logical line number directive (*note +Comments::) or a preprocessor control command (*note Preprocessing::). - If a `#' appears as the first character of a line then the whole -line is treated as a comment, but in this case the line could also be a -logical line number directive (*note Comments::) or a preprocessor -control command (*note Preprocessing::). + Two dashes (`--') can also be used to start a line comment. - You can use `;' instead of a newline to separate statements. + The `;' character can be used to separate statements on the same +line.  -File: as.info, Node: Z8000-Regs, Next: Z8000-Addressing, Prev: Z8000-Chars, Up: Z8000 Syntax +File: as.info, Node: V850-Regs, Prev: V850-Chars, Up: V850 Syntax 9.48.2.2 Register Names ....................... -The Z8000 has sixteen 16 bit registers, numbered 0 to 15. You can refer -to different sized groups of registers by register number, with the -prefix `r' for 16 bit registers, `rr' for 32 bit registers and `rq' for -64 bit registers. You can also refer to the contents of the first -eight (of the sixteen 16 bit registers) by bytes. They are named `rlN' -and `rhN'. +`as' supports the following names for registers: +`general register 0' + r0, zero -_byte registers_ - rl0 rh0 rl1 rh1 rl2 rh2 rl3 rh3 - rl4 rh4 rl5 rh5 rl6 rh6 rl7 rh7 +`general register 1' + r1 -_word registers_ - r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 +`general register 2' + r2, hp -_long word registers_ - rr0 rr2 rr4 rr6 rr8 rr10 rr12 rr14 +`general register 3' + r3, sp -_quad word registers_ - rq0 rq4 rq8 rq12 +`general register 4' + r4, gp + +`general register 5' + r5, tp + +`general register 6' + r6 + +`general register 7' + r7 + +`general register 8' + r8 + +`general register 9' + r9 + +`general register 10' + r10 + +`general register 11' + r11 + +`general register 12' + r12 + +`general register 13' + r13 + +`general register 14' + r14 + +`general register 15' + r15 + +`general register 16' + r16 + +`general register 17' + r17 + +`general register 18' + r18 + +`general register 19' + r19 + +`general register 20' + r20 + +`general register 21' + r21 + +`general register 22' + r22 + +`general register 23' + r23 + +`general register 24' + r24 + +`general register 25' + r25 + +`general register 26' + r26 + +`general register 27' + r27 + +`general register 28' + r28 + +`general register 29' + r29 + +`general register 30' + r30, ep + +`general register 31' + r31, lp + +`system register 0' + eipc + +`system register 1' + eipsw + +`system register 2' + fepc + +`system register 3' + fepsw + +`system register 4' + ecr + +`system register 5' + psw + +`system register 16' + ctpc + +`system register 17' + ctpsw + +`system register 18' + dbpc + +`system register 19' + dbpsw + +`system register 20' + ctbp  -File: as.info, Node: Z8000-Addressing, Prev: Z8000-Regs, Up: Z8000 Syntax +File: as.info, Node: V850 Floating Point, Next: V850 Directives, Prev: V850 Syntax, Up: V850-Dependent -9.48.2.3 Addressing Modes -......................... +9.48.3 Floating Point +--------------------- -as understands the following addressing modes for the Z8000: - -`rlN' -`rhN' -`rN' -`rrN' -`rqN' - Register direct: 8bit, 16bit, 32bit, and 64bit registers. - -`@rN' -`@rrN' - Indirect register: @rrN in segmented mode, @rN in unsegmented - mode. - -`ADDR' - Direct: the 16 bit or 24 bit address (depending on whether the - assembler is in segmented or unsegmented mode) of the operand is - in the instruction. - -`address(rN)' - Indexed: the 16 or 24 bit address is added to the 16 bit register - to produce the final address in memory of the operand. - -`rN(#IMM)' -`rrN(#IMM)' - Base Address: the 16 or 24 bit register is added to the 16 bit sign - extended immediate displacement to produce the final address in - memory of the operand. - -`rN(rM)' -`rrN(rM)' - Base Index: the 16 or 24 bit register rN or rrN is added to the - sign extended 16 bit index register rM to produce the final - address in memory of the operand. - -`#XX' - Immediate data XX. +The V850 family uses IEEE floating-point numbers.  -File: as.info, Node: Z8000 Directives, Next: Z8000 Opcodes, Prev: Z8000 Syntax, Up: Z8000-Dependent +File: as.info, Node: V850 Directives, Next: V850 Opcodes, Prev: V850 Floating Point, Up: V850-Dependent -9.48.3 Assembler Directives for the Z8000 ------------------------------------------ +9.48.4 V850 Machine Directives +------------------------------ -The Z8000 port of as includes additional assembler directives, for -compatibility with other Z8000 assemblers. These do not begin with `.' -(unlike the ordinary as directives). +`.offset ' + Moves the offset into the current section to the specified amount. -`segm' -`.z8001' - Generate code for the segmented Z8001. +`.section "name", ' + This is an extension to the standard .section directive. It sets + the current section to be and creates an alias for this + section called "name". -`unsegm' -`.z8002' - Generate code for the unsegmented Z8002. +`.v850' + Specifies that the assembled code should be marked as being + targeted at the V850 processor. This allows the linker to detect + attempts to link such code with code assembled for other + processors. -`name' - Synonym for `.file' +`.v850e' + Specifies that the assembled code should be marked as being + targeted at the V850E processor. This allows the linker to detect + attempts to link such code with code assembled for other + processors. -`global' - Synonym for `.global' +`.v850e1' + Specifies that the assembled code should be marked as being + targeted at the V850E1 processor. This allows the linker to + detect attempts to link such code with code assembled for other + processors. -`wval' - Synonym for `.word' +`.v850e2' + Specifies that the assembled code should be marked as being + targeted at the V850E2 processor. This allows the linker to + detect attempts to link such code with code assembled for other + processors. -`lval' - Synonym for `.long' +`.v850e2v3' + Specifies that the assembled code should be marked as being + targeted at the V850E2V3 processor. This allows the linker to + detect attempts to link such code with code assembled for other + processors. -`bval' - Synonym for `.byte' +`.v850e2v4' + Specifies that the assembled code should be marked as being + targeted at the V850E3V5 processor. This allows the linker to + detect attempts to link such code with code assembled for other + processors. -`sval' - Assemble a string. `sval' expects one string literal, delimited by - single quotes. It assembles each byte of the string into - consecutive addresses. You can use the escape sequence `%XX' - (where XX represents a two-digit hexadecimal number) to represent - the character whose ASCII value is XX. Use this feature to - describe single quote and other characters that may not appear in - string literals as themselves. For example, the C statement - `char *a = "he said \"it's 50% off\"";' is represented in Z8000 - assembly language (shown with the assembler output in hex at the - left) as +`.v850e3v5' + Specifies that the assembled code should be marked as being + targeted at the V850E3V5 processor. This allows the linker to + detect attempts to link such code with code assembled for other + processors. - 68652073 sval 'he said %22it%27s 50%25 off%22%00' - 61696420 - 22697427 - 73203530 - 25206F66 - 662200 - -`rsect' - synonym for `.section' - -`block' - synonym for `.space' - -`even' - special case of `.align'; aligns output to even byte boundary.  -File: as.info, Node: Z8000 Opcodes, Prev: Z8000 Directives, Up: Z8000-Dependent +File: as.info, Node: V850 Opcodes, Prev: V850 Directives, Up: V850-Dependent -9.48.4 Opcodes +9.48.5 Opcodes -------------- -For detailed information on the Z8000 machine instruction set, see -`Z8000 Technical Manual'. +`as' implements all the standard V850 opcodes. - The following table summarizes the opcodes and their arguments: + `as' also implements the following pseudo ops: - rs 16 bit source register - rd 16 bit destination register - rbs 8 bit source register - rbd 8 bit destination register - rrs 32 bit source register - rrd 32 bit destination register - rqs 64 bit source register - rqd 64 bit destination register - addr 16/24 bit address - imm immediate data +`hi0()' + Computes the higher 16 bits of the given expression and stores it + into the immediate operand field of the given instruction. For + example: - adc rd,rs clrb addr cpsir @rd,@rs,rr,cc - adcb rbd,rbs clrb addr(rd) cpsirb @rd,@rs,rr,cc - add rd,@rs clrb rbd dab rbd - add rd,addr com @rd dbjnz rbd,disp7 - add rd,addr(rs) com addr dec @rd,imm4m1 - add rd,imm16 com addr(rd) dec addr(rd),imm4m1 - add rd,rs com rd dec addr,imm4m1 - addb rbd,@rs comb @rd dec rd,imm4m1 - addb rbd,addr comb addr decb @rd,imm4m1 - addb rbd,addr(rs) comb addr(rd) decb addr(rd),imm4m1 - addb rbd,imm8 comb rbd decb addr,imm4m1 - addb rbd,rbs comflg flags decb rbd,imm4m1 - addl rrd,@rs cp @rd,imm16 di i2 - addl rrd,addr cp addr(rd),imm16 div rrd,@rs - addl rrd,addr(rs) cp addr,imm16 div rrd,addr - addl rrd,imm32 cp rd,@rs div rrd,addr(rs) - addl rrd,rrs cp rd,addr div rrd,imm16 - and rd,@rs cp rd,addr(rs) div rrd,rs - and rd,addr cp rd,imm16 divl rqd,@rs - and rd,addr(rs) cp rd,rs divl rqd,addr - and rd,imm16 cpb @rd,imm8 divl rqd,addr(rs) - and rd,rs cpb addr(rd),imm8 divl rqd,imm32 - andb rbd,@rs cpb addr,imm8 divl rqd,rrs - andb rbd,addr cpb rbd,@rs djnz rd,disp7 - andb rbd,addr(rs) cpb rbd,addr ei i2 - andb rbd,imm8 cpb rbd,addr(rs) ex rd,@rs - andb rbd,rbs cpb rbd,imm8 ex rd,addr - bit @rd,imm4 cpb rbd,rbs ex rd,addr(rs) - bit addr(rd),imm4 cpd rd,@rs,rr,cc ex rd,rs - bit addr,imm4 cpdb rbd,@rs,rr,cc exb rbd,@rs - bit rd,imm4 cpdr rd,@rs,rr,cc exb rbd,addr - bit rd,rs cpdrb rbd,@rs,rr,cc exb rbd,addr(rs) - bitb @rd,imm4 cpi rd,@rs,rr,cc exb rbd,rbs - bitb addr(rd),imm4 cpib rbd,@rs,rr,cc ext0e imm8 - bitb addr,imm4 cpir rd,@rs,rr,cc ext0f imm8 - bitb rbd,imm4 cpirb rbd,@rs,rr,cc ext8e imm8 - bitb rbd,rs cpl rrd,@rs ext8f imm8 - bpt cpl rrd,addr exts rrd - call @rd cpl rrd,addr(rs) extsb rd - call addr cpl rrd,imm32 extsl rqd - call addr(rd) cpl rrd,rrs halt - calr disp12 cpsd @rd,@rs,rr,cc in rd,@rs - clr @rd cpsdb @rd,@rs,rr,cc in rd,imm16 - clr addr cpsdr @rd,@rs,rr,cc inb rbd,@rs - clr addr(rd) cpsdrb @rd,@rs,rr,cc inb rbd,imm16 - clr rd cpsi @rd,@rs,rr,cc inc @rd,imm4m1 - clrb @rd cpsib @rd,@rs,rr,cc inc addr(rd),imm4m1 - inc addr,imm4m1 ldb rbd,rs(rx) mult rrd,addr(rs) - inc rd,imm4m1 ldb rd(imm16),rbs mult rrd,imm16 - incb @rd,imm4m1 ldb rd(rx),rbs mult rrd,rs - incb addr(rd),imm4m1 ldctl ctrl,rs multl rqd,@rs - incb addr,imm4m1 ldctl rd,ctrl multl rqd,addr - incb rbd,imm4m1 ldd @rs,@rd,rr multl rqd,addr(rs) - ind @rd,@rs,ra lddb @rs,@rd,rr multl rqd,imm32 - indb @rd,@rs,rba lddr @rs,@rd,rr multl rqd,rrs - inib @rd,@rs,ra lddrb @rs,@rd,rr neg @rd - inibr @rd,@rs,ra ldi @rd,@rs,rr neg addr - iret ldib @rd,@rs,rr neg addr(rd) - jp cc,@rd ldir @rd,@rs,rr neg rd - jp cc,addr ldirb @rd,@rs,rr negb @rd - jp cc,addr(rd) ldk rd,imm4 negb addr - jr cc,disp8 ldl @rd,rrs negb addr(rd) - ld @rd,imm16 ldl addr(rd),rrs negb rbd - ld @rd,rs ldl addr,rrs nop - ld addr(rd),imm16 ldl rd(imm16),rrs or rd,@rs - ld addr(rd),rs ldl rd(rx),rrs or rd,addr - ld addr,imm16 ldl rrd,@rs or rd,addr(rs) - ld addr,rs ldl rrd,addr or rd,imm16 - ld rd(imm16),rs ldl rrd,addr(rs) or rd,rs - ld rd(rx),rs ldl rrd,imm32 orb rbd,@rs - ld rd,@rs ldl rrd,rrs orb rbd,addr - ld rd,addr ldl rrd,rs(imm16) orb rbd,addr(rs) - ld rd,addr(rs) ldl rrd,rs(rx) orb rbd,imm8 - ld rd,imm16 ldm @rd,rs,n orb rbd,rbs - ld rd,rs ldm addr(rd),rs,n out @rd,rs - ld rd,rs(imm16) ldm addr,rs,n out imm16,rs - ld rd,rs(rx) ldm rd,@rs,n outb @rd,rbs - lda rd,addr ldm rd,addr(rs),n outb imm16,rbs - lda rd,addr(rs) ldm rd,addr,n outd @rd,@rs,ra - lda rd,rs(imm16) ldps @rs outdb @rd,@rs,rba - lda rd,rs(rx) ldps addr outib @rd,@rs,ra - ldar rd,disp16 ldps addr(rs) outibr @rd,@rs,ra - ldb @rd,imm8 ldr disp16,rs pop @rd,@rs - ldb @rd,rbs ldr rd,disp16 pop addr(rd),@rs - ldb addr(rd),imm8 ldrb disp16,rbs pop addr,@rs - ldb addr(rd),rbs ldrb rbd,disp16 pop rd,@rs - ldb addr,imm8 ldrl disp16,rrs popl @rd,@rs - ldb addr,rbs ldrl rrd,disp16 popl addr(rd),@rs - ldb rbd,@rs mbit popl addr,@rs - ldb rbd,addr mreq rd popl rrd,@rs - ldb rbd,addr(rs) mres push @rd,@rs - ldb rbd,imm8 mset push @rd,addr - ldb rbd,rbs mult rrd,@rs push @rd,addr(rs) - ldb rbd,rs(imm16) mult rrd,addr push @rd,imm16 - push @rd,rs set addr,imm4 subl rrd,imm32 - pushl @rd,@rs set rd,imm4 subl rrd,rrs - pushl @rd,addr set rd,rs tcc cc,rd - pushl @rd,addr(rs) setb @rd,imm4 tccb cc,rbd - pushl @rd,rrs setb addr(rd),imm4 test @rd - res @rd,imm4 setb addr,imm4 test addr - res addr(rd),imm4 setb rbd,imm4 test addr(rd) - res addr,imm4 setb rbd,rs test rd - res rd,imm4 setflg imm4 testb @rd - res rd,rs sinb rbd,imm16 testb addr - resb @rd,imm4 sinb rd,imm16 testb addr(rd) - resb addr(rd),imm4 sind @rd,@rs,ra testb rbd - resb addr,imm4 sindb @rd,@rs,rba testl @rd - resb rbd,imm4 sinib @rd,@rs,ra testl addr - resb rbd,rs sinibr @rd,@rs,ra testl addr(rd) - resflg imm4 sla rd,imm8 testl rrd - ret cc slab rbd,imm8 trdb @rd,@rs,rba - rl rd,imm1or2 slal rrd,imm8 trdrb @rd,@rs,rba - rlb rbd,imm1or2 sll rd,imm8 trib @rd,@rs,rbr - rlc rd,imm1or2 sllb rbd,imm8 trirb @rd,@rs,rbr - rlcb rbd,imm1or2 slll rrd,imm8 trtdrb @ra,@rb,rbr - rldb rbb,rba sout imm16,rs trtib @ra,@rb,rr - rr rd,imm1or2 soutb imm16,rbs trtirb @ra,@rb,rbr - rrb rbd,imm1or2 soutd @rd,@rs,ra trtrb @ra,@rb,rbr - rrc rd,imm1or2 soutdb @rd,@rs,rba tset @rd - rrcb rbd,imm1or2 soutib @rd,@rs,ra tset addr - rrdb rbb,rba soutibr @rd,@rs,ra tset addr(rd) - rsvd36 sra rd,imm8 tset rd - rsvd38 srab rbd,imm8 tsetb @rd - rsvd78 sral rrd,imm8 tsetb addr - rsvd7e srl rd,imm8 tsetb addr(rd) - rsvd9d srlb rbd,imm8 tsetb rbd - rsvd9f srll rrd,imm8 xor rd,@rs - rsvdb9 sub rd,@rs xor rd,addr - rsvdbf sub rd,addr xor rd,addr(rs) - sbc rd,rs sub rd,addr(rs) xor rd,imm16 - sbcb rbd,rbs sub rd,imm16 xor rd,rs - sc imm8 sub rd,rs xorb rbd,@rs - sda rd,rs subb rbd,@rs xorb rbd,addr - sdab rbd,rs subb rbd,addr xorb rbd,addr(rs) - sdal rrd,rs subb rbd,addr(rs) xorb rbd,imm8 - sdl rd,rs subb rbd,imm8 xorb rbd,rbs - sdlb rbd,rs subb rbd,rbs xorb rbd,rbs - sdll rrd,rs subl rrd,@rs - set @rd,imm4 subl rrd,addr - set addr(rd),imm4 subl rrd,addr(rs) + `mulhi hi0(here - there), r5, r6' + + computes the difference between the address of labels 'here' and + 'there', takes the upper 16 bits of this difference, shifts it + down 16 bits and then multiplies it by the lower 16 bits in + register 5, putting the result into register 6. + +`lo()' + Computes the lower 16 bits of the given expression and stores it + into the immediate operand field of the given instruction. For + example: + + `addi lo(here - there), r5, r6' + + computes the difference between the address of labels 'here' and + 'there', takes the lower 16 bits of this difference and adds it to + register 5, putting the result into register 6. + +`hi()' + Computes the higher 16 bits of the given expression and then adds + the value of the most significant bit of the lower 16 bits of the + expression and stores the result into the immediate operand field + of the given instruction. For example the following code can be + used to compute the address of the label 'here' and store it into + register 6: + + `movhi hi(here), r0, r6' `movea lo(here), r6, r6' + + The reason for this special behaviour is that movea performs a sign + extension on its immediate operand. So for example if the address + of 'here' was 0xFFFFFFFF then without the special behaviour of the + hi() pseudo-op the movhi instruction would put 0xFFFF0000 into r6, + then the movea instruction would takes its immediate operand, + 0xFFFF, sign extend it to 32 bits, 0xFFFFFFFF, and then add it + into r6 giving 0xFFFEFFFF which is wrong (the fifth nibble is E). + With the hi() pseudo op adding in the top bit of the lo() pseudo + op, the movhi instruction actually stores 0 into r6 (0xFFFF + 1 = + 0x0000), so that the movea instruction stores 0xFFFFFFFF into r6 - + the right value. + +`hilo()' + Computes the 32 bit value of the given expression and stores it + into the immediate operand field of the given instruction (which + must be a mov instruction). For example: + + `mov hilo(here), r6' + + computes the absolute address of label 'here' and puts the result + into register 6. + +`sdaoff()' + Computes the offset of the named variable from the start of the + Small Data Area (whoes address is held in register 4, the GP + register) and stores the result as a 16 bit signed value in the + immediate operand field of the given instruction. For example: + + `ld.w sdaoff(_a_variable)[gp],r6' + + loads the contents of the location pointed to by the label + '_a_variable' into register 6, provided that the label is located + somewhere within +/- 32K of the address held in the GP register. + [Note the linker assumes that the GP register contains a fixed + address set to the address of the label called '__gp'. This can + either be set up automatically by the linker, or specifically set + by using the `--defsym __gp=' command line option]. + +`tdaoff()' + Computes the offset of the named variable from the start of the + Tiny Data Area (whoes address is held in register 30, the EP + register) and stores the result as a 4,5, 7 or 8 bit unsigned + value in the immediate operand field of the given instruction. + For example: + + `sld.w tdaoff(_a_variable)[ep],r6' + + loads the contents of the location pointed to by the label + '_a_variable' into register 6, provided that the label is located + somewhere within +256 bytes of the address held in the EP + register. [Note the linker assumes that the EP register contains + a fixed address set to the address of the label called '__ep'. + This can either be set up automatically by the linker, or + specifically set by using the `--defsym __ep=' command line + option]. + +`zdaoff()' + Computes the offset of the named variable from address 0 and + stores the result as a 16 bit signed value in the immediate + operand field of the given instruction. For example: + + `movea zdaoff(_a_variable),zero,r6' + + puts the address of the label '_a_variable' into register 6, + assuming that the label is somewhere within the first 32K of + memory. (Strictly speaking it also possible to access the last + 32K of memory as well, as the offsets are signed). + +`ctoff()' + Computes the offset of the named variable from the start of the + Call Table Area (whoes address is helg in system register 20, the + CTBP register) and stores the result a 6 or 16 bit unsigned value + in the immediate field of then given instruction or piece of data. + For example: + + `callt ctoff(table_func1)' + + will put the call the function whoes address is held in the call + table at the location labeled 'table_func1'. + +`.longcall `name'' + Indicates that the following sequence of instructions is a long + call to function `name'. The linker will attempt to shorten this + call sequence if `name' is within a 22bit offset of the call. Only + valid if the `-mrelax' command line switch has been enabled. + +`.longjump `name'' + Indicates that the following sequence of instructions is a long + jump to label `name'. The linker will attempt to shorten this code + sequence if `name' is within a 22bit offset of the jump. Only + valid if the `-mrelax' command line switch has been enabled. + + + For information on the V850 instruction set, see `V850 Family +32-/16-Bit single-Chip Microcontroller Architecture Manual' from NEC. +Ltd.  -File: as.info, Node: Vax-Dependent, Prev: Z8000-Dependent, Up: Machine Dependencies +File: as.info, Node: Vax-Dependent, Next: Visium-Dependent, Prev: V850-Dependent, Up: Machine Dependencies 9.49 VAX Dependent Features =========================== @@ -21233,485 +22140,86 @@ control command (*note Preprocessing::). line.  -File: as.info, Node: V850-Dependent, Next: XGATE-Dependent, Prev: TILEPro-Dependent, Up: Machine Dependencies +File: as.info, Node: Visium-Dependent, Next: XGATE-Dependent, Prev: Vax-Dependent, Up: Machine Dependencies -9.50 v850 Dependent Features -============================ +9.50 Visium Dependent Features +============================== * Menu: -* V850 Options:: Options -* V850 Syntax:: Syntax -* V850 Floating Point:: Floating Point -* V850 Directives:: V850 Machine Directives -* V850 Opcodes:: Opcodes +* Visium Options:: Options +* Visium Syntax:: Syntax +* Visium Opcodes:: Opcodes  -File: as.info, Node: V850 Options, Next: V850 Syntax, Up: V850-Dependent +File: as.info, Node: Visium Options, Next: Visium Syntax, Up: Visium-Dependent 9.50.1 Options -------------- -`as' supports the following additional command-line options for the -V850 processor family: +The Visium assembler implements one machine-specific option: -`-wsigned_overflow' - Causes warnings to be produced when signed immediate values - overflow the space available for then within their opcodes. By - default this option is disabled as it is possible to receive - spurious warnings due to using exact bit patterns as immediate - constants. - -`-wunsigned_overflow' - Causes warnings to be produced when unsigned immediate values - overflow the space available for then within their opcodes. By - default this option is disabled as it is possible to receive - spurious warnings due to using exact bit patterns as immediate - constants. - -`-mv850' - Specifies that the assembled code should be marked as being - targeted at the V850 processor. This allows the linker to detect - attempts to link such code with code assembled for other - processors. - -`-mv850e' - Specifies that the assembled code should be marked as being - targeted at the V850E processor. This allows the linker to detect - attempts to link such code with code assembled for other - processors. - -`-mv850e1' - Specifies that the assembled code should be marked as being - targeted at the V850E1 processor. This allows the linker to - detect attempts to link such code with code assembled for other - processors. - -`-mv850any' - Specifies that the assembled code should be marked as being - targeted at the V850 processor but support instructions that are - specific to the extended variants of the process. This allows the - production of binaries that contain target specific code, but - which are also intended to be used in a generic fashion. For - example libgcc.a contains generic routines used by the code - produced by GCC for all versions of the v850 architecture, - together with support routines only used by the V850E architecture. - -`-mv850e2' - Specifies that the assembled code should be marked as being - targeted at the V850E2 processor. This allows the linker to - detect attempts to link such code with code assembled for other - processors. - -`-mv850e2v3' - Specifies that the assembled code should be marked as being - targeted at the V850E2V3 processor. This allows the linker to - detect attempts to link such code with code assembled for other - processors. - -`-mv850e2v4' - This is an alias for `-mv850e3v5'. - -`-mv850e3v5' - Specifies that the assembled code should be marked as being - targeted at the V850E3V5 processor. This allows the linker to - detect attempts to link such code with code assembled for other - processors. - -`-mrelax' - Enables relaxation. This allows the .longcall and .longjump pseudo - ops to be used in the assembler source code. These ops label - sections of code which are either a long function call or a long - branch. The assembler will then flag these sections of code and - the linker will attempt to relax them. - -`-mgcc-abi' - Marks the generated objecy file as supporting the old GCC ABI. - -`-mrh850-abi' - Marks the generated objecy file as supporting the RH850 ABI. This - is the default. - -`-m8byte-align' - Marks the generated objecy file as supporting a maximum 64-bits of - alignment for variables defined in the source code. - -`-m4byte-align' - Marks the generated objecy file as supporting a maximum 32-bits of - alignment for variables defined in the source code. This is the - default. +`-mtune=ARCH' + This option specifies the target architecture. If an attempt is + made to assemble an instruction that will not execute on the + target architecture, the assembler will issue an error message. + The following names are recognized: `mcm24' `mcm' `gr5' `gr6'  -File: as.info, Node: V850 Syntax, Next: V850 Floating Point, Prev: V850 Options, Up: V850-Dependent +File: as.info, Node: Visium Syntax, Next: Visium Opcodes, Prev: Visium Options, Up: Visium-Dependent 9.50.2 Syntax ------------- * Menu: -* V850-Chars:: Special Characters -* V850-Regs:: Register Names +* Visium Characters:: Special Characters +* Visium Registers:: Register Names  -File: as.info, Node: V850-Chars, Next: V850-Regs, Up: V850 Syntax +File: as.info, Node: Visium Characters, Next: Visium Registers, Up: Visium Syntax 9.50.2.1 Special Characters ........................... -`#' is the line comment character. If a `#' appears as the first -character of a line, the whole line is treated as a comment, but in -this case the line can also be a logical line number directive (*note -Comments::) or a preprocessor control command (*note Preprocessing::). +Line comments are introduced either by the `!' character or by the `;' +character appearing anywhere on a line. - Two dashes (`--') can also be used to start a line comment. + A hash character (`#') as the first character on a line also marks +the start of a line comment, but in this case it could also be a +logical line number directive (*note Comments::) or a preprocessor +control command (*note Preprocessing::). - The `;' character can be used to separate statements on the same -line. + The Visium assembler does not currently support a line separator +character.  -File: as.info, Node: V850-Regs, Prev: V850-Chars, Up: V850 Syntax +File: as.info, Node: Visium Registers, Prev: Visium Characters, Up: Visium Syntax 9.50.2.2 Register Names ....................... -`as' supports the following names for registers: -`general register 0' - r0, zero - -`general register 1' - r1 - -`general register 2' - r2, hp - -`general register 3' - r3, sp - -`general register 4' - r4, gp - -`general register 5' - r5, tp - -`general register 6' - r6 - -`general register 7' - r7 - -`general register 8' - r8 - -`general register 9' - r9 - -`general register 10' - r10 - -`general register 11' - r11 - -`general register 12' - r12 - -`general register 13' - r13 - -`general register 14' - r14 - -`general register 15' - r15 - -`general register 16' - r16 - -`general register 17' - r17 - -`general register 18' - r18 - -`general register 19' - r19 - -`general register 20' - r20 - -`general register 21' - r21 - -`general register 22' - r22 - -`general register 23' - r23 - -`general register 24' - r24 - -`general register 25' - r25 - -`general register 26' - r26 - -`general register 27' - r27 - -`general register 28' - r28 - -`general register 29' - r29 - -`general register 30' - r30, ep - -`general register 31' - r31, lp - -`system register 0' - eipc - -`system register 1' - eipsw - -`system register 2' - fepc - -`system register 3' - fepsw - -`system register 4' - ecr - -`system register 5' - psw - -`system register 16' - ctpc - -`system register 17' - ctpsw - -`system register 18' - dbpc - -`system register 19' - dbpsw - -`system register 20' - ctbp +Registers can be specified either by using their canonical mnemonic +names or by using their alias if they have one, for example `sp'.  -File: as.info, Node: V850 Floating Point, Next: V850 Directives, Prev: V850 Syntax, Up: V850-Dependent +File: as.info, Node: Visium Opcodes, Prev: Visium Syntax, Up: Visium-Dependent -9.50.3 Floating Point ---------------------- - -The V850 family uses IEEE floating-point numbers. - - -File: as.info, Node: V850 Directives, Next: V850 Opcodes, Prev: V850 Floating Point, Up: V850-Dependent - -9.50.4 V850 Machine Directives ------------------------------- - -`.offset ' - Moves the offset into the current section to the specified amount. - -`.section "name", ' - This is an extension to the standard .section directive. It sets - the current section to be and creates an alias for this - section called "name". - -`.v850' - Specifies that the assembled code should be marked as being - targeted at the V850 processor. This allows the linker to detect - attempts to link such code with code assembled for other - processors. - -`.v850e' - Specifies that the assembled code should be marked as being - targeted at the V850E processor. This allows the linker to detect - attempts to link such code with code assembled for other - processors. - -`.v850e1' - Specifies that the assembled code should be marked as being - targeted at the V850E1 processor. This allows the linker to - detect attempts to link such code with code assembled for other - processors. - -`.v850e2' - Specifies that the assembled code should be marked as being - targeted at the V850E2 processor. This allows the linker to - detect attempts to link such code with code assembled for other - processors. - -`.v850e2v3' - Specifies that the assembled code should be marked as being - targeted at the V850E2V3 processor. This allows the linker to - detect attempts to link such code with code assembled for other - processors. - -`.v850e2v4' - Specifies that the assembled code should be marked as being - targeted at the V850E3V5 processor. This allows the linker to - detect attempts to link such code with code assembled for other - processors. - -`.v850e3v5' - Specifies that the assembled code should be marked as being - targeted at the V850E3V5 processor. This allows the linker to - detect attempts to link such code with code assembled for other - processors. - - - -File: as.info, Node: V850 Opcodes, Prev: V850 Directives, Up: V850-Dependent - -9.50.5 Opcodes +9.50.3 Opcodes -------------- -`as' implements all the standard V850 opcodes. +All the standard opcodes of the architecture are implemented, along +with the following three pseudo-instructions: `cmp', `cmpc', `move'. - `as' also implements the following pseudo ops: + In addition, the following two illegal opcodes are implemented and +used by the simulation: -`hi0()' - Computes the higher 16 bits of the given expression and stores it - into the immediate operand field of the given instruction. For - example: - - `mulhi hi0(here - there), r5, r6' - - computes the difference between the address of labels 'here' and - 'there', takes the upper 16 bits of this difference, shifts it - down 16 bits and then multiplies it by the lower 16 bits in - register 5, putting the result into register 6. - -`lo()' - Computes the lower 16 bits of the given expression and stores it - into the immediate operand field of the given instruction. For - example: - - `addi lo(here - there), r5, r6' - - computes the difference between the address of labels 'here' and - 'there', takes the lower 16 bits of this difference and adds it to - register 5, putting the result into register 6. - -`hi()' - Computes the higher 16 bits of the given expression and then adds - the value of the most significant bit of the lower 16 bits of the - expression and stores the result into the immediate operand field - of the given instruction. For example the following code can be - used to compute the address of the label 'here' and store it into - register 6: - - `movhi hi(here), r0, r6' `movea lo(here), r6, r6' - - The reason for this special behaviour is that movea performs a sign - extension on its immediate operand. So for example if the address - of 'here' was 0xFFFFFFFF then without the special behaviour of the - hi() pseudo-op the movhi instruction would put 0xFFFF0000 into r6, - then the movea instruction would takes its immediate operand, - 0xFFFF, sign extend it to 32 bits, 0xFFFFFFFF, and then add it - into r6 giving 0xFFFEFFFF which is wrong (the fifth nibble is E). - With the hi() pseudo op adding in the top bit of the lo() pseudo - op, the movhi instruction actually stores 0 into r6 (0xFFFF + 1 = - 0x0000), so that the movea instruction stores 0xFFFFFFFF into r6 - - the right value. - -`hilo()' - Computes the 32 bit value of the given expression and stores it - into the immediate operand field of the given instruction (which - must be a mov instruction). For example: - - `mov hilo(here), r6' - - computes the absolute address of label 'here' and puts the result - into register 6. - -`sdaoff()' - Computes the offset of the named variable from the start of the - Small Data Area (whoes address is held in register 4, the GP - register) and stores the result as a 16 bit signed value in the - immediate operand field of the given instruction. For example: - - `ld.w sdaoff(_a_variable)[gp],r6' - - loads the contents of the location pointed to by the label - '_a_variable' into register 6, provided that the label is located - somewhere within +/- 32K of the address held in the GP register. - [Note the linker assumes that the GP register contains a fixed - address set to the address of the label called '__gp'. This can - either be set up automatically by the linker, or specifically set - by using the `--defsym __gp=' command line option]. - -`tdaoff()' - Computes the offset of the named variable from the start of the - Tiny Data Area (whoes address is held in register 30, the EP - register) and stores the result as a 4,5, 7 or 8 bit unsigned - value in the immediate operand field of the given instruction. - For example: - - `sld.w tdaoff(_a_variable)[ep],r6' - - loads the contents of the location pointed to by the label - '_a_variable' into register 6, provided that the label is located - somewhere within +256 bytes of the address held in the EP - register. [Note the linker assumes that the EP register contains - a fixed address set to the address of the label called '__ep'. - This can either be set up automatically by the linker, or - specifically set by using the `--defsym __ep=' command line - option]. - -`zdaoff()' - Computes the offset of the named variable from address 0 and - stores the result as a 16 bit signed value in the immediate - operand field of the given instruction. For example: - - `movea zdaoff(_a_variable),zero,r6' - - puts the address of the label '_a_variable' into register 6, - assuming that the label is somewhere within the first 32K of - memory. (Strictly speaking it also possible to access the last - 32K of memory as well, as the offsets are signed). - -`ctoff()' - Computes the offset of the named variable from the start of the - Call Table Area (whoes address is helg in system register 20, the - CTBP register) and stores the result a 6 or 16 bit unsigned value - in the immediate field of then given instruction or piece of data. - For example: - - `callt ctoff(table_func1)' - - will put the call the function whoes address is held in the call - table at the location labeled 'table_func1'. - -`.longcall `name'' - Indicates that the following sequence of instructions is a long - call to function `name'. The linker will attempt to shorten this - call sequence if `name' is within a 22bit offset of the call. Only - valid if the `-mrelax' command line switch has been enabled. - -`.longjump `name'' - Indicates that the following sequence of instructions is a long - jump to label `name'. The linker will attempt to shorten this code - sequence if `name' is within a 22bit offset of the jump. Only - valid if the `-mrelax' command line switch has been enabled. - - - For information on the V850 instruction set, see `V850 Family -32-/16-Bit single-Chip Microcontroller Architecture Manual' from NEC. -Ltd. + stop 5-bit immediate, SourceA + trace 5-bit immediate, SourceA  -File: as.info, Node: XGATE-Dependent, Next: XSTORMY16-Dependent, Prev: V850-Dependent, Up: Machine Dependencies +File: as.info, Node: XGATE-Dependent, Next: XSTORMY16-Dependent, Prev: Visium-Dependent, Up: Machine Dependencies 9.51 XGATE Dependent Features ============================= @@ -22006,11 +22514,30 @@ File: as.info, Node: Xtensa Options, Next: Xtensa Syntax, Up: Xtensa-Dependen them as close as possible to their references. This may be necessary for large assembly files, where the literals would otherwise be out of range of the `L32R' instructions in the text - section. These options only affect literals referenced via - PC-relative `L32R' instructions; literals for absolute mode `L32R' + section. Literals are grouped into pools following + `.literal_position' directives or preceding `ENTRY' instructions. + These options only affect literals referenced via PC-relative + `L32R' instructions; literals for absolute mode `L32R' instructions are handled separately. *Note literal: Literal Directive. +`--auto-litpools | --no-auto-litpools' + Control the treatment of literal pools. The default is + `--no-auto-litpools', which in the absence of + `--text-section-literals' places literals in separate sections in + the output file. This allows the literal pool to be placed in a + data RAM/ROM. With `--auto-litpools', the literals are + interspersed in the text section in order to keep them as close as + possible to their references, explicit `.literal_position' + directives are not required. This may be necessary for very large + functions, where single literal pool at the beginning of the + function may not be reachable by `L32R' instructions at the end. + These options only affect literals referenced via PC-relative + `L32R' instructions; literals for absolute mode `L32R' + instructions are handled separately. When used together with + `--text-section-literals', `--auto-litpools' takes precedence. + *Note literal: Literal Directive. + `--absolute-literals | --no-absolute-literals' Indicate to the assembler whether `L32R' instructions use absolute or PC-relative addressing. If the processor includes the absolute @@ -22747,6 +23274,594 @@ the default is to assume PC-relative `L32R' addressing. The `absolute-literals' directive can then be used to override the default determined by the command-line options. + +File: as.info, Node: Z80-Dependent, Next: Z8000-Dependent, Prev: Xtensa-Dependent, Up: Machine Dependencies + +9.54 Z80 Dependent Features +=========================== + +* Menu: + +* Z80 Options:: Options +* Z80 Syntax:: Syntax +* Z80 Floating Point:: Floating Point +* Z80 Directives:: Z80 Machine Directives +* Z80 Opcodes:: Opcodes + + +File: as.info, Node: Z80 Options, Next: Z80 Syntax, Up: Z80-Dependent + +9.54.1 Options +-------------- + +The Zilog Z80 and Ascii R800 version of `as' have a few machine +dependent options. +`-z80' + Produce code for the Z80 processor. There are additional options to + request warnings and error messages for undocumented instructions. + +`-ignore-undocumented-instructions' +`-Wnud' + Silently assemble undocumented Z80-instructions that have been + adopted as documented R800-instructions. + +`-ignore-unportable-instructions' +`-Wnup' + Silently assemble all undocumented Z80-instructions. + +`-warn-undocumented-instructions' +`-Wud' + Issue warnings for undocumented Z80-instructions that work on + R800, do not assemble other undocumented instructions without + warning. + +`-warn-unportable-instructions' +`-Wup' + Issue warnings for other undocumented Z80-instructions, do not + treat any undocumented instructions as errors. + +`-forbid-undocumented-instructions' +`-Fud' + Treat all undocumented z80-instructions as errors. + +`-forbid-unportable-instructions' +`-Fup' + Treat undocumented z80-instructions that do not work on R800 as + errors. + +`-r800' + Produce code for the R800 processor. The assembler does not support + undocumented instructions for the R800. In line with common + practice, `as' uses Z80 instruction names for the R800 processor, + as far as they exist. + + +File: as.info, Node: Z80 Syntax, Next: Z80 Floating Point, Prev: Z80 Options, Up: Z80-Dependent + +9.54.2 Syntax +------------- + +The assembler syntax closely follows the 'Z80 family CPU User Manual' by +Zilog. In expressions a single `=' may be used as "is equal to" +comparison operator. + + Suffices can be used to indicate the radix of integer constants; `H' +or `h' for hexadecimal, `D' or `d' for decimal, `Q', `O', `q' or `o' +for octal, and `B' for binary. + + The suffix `b' denotes a backreference to local label. + +* Menu: + +* Z80-Chars:: Special Characters +* Z80-Regs:: Register Names +* Z80-Case:: Case Sensitivity + + +File: as.info, Node: Z80-Chars, Next: Z80-Regs, Up: Z80 Syntax + +9.54.2.1 Special Characters +........................... + +The semicolon `;' is the line comment character; + + If a `#' appears as the first character of a line then the whole +line is treated as a comment, but in this case the line could also be a +logical line number directive (*note Comments::) or a preprocessor +control command (*note Preprocessing::). + + The Z80 assembler does not support a line separator character. + + The dollar sign `$' can be used as a prefix for hexadecimal numbers +and as a symbol denoting the current location counter. + + A backslash `\' is an ordinary character for the Z80 assembler. + + The single quote `'' must be followed by a closing quote. If there +is one character in between, it is a character constant, otherwise it is +a string constant. + + +File: as.info, Node: Z80-Regs, Next: Z80-Case, Prev: Z80-Chars, Up: Z80 Syntax + +9.54.2.2 Register Names +....................... + +The registers are referred to with the letters assigned to them by +Zilog. In addition `as' recognizes `ixl' and `ixh' as the least and +most significant octet in `ix', and similarly `iyl' and `iyh' as parts +of `iy'. + + +File: as.info, Node: Z80-Case, Prev: Z80-Regs, Up: Z80 Syntax + +9.54.2.3 Case Sensitivity +......................... + +Upper and lower case are equivalent in register names, opcodes, +condition codes and assembler directives. The case of letters is +significant in labels and symbol names. The case is also important to +distinguish the suffix `b' for a backward reference to a local label +from the suffix `B' for a number in binary notation. + + +File: as.info, Node: Z80 Floating Point, Next: Z80 Directives, Prev: Z80 Syntax, Up: Z80-Dependent + +9.54.3 Floating Point +--------------------- + +Floating-point numbers are not supported. + + +File: as.info, Node: Z80 Directives, Next: Z80 Opcodes, Prev: Z80 Floating Point, Up: Z80-Dependent + +9.54.4 Z80 Assembler Directives +------------------------------- + +`as' for the Z80 supports some additional directives for compatibility +with other assemblers. + + These are the additional directives in `as' for the Z80: + +`db EXPRESSION|STRING[,EXPRESSION|STRING...]' +`defb EXPRESSION|STRING[,EXPRESSION|STRING...]' + For each STRING the characters are copied to the object file, for + each other EXPRESSION the value is stored in one byte. A warning + is issued in case of an overflow. + +`dw EXPRESSION[,EXPRESSION...]' +`defw EXPRESSION[,EXPRESSION...]' + For each EXPRESSION the value is stored in two bytes, ignoring + overflow. + +`d24 EXPRESSION[,EXPRESSION...]' +`def24 EXPRESSION[,EXPRESSION...]' + For each EXPRESSION the value is stored in three bytes, ignoring + overflow. + +`d32 EXPRESSION[,EXPRESSION...]' +`def32 EXPRESSION[,EXPRESSION...]' + For each EXPRESSION the value is stored in four bytes, ignoring + overflow. + +`ds COUNT[, VALUE]' +`defs COUNT[, VALUE]' + Fill COUNT bytes in the object file with VALUE, if VALUE is + omitted it defaults to zero. + +`SYMBOL equ EXPRESSION' +`SYMBOL defl EXPRESSION' + These directives set the value of SYMBOL to EXPRESSION. If `equ' + is used, it is an error if SYMBOL is already defined. Symbols + defined with `equ' are not protected from redefinition. + +`set' + This is a normal instruction on Z80, and not an assembler + directive. + +`psect NAME' + A synonym for *Note Section::, no second argument should be given. + + + +File: as.info, Node: Z80 Opcodes, Prev: Z80 Directives, Up: Z80-Dependent + +9.54.5 Opcodes +-------------- + +In line with common practice, Z80 mnemonics are used for both the Z80 +and the R800. + + In many instructions it is possible to use one of the half index +registers (`ixl',`ixh',`iyl',`iyh') in stead of an 8-bit general +purpose register. This yields instructions that are documented on the +R800 and undocumented on the Z80. Similarly `in f,(c)' is documented +on the R800 and undocumented on the Z80. + + The assembler also supports the following undocumented +Z80-instructions, that have not been adopted in the R800 instruction +set: +`out (c),0' + Sends zero to the port pointed to by register c. + +`sli M' + Equivalent to `M = (M<<1)+1', the operand M can be any operand + that is valid for `sla'. One can use `sll' as a synonym for `sli'. + +`OP (ix+D), R' + This is equivalent to + + ld R, (ix+D) + OPC R + ld (ix+D), R + + The operation `OPC' may be any of `res B,', `set B,', `rl', `rlc', + `rr', `rrc', `sla', `sli', `sra' and `srl', and the register `R' + may be any of `a', `b', `c', `d', `e', `h' and `l'. + +`OPC (iy+D), R' + As above, but with `iy' instead of `ix'. + + The web site at `http://www.z80.info' is a good starting place to +find more information on programming the Z80. + + +File: as.info, Node: Z8000-Dependent, Prev: Z80-Dependent, Up: Machine Dependencies + +9.55 Z8000 Dependent Features +============================= + + The Z8000 as supports both members of the Z8000 family: the +unsegmented Z8002, with 16 bit addresses, and the segmented Z8001 with +24 bit addresses. + + When the assembler is in unsegmented mode (specified with the +`unsegm' directive), an address takes up one word (16 bit) sized +register. When the assembler is in segmented mode (specified with the +`segm' directive), a 24-bit address takes up a long (32 bit) register. +*Note Assembler Directives for the Z8000: Z8000 Directives, for a list +of other Z8000 specific assembler directives. + +* Menu: + +* Z8000 Options:: Command-line options for the Z8000 +* Z8000 Syntax:: Assembler syntax for the Z8000 +* Z8000 Directives:: Special directives for the Z8000 +* Z8000 Opcodes:: Opcodes + + +File: as.info, Node: Z8000 Options, Next: Z8000 Syntax, Up: Z8000-Dependent + +9.55.1 Options +-------------- + +`-z8001' + Generate segmented code by default. + +`-z8002' + Generate unsegmented code by default. + + +File: as.info, Node: Z8000 Syntax, Next: Z8000 Directives, Prev: Z8000 Options, Up: Z8000-Dependent + +9.55.2 Syntax +------------- + +* Menu: + +* Z8000-Chars:: Special Characters +* Z8000-Regs:: Register Names +* Z8000-Addressing:: Addressing Modes + + +File: as.info, Node: Z8000-Chars, Next: Z8000-Regs, Up: Z8000 Syntax + +9.55.2.1 Special Characters +........................... + +`!' is the line comment character. + + If a `#' appears as the first character of a line then the whole +line is treated as a comment, but in this case the line could also be a +logical line number directive (*note Comments::) or a preprocessor +control command (*note Preprocessing::). + + You can use `;' instead of a newline to separate statements. + + +File: as.info, Node: Z8000-Regs, Next: Z8000-Addressing, Prev: Z8000-Chars, Up: Z8000 Syntax + +9.55.2.2 Register Names +....................... + +The Z8000 has sixteen 16 bit registers, numbered 0 to 15. You can refer +to different sized groups of registers by register number, with the +prefix `r' for 16 bit registers, `rr' for 32 bit registers and `rq' for +64 bit registers. You can also refer to the contents of the first +eight (of the sixteen 16 bit registers) by bytes. They are named `rlN' +and `rhN'. + +_byte registers_ + rl0 rh0 rl1 rh1 rl2 rh2 rl3 rh3 + rl4 rh4 rl5 rh5 rl6 rh6 rl7 rh7 + +_word registers_ + r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 + +_long word registers_ + rr0 rr2 rr4 rr6 rr8 rr10 rr12 rr14 + +_quad word registers_ + rq0 rq4 rq8 rq12 + + +File: as.info, Node: Z8000-Addressing, Prev: Z8000-Regs, Up: Z8000 Syntax + +9.55.2.3 Addressing Modes +......................... + +as understands the following addressing modes for the Z8000: + +`rlN' +`rhN' +`rN' +`rrN' +`rqN' + Register direct: 8bit, 16bit, 32bit, and 64bit registers. + +`@rN' +`@rrN' + Indirect register: @rrN in segmented mode, @rN in unsegmented + mode. + +`ADDR' + Direct: the 16 bit or 24 bit address (depending on whether the + assembler is in segmented or unsegmented mode) of the operand is + in the instruction. + +`address(rN)' + Indexed: the 16 or 24 bit address is added to the 16 bit register + to produce the final address in memory of the operand. + +`rN(#IMM)' +`rrN(#IMM)' + Base Address: the 16 or 24 bit register is added to the 16 bit sign + extended immediate displacement to produce the final address in + memory of the operand. + +`rN(rM)' +`rrN(rM)' + Base Index: the 16 or 24 bit register rN or rrN is added to the + sign extended 16 bit index register rM to produce the final + address in memory of the operand. + +`#XX' + Immediate data XX. + + +File: as.info, Node: Z8000 Directives, Next: Z8000 Opcodes, Prev: Z8000 Syntax, Up: Z8000-Dependent + +9.55.3 Assembler Directives for the Z8000 +----------------------------------------- + +The Z8000 port of as includes additional assembler directives, for +compatibility with other Z8000 assemblers. These do not begin with `.' +(unlike the ordinary as directives). + +`segm' +`.z8001' + Generate code for the segmented Z8001. + +`unsegm' +`.z8002' + Generate code for the unsegmented Z8002. + +`name' + Synonym for `.file' + +`global' + Synonym for `.global' + +`wval' + Synonym for `.word' + +`lval' + Synonym for `.long' + +`bval' + Synonym for `.byte' + +`sval' + Assemble a string. `sval' expects one string literal, delimited by + single quotes. It assembles each byte of the string into + consecutive addresses. You can use the escape sequence `%XX' + (where XX represents a two-digit hexadecimal number) to represent + the character whose ASCII value is XX. Use this feature to + describe single quote and other characters that may not appear in + string literals as themselves. For example, the C statement + `char *a = "he said \"it's 50% off\"";' is represented in Z8000 + assembly language (shown with the assembler output in hex at the + left) as + + 68652073 sval 'he said %22it%27s 50%25 off%22%00' + 61696420 + 22697427 + 73203530 + 25206F66 + 662200 + +`rsect' + synonym for `.section' + +`block' + synonym for `.space' + +`even' + special case of `.align'; aligns output to even byte boundary. + + +File: as.info, Node: Z8000 Opcodes, Prev: Z8000 Directives, Up: Z8000-Dependent + +9.55.4 Opcodes +-------------- + +For detailed information on the Z8000 machine instruction set, see +`Z8000 Technical Manual'. + + The following table summarizes the opcodes and their arguments: + + rs 16 bit source register + rd 16 bit destination register + rbs 8 bit source register + rbd 8 bit destination register + rrs 32 bit source register + rrd 32 bit destination register + rqs 64 bit source register + rqd 64 bit destination register + addr 16/24 bit address + imm immediate data + + adc rd,rs clrb addr cpsir @rd,@rs,rr,cc + adcb rbd,rbs clrb addr(rd) cpsirb @rd,@rs,rr,cc + add rd,@rs clrb rbd dab rbd + add rd,addr com @rd dbjnz rbd,disp7 + add rd,addr(rs) com addr dec @rd,imm4m1 + add rd,imm16 com addr(rd) dec addr(rd),imm4m1 + add rd,rs com rd dec addr,imm4m1 + addb rbd,@rs comb @rd dec rd,imm4m1 + addb rbd,addr comb addr decb @rd,imm4m1 + addb rbd,addr(rs) comb addr(rd) decb addr(rd),imm4m1 + addb rbd,imm8 comb rbd decb addr,imm4m1 + addb rbd,rbs comflg flags decb rbd,imm4m1 + addl rrd,@rs cp @rd,imm16 di i2 + addl rrd,addr cp addr(rd),imm16 div rrd,@rs + addl rrd,addr(rs) cp addr,imm16 div rrd,addr + addl rrd,imm32 cp rd,@rs div rrd,addr(rs) + addl rrd,rrs cp rd,addr div rrd,imm16 + and rd,@rs cp rd,addr(rs) div rrd,rs + and rd,addr cp rd,imm16 divl rqd,@rs + and rd,addr(rs) cp rd,rs divl rqd,addr + and rd,imm16 cpb @rd,imm8 divl rqd,addr(rs) + and rd,rs cpb addr(rd),imm8 divl rqd,imm32 + andb rbd,@rs cpb addr,imm8 divl rqd,rrs + andb rbd,addr cpb rbd,@rs djnz rd,disp7 + andb rbd,addr(rs) cpb rbd,addr ei i2 + andb rbd,imm8 cpb rbd,addr(rs) ex rd,@rs + andb rbd,rbs cpb rbd,imm8 ex rd,addr + bit @rd,imm4 cpb rbd,rbs ex rd,addr(rs) + bit addr(rd),imm4 cpd rd,@rs,rr,cc ex rd,rs + bit addr,imm4 cpdb rbd,@rs,rr,cc exb rbd,@rs + bit rd,imm4 cpdr rd,@rs,rr,cc exb rbd,addr + bit rd,rs cpdrb rbd,@rs,rr,cc exb rbd,addr(rs) + bitb @rd,imm4 cpi rd,@rs,rr,cc exb rbd,rbs + bitb addr(rd),imm4 cpib rbd,@rs,rr,cc ext0e imm8 + bitb addr,imm4 cpir rd,@rs,rr,cc ext0f imm8 + bitb rbd,imm4 cpirb rbd,@rs,rr,cc ext8e imm8 + bitb rbd,rs cpl rrd,@rs ext8f imm8 + bpt cpl rrd,addr exts rrd + call @rd cpl rrd,addr(rs) extsb rd + call addr cpl rrd,imm32 extsl rqd + call addr(rd) cpl rrd,rrs halt + calr disp12 cpsd @rd,@rs,rr,cc in rd,@rs + clr @rd cpsdb @rd,@rs,rr,cc in rd,imm16 + clr addr cpsdr @rd,@rs,rr,cc inb rbd,@rs + clr addr(rd) cpsdrb @rd,@rs,rr,cc inb rbd,imm16 + clr rd cpsi @rd,@rs,rr,cc inc @rd,imm4m1 + clrb @rd cpsib @rd,@rs,rr,cc inc addr(rd),imm4m1 + inc addr,imm4m1 ldb rbd,rs(rx) mult rrd,addr(rs) + inc rd,imm4m1 ldb rd(imm16),rbs mult rrd,imm16 + incb @rd,imm4m1 ldb rd(rx),rbs mult rrd,rs + incb addr(rd),imm4m1 ldctl ctrl,rs multl rqd,@rs + incb addr,imm4m1 ldctl rd,ctrl multl rqd,addr + incb rbd,imm4m1 ldd @rs,@rd,rr multl rqd,addr(rs) + ind @rd,@rs,ra lddb @rs,@rd,rr multl rqd,imm32 + indb @rd,@rs,rba lddr @rs,@rd,rr multl rqd,rrs + inib @rd,@rs,ra lddrb @rs,@rd,rr neg @rd + inibr @rd,@rs,ra ldi @rd,@rs,rr neg addr + iret ldib @rd,@rs,rr neg addr(rd) + jp cc,@rd ldir @rd,@rs,rr neg rd + jp cc,addr ldirb @rd,@rs,rr negb @rd + jp cc,addr(rd) ldk rd,imm4 negb addr + jr cc,disp8 ldl @rd,rrs negb addr(rd) + ld @rd,imm16 ldl addr(rd),rrs negb rbd + ld @rd,rs ldl addr,rrs nop + ld addr(rd),imm16 ldl rd(imm16),rrs or rd,@rs + ld addr(rd),rs ldl rd(rx),rrs or rd,addr + ld addr,imm16 ldl rrd,@rs or rd,addr(rs) + ld addr,rs ldl rrd,addr or rd,imm16 + ld rd(imm16),rs ldl rrd,addr(rs) or rd,rs + ld rd(rx),rs ldl rrd,imm32 orb rbd,@rs + ld rd,@rs ldl rrd,rrs orb rbd,addr + ld rd,addr ldl rrd,rs(imm16) orb rbd,addr(rs) + ld rd,addr(rs) ldl rrd,rs(rx) orb rbd,imm8 + ld rd,imm16 ldm @rd,rs,n orb rbd,rbs + ld rd,rs ldm addr(rd),rs,n out @rd,rs + ld rd,rs(imm16) ldm addr,rs,n out imm16,rs + ld rd,rs(rx) ldm rd,@rs,n outb @rd,rbs + lda rd,addr ldm rd,addr(rs),n outb imm16,rbs + lda rd,addr(rs) ldm rd,addr,n outd @rd,@rs,ra + lda rd,rs(imm16) ldps @rs outdb @rd,@rs,rba + lda rd,rs(rx) ldps addr outib @rd,@rs,ra + ldar rd,disp16 ldps addr(rs) outibr @rd,@rs,ra + ldb @rd,imm8 ldr disp16,rs pop @rd,@rs + ldb @rd,rbs ldr rd,disp16 pop addr(rd),@rs + ldb addr(rd),imm8 ldrb disp16,rbs pop addr,@rs + ldb addr(rd),rbs ldrb rbd,disp16 pop rd,@rs + ldb addr,imm8 ldrl disp16,rrs popl @rd,@rs + ldb addr,rbs ldrl rrd,disp16 popl addr(rd),@rs + ldb rbd,@rs mbit popl addr,@rs + ldb rbd,addr mreq rd popl rrd,@rs + ldb rbd,addr(rs) mres push @rd,@rs + ldb rbd,imm8 mset push @rd,addr + ldb rbd,rbs mult rrd,@rs push @rd,addr(rs) + ldb rbd,rs(imm16) mult rrd,addr push @rd,imm16 + push @rd,rs set addr,imm4 subl rrd,imm32 + pushl @rd,@rs set rd,imm4 subl rrd,rrs + pushl @rd,addr set rd,rs tcc cc,rd + pushl @rd,addr(rs) setb @rd,imm4 tccb cc,rbd + pushl @rd,rrs setb addr(rd),imm4 test @rd + res @rd,imm4 setb addr,imm4 test addr + res addr(rd),imm4 setb rbd,imm4 test addr(rd) + res addr,imm4 setb rbd,rs test rd + res rd,imm4 setflg imm4 testb @rd + res rd,rs sinb rbd,imm16 testb addr + resb @rd,imm4 sinb rd,imm16 testb addr(rd) + resb addr(rd),imm4 sind @rd,@rs,ra testb rbd + resb addr,imm4 sindb @rd,@rs,rba testl @rd + resb rbd,imm4 sinib @rd,@rs,ra testl addr + resb rbd,rs sinibr @rd,@rs,ra testl addr(rd) + resflg imm4 sla rd,imm8 testl rrd + ret cc slab rbd,imm8 trdb @rd,@rs,rba + rl rd,imm1or2 slal rrd,imm8 trdrb @rd,@rs,rba + rlb rbd,imm1or2 sll rd,imm8 trib @rd,@rs,rbr + rlc rd,imm1or2 sllb rbd,imm8 trirb @rd,@rs,rbr + rlcb rbd,imm1or2 slll rrd,imm8 trtdrb @ra,@rb,rbr + rldb rbb,rba sout imm16,rs trtib @ra,@rb,rr + rr rd,imm1or2 soutb imm16,rbs trtirb @ra,@rb,rbr + rrb rbd,imm1or2 soutd @rd,@rs,ra trtrb @ra,@rb,rbr + rrc rd,imm1or2 soutdb @rd,@rs,rba tset @rd + rrcb rbd,imm1or2 soutib @rd,@rs,ra tset addr + rrdb rbb,rba soutibr @rd,@rs,ra tset addr(rd) + rsvd36 sra rd,imm8 tset rd + rsvd38 srab rbd,imm8 tsetb @rd + rsvd78 sral rrd,imm8 tsetb addr + rsvd7e srl rd,imm8 tsetb addr(rd) + rsvd9d srlb rbd,imm8 tsetb rbd + rsvd9f srll rrd,imm8 xor rd,@rs + rsvdb9 sub rd,@rs xor rd,addr + rsvdbf sub rd,addr xor rd,addr(rs) + sbc rd,rs sub rd,addr(rs) xor rd,imm16 + sbcb rbd,rbs sub rd,imm16 xor rd,rs + sc imm8 sub rd,rs xorb rbd,@rs + sda rd,rs subb rbd,@rs xorb rbd,addr + sdab rbd,rs subb rbd,addr xorb rbd,addr(rs) + sdal rrd,rs subb rbd,addr(rs) xorb rbd,imm8 + sdl rd,rs subb rbd,imm8 xorb rbd,rbs + sdlb rbd,rs subb rbd,rbs xorb rbd,rbs + sdll rrd,rs subl rrd,@rs + set @rd,imm4 subl rrd,addr + set addr(rd),imm4 subl rrd,addr(rs) +  File: as.info, Node: Reporting Bugs, Next: Acknowledgements, Prev: Machine Dependencies, Up: Top @@ -23542,3226 +24657,3422 @@ AS Index [index] * Menu: -* #: Comments. (line 33) -* #APP: Preprocessing. (line 27) -* #NO_APP: Preprocessing. (line 27) -* $ in symbol names <1>: D10V-Chars. (line 53) -* $ in symbol names <2>: SH-Chars. (line 15) -* $ in symbol names <3>: SH64-Chars. (line 15) -* $ in symbol names <4>: Meta-Chars. (line 10) -* $ in symbol names: D30V-Chars. (line 70) -* $a: ARM Mapping Symbols. (line 9) -* $acos math builtin, TIC54X: TIC54X-Builtins. (line 10) -* $asin math builtin, TIC54X: TIC54X-Builtins. (line 13) -* $atan math builtin, TIC54X: TIC54X-Builtins. (line 16) -* $atan2 math builtin, TIC54X: TIC54X-Builtins. (line 19) -* $ceil math builtin, TIC54X: TIC54X-Builtins. (line 22) -* $cos math builtin, TIC54X: TIC54X-Builtins. (line 28) -* $cosh math builtin, TIC54X: TIC54X-Builtins. (line 25) -* $cvf math builtin, TIC54X: TIC54X-Builtins. (line 31) -* $cvi math builtin, TIC54X: TIC54X-Builtins. (line 34) +* \" (doublequote character): Strings. (line 43) +* \\ (\ character): Strings. (line 40) +* \b (backspace character): Strings. (line 15) +* \DDD (octal character code): Strings. (line 30) +* \f (formfeed character): Strings. (line 18) +* \n (newline character): Strings. (line 21) +* \r (carriage return character): Strings. (line 24) +* \t (tab): Strings. (line 27) +* \XD... (hex character code): Strings. (line 36) +* #: Comments. (line 33) +* #APP: Preprocessing. (line 27) +* #NO_APP: Preprocessing. (line 27) +* $ in symbol names <1>: SH-Chars. (line 15) +* $ in symbol names <2>: Meta-Chars. (line 10) +* $ in symbol names <3>: D30V-Chars. (line 70) +* $ in symbol names <4>: D10V-Chars. (line 53) +* $ in symbol names: SH64-Chars. (line 15) +* $a: ARM Mapping Symbols. + (line 9) +* $acos math builtin, TIC54X: TIC54X-Builtins. (line 10) +* $asin math builtin, TIC54X: TIC54X-Builtins. (line 13) +* $atan math builtin, TIC54X: TIC54X-Builtins. (line 16) +* $atan2 math builtin, TIC54X: TIC54X-Builtins. (line 19) +* $ceil math builtin, TIC54X: TIC54X-Builtins. (line 22) +* $cos math builtin, TIC54X: TIC54X-Builtins. (line 28) +* $cosh math builtin, TIC54X: TIC54X-Builtins. (line 25) +* $cvf math builtin, TIC54X: TIC54X-Builtins. (line 31) +* $cvi math builtin, TIC54X: TIC54X-Builtins. (line 34) * $d <1>: AArch64 Mapping Symbols. - (line 12) -* $d: ARM Mapping Symbols. (line 15) -* $exp math builtin, TIC54X: TIC54X-Builtins. (line 37) -* $fabs math builtin, TIC54X: TIC54X-Builtins. (line 40) -* $firstch subsym builtin, TIC54X: TIC54X-Macros. (line 26) -* $floor math builtin, TIC54X: TIC54X-Builtins. (line 43) -* $fmod math builtin, TIC54X: TIC54X-Builtins. (line 47) -* $int math builtin, TIC54X: TIC54X-Builtins. (line 50) -* $iscons subsym builtin, TIC54X: TIC54X-Macros. (line 43) -* $isdefed subsym builtin, TIC54X: TIC54X-Macros. (line 34) -* $ismember subsym builtin, TIC54X: TIC54X-Macros. (line 38) -* $isname subsym builtin, TIC54X: TIC54X-Macros. (line 47) -* $isreg subsym builtin, TIC54X: TIC54X-Macros. (line 50) -* $lastch subsym builtin, TIC54X: TIC54X-Macros. (line 30) -* $ldexp math builtin, TIC54X: TIC54X-Builtins. (line 53) -* $log math builtin, TIC54X: TIC54X-Builtins. (line 59) -* $log10 math builtin, TIC54X: TIC54X-Builtins. (line 56) -* $max math builtin, TIC54X: TIC54X-Builtins. (line 62) -* $min math builtin, TIC54X: TIC54X-Builtins. (line 65) -* $pow math builtin, TIC54X: TIC54X-Builtins. (line 68) -* $round math builtin, TIC54X: TIC54X-Builtins. (line 71) -* $sgn math builtin, TIC54X: TIC54X-Builtins. (line 74) -* $sin math builtin, TIC54X: TIC54X-Builtins. (line 77) -* $sinh math builtin, TIC54X: TIC54X-Builtins. (line 80) -* $sqrt math builtin, TIC54X: TIC54X-Builtins. (line 83) -* $structacc subsym builtin, TIC54X: TIC54X-Macros. (line 57) -* $structsz subsym builtin, TIC54X: TIC54X-Macros. (line 54) -* $symcmp subsym builtin, TIC54X: TIC54X-Macros. (line 23) -* $symlen subsym builtin, TIC54X: TIC54X-Macros. (line 20) -* $t: ARM Mapping Symbols. (line 12) -* $tan math builtin, TIC54X: TIC54X-Builtins. (line 86) -* $tanh math builtin, TIC54X: TIC54X-Builtins. (line 89) -* $trunc math builtin, TIC54X: TIC54X-Builtins. (line 92) + (line 12) +* $d: ARM Mapping Symbols. + (line 15) +* $exp math builtin, TIC54X: TIC54X-Builtins. (line 37) +* $fabs math builtin, TIC54X: TIC54X-Builtins. (line 40) +* $firstch subsym builtin, TIC54X: TIC54X-Macros. (line 26) +* $floor math builtin, TIC54X: TIC54X-Builtins. (line 43) +* $fmod math builtin, TIC54X: TIC54X-Builtins. (line 47) +* $int math builtin, TIC54X: TIC54X-Builtins. (line 50) +* $iscons subsym builtin, TIC54X: TIC54X-Macros. (line 43) +* $isdefed subsym builtin, TIC54X: TIC54X-Macros. (line 34) +* $ismember subsym builtin, TIC54X: TIC54X-Macros. (line 38) +* $isname subsym builtin, TIC54X: TIC54X-Macros. (line 47) +* $isreg subsym builtin, TIC54X: TIC54X-Macros. (line 50) +* $lastch subsym builtin, TIC54X: TIC54X-Macros. (line 30) +* $ldexp math builtin, TIC54X: TIC54X-Builtins. (line 53) +* $log math builtin, TIC54X: TIC54X-Builtins. (line 59) +* $log10 math builtin, TIC54X: TIC54X-Builtins. (line 56) +* $max math builtin, TIC54X: TIC54X-Builtins. (line 62) +* $min math builtin, TIC54X: TIC54X-Builtins. (line 65) +* $pow math builtin, TIC54X: TIC54X-Builtins. (line 68) +* $round math builtin, TIC54X: TIC54X-Builtins. (line 71) +* $sgn math builtin, TIC54X: TIC54X-Builtins. (line 74) +* $sin math builtin, TIC54X: TIC54X-Builtins. (line 77) +* $sinh math builtin, TIC54X: TIC54X-Builtins. (line 80) +* $sqrt math builtin, TIC54X: TIC54X-Builtins. (line 83) +* $structacc subsym builtin, TIC54X: TIC54X-Macros. (line 57) +* $structsz subsym builtin, TIC54X: TIC54X-Macros. (line 54) +* $symcmp subsym builtin, TIC54X: TIC54X-Macros. (line 23) +* $symlen subsym builtin, TIC54X: TIC54X-Macros. (line 20) +* $t: ARM Mapping Symbols. + (line 12) +* $tan math builtin, TIC54X: TIC54X-Builtins. (line 86) +* $tanh math builtin, TIC54X: TIC54X-Builtins. (line 89) +* $trunc math builtin, TIC54X: TIC54X-Builtins. (line 92) * $x: AArch64 Mapping Symbols. - (line 9) -* %gp: RX-Modifiers. (line 6) -* %gpreg: RX-Modifiers. (line 22) -* %pidreg: RX-Modifiers. (line 25) -* -+ option, VAX/VMS: VAX-Opts. (line 71) -* --: Command Line. (line 10) -* --32 option, i386: i386-Options. (line 8) -* --32 option, x86-64: i386-Options. (line 8) -* --64 option, i386: i386-Options. (line 8) -* --64 option, x86-64: i386-Options. (line 8) -* --absolute-literals: Xtensa Options. (line 21) -* --allow-reg-prefix: SH Options. (line 9) -* --alternate: alternate. (line 6) -* --base-size-default-16: M68K-Opts. (line 65) -* --base-size-default-32: M68K-Opts. (line 65) -* --big: SH Options. (line 9) -* --bitwise-or option, M680x0: M68K-Opts. (line 58) -* --disp-size-default-16: M68K-Opts. (line 74) -* --disp-size-default-32: M68K-Opts. (line 74) -* --divide option, i386: i386-Options. (line 24) -* --dsp: SH Options. (line 9) -* --emulation=crisaout command line option, CRIS: CRIS-Opts. (line 9) -* --emulation=criself command line option, CRIS: CRIS-Opts. (line 9) -* --enforce-aligned-data: Sparc-Aligned-Data. (line 11) -* --fatal-warnings: W. (line 16) -* --fdpic: SH Options. (line 31) -* --fix-v4bx command line option, ARM: ARM Options. (line 174) + (line 9) +* %gp: RX-Modifiers. (line 6) +* %gpreg: RX-Modifiers. (line 22) +* %pidreg: RX-Modifiers. (line 25) +* -+ option, VAX/VMS: VAX-Opts. (line 71) +* --: Command Line. (line 10) +* --32 option, i386: i386-Options. (line 8) +* --32 option, x86-64: i386-Options. (line 8) +* --64 option, i386: i386-Options. (line 8) +* --64 option, x86-64: i386-Options. (line 8) +* --absolute-literals: Xtensa Options. (line 40) +* --allow-reg-prefix: SH Options. (line 9) +* --alternate: alternate. (line 6) +* --auto-litpools: Xtensa Options. (line 23) +* --base-size-default-16: M68K-Opts. (line 65) +* --base-size-default-32: M68K-Opts. (line 65) +* --big: SH Options. (line 9) +* --bitwise-or option, M680x0: M68K-Opts. (line 58) +* --compress-debug-sections= option: Overview. (line 345) +* --disp-size-default-16: M68K-Opts. (line 74) +* --disp-size-default-32: M68K-Opts. (line 74) +* --divide option, i386: i386-Options. (line 24) +* --dsp: SH Options. (line 9) +* --emulation=crisaout command line option, CRIS: CRIS-Opts. (line 9) +* --emulation=criself command line option, CRIS: CRIS-Opts. (line 9) +* --enforce-aligned-data: Sparc-Aligned-Data. (line 11) +* --fatal-warnings: W. (line 16) +* --fdpic: SH Options. (line 31) +* --fix-v4bx command line option, ARM: ARM Options. (line 190) * --fixed-special-register-names command line option, MMIX: MMIX-Opts. - (line 8) -* --force-long-branches: M68HC11-Opts. (line 82) -* --generate-example: M68HC11-Opts. (line 99) -* --globalize-symbols command line option, MMIX: MMIX-Opts. (line 12) -* --gnu-syntax command line option, MMIX: MMIX-Opts. (line 16) -* --hash-size=NUMBER: Overview. (line 421) + (line 8) +* --force-long-branches: M68HC11-Opts. (line 82) +* --generate-example: M68HC11-Opts. (line 99) +* --globalize-symbols command line option, MMIX: MMIX-Opts. (line 12) +* --gnu-syntax command line option, MMIX: MMIX-Opts. (line 16) * --linker-allocated-gregs command line option, MMIX: MMIX-Opts. - (line 67) -* --listing-cont-lines: listing. (line 34) -* --listing-lhs-width: listing. (line 16) -* --listing-lhs-width2: listing. (line 21) -* --listing-rhs-width: listing. (line 28) -* --little: SH Options. (line 9) -* --longcalls: Xtensa Options. (line 35) -* --march=ARCHITECTURE command line option, CRIS: CRIS-Opts. (line 34) -* --MD: MD. (line 6) -* --mul-bug-abort command line option, CRIS: CRIS-Opts. (line 62) -* --no-absolute-literals: Xtensa Options. (line 21) -* --no-expand command line option, MMIX: MMIX-Opts. (line 31) -* --no-longcalls: Xtensa Options. (line 35) -* --no-merge-gregs command line option, MMIX: MMIX-Opts. (line 36) -* --no-mul-bug-abort command line option, CRIS: CRIS-Opts. (line 62) -* --no-predefined-syms command line option, MMIX: MMIX-Opts. (line 22) -* --no-pushj-stubs command line option, MMIX: MMIX-Opts. (line 54) -* --no-stubs command line option, MMIX: MMIX-Opts. (line 54) -* --no-target-align: Xtensa Options. (line 28) -* --no-text-section-literals: Xtensa Options. (line 7) -* --no-trampolines: Xtensa Options. (line 56) -* --no-transform: Xtensa Options. (line 44) -* --no-underscore command line option, CRIS: CRIS-Opts. (line 15) -* --no-warn: W. (line 11) -* --pcrel: M68K-Opts. (line 86) -* --pic command line option, CRIS: CRIS-Opts. (line 27) -* --print-insn-syntax <1>: M68HC11-Opts. (line 88) -* --print-insn-syntax: XGATE-Opts. (line 25) -* --print-opcodes <1>: M68HC11-Opts. (line 92) -* --print-opcodes: XGATE-Opts. (line 29) -* --register-prefix-optional option, M680x0: M68K-Opts. (line 45) -* --relax: SH Options. (line 9) -* --relax command line option, MMIX: MMIX-Opts. (line 19) -* --rename-section: Xtensa Options. (line 52) -* --renesas: SH Options. (line 9) -* --short-branches: M68HC11-Opts. (line 67) -* --small: SH Options. (line 9) -* --statistics: statistics. (line 6) -* --strict-direct-mode: M68HC11-Opts. (line 57) -* --target-align: Xtensa Options. (line 28) -* --text-section-literals: Xtensa Options. (line 7) -* --traditional-format: traditional-format. (line 6) -* --trampolines: Xtensa Options. (line 56) -* --transform: Xtensa Options. (line 44) -* --underscore command line option, CRIS: CRIS-Opts. (line 15) -* --warn: W. (line 19) -* --x32 option, i386: i386-Options. (line 8) -* --x32 option, x86-64: i386-Options. (line 8) -* --xgate-ramoffset: M68HC11-Opts. (line 36) -* -1 option, VAX/VMS: VAX-Opts. (line 77) -* -32addr command line option, Alpha: Alpha Options. (line 57) -* -a: a. (line 6) -* -A options, i960: Options-i960. (line 6) -* -ac: a. (line 6) -* -ad: a. (line 6) -* -ag: a. (line 6) -* -ah: a. (line 6) -* -al: a. (line 6) -* -Aleon: Sparc-Opts. (line 25) -* -an: a. (line 6) -* -as: a. (line 6) -* -Asparc: Sparc-Opts. (line 25) -* -Asparcfmaf: Sparc-Opts. (line 25) -* -Asparcima: Sparc-Opts. (line 25) -* -Asparclet: Sparc-Opts. (line 25) -* -Asparclite: Sparc-Opts. (line 25) -* -Asparcvis: Sparc-Opts. (line 25) -* -Asparcvis2: Sparc-Opts. (line 25) -* -Asparcvis3: Sparc-Opts. (line 25) -* -Asparcvis3r: Sparc-Opts. (line 25) -* -Av6: Sparc-Opts. (line 25) -* -Av7: Sparc-Opts. (line 25) -* -Av8: Sparc-Opts. (line 25) -* -Av9: Sparc-Opts. (line 25) -* -Av9a: Sparc-Opts. (line 25) -* -Av9b: Sparc-Opts. (line 25) -* -Av9c: Sparc-Opts. (line 25) -* -Av9d: Sparc-Opts. (line 25) -* -Av9e: Sparc-Opts. (line 25) -* -Av9m: Sparc-Opts. (line 25) -* -Av9v: Sparc-Opts. (line 25) -* -b option, i960: Options-i960. (line 22) -* -big option, M32R: M32R-Opts. (line 35) -* -D: D. (line 6) -* -D, ignored on VAX: VAX-Opts. (line 11) -* -d, VAX option: VAX-Opts. (line 16) -* -eabi= command line option, ARM: ARM Options. (line 157) -* -EB command line option, AArch64: AArch64 Options. (line 6) -* -EB command line option, ARC: ARC Options. (line 31) -* -EB command line option, ARM: ARM Options. (line 162) -* -EB option (MIPS): MIPS Options. (line 13) -* -EB option, M32R: M32R-Opts. (line 39) -* -EB option, TILE-Gx: TILE-Gx Options. (line 11) -* -EL command line option, AArch64: AArch64 Options. (line 10) -* -EL command line option, ARC: ARC Options. (line 35) -* -EL command line option, ARM: ARM Options. (line 166) -* -EL option (MIPS): MIPS Options. (line 13) -* -EL option, M32R: M32R-Opts. (line 32) -* -EL option, TILE-Gx: TILE-Gx Options. (line 11) -* -f: f. (line 6) -* -F command line option, Alpha: Alpha Options. (line 57) -* -G command line option, Alpha: Alpha Options. (line 53) -* -g command line option, Alpha: Alpha Options. (line 47) -* -G option (MIPS): MIPS Options. (line 8) -* -h option, VAX/VMS: VAX-Opts. (line 45) -* -H option, VAX/VMS: VAX-Opts. (line 81) -* -I PATH: I. (line 6) -* -ignore-parallel-conflicts option, M32RX: M32R-Opts. (line 87) -* -Ip option, M32RX: M32R-Opts. (line 97) -* -J, ignored on VAX: VAX-Opts. (line 27) -* -K: K. (line 6) -* -k command line option, ARM: ARM Options. (line 170) -* -KPIC option, M32R: M32R-Opts. (line 42) -* -KPIC option, MIPS: MIPS Options. (line 21) -* -L: L. (line 6) -* -l option, M680x0: M68K-Opts. (line 33) -* -little option, M32R: M32R-Opts. (line 27) -* -M: M. (line 6) -* -m11/03: PDP-11-Options. (line 140) -* -m11/04: PDP-11-Options. (line 143) -* -m11/05: PDP-11-Options. (line 146) -* -m11/10: PDP-11-Options. (line 146) -* -m11/15: PDP-11-Options. (line 149) -* -m11/20: PDP-11-Options. (line 149) -* -m11/21: PDP-11-Options. (line 152) -* -m11/23: PDP-11-Options. (line 155) -* -m11/24: PDP-11-Options. (line 155) -* -m11/34: PDP-11-Options. (line 158) -* -m11/34a: PDP-11-Options. (line 161) -* -m11/35: PDP-11-Options. (line 164) -* -m11/40: PDP-11-Options. (line 164) -* -m11/44: PDP-11-Options. (line 167) -* -m11/45: PDP-11-Options. (line 170) -* -m11/50: PDP-11-Options. (line 170) -* -m11/53: PDP-11-Options. (line 173) -* -m11/55: PDP-11-Options. (line 170) -* -m11/60: PDP-11-Options. (line 176) -* -m11/70: PDP-11-Options. (line 170) -* -m11/73: PDP-11-Options. (line 173) -* -m11/83: PDP-11-Options. (line 173) -* -m11/84: PDP-11-Options. (line 173) -* -m11/93: PDP-11-Options. (line 173) -* -m11/94: PDP-11-Options. (line 173) -* -m16c option, M16C: M32C-Opts. (line 12) -* -m31 option, s390: s390 Options. (line 8) -* -m32 option, TILE-Gx: TILE-Gx Options. (line 8) -* -m32bit-doubles: RX-Opts. (line 9) -* -m32c option, M32C: M32C-Opts. (line 9) -* -m32r option, M32R: M32R-Opts. (line 21) -* -m32rx option, M32R2: M32R-Opts. (line 17) -* -m32rx option, M32RX: M32R-Opts. (line 9) -* -m4byte-align command line option, V850: V850 Options. (line 90) -* -m64 option, s390: s390 Options. (line 8) -* -m64 option, TILE-Gx: TILE-Gx Options. (line 8) -* -m64bit-doubles: RX-Opts. (line 15) -* -m68000 and related options: M68K-Opts. (line 98) -* -m68hc11: M68HC11-Opts. (line 9) -* -m68hc12: M68HC11-Opts. (line 14) -* -m68hcs12: M68HC11-Opts. (line 21) -* -m8byte-align command line option, V850: V850 Options. (line 86) -* -m[no-]68851 command line option, M680x0: M68K-Opts. (line 21) -* -m[no-]68881 command line option, M680x0: M68K-Opts. (line 21) -* -m[no-]div command line option, M680x0: M68K-Opts. (line 21) -* -m[no-]emac command line option, M680x0: M68K-Opts. (line 21) -* -m[no-]float command line option, M680x0: M68K-Opts. (line 21) -* -m[no-]mac command line option, M680x0: M68K-Opts. (line 21) -* -m[no-]usp command line option, M680x0: M68K-Opts. (line 21) -* -mabi= command line option, AArch64: AArch64 Options. (line 14) -* -madd-bnd-prefix option, i386: i386-Options. (line 126) -* -madd-bnd-prefix option, x86-64: i386-Options. (line 126) -* -mall: PDP-11-Options. (line 26) -* -mall-enabled command line option, LM32: LM32 Options. (line 30) -* -mall-extensions: PDP-11-Options. (line 26) -* -mall-opcodes command line option, AVR: AVR Options. (line 109) -* -mapcs-26 command line option, ARM: ARM Options. (line 129) -* -mapcs-32 command line option, ARM: ARM Options. (line 129) -* -mapcs-float command line option, ARM: ARM Options. (line 143) -* -mapcs-reentrant command line option, ARM: ARM Options. (line 148) -* -marc[5|6|7|8] command line option, ARC: ARC Options. (line 6) -* -march= command line option, AArch64: AArch64 Options. (line 38) -* -march= command line option, ARM: ARM Options. (line 66) -* -march= command line option, M680x0: M68K-Opts. (line 8) -* -march= command line option, TIC6X: TIC6X Options. (line 6) -* -march= option, i386: i386-Options. (line 31) -* -march= option, s390: s390 Options. (line 25) -* -march= option, x86-64: i386-Options. (line 31) -* -matpcs command line option, ARM: ARM Options. (line 135) -* -mavxscalar= option, i386: i386-Options. (line 84) -* -mavxscalar= option, x86-64: i386-Options. (line 84) + (line 67) +* --listing-cont-lines: listing. (line 34) +* --listing-lhs-width: listing. (line 16) +* --listing-lhs-width2: listing. (line 21) +* --listing-rhs-width: listing. (line 28) +* --little: SH Options. (line 9) +* --longcalls: Xtensa Options. (line 54) +* --march=ARCHITECTURE command line option, CRIS: CRIS-Opts. (line 34) +* --MD: MD. (line 6) +* --mul-bug-abort command line option, CRIS: CRIS-Opts. (line 62) +* --no-absolute-literals: Xtensa Options. (line 40) +* --no-auto-litpools: Xtensa Options. (line 23) +* --no-expand command line option, MMIX: MMIX-Opts. (line 31) +* --no-longcalls: Xtensa Options. (line 54) +* --no-merge-gregs command line option, MMIX: MMIX-Opts. (line 36) +* --no-mul-bug-abort command line option, CRIS: CRIS-Opts. (line 62) +* --no-pad-sections: no-pad-sections. (line 6) +* --no-predefined-syms command line option, MMIX: MMIX-Opts. (line 22) +* --no-pushj-stubs command line option, MMIX: MMIX-Opts. (line 54) +* --no-stubs command line option, MMIX: MMIX-Opts. (line 54) +* --no-target-align: Xtensa Options. (line 47) +* --no-text-section-literals: Xtensa Options. (line 7) +* --no-trampolines: Xtensa Options. (line 75) +* --no-transform: Xtensa Options. (line 63) +* --no-underscore command line option, CRIS: CRIS-Opts. (line 15) +* --no-warn: W. (line 11) +* --pcrel: M68K-Opts. (line 86) +* --pic command line option, CRIS: CRIS-Opts. (line 27) +* --print-insn-syntax <1>: M68HC11-Opts. (line 88) +* --print-insn-syntax: XGATE-Opts. (line 25) +* --print-opcodes <1>: XGATE-Opts. (line 29) +* --print-opcodes: M68HC11-Opts. (line 92) +* --register-prefix-optional option, M680x0: M68K-Opts. (line 45) +* --relax: SH Options. (line 9) +* --relax command line option, MMIX: MMIX-Opts. (line 19) +* --rename-section: Xtensa Options. (line 71) +* --renesas: SH Options. (line 9) +* --sectname-subst: Section. (line 81) +* --short-branches: M68HC11-Opts. (line 67) +* --small: SH Options. (line 9) +* --statistics: statistics. (line 6) +* --strict-direct-mode: M68HC11-Opts. (line 57) +* --target-align: Xtensa Options. (line 47) +* --text-section-literals: Xtensa Options. (line 7) +* --traditional-format: traditional-format. (line 6) +* --trampolines: Xtensa Options. (line 75) +* --transform: Xtensa Options. (line 63) +* --underscore command line option, CRIS: CRIS-Opts. (line 15) +* --warn: W. (line 19) +* --x32 option, i386: i386-Options. (line 8) +* --x32 option, x86-64: i386-Options. (line 8) +* --xgate-ramoffset: M68HC11-Opts. (line 36) +* -1 option, VAX/VMS: VAX-Opts. (line 77) +* -32addr command line option, Alpha: Alpha Options. (line 57) +* -a: a. (line 6) +* -A options, i960: Options-i960. (line 6) +* -ac: a. (line 6) +* -ad: a. (line 6) +* -ag: a. (line 6) +* -ah: a. (line 6) +* -al: a. (line 6) +* -Aleon: Sparc-Opts. (line 25) +* -an: a. (line 6) +* -as: a. (line 6) +* -Asparc: Sparc-Opts. (line 25) +* -Asparcfmaf: Sparc-Opts. (line 25) +* -Asparcima: Sparc-Opts. (line 25) +* -Asparclet: Sparc-Opts. (line 25) +* -Asparclite: Sparc-Opts. (line 25) +* -Asparcvis: Sparc-Opts. (line 25) +* -Asparcvis2: Sparc-Opts. (line 25) +* -Asparcvis3: Sparc-Opts. (line 25) +* -Asparcvis3r: Sparc-Opts. (line 25) +* -Av6: Sparc-Opts. (line 25) +* -Av7: Sparc-Opts. (line 25) +* -Av8: Sparc-Opts. (line 25) +* -Av9: Sparc-Opts. (line 25) +* -Av9a: Sparc-Opts. (line 25) +* -Av9b: Sparc-Opts. (line 25) +* -Av9c: Sparc-Opts. (line 25) +* -Av9d: Sparc-Opts. (line 25) +* -Av9e: Sparc-Opts. (line 25) +* -Av9m: Sparc-Opts. (line 25) +* -Av9v: Sparc-Opts. (line 25) +* -b option, i960: Options-i960. (line 22) +* -big option, M32R: M32R-Opts. (line 35) +* -D: D. (line 6) +* -D, ignored on VAX: VAX-Opts. (line 11) +* -d, VAX option: VAX-Opts. (line 16) +* -eabi= command line option, ARM: ARM Options. (line 166) +* -EB command line option, AArch64: AArch64 Options. (line 6) +* -EB command line option, ARC: ARC Options. (line 85) +* -EB command line option, ARM: ARM Options. (line 171) +* -EB option (MIPS): MIPS Options. (line 13) +* -EB option, M32R: M32R-Opts. (line 39) +* -EB option, TILE-Gx: TILE-Gx Options. (line 11) +* -EL command line option, AArch64: AArch64 Options. (line 10) +* -EL command line option, ARC: ARC Options. (line 89) +* -EL command line option, ARM: ARM Options. (line 182) +* -EL option (MIPS): MIPS Options. (line 13) +* -EL option, M32R: M32R-Opts. (line 32) +* -EL option, TILE-Gx: TILE-Gx Options. (line 11) +* -f: f. (line 6) +* -F command line option, Alpha: Alpha Options. (line 57) +* -G command line option, Alpha: Alpha Options. (line 53) +* -g command line option, Alpha: Alpha Options. (line 47) +* -G option (MIPS): MIPS Options. (line 8) +* -h option, VAX/VMS: VAX-Opts. (line 45) +* -H option, VAX/VMS: VAX-Opts. (line 81) +* -I PATH: I. (line 6) +* -ignore-parallel-conflicts option, M32RX: M32R-Opts. (line 87) +* -Ip option, M32RX: M32R-Opts. (line 97) +* -J, ignored on VAX: VAX-Opts. (line 27) +* -K: K. (line 6) +* -k command line option, ARM: ARM Options. (line 186) +* -KPIC option, M32R: M32R-Opts. (line 42) +* -KPIC option, MIPS: MIPS Options. (line 21) +* -L: L. (line 6) +* -l option, M680x0: M68K-Opts. (line 33) +* -little option, M32R: M32R-Opts. (line 27) +* -M: M. (line 6) +* -m11/03: PDP-11-Options. (line 140) +* -m11/04: PDP-11-Options. (line 143) +* -m11/05: PDP-11-Options. (line 146) +* -m11/10: PDP-11-Options. (line 146) +* -m11/15: PDP-11-Options. (line 149) +* -m11/20: PDP-11-Options. (line 149) +* -m11/21: PDP-11-Options. (line 152) +* -m11/23: PDP-11-Options. (line 155) +* -m11/24: PDP-11-Options. (line 155) +* -m11/34: PDP-11-Options. (line 158) +* -m11/34a: PDP-11-Options. (line 161) +* -m11/35: PDP-11-Options. (line 164) +* -m11/40: PDP-11-Options. (line 164) +* -m11/44: PDP-11-Options. (line 167) +* -m11/45: PDP-11-Options. (line 170) +* -m11/50: PDP-11-Options. (line 170) +* -m11/53: PDP-11-Options. (line 173) +* -m11/55: PDP-11-Options. (line 170) +* -m11/60: PDP-11-Options. (line 176) +* -m11/70: PDP-11-Options. (line 170) +* -m11/73: PDP-11-Options. (line 173) +* -m11/83: PDP-11-Options. (line 173) +* -m11/84: PDP-11-Options. (line 173) +* -m11/93: PDP-11-Options. (line 173) +* -m11/94: PDP-11-Options. (line 173) +* -m16c option, M16C: M32C-Opts. (line 12) +* -m31 option, s390: s390 Options. (line 8) +* -m32 option, TILE-Gx: TILE-Gx Options. (line 8) +* -m32bit-doubles: RX-Opts. (line 9) +* -m32c option, M32C: M32C-Opts. (line 9) +* -m32r option, M32R: M32R-Opts. (line 21) +* -m32rx option, M32R2: M32R-Opts. (line 17) +* -m32rx option, M32RX: M32R-Opts. (line 9) +* -m4byte-align command line option, V850: V850 Options. (line 90) +* -m64 option, s390: s390 Options. (line 8) +* -m64 option, TILE-Gx: TILE-Gx Options. (line 8) +* -m64bit-doubles: RX-Opts. (line 15) +* -m68000 and related options: M68K-Opts. (line 98) +* -m68hc11: M68HC11-Opts. (line 9) +* -m68hc12: M68HC11-Opts. (line 14) +* -m68hcs12: M68HC11-Opts. (line 21) +* -m8byte-align command line option, V850: V850 Options. (line 86) +* -m[no-]68851 command line option, M680x0: M68K-Opts. (line 21) +* -m[no-]68881 command line option, M680x0: M68K-Opts. (line 21) +* -m[no-]div command line option, M680x0: M68K-Opts. (line 21) +* -m[no-]emac command line option, M680x0: M68K-Opts. (line 21) +* -m[no-]float command line option, M680x0: M68K-Opts. (line 21) +* -m[no-]mac command line option, M680x0: M68K-Opts. (line 21) +* -m[no-]usp command line option, M680x0: M68K-Opts. (line 21) +* -mabi= command line option, AArch64: AArch64 Options. (line 14) +* -mabi=ABI option, RISC-V: RISC-V-Opts. (line 12) +* -madd-bnd-prefix option, i386: i386-Options. (line 134) +* -madd-bnd-prefix option, x86-64: i386-Options. (line 134) +* -mall: PDP-11-Options. (line 26) +* -mall-enabled command line option, LM32: LM32 Options. (line 30) +* -mall-extensions: PDP-11-Options. (line 26) +* -mall-opcodes command line option, AVR: AVR Options. (line 109) +* -mamd64 option, x86-64: i386-Options. (line 190) +* -mapcs-26 command line option, ARM: ARM Options. (line 138) +* -mapcs-32 command line option, ARM: ARM Options. (line 138) +* -mapcs-float command line option, ARM: ARM Options. (line 152) +* -mapcs-reentrant command line option, ARM: ARM Options. (line 157) +* -march= command line option, AArch64: AArch64 Options. (line 39) +* -march= command line option, ARM: ARM Options. (line 73) +* -march= command line option, M680x0: M68K-Opts. (line 8) +* -march= command line option, TIC6X: TIC6X Options. (line 6) +* -march= option, i386: i386-Options. (line 31) +* -march= option, s390: s390 Options. (line 25) +* -march= option, x86-64: i386-Options. (line 31) +* -march=ISA option, RISC-V: RISC-V-Opts. (line 8) +* -matpcs command line option, ARM: ARM Options. (line 144) +* -mavxscalar= option, i386: i386-Options. (line 92) +* -mavxscalar= option, x86-64: i386-Options. (line 92) * -mbarrel-shift-enabled command line option, LM32: LM32 Options. - (line 12) -* -mbig-endian: RX-Opts. (line 20) -* -mbig-obj option, x86-64: i386-Options. (line 131) -* -mbreak-enabled command line option, LM32: LM32 Options. (line 27) -* -mccs command line option, ARM: ARM Options. (line 183) -* -mcis: PDP-11-Options. (line 32) -* -mconstant-gp command line option, IA-64: IA-64 Options. (line 6) -* -mCPU command line option, Alpha: Alpha Options. (line 6) -* -mcpu option, cpu: TIC54X-Opts. (line 15) -* -mcpu=: RX-Opts. (line 75) -* -mcpu= command line option, AArch64: AArch64 Options. (line 19) -* -mcpu= command line option, ARM: ARM Options. (line 6) -* -mcpu= command line option, Blackfin: Blackfin Options. (line 6) -* -mcpu= command line option, M680x0: M68K-Opts. (line 14) -* -mcsm: PDP-11-Options. (line 43) -* -mdcache-enabled command line option, LM32: LM32 Options. (line 24) -* -mdebug command line option, Alpha: Alpha Options. (line 25) -* -mdivide-enabled command line option, LM32: LM32 Options. (line 9) -* -mdsbt command line option, TIC6X: TIC6X Options. (line 13) -* -me option, stderr redirect: TIC54X-Opts. (line 20) -* -meis: PDP-11-Options. (line 46) -* -mepiphany command line option, Epiphany: Epiphany Options. (line 9) + (line 12) +* -mbig-endian: RX-Opts. (line 20) +* -mbig-obj option, x86-64: i386-Options. (line 148) +* -mbreak-enabled command line option, LM32: LM32 Options. (line 27) +* -mccs command line option, ARM: ARM Options. (line 199) +* -mcis: PDP-11-Options. (line 32) +* -mcode-density command line option, ARC: ARC Options. (line 94) +* -mconstant-gp command line option, IA-64: IA-64 Options. (line 6) +* -mCPU command line option, Alpha: Alpha Options. (line 6) +* -mcpu option, cpu: TIC54X-Opts. (line 15) +* -mcpu=: RX-Opts. (line 75) +* -mcpu= command line option, AArch64: AArch64 Options. (line 19) +* -mcpu= command line option, ARM: ARM Options. (line 6) +* -mcpu= command line option, Blackfin: Blackfin Options. (line 6) +* -mcpu= command line option, M680x0: M68K-Opts. (line 14) +* -mcpu=CPU command line option, ARC: ARC Options. (line 10) +* -mcsm: PDP-11-Options. (line 43) +* -mdcache-enabled command line option, LM32: LM32 Options. (line 24) +* -mdebug command line option, Alpha: Alpha Options. (line 25) +* -mdivide-enabled command line option, LM32: LM32 Options. (line 9) +* -mdpfp command line option, ARC: ARC Options. (line 109) +* -mdsbt command line option, TIC6X: TIC6X Options. (line 13) +* -me option, stderr redirect: TIC54X-Opts. (line 20) +* -meis: PDP-11-Options. (line 46) +* -mepiphany command line option, Epiphany: Epiphany Options. + (line 9) * -mepiphany16 command line option, Epiphany: Epiphany Options. - (line 13) -* -merrors-to-file option, stderr redirect: TIC54X-Opts. (line 20) -* -mesa option, s390: s390 Options. (line 17) -* -mevexlig= option, i386: i386-Options. (line 92) -* -mevexlig= option, x86-64: i386-Options. (line 92) -* -mevexrcig= option, i386: i386-Options. (line 144) -* -mevexrcig= option, x86-64: i386-Options. (line 144) -* -mevexwig= option, i386: i386-Options. (line 102) -* -mevexwig= option, x86-64: i386-Options. (line 102) -* -mf option, far-mode: TIC54X-Opts. (line 8) -* -mf11: PDP-11-Options. (line 122) -* -mfar-mode option, far-mode: TIC54X-Opts. (line 8) -* -mfdpic command line option, Blackfin: Blackfin Options. (line 19) -* -mfis: PDP-11-Options. (line 51) -* -mfloat-abi= command line option, ARM: ARM Options. (line 152) -* -mfp-11: PDP-11-Options. (line 56) -* -mfpp: PDP-11-Options. (line 56) -* -mfpu: PDP-11-Options. (line 56) -* -mfpu= command line option, ARM: ARM Options. (line 82) -* -mgcc-abi: RX-Opts. (line 63) -* -mgcc-abi command line option, V850: V850 Options. (line 79) -* -micache-enabled command line option, LM32: LM32 Options. (line 21) -* -mimplicit-it command line option, ARM: ARM Options. (line 113) -* -mint-register: RX-Opts. (line 57) -* -mip2022 option, IP2K: IP2K-Opts. (line 14) -* -mip2022ext option, IP2022: IP2K-Opts. (line 9) -* -mj11: PDP-11-Options. (line 126) -* -mka11: PDP-11-Options. (line 92) -* -mkb11: PDP-11-Options. (line 95) -* -mkd11a: PDP-11-Options. (line 98) -* -mkd11b: PDP-11-Options. (line 101) -* -mkd11d: PDP-11-Options. (line 104) -* -mkd11e: PDP-11-Options. (line 107) -* -mkd11f: PDP-11-Options. (line 110) -* -mkd11h: PDP-11-Options. (line 110) -* -mkd11k: PDP-11-Options. (line 114) -* -mkd11q: PDP-11-Options. (line 110) -* -mkd11z: PDP-11-Options. (line 118) -* -mkev11: PDP-11-Options. (line 51) -* -mlimited-eis: PDP-11-Options. (line 64) -* -mlittle-endian: RX-Opts. (line 26) -* -mlong <1>: XGATE-Opts. (line 13) -* -mlong: M68HC11-Opts. (line 45) -* -mlong-double <1>: XGATE-Opts. (line 21) -* -mlong-double: M68HC11-Opts. (line 53) -* -mm9s12x: M68HC11-Opts. (line 27) -* -mm9s12xg: M68HC11-Opts. (line 32) -* -mmcu= command line option, AVR: AVR Options. (line 6) -* -mmfpt: PDP-11-Options. (line 70) -* -mmicrocode: PDP-11-Options. (line 83) -* -mmnemonic= option, i386: i386-Options. (line 109) -* -mmnemonic= option, x86-64: i386-Options. (line 109) -* -mmultiply-enabled command line option, LM32: LM32 Options. (line 6) -* -mmutiproc: PDP-11-Options. (line 73) -* -mmxps: PDP-11-Options. (line 77) -* -mnaked-reg option, i386: i386-Options. (line 121) -* -mnaked-reg option, x86-64: i386-Options. (line 121) -* -mnan= command line option, MIPS: MIPS Options. (line 339) -* -mno-cis: PDP-11-Options. (line 32) -* -mno-csm: PDP-11-Options. (line 43) -* -mno-dsbt command line option, TIC6X: TIC6X Options. (line 13) -* -mno-eis: PDP-11-Options. (line 46) -* -mno-extensions: PDP-11-Options. (line 29) -* -mno-fdpic command line option, Blackfin: Blackfin Options. (line 22) -* -mno-fis: PDP-11-Options. (line 51) -* -mno-fp-11: PDP-11-Options. (line 56) -* -mno-fpp: PDP-11-Options. (line 56) -* -mno-fpu: PDP-11-Options. (line 56) -* -mno-kev11: PDP-11-Options. (line 51) -* -mno-limited-eis: PDP-11-Options. (line 64) -* -mno-mfpt: PDP-11-Options. (line 70) -* -mno-microcode: PDP-11-Options. (line 83) -* -mno-mutiproc: PDP-11-Options. (line 73) -* -mno-mxps: PDP-11-Options. (line 77) -* -mno-pic: PDP-11-Options. (line 11) -* -mno-pic command line option, TIC6X: TIC6X Options. (line 36) -* -mno-regnames option, s390: s390 Options. (line 35) -* -mno-skip-bug command line option, AVR: AVR Options. (line 112) -* -mno-spl: PDP-11-Options. (line 80) -* -mno-sym32: MIPS Options. (line 280) + (line 13) +* -merrors-to-file option, stderr redirect: TIC54X-Opts. (line 20) +* -mesa option, s390: s390 Options. (line 17) +* -mevexlig= option, i386: i386-Options. (line 100) +* -mevexlig= option, x86-64: i386-Options. (line 100) +* -mevexrcig= option, i386: i386-Options. (line 180) +* -mevexrcig= option, x86-64: i386-Options. (line 180) +* -mevexwig= option, i386: i386-Options. (line 110) +* -mevexwig= option, x86-64: i386-Options. (line 110) +* -mf option, far-mode: TIC54X-Opts. (line 8) +* -mf11: PDP-11-Options. (line 122) +* -mfar-mode option, far-mode: TIC54X-Opts. (line 8) +* -mfdpic command line option, Blackfin: Blackfin Options. (line 19) +* -mfence-as-lock-add= option, i386: i386-Options. (line 161) +* -mfence-as-lock-add= option, x86-64: i386-Options. (line 161) +* -mfis: PDP-11-Options. (line 51) +* -mfloat-abi= command line option, ARM: ARM Options. (line 161) +* -mfp-11: PDP-11-Options. (line 56) +* -mfpp: PDP-11-Options. (line 56) +* -mfpu: PDP-11-Options. (line 56) +* -mfpu= command line option, ARM: ARM Options. (line 90) +* -mfpuda command line option, ARC: ARC Options. (line 112) +* -mgcc-abi: RX-Opts. (line 63) +* -mgcc-abi command line option, V850: V850 Options. (line 79) +* -mhard-float command line option, V850: V850 Options. (line 101) +* -micache-enabled command line option, LM32: LM32 Options. (line 21) +* -mimplicit-it command line option, ARM: ARM Options. (line 122) +* -mint-register: RX-Opts. (line 57) +* -mintel64 option, x86-64: i386-Options. (line 190) +* -mip2022 option, IP2K: IP2K-Opts. (line 14) +* -mip2022ext option, IP2022: IP2K-Opts. (line 9) +* -mj11: PDP-11-Options. (line 126) +* -mka11: PDP-11-Options. (line 92) +* -mkb11: PDP-11-Options. (line 95) +* -mkd11a: PDP-11-Options. (line 98) +* -mkd11b: PDP-11-Options. (line 101) +* -mkd11d: PDP-11-Options. (line 104) +* -mkd11e: PDP-11-Options. (line 107) +* -mkd11f: PDP-11-Options. (line 110) +* -mkd11h: PDP-11-Options. (line 110) +* -mkd11k: PDP-11-Options. (line 114) +* -mkd11q: PDP-11-Options. (line 110) +* -mkd11z: PDP-11-Options. (line 118) +* -mkev11: PDP-11-Options. (line 51) +* -mlimited-eis: PDP-11-Options. (line 64) +* -mlink-relax command line option, AVR: AVR Options. (line 121) +* -mlittle-endian: RX-Opts. (line 26) +* -mlong <1>: M68HC11-Opts. (line 45) +* -mlong: XGATE-Opts. (line 13) +* -mlong-double <1>: XGATE-Opts. (line 21) +* -mlong-double: M68HC11-Opts. (line 53) +* -mm9s12x: M68HC11-Opts. (line 27) +* -mm9s12xg: M68HC11-Opts. (line 32) +* -mmcu= command line option, AVR: AVR Options. (line 6) +* -mmfpt: PDP-11-Options. (line 70) +* -mmicrocode: PDP-11-Options. (line 83) +* -mmnemonic= option, i386: i386-Options. (line 117) +* -mmnemonic= option, x86-64: i386-Options. (line 117) +* -mmultiply-enabled command line option, LM32: LM32 Options. + (line 6) +* -mmutiproc: PDP-11-Options. (line 73) +* -mmxps: PDP-11-Options. (line 77) +* -mnaked-reg option, i386: i386-Options. (line 129) +* -mnaked-reg option, x86-64: i386-Options. (line 129) +* -mnan= command line option, MIPS: MIPS Options. (line 380) +* -mno-allow-string-insns: RX-Opts. (line 82) +* -mno-cis: PDP-11-Options. (line 32) +* -mno-csm: PDP-11-Options. (line 43) +* -mno-dsbt command line option, TIC6X: TIC6X Options. (line 13) +* -mno-eis: PDP-11-Options. (line 46) +* -mno-extensions: PDP-11-Options. (line 29) +* -mno-fdpic command line option, Blackfin: Blackfin Options. + (line 22) +* -mno-fis: PDP-11-Options. (line 51) +* -mno-fp-11: PDP-11-Options. (line 56) +* -mno-fpp: PDP-11-Options. (line 56) +* -mno-fpu: PDP-11-Options. (line 56) +* -mno-kev11: PDP-11-Options. (line 51) +* -mno-limited-eis: PDP-11-Options. (line 64) +* -mno-link-relax command line option, AVR: AVR Options. (line 125) +* -mno-mfpt: PDP-11-Options. (line 70) +* -mno-microcode: PDP-11-Options. (line 83) +* -mno-mutiproc: PDP-11-Options. (line 73) +* -mno-mxps: PDP-11-Options. (line 77) +* -mno-pic: PDP-11-Options. (line 11) +* -mno-pic command line option, TIC6X: TIC6X Options. (line 36) +* -mno-regnames option, s390: s390 Options. (line 50) +* -mno-skip-bug command line option, AVR: AVR Options. (line 112) +* -mno-spl: PDP-11-Options. (line 80) +* -mno-sym32: MIPS Options. (line 288) * -mno-verbose-error command line option, AArch64: AArch64 Options. - (line 57) -* -mno-wrap command line option, AVR: AVR Options. (line 115) -* -mnopic command line option, Blackfin: Blackfin Options. (line 22) -* -momit-lock-prefix= option, i386: i386-Options. (line 135) -* -momit-lock-prefix= option, x86-64: i386-Options. (line 135) -* -mpic: PDP-11-Options. (line 11) -* -mpic command line option, TIC6X: TIC6X Options. (line 36) -* -mpid: RX-Opts. (line 50) -* -mpid= command line option, TIC6X: TIC6X Options. (line 23) -* -mregnames option, s390: s390 Options. (line 32) -* -mrelax command line option, V850: V850 Options. (line 72) -* -mrh850-abi command line option, V850: V850 Options. (line 82) -* -mrmw command line option, AVR: AVR Options. (line 118) -* -mrx-abi: RX-Opts. (line 69) -* -mshort <1>: XGATE-Opts. (line 8) -* -mshort: M68HC11-Opts. (line 40) -* -mshort-double <1>: M68HC11-Opts. (line 49) -* -mshort-double: XGATE-Opts. (line 17) + (line 59) +* -mno-wrap command line option, AVR: AVR Options. (line 115) +* -mnopic command line option, Blackfin: Blackfin Options. (line 22) +* -mnps400 command line option, ARC: ARC Options. (line 103) +* -momit-lock-prefix= option, i386: i386-Options. (line 152) +* -momit-lock-prefix= option, x86-64: i386-Options. (line 152) +* -mpic: PDP-11-Options. (line 11) +* -mpic command line option, TIC6X: TIC6X Options. (line 36) +* -mpid: RX-Opts. (line 50) +* -mpid= command line option, TIC6X: TIC6X Options. (line 23) +* -mregnames option, s390: s390 Options. (line 47) +* -mrelax command line option, ARC: ARC Options. (line 98) +* -mrelax command line option, V850: V850 Options. (line 72) +* -mrelax-relocations= option, i386: i386-Options. (line 170) +* -mrelax-relocations= option, x86-64: i386-Options. (line 170) +* -mrh850-abi command line option, V850: V850 Options. (line 82) +* -mrmw command line option, AVR: AVR Options. (line 118) +* -mrx-abi: RX-Opts. (line 69) +* -mshared option, i386: i386-Options. (line 139) +* -mshared option, x86-64: i386-Options. (line 139) +* -mshort <1>: M68HC11-Opts. (line 40) +* -mshort: XGATE-Opts. (line 8) +* -mshort-double <1>: M68HC11-Opts. (line 49) +* -mshort-double: XGATE-Opts. (line 17) * -msign-extend-enabled command line option, LM32: LM32 Options. - (line 15) -* -msmall-data-limit: RX-Opts. (line 42) -* -mspl: PDP-11-Options. (line 80) -* -msse-check= option, i386: i386-Options. (line 74) -* -msse-check= option, x86-64: i386-Options. (line 74) -* -msse2avx option, i386: i386-Options. (line 70) -* -msse2avx option, x86-64: i386-Options. (line 70) -* -msym32: MIPS Options. (line 280) -* -msyntax= option, i386: i386-Options. (line 115) -* -msyntax= option, x86-64: i386-Options. (line 115) -* -mt11: PDP-11-Options. (line 130) -* -mthumb command line option, ARM: ARM Options. (line 104) -* -mthumb-interwork command line option, ARM: ARM Options. (line 109) -* -mtune= option, i386: i386-Options. (line 62) -* -mtune= option, x86-64: i386-Options. (line 62) -* -muse-conventional-section-names: RX-Opts. (line 33) -* -muse-renesas-section-names: RX-Opts. (line 37) -* -muser-enabled command line option, LM32: LM32 Options. (line 18) -* -mv850 command line option, V850: V850 Options. (line 23) -* -mv850any command line option, V850: V850 Options. (line 41) -* -mv850e command line option, V850: V850 Options. (line 29) -* -mv850e1 command line option, V850: V850 Options. (line 35) -* -mv850e2 command line option, V850: V850 Options. (line 51) -* -mv850e2v3 command line option, V850: V850 Options. (line 57) -* -mv850e2v4 command line option, V850: V850 Options. (line 63) -* -mv850e3v5 command line option, V850: V850 Options. (line 66) + (line 15) +* -msmall-data-limit: RX-Opts. (line 42) +* -msoft-float command line option, V850: V850 Options. (line 95) +* -mspfp command line option, ARC: ARC Options. (line 106) +* -mspl: PDP-11-Options. (line 80) +* -msse-check= option, i386: i386-Options. (line 82) +* -msse-check= option, x86-64: i386-Options. (line 82) +* -msse2avx option, i386: i386-Options. (line 78) +* -msse2avx option, x86-64: i386-Options. (line 78) +* -msym32: MIPS Options. (line 288) +* -msyntax= option, i386: i386-Options. (line 123) +* -msyntax= option, x86-64: i386-Options. (line 123) +* -mt11: PDP-11-Options. (line 130) +* -mthumb command line option, ARM: ARM Options. (line 113) +* -mthumb-interwork command line option, ARM: ARM Options. (line 118) +* -mtune= option, i386: i386-Options. (line 70) +* -mtune= option, x86-64: i386-Options. (line 70) +* -mtune=ARCH command line option, Visium: Visium Options. (line 8) +* -muse-conventional-section-names: RX-Opts. (line 33) +* -muse-renesas-section-names: RX-Opts. (line 37) +* -muser-enabled command line option, LM32: LM32 Options. (line 18) +* -mv850 command line option, V850: V850 Options. (line 23) +* -mv850any command line option, V850: V850 Options. (line 41) +* -mv850e command line option, V850: V850 Options. (line 29) +* -mv850e1 command line option, V850: V850 Options. (line 35) +* -mv850e2 command line option, V850: V850 Options. (line 51) +* -mv850e2v3 command line option, V850: V850 Options. (line 57) +* -mv850e2v4 command line option, V850: V850 Options. (line 63) +* -mv850e3v5 command line option, V850: V850 Options. (line 66) * -mverbose-error command line option, AArch64: AArch64 Options. - (line 53) -* -mvxworks-pic option, MIPS: MIPS Options. (line 26) -* -mwarn-areg-zero option, s390: s390 Options. (line 38) -* -mwarn-deprecated command line option, ARM: ARM Options. (line 178) -* -mzarch option, s390: s390 Options. (line 17) -* -N command line option, CRIS: CRIS-Opts. (line 58) -* -nIp option, M32RX: M32R-Opts. (line 101) -* -no-bitinst, M32R2: M32R-Opts. (line 54) -* -no-ignore-parallel-conflicts option, M32RX: M32R-Opts. (line 93) -* -no-mdebug command line option, Alpha: Alpha Options. (line 25) -* -no-parallel option, M32RX: M32R-Opts. (line 51) -* -no-relax option, i960: Options-i960. (line 66) + (line 55) +* -mvxworks-pic option, MIPS: MIPS Options. (line 26) +* -mwarn-areg-zero option, s390: s390 Options. (line 53) +* -mwarn-deprecated command line option, ARM: ARM Options. (line 194) +* -mwarn-syms command line option, ARM: ARM Options. (line 202) +* -mzarch option, s390: s390 Options. (line 17) +* -N command line option, CRIS: CRIS-Opts. (line 58) +* -nIp option, M32RX: M32R-Opts. (line 101) +* -no-bitinst, M32R2: M32R-Opts. (line 54) +* -no-ignore-parallel-conflicts option, M32RX: M32R-Opts. (line 93) +* -no-mdebug command line option, Alpha: Alpha Options. (line 25) +* -no-parallel option, M32RX: M32R-Opts. (line 51) +* -no-relax option, i960: Options-i960. (line 66) * -no-warn-explicit-parallel-conflicts option, M32RX: M32R-Opts. - (line 79) -* -no-warn-unmatched-high option, M32R: M32R-Opts. (line 111) -* -nocpp ignored (MIPS): MIPS Options. (line 283) -* -noreplace command line option, Alpha: Alpha Options. (line 40) -* -o: o. (line 6) -* -O option, M32RX: M32R-Opts. (line 59) -* -parallel option, M32RX: M32R-Opts. (line 46) -* -R: R. (line 6) -* -r800 command line option, Z80: Z80 Options. (line 41) -* -relax command line option, Alpha: Alpha Options. (line 32) -* -replace command line option, Alpha: Alpha Options. (line 40) -* -S, ignored on VAX: VAX-Opts. (line 11) -* -t, ignored on VAX: VAX-Opts. (line 36) -* -T, ignored on VAX: VAX-Opts. (line 11) -* -v: v. (line 6) -* -V, redundant on VAX: VAX-Opts. (line 22) -* -version: v. (line 6) -* -W: W. (line 11) -* -warn-explicit-parallel-conflicts option, M32RX: M32R-Opts. (line 65) -* -warn-unmatched-high option, M32R: M32R-Opts. (line 105) -* -Wnp option, M32RX: M32R-Opts. (line 83) -* -Wnuh option, M32RX: M32R-Opts. (line 117) -* -Wp option, M32RX: M32R-Opts. (line 75) -* -wsigned_overflow command line option, V850: V850 Options. (line 9) -* -Wuh option, M32RX: M32R-Opts. (line 114) + (line 79) +* -no-warn-unmatched-high option, M32R: M32R-Opts. (line 111) +* -nocpp ignored (MIPS): MIPS Options. (line 291) +* -noreplace command line option, Alpha: Alpha Options. (line 40) +* -o: o. (line 6) +* -O option, M32RX: M32R-Opts. (line 59) +* -parallel option, M32RX: M32R-Opts. (line 46) +* -R: R. (line 6) +* -r800 command line option, Z80: Z80 Options. (line 41) +* -relax command line option, Alpha: Alpha Options. (line 32) +* -replace command line option, Alpha: Alpha Options. (line 40) +* -S, ignored on VAX: VAX-Opts. (line 11) +* -T, ignored on VAX: VAX-Opts. (line 11) +* -t, ignored on VAX: VAX-Opts. (line 36) +* -v: v. (line 6) +* -V, redundant on VAX: VAX-Opts. (line 22) +* -version: v. (line 6) +* -W: W. (line 11) +* -warn-explicit-parallel-conflicts option, M32RX: M32R-Opts. + (line 65) +* -warn-unmatched-high option, M32R: M32R-Opts. (line 105) +* -Wnp option, M32RX: M32R-Opts. (line 83) +* -Wnuh option, M32RX: M32R-Opts. (line 117) +* -Wp option, M32RX: M32R-Opts. (line 75) +* -wsigned_overflow command line option, V850: V850 Options. (line 9) +* -Wuh option, M32RX: M32R-Opts. (line 114) * -wunsigned_overflow command line option, V850: V850 Options. - (line 16) -* -x command line option, MMIX: MMIX-Opts. (line 44) -* -z80 command line option, Z80: Z80 Options. (line 8) -* -z8001 command line option, Z8000: Z8000 Options. (line 6) -* -z8002 command line option, Z8000: Z8000 Options. (line 9) -* . (symbol): Dot. (line 6) -* .2byte directive, ARM: ARM Directives. (line 6) -* .4byte directive, ARM: ARM Directives. (line 6) -* .8byte directive, ARM: ARM Directives. (line 6) -* .align directive, ARM: ARM Directives. (line 11) -* .align directive, TILE-Gx: TILE-Gx Directives. (line 6) -* .align directive, TILEPro: TILEPro Directives. (line 6) + (line 16) +* -x command line option, MMIX: MMIX-Opts. (line 44) +* -z80 command line option, Z80: Z80 Options. (line 8) +* -z8001 command line option, Z8000: Z8000 Options. (line 6) +* -z8002 command line option, Z8000: Z8000 Options. (line 9) +* . (symbol): Dot. (line 6) +* .2byte directive, ARM: ARM Directives. (line 6) +* .4byte directive, ARM: ARM Directives. (line 6) +* .8byte directive, ARM: ARM Directives. (line 6) +* .align directive, ARM: ARM Directives. (line 11) +* .align directive, TILE-Gx: TILE-Gx Directives. (line 6) +* .align directive, TILEPro: TILEPro Directives. (line 6) * .allow_suspicious_bundles directive, TILE-Gx: TILE-Gx Directives. - (line 10) + (line 10) * .allow_suspicious_bundles directive, TILEPro: TILEPro Directives. - (line 10) -* .arch directive, ARM: ARM Directives. (line 18) -* .arch directive, TIC6X: TIC6X Directives. (line 10) -* .arch_extension directive, ARM: ARM Directives. (line 25) -* .arm directive, ARM: ARM Directives. (line 34) -* .big directive, M32RX: M32R-Directives. (line 88) -* .bss directive, AArch64: AArch64 Directives. (line 6) -* .bss directive, ARM: ARM Directives. (line 37) -* .c6xabi_attribute directive, TIC6X: TIC6X Directives. (line 20) -* .cantunwind directive, ARM: ARM Directives. (line 40) -* .cantunwind directive, TIC6X: TIC6X Directives. (line 13) -* .code directive, ARM: ARM Directives. (line 44) -* .cpu directive, ARM: ARM Directives. (line 48) -* .dn and .qn directives, ARM: ARM Directives. (line 55) -* .eabi_attribute directive, ARM: ARM Directives. (line 78) -* .ehtype directive, TIC6X: TIC6X Directives. (line 31) -* .endp directive, TIC6X: TIC6X Directives. (line 34) -* .even directive, ARM: ARM Directives. (line 106) -* .extend directive, ARM: ARM Directives. (line 109) -* .fnend directive, ARM: ARM Directives. (line 115) -* .fnstart directive, ARM: ARM Directives. (line 124) -* .force_thumb directive, ARM: ARM Directives. (line 127) -* .fpu directive, ARM: ARM Directives. (line 131) -* .global: MIPS insn. (line 12) -* .gnu_attribute 4, N directive, MIPS: MIPS FP ABI History. (line 6) + (line 10) +* .arch directive, AArch64: AArch64 Directives. (line 6) +* .arch directive, ARM: ARM Directives. (line 18) +* .arch directive, TIC6X: TIC6X Directives. (line 10) +* .arch_extension directive, AArch64: AArch64 Directives. (line 13) +* .arch_extension directive, ARM: ARM Directives. (line 25) +* .arm directive, ARM: ARM Directives. (line 34) +* .big directive, M32RX: M32R-Directives. (line 88) +* .bss directive, AArch64: AArch64 Directives. (line 22) +* .bss directive, ARM: ARM Directives. (line 37) +* .c6xabi_attribute directive, TIC6X: TIC6X Directives. (line 20) +* .cantunwind directive, ARM: ARM Directives. (line 40) +* .cantunwind directive, TIC6X: TIC6X Directives. (line 13) +* .code directive, ARM: ARM Directives. (line 44) +* .cpu directive, AArch64: AArch64 Directives. (line 25) +* .cpu directive, ARM: ARM Directives. (line 48) +* .dn and .qn directives, ARM: ARM Directives. (line 55) +* .dword directive, AArch64: AArch64 Directives. (line 29) +* .eabi_attribute directive, ARM: ARM Directives. (line 78) +* .ehtype directive, TIC6X: TIC6X Directives. (line 31) +* .endp directive, TIC6X: TIC6X Directives. (line 34) +* .even directive, AArch64: AArch64 Directives. (line 32) +* .even directive, ARM: ARM Directives. (line 106) +* .extend directive, ARM: ARM Directives. (line 109) +* .fnend directive, ARM: ARM Directives. (line 115) +* .fnstart directive, ARM: ARM Directives. (line 124) +* .force_thumb directive, ARM: ARM Directives. (line 127) +* .fpu directive, ARM: ARM Directives. (line 131) +* .global: MIPS insn. (line 12) +* .gnu_attribute 4, N directive, MIPS: MIPS FP ABI History. + (line 6) * .gnu_attribute Tag_GNU_MIPS_ABI_FP, N directive, MIPS: MIPS FP ABI History. - (line 6) -* .handlerdata directive, ARM: ARM Directives. (line 135) -* .handlerdata directive, TIC6X: TIC6X Directives. (line 39) -* .insn: MIPS insn. (line 6) -* .insn directive, s390: s390 Directives. (line 11) -* .inst directive, ARM: ARM Directives. (line 144) -* .ldouble directive, ARM: ARM Directives. (line 109) -* .little directive, M32RX: M32R-Directives. (line 82) -* .long directive, s390: s390 Directives. (line 16) -* .ltorg directive, AArch64: AArch64 Directives. (line 9) -* .ltorg directive, ARM: ARM Directives. (line 154) -* .ltorg directive, s390: s390 Directives. (line 88) -* .m32r directive, M32R: M32R-Directives. (line 66) -* .m32r2 directive, M32R2: M32R-Directives. (line 77) -* .m32rx directive, M32RX: M32R-Directives. (line 72) -* .machine directive, s390: s390 Directives. (line 93) -* .machinemode directive, s390: s390 Directives. (line 103) + (line 6) +* .handlerdata directive, ARM: ARM Directives. (line 135) +* .handlerdata directive, TIC6X: TIC6X Directives. (line 39) +* .insn: MIPS insn. (line 6) +* .insn directive, s390: s390 Directives. (line 11) +* .inst directive, AArch64: AArch64 Directives. (line 36) +* .inst directive, ARM: ARM Directives. (line 144) +* .ldouble directive, ARM: ARM Directives. (line 109) +* .little directive, M32RX: M32R-Directives. (line 82) +* .long directive, s390: s390 Directives. (line 16) +* .ltorg directive, AArch64: AArch64 Directives. (line 40) +* .ltorg directive, ARM: ARM Directives. (line 154) +* .ltorg directive, s390: s390 Directives. (line 88) +* .m32r directive, M32R: M32R-Directives. (line 66) +* .m32r2 directive, M32R2: M32R-Directives. (line 77) +* .m32rx directive, M32RX: M32R-Directives. (line 72) +* .machine directive, s390: s390 Directives. (line 93) +* .machinemode directive, s390: s390 Directives. (line 109) * .module: MIPS assembly options. - (line 6) + (line 6) * .module fp=NN directive, MIPS: MIPS FP ABI Selection. - (line 6) -* .movsp directive, ARM: ARM Directives. (line 168) -* .nan directive, MIPS: MIPS NaN Encodings. (line 6) + (line 6) +* .movsp directive, ARM: ARM Directives. (line 168) +* .nan directive, MIPS: MIPS NaN Encodings. (line 6) * .no_pointers directive, XStormy16: XStormy16 Directives. - (line 14) -* .nocmp directive, TIC6X: TIC6X Directives. (line 47) -* .o: Object. (line 6) -* .object_arch directive, ARM: ARM Directives. (line 173) -* .packed directive, ARM: ARM Directives. (line 179) -* .pad directive, ARM: ARM Directives. (line 184) -* .param on HPPA: HPPA Directives. (line 19) -* .personality directive, ARM: ARM Directives. (line 189) -* .personality directive, TIC6X: TIC6X Directives. (line 55) -* .personalityindex directive, ARM: ARM Directives. (line 192) -* .personalityindex directive, TIC6X: TIC6X Directives. (line 51) -* .pool directive, AArch64: AArch64 Directives. (line 23) -* .pool directive, ARM: ARM Directives. (line 196) -* .quad directive, s390: s390 Directives. (line 16) -* .req directive, AArch64: AArch64 Directives. (line 26) -* .req directive, ARM: ARM Directives. (line 199) + (line 14) +* .nocmp directive, TIC6X: TIC6X Directives. (line 47) +* .o: Object. (line 6) +* .object_arch directive, ARM: ARM Directives. (line 173) +* .packed directive, ARM: ARM Directives. (line 179) +* .pad directive, ARM: ARM Directives. (line 184) +* .param on HPPA: HPPA Directives. (line 19) +* .personality directive, ARM: ARM Directives. (line 189) +* .personality directive, TIC6X: TIC6X Directives. (line 55) +* .personalityindex directive, ARM: ARM Directives. (line 192) +* .personalityindex directive, TIC6X: TIC6X Directives. (line 51) +* .pool directive, AArch64: AArch64 Directives. (line 54) +* .pool directive, ARM: ARM Directives. (line 196) +* .quad directive, s390: s390 Directives. (line 16) +* .req directive, AArch64: AArch64 Directives. (line 57) +* .req directive, ARM: ARM Directives. (line 199) * .require_canonical_reg_names directive, TILE-Gx: TILE-Gx Directives. - (line 19) + (line 19) * .require_canonical_reg_names directive, TILEPro: TILEPro Directives. - (line 19) -* .save directive, ARM: ARM Directives. (line 204) -* .scomm directive, TIC6X: TIC6X Directives. (line 58) -* .secrel32 directive, ARM: ARM Directives. (line 242) -* .set arch=CPU: MIPS ISA. (line 19) -* .set at: MIPS Macros. (line 42) -* .set at=REG: MIPS Macros. (line 36) -* .set autoextend: MIPS autoextend. (line 6) -* .set doublefloat: MIPS Floating-Point. (line 12) + (line 19) +* .save directive, ARM: ARM Directives. (line 204) +* .scomm directive, TIC6X: TIC6X Directives. (line 58) +* .secrel32 directive, ARM: ARM Directives. (line 242) +* .set arch=CPU: MIPS ISA. (line 19) +* .set at: MIPS Macros. (line 42) +* .set at=REG: MIPS Macros. (line 36) +* .set autoextend: MIPS autoextend. (line 6) +* .set doublefloat: MIPS Floating-Point. + (line 12) * .set dsp: MIPS ASE Instruction Generation Overrides. - (line 21) + (line 21) * .set dspr2: MIPS ASE Instruction Generation Overrides. - (line 26) -* .set hardfloat: MIPS Floating-Point. (line 6) + (line 26) +* .set dspr3: MIPS ASE Instruction Generation Overrides. + (line 32) +* .set hardfloat: MIPS Floating-Point. + (line 6) * .set insn32: MIPS assembly options. - (line 18) -* .set macro: MIPS Macros. (line 31) + (line 18) +* .set macro: MIPS Macros. (line 31) * .set mcu: MIPS ASE Instruction Generation Overrides. - (line 37) + (line 43) * .set mdmx: MIPS ASE Instruction Generation Overrides. - (line 16) + (line 16) * .set mips3d: MIPS ASE Instruction Generation Overrides. - (line 6) -* .set mipsN: MIPS ISA. (line 6) + (line 6) +* .set mipsN: MIPS ISA. (line 6) * .set msa: MIPS ASE Instruction Generation Overrides. - (line 42) + (line 48) * .set mt: MIPS ASE Instruction Generation Overrides. - (line 32) -* .set noat: MIPS Macros. (line 42) -* .set noautoextend: MIPS autoextend. (line 6) + (line 38) +* .set noat: MIPS Macros. (line 42) +* .set noautoextend: MIPS autoextend. (line 6) * .set nodsp: MIPS ASE Instruction Generation Overrides. - (line 21) + (line 21) * .set nodspr2: MIPS ASE Instruction Generation Overrides. - (line 26) + (line 26) +* .set nodspr3: MIPS ASE Instruction Generation Overrides. + (line 32) * .set noinsn32: MIPS assembly options. - (line 18) -* .set nomacro: MIPS Macros. (line 31) + (line 18) +* .set nomacro: MIPS Macros. (line 31) * .set nomcu: MIPS ASE Instruction Generation Overrides. - (line 37) + (line 43) * .set nomdmx: MIPS ASE Instruction Generation Overrides. - (line 16) + (line 16) * .set nomips3d: MIPS ASE Instruction Generation Overrides. - (line 6) + (line 6) * .set nomsa: MIPS ASE Instruction Generation Overrides. - (line 42) + (line 48) * .set nomt: MIPS ASE Instruction Generation Overrides. - (line 32) + (line 38) * .set nosmartmips: MIPS ASE Instruction Generation Overrides. - (line 11) -* .set nosym32: MIPS Symbol Sizes. (line 6) + (line 11) +* .set nosym32: MIPS Symbol Sizes. (line 6) * .set novirt: MIPS ASE Instruction Generation Overrides. - (line 47) + (line 53) * .set noxpa: MIPS ASE Instruction Generation Overrides. - (line 52) -* .set pop: MIPS Option Stack. (line 6) -* .set push: MIPS Option Stack. (line 6) -* .set singlefloat: MIPS Floating-Point. (line 12) + (line 58) +* .set pop: MIPS Option Stack. (line 6) +* .set push: MIPS Option Stack. (line 6) +* .set singlefloat: MIPS Floating-Point. + (line 12) * .set smartmips: MIPS ASE Instruction Generation Overrides. - (line 11) -* .set softfloat: MIPS Floating-Point. (line 6) -* .set sym32: MIPS Symbol Sizes. (line 6) + (line 11) +* .set softfloat: MIPS Floating-Point. + (line 6) +* .set sym32: MIPS Symbol Sizes. (line 6) * .set virt: MIPS ASE Instruction Generation Overrides. - (line 47) + (line 53) * .set xpa: MIPS ASE Instruction Generation Overrides. - (line 52) -* .setfp directive, ARM: ARM Directives. (line 228) -* .short directive, s390: s390 Directives. (line 16) -* .syntax directive, ARM: ARM Directives. (line 247) -* .thumb directive, ARM: ARM Directives. (line 251) -* .thumb_func directive, ARM: ARM Directives. (line 254) -* .thumb_set directive, ARM: ARM Directives. (line 265) -* .tlsdescseq directive, ARM: ARM Directives. (line 272) -* .unreq directive, AArch64: AArch64 Directives. (line 31) -* .unreq directive, ARM: ARM Directives. (line 277) -* .unwind_raw directive, ARM: ARM Directives. (line 288) -* .v850 directive, V850: V850 Directives. (line 14) -* .v850e directive, V850: V850 Directives. (line 20) -* .v850e1 directive, V850: V850 Directives. (line 26) -* .v850e2 directive, V850: V850 Directives. (line 32) -* .v850e2v3 directive, V850: V850 Directives. (line 38) -* .v850e2v4 directive, V850: V850 Directives. (line 44) -* .v850e3v5 directive, V850: V850 Directives. (line 50) -* .vsave directive, ARM: ARM Directives. (line 295) -* .z8001: Z8000 Directives. (line 11) -* .z8002: Z8000 Directives. (line 15) -* 16-bit code, i386: i386-16bit. (line 6) + (line 58) +* .setfp directive, ARM: ARM Directives. (line 228) +* .short directive, s390: s390 Directives. (line 16) +* .syntax directive, ARM: ARM Directives. (line 247) +* .thumb directive, ARM: ARM Directives. (line 251) +* .thumb_func directive, ARM: ARM Directives. (line 254) +* .thumb_set directive, ARM: ARM Directives. (line 265) +* .tlsdescadd directive, AArch64: AArch64 Directives. (line 62) +* .tlsdesccall directive, AArch64: AArch64 Directives. (line 65) +* .tlsdescldr directive, AArch64: AArch64 Directives. (line 68) +* .tlsdescseq directive, ARM: ARM Directives. (line 272) +* .unreq directive, AArch64: AArch64 Directives. (line 71) +* .unreq directive, ARM: ARM Directives. (line 277) +* .unwind_raw directive, ARM: ARM Directives. (line 288) +* .v850 directive, V850: V850 Directives. (line 14) +* .v850e directive, V850: V850 Directives. (line 20) +* .v850e1 directive, V850: V850 Directives. (line 26) +* .v850e2 directive, V850: V850 Directives. (line 32) +* .v850e2v3 directive, V850: V850 Directives. (line 38) +* .v850e2v4 directive, V850: V850 Directives. (line 44) +* .v850e3v5 directive, V850: V850 Directives. (line 50) +* .vsave directive, ARM: ARM Directives. (line 295) +* .xword directive, AArch64: AArch64 Directives. (line 82) +* .z8001: Z8000 Directives. (line 11) +* .z8002: Z8000 Directives. (line 15) +* 16-bit code, i386: i386-16bit. (line 6) * 16bit_pointers directive, XStormy16: XStormy16 Directives. - (line 6) -* 16byte directive, Nios II: Nios II Directives. (line 28) -* 2byte directive, ARC: ARC Directives. (line 9) -* 2byte directive, Nios II: Nios II Directives. (line 19) + (line 6) +* 16byte directive, Nios II: Nios II Directives. (line 28) +* 2byte directive, Nios II: Nios II Directives. (line 19) * 32bit_pointers directive, XStormy16: XStormy16 Directives. - (line 10) -* 3byte directive, ARC: ARC Directives. (line 12) -* 3DNow!, i386: i386-SIMD. (line 6) -* 3DNow!, x86-64: i386-SIMD. (line 6) -* 430 support: MSP430-Dependent. (line 6) -* 4byte directive, ARC: ARC Directives. (line 15) -* 4byte directive, Nios II: Nios II Directives. (line 22) -* 8byte directive, Nios II: Nios II Directives. (line 25) -* : (label): Statements. (line 31) -* @hi pseudo-op, XStormy16: XStormy16 Opcodes. (line 21) -* @lo pseudo-op, XStormy16: XStormy16 Opcodes. (line 10) -* @word modifier, D10V: D10V-Word. (line 6) -* \" (doublequote character): Strings. (line 43) -* \\ (\ character): Strings. (line 40) -* \b (backspace character): Strings. (line 15) -* \DDD (octal character code): Strings. (line 30) -* \f (formfeed character): Strings. (line 18) -* \n (newline character): Strings. (line 21) -* \r (carriage return character): Strings. (line 24) -* \t (tab): Strings. (line 27) -* \XD... (hex character code): Strings. (line 36) -* _ opcode prefix: Xtensa Opcodes. (line 9) -* a.out: Object. (line 6) -* a.out symbol attributes: a.out Symbols. (line 6) -* A_DIR environment variable, TIC54X: TIC54X-Env. (line 6) + (line 10) +* 3DNow!, i386: i386-SIMD. (line 6) +* 3DNow!, x86-64: i386-SIMD. (line 6) +* 430 support: MSP430-Dependent. (line 6) +* 4byte directive, Nios II: Nios II Directives. (line 22) +* 8byte directive, Nios II: Nios II Directives. (line 25) +* : (label): Statements. (line 31) +* @gotoff(SYMBOL), ARC modifier: ARC Modifiers. (line 20) +* @gotpc(SYMBOL), ARC modifier: ARC Modifiers. (line 16) +* @hi pseudo-op, XStormy16: XStormy16 Opcodes. (line 21) +* @lo pseudo-op, XStormy16: XStormy16 Opcodes. (line 10) +* @pcl(SYMBOL), ARC modifier: ARC Modifiers. (line 12) +* @plt(SYMBOL), ARC modifier: ARC Modifiers. (line 23) +* @sda(SYMBOL), ARC modifier: ARC Modifiers. (line 28) +* @word modifier, D10V: D10V-Word. (line 6) +* _ opcode prefix: Xtensa Opcodes. (line 9) +* __DYNAMIC__, ARC pre-defined symbol: ARC Symbols. (line 14) +* __GLOBAL_OFFSET_TABLE__, ARC pre-defined symbol: ARC Symbols. + (line 11) +* a.out: Object. (line 6) +* a.out symbol attributes: a.out Symbols. (line 6) +* A_DIR environment variable, TIC54X: TIC54X-Env. (line 6) * AArch64 floating point (IEEE): AArch64 Floating Point. - (line 6) -* AArch64 immediate character: AArch64-Chars. (line 13) -* AArch64 line comment character: AArch64-Chars. (line 6) -* AArch64 line separator: AArch64-Chars. (line 10) -* AArch64 machine directives: AArch64 Directives. (line 6) -* AArch64 opcodes: AArch64 Opcodes. (line 6) -* AArch64 options (none): AArch64 Options. (line 6) -* AArch64 register names: AArch64-Regs. (line 6) -* AArch64 relocations: AArch64-Relocations. (line 6) -* AArch64 support: AArch64-Dependent. (line 6) -* ABI options, SH64: SH64 Options. (line 29) -* abort directive: Abort. (line 6) -* ABORT directive: ABORT (COFF). (line 6) -* absolute section: Ld Sections. (line 29) + (line 6) +* AArch64 immediate character: AArch64-Chars. (line 13) +* AArch64 line comment character: AArch64-Chars. (line 6) +* AArch64 line separator: AArch64-Chars. (line 10) +* AArch64 machine directives: AArch64 Directives. (line 6) +* AArch64 opcodes: AArch64 Opcodes. (line 6) +* AArch64 options (none): AArch64 Options. (line 6) +* AArch64 register names: AArch64-Regs. (line 6) +* AArch64 relocations: AArch64-Relocations. + (line 6) +* AArch64 support: AArch64-Dependent. (line 6) +* ABI options, SH64: SH64 Options. (line 29) +* abort directive: Abort. (line 6) +* ABORT directive: ABORT (COFF). (line 6) +* absolute section: Ld Sections. (line 29) * absolute-literals directive: Absolute Literals Directive. - (line 6) + (line 6) * ADDI instructions, relaxation: Xtensa Immediate Relaxation. - (line 43) -* addition, permitted arguments: Infix Ops. (line 44) -* addresses: Expressions. (line 6) -* addresses, format of: Secs Background. (line 68) -* addressing modes, D10V: D10V-Addressing. (line 6) -* addressing modes, D30V: D30V-Addressing. (line 6) -* addressing modes, H8/300: H8/300-Addressing. (line 6) -* addressing modes, M680x0: M68K-Syntax. (line 21) -* addressing modes, M68HC11: M68HC11-Syntax. (line 30) -* addressing modes, SH: SH-Addressing. (line 6) -* addressing modes, SH64: SH64-Addressing. (line 6) -* addressing modes, XGATE: XGATE-Syntax. (line 29) -* addressing modes, Z8000: Z8000-Addressing. (line 6) -* ADR reg,