diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-01-03 17:19:21 +0100 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2006-01-03 08:19:21 -0800 |
commit | a13e882c791e640f1c53bc8f5a9b142705af650b (patch) | |
tree | 3db10c3935e39e5ab5b1657e037fa4a1351ce60a /gcc/varasm.c | |
parent | 13991abbfce042ef49d546c7d7b63c1c3734fa55 (diff) | |
download | gcc-a13e882c791e640f1c53bc8f5a9b142705af650b.zip gcc-a13e882c791e640f1c53bc8f5a9b142705af650b.tar.gz gcc-a13e882c791e640f1c53bc8f5a9b142705af650b.tar.bz2 |
varasm.c (assemble_variable): Handle thread-local COMMON data.
* varasm.c (assemble_variable): Handle thread-local COMMON data.
* defaults.h (ASM_OUTPUT_TLS_COMMON): Define.
Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r109282
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index eafba6b..5f58bf4 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1537,11 +1537,20 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED, isn't common, and shouldn't be handled as such. */ if (DECL_SECTION_NAME (decl) || dont_output_data) ; - /* We don't implement common thread-local data at present. */ else if (DECL_THREAD_LOCAL_P (decl)) { if (DECL_COMMON (decl)) - sorry ("thread-local COMMON data not implemented"); + { +#ifdef ASM_OUTPUT_TLS_COMMON + unsigned HOST_WIDE_INT size; + + size = tree_low_cst (DECL_SIZE_UNIT (decl), 1); + ASM_OUTPUT_TLS_COMMON (asm_out_file, decl, name, size); + return; +#else + sorry ("thread-local COMMON data not implemented"); +#endif + } } else if (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node |