summaryrefslogtreecommitdiffstats
path: root/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106876.patch
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106876.patch')
-rw-r--r--toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106876.patch109
1 files changed, 0 insertions, 109 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106876.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106876.patch
deleted file mode 100644
index 048e85b4d6..0000000000
--- a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106876.patch
+++ /dev/null
@@ -1,109 +0,0 @@
12012-03-06 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
2
3 LP:942307
4 gcc/
5 PR target/50305
6 * config/arm/arm.c (arm_legitimize_reload_address): Recognize
7 output of a previous pass through legitimize_reload_address.
8 Do not attempt to optimize addresses if the base register is
9 equivalent to a constant.
10 gcc/testsuite/
11 PR target/50305
12 * gcc.target/arm/pr50305.c: New test.
13
14=== modified file 'gcc/config/arm/arm.c'
15--- old/gcc/config/arm/arm.c 2012-03-02 13:53:14 +0000
16+++ new/gcc/config/arm/arm.c 2012-03-06 11:01:55 +0000
17@@ -6632,9 +6632,26 @@
18 int opnum, int type,
19 int ind_levels ATTRIBUTE_UNUSED)
20 {
21+ /* We must recognize output that we have already generated ourselves. */
22+ if (GET_CODE (*p) == PLUS
23+ && GET_CODE (XEXP (*p, 0)) == PLUS
24+ && GET_CODE (XEXP (XEXP (*p, 0), 0)) == REG
25+ && GET_CODE (XEXP (XEXP (*p, 0), 1)) == CONST_INT
26+ && GET_CODE (XEXP (*p, 1)) == CONST_INT)
27+ {
28+ push_reload (XEXP (*p, 0), NULL_RTX, &XEXP (*p, 0), NULL,
29+ MODE_BASE_REG_CLASS (mode), GET_MODE (*p),
30+ VOIDmode, 0, 0, opnum, (enum reload_type) type);
31+ return true;
32+ }
33+
34 if (GET_CODE (*p) == PLUS
35 && GET_CODE (XEXP (*p, 0)) == REG
36 && ARM_REGNO_OK_FOR_BASE_P (REGNO (XEXP (*p, 0)))
37+ /* If the base register is equivalent to a constant, let the generic
38+ code handle it. Otherwise we will run into problems if a future
39+ reload pass decides to rematerialize the constant. */
40+ && !reg_equiv_constant [ORIGINAL_REGNO (XEXP (*p, 0))]
41 && GET_CODE (XEXP (*p, 1)) == CONST_INT)
42 {
43 HOST_WIDE_INT val = INTVAL (XEXP (*p, 1));
44
45=== added file 'gcc/testsuite/gcc.target/arm/pr50305.c'
46--- old/gcc/testsuite/gcc.target/arm/pr50305.c 1970-01-01 00:00:00 +0000
47+++ new/gcc/testsuite/gcc.target/arm/pr50305.c 2012-03-01 13:07:48 +0000
48@@ -0,0 +1,60 @@
49+/* { dg-do compile } */
50+/* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "-march=armv7-a" } } */
51+/* { dg-options "-O2 -fno-omit-frame-pointer -marm -march=armv7-a -mfpu=vfp3" } */
52+
53+struct event {
54+ unsigned long long id;
55+ unsigned int flag;
56+};
57+
58+void dummy(void)
59+{
60+ /* This is here to ensure that the offset of perf_event_id below
61+ relative to the LANCHOR symbol exceeds the allowed displacement. */
62+ static int __warned[300];
63+ __warned[0] = 1;
64+}
65+
66+extern void *kmem_cache_alloc_trace (void *cachep);
67+extern void *cs_cachep;
68+extern int nr_cpu_ids;
69+
70+struct event *
71+event_alloc (int cpu)
72+{
73+ static unsigned long long __attribute__((aligned(8))) perf_event_id;
74+ struct event *event;
75+ unsigned long long result;
76+ unsigned long tmp;
77+
78+ if (cpu >= nr_cpu_ids)
79+ return 0;
80+
81+ event = kmem_cache_alloc_trace (cs_cachep);
82+
83+ __asm__ __volatile__ ("dmb" : : : "memory");
84+
85+ __asm__ __volatile__("@ atomic64_add_return\n"
86+"1: ldrexd %0, %H0, [%3]\n"
87+" adds %0, %0, %4\n"
88+" adc %H0, %H0, %H4\n"
89+" strexd %1, %0, %H0, [%3]\n"
90+" teq %1, #0\n"
91+" bne 1b"
92+ : "=&r" (result), "=&r" (tmp), "+Qo" (perf_event_id)
93+ : "r" (&perf_event_id), "r" (1LL)
94+ : "cc");
95+
96+ __asm__ __volatile__ ("dmb" : : : "memory");
97+
98+ event->id = result;
99+
100+ if (cpu)
101+ event->flag = 1;
102+
103+ for (cpu = 0; cpu < nr_cpu_ids; cpu++)
104+ kmem_cache_alloc_trace (cs_cachep);
105+
106+ return event;
107+}
108+
109