diff options
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99318.patch')
-rw-r--r-- | toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99318.patch | 118 |
1 files changed, 0 insertions, 118 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99318.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99318.patch deleted file mode 100644 index ad4943a0a9..0000000000 --- a/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99318.patch +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | 2010-07-24 Jie Zhang <jie@codesourcery.com> | ||
2 | |||
3 | Issue #9079 | ||
4 | |||
5 | Backport from mainline: | ||
6 | |||
7 | gcc/ | ||
8 | 2010-07-23 Jie Zhang <jie@codesourcery.com> | ||
9 | PR target/44290 | ||
10 | * attribs.c (decl_attributes): Insert "noinline" and "noclone" | ||
11 | if "naked". | ||
12 | * tree-sra.c (ipa_sra_preliminary_function_checks): Return | ||
13 | false if ! tree_versionable_function_p. | ||
14 | |||
15 | gcc/testsuite/ | ||
16 | 2010-07-23 Jie Zhang <jie@codesourcery.com> | ||
17 | PR target/44290 | ||
18 | * gcc.dg/pr44290-1.c: New test. | ||
19 | * gcc.dg/pr44290-2.c: New test. | ||
20 | |||
21 | 2010-07-22 Maxim Kuvyrkov <maxim@codesourcery.com> | ||
22 | |||
23 | Backport from FSF GCC 4.5 branch to fix PR45015: | ||
24 | |||
25 | === modified file 'gcc/attribs.c' | ||
26 | --- old/gcc/attribs.c 2010-04-02 18:54:46 +0000 | ||
27 | +++ new/gcc/attribs.c 2010-08-05 11:39:36 +0000 | ||
28 | @@ -278,6 +278,19 @@ | ||
29 | TREE_VALUE (cur_attr) = chainon (opts, TREE_VALUE (cur_attr)); | ||
30 | } | ||
31 | |||
32 | + /* A "naked" function attribute implies "noinline" and "noclone" for | ||
33 | + those targets that support it. */ | ||
34 | + if (TREE_CODE (*node) == FUNCTION_DECL | ||
35 | + && lookup_attribute_spec (get_identifier ("naked")) | ||
36 | + && lookup_attribute ("naked", attributes) != NULL) | ||
37 | + { | ||
38 | + if (lookup_attribute ("noinline", attributes) == NULL) | ||
39 | + attributes = tree_cons (get_identifier ("noinline"), NULL, attributes); | ||
40 | + | ||
41 | + if (lookup_attribute ("noclone", attributes) == NULL) | ||
42 | + attributes = tree_cons (get_identifier ("noclone"), NULL, attributes); | ||
43 | + } | ||
44 | + | ||
45 | targetm.insert_attributes (*node, &attributes); | ||
46 | |||
47 | for (a = attributes; a; a = TREE_CHAIN (a)) | ||
48 | |||
49 | === added file 'gcc/testsuite/gcc.dg/pr44290-1.c' | ||
50 | --- old/gcc/testsuite/gcc.dg/pr44290-1.c 1970-01-01 00:00:00 +0000 | ||
51 | +++ new/gcc/testsuite/gcc.dg/pr44290-1.c 2010-08-05 11:39:36 +0000 | ||
52 | @@ -0,0 +1,18 @@ | ||
53 | +/* { dg-do compile { target arm*-*-* avr-*-* mcore-*-* rx-*-* spu-*-* } } */ | ||
54 | +/* { dg-options "-O2 -fdump-tree-optimized" } */ | ||
55 | + | ||
56 | +static void __attribute__((naked)) | ||
57 | +foo(void *from, void *to) | ||
58 | +{ | ||
59 | + asm volatile("dummy"::"r"(from), "r"(to)); | ||
60 | +} | ||
61 | + | ||
62 | +unsigned int fie[2]; | ||
63 | + | ||
64 | +void fum(void *to) | ||
65 | +{ | ||
66 | + foo(fie, to); | ||
67 | +} | ||
68 | + | ||
69 | +/* { dg-final { scan-tree-dump "foo \\\(void \\\* from, void \\\* to\\\)" "optimized" } } */ | ||
70 | +/* { dg-final { cleanup-tree-dump "optimized" } } */ | ||
71 | |||
72 | === added file 'gcc/testsuite/gcc.dg/pr44290-2.c' | ||
73 | --- old/gcc/testsuite/gcc.dg/pr44290-2.c 1970-01-01 00:00:00 +0000 | ||
74 | +++ new/gcc/testsuite/gcc.dg/pr44290-2.c 2010-08-05 11:39:36 +0000 | ||
75 | @@ -0,0 +1,24 @@ | ||
76 | +/* { dg-do compile { target arm*-*-* avr-*-* mcore-*-* rx-*-* spu-*-* } } */ | ||
77 | +/* { dg-options "-O2 -fdump-tree-optimized" } */ | ||
78 | + | ||
79 | +static unsigned long __attribute__((naked)) | ||
80 | +foo (unsigned long base) | ||
81 | +{ | ||
82 | + asm volatile ("dummy"); | ||
83 | +} | ||
84 | +unsigned long | ||
85 | +bar (void) | ||
86 | +{ | ||
87 | + static int start, set; | ||
88 | + | ||
89 | + if (!set) | ||
90 | + { | ||
91 | + set = 1; | ||
92 | + start = foo (0); | ||
93 | + } | ||
94 | + | ||
95 | + return foo (start); | ||
96 | +} | ||
97 | + | ||
98 | +/* { dg-final { scan-tree-dump "foo \\\(long unsigned int base\\\)" "optimized" } } */ | ||
99 | +/* { dg-final { cleanup-tree-dump "optimized" } } */ | ||
100 | |||
101 | === modified file 'gcc/tree-sra.c' | ||
102 | --- old/gcc/tree-sra.c 2010-03-17 12:02:35 +0000 | ||
103 | +++ new/gcc/tree-sra.c 2010-08-05 11:39:36 +0000 | ||
104 | @@ -4096,6 +4096,13 @@ | ||
105 | static bool | ||
106 | ipa_sra_preliminary_function_checks (struct cgraph_node *node) | ||
107 | { | ||
108 | + if (!tree_versionable_function_p (current_function_decl)) | ||
109 | + { | ||
110 | + if (dump_file) | ||
111 | + fprintf (dump_file, "Function isn't allowed to be versioned.\n"); | ||
112 | + return false; | ||
113 | + } | ||
114 | + | ||
115 | if (!cgraph_node_can_be_local_p (node)) | ||
116 | { | ||
117 | if (dump_file) | ||
118 | |||