summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0211-PR-target-48774.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0211-PR-target-48774.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0211-PR-target-48774.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0211-PR-target-48774.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0211-PR-target-48774.patch
new file mode 100644
index 0000000000..7ef98eb449
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0211-PR-target-48774.patch
@@ -0,0 +1,78 @@
1From ab9047340859545251be5c074524d69327901407 Mon Sep 17 00:00:00 2001
2From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Tue, 3 May 2011 13:06:06 +0000
4Subject: [PATCH] PR target/48774
5 * config/i386/i386.c (ix86_match_ccmode): For CC{A,C,O,S}mode
6 only succeed if req_mode is the same as set_mode.
7
8 * gcc.dg/pr48774.c: New test.
9
10
11git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173302 138bc75d-0d04-0410-961f-82ee72b054a4
12
13index f3a8a0c..e8210c5 100644
14--- a/gcc/config/i386/i386.c
15+++ b/gcc/config/i386/i386.c
16@@ -17194,11 +17194,15 @@ ix86_match_ccmode (rtx insn, enum machine_mode req_mode)
17 if (req_mode == CCZmode)
18 return false;
19 /* FALLTHRU */
20+ case CCZmode:
21+ break;
22+
23 case CCAmode:
24 case CCCmode:
25 case CCOmode:
26 case CCSmode:
27- case CCZmode:
28+ if (set_mode != req_mode)
29+ return false;
30 break;
31
32 default:
33new file mode 100644
34index 0000000..91ce361
35--- /dev/null
36+++ b/gcc/testsuite/gcc.dg/pr48774.c
37@@ -0,0 +1,38 @@
38+/* PR target/48774 */
39+/* { dg-do run } */
40+/* { dg-options "-O2 -funroll-loops" } */
41+
42+extern void abort (void);
43+unsigned long int s[24]
44+ = { 12, ~1, 12, ~2, 12, ~4, 12, ~8, 12, ~16, 12, ~32,
45+ 12, ~64, 12, ~128, 12, ~256, 12, ~512, 12, ~1024, 12, ~2048 };
46+struct { int n; unsigned long *e[12]; } g
47+ = { 12, { &s[0], &s[2], &s[4], &s[6], &s[8], &s[10], &s[12], &s[14],
48+ &s[16], &s[18], &s[20], &s[22] } };
49+int c[12];
50+
51+__attribute__((noinline, noclone)) void
52+foo (void)
53+{
54+ int i, j;
55+ for (i = 0; i < g.n; i++)
56+ for (j = 0; j < g.n; j++)
57+ {
58+ if (i == j && j < g.e[0][0] && (g.e[i][1] & (1UL << j)))
59+ abort ();
60+ if (j < g.e[0][0] && (g.e[i][1] & (1UL << j)))
61+ c[i]++;
62+ }
63+}
64+
65+int
66+main ()
67+{
68+ int i;
69+ asm volatile ("" : "+m" (s), "+m" (g), "+m" (c));
70+ foo ();
71+ for (i = 0; i < 12; i++)
72+ if (c[i] != 11)
73+ abort ();
74+ return 0;
75+}
76--
771.7.0.4
78