1 Index: libgomp/ChangeLog
2 ===================================================================
3 --- libgomp/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185750)
4 +++ libgomp/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185750)
6 +2012-03-22 Jakub Jelinek <jakub@redhat.com>
9 + * testsuite/libgomp.c/pr52547.c: New test.
11 2012-03-22 Release Manager
14 Index: libgomp/testsuite/libgomp.c/pr52547.c
15 ===================================================================
16 --- libgomp/testsuite/libgomp.c/pr52547.c (.../tags/gcc_4_7_0_release) (wersja 0)
17 +++ libgomp/testsuite/libgomp.c/pr52547.c (.../branches/gcc-4_7-branch) (wersja 185750)
19 +/* PR middle-end/52547 */
22 +extern void abort (void);
24 +__attribute__((noinline, noclone)) int
25 +baz (int *x, int (*fn) (int *))
30 +__attribute__((noinline, noclone)) int
34 +#pragma omp parallel for reduction(|:e)
35 + for (i = 0; i < x; ++i)
38 + int bar (int *z) { return z - y; }
39 + if (baz (&y[i], bar) != i)
49 + for (i = 0; i < 100; i++)
55 Index: libstdc++-v3/include/Makefile.in
56 ===================================================================
57 --- libstdc++-v3/include/Makefile.in (.../tags/gcc_4_7_0_release) (wersja 185750)
58 +++ libstdc++-v3/include/Makefile.in (.../branches/gcc-4_7-branch) (wersja 185750)
60 sed -e "s,define __GLIBCXX__,define __GLIBCXX__ $$date," \
61 -e "s,define _GLIBCXX_INLINE_VERSION, define _GLIBCXX_INLINE_VERSION $$ns_version," \
62 -e "s,define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY, define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY $$visibility," \
63 - -e "s,define _GLIBCXX_EXTERN_TEMPLATE, define _GLIBCXX_EXTERN_TEMPLATE $$externtemplate," \
64 + -e "s,define _GLIBCXX_EXTERN_TEMPLATE$$, define _GLIBCXX_EXTERN_TEMPLATE $$externtemplate," \
66 < ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
67 sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
68 Index: libstdc++-v3/include/debug/safe_iterator.h
69 ===================================================================
70 --- libstdc++-v3/include/debug/safe_iterator.h (.../tags/gcc_4_7_0_release) (wersja 185750)
71 +++ libstdc++-v3/include/debug/safe_iterator.h (.../branches/gcc-4_7-branch) (wersja 185750)
73 // Safe iterator implementation -*- C++ -*-
75 -// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011
76 +// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011, 2012
77 // Free Software Foundation, Inc.
79 // This file is part of the GNU ISO C++ Library. This library is free
81 ._M_iterator(__x, "other"));
84 +#ifdef __GXX_EXPERIMENTAL_CXX0X__
86 + * @brief Move construction.
87 + * @post __x is singular and unattached
89 + _Safe_iterator(_Safe_iterator&& __x) : _M_current()
91 + _GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
92 + || __x._M_current == _Iterator(),
93 + _M_message(__msg_init_copy_singular)
94 + ._M_iterator(*this, "this")
95 + ._M_iterator(__x, "other"));
96 + std::swap(_M_current, __x._M_current);
97 + this->_M_attach(__x._M_sequence);
103 * @brief Converting constructor from a mutable iterator to a
110 +#ifdef __GXX_EXPERIMENTAL_CXX0X__
112 + * @brief Move assignment.
113 + * @post __x is singular and unattached
116 + operator=(_Safe_iterator&& __x)
118 + _GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
119 + || __x._M_current == _Iterator(),
120 + _M_message(__msg_copy_singular)
121 + ._M_iterator(*this, "this")
122 + ._M_iterator(__x, "other"));
123 + _M_current = __x._M_current;
124 + _M_attach(__x._M_sequence);
126 + __x._M_current = _Iterator();
132 * @brief Iterator dereference.
133 * @pre iterator is dereferenceable
136 /// Is this iterator equal to the sequence's before_begin() iterator if
138 bool _M_is_before_begin() const
139 - { return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence()); }
141 + return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence());
145 template<typename _IteratorL, typename _IteratorR, typename _Sequence>
146 Index: libstdc++-v3/include/std/array
147 ===================================================================
148 --- libstdc++-v3/include/std/array (.../tags/gcc_4_7_0_release) (wersja 185750)
149 +++ libstdc++-v3/include/std/array (.../branches/gcc-4_7-branch) (wersja 185750)
151 // <array> -*- C++ -*-
153 -// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
154 +// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
155 +// Free Software Foundation, Inc.
157 // This file is part of the GNU ISO C++ Library. This library is free
158 // software; you can redistribute it and/or modify it under the
161 at(size_type __n) const
164 - _M_instance[__n] : __throw_out_of_range(__N("array::at"));
166 + std::__throw_out_of_range(__N("array::at"));
167 + return _M_instance[__n];
171 Index: libstdc++-v3/include/bits/forward_list.h
172 ===================================================================
173 --- libstdc++-v3/include/bits/forward_list.h (.../tags/gcc_4_7_0_release) (wersja 185750)
174 +++ libstdc++-v3/include/bits/forward_list.h (.../branches/gcc-4_7-branch) (wersja 185750)
176 // <forward_list.h> -*- C++ -*-
178 -// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
179 +// Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
181 // This file is part of the GNU ISO C++ Library. This library is free
182 // software; you can redistribute it and/or modify it under the
184 * in the range [@a __first,@a __last).
186 * Note that the assignment completely changes the %forward_list and
187 - * that the resulting %forward_list's size is the same as the number
188 - * of elements assigned. Old data may be lost.
189 + * that the number of elements of the resulting %forward_list's is the
190 + * same as the number of elements assigned. Old data is lost.
192 template<typename _InputIterator>
194 @@ -622,10 +622,10 @@
195 * @param __n Number of elements to be assigned.
196 * @param __val Value to be assigned.
198 - * This function fills a %forward_list with @a __n copies of the given
199 - * value. Note that the assignment completely changes the
200 - * %forward_list and that the resulting %forward_list's size is the
201 - * same as the number of elements assigned. Old data may be lost.
202 + * This function fills a %forward_list with @a __n copies of the
203 + * given value. Note that the assignment completely changes the
204 + * %forward_list, and that the resulting %forward_list has __n
205 + * elements. Old data is lost.
208 assign(size_type __n, const _Tp& __val)
210 { return this->_M_impl._M_head._M_next == 0; }
213 - * Returns the largest possible size of %forward_list.
214 + * Returns the largest possible number of elements of %forward_list.
217 max_size() const noexcept
220 * This function will %resize the %forward_list to the specified
221 * number of elements. If the number is smaller than the
222 - * %forward_list's current size the %forward_list is truncated,
223 - * otherwise the %forward_list is extended and the new elements
224 - * are default constructed.
225 + * %forward_list's current number of elements the %forward_list
226 + * is truncated, otherwise the %forward_list is extended and the
227 + * new elements are default constructed.
230 resize(size_type __sz);
231 @@ -1012,9 +1012,9 @@
233 * This function will %resize the %forward_list to the specified
234 * number of elements. If the number is smaller than the
235 - * %forward_list's current size the %forward_list is truncated,
236 - * otherwise the %forward_list is extended and new elements are
237 - * populated with given data.
238 + * %forward_list's current number of elements the %forward_list
239 + * is truncated, otherwise the %forward_list is extended and new
240 + * elements are populated with given data.
243 resize(size_type __sz, const value_type& __val);
244 @@ -1240,11 +1240,11 @@
245 * @brief Forward list equality comparison.
246 * @param __lx A %forward_list
247 * @param __ly A %forward_list of the same type as @a __lx.
248 - * @return True iff the size and elements of the forward lists are equal.
249 + * @return True iff the elements of the forward lists are equal.
251 - * This is an equivalence relation. It is linear in the size of the
252 - * forward lists. Deques are considered equivalent if corresponding
253 - * elements compare equal.
254 + * This is an equivalence relation. It is linear in the number of
255 + * elements of the forward lists. Deques are considered equivalent
256 + * if corresponding elements compare equal.
258 template<typename _Tp, typename _Alloc>
260 @@ -1257,8 +1257,9 @@
261 * @param __ly A %forward_list of the same type as @a __lx.
262 * @return True iff @a __lx is lexicographically less than @a __ly.
264 - * This is a total ordering relation. It is linear in the size of the
265 - * forward lists. The elements must be comparable with @c <.
266 + * This is a total ordering relation. It is linear in the number of
267 + * elements of the forward lists. The elements must be comparable
270 * See std::lexicographical_compare() for how the determination is made.
272 Index: libstdc++-v3/include/Makefile.am
273 ===================================================================
274 --- libstdc++-v3/include/Makefile.am (.../tags/gcc_4_7_0_release) (wersja 185750)
275 +++ libstdc++-v3/include/Makefile.am (.../branches/gcc-4_7-branch) (wersja 185750)
277 ## Makefile for the include subdirectory of the GNU C++ Standard library.
279 ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
282 ## Free Software Foundation, Inc.
284 ## This file is part of the libstdc++ version 3 distribution.
285 @@ -1105,7 +1105,7 @@
286 sed -e "s,define __GLIBCXX__,define __GLIBCXX__ $$date," \
287 -e "s,define _GLIBCXX_INLINE_VERSION, define _GLIBCXX_INLINE_VERSION $$ns_version," \
288 -e "s,define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY, define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY $$visibility," \
289 - -e "s,define _GLIBCXX_EXTERN_TEMPLATE, define _GLIBCXX_EXTERN_TEMPLATE $$externtemplate," \
290 + -e "s,define _GLIBCXX_EXTERN_TEMPLATE$$, define _GLIBCXX_EXTERN_TEMPLATE $$externtemplate," \
292 < ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
293 sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
294 Index: libstdc++-v3/ChangeLog
295 ===================================================================
296 --- libstdc++-v3/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185750)
297 +++ libstdc++-v3/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185750)
299 +2012-03-23 David S. Miller <davem@davemloft.net>
301 + * config/abi/post/sparc-linux-gnu/baseline_symbols.txt: Update.
303 +2012-03-23 Paolo Carlini <paolo.carlini@oracle.com>
305 + * include/bits/forward_list.h: Fix comments.
307 +2012-03-23 Paweł Sikora <pawel.sikora@agmk.net>
310 + * include/Makefile.am (c++config.h): Fix sed rule to not break
311 + the _GLIBCXX_EXTERN_TEMPLATE redefinition.
312 + * include/Makefile.in: Regenerate.
314 +2012-03-22 Jonathan Wakely <jwakely.gcc@gmail.com>
317 + * include/debug/safe_iterator.h (_Safe_iterator): Add move
318 + constructor and move assignment operator.
319 + * testsuite/23_containers/vector/debug/52433.cc: New.
321 +2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
323 + * include/std/array (array<>::at(size_type) const): Fix version
324 + for undefined __EXCEPTIONS.
326 2012-03-22 Release Manager
328 * GCC 4.7.0 released.
329 Index: libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc
330 ===================================================================
331 --- libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc (.../tags/gcc_4_7_0_release) (wersja 0)
332 +++ libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc (.../branches/gcc-4_7-branch) (wersja 185750)
334 +// Copyright (C) 2012 Free Software Foundation, Inc.
336 +// This file is part of the GNU ISO C++ Library. This library is free
337 +// software; you can redistribute it and/or modify it under the
338 +// terms of the GNU General Public License as published by the
339 +// Free Software Foundation; either version 3, or (at your option)
340 +// any later version.
342 +// This library is distributed in the hope that it will be useful,
343 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
344 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
345 +// GNU General Public License for more details.
347 +// You should have received a copy of the GNU General Public License along
348 +// with this library; see the file COPYING3. If not see
349 +// <http://www.gnu.org/licenses/>.
351 +// { dg-require-debug-mode "" }
352 +// { dg-options "-std=gnu++0x" }
353 +// { dg-do compile }
355 +// PR libstdc++/52433
361 + std::vector<int>::iterator i;
364 + X(const X&) = default;
366 + X& operator=(const X&) = default;
367 + X& operator=(X&&) = default;
377 Index: libstdc++-v3/config/abi/post/sparc-linux-gnu/baseline_symbols.txt
378 ===================================================================
379 --- libstdc++-v3/config/abi/post/sparc-linux-gnu/baseline_symbols.txt (.../tags/gcc_4_7_0_release) (wersja 185750)
380 +++ libstdc++-v3/config/abi/post/sparc-linux-gnu/baseline_symbols.txt (.../branches/gcc-4_7-branch) (wersja 185750)
382 FUNC:_ZN11__gnu_debug19_Safe_sequence_base18_M_detach_singularEv@@GLIBCXX_3.4
383 FUNC:_ZN11__gnu_debug19_Safe_sequence_base22_M_revalidate_singularEv@@GLIBCXX_3.4
384 FUNC:_ZN11__gnu_debug19_Safe_sequence_base7_M_swapERS0_@@GLIBCXX_3.4
385 +FUNC:_ZN11__gnu_debug25_Safe_local_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb@@GLIBCXX_3.4.17
386 +FUNC:_ZN11__gnu_debug25_Safe_local_iterator_base9_M_detachEv@@GLIBCXX_3.4.17
387 +FUNC:_ZN11__gnu_debug30_Safe_unordered_container_base13_M_detach_allEv@@GLIBCXX_3.4.17
388 +FUNC:_ZN11__gnu_debug30_Safe_unordered_container_base7_M_swapERS0_@@GLIBCXX_3.4.17
389 FUNC:_ZN14__gnu_parallel9_Settings3getEv@@GLIBCXX_3.4.10
390 FUNC:_ZN14__gnu_parallel9_Settings3setERS0_@@GLIBCXX_3.4.10
391 FUNC:_ZN9__gnu_cxx12__atomic_addEPVii@@GLIBCXX_3.4
393 FUNC:_ZNSaIwEC2Ev@@GLIBCXX_3.4
394 FUNC:_ZNSaIwED1Ev@@GLIBCXX_3.4
395 FUNC:_ZNSaIwED2Ev@@GLIBCXX_3.4
396 +FUNC:_ZNSbIwSt11char_traitsIwESaIwEE10_S_compareEjj@@GLIBCXX_3.4.16
397 FUNC:_ZNSbIwSt11char_traitsIwESaIwEE12_Alloc_hiderC1EPwRKS1_@@GLIBCXX_3.4
398 FUNC:_ZNSbIwSt11char_traitsIwESaIwEE12_Alloc_hiderC2EPwRKS1_@@GLIBCXX_3.4
399 FUNC:_ZNSbIwSt11char_traitsIwESaIwEE12_M_leak_hardEv@@GLIBCXX_3.4
401 FUNC:_ZNSbIwSt11char_traitsIwESaIwEE7replaceEjjRKS2_jj@@GLIBCXX_3.4
402 FUNC:_ZNSbIwSt11char_traitsIwESaIwEE7replaceEjjjw@@GLIBCXX_3.4
403 FUNC:_ZNSbIwSt11char_traitsIwESaIwEE7reserveEj@@GLIBCXX_3.4
404 +FUNC:_ZNSbIwSt11char_traitsIwESaIwEE8pop_backEv@@GLIBCXX_3.4.17
405 FUNC:_ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwjw@@GLIBCXX_3.4.5
406 FUNC:_ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwjw@GLIBCXX_3.4
407 FUNC:_ZNSbIwSt11char_traitsIwESaIwEE9_M_mutateEjjj@@GLIBCXX_3.4
408 @@ -1116,6 +1122,7 @@
409 FUNC:_ZNSolsEt@@GLIBCXX_3.4
410 FUNC:_ZNSolsEx@@GLIBCXX_3.4
411 FUNC:_ZNSolsEy@@GLIBCXX_3.4
412 +FUNC:_ZNSs10_S_compareEjj@@GLIBCXX_3.4.16
413 FUNC:_ZNSs12_Alloc_hiderC1EPcRKSaIcE@@GLIBCXX_3.4
414 FUNC:_ZNSs12_Alloc_hiderC2EPcRKSaIcE@@GLIBCXX_3.4
415 FUNC:_ZNSs12_M_leak_hardEv@@GLIBCXX_3.4
416 @@ -1200,6 +1207,7 @@
417 FUNC:_ZNSs7replaceEjjRKSsjj@@GLIBCXX_3.4
418 FUNC:_ZNSs7replaceEjjjc@@GLIBCXX_3.4
419 FUNC:_ZNSs7reserveEj@@GLIBCXX_3.4
420 +FUNC:_ZNSs8pop_backEv@@GLIBCXX_3.4.17
421 FUNC:_ZNSs9_M_assignEPcjc@@GLIBCXX_3.4.5
422 FUNC:_ZNSs9_M_assignEPcjc@GLIBCXX_3.4
423 FUNC:_ZNSs9_M_mutateEjjj@@GLIBCXX_3.4
424 @@ -1433,6 +1441,9 @@
425 FUNC:_ZNSt13__future_base12_Result_baseD0Ev@@GLIBCXX_3.4.15
426 FUNC:_ZNSt13__future_base12_Result_baseD1Ev@@GLIBCXX_3.4.15
427 FUNC:_ZNSt13__future_base12_Result_baseD2Ev@@GLIBCXX_3.4.15
428 +FUNC:_ZNSt13__future_base19_Async_state_commonD0Ev@@GLIBCXX_3.4.17
429 +FUNC:_ZNSt13__future_base19_Async_state_commonD1Ev@@GLIBCXX_3.4.17
430 +FUNC:_ZNSt13__future_base19_Async_state_commonD2Ev@@GLIBCXX_3.4.17
431 FUNC:_ZNSt13bad_exceptionD0Ev@@GLIBCXX_3.4
432 FUNC:_ZNSt13bad_exceptionD1Ev@@GLIBCXX_3.4
433 FUNC:_ZNSt13bad_exceptionD2Ev@@GLIBCXX_3.4
434 @@ -1741,6 +1752,8 @@
435 FUNC:_ZNSt15__exception_ptrneERKNS_13exception_ptrES2_@@CXXABI_1.3.3
436 FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE10pubseekoffExSt12_Ios_SeekdirSt13_Ios_Openmode@@GLIBCXX_3.4
437 FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE10pubseekposESt4fposI11__mbstate_tESt13_Ios_Openmode@@GLIBCXX_3.4
438 +FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE12__safe_gbumpEi@@GLIBCXX_3.4.16
439 +FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE12__safe_pbumpEi@@GLIBCXX_3.4.16
440 FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE4setgEPcS3_S3_@@GLIBCXX_3.4
441 FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE4setpEPcS3_@@GLIBCXX_3.4
442 FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE4syncEv@@GLIBCXX_3.4
443 @@ -1780,6 +1793,8 @@
444 FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEEaSERKS2_@@GLIBCXX_3.4
445 FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE10pubseekoffExSt12_Ios_SeekdirSt13_Ios_Openmode@@GLIBCXX_3.4
446 FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE10pubseekposESt4fposI11__mbstate_tESt13_Ios_Openmode@@GLIBCXX_3.4
447 +FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE12__safe_gbumpEi@@GLIBCXX_3.4.16
448 +FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE12__safe_pbumpEi@@GLIBCXX_3.4.16
449 FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE4setgEPwS3_S3_@@GLIBCXX_3.4
450 FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE4setpEPwS3_@@GLIBCXX_3.4
451 FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE4syncEv@@GLIBCXX_3.4
452 @@ -1824,6 +1839,7 @@
453 FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE7_M_syncEPcjj@@GLIBCXX_3.4
454 FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode@@GLIBCXX_3.4
455 FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE7seekposESt4fposI11__mbstate_tESt13_Ios_Openmode@@GLIBCXX_3.4
456 +FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8_M_pbumpEPcS4_x@@GLIBCXX_3.4.16
457 FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8overflowEi@@GLIBCXX_3.4
458 FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE9pbackfailEi@@GLIBCXX_3.4
459 FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE9showmanycEv@@GLIBCXX_3.4.6
460 @@ -1841,6 +1857,7 @@
461 FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE7_M_syncEPwjj@@GLIBCXX_3.4
462 FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode@@GLIBCXX_3.4
463 FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE7seekposESt4fposI11__mbstate_tESt13_Ios_Openmode@@GLIBCXX_3.4
464 +FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE8_M_pbumpEPwS4_x@@GLIBCXX_3.4.16
465 FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE8overflowEj@@GLIBCXX_3.4
466 FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE9pbackfailEj@@GLIBCXX_3.4
467 FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE9showmanycEv@@GLIBCXX_3.4.6
468 @@ -2145,6 +2162,7 @@
469 FUNC:_ZNSt6localeD2Ev@@GLIBCXX_3.4
470 FUNC:_ZNSt6localeaSERKS_@@GLIBCXX_3.4
471 FUNC:_ZNSt6thread15_M_start_threadESt10shared_ptrINS_10_Impl_baseEE@@GLIBCXX_3.4.11
472 +FUNC:_ZNSt6thread20hardware_concurrencyEv@@GLIBCXX_3.4.17
473 FUNC:_ZNSt6thread4joinEv@@GLIBCXX_3.4.11
474 FUNC:_ZNSt6thread6detachEv@@GLIBCXX_3.4.11
475 FUNC:_ZNSt7codecvtIcc11__mbstate_tEC1EP15__locale_structj@@GLIBCXX_3.4
476 @@ -2640,14 +2658,17 @@
477 FUNC:_ZnwjRKSt9nothrow_t@@GLIBCXX_3.4
478 FUNC:__atomic_flag_for_address@@GLIBCXX_3.4.11
479 FUNC:__atomic_flag_wait_explicit@@GLIBCXX_3.4.11
480 +FUNC:__cxa_allocate_dependent_exception@@CXXABI_1.3.6
481 FUNC:__cxa_allocate_exception@@CXXABI_1.3
482 FUNC:__cxa_bad_cast@@CXXABI_1.3
483 FUNC:__cxa_bad_typeid@@CXXABI_1.3
484 FUNC:__cxa_begin_catch@@CXXABI_1.3
485 FUNC:__cxa_call_unexpected@@CXXABI_1.3
486 FUNC:__cxa_current_exception_type@@CXXABI_1.3
487 +FUNC:__cxa_deleted_virtual@@CXXABI_1.3.6
488 FUNC:__cxa_demangle@@CXXABI_1.3
489 FUNC:__cxa_end_catch@@CXXABI_1.3
490 +FUNC:__cxa_free_dependent_exception@@CXXABI_1.3.6
491 FUNC:__cxa_free_exception@@CXXABI_1.3
492 FUNC:__cxa_get_exception_ptr@@CXXABI_1.3.1
493 FUNC:__cxa_get_globals@@CXXABI_1.3
494 @@ -2658,6 +2679,7 @@
495 FUNC:__cxa_pure_virtual@@CXXABI_1.3
496 FUNC:__cxa_rethrow@@CXXABI_1.3
497 FUNC:__cxa_throw@@CXXABI_1.3
498 +FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
499 FUNC:__cxa_vec_cctor@@CXXABI_1.3
500 FUNC:__cxa_vec_cleanup@@CXXABI_1.3
501 FUNC:__cxa_vec_ctor@@CXXABI_1.3
502 @@ -2701,7 +2723,9 @@
503 OBJECT:0:CXXABI_1.3.3
504 OBJECT:0:CXXABI_1.3.4
505 OBJECT:0:CXXABI_1.3.5
506 +OBJECT:0:CXXABI_1.3.6
507 OBJECT:0:CXXABI_LDBL_1.3
508 +OBJECT:0:CXXABI_TM_1
510 OBJECT:0:GLIBCXX_3.4.1
511 OBJECT:0:GLIBCXX_3.4.10
512 @@ -2710,6 +2734,8 @@
513 OBJECT:0:GLIBCXX_3.4.13
514 OBJECT:0:GLIBCXX_3.4.14
515 OBJECT:0:GLIBCXX_3.4.15
516 +OBJECT:0:GLIBCXX_3.4.16
517 +OBJECT:0:GLIBCXX_3.4.17
518 OBJECT:0:GLIBCXX_3.4.2
519 OBJECT:0:GLIBCXX_3.4.3
520 OBJECT:0:GLIBCXX_3.4.4
521 @@ -2737,6 +2763,7 @@
522 OBJECT:12:_ZTIN9__gnu_cxx13stdio_filebufIwSt11char_traitsIwEEE@@GLIBCXX_3.4
523 OBJECT:12:_ZTIN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEEE@@GLIBCXX_3.4
524 OBJECT:12:_ZTIN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEEE@@GLIBCXX_3.4
525 +OBJECT:12:_ZTINSt13__future_base19_Async_state_commonE@@GLIBCXX_3.4.17
526 OBJECT:12:_ZTINSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEEE@@GLIBCXX_LDBL_3.4
527 OBJECT:12:_ZTINSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEEE@@GLIBCXX_LDBL_3.4
528 OBJECT:12:_ZTINSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEEE@@GLIBCXX_LDBL_3.4
529 @@ -3245,6 +3272,7 @@
530 OBJECT:20:_ZTSSt15underflow_error@@GLIBCXX_3.4
531 OBJECT:20:_ZTVNSt13__future_base11_State_baseE@@GLIBCXX_3.4.15
532 OBJECT:20:_ZTVNSt13__future_base12_Result_baseE@@GLIBCXX_3.4.15
533 +OBJECT:20:_ZTVNSt13__future_base19_Async_state_commonE@@GLIBCXX_3.4.17
534 OBJECT:20:_ZTVNSt8ios_base7failureE@@GLIBCXX_3.4
535 OBJECT:20:_ZTVSt10bad_typeid@@GLIBCXX_3.4
536 OBJECT:20:_ZTVSt10lock_error@@GLIBCXX_3.4.11
537 @@ -3437,6 +3465,7 @@
538 OBJECT:40:_ZTVSt19basic_ostringstreamIwSt11char_traitsIwESaIwEE@@GLIBCXX_3.4
539 OBJECT:40:_ZTVSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE@@GLIBCXX_3.4
540 OBJECT:40:_ZTVSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE@@GLIBCXX_3.4
541 +OBJECT:41:_ZTSNSt13__future_base19_Async_state_commonE@@GLIBCXX_3.4.17
542 OBJECT:41:_ZTSSt15basic_streambufIcSt11char_traitsIcEE@@GLIBCXX_3.4
543 OBJECT:41:_ZTSSt15basic_streambufIwSt11char_traitsIwEE@@GLIBCXX_3.4
544 OBJECT:44:_ZTVN10__cxxabiv117__class_type_infoE@@CXXABI_1.3
545 Index: libiberty/ChangeLog
546 ===================================================================
547 --- libiberty/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185750)
548 +++ libiberty/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185750)
550 +2012-03-22 Jason Merrill <jason@redhat.com>
552 + * cp-demangle.c (cplus_demangle_operators): Add li.
553 + (d_unqualified_name): Handle it specially.
555 2012-03-22 Release Manager
557 * GCC 4.7.0 released.
558 Index: libiberty/testsuite/demangle-expected
559 ===================================================================
560 --- libiberty/testsuite/demangle-expected (.../tags/gcc_4_7_0_release) (wersja 185750)
561 +++ libiberty/testsuite/demangle-expected (.../branches/gcc-4_7-branch) (wersja 185750)
562 @@ -4073,6 +4073,8 @@
563 _Z2f1IiEDTnw_T_ilEES0_
564 decltype (new int{}) f1<int>(int)
567 +operator"" _w(char const*)
568 _Z1fIiEDTnw_Dapifp_EET_
569 decltype (new auto({parm#1})) f<int>(int)
571 Index: libiberty/cp-demangle.c
572 ===================================================================
573 --- libiberty/cp-demangle.c (.../tags/gcc_4_7_0_release) (wersja 185750)
574 +++ libiberty/cp-demangle.c (.../branches/gcc-4_7-branch) (wersja 185750)
575 @@ -1419,7 +1419,12 @@
577 ret = d_operator_name (di);
578 if (ret != NULL && ret->type == DEMANGLE_COMPONENT_OPERATOR)
579 - di->expansion += sizeof "operator" + ret->u.s_operator.op->len - 2;
581 + di->expansion += sizeof "operator" + ret->u.s_operator.op->len - 2;
582 + if (!strcmp (ret->u.s_operator.op->code, "li"))
583 + ret = d_make_comp (di, DEMANGLE_COMPONENT_UNARY, ret,
584 + d_source_name (di));
588 else if (peek == 'C' || peek == 'D')
589 @@ -1596,6 +1601,7 @@
590 { "ix", NL ("[]"), 2 },
591 { "lS", NL ("<<="), 2 },
592 { "le", NL ("<="), 2 },
593 + { "li", NL ("operator\"\" "), 1 },
594 { "ls", NL ("<<"), 2 },
595 { "lt", NL ("<"), 2 },
596 { "mI", NL ("-="), 2 },
597 Index: libgcc/ChangeLog
598 ===================================================================
599 --- libgcc/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185750)
600 +++ libgcc/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185750)
602 +2012-03-22 Georg-Johann Lay <avr@gjlay.de>
604 + Backport from 2012-03-07 mainline r185033.
607 + * config/avr/lib1funcs.S (__movmemx_hi): Fix loop label in RAM-part.
609 + Backport from 2012-03-07 mainline r185031.
612 + * config/avr/lib1funcs.S (__xload_1): Don't read unintentionally
615 + Backport from 2012-03-07 mainline r185030.
619 + * config/avr/lib1funcs.S (__do_copy_data): Clear RAMPZ after usage
620 + if RAMPZ affects reading from RAM.
621 + (__tablejump_elpm__): Ditto.
623 + (__movmemx_hi): Ditto.
624 + (__do_global_ctors): Right condition for RAMPZ usage is "have ELPM".
625 + (__do_global_dtors): Ditto.
626 + (__xload_1, __xload_2, __xload_3, __xload_4): Ditto.
627 + (__movmemx_hi): Ditto.
629 2012-03-22 Release Manager
631 * GCC 4.7.0 released.
632 Index: libgcc/config/avr/lib1funcs.S
633 ===================================================================
634 --- libgcc/config/avr/lib1funcs.S (.../tags/gcc_4_7_0_release) (wersja 185750)
635 +++ libgcc/config/avr/lib1funcs.S (.../branches/gcc-4_7-branch) (wersja 185750)
636 @@ -1893,6 +1893,10 @@
638 brne .L__do_copy_data_loop
639 #endif /* !defined(__AVR_HAVE_ELPMX__) && !defined(__AVR_HAVE_ELPM__) */
640 +#if defined (__AVR_HAVE_ELPM__) && defined (__AVR_HAVE_RAMPD__)
641 + ;; Reset RAMPZ to 0 so that EBI devices don't read garbage from RAM
642 + out __RAMPZ__, __zero_reg__
643 +#endif /* ELPM && RAMPD */
645 #endif /* L_copy_data */
647 @@ -1920,7 +1924,7 @@
649 .section .init6,"ax",@progbits
650 DEFUN __do_global_ctors
651 -#if defined(__AVR_HAVE_RAMPZ__)
652 +#if defined(__AVR_HAVE_ELPM__)
653 ldi r17, hi8(__ctors_start)
654 ldi r28, lo8(__ctors_end)
655 ldi r29, hi8(__ctors_end)
656 @@ -1953,14 +1957,14 @@
657 cpi r28, lo8(__ctors_start)
659 brne .L__do_global_ctors_loop
660 -#endif /* defined(__AVR_HAVE_RAMPZ__) */
661 +#endif /* defined(__AVR_HAVE_ELPM__) */
662 ENDF __do_global_ctors
666 .section .fini6,"ax",@progbits
667 DEFUN __do_global_dtors
668 -#if defined(__AVR_HAVE_RAMPZ__)
669 +#if defined(__AVR_HAVE_ELPM__)
670 ldi r17, hi8(__dtors_end)
671 ldi r28, lo8(__dtors_start)
672 ldi r29, hi8(__dtors_start)
673 @@ -1993,7 +1997,7 @@
674 cpi r28, lo8(__dtors_end)
676 brne .L__do_global_dtors_loop
677 -#endif /* defined(__AVR_HAVE_RAMPZ__) */
678 +#endif /* defined(__AVR_HAVE_ELPM__) */
679 ENDF __do_global_dtors
682 @@ -2001,18 +2005,21 @@
684 #ifdef L_tablejump_elpm
685 DEFUN __tablejump_elpm__
686 -#if defined (__AVR_HAVE_ELPM__)
687 -#if defined (__AVR_HAVE_LPMX__)
688 +#if defined (__AVR_HAVE_ELPMX__)
692 +#if defined (__AVR_HAVE_RAMPD__)
693 + ;; Reset RAMPZ to 0 so that EBI devices don't read garbage from RAM
694 + out __RAMPZ__, __zero_reg__
696 #if defined (__AVR_HAVE_EIJMP_EICALL__)
703 +#elif defined (__AVR_HAVE_ELPM__)
707 @@ -2024,7 +2031,6 @@
711 -#endif /* defined (__AVR_HAVE_ELPM__) */
712 ENDF __tablejump_elpm__
713 #endif /* defined (L_tablejump_elpm) */
715 @@ -2114,11 +2120,18 @@
719 +#if defined (__AVR_HAVE_ELPM__) && defined (__AVR_HAVE_RAMPD__)
720 +.if \dest == D0+\n-1
721 + ;; Reset RAMPZ to 0 so that EBI devices don't read garbage from RAM
722 + out __RAMPZ__, __zero_reg__
727 #if defined (L_xload_1)
729 -#if defined (__AVR_HAVE_LPMX__) && !defined (__AVR_HAVE_RAMPZ__)
730 +#if defined (__AVR_HAVE_LPMX__) && !defined (__AVR_HAVE_ELPM__)
735 @@ -2126,14 +2139,14 @@
739 -#if defined (__AVR_HAVE_RAMPZ__)
740 +#if defined (__AVR_HAVE_ELPM__)
742 -#endif /* __AVR_HAVE_RAMPZ__ */
743 +#endif /* __AVR_HAVE_ELPM__ */
748 -#endif /* LPMx && ! RAMPZ */
749 +#endif /* LPMx && ! ELPM */
751 #endif /* L_xload_1 */
753 @@ -2141,9 +2154,9 @@
757 -#if defined (__AVR_HAVE_RAMPZ__)
758 +#if defined (__AVR_HAVE_ELPM__)
760 -#endif /* __AVR_HAVE_RAMPZ__ */
761 +#endif /* __AVR_HAVE_ELPM__ */
765 @@ -2157,9 +2170,9 @@
769 -#if defined (__AVR_HAVE_RAMPZ__)
770 +#if defined (__AVR_HAVE_ELPM__)
772 -#endif /* __AVR_HAVE_RAMPZ__ */
773 +#endif /* __AVR_HAVE_ELPM__ */
777 @@ -2175,9 +2188,9 @@
781 -#if defined (__AVR_HAVE_RAMPZ__)
782 +#if defined (__AVR_HAVE_ELPM__)
784 -#endif /* __AVR_HAVE_RAMPZ__ */
785 +#endif /* __AVR_HAVE_ELPM__ */
789 @@ -2219,7 +2232,7 @@
793 -#if defined (__AVR_HAVE_RAMPZ__)
794 +#if defined (__AVR_HAVE_ELPM__)
798 @@ -2243,6 +2256,10 @@
802 +#if defined (__AVR_HAVE_ELPM__) && defined (__AVR_HAVE_RAMPD__)
803 + ;; Reset RAMPZ to 0 so that EBI devices don't read garbage from RAM
804 + out __RAMPZ__, __zero_reg__
805 +#endif /* ELPM && RAMPD */
809 @@ -2252,7 +2269,7 @@
810 ;; and store that Byte to RAM Destination
818 Index: gcc/c-family/ChangeLog
819 ===================================================================
820 --- gcc/c-family/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185750)
821 +++ gcc/c-family/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185750)
823 +2012-03-23 William Bader <williambader@hotmail.com>
826 + * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
828 2012-03-22 Release Manager
830 * GCC 4.7.0 released.
831 Index: gcc/c-family/c-lex.c
832 ===================================================================
833 --- gcc/c-family/c-lex.c (.../tags/gcc_4_7_0_release) (wersja 185750)
834 +++ gcc/c-family/c-lex.c (.../branches/gcc-4_7-branch) (wersja 185750)
837 if (flags & CPP_N_USERDEF)
841 tree suffix_id = get_identifier (suffix);
842 int len = tok->val.str.len - strlen (suffix);
843 /* If this is going to be used as a C string to pass to a
845 (const char *) tok->val.str.text);
846 TREE_TYPE (num_string) = char_array_type_node;
847 num_string = fix_string_type (num_string);
848 - char *str = CONST_CAST (char *, TREE_STRING_POINTER (num_string));
849 + str = CONST_CAST (char *, TREE_STRING_POINTER (num_string));
851 - tree literal = build_userdef_literal (suffix_id, *value,
852 + literal = build_userdef_literal (suffix_id, *value,
857 ===================================================================
858 --- gcc/DATESTAMP (.../tags/gcc_4_7_0_release) (wersja 185750)
859 +++ gcc/DATESTAMP (.../branches/gcc-4_7-branch) (wersja 185750)
864 ===================================================================
865 --- gcc/DEV-PHASE (.../tags/gcc_4_7_0_release) (wersja 185750)
866 +++ gcc/DEV-PHASE (.../branches/gcc-4_7-branch) (wersja 185750)
870 ===================================================================
871 --- gcc/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185750)
872 +++ gcc/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185750)
874 +2012-03-23 Michael Meissner <meissner@linux.vnet.ibm.com>
876 + Backported from mainline
877 + 2012-03-06 Michael Meissner <meissner@linux.vnet.ibm.com>
880 + * config/rs6000/vector.md (vector_uneq<mode>): Add support for
881 + UNEQ, LTGT, ORDERED, and UNORDERED IEEE vector comparisons.
882 + (vector_ltgt<mode>): Likewise.
883 + (vector_ordered<mode>): Likewise.
884 + (vector_unordered<mode>): Likewise.
885 + * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise.
887 +2012-03-23 Joern Rennecke <joern.rennecke@embecosm.com>
889 + * config/epiphany/epiphany.c (epiphany_function_value_regno_p):
892 +2012-03-22 Kaz Kojima <kkojima@gcc.gnu.org>
894 + Backported from mainline
895 + 2012-03-02 Kaz Kojima <kkojima@gcc.gnu.org>
899 + * config/sh/sh.c (sh_register_move_cost): Increase cost between
900 + GENERAL_REGS and FP_REGS for SImode.
902 +2012-03-22 Jakub Jelinek <jakub@redhat.com>
904 + PR middle-end/52547
905 + * tree-nested.c (convert_tramp_reference_stmt): Call declare_vars
906 + on any new_local_var_chain vars declared during recursing on
907 + GIMPLE_OMP_PARALLEL or GIMPLE_OMP_TASK body.
909 +2012-03-22 Georg-Johann Lay <avr@gjlay.de>
911 + Backport from 2012-03-22 mainline r185692.
914 + * config/avr/avr.md (unspec): Remove UNSPEC_MEMORY_BARRIER.
915 + (unspecv): Add UNSPECV_MEMORY_BARRIER.
916 + (cli_sei): Use unspec_volatile instead of unspec for memory barrier.
917 + (delay_cycles_1, delay_cycles_2): Ditto.
918 + (delay_cycles_3, delay_cycles_4): Ditto.
919 + (nopv, *nopv): Ditto.
920 + (sleep, *sleep): Ditto.
921 + (wdr, *wdr): Ditto.
923 + Backport from 2012-03-21 mainline r185605.
925 + PR rtl-optimization/52543
927 + * config/avr/avr-protos.h (avr_load_lpm): New prototype.
928 + * config/avr/avr.c (avr_mode_dependent_address_p): New function.
929 + (TARGET_MODE_DEPENDENT_ADDRESS_P): New define.
930 + (avr_load_libgcc_p): Restrict to __flash loads.
931 + (avr_out_lpm): Only handle 1-byte loads from __flash.
932 + (avr_load_lpm): New function.
933 + (avr_find_unused_d_reg): Remove.
934 + (avr_out_lpm_no_lpmx): Remove.
935 + (adjust_insn_length): Handle ADJUST_LEN_LOAD_LPM.
936 + * config/avr/avr.md (unspec): Add UNSPEC_LPM.
937 + (load_<mode>_libgcc): Use UNSPEC_LPM instead of MEM.
938 + (load_<mode>, load_<mode>_clobber): New insns.
939 + (mov<mode>): For multi-byte move from non-generic
940 + 16-bit address spaces: Expand to load_<mode> resp.
941 + load_<mode>_clobber.
942 + (load<mode>_libgcc): Remove expander.
943 + (split-lpmx): Remove split.
945 + Backport from 2012-03-13 mainline r185329.
948 + * config/avr/avr.c (avr_prologue_setup_frame): Cut down stack
949 + offset (size) to a value the insns can deal with.
950 + (expand_epilogue): Ditto.
952 + Backport from 2012-03-12 mainline r185256.
955 + * config/avr/avr.c (avr_mode_code_base_reg_class): Change return
956 + type from reg_class_t to enum reg_class.
957 + * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto.
959 + Backport from 2012-03-12 mainline r185253.
962 + * config/avr/avr.c (avr_out_movmem): Fix typo in output template
963 + for the case ADDR_SPACE_FLASH and AVR_HAVE_LPMX introduced in
964 + r184615 from 2012-02-28.
966 + Backport from 2012-03-08 mainline r185105.
968 + * config/avr/avr.md (*addhi3, addhi3_clobber): Add "w" alternative
969 + for constants in [-63,63].
971 + Backport from 2012-03-08 mainline r185100.
974 + * config/avr/avr.c (avr_mem_clobber): New static function.
975 + (avr_expand_delay_cycles): Add memory clobber operand to
976 + delay_cycles_1, delay_cycles_2, delay_cycles_3, delay_cycles_4.
977 + * config/avr/avr.md (unspec): Add UNSPEC_MEMORY_BARRIER.
978 + (enable_interrupt, disable_interrupt): New expander.
979 + (nopv, sleep, wdr): New expanders.
980 + (delay_cycles_1): Add memory clobber.
981 + (delay_cycles_2): Add memory clobber.
982 + (delay_cycles_3): Add memory clobber.
983 + (delay_cycles_4): Add memory clobber.
984 + (cli_sei): New insn from former "enable_interrupt",
985 + "disable_interrupt" with memory clobber.
986 + (*wdt): New insn from former "wdt" with memory clobber.
987 + (*nopv): Similar, but for "nopv".
988 + (*sleep): Similar, but for "sleep".
990 + Backport from 2012-03-07 mainline r185043.
993 + * config/avr/avr.md (xload<mode>_A): Add R22... to register footprint.
995 + Backport from 2012-03-07 mainline r185032.
998 + * gcc/config/avr/avr.c (expand_epilogue): Fix order of restoration
999 + to: RAMPZ, RAMPY, RAMPX, RAMPD.
1000 + (expand_prologue): Only clear RAMPZ if it has effect on RAM-read.
1002 + Backport from 2012-03-07 mainline r185031.
1005 + * config/avr/avr.c (avr_out_xload): Don't read unintentionally
1007 + * config/avr/avr.md (xload_8): Adjust insn length.
1009 + Backport from 2012-03-07 mainline r185030.
1012 + * gcc/config/avr/avr.c (avr_out_lpm): Clear RAMPZ after usage
1013 + if RAMPZ affects reading from RAM.
1015 + Backport from 2012-03-05 mainline r184919.
1017 + * config/avr/avr.md (*umaddqihi4.2): New insn-and-split.
1019 +2012-03-22 Georg-Johann Lay <avr@gjlay.de>
1021 + Backport from mainline r185259.
1024 + * output.h (SECTION_EXCLUDE, SECTION_MACH_DEP): Don't use
1025 + SECTION_MACH_DEP reserved bits for SECTION_EXCLUDE.
1027 +2012-03-22 Jakub Jelinek <jakub@redhat.com>
1029 + Backported from mainline
1030 + 2012-03-13 Jakub Jelinek <jakub@redhat.com>
1033 + * c-parser.c (c_parser_postfix_expression)
1034 + <case RID_BUILTIN_SHUFFLE>: Call mark_exp_read on argument values.
1036 + * config/i386/smmintrin.h: Avoid /* within a comment.
1037 + * config/i386/nmmintrin.h: Likewise.
1039 +2012-03-22 Richard Guenther <rguenther@suse.de>
1041 + * BASE-VER: Set to 4.7.1.
1042 + * DEV-PHASE: Set to prerelease.
1044 2012-03-22 Release Manager
1046 * GCC 4.7.0 released.
1047 Index: gcc/testsuite/gcc.target/avr/torture/addr-space-1-0.c
1048 ===================================================================
1049 --- gcc/testsuite/gcc.target/avr/torture/addr-space-1-0.c (.../tags/gcc_4_7_0_release) (wersja 0)
1050 +++ gcc/testsuite/gcc.target/avr/torture/addr-space-1-0.c (.../branches/gcc-4_7-branch) (wersja 185750)
1052 +/* { dg-options "-std=gnu99" } */
1053 +/* { dg-do run } */
1055 +#define __as __flash
1057 +#include "addr-space-1.h"
1058 Index: gcc/testsuite/gcc.target/avr/torture/addr-space-1-1.c
1059 ===================================================================
1060 --- gcc/testsuite/gcc.target/avr/torture/addr-space-1-1.c (.../tags/gcc_4_7_0_release) (wersja 0)
1061 +++ gcc/testsuite/gcc.target/avr/torture/addr-space-1-1.c (.../branches/gcc-4_7-branch) (wersja 185750)
1063 +/* { dg-options "-std=gnu99 -Tavr51-flash1.x" } */
1064 +/* { dg-do run } */
1066 +#define __as __flash1
1068 +#include "addr-space-1.h"
1069 Index: gcc/testsuite/gcc.target/avr/torture/addr-space-2-0.c
1070 ===================================================================
1071 --- gcc/testsuite/gcc.target/avr/torture/addr-space-2-0.c (.../tags/gcc_4_7_0_release) (wersja 0)
1072 +++ gcc/testsuite/gcc.target/avr/torture/addr-space-2-0.c (.../branches/gcc-4_7-branch) (wersja 185750)
1074 +/* { dg-options "-std=gnu99" } */
1075 +/* { dg-do run } */
1077 +#define __as __flash
1079 +#include "addr-space-2.h"
1080 Index: gcc/testsuite/gcc.target/avr/torture/addr-space-2-1.c
1081 ===================================================================
1082 --- gcc/testsuite/gcc.target/avr/torture/addr-space-2-1.c (.../tags/gcc_4_7_0_release) (wersja 0)
1083 +++ gcc/testsuite/gcc.target/avr/torture/addr-space-2-1.c (.../branches/gcc-4_7-branch) (wersja 185750)
1085 +/* { dg-options "-std=gnu99 -Tavr51-flash1.x" } */
1086 +/* { dg-do run } */
1088 +#define __as __flash1
1090 +#include "addr-space-2.h"
1091 Index: gcc/testsuite/gcc.target/avr/torture/addr-space-1-x.c
1092 ===================================================================
1093 --- gcc/testsuite/gcc.target/avr/torture/addr-space-1-x.c (.../tags/gcc_4_7_0_release) (wersja 0)
1094 +++ gcc/testsuite/gcc.target/avr/torture/addr-space-1-x.c (.../branches/gcc-4_7-branch) (wersja 185750)
1096 +/* { dg-options "-std=gnu99" } */
1097 +/* { dg-do run } */
1099 +#define __as __memx
1101 +#include "addr-space-1.h"
1102 Index: gcc/testsuite/gcc.target/avr/torture/addr-space-1.h
1103 ===================================================================
1104 --- gcc/testsuite/gcc.target/avr/torture/addr-space-1.h (.../tags/gcc_4_7_0_release) (wersja 0)
1105 +++ gcc/testsuite/gcc.target/avr/torture/addr-space-1.h (.../branches/gcc-4_7-branch) (wersja 185750)
1107 +#include <stdlib.h>
1108 +#include <string.h>
1121 + 12, 345, 678910, 1234567891011ll,
1128 +const __as volatile a_t V =
1130 + 12+1, 345+1, 678910+1, 1234567891011ll+1,
1143 + || A.i1 != V.i1 -1)
1147 + || A.i2 != V.i2 -1)
1150 + if (A.i4 != 678910
1151 + || A.i4 != V.i4 -1)
1154 + if (A.i8 != 1234567891011ll
1155 + || A.i8 != V.i8 -1)
1162 + || A2.i1 != V2.i1 -1)
1166 + || A2.i2 != V2.i2 -1)
1169 + if (A2.i4 != 678910
1170 + || A2.i4 != V2.i4 -1)
1173 + if (A2.i8 != 1234567891011ll
1174 + || A2.i8 != V2.i8 -1)
1177 + if (strcmp (A2.str[0], "xxx..xxx"))
1179 + if (strcmp (A2.str[1], "yyy..yyy"))
1182 + if (strcmp ((const char*) V2.str[0], "XXX..XXX"))
1184 + if (strcmp ((const char*) V2.str[1], "YYY..YYY"))
1190 Index: gcc/testsuite/gcc.target/avr/torture/addr-space-2-x.c
1191 ===================================================================
1192 --- gcc/testsuite/gcc.target/avr/torture/addr-space-2-x.c (.../tags/gcc_4_7_0_release) (wersja 0)
1193 +++ gcc/testsuite/gcc.target/avr/torture/addr-space-2-x.c (.../branches/gcc-4_7-branch) (wersja 185750)
1195 +/* { dg-options "-std=gnu99 -Wa,--no-warn" } */
1196 +/* { dg-do run } */
1198 +/* --no-warn because: "assembling 24-bit address needs binutils extension"
1199 + see binutils PR13503. */
1201 +#define __as __memx
1203 +#include "addr-space-2.h"
1204 Index: gcc/testsuite/gcc.target/avr/torture/addr-space-2.h
1205 ===================================================================
1206 --- gcc/testsuite/gcc.target/avr/torture/addr-space-2.h (.../tags/gcc_4_7_0_release) (wersja 0)
1207 +++ gcc/testsuite/gcc.target/avr/torture/addr-space-2.h (.../branches/gcc-4_7-branch) (wersja 185750)
1209 +extern void exit (int);
1210 +extern void abort (void);
1215 + const __as struct T *l, *r;
1226 +const __as tree a = { 'a', 0, 0 };
1227 +const __as tree b = { 'b', 0, 0 };
1228 +const __as tree c = { 'c', 0, 0 };
1229 +const __as tree d = { 'd', 0, 0 };
1231 +const __as tree ab = { 'A', &a, &b };
1232 +const __as tree cd = { 'C', &c, &d };
1234 +const __as tree abcd = { '*', &ab, &cd };
1239 + if (abcd.val != '*')
1242 + if (abcd.l->val != 'A')
1244 + if (abcd.r->val != 'C')
1247 + if (abcd.l->l->val != 'a')
1249 + if (abcd.l->r->val != 'b')
1251 + if (abcd.r->l->val != 'c')
1253 + if (abcd.r->r->val != 'd')
1258 +test2 (const __as tree *t)
1260 + if (t->val != '*')
1263 + if (t->l->val != 'A')
1265 + if (t->r->val != 'C')
1268 + if (t->l->l->val != 'a')
1270 + if (t->l->r->val != 'b')
1272 + if (t->r->l->val != 'c')
1274 + if (t->r->r->val != 'd')
1279 +test3 (const __as tree *pt)
1286 + if (t.l->val != 'A')
1288 + if (t.r->val != 'C')
1291 + if (t.l->l->val != 'a')
1293 + if (t.l->r->val != 'b')
1295 + if (t.r->l->val != 'c')
1297 + if (t.r->r->val != 'd')
1303 + const __as tree *t = &abcd;
1308 + __asm ("" : "+r" (t));
1315 Index: gcc/testsuite/gcc.target/avr/torture/addr-space-1-g.c
1316 ===================================================================
1317 --- gcc/testsuite/gcc.target/avr/torture/addr-space-1-g.c (.../tags/gcc_4_7_0_release) (wersja 0)
1318 +++ gcc/testsuite/gcc.target/avr/torture/addr-space-1-g.c (.../branches/gcc-4_7-branch) (wersja 185750)
1320 +/* { dg-options "-std=gnu99" } */
1321 +/* { dg-do run } */
1325 +#include "addr-space-1.h"
1326 Index: gcc/testsuite/gcc.target/avr/torture/addr-space-2-g.c
1327 ===================================================================
1328 --- gcc/testsuite/gcc.target/avr/torture/addr-space-2-g.c (.../tags/gcc_4_7_0_release) (wersja 0)
1329 +++ gcc/testsuite/gcc.target/avr/torture/addr-space-2-g.c (.../branches/gcc-4_7-branch) (wersja 185750)
1331 +/* { dg-options "-std=gnu99" } */
1332 +/* { dg-do run } */
1336 +#include "addr-space-2.h"
1337 Index: gcc/testsuite/gcc.target/avr/progmem.h
1338 ===================================================================
1339 --- gcc/testsuite/gcc.target/avr/progmem.h (.../tags/gcc_4_7_0_release) (wersja 185750)
1340 +++ gcc/testsuite/gcc.target/avr/progmem.h (.../branches/gcc-4_7-branch) (wersja 185750)
1342 static const char __c[] PROGMEM = (s); \
1345 +#ifdef __AVR_HAVE_LPMX__
1346 #define pgm_read_char(addr) \
1348 unsigned int __addr16 = (unsigned int)(addr); \
1350 __asm__ ("lpm %0, %a1" \
1351 : "=r" (__result) : "z" (__addr16)); \
1354 +#define pgm_read_char(addr) \
1355 + (__extension__({ \
1356 + unsigned int __addr16 = (unsigned int)(addr); \
1358 + __asm__ ("lpm" "\n\t" \
1360 + : "=r" (__result) : "z" (__addr16)); \
1363 Index: gcc/testsuite/gfortran.dg/intrinsic_8.f90
1364 ===================================================================
1365 --- gcc/testsuite/gfortran.dg/intrinsic_8.f90 (.../tags/gcc_4_7_0_release) (wersja 0)
1366 +++ gcc/testsuite/gfortran.dg/intrinsic_8.f90 (.../branches/gcc-4_7-branch) (wersja 185750)
1368 +! { dg-do compile }
1372 +! Contributed by Roger Ferrer Ibanez
1376 + INTRINSIC :: etime
1377 + REAL(4) :: tarray(1:2)
1380 + CALL etime(tarray, result)
1381 +END PROGRAM test_etime
1383 +subroutine test_etime2
1385 + INTRINSIC :: etime
1386 + REAL(4) :: tarray(1:2)
1389 + result = etime(tarray)
1390 +END subroutine test_etime2
1391 Index: gcc/testsuite/gcc.dg/Wunused-var-3.c
1392 ===================================================================
1393 --- gcc/testsuite/gcc.dg/Wunused-var-3.c (.../tags/gcc_4_7_0_release) (wersja 0)
1394 +++ gcc/testsuite/gcc.dg/Wunused-var-3.c (.../branches/gcc-4_7-branch) (wersja 185750)
1397 +/* { dg-do compile } */
1398 +/* { dg-options "-Wunused" } */
1400 +typedef int V __attribute__((vector_size (sizeof (int) * 4)));
1405 + V mask = { 1, 2, 3, 0 };
1406 + *p = __builtin_shuffle (*p, mask);
1412 + V mask = { 1, 2, 3, 0 };
1413 + *p = __builtin_shuffle (*p, *q, mask);
1419 + V a = { 1, 2, 3, 0 };
1420 + *p = __builtin_shuffle (a, *mask);
1426 + V a = { 1, 2, 3, 0 };
1427 + V b = { 2, 3, 4, 1 };
1428 + *p = __builtin_shuffle (a, b, *mask);
1430 Index: gcc/testsuite/ChangeLog
1431 ===================================================================
1432 --- gcc/testsuite/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185750)
1433 +++ gcc/testsuite/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185750)
1435 +2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
1438 + * g++.dg/cpp0x/lambda/lambda-ice7.C: New.
1440 +2012-03-22 Tobias Burnus <burnus@net-b.de>
1443 + * gfortran.dg/intrinsic_8.f90: New.
1445 +2012-03-22 Jakub Jelinek <jakub@redhat.com>
1448 + * g++.dg/ext/attrib44.C: New test.
1450 +2012-03-22 Jason Merrill <jason@redhat.com>
1452 + * g++.dg/torture/pr52582.C: New.
1454 +2012-03-22 Georg-Johann Lay <avr@gjlay.de>
1456 + Backport from 2012-03-20 mainline r185583.
1458 + * gcc.target/avr/progmem.h (pgm_read_char): Define depending on
1461 + Backport from 2012-03-20 mainline r185570.
1464 + * gcc.target/avr/torture/addr-space-2.h: New file.
1465 + * gcc.target/avr/torture/addr-space-2-g.h: New test.
1466 + * gcc.target/avr/torture/addr-space-2-0.h: New test.
1467 + * gcc.target/avr/torture/addr-space-2-1.h: New test.
1468 + * gcc.target/avr/torture/addr-space-2-x.h: New test.
1470 + Backport from 2012-03-12 mainline r185255.
1473 + * gcc.target/avr/torture/addr-space-1.h: New file.
1474 + * gcc.target/avr/torture/addr-space-g.h: New test.
1475 + * gcc.target/avr/torture/addr-space-0.h: New test.
1476 + * gcc.target/avr/torture/addr-space-1.h: New test.
1477 + * gcc.target/avr/torture/addr-space-x.h: New test.
1479 +2012-03-22 Jakub Jelinek <jakub@redhat.com>
1481 + Backported from mainline
1482 + 2012-03-14 Jakub Jelinek <jakub@redhat.com>
1485 + * g++.dg/cpp0x/udlit-args2.C: New test.
1487 + 2012-03-13 Jakub Jelinek <jakub@redhat.com>
1490 + * gcc.dg/Wunused-var-3.c: New test.
1492 2012-03-22 Release Manager
1494 * GCC 4.7.0 released.
1495 Index: gcc/testsuite/g++.dg/ext/attrib44.C
1496 ===================================================================
1497 --- gcc/testsuite/g++.dg/ext/attrib44.C (.../tags/gcc_4_7_0_release) (wersja 0)
1498 +++ gcc/testsuite/g++.dg/ext/attrib44.C (.../branches/gcc-4_7-branch) (wersja 185750)
1501 +// { dg-do compile }
1502 +__attribute__ ((deprecated)) enum E { E0 }; // { dg-warning "attribute ignored in declaration of" }
1503 +// { dg-message "must follow the" "" { target *-*-* } 3 }
1504 Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C
1505 ===================================================================
1506 --- gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C (.../tags/gcc_4_7_0_release) (wersja 0)
1507 +++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C (.../branches/gcc-4_7-branch) (wersja 185750)
1510 +// { dg-options "-std=c++0x" }
1512 +struct A; // { dg-error "forward declaration" }
1516 + [=](){a;}; // { dg-error "invalid use of incomplete type" }
1518 Index: gcc/testsuite/g++.dg/cpp0x/udlit-args2.C
1519 ===================================================================
1520 --- gcc/testsuite/g++.dg/cpp0x/udlit-args2.C (.../tags/gcc_4_7_0_release) (wersja 0)
1521 +++ gcc/testsuite/g++.dg/cpp0x/udlit-args2.C (.../branches/gcc-4_7-branch) (wersja 185750)
1524 +// { dg-do compile }
1525 +// { dg-options -std=c++11 }
1529 +int operator "" _a (const char *);
1530 +int operator "" _a (const char *, std::size_t);
1534 +int operator "" _b (const char *, std::size_t);
1535 +int operator "" _b (const char *);
1538 Index: gcc/testsuite/g++.dg/torture/pr52582.C
1539 ===================================================================
1540 --- gcc/testsuite/g++.dg/torture/pr52582.C (.../tags/gcc_4_7_0_release) (wersja 0)
1541 +++ gcc/testsuite/g++.dg/torture/pr52582.C (.../branches/gcc-4_7-branch) (wersja 185750)
1545 +inline void *operator new (__SIZE_TYPE__, void *p) throw ()
1557 + virtual void bar ();
1563 + B *b = new (&a) A ();
1566 Index: gcc/cp/class.c
1567 ===================================================================
1568 --- gcc/cp/class.c (.../tags/gcc_4_7_0_release) (wersja 185750)
1569 +++ gcc/cp/class.c (.../branches/gcc-4_7-branch) (wersja 185750)
1570 @@ -3145,8 +3145,9 @@
1571 CLASSTYPE_NON_AGGREGATE (t) = 1;
1573 /* If at least one non-static data member is non-literal, the whole
1574 - class becomes non-literal. */
1575 - if (!literal_type_p (type))
1576 + class becomes non-literal. Note: if the type is incomplete we
1577 + will complain later on. */
1578 + if (COMPLETE_TYPE_P (type) && !literal_type_p (type))
1579 CLASSTYPE_LITERAL_P (t) = false;
1581 /* A standard-layout class is a class that:
1582 Index: gcc/cp/decl.c
1583 ===================================================================
1584 --- gcc/cp/decl.c (.../tags/gcc_4_7_0_release) (wersja 185750)
1585 +++ gcc/cp/decl.c (.../branches/gcc-4_7-branch) (wersja 185750)
1586 @@ -4219,7 +4219,8 @@
1587 if (declspecs->attributes)
1589 location_t loc = input_location;
1590 - if (!CLASSTYPE_TEMPLATE_INSTANTIATION (declared_type))
1591 + if (!CLASS_TYPE_P (declared_type)
1592 + || !CLASSTYPE_TEMPLATE_INSTANTIATION (declared_type))
1593 /* For a non-template class, use the name location; for a template
1594 class (an explicit instantiation), use the current location. */
1595 input_location = location_of (declared_type);
1596 Index: gcc/cp/method.c
1597 ===================================================================
1598 --- gcc/cp/method.c (.../tags/gcc_4_7_0_release) (wersja 185750)
1599 +++ gcc/cp/method.c (.../branches/gcc-4_7-branch) (wersja 185750)
1600 @@ -1590,6 +1590,7 @@
1601 DECL_DELETED_FN (fn) = deleted_p;
1602 DECL_DECLARED_CONSTEXPR_P (fn) = constexpr_p;
1604 + DECL_EXTERNAL (fn) = true;
1605 DECL_NOT_REALLY_EXTERN (fn) = 1;
1606 DECL_DECLARED_INLINE_P (fn) = 1;
1607 gcc_assert (!TREE_USED (fn));
1608 Index: gcc/cp/ChangeLog
1609 ===================================================================
1610 --- gcc/cp/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185750)
1611 +++ gcc/cp/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185750)
1613 +2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
1616 + * class.c (check_field_decls): Call literal_type_p only
1617 + on complete types.
1619 +2012-03-22 Jakub Jelinek <jakub@redhat.com>
1622 + * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
1623 + on CLASS_TYPE_P types.
1625 +2012-03-22 Jason Merrill <jason@redhat.com>
1628 + * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
1630 +2012-03-22 Jakub Jelinek <jakub@redhat.com>
1632 + Backported from mainline
1633 + 2012-03-14 Jakub Jelinek <jakub@redhat.com>
1636 + * parser.c (lookup_literal_operator): Return fn only if
1637 + processed all arguments from args vector and argtypes is
1640 2012-03-22 Release Manager
1642 * GCC 4.7.0 released.
1643 Index: gcc/cp/parser.c
1644 ===================================================================
1645 --- gcc/cp/parser.c (.../tags/gcc_4_7_0_release) (wersja 185750)
1646 +++ gcc/cp/parser.c (.../branches/gcc-4_7-branch) (wersja 185750)
1649 Copyright (C) 2000, 2001, 2002, 2003, 2004,
1650 - 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
1651 + 2005, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
1652 Written by Mark Mitchell <mark@codesourcery.com>.
1654 This file is part of GCC.
1655 @@ -3581,7 +3581,13 @@
1656 TREE_TYPE (tparm))))
1661 + && ix == VEC_length (tree, args)
1662 + /* May be this should be sufficient_parms_p instead,
1663 + depending on how exactly should user-defined literals
1664 + work in presence of default arguments on the literal
1665 + operator parameters. */
1666 + && argtypes == void_list_node)
1670 Index: gcc/fortran/ChangeLog
1671 ===================================================================
1672 --- gcc/fortran/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185750)
1673 +++ gcc/fortran/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185750)
1675 +2012-03-22 Tobias Burnus <burnus@net-b.de>
1678 + * resolve.c (resolve_intrinsic): Don't search for a
1679 + function if we know that it is a subroutine.
1681 2012-03-22 Release Manager
1683 * GCC 4.7.0 released.
1684 Index: gcc/fortran/resolve.c
1685 ===================================================================
1686 --- gcc/fortran/resolve.c (.../tags/gcc_4_7_0_release) (wersja 185750)
1687 +++ gcc/fortran/resolve.c (.../branches/gcc-4_7-branch) (wersja 185750)
1688 @@ -1496,7 +1496,7 @@
1690 if (sym->intmod_sym_id)
1691 isym = gfc_intrinsic_function_by_id ((gfc_isym_id) sym->intmod_sym_id);
1693 + else if (!sym->attr.subroutine)
1694 isym = gfc_find_function (sym->name);
1698 ===================================================================
1699 --- gcc/BASE-VER (.../tags/gcc_4_7_0_release) (wersja 185750)
1700 +++ gcc/BASE-VER (.../branches/gcc-4_7-branch) (wersja 185750)
1704 Index: gcc/tree-nested.c
1705 ===================================================================
1706 --- gcc/tree-nested.c (.../tags/gcc_4_7_0_release) (wersja 185750)
1707 +++ gcc/tree-nested.c (.../branches/gcc-4_7-branch) (wersja 185750)
1708 @@ -1954,6 +1954,7 @@
1709 convert_tramp_reference_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p,
1710 struct walk_stmt_info *wi)
1712 + struct nesting_info *info = (struct nesting_info *) wi->info;
1713 gimple stmt = gsi_stmt (*gsi);
1715 switch (gimple_code (stmt))
1716 @@ -1966,16 +1967,33 @@
1717 for (i = 0; i < nargs; i++)
1718 walk_tree (gimple_call_arg_ptr (stmt, i), convert_tramp_reference_op,
1723 - *handled_ops_p = true;
1725 + case GIMPLE_OMP_PARALLEL:
1726 + case GIMPLE_OMP_TASK:
1728 + tree save_local_var_chain;
1729 + walk_gimple_op (stmt, convert_tramp_reference_op, wi);
1730 + save_local_var_chain = info->new_local_var_chain;
1731 + info->new_local_var_chain = NULL;
1732 + walk_body (convert_tramp_reference_stmt, convert_tramp_reference_op,
1733 + info, gimple_omp_body (stmt));
1734 + if (info->new_local_var_chain)
1735 + declare_vars (info->new_local_var_chain,
1736 + gimple_seq_first_stmt (gimple_omp_body (stmt)),
1738 + info->new_local_var_chain = save_local_var_chain;
1743 + *handled_ops_p = false;
1748 - *handled_ops_p = false;
1749 + *handled_ops_p = true;
1754 ===================================================================
1755 --- gcc/output.h (.../tags/gcc_4_7_0_release) (wersja 185750)
1756 +++ gcc/output.h (.../branches/gcc-4_7-branch) (wersja 185750)
1758 #define SECTION_STYLE_MASK 0x600000 /* bits used for SECTION_STYLE */
1759 #define SECTION_COMMON 0x800000 /* contains common data */
1760 #define SECTION_RELRO 0x1000000 /* data is readonly after relocation processing */
1761 -#define SECTION_MACH_DEP 0x2000000 /* subsequent bits reserved for target */
1762 -#define SECTION_EXCLUDE 0x4000000 /* discarded by the linker */
1763 +#define SECTION_EXCLUDE 0x2000000 /* discarded by the linker */
1764 +#define SECTION_MACH_DEP 0x4000000 /* subsequent bits reserved for target */
1766 /* This SECTION_STYLE is used for unnamed sections that we can switch
1767 to using a special assembler directive. */
1768 Index: gcc/c-parser.c
1769 ===================================================================
1770 --- gcc/c-parser.c (.../tags/gcc_4_7_0_release) (wersja 185750)
1771 +++ gcc/c-parser.c (.../branches/gcc-4_7-branch) (wersja 185750)
1773 /* Parser for C and Objective-C.
1774 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1775 - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
1776 - Free Software Foundation, Inc.
1777 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011,
1778 + 2012 Free Software Foundation, Inc.
1780 Parser actions based on the old Bison parser; structure somewhat
1781 influenced by and fragments based on the C++ parser.
1782 @@ -6647,6 +6647,8 @@
1783 case RID_BUILTIN_SHUFFLE:
1785 VEC(c_expr_t,gc) *cexpr_list;
1789 c_parser_consume_token (parser);
1790 if (!c_parser_get_builtin_args (parser,
1791 @@ -6657,6 +6659,9 @@
1795 + FOR_EACH_VEC_ELT (c_expr_t, cexpr_list, i, p)
1796 + mark_exp_read (p->value);
1798 if (VEC_length (c_expr_t, cexpr_list) == 2)
1800 c_build_vec_perm_expr
1801 Index: gcc/config/i386/nmmintrin.h
1802 ===================================================================
1803 --- gcc/config/i386/nmmintrin.h (.../tags/gcc_4_7_0_release) (wersja 185750)
1804 +++ gcc/config/i386/nmmintrin.h (.../branches/gcc-4_7-branch) (wersja 185750)
1806 -/* Copyright (C) 2007, 2009 Free Software Foundation, Inc.
1807 +/* Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc.
1809 This file is part of GCC.
1812 You should have received a copy of the GNU General Public License and
1813 a copy of the GCC Runtime Library Exception along with this program;
1814 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
1815 - <http://www.gnu.org/licenses/>.
1816 + <http://www.gnu.org/licenses/>. */
1818 /* Implemented from the specification included in the Intel C++ Compiler
1819 User Guide and Reference, version 10.0. */
1820 Index: gcc/config/i386/smmintrin.h
1821 ===================================================================
1822 --- gcc/config/i386/smmintrin.h (.../tags/gcc_4_7_0_release) (wersja 185750)
1823 +++ gcc/config/i386/smmintrin.h (.../branches/gcc-4_7-branch) (wersja 185750)
1825 -/* Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
1826 +/* Copyright (C) 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc.
1828 This file is part of GCC.
1831 You should have received a copy of the GNU General Public License and
1832 a copy of the GCC Runtime Library Exception along with this program;
1833 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
1834 - <http://www.gnu.org/licenses/>.
1835 + <http://www.gnu.org/licenses/>. */
1838 /* Implemented from the specification included in the Intel C++ Compiler
1839 User Guide and Reference, version 10.0. */
1841 Index: gcc/config/sh/sh.c
1842 ===================================================================
1843 --- gcc/config/sh/sh.c (.../tags/gcc_4_7_0_release) (wersja 185750)
1844 +++ gcc/config/sh/sh.c (.../branches/gcc-4_7-branch) (wersja 185750)
1846 /* Output routines for GCC for Renesas / SuperH SH.
1847 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
1848 - 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
1849 + 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
1850 Free Software Foundation, Inc.
1851 Contributed by Steve Chamberlain (sac@cygnus.com).
1852 Improved by Jim Wilson (wilson@cygnus.com).
1853 @@ -11497,9 +11497,16 @@
1854 && REGCLASS_HAS_GENERAL_REG (srcclass))
1855 || (REGCLASS_HAS_GENERAL_REG (dstclass)
1856 && REGCLASS_HAS_FP_REG (srcclass)))
1857 - return ((TARGET_SHMEDIA ? 4 : TARGET_FMOVD ? 8 : 12)
1858 - * ((GET_MODE_SIZE (mode) + 7) / 8U));
1860 + /* Discourage trying to use fp regs for a pointer. This also
1861 + discourages fp regs with SImode because Pmode is an alias
1862 + of SImode on this target. See PR target/48596. */
1863 + int addend = (mode == Pmode) ? 40 : 0;
1865 + return (((TARGET_SHMEDIA ? 4 : TARGET_FMOVD ? 8 : 12) + addend)
1866 + * ((GET_MODE_SIZE (mode) + 7) / 8U));
1869 if ((dstclass == FPUL_REGS
1870 && REGCLASS_HAS_GENERAL_REG (srcclass))
1871 || (srcclass == FPUL_REGS
1872 Index: gcc/config/avr/avr.md
1873 ===================================================================
1874 --- gcc/config/avr/avr.md (.../tags/gcc_4_7_0_release) (wersja 185750)
1875 +++ gcc/config/avr/avr.md (.../branches/gcc-4_7-branch) (wersja 185750)
1886 UNSPECV_GOTO_RECEIVER
1888 + UNSPECV_MEMORY_BARRIER
1893 "out_bitop, out_plus, out_plus_noclobber, plus64, addto_sp,
1894 tsthi, tstpsi, tstsi, compare, compare64, call,
1895 mov8, mov16, mov24, mov32, reload_in16, reload_in24, reload_in32,
1897 + xload, movmem, load_lpm,
1898 ashlqi, ashrqi, lshrqi,
1899 ashlhi, ashrhi, lshrhi,
1900 ashlsi, ashrsi, lshrsi,
1901 @@ -363,36 +365,63 @@
1902 ;;========================================================================
1903 ;; Move stuff around
1905 -(define_expand "load<mode>_libgcc"
1906 - [(set (match_dup 3)
1908 - (set (reg:MOVMODE 22)
1909 - (match_operand:MOVMODE 1 "memory_operand" ""))
1910 - (set (match_operand:MOVMODE 0 "register_operand" "")
1911 - (reg:MOVMODE 22))]
1912 - "avr_load_libgcc_p (operands[1])"
1914 - operands[3] = gen_rtx_REG (HImode, REG_Z);
1915 - operands[2] = force_operand (XEXP (operands[1], 0), NULL_RTX);
1916 - operands[1] = replace_equiv_address (operands[1], operands[3]);
1917 - set_mem_addr_space (operands[1], ADDR_SPACE_FLASH);
1920 +;; Represent a load from __flash that needs libgcc support as UNSPEC.
1921 +;; This is legal because we read from non-changing memory.
1922 +;; For rationale see the FIXME below.
1924 +;; "load_psi_libgcc"
1925 +;; "load_si_libgcc"
1926 +;; "load_sf_libgcc"
1927 (define_insn "load_<mode>_libgcc"
1928 [(set (reg:MOVMODE 22)
1929 - (match_operand:MOVMODE 0 "memory_operand" "m,m"))]
1930 - "avr_load_libgcc_p (operands[0])
1931 - && REG_P (XEXP (operands[0], 0))
1932 - && REG_Z == REGNO (XEXP (operands[0], 0))"
1933 + (unspec:MOVMODE [(reg:HI REG_Z)]
1937 - operands[0] = GEN_INT (GET_MODE_SIZE (<MODE>mode));
1938 - return "%~call __load_%0";
1939 + rtx n_bytes = GEN_INT (GET_MODE_SIZE (<MODE>mode));
1940 + output_asm_insn ("%~call __load_%0", &n_bytes);
1943 - [(set_attr "length" "1,2")
1944 - (set_attr "isa" "rjmp,jmp")
1945 + [(set_attr "type" "xcall")
1946 (set_attr "cc" "clobber")])
1949 +;; Similar for inline reads from flash. We use UNSPEC instead
1950 +;; of MEM for the same reason as above: PR52543.
1951 +;; $1 contains the memory segment.
1953 +(define_insn "load_<mode>"
1954 + [(set (match_operand:MOVMODE 0 "register_operand" "=r")
1955 + (unspec:MOVMODE [(reg:HI REG_Z)
1956 + (match_operand:QI 1 "reg_or_0_operand" "rL")]
1958 + "(CONST_INT_P (operands[1]) && AVR_HAVE_LPMX)
1959 + || (REG_P (operands[1]) && AVR_HAVE_ELPMX)"
1961 + return avr_load_lpm (insn, operands, NULL);
1963 + [(set_attr "adjust_len" "load_lpm")
1964 + (set_attr "cc" "clobber")])
1967 +;; Similar to above for the complementary situation when there is no [E]LPMx.
1968 +;; Clobber Z in that case.
1970 +(define_insn "load_<mode>_clobber"
1971 + [(set (match_operand:MOVMODE 0 "register_operand" "=r")
1972 + (unspec:MOVMODE [(reg:HI REG_Z)
1973 + (match_operand:QI 1 "reg_or_0_operand" "rL")]
1975 + (clobber (reg:HI REG_Z))]
1976 + "!((CONST_INT_P (operands[1]) && AVR_HAVE_LPMX)
1977 + || (REG_P (operands[1]) && AVR_HAVE_ELPMX))"
1979 + return avr_load_lpm (insn, operands, NULL);
1981 + [(set_attr "adjust_len" "load_lpm")
1982 + (set_attr "cc" "clobber")])
1985 (define_insn_and_split "xload8_A"
1986 [(set (match_operand:QI 0 "register_operand" "=r")
1987 (match_operand:QI 1 "memory_operand" "m"))
1988 @@ -418,9 +447,15 @@
1997 (define_insn_and_split "xload<mode>_A"
1998 [(set (match_operand:MOVMODE 0 "register_operand" "=r")
1999 (match_operand:MOVMODE 1 "memory_operand" "m"))
2000 + (clobber (reg:MOVMODE 22))
2001 (clobber (reg:QI 21))
2002 (clobber (reg:HI REG_Z))]
2003 "can_create_pseudo_p()
2006 return avr_out_xload (insn, operands, NULL);
2008 - [(set_attr "length" "3,4")
2009 + [(set_attr "length" "4,4")
2010 (set_attr "adjust_len" "*,xload")
2011 (set_attr "isa" "lpmx,lpm")
2012 (set_attr "cc" "none")])
2013 @@ -532,12 +567,55 @@
2017 + /* For old devices without LPMx, prefer __flash loads per libcall. */
2019 if (avr_load_libgcc_p (src))
2021 - /* For the small devices, do loads per libgcc call. */
2022 - emit_insn (gen_load<mode>_libgcc (dest, src));
2023 + emit_move_insn (gen_rtx_REG (Pmode, REG_Z),
2024 + force_reg (Pmode, XEXP (src, 0)));
2026 + emit_insn (gen_load_<mode>_libgcc ());
2027 + emit_move_insn (dest, gen_rtx_REG (<MODE>mode, 22));
2031 + /* ; FIXME: Hack around PR rtl-optimization/52543.
2032 + ; lower-subreg.c splits loads from the 16-bit address spaces which
2033 + ; causes code bloat because each load need his setting of RAMPZ.
2034 + ; Moreover, the split will happen in such a way that the loads don't
2035 + ; take advantage of POST_INC addressing. Thus, we use UNSPEC to
2036 + ; represent these loads instead. Notice that this is legitimate
2037 + ; because the memory content does not change: Loads from the same
2038 + ; address will yield the same value.
2039 + ; POST_INC addressing would make the addresses mode_dependent and could
2040 + ; work around that PR, too. However, notice that it is *not* legitimate
2041 + ; to expand to POST_INC at expand time: The following passes assert
2042 + ; that pre-/post-modify addressing is introduced by .auto_inc_dec and
2043 + ; does not exist before that pass. */
2045 + if (avr_mem_flash_p (src)
2046 + && (GET_MODE_SIZE (<MODE>mode) > 1
2047 + || MEM_ADDR_SPACE (src) != ADDR_SPACE_FLASH))
2049 + rtx xsegment = GEN_INT (avr_addrspace[MEM_ADDR_SPACE (src)].segment);
2050 + if (!AVR_HAVE_ELPM)
2051 + xsegment = const0_rtx;
2052 + if (xsegment != const0_rtx)
2053 + xsegment = force_reg (QImode, xsegment);
2055 + emit_move_insn (gen_rtx_REG (Pmode, REG_Z),
2056 + force_reg (Pmode, XEXP (src, 0)));
2058 + if ((CONST_INT_P (xsegment) && AVR_HAVE_LPMX)
2059 + || (REG_P (xsegment) && AVR_HAVE_ELPMX))
2060 + emit_insn (gen_load_<mode> (dest, xsegment));
2062 + emit_insn (gen_load_<mode>_clobber (dest, xsegment));
2066 + /* ; The only address-space for which we use plain MEM and reload
2067 + ; machinery are 1-byte loads from __flash. */
2070 ;;========================================================================
2071 @@ -677,40 +755,6 @@
2072 operands[5] = gen_rtx_REG (HImode, REGNO (operands[3]));
2075 -;; For LPM loads from AS1 we split
2079 -;; Z = Z - sizeof (R)
2081 -;; so that the second instruction can be optimized out.
2083 -(define_split ; "split-lpmx"
2084 - [(set (match_operand:HISI 0 "register_operand" "")
2085 - (match_operand:HISI 1 "memory_operand" ""))]
2088 - [(set (match_dup 0)
2090 - (set (match_dup 3)
2091 - (plus:HI (match_dup 3)
2094 - rtx addr = XEXP (operands[1], 0);
2096 - if (!avr_mem_flash_p (operands[1])
2098 - || reg_overlap_mentioned_p (addr, operands[0]))
2103 - operands[2] = replace_equiv_address (operands[1],
2104 - gen_rtx_POST_INC (Pmode, addr));
2105 - operands[3] = addr;
2106 - operands[4] = gen_int_mode (-GET_MODE_SIZE (<MODE>mode), HImode);
2109 ;;==========================================================================
2110 ;; xpointer move (24 bit)
2112 @@ -1081,15 +1125,16 @@
2113 (set_attr "adjust_len" "addto_sp")])
2115 (define_insn "*addhi3"
2116 - [(set (match_operand:HI 0 "register_operand" "=r,d,d")
2117 - (plus:HI (match_operand:HI 1 "register_operand" "%0,0,0")
2118 - (match_operand:HI 2 "nonmemory_operand" "r,s,n")))]
2119 + [(set (match_operand:HI 0 "register_operand" "=r,d,!w,d")
2120 + (plus:HI (match_operand:HI 1 "register_operand" "%0,0,0 ,0")
2121 + (match_operand:HI 2 "nonmemory_operand" "r,s,IJ,n")))]
2124 static const char * const asm_code[] =
2126 "add %A0,%A2\;adc %B0,%B2",
2127 "subi %A0,lo8(-(%2))\;sbci %B0,hi8(-(%2))",
2132 @@ -1098,9 +1143,9 @@
2134 return avr_out_plus_noclobber (operands, NULL, NULL);
2136 - [(set_attr "length" "2,2,2")
2137 - (set_attr "adjust_len" "*,*,out_plus_noclobber")
2138 - (set_attr "cc" "set_n,set_czn,out_plus_noclobber")])
2139 + [(set_attr "length" "2,2,2,2")
2140 + (set_attr "adjust_len" "*,*,out_plus_noclobber,out_plus_noclobber")
2141 + (set_attr "cc" "set_n,set_czn,out_plus_noclobber,out_plus_noclobber")])
2143 ;; Adding a constant to NO_LD_REGS might have lead to a reload of
2144 ;; that constant to LD_REGS. We don't add a scratch to *addhi3
2145 @@ -1138,10 +1183,10 @@
2146 (clobber (match_dup 2))])])
2148 (define_insn "addhi3_clobber"
2149 - [(set (match_operand:HI 0 "register_operand" "=d,l")
2150 - (plus:HI (match_operand:HI 1 "register_operand" "%0,0")
2151 - (match_operand:HI 2 "const_int_operand" "n,n")))
2152 - (clobber (match_scratch:QI 3 "=X,&d"))]
2153 + [(set (match_operand:HI 0 "register_operand" "=!w,d,r")
2154 + (plus:HI (match_operand:HI 1 "register_operand" "%0,0,0")
2155 + (match_operand:HI 2 "const_int_operand" "IJ,n,n")))
2156 + (clobber (match_scratch:QI 3 "=X,X,&d"))]
2159 gcc_assert (REGNO (operands[0]) == REGNO (operands[1]));
2160 @@ -1692,6 +1737,29 @@
2162 ;; Handle small constants
2164 +;; Special case of a += 2*b as frequently seen with accesses to int arrays.
2165 +;; This is shorter, faster than MUL and has lower register pressure.
2167 +(define_insn_and_split "*umaddqihi4.2"
2168 + [(set (match_operand:HI 0 "register_operand" "=r")
2169 + (plus:HI (mult:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r"))
2171 + (match_operand:HI 2 "register_operand" "r")))]
2172 + "!reload_completed
2173 + && !reg_overlap_mentioned_p (operands[0], operands[1])"
2174 + { gcc_unreachable(); }
2176 + [(set (match_dup 0)
2178 + ; *addhi3_zero_extend
2179 + (set (match_dup 0)
2180 + (plus:HI (zero_extend:HI (match_dup 1))
2182 + ; *addhi3_zero_extend
2183 + (set (match_dup 0)
2184 + (plus:HI (zero_extend:HI (match_dup 1))
2187 ;; "umaddqihi4.uconst"
2188 ;; "maddqihi4.sconst"
2189 (define_insn_and_split "*<extend_u>maddqihi4.<extend_su>const"
2190 @@ -5198,18 +5266,36 @@
2191 (set_attr "length" "1")])
2193 ;; Enable Interrupts
2194 -(define_insn "enable_interrupt"
2195 - [(unspec_volatile [(const_int 1)] UNSPECV_ENABLE_IRQS)]
2196 +(define_expand "enable_interrupt"
2197 + [(clobber (const_int 0))]
2200 - [(set_attr "length" "1")
2201 - (set_attr "cc" "none")])
2203 + rtx mem = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
2204 + MEM_VOLATILE_P (mem) = 1;
2205 + emit_insn (gen_cli_sei (const1_rtx, mem));
2209 ;; Disable Interrupts
2210 -(define_insn "disable_interrupt"
2211 - [(unspec_volatile [(const_int 0)] UNSPECV_ENABLE_IRQS)]
2212 +(define_expand "disable_interrupt"
2213 + [(clobber (const_int 0))]
2217 + rtx mem = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
2218 + MEM_VOLATILE_P (mem) = 1;
2219 + emit_insn (gen_cli_sei (const0_rtx, mem));
2223 +(define_insn "cli_sei"
2224 + [(unspec_volatile [(match_operand:QI 0 "const_int_operand" "L,P")]
2225 + UNSPECV_ENABLE_IRQS)
2226 + (set (match_operand:BLK 1 "" "")
2227 + (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))]
2232 [(set_attr "length" "1")
2233 (set_attr "cc" "none")])
2235 @@ -5316,10 +5402,12 @@
2236 [(unspec_volatile [(match_operand:QI 0 "const_int_operand" "n")
2238 UNSPECV_DELAY_CYCLES)
2239 - (clobber (match_scratch:QI 1 "=&d"))]
2240 + (set (match_operand:BLK 1 "" "")
2241 + (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))
2242 + (clobber (match_scratch:QI 2 "=&d"))]
2249 [(set_attr "length" "3")
2250 (set_attr "cc" "clobber")])
2251 @@ -5328,11 +5416,13 @@
2252 [(unspec_volatile [(match_operand:HI 0 "const_int_operand" "n")
2254 UNSPECV_DELAY_CYCLES)
2255 - (clobber (match_scratch:HI 1 "=&w"))]
2256 + (set (match_operand:BLK 1 "" "")
2257 + (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))
2258 + (clobber (match_scratch:HI 2 "=&w"))]
2267 [(set_attr "length" "4")
2268 (set_attr "cc" "clobber")])
2269 @@ -5341,16 +5431,18 @@
2270 [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "n")
2272 UNSPECV_DELAY_CYCLES)
2273 - (clobber (match_scratch:QI 1 "=&d"))
2274 + (set (match_operand:BLK 1 "" "")
2275 + (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))
2276 (clobber (match_scratch:QI 2 "=&d"))
2277 - (clobber (match_scratch:QI 3 "=&d"))]
2278 + (clobber (match_scratch:QI 3 "=&d"))
2279 + (clobber (match_scratch:QI 4 "=&d"))]
2293 [(set_attr "length" "7")
2294 (set_attr "cc" "clobber")])
2295 @@ -5359,19 +5451,21 @@
2296 [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "n")
2298 UNSPECV_DELAY_CYCLES)
2299 - (clobber (match_scratch:QI 1 "=&d"))
2300 + (set (match_operand:BLK 1 "" "")
2301 + (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))
2302 (clobber (match_scratch:QI 2 "=&d"))
2303 (clobber (match_scratch:QI 3 "=&d"))
2304 - (clobber (match_scratch:QI 4 "=&d"))]
2305 + (clobber (match_scratch:QI 4 "=&d"))
2306 + (clobber (match_scratch:QI 5 "=&d"))]
2323 [(set_attr "length" "9")
2324 (set_attr "cc" "clobber")])
2325 @@ -5757,9 +5851,23 @@
2328 ;; NOP taking 1 or 2 Ticks
2329 -(define_insn "nopv"
2330 +(define_expand "nopv"
2331 + [(parallel [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "")]
2333 + (set (match_dup 1)
2334 + (unspec_volatile:BLK [(match_dup 1)]
2335 + UNSPECV_MEMORY_BARRIER))])]
2338 + operands[1] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
2339 + MEM_VOLATILE_P (operands[1]) = 1;
2342 +(define_insn "*nopv"
2343 [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "P,K")]
2346 + (set (match_operand:BLK 1 "" "")
2347 + (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))]
2351 @@ -5768,17 +5876,43 @@
2352 (set_attr "cc" "none")])
2355 -(define_insn "sleep"
2356 - [(unspec_volatile [(const_int 0)] UNSPECV_SLEEP)]
2357 +(define_expand "sleep"
2358 + [(parallel [(unspec_volatile [(const_int 0)] UNSPECV_SLEEP)
2359 + (set (match_dup 0)
2360 + (unspec_volatile:BLK [(match_dup 0)]
2361 + UNSPECV_MEMORY_BARRIER))])]
2364 + operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
2365 + MEM_VOLATILE_P (operands[0]) = 1;
2368 +(define_insn "*sleep"
2369 + [(unspec_volatile [(const_int 0)] UNSPECV_SLEEP)
2370 + (set (match_operand:BLK 0 "" "")
2371 + (unspec_volatile:BLK [(match_dup 0)] UNSPECV_MEMORY_BARRIER))]
2374 [(set_attr "length" "1")
2375 (set_attr "cc" "none")])
2379 - [(unspec_volatile [(const_int 0)] UNSPECV_WDR)]
2380 +(define_expand "wdr"
2381 + [(parallel [(unspec_volatile [(const_int 0)] UNSPECV_WDR)
2382 + (set (match_dup 0)
2383 + (unspec_volatile:BLK [(match_dup 0)]
2384 + UNSPECV_MEMORY_BARRIER))])]
2387 + operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
2388 + MEM_VOLATILE_P (operands[0]) = 1;
2391 +(define_insn "*wdr"
2392 + [(unspec_volatile [(const_int 0)] UNSPECV_WDR)
2393 + (set (match_operand:BLK 0 "" "")
2394 + (unspec_volatile:BLK [(match_dup 0)] UNSPECV_MEMORY_BARRIER))]
2397 [(set_attr "length" "1")
2398 (set_attr "cc" "none")])
2399 Index: gcc/config/avr/avr-protos.h
2400 ===================================================================
2401 --- gcc/config/avr/avr-protos.h (.../tags/gcc_4_7_0_release) (wersja 185750)
2402 +++ gcc/config/avr/avr-protos.h (.../branches/gcc-4_7-branch) (wersja 185750)
2404 extern const char *avr_out_ashrpsi3 (rtx, rtx*, int*);
2405 extern const char *avr_out_lshrpsi3 (rtx, rtx*, int*);
2407 +extern const char* avr_load_lpm (rtx, rtx*, int*);
2409 extern bool avr_rotate_bytes (rtx operands[]);
2411 extern void expand_prologue (void);
2413 extern RTX_CODE avr_normalize_condition (RTX_CODE condition);
2414 extern void out_shift_with_cnt (const char *templ, rtx insn,
2415 rtx operands[], int *len, int t_len);
2416 -extern reg_class_t avr_mode_code_base_reg_class (enum machine_mode, addr_space_t, RTX_CODE, RTX_CODE);
2417 +extern enum reg_class avr_mode_code_base_reg_class (enum machine_mode, addr_space_t, RTX_CODE, RTX_CODE);
2418 extern bool avr_regno_mode_code_ok_for_base_p (int, enum machine_mode, addr_space_t, RTX_CODE, RTX_CODE);
2419 extern rtx avr_incoming_return_addr_rtx (void);
2420 extern rtx avr_legitimize_reload_address (rtx*, enum machine_mode, int, int, int, int, rtx (*)(rtx,int));
2421 Index: gcc/config/avr/avr.c
2422 ===================================================================
2423 --- gcc/config/avr/avr.c (.../tags/gcc_4_7_0_release) (wersja 185750)
2424 +++ gcc/config/avr/avr.c (.../branches/gcc-4_7-branch) (wersja 185750)
2425 @@ -827,7 +827,11 @@
2426 bool isr_p = cfun->machine->is_interrupt || cfun->machine->is_signal;
2427 int live_seq = sequent_regs_live ();
2429 + HOST_WIDE_INT size_max
2430 + = (HOST_WIDE_INT) GET_MODE_MASK (AVR_HAVE_8BIT_SP ? QImode : Pmode);
2432 bool minimize = (TARGET_CALL_PROLOGUES
2433 + && size < size_max
2436 && !cfun->machine->is_OS_task
2438 leaf function and thus X has already been saved. */
2441 + HOST_WIDE_INT size_cfa = size;
2442 rtx fp_plus_insns, fp, my_fp;
2444 gcc_assert (frame_pointer_needed
2445 @@ -951,6 +956,27 @@
2446 my_fp = all_regs_rtx[FRAME_POINTER_REGNUM];
2449 + /* Cut down size and avoid size = 0 so that we don't run
2450 + into ICE like PR52488 in the remainder. */
2452 + if (size > size_max)
2454 + /* Don't error so that insane code from newlib still compiles
2455 + and does not break building newlib. As PR51345 is implemented
2456 + now, there are multilib variants with -mtiny-stack.
2458 + If user wants sanity checks he can use -Wstack-usage=
2459 + or similar options.
2461 + For CFA we emit the original, non-saturated size so that
2462 + the generic machinery is aware of the real stack usage and
2463 + will print the above diagnostic as expected. */
2468 + size = trunc_int_for_mode (size, GET_MODE (my_fp));
2470 /************ Method 1: Adjust frame pointer ************/
2473 @@ -975,7 +1001,7 @@
2474 RTX_FRAME_RELATED_P (insn) = 1;
2475 add_reg_note (insn, REG_CFA_ADJUST_CFA,
2476 gen_rtx_SET (VOIDmode, fp,
2477 - plus_constant (fp, -size)));
2478 + plus_constant (fp, -size_cfa)));
2481 /* Copy to stack pointer. Note that since we've already
2482 @@ -1003,7 +1029,7 @@
2483 add_reg_note (insn, REG_CFA_ADJUST_CFA,
2484 gen_rtx_SET (VOIDmode, stack_pointer_rtx,
2485 plus_constant (stack_pointer_rtx,
2490 fp_plus_insns = get_insns ();
2491 @@ -1026,7 +1052,7 @@
2492 add_reg_note (insn, REG_CFA_ADJUST_CFA,
2493 gen_rtx_SET (VOIDmode, stack_pointer_rtx,
2494 plus_constant (stack_pointer_rtx,
2497 if (frame_pointer_needed)
2499 insn = emit_move_insn (fp, stack_pointer_rtx);
2500 @@ -1048,7 +1074,7 @@
2501 emit_insn (fp_plus_insns);
2504 - cfun->machine->stack_usage += size;
2505 + cfun->machine->stack_usage += size_cfa;
2506 } /* !minimize && size != 0 */
2509 @@ -1123,11 +1149,11 @@
2510 emit_push_sfr (rampy_rtx, false /* frame-related */, true /* clr */);
2513 - if (AVR_HAVE_RAMPZ
2514 + if (AVR_HAVE_RAMPZ
2515 && TEST_HARD_REG_BIT (set, REG_Z)
2516 && TEST_HARD_REG_BIT (set, REG_Z + 1))
2518 - emit_push_sfr (rampz_rtx, false /* frame-related */, true /* clr */);
2519 + emit_push_sfr (rampz_rtx, false /* frame-related */, AVR_HAVE_RAMPD);
2521 } /* is_interrupt is_signal */
2523 @@ -1261,6 +1287,7 @@
2527 + HOST_WIDE_INT size_max;
2529 gcc_assert (frame_pointer_needed
2531 @@ -1277,6 +1304,13 @@
2533 my_fp = all_regs_rtx[FRAME_POINTER_REGNUM];
2536 + /* For rationale see comment in prologue generation. */
2538 + size_max = (HOST_WIDE_INT) GET_MODE_MASK (GET_MODE (my_fp));
2539 + if (size > size_max)
2541 + size = trunc_int_for_mode (size, GET_MODE (my_fp));
2543 /********** Method 1: Adjust fp register **********/
2545 @@ -1347,12 +1381,12 @@
2546 /* Restore RAMPZ/Y/X/D using tmp_reg as scratch.
2547 The conditions to restore them must be tha same as in prologue. */
2549 - if (AVR_HAVE_RAMPX
2550 - && TEST_HARD_REG_BIT (set, REG_X)
2551 - && TEST_HARD_REG_BIT (set, REG_X + 1))
2552 + if (AVR_HAVE_RAMPZ
2553 + && TEST_HARD_REG_BIT (set, REG_Z)
2554 + && TEST_HARD_REG_BIT (set, REG_Z + 1))
2556 emit_pop_byte (TMP_REGNO);
2557 - emit_move_insn (rampx_rtx, tmp_reg_rtx);
2558 + emit_move_insn (rampz_rtx, tmp_reg_rtx);
2562 @@ -1364,12 +1398,12 @@
2563 emit_move_insn (rampy_rtx, tmp_reg_rtx);
2566 - if (AVR_HAVE_RAMPZ
2567 - && TEST_HARD_REG_BIT (set, REG_Z)
2568 - && TEST_HARD_REG_BIT (set, REG_Z + 1))
2569 + if (AVR_HAVE_RAMPX
2570 + && TEST_HARD_REG_BIT (set, REG_X)
2571 + && TEST_HARD_REG_BIT (set, REG_X + 1))
2573 emit_pop_byte (TMP_REGNO);
2574 - emit_move_insn (rampz_rtx, tmp_reg_rtx);
2575 + emit_move_insn (rampx_rtx, tmp_reg_rtx);
2579 @@ -1423,6 +1457,22 @@
2583 +/* Implement `TARGET_MODE_DEPENDENT_ADDRESS_P'. */
2585 +/* FIXME: PSImode addresses are not mode-dependent in themselves.
2586 + This hook just serves to hack around PR rtl-optimization/52543 by
2587 + claiming that PSImode addresses (which are used for the 24-bit
2588 + address space __memx) were mode-dependent so that lower-subreg.s
2589 + will skip these addresses. See also the similar FIXME comment along
2590 + with mov<mode> expanders in avr.md. */
2593 +avr_mode_dependent_address_p (const_rtx addr)
2595 + return GET_MODE (addr) != Pmode;
2599 /* Helper function for `avr_legitimate_address_p'. */
2602 @@ -2435,7 +2485,8 @@
2606 - && avr_mem_flash_p (op));
2608 + && MEM_ADDR_SPACE (op) == ADDR_SPACE_FLASH);
2611 /* Return true if a value of mode MODE is read by __xload_* function. */
2612 @@ -2450,155 +2501,6 @@
2616 -/* Find an unused d-register to be used as scratch in INSN.
2617 - EXCLUDE is either NULL_RTX or some register. In the case where EXCLUDE
2618 - is a register, skip all possible return values that overlap EXCLUDE.
2619 - The policy for the returned register is similar to that of
2620 - `reg_unused_after', i.e. the returned register may overlap the SET_DEST
2623 - Return a QImode d-register or NULL_RTX if nothing found. */
2626 -avr_find_unused_d_reg (rtx insn, rtx exclude)
2629 - bool isr_p = (interrupt_function_p (current_function_decl)
2630 - || signal_function_p (current_function_decl));
2632 - for (regno = 16; regno < 32; regno++)
2634 - rtx reg = all_regs_rtx[regno];
2637 - && reg_overlap_mentioned_p (exclude, reg))
2638 - || fixed_regs[regno])
2643 - /* Try non-live register */
2645 - if (!df_regs_ever_live_p (regno)
2646 - && (TREE_THIS_VOLATILE (current_function_decl)
2647 - || cfun->machine->is_OS_task
2648 - || cfun->machine->is_OS_main
2649 - || (!isr_p && call_used_regs[regno])))
2654 - /* Any live register can be used if it is unused after.
2655 - Prologue/epilogue will care for it as needed. */
2657 - if (df_regs_ever_live_p (regno)
2658 - && reg_unused_after (insn, reg))
2668 -/* Helper function for the next function in the case where only restricted
2669 - version of LPM instruction is available. */
2672 -avr_out_lpm_no_lpmx (rtx insn, rtx *xop, int *plen)
2674 - rtx dest = xop[0];
2675 - rtx addr = xop[1];
2676 - int n_bytes = GET_MODE_SIZE (GET_MODE (dest));
2679 - regno_dest = REGNO (dest);
2681 - /* The implicit target register of LPM. */
2682 - xop[3] = lpm_reg_rtx;
2684 - switch (GET_CODE (addr))
2687 - gcc_unreachable();
2691 - gcc_assert (REG_Z == REGNO (addr));
2696 - gcc_unreachable();
2699 - avr_asm_len ("%4lpm", xop, plen, 1);
2701 - if (regno_dest != LPM_REGNO)
2702 - avr_asm_len ("mov %0,%3", xop, plen, 1);
2707 - if (REGNO (dest) == REG_Z)
2708 - return avr_asm_len ("%4lpm" CR_TAB
2710 - "adiw %2,1" CR_TAB
2712 - "mov %B0,%3" CR_TAB
2713 - "pop %A0", xop, plen, 6);
2715 - avr_asm_len ("%4lpm" CR_TAB
2716 - "mov %A0,%3" CR_TAB
2717 - "adiw %2,1" CR_TAB
2719 - "mov %B0,%3", xop, plen, 5);
2721 - if (!reg_unused_after (insn, addr))
2722 - avr_asm_len ("sbiw %2,1", xop, plen, 1);
2731 - gcc_assert (REG_Z == REGNO (XEXP (addr, 0))
2734 - if (regno_dest == LPM_REGNO)
2735 - avr_asm_len ("%4lpm" CR_TAB
2736 - "adiw %2,1", xop, plen, 2);
2738 - avr_asm_len ("%4lpm" CR_TAB
2739 - "mov %A0,%3" CR_TAB
2740 - "adiw %2,1", xop, plen, 3);
2743 - avr_asm_len ("%4lpm" CR_TAB
2744 - "mov %B0,%3" CR_TAB
2745 - "adiw %2,1", xop, plen, 3);
2748 - avr_asm_len ("%4lpm" CR_TAB
2749 - "mov %C0,%3" CR_TAB
2750 - "adiw %2,1", xop, plen, 3);
2753 - avr_asm_len ("%4lpm" CR_TAB
2754 - "mov %D0,%3" CR_TAB
2755 - "adiw %2,1", xop, plen, 3);
2757 - break; /* POST_INC */
2759 - } /* switch CODE (addr) */
2765 /* If PLEN == NULL: Ouput instructions to load a value from a memory location
2766 OP[1] in AS1 to register OP[0].
2767 If PLEN != 0 set *PLEN to the length in words of the instruction sequence.
2768 @@ -2607,13 +2509,11 @@
2770 avr_out_lpm (rtx insn, rtx *op, int *plen)
2775 rtx src = SET_SRC (single_set (insn));
2777 int n_bytes = GET_MODE_SIZE (GET_MODE (dest));
2781 addr_space_t as = MEM_ADDR_SPACE (src);
2783 @@ -2634,135 +2534,126 @@
2784 gcc_assert (REG_P (dest));
2785 gcc_assert (REG == code || POST_INC == code);
2787 + /* Only 1-byte moves from __flash are representes as open coded
2788 + mov insns. All other loads from flash are not handled here but
2789 + by some UNSPEC instead, see respective FIXME in machine description. */
2791 + gcc_assert (as == ADDR_SPACE_FLASH);
2792 + gcc_assert (n_bytes == 1);
2796 - xop[2] = lpm_addr_reg_rtx;
2797 - xop[4] = xstring_empty;
2798 - xop[5] = tmp_reg_rtx;
2799 + xop[1] = lpm_addr_reg_rtx;
2800 + xop[2] = lpm_reg_rtx;
2802 - regno_dest = REGNO (dest);
2804 - segment = avr_addrspace[as].segment;
2806 - /* Set RAMPZ as needed. */
2811 - xop[4] = GEN_INT (segment);
2813 - if (xop[3] = avr_find_unused_d_reg (insn, lpm_addr_reg_rtx),
2816 - avr_asm_len ("ldi %3,%4" CR_TAB
2817 - "out __RAMPZ__,%3", xop, plen, 2);
2819 - else if (segment == 1)
2821 - avr_asm_len ("clr %5" CR_TAB
2823 - "out __RAMPZ__,%5", xop, plen, 3);
2827 - avr_asm_len ("mov %5,%2" CR_TAB
2828 - "ldi %2,%4" CR_TAB
2829 - "out __RAMPZ__,%2" CR_TAB
2830 - "mov %2,%5", xop, plen, 4);
2833 - xop[4] = xstring_e;
2835 - if (!AVR_HAVE_ELPMX)
2836 - return avr_out_lpm_no_lpmx (insn, xop, plen);
2838 - else if (!AVR_HAVE_LPMX)
2840 - return avr_out_lpm_no_lpmx (insn, xop, plen);
2843 - /* We have [E]LPMX: Output reading from Flash the comfortable way. */
2845 - switch (GET_CODE (addr))
2852 gcc_assert (REG_Z == REGNO (addr));
2854 + return AVR_HAVE_LPMX
2855 + ? avr_asm_len ("lpm %0,%a1", xop, plen, 1)
2856 + : avr_asm_len ("lpm" CR_TAB
2857 + "mov %0,%2", xop, plen, 2);
2861 + gcc_assert (REG_Z == REGNO (XEXP (addr, 0)));
2866 - gcc_unreachable();
2867 + return AVR_HAVE_LPMX
2868 + ? avr_asm_len ("lpm %0,%a1+", xop, plen, 1)
2869 + : avr_asm_len ("lpm" CR_TAB
2870 + "adiw %1, 1" CR_TAB
2871 + "mov %0,%2", xop, plen, 3);
2875 - return avr_asm_len ("%4lpm %0,%a2", xop, plen, 1);
2880 - if (REGNO (dest) == REG_Z)
2881 - return avr_asm_len ("%4lpm %5,%a2+" CR_TAB
2882 - "%4lpm %B0,%a2" CR_TAB
2883 - "mov %A0,%5", xop, plen, 3);
2886 - avr_asm_len ("%4lpm %A0,%a2+" CR_TAB
2887 - "%4lpm %B0,%a2", xop, plen, 2);
2889 - if (!reg_unused_after (insn, addr))
2890 - avr_asm_len ("sbiw %2,1", xop, plen, 1);
2896 +/* If PLEN == NULL: Ouput instructions to load $0 with a value from
2897 + flash address $1:Z. If $1 = 0 we can use LPM to read, otherwise
2899 + If PLEN != 0 set *PLEN to the length in words of the instruction sequence.
2902 - avr_asm_len ("%4lpm %A0,%a2+" CR_TAB
2903 - "%4lpm %B0,%a2+" CR_TAB
2904 - "%4lpm %C0,%a2", xop, plen, 3);
2906 - if (!reg_unused_after (insn, addr))
2907 - avr_asm_len ("sbiw %2,2", xop, plen, 1);
2911 +avr_load_lpm (rtx insn, rtx *op, int *plen)
2914 + int n, n_bytes = GET_MODE_SIZE (GET_MODE (op[0]));
2915 + rtx xsegment = op[1];
2916 + bool clobber_z = PARALLEL == GET_CODE (PATTERN (insn));
2917 + bool r30_in_tmp = false;
2922 + xop[1] = lpm_addr_reg_rtx;
2923 + xop[2] = lpm_reg_rtx;
2924 + xop[3] = xstring_empty;
2926 + /* Set RAMPZ as needed. */
2928 + if (REG_P (xsegment))
2930 + avr_asm_len ("out __RAMPZ__,%0", &xsegment, plen, 1);
2931 + xop[3] = xstring_e;
2934 + /* Load the individual bytes from LSB to MSB. */
2936 + for (n = 0; n < n_bytes; n++)
2938 + xop[0] = all_regs_rtx[REGNO (op[0]) + n];
2942 - avr_asm_len ("%4lpm %A0,%a2+" CR_TAB
2943 - "%4lpm %B0,%a2+", xop, plen, 2);
2945 - if (REGNO (dest) == REG_Z - 2)
2946 - return avr_asm_len ("%4lpm %5,%a2+" CR_TAB
2947 - "%4lpm %C0,%a2" CR_TAB
2948 - "mov %D0,%5", xop, plen, 3);
2950 + if ((CONST_INT_P (xsegment) && AVR_HAVE_LPMX)
2951 + || (REG_P (xsegment) && AVR_HAVE_ELPMX))
2953 + if (n == n_bytes-1)
2954 + avr_asm_len ("%3lpm %0,%a1", xop, plen, 1);
2955 + else if (REGNO (xop[0]) == REG_Z)
2957 - avr_asm_len ("%4lpm %C0,%a2+" CR_TAB
2958 - "%4lpm %D0,%a2", xop, plen, 2);
2960 - if (!reg_unused_after (insn, addr))
2961 - avr_asm_len ("sbiw %2,3", xop, plen, 1);
2962 + avr_asm_len ("%3lpm %2,%a1+", xop, plen, 1);
2963 + r30_in_tmp = true;
2966 + avr_asm_len ("%3lpm %0,%a1+", xop, plen, 1);
2970 + gcc_assert (clobber_z);
2972 + avr_asm_len ("%3lpm" CR_TAB
2973 + "mov %0,%2", xop, plen, 2);
2977 + if (n != n_bytes-1)
2978 + avr_asm_len ("adiw %1,1", xop, plen, 1);
2983 + avr_asm_len ("mov %1,%2", xop, plen, 1);
2987 + && !reg_unused_after (insn, lpm_addr_reg_rtx)
2988 + && !reg_overlap_mentioned_p (op[0], lpm_addr_reg_rtx))
2990 + xop[2] = GEN_INT (n_bytes-1);
2991 + avr_asm_len ("sbiw %1,%2", xop, plen, 1);
2994 + if (REG_P (xsegment) && AVR_HAVE_RAMPD)
2996 + /* Reset RAMPZ to 0 so that EBI devices don't read garbage from RAM */
2999 + avr_asm_len ("out __RAMPZ__,__zero_reg__", xop, plen, 1);
3004 - gcc_assert (REG_Z == REGNO (XEXP (addr, 0))
3007 - avr_asm_len ("%4lpm %A0,%a2+", xop, plen, 1);
3008 - if (n_bytes >= 2) avr_asm_len ("%4lpm %B0,%a2+", xop, plen, 1);
3009 - if (n_bytes >= 3) avr_asm_len ("%4lpm %C0,%a2+", xop, plen, 1);
3010 - if (n_bytes >= 4) avr_asm_len ("%4lpm %D0,%a2+", xop, plen, 1);
3012 - break; /* POST_INC */
3014 - } /* switch CODE (addr) */
3019 @@ -2782,8 +2673,9 @@
3023 - avr_asm_len ("ld %3,%a2" CR_TAB
3024 - "sbrs %1,7", xop, plen, 2);
3025 + avr_asm_len ("sbrc %1,7" CR_TAB
3026 + "ld %3,%a2" CR_TAB
3027 + "sbrs %1,7", xop, plen, 3);
3029 avr_asm_len (AVR_HAVE_LPMX ? "lpm %3,%a2" : "lpm", xop, plen, 1);
3031 @@ -2794,13 +2686,11 @@
3036 -output_movqi (rtx insn, rtx operands[], int *l)
3038 +output_movqi (rtx insn, rtx operands[], int *real_l)
3041 rtx dest = operands[0];
3042 rtx src = operands[1];
3045 if (avr_mem_flash_p (src)
3046 || avr_mem_flash_p (dest))
3047 @@ -2808,10 +2698,8 @@
3048 return avr_out_lpm (insn, operands, real_l);
3058 if (register_operand (dest, QImode))
3060 @@ -2829,10 +2717,10 @@
3061 output_reload_in_const (operands, NULL_RTX, real_l, false);
3064 - else if (GET_CODE (src) == MEM)
3065 + else if (MEM_P (src))
3066 return out_movqi_r_mr (insn, operands, real_l); /* mov r,m */
3068 - else if (GET_CODE (dest) == MEM)
3069 + else if (MEM_P (dest))
3073 @@ -6533,6 +6421,7 @@
3074 case ADJUST_LEN_MOV32: output_movsisf (insn, op, &len); break;
3075 case ADJUST_LEN_MOVMEM: avr_out_movmem (insn, op, &len); break;
3076 case ADJUST_LEN_XLOAD: avr_out_xload (insn, op, &len); break;
3077 + case ADJUST_LEN_LOAD_LPM: avr_load_lpm (insn, op, &len); break;
3079 case ADJUST_LEN_TSTHI: avr_out_tsthi (insn, op, &len); break;
3080 case ADJUST_LEN_TSTPSI: avr_out_tstpsi (insn, op, &len); break;
3081 @@ -8975,7 +8864,7 @@
3083 /* Implement `MODE_CODE_BASE_REG_CLASS'. */
3087 avr_mode_code_base_reg_class (enum machine_mode mode ATTRIBUTE_UNUSED,
3088 addr_space_t as, RTX_CODE outer_code,
3089 RTX_CODE index_code ATTRIBUTE_UNUSED)
3090 @@ -9568,7 +9457,8 @@
3092 avr_reg_ok_for_pgm_addr (rtx reg, bool strict)
3094 - gcc_assert (REG_P (reg));
3100 @@ -9916,7 +9806,7 @@
3101 case ADDR_SPACE_FLASH:
3104 - avr_asm_len ("lpm %2,%Z+", xop, plen, 1);
3105 + avr_asm_len ("lpm %2,Z+", xop, plen, 1);
3107 avr_asm_len ("lpm" CR_TAB
3108 "adiw r30,1", xop, plen, 2);
3109 @@ -9965,6 +9855,14 @@
3111 /* Helper for __builtin_avr_delay_cycles */
3114 +avr_mem_clobber (void)
3116 + rtx mem = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
3117 + MEM_VOLATILE_P (mem) = 1;
3122 avr_expand_delay_cycles (rtx operands0)
3124 @@ -9976,7 +9874,8 @@
3126 loop_count = ((cycles - 9) / 6) + 1;
3127 cycles_used = ((loop_count - 1) * 6) + 9;
3128 - emit_insn (gen_delay_cycles_4 (gen_int_mode (loop_count, SImode)));
3129 + emit_insn (gen_delay_cycles_4 (gen_int_mode (loop_count, SImode),
3130 + avr_mem_clobber()));
3131 cycles -= cycles_used;
3134 @@ -9986,7 +9885,8 @@
3135 if (loop_count > 0xFFFFFF)
3136 loop_count = 0xFFFFFF;
3137 cycles_used = ((loop_count - 1) * 5) + 7;
3138 - emit_insn (gen_delay_cycles_3 (gen_int_mode (loop_count, SImode)));
3139 + emit_insn (gen_delay_cycles_3 (gen_int_mode (loop_count, SImode),
3140 + avr_mem_clobber()));
3141 cycles -= cycles_used;
3144 @@ -9996,7 +9896,8 @@
3145 if (loop_count > 0xFFFF)
3146 loop_count = 0xFFFF;
3147 cycles_used = ((loop_count - 1) * 4) + 5;
3148 - emit_insn (gen_delay_cycles_2 (gen_int_mode (loop_count, HImode)));
3149 + emit_insn (gen_delay_cycles_2 (gen_int_mode (loop_count, HImode),
3150 + avr_mem_clobber()));
3151 cycles -= cycles_used;
3154 @@ -10006,7 +9907,8 @@
3155 if (loop_count > 255)
3157 cycles_used = loop_count * 3;
3158 - emit_insn (gen_delay_cycles_1 (gen_int_mode (loop_count, QImode)));
3159 + emit_insn (gen_delay_cycles_1 (gen_int_mode (loop_count, QImode),
3160 + avr_mem_clobber()));
3161 cycles -= cycles_used;
3164 @@ -11007,6 +10909,9 @@
3165 #undef TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS
3166 #define TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS avr_addr_space_legitimize_address
3168 +#undef TARGET_MODE_DEPENDENT_ADDRESS_P
3169 +#define TARGET_MODE_DEPENDENT_ADDRESS_P avr_mode_dependent_address_p
3171 #undef TARGET_PRINT_OPERAND
3172 #define TARGET_PRINT_OPERAND avr_print_operand
3173 #undef TARGET_PRINT_OPERAND_ADDRESS
3174 Index: gcc/config/epiphany/epiphany.c
3175 ===================================================================
3176 --- gcc/config/epiphany/epiphany.c (.../tags/gcc_4_7_0_release) (wersja 185750)
3177 +++ gcc/config/epiphany/epiphany.c (.../branches/gcc-4_7-branch) (wersja 185750)
3178 @@ -1417,7 +1417,7 @@
3179 return gen_rtx_REG (mode, 0);
3184 epiphany_function_value_regno_p (const unsigned int regno ATTRIBUTE_UNUSED)
3187 Index: gcc/config/rs6000/vector.md
3188 ===================================================================
3189 --- gcc/config/rs6000/vector.md (.../tags/gcc_4_7_0_release) (wersja 185750)
3190 +++ gcc/config/rs6000/vector.md (.../branches/gcc-4_7-branch) (wersja 185750)
3191 @@ -516,6 +516,94 @@
3192 "VECTOR_UNIT_ALTIVEC_P (<MODE>mode)"
3195 +(define_insn_and_split "*vector_uneq<mode>"
3196 + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
3197 + (uneq:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
3198 + (match_operand:VEC_F 2 "vfloat_operand" "")))]
3199 + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
3202 + [(set (match_dup 3)
3203 + (gt:VEC_F (match_dup 1)
3205 + (set (match_dup 4)
3206 + (gt:VEC_F (match_dup 2)
3208 + (set (match_dup 0)
3209 + (not:VEC_F (ior:VEC_F (match_dup 3)
3213 + operands[3] = gen_reg_rtx (<MODE>mode);
3214 + operands[4] = gen_reg_rtx (<MODE>mode);
3217 +(define_insn_and_split "*vector_ltgt<mode>"
3218 + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
3219 + (ltgt:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
3220 + (match_operand:VEC_F 2 "vfloat_operand" "")))]
3221 + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
3224 + [(set (match_dup 3)
3225 + (gt:VEC_F (match_dup 1)
3227 + (set (match_dup 4)
3228 + (gt:VEC_F (match_dup 2)
3230 + (set (match_dup 0)
3231 + (ior:VEC_F (match_dup 3)
3235 + operands[3] = gen_reg_rtx (<MODE>mode);
3236 + operands[4] = gen_reg_rtx (<MODE>mode);
3239 +(define_insn_and_split "*vector_ordered<mode>"
3240 + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
3241 + (ordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
3242 + (match_operand:VEC_F 2 "vfloat_operand" "")))]
3243 + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
3246 + [(set (match_dup 3)
3247 + (ge:VEC_F (match_dup 1)
3249 + (set (match_dup 4)
3250 + (ge:VEC_F (match_dup 2)
3252 + (set (match_dup 0)
3253 + (ior:VEC_F (match_dup 3)
3257 + operands[3] = gen_reg_rtx (<MODE>mode);
3258 + operands[4] = gen_reg_rtx (<MODE>mode);
3261 +(define_insn_and_split "*vector_unordered<mode>"
3262 + [(set (match_operand:VEC_F 0 "vfloat_operand" "")
3263 + (unordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
3264 + (match_operand:VEC_F 2 "vfloat_operand" "")))]
3265 + "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
3268 + [(set (match_dup 3)
3269 + (ge:VEC_F (match_dup 1)
3271 + (set (match_dup 4)
3272 + (ge:VEC_F (match_dup 2)
3274 + (set (match_dup 0)
3275 + (not:VEC_F (ior:VEC_F (match_dup 3)
3279 + operands[3] = gen_reg_rtx (<MODE>mode);
3280 + operands[4] = gen_reg_rtx (<MODE>mode);
3283 ;; Note the arguments for __builtin_altivec_vsel are op2, op1, mask
3284 ;; which is in the reverse order that we want
3285 (define_expand "vector_select_<mode>"
3286 Index: gcc/config/rs6000/rs6000.c
3287 ===================================================================
3288 --- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_7_0_release) (wersja 185750)
3289 +++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_7-branch) (wersja 185750)
3290 @@ -16137,6 +16137,10 @@
3298 mask = gen_reg_rtx (mode);
3299 emit_insn (gen_rtx_SET (VOIDmode,
3301 Index: libgo/go/syscall/syscall_unix.go
3302 ===================================================================
3303 --- libgo/go/syscall/syscall_unix.go (.../tags/gcc_4_7_0_release) (wersja 185750)
3304 +++ libgo/go/syscall/syscall_unix.go (.../branches/gcc-4_7-branch) (wersja 185750)
3306 // expects a 32-bit one.
3307 func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {
3311 if unsafe.Sizeof(r) == 4 {
3312 r1 := c_syscall32(int32(trap), int32(a1), int32(a2), int32(a3), 0, 0, 0)
3315 func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {
3319 if unsafe.Sizeof(r) == 4 {
3320 r1 := c_syscall32(int32(trap), int32(a1), int32(a2), int32(a3),
3323 func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {
3326 if unsafe.Sizeof(r) == 4 {
3327 r1 := c_syscall32(int32(trap), int32(a1), int32(a2), int32(a3), 0, 0, 0)
3331 func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {
3334 if unsafe.Sizeof(r) == 4 {
3335 r1 := c_syscall32(int32(trap), int32(a1), int32(a2), int32(a3),
3336 int32(a4), int32(a5), int32(a6))
3337 Index: libffi/src/powerpc/aix.S
3338 ===================================================================
3339 --- libffi/src/powerpc/aix.S (.../tags/gcc_4_7_0_release) (wersja 185750)
3340 +++ libffi/src/powerpc/aix.S (.../branches/gcc-4_7-branch) (wersja 185750)
3342 /* -----------------------------------------------------------------------
3343 - aix.S - Copyright (c) 2002,2009 Free Software Foundation, Inc.
3344 + aix.S - Copyright (c) 2002, 2009 Free Software Foundation, Inc.
3345 based on darwin.S by John Hornkvist
3347 PowerPC Assembly glue.
3352 + .extern .ffi_prep_args
3355 #include <fficonfig.h>
3358 /* Call ffi_prep_args. */
3363 /* Now do the call. */
3366 /* Call ffi_prep_args. */
3371 /* Now do the call. */
3373 Index: libffi/src/powerpc/aix_closure.S
3374 ===================================================================
3375 --- libffi/src/powerpc/aix_closure.S (.../tags/gcc_4_7_0_release) (wersja 185750)
3376 +++ libffi/src/powerpc/aix_closure.S (.../branches/gcc-4_7-branch) (wersja 185750)
3381 + .extern .ffi_closure_helper_DARWIN
3384 #define JUMPTARGET(name) name
3388 /* look up the proper starting point in table */
3389 /* by using return type as offset */
3390 + lhz r3, 10(r3) /* load type from return type */
3391 ld r4, LC..60(2) /* get address of jump table */
3392 sldi r3, r3, 4 /* now multiply return type by 16 */
3393 ld r0, 240+16(r1) /* load return address */
3396 /* look up the proper starting point in table */
3397 /* by using return type as offset */
3398 + lhz r3, 6(r3) /* load type from return type */
3399 lwz r4, LC..60(2) /* get address of jump table */
3400 - slwi r3, r3, 4 /* now multiply return type by 4 */
3401 + slwi r3, r3, 4 /* now multiply return type by 16 */
3402 lwz r0, 176+8(r1) /* load return address */
3403 add r3, r3, r4 /* add contents of table to table address */
3405 Index: libffi/ChangeLog
3406 ===================================================================
3407 --- libffi/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185750)
3408 +++ libffi/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185750)
3410 +2012-03-22 David Edelsohn <dje.gcc@gmail.com>
3412 + Backport from mainline:
3413 + 2012-03-09 David Edelsohn <dje.gcc@gmail.com>
3415 + * src/powerpc/aix_closure.S (ffi_closure_ASM): Adjust for Darwin64
3416 + change to return value of ffi_closure_helper_DARWIN and load type
3419 + From Tom Honermann <tom.honermann@oracle.com>:
3420 + * src/powerpc/aix.S: Declare .ffi_prep_args. Insert nops after
3421 + branch instructions.
3422 + * src/powerpc/aix_closure.S: Declare .ffi_closure_helper_DARWIN.
3424 2012-03-22 Release Manager
3426 * GCC 4.7.0 released.