diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-26 20:36:07 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-26 20:36:07 +0000 |
commit | cfd199cb6a4a5c9317d1ccf52dbaa324163de2c5 (patch) | |
tree | b748bff788bf3e80d6ef0a86bc289b4fad31dbf1 /gcc/testsuite/gcc.target/frv | |
parent | 6b2c69ce9147f6bbe3e75c9a7b6433733166bf98 (diff) | |
download | gcc-cfd199cb6a4a5c9317d1ccf52dbaa324163de2c5.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94283 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/frv')
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" } } */ |