summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/frv
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/frv')
-rw-r--r--gcc/testsuite/gcc.target/frv/all-tls-global-dynamic.c12
-rw-r--r--gcc/testsuite/gcc.target/frv/all-tls-initial-exec-pic.c12
-rw-r--r--gcc/testsuite/gcc.target/frv/all-tls-initial-exec.c12
-rw-r--r--gcc/testsuite/gcc.target/frv/all-tls-local-dynamic-plt-pic.c13
-rw-r--r--gcc/testsuite/gcc.target/frv/all-tls-local-dynamic-plt.c12
-rw-r--r--gcc/testsuite/gcc.target/frv/all-tls-local-dynamic.c13
-rw-r--r--gcc/testsuite/gcc.target/frv/all-tls-local-exec-TLS.c12
-rw-r--r--gcc/testsuite/gcc.target/frv/all-tls-local-exec.c12
8 files changed, 98 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/frv/all-tls-global-dynamic.c b/gcc/testsuite/gcc.target/frv/all-tls-global-dynamic.c
new file mode 100644
index 00000000000..2135090f134
--- /dev/null
+++ b/gcc/testsuite/gcc.target/frv/all-tls-global-dynamic.c
@@ -0,0 +1,12 @@
+/* { dg-options "-ftls-model=global-dynamic -fpic -mfdpic -mno-inline-plt" } */
+/* { dg-do compile } */
+extern __thread int x;
+extern void bar ();
+int *y;
+
+void foo (void)
+{
+ bar ();
+ y = &x;
+}
+/* { dg-final { scan-assembler "call #gettlsoff.x." } } */
diff --git a/gcc/testsuite/gcc.target/frv/all-tls-initial-exec-pic.c b/gcc/testsuite/gcc.target/frv/all-tls-initial-exec-pic.c
new file mode 100644
index 00000000000..b51e34df63c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/frv/all-tls-initial-exec-pic.c
@@ -0,0 +1,12 @@
+/* { dg-options "-ftls-model=initial-exec -fpic -mfdpic" } */
+/* { dg-do compile } */
+extern __thread int x;
+extern void bar ();
+int *y;
+
+void foo (void)
+{
+ bar ();
+ y = &x;
+}
+/* { dg-final { scan-assembler "ld.*#gottlsoff12" } } */
diff --git a/gcc/testsuite/gcc.target/frv/all-tls-initial-exec.c b/gcc/testsuite/gcc.target/frv/all-tls-initial-exec.c
new file mode 100644
index 00000000000..fa755a2991c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/frv/all-tls-initial-exec.c
@@ -0,0 +1,12 @@
+/* { dg-options "-ftls-model=initial-exec -mfdpic" } */
+/* { dg-do compile } */
+extern __thread int x;
+extern void bar ();
+int *y;
+
+void foo (void)
+{
+ bar ();
+ y = &x;
+}
+/* { dg-final { scan-assembler "ld.*#tlsoff.x.@" } } */
diff --git a/gcc/testsuite/gcc.target/frv/all-tls-local-dynamic-plt-pic.c b/gcc/testsuite/gcc.target/frv/all-tls-local-dynamic-plt-pic.c
new file mode 100644
index 00000000000..3eabe1c6bf0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/frv/all-tls-local-dynamic-plt-pic.c
@@ -0,0 +1,13 @@
+/* { dg-options "-ftls-model=local-dynamic -minline-plt -fpic -mfdpic" } */
+/* { dg-do compile } */
+static __thread int x;
+extern void bar ();
+int *y;
+
+void foo (void)
+{
+ bar ();
+ y = &x;
+}
+/* { dg-final { scan-assembler "lddi.*gottlsdesc12" } } */
+/* { dg-final { scan-assembler "calll.*#gettlsoff\\(0\\)" } } */
diff --git a/gcc/testsuite/gcc.target/frv/all-tls-local-dynamic-plt.c b/gcc/testsuite/gcc.target/frv/all-tls-local-dynamic-plt.c
new file mode 100644
index 00000000000..5c2de93847f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/frv/all-tls-local-dynamic-plt.c
@@ -0,0 +1,12 @@
+/* { dg-options "-ftls-model=local-dynamic -minline-plt -fPIC -mfdpic" } */
+/* { dg-do compile } */
+static __thread int x;
+extern void bar ();
+int *y;
+
+void foo (void)
+{
+ bar ();
+ y = &x;
+}
+/* { dg-final { scan-assembler "ldd.*tlsdesc\\(0\\)@" } } */
diff --git a/gcc/testsuite/gcc.target/frv/all-tls-local-dynamic.c b/gcc/testsuite/gcc.target/frv/all-tls-local-dynamic.c
new file mode 100644
index 00000000000..4680a98f4ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/frv/all-tls-local-dynamic.c
@@ -0,0 +1,13 @@
+/* { dg-options "-ftls-model=local-dynamic -fpic -mfdpic" } */
+/* { dg-do compile } */
+static __thread int x;
+extern void bar ();
+int *y;
+
+void foo (void)
+{
+ bar ();
+ y = &x;
+}
+/* { dg-final { scan-assembler "gettlsoff\\(0\\)" } } */
+/* { dg-final { scan-assembler "tlsmoff12" } } */
diff --git a/gcc/testsuite/gcc.target/frv/all-tls-local-exec-TLS.c b/gcc/testsuite/gcc.target/frv/all-tls-local-exec-TLS.c
new file mode 100644
index 00000000000..83f78de4e76
--- /dev/null
+++ b/gcc/testsuite/gcc.target/frv/all-tls-local-exec-TLS.c
@@ -0,0 +1,12 @@
+/* { dg-options "-ftls-model=local-exec -mfdpic -mTLS" } */
+/* { dg-do compile } */
+static __thread int x;
+extern void bar ();
+int *y;
+
+void foo (void)
+{
+ bar ();
+ y = &x;
+}
+/* { dg-final { scan-assembler "sethi.*tlsmoffhi\\(x\\)," } } */
diff --git a/gcc/testsuite/gcc.target/frv/all-tls-local-exec.c b/gcc/testsuite/gcc.target/frv/all-tls-local-exec.c
new file mode 100644
index 00000000000..dd1b86a0556
--- /dev/null
+++ b/gcc/testsuite/gcc.target/frv/all-tls-local-exec.c
@@ -0,0 +1,12 @@
+/* { dg-options "-ftls-model=local-exec -mfdpic" } */
+/* { dg-do compile } */
+static __thread int x;
+extern void bar ();
+int *y;
+
+void foo (void)
+{
+ bar ();
+ y = &x;
+}
+/* { dg-final { scan-assembler ".*tlsmoff12" } } */