]> git.pld-linux.org Git - packages/crossavr-gcc.git/blame - 511-gcc-avrtc539-backported.patch
Revert "Revert "- synchronized patches with official AVR toolchain 3.4.1.830""
[packages/crossavr-gcc.git] / 511-gcc-avrtc539-backported.patch
CommitLineData
7f71f849
JR
1diff -Naurp gcc/combine.c gcc/combine.c
2--- gcc/combine.c 2011-07-29 14:05:59.000000000 +0530
3+++ gcc/combine.c 2012-06-28 15:51:12.000000000 +0530
4@@ -1666,6 +1666,7 @@ can_combine_p (rtx insn, rtx i3, rtx pre
5 rtx link;
6 #endif
7 bool all_adjacent = true;
8+ int (*is_volatile_p) (const_rtx);
9
10 if (succ)
11 {
12@@ -1914,11 +1915,17 @@ can_combine_p (rtx insn, rtx i3, rtx pre
13 && REG_P (dest) && REGNO (dest) < FIRST_PSEUDO_REGISTER)
14 return 0;
15
16- /* If there are any volatile insns between INSN and I3, reject, because
17- they might affect machine state. */
18-
19+ /* If INSN contains volatile references (specifically volatile MEMs),
20+ we cannot combine across any other volatile references.
21+ Even if INSN doesn't contain volatile references, any intervening
22+ volatile insn might affect machine state. */
23+
24+ is_volatile_p = volatile_refs_p (PATTERN (insn))
25+ ? volatile_refs_p
26+ : volatile_insn_p;
27+
28 for (p = NEXT_INSN (insn); p != i3; p = NEXT_INSN (p))
29- if (INSN_P (p) && p != succ && p != succ2 && volatile_insn_p (PATTERN (p)))
30+ if (INSN_P (p) && p != succ && p != succ2 && is_volatile_p (PATTERN (p)))
31 return 0;
32
33 /* If INSN contains an autoincrement or autodecrement, make sure that
34diff -Naurp gcc/config/avr/avr.c gcc/config/avr/avr.c
35--- gcc/config/avr/avr.c 2012-06-28 15:47:34.000000000 +0530
36+++ gcc/config/avr/avr.c 2012-06-28 15:51:12.000000000 +0530
37@@ -6307,6 +6307,7 @@ avr_encode_section_info (tree decl, rtx
38 if (new_decl_p
39 && decl && DECL_P (decl)
40 && NULL_TREE == DECL_INITIAL (decl)
41+ && !DECL_EXTERNAL (decl)
42 && avr_progmem_p (decl, DECL_ATTRIBUTES (decl)))
43 {
44 warning (OPT_Wuninitialized,
This page took 0.076615 seconds and 4 git commands to generate.