aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tls
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2005-11-04 15:43:51 +0000
committerDaniel Jacobowitz <drow@gcc.gnu.org>2005-11-04 15:43:51 +0000
commit6137ba90739ae1b722ed228296356b2cb49f01ec (patch)
treee403f94386f56e7b352df41155ba6459107cecff /gcc/testsuite/gcc.dg/tls
parente993ba8f57882d7abc34292e8e614e9978db52d5 (diff)
downloadgcc-6137ba90739ae1b722ed228296356b2cb49f01ec.zip
gcc-6137ba90739ae1b722ed228296356b2cb49f01ec.tar.gz
gcc-6137ba90739ae1b722ed228296356b2cb49f01ec.tar.bz2
arm.c (arm_load_pic_register): Pass extra reg to gen_pic_add_dot_plus_four and gen_pic_add_dot_plus_eight.
gcc/ * config/arm/arm.c (arm_load_pic_register): Pass extra reg to gen_pic_add_dot_plus_four and gen_pic_add_dot_plus_eight. (arm_call_tls_get_addr, legitimize_tls_address): Likewise. * config/arm/arm.md: Use match_operand in peephole input templates and match_dup in peephole output templates. gcc/testsuite/ * gcc.dg/tls/opt-10.c: New test. From-SVN: r106493
Diffstat (limited to 'gcc/testsuite/gcc.dg/tls')
-rw-r--r--gcc/testsuite/gcc.dg/tls/opt-10.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tls/opt-10.c b/gcc/testsuite/gcc.dg/tls/opt-10.c
new file mode 100644
index 0000000..69a7a68
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tls/opt-10.c
@@ -0,0 +1,16 @@
+/* { dg-do compile */
+/* { dg-options "-O3 -fpic" } */
+
+/* The web pass was creating unrecognisable pic_load_dot_plus_four insns
+ on ARM. */
+
+__thread int a_thread_local;
+void *
+spin (int n)
+{
+ int i;
+ for (i = 0; i <= n; i++)
+ {
+ a_thread_local += i;
+ }
+}