aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2005-06-30 12:17:52 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2005-06-30 12:17:52 +0000
commitc2f7fa15c0edbf2a3873ab402813f428d44908f8 (patch)
tree816c741b3c00522d35a8c6d2c7612f26999ef518 /gcc/tree.h
parent89632019a9e0a159df1bd6fcd76680257e846bd6 (diff)
downloadgcc-c2f7fa15c0edbf2a3873ab402813f428d44908f8.zip
gcc-c2f7fa15c0edbf2a3873ab402813f428d44908f8.tar.gz
gcc-c2f7fa15c0edbf2a3873ab402813f428d44908f8.tar.bz2
coretypes.h (tls_model): Add TLS_MODEL_NONE as 0.
* coretypes.h (tls_model): Add TLS_MODEL_NONE as 0. * tree.h (struct tree_decl): New field `tls_model'. (DECL_TLS_MODEL): New. (DECL_THREAD_LOCAL_P): Rename from DECL_THREAD_LOCAL, make it a predicate. * rtl.h (decl_default_tls_model): Add prototype for it. * varasm.c (decl_tls_model): Rewritten and renamed to ... (decl_default_tls_model): ... this. (default_encode_section_info): Use DECL_TLS_MODEL instead of decl_tls_model. (assemble_variable): Replace DECL_THREAD_LOCAL with DECL_THREAD_LOCAL_P. (default_section_type_flags_1): Likewise. (categorize_decl_for_section): Likewise. * tree.c (staticp): Likewise. (recompute_tree_invarant_for_addr_expr): Likewise. * drawf2out (loc_descriptor_from_tree_1): Likewise. * c-decl.c (diagnose_mismatched_decls): Likewise. with DECL_THREAD_LOCAL_P. (start_decl): Likewise. * print-tree.c (print_node): Likewise. Print the TLS model. (grokdeclarator): Set the default DECL_TLS_MODEL here. * c-common.c (handle_tls_model_attribute): Rewrite to set the TLS model up based on the attribute. Never add the attribute to the decl's attributes list. * config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Replace DECL_THREAD_LOCAL with DECL_THREAD_LOCAL_P. cp/ * decl.c (start_decl): Replace DECL_THREAD_LOCAL with DECL_THREAD_LOCAL_P. (cp_finish_decl): Likewise. (grokvardecl): Set the default DECL_TLS_MODEL here. From-SVN: r101465
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 191ba13..802ab15 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2184,14 +2184,20 @@ extern void decl_debug_expr_insert (tree, tree);
/* Nonzero means that the decl had its visibility specified rather than
being inferred. */
-#define DECL_VISIBILITY_SPECIFIED(NODE) (DECL_CHECK (NODE)->decl.visibility_specified)
+#define DECL_VISIBILITY_SPECIFIED(NODE) \
+ (DECL_CHECK (NODE)->decl.visibility_specified)
/* 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, the model to use if the data should be allocated from
+ thread-local storage. */
+#define DECL_TLS_MODEL(NODE) (VAR_DECL_CHECK (NODE)->decl.tls_model)
+
/* 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)
+#define DECL_THREAD_LOCAL_P(NODE) \
+ (VAR_DECL_CHECK (NODE)->decl.tls_model != TLS_MODEL_NONE)
/* In a FUNCTION_DECL, the saved representation of the body of the
entire function. */
@@ -2385,6 +2391,8 @@ struct tree_decl GTY(())
location_t locus;
unsigned int uid;
tree size;
+
+ /* 32 bits: */
ENUM_BITFIELD(machine_mode) mode : 8;
unsigned external_flag : 1;
@@ -2413,10 +2421,11 @@ struct tree_decl GTY(())
ENUM_BITFIELD(built_in_class) built_in_class : 2;
unsigned pure_flag : 1;
+ /* 32 bits: */
unsigned non_addressable : 1;
unsigned user_align : 1;
unsigned uninlinable : 1;
- unsigned thread_local_flag : 1;
+ unsigned gimple_reg_flag : 1;
unsigned declared_inline_flag : 1;
ENUM_BITFIELD(symbol_visibility) visibility : 2;
unsigned visibility_specified : 1;
@@ -2438,8 +2447,9 @@ struct tree_decl GTY(())
unsigned seen_in_bind_expr : 1;
unsigned novops_flag : 1;
unsigned has_value_expr : 1;
- unsigned gimple_reg_flag : 1;
- /* 7 unused bits. */
+
+ ENUM_BITFIELD(tls_model) tls_model : 3;
+ /* 5 unused bits. */
union tree_decl_u1 {
/* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is