diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-22 01:11:29 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-22 01:11:29 +0000 |
commit | 2a6f0f815222f423a4fa14e19e16deccdd9b5cbd (patch) | |
tree | 1d3e8e4b6c824cf31a86c19bd79a5a7767a5a468 /gcc/tree.h | |
parent | 84ac08a426b4bd07738e8f7235c7cc5deceee1b5 (diff) | |
download | gcc-2a6f0f815222f423a4fa14e19e16deccdd9b5cbd.tar.gz |
* c-common.h (enum rid): Add RID_THREAD.
* c-decl.c (start_decl): Do not set DECL_COMMON for tls variables.
(grokdeclarator): Grok __thread.
* c-parse.in (reswords): Add __thread.
(rid_to_yy): Add RID_THREAD.
* cp/lex.c (rid_to_yy): Add RID_THREAD.
* tree.h (DECL_THREAD_LOCAL): New.
(struct tree_decl): Add thread_local_flag.
* print-tree.c (print_node): Dump DECL_THREAD_LOCAL.
* tree.c (staticp): TLS variables are not static.
* target-def.h (TARGET_HAVE_TLS): New.
* target.h (have_tls): New.
* output.h (SECTION_TLS): New.
* varasm.c (assemble_variable): TLS variables can't be common for now.
(default_section_type_flags): Handle .tdata and .tbss.
(default_elf_asm_named_section): Handle SECTION_TLS.
(categorize_decl_for_section): Handle DECL_THREAD_LOCAL.
* flags.h (flag_tls_default): Declare.
* toplev.c (flag_tls_default): Define.
(display_help): Display help for it.
(decode_f_option): Set it.
* doc/extend.texi (Thread-Local): New node describing language-level
thread-local storage.
* doc/invoke.texi (-ftls-model): Document.
* fixinc/inclhack.def (thread_keyword): New.
* fixinc/fixincl.x: Rebuild.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53715 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h index 3e5ef3ae8ae..e7163ea7e97 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1615,6 +1615,10 @@ struct tree_type /* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */ #define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.uninlinable) +/* In a VAR_DECL, nonzero if the data should be allocated from + thread-local storage. */ +#define DECL_THREAD_LOCAL(NODE) (VAR_DECL_CHECK (NODE)->decl.thread_local_flag) + /* In a FUNCTION_DECL, the saved representation of the body of the entire function. Usually a COMPOUND_STMT, but in C++ this may also be a RETURN_INIT, CTOR_INITIALIZER, or TRY_BLOCK. */ @@ -1793,7 +1797,8 @@ struct tree_decl unsigned non_addressable : 1; unsigned user_align : 1; unsigned uninlinable : 1; - /* Three unused bits. */ + unsigned thread_local_flag : 1; + /* Two unused bits. */ unsigned lang_flag_0 : 1; unsigned lang_flag_1 : 1; |