* testsuite/gcc.target/frv/all-tls-global-dynamic.c: New.
* testsuite/gcc.target/frv/all-tls-initial-exec.c: New.
* testsuite/gcc.target/frv/all-tls-initial-exec-pic.c: New.
* testsuite/gcc.target/frv/all-tls-local-dynamic.c: New.
* testsuite/gcc.target/frv/all-tls-local-dynamic-plt.c: New.
* testsuite/gcc.target/frv/all-tls-local-dynamic-plt-pic.c: New.
* testsuite/gcc.target/frv/all-tls-local-exec.c: New.
* testsuite/gcc.target/frv/all-tls-local-exec-TLS.c: New.
* configure.ac: Check for a TLS capable gas.
* configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94283
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-01-26 Aldy Hernandez <aldyh@redhat.com>
+
+ * doc/invoke.texi: Document -mTLS.
+
+ * testsuite/gcc.target/frv/all-tls-global-dynamic.c: New.
+ * testsuite/gcc.target/frv/all-tls-initial-exec.c: New.
+ * testsuite/gcc.target/frv/all-tls-initial-exec-pic.c: New.
+ * testsuite/gcc.target/frv/all-tls-local-dynamic.c: New.
+ * testsuite/gcc.target/frv/all-tls-local-dynamic-plt.c: New.
+ * testsuite/gcc.target/frv/all-tls-local-dynamic-plt-pic.c: New.
+ * testsuite/gcc.target/frv/all-tls-local-exec.c: New.
+ * testsuite/gcc.target/frv/all-tls-local-exec-TLS.c: New.
+
+ * configure.ac: Check for a TLS capable gas.
+
+ * configure: Regenerate.
2005-01-26 Richard Henderson <rth@redhat.com>
PR middle-end/18008
tls_first_minor=13
tls_as_opt=--fatal-warnings
;;
+ frv*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+x: .long 25
+ .text
+ call #gettlsoff(x)'
+ tls_first_major=2
+ tls_first_minor=14
+ ;;
i[34567]86-*-*)
conftest_s='
.section ".tdata","awT",@progbits
tls_first_minor=13
tls_as_opt=--fatal-warnings
;;
+ frv*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+x: .long 25
+ .text
+ call #gettlsoff(x)'
+ tls_first_major=2
+ tls_first_minor=14
+ ;;
i[34567]86-*-*)
conftest_s='
.section ".tdata","awT",@progbits
-mvliw-branch -mno-vliw-branch @gol
-mmulti-cond-exec -mno-multi-cond-exec -mnested-cond-exec @gol
-mno-nested-cond-exec -mtomcat-stats @gol
+-mTLS -mtls @gol
-mcpu=@var{cpu}}
@emph{H8/300 Options}
optimization option such as @option{-O3} or above is present in the
command line.
+@item -mTLS
+@opindex TLS
+
+Assume a large TLS segment when generating thread-local code.
+
+@item -mtls
+@opindex tls
+
+Do not assume a large TLS segment when generating thread-local code.
+
@item -mgprel-ro
@opindex mgprel-ro
--- /dev/null
+/* { 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." } } */
--- /dev/null
+/* { 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" } } */
--- /dev/null
+/* { 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.@" } } */
--- /dev/null
+/* { 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\\)" } } */
--- /dev/null
+/* { 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\\)@" } } */
--- /dev/null
+/* { 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" } } */
--- /dev/null
+/* { 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\\)," } } */
--- /dev/null
+/* { 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" } } */