summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99320.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99320.patch')
-rw-r--r--recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99320.patch138
1 files changed, 138 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99320.patch b/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99320.patch
new file mode 100644
index 0000000000..669523218c
--- /dev/null
+++ b/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99320.patch
@@ -0,0 +1,138 @@
12010-08-05 Andrew Stubbs <ams@codesourcery.com>
2
3 gcc/testsuite/
4 * gcc.dg/vect/vect-shift-2.c: Revert all previous changes.
5 * gcc.dg/vect/vect-shift-4.c: New file.
6
7 2010-07-20 Yao Qi <yao@codesourcery.com>
8
9 Merge from Sourcery G++ 4.4:
10 2009-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11
12 Merge from Sourcery G++ 4.3:
13 2008-12-03 Daniel Jacobowitz <dan@codesourcery.com>
14
15 gcc/testsuite/
16 * gcc.dg/vect/vect-shift-2.c, gcc.dg/vect/vect-shift-3.c: New.
17 * lib/target-supports.exp (check_effective_target_vect_shift_char): New
18 function.
19
20 2010-07-24 Sandra Loosemore <sandra@codesourcery.com>
21
22 Backport from mainline:
23
24=== added file 'gcc/testsuite/gcc.dg/vect/vect-shift-3.c'
25--- old/gcc/testsuite/gcc.dg/vect/vect-shift-3.c 1970-01-01 00:00:00 +0000
26+++ new/gcc/testsuite/gcc.dg/vect/vect-shift-3.c 2010-08-05 14:13:43 +0000
27@@ -0,0 +1,37 @@
28+/* { dg-require-effective-target vect_shift } */
29+/* { dg-require-effective-target vect_int } */
30+
31+#include "tree-vect.h"
32+
33+#define N 32
34+
35+unsigned short dst[N] __attribute__((aligned(N)));
36+unsigned short src[N] __attribute__((aligned(N)));
37+
38+__attribute__ ((noinline))
39+void array_shift(void)
40+{
41+ int i;
42+ for (i = 0; i < N; i++)
43+ dst[i] = src[i] >> 3;
44+}
45+
46+int main()
47+{
48+ volatile int i;
49+ check_vect ();
50+
51+ for (i = 0; i < N; i++)
52+ src[i] = i << 3;
53+
54+ array_shift ();
55+
56+ for (i = 0; i < N; i++)
57+ if (dst[i] != i)
58+ abort ();
59+
60+ return 0;
61+}
62+
63+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
64+/* { dg-final { cleanup-tree-dump "vect" } } */
65
66=== added file 'gcc/testsuite/gcc.dg/vect/vect-shift-4.c'
67--- old/gcc/testsuite/gcc.dg/vect/vect-shift-4.c 1970-01-01 00:00:00 +0000
68+++ new/gcc/testsuite/gcc.dg/vect/vect-shift-4.c 2010-08-05 14:13:43 +0000
69@@ -0,0 +1,37 @@
70+/* { dg-require-effective-target vect_shift_char } */
71+/* { dg-require-effective-target vect_int } */
72+
73+#include "tree-vect.h"
74+
75+#define N 32
76+
77+unsigned char dst[N] __attribute__((aligned(N)));
78+unsigned char src[N] __attribute__((aligned(N)));
79+
80+__attribute__ ((noinline))
81+void array_shift(void)
82+{
83+ int i;
84+ for (i = 0; i < N; i++)
85+ dst[i] = src[i] >> 3;
86+}
87+
88+int main()
89+{
90+ volatile int i;
91+ check_vect ();
92+
93+ for (i = 0; i < N; i++)
94+ src[i] = i << 3;
95+
96+ array_shift ();
97+
98+ for (i = 0; i < N; i++)
99+ if (dst[i] != i)
100+ abort ();
101+
102+ return 0;
103+}
104+
105+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
106+/* { dg-final { cleanup-tree-dump "vect" } } */
107
108=== modified file 'gcc/testsuite/lib/target-supports.exp'
109--- old/gcc/testsuite/lib/target-supports.exp 2010-07-29 15:38:15 +0000
110+++ new/gcc/testsuite/lib/target-supports.exp 2010-08-05 14:13:43 +0000
111@@ -2001,6 +2001,26 @@
112 return $et_vect_shift_saved
113 }
114
115+# Return 1 if the target supports hardware vector shift operation for char.
116+
117+proc check_effective_target_vect_shift_char { } {
118+ global et_vect_shift_char_saved
119+
120+ if [info exists et_vect_shift_char_saved] {
121+ verbose "check_effective_target_vect_shift_char: using cached result" 2
122+ } else {
123+ set et_vect_shift_char_saved 0
124+ if { ([istarget powerpc*-*-*]
125+ && ![istarget powerpc-*-linux*paired*])
126+ || [check_effective_target_arm32] } {
127+ set et_vect_shift_char_saved 1
128+ }
129+ }
130+
131+ verbose "check_effective_target_vect_shift_char: returning $et_vect_shift_char_saved" 2
132+ return $et_vect_shift_char_saved
133+}
134+
135 # Return 1 if the target supports hardware vectors of long, 0 otherwise.
136 #
137 # This can change for different subtargets so do not cache the result.
138