summaryrefslogtreecommitdiffstats
path: root/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99326.patch
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99326.patch')
-rw-r--r--toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99326.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99326.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99326.patch
new file mode 100644
index 0000000000..59b598ba70
--- /dev/null
+++ b/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99326.patch
@@ -0,0 +1,86 @@
1
2 http://gcc.gnu.org/ml/gcc-patches/2006-03/msg00038.html
3
4 * g++.dg/other/armv7m-1.C: New.
5
62010-07-26 Julian Brown <julian@codesourcery.com>
7
8 Merge from Sourcery G++ 4.4:
9
10 http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00811.html
11
12
13=== added file 'gcc/testsuite/g++.dg/other/armv7m-1.C'
14--- old/gcc/testsuite/g++.dg/other/armv7m-1.C 1970-01-01 00:00:00 +0000
15+++ new/gcc/testsuite/g++.dg/other/armv7m-1.C 2010-08-05 16:23:43 +0000
16@@ -0,0 +1,69 @@
17+/* { dg-do run { target arm*-*-* } } */
18+/* Test Armv7m interrupt routines. */
19+#include <stdlib.h>
20+
21+#ifdef __ARM_ARCH_7M__
22+void __attribute__((interrupt))
23+foo(void)
24+{
25+ long long n;
26+ long p;
27+ asm volatile ("" : "=r" (p) : "0" (&n));
28+ if (p & 4)
29+ abort ();
30+ return;
31+}
32+
33+void __attribute__((interrupt))
34+bar(void)
35+{
36+ throw 42;
37+}
38+
39+int main()
40+{
41+ int a;
42+ int before;
43+ int after;
44+ volatile register int sp asm("sp");
45+
46+ asm volatile ("mov %0, sp\n"
47+ "blx %2\n"
48+ "mov %1, sp\n"
49+ : "=&r" (before), "=r" (after) : "r" (foo)
50+ : "memory", "cc", "r0", "r1", "r2", "r3", "ip", "lr");
51+ if (before != after)
52+ abort();
53+ asm volatile ("mov %0, sp\n"
54+ "sub sp, sp, #4\n"
55+ "blx %2\n"
56+ "add sp, sp, #4\n"
57+ "mov %1, sp\n"
58+ : "=&r" (before), "=r" (after) : "r" (foo)
59+ : "memory", "cc", "r0", "r1", "r2", "r3", "ip", "lr");
60+ if (before != after)
61+ abort();
62+ before = sp;
63+ try
64+ {
65+ bar();
66+ }
67+ catch (int i)
68+ {
69+ if (i != 42)
70+ abort();
71+ }
72+ catch (...)
73+ {
74+ abort();
75+ }
76+ if (before != sp)
77+ abort();
78+ exit(0);
79+}
80+#else
81+int main()
82+{
83+ exit (0);
84+}
85+#endif
86