diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2005-01-26 20:36:07 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2005-01-26 20:36:07 +0000 |
commit | e4dd71deb765f87955ae21da06e75de7871c1e41 (patch) | |
tree | b748bff788bf3e80d6ef0a86bc289b4fad31dbf1 | |
parent | 55e79aef81371abf4c07885fbbd748078d695209 (diff) | |
download | gcc-e4dd71deb765f87955ae21da06e75de7871c1e41.zip gcc-e4dd71deb765f87955ae21da06e75de7871c1e41.tar.gz gcc-e4dd71deb765f87955ae21da06e75de7871c1e41.tar.bz2 |
invoke.texi: Document -mTLS.
* 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.
From-SVN: r94283
-rw-r--r-- | gcc/ChangeLog | 16 | ||||
-rwxr-xr-x | gcc/configure | 9 | ||||
-rw-r--r-- | gcc/configure.ac | 9 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 11 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/frv/all-tls-global-dynamic.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/frv/all-tls-initial-exec-pic.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/frv/all-tls-initial-exec.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/frv/all-tls-local-dynamic-plt-pic.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/frv/all-tls-local-dynamic-plt.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/frv/all-tls-local-dynamic.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/frv/all-tls-local-exec-TLS.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/frv/all-tls-local-exec.c | 12 |
12 files changed, 143 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 630dfac..51d5111 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,19 @@ +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 diff --git a/gcc/configure b/gcc/configure index 220fcaf..0886841 100755 --- a/gcc/configure +++ b/gcc/configure @@ -13690,6 +13690,15 @@ foo: .long 25 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 diff --git a/gcc/configure.ac b/gcc/configure.ac index 59524c2..937676a 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2279,6 +2279,15 @@ foo: .long 25 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 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 7013bb2..a48fac1 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -461,6 +461,7 @@ Objective-C and Objective-C++ Dialects}. -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} @@ -7872,6 +7873,16 @@ shared libraries (i.e., @option{-fPIC} or @option{-fpic}), or when an 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 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 0000000..2135090 --- /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 0000000..b51e34d --- /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 0000000..fa755a2 --- /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 0000000..3eabe1c --- /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 0000000..5c2de93 --- /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 0000000..4680a98 --- /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 0000000..83f78de --- /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 0000000..dd1b86a --- /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" } } */ |