diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-26 22:53:50 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-26 22:53:50 +0000 |
commit | cffbbb9de6dd1d57639ccf61d76209e46c9bcbdb (patch) | |
tree | 566634468015c713398a1fcd59ec66da7138545a /gcc/expr.c | |
parent | d55d9a48e0263efc2c2fbaa0ae8a428ea6e5f13e (diff) | |
download | gcc-cffbbb9de6dd1d57639ccf61d76209e46c9bcbdb.tar.gz |
PR target/44132
Emulated TLS rewrite.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162549 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 3e5d18bdebc..57f9eff859b 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6818,19 +6818,6 @@ highest_pow2_factor_for_target (const_tree target, const_tree exp) return MAX (factor, talign); } -/* Return &VAR expression for emulated thread local VAR. */ - -static tree -emutls_var_address (tree var) -{ - tree emuvar = emutls_decl (var); - tree fn = built_in_decls [BUILT_IN_EMUTLS_GET_ADDRESS]; - tree arg = build_fold_addr_expr_with_type (emuvar, ptr_type_node); - tree call = build_call_expr (fn, 1, arg); - return fold_convert (build_pointer_type (TREE_TYPE (var)), call); -} - - /* Subroutine of expand_expr. Expand the two operands of a binary expression EXP0 and EXP1 placing the results in OP0 and OP1. The value may be stored in TARGET if TARGET is nonzero. The @@ -6933,18 +6920,6 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode, inner = TREE_OPERAND (exp, 0); break; - case VAR_DECL: - /* TLS emulation hook - replace __thread VAR's &VAR with - __emutls_get_address (&_emutls.VAR). */ - if (! targetm.have_tls - && TREE_CODE (exp) == VAR_DECL - && DECL_THREAD_LOCAL_P (exp)) - { - exp = emutls_var_address (exp); - return expand_expr (exp, target, tmode, modifier); - } - /* Fall through. */ - default: /* If the object is a DECL, then expand it for its rtl. Don't bypass expand_expr, as that can have various side effects; LABEL_DECLs for @@ -8382,16 +8357,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, && (TREE_STATIC (exp) || DECL_EXTERNAL (exp))) layout_decl (exp, 0); - /* TLS emulation hook - replace __thread vars with - *__emutls_get_address (&_emutls.var). */ - if (! targetm.have_tls - && TREE_CODE (exp) == VAR_DECL - && DECL_THREAD_LOCAL_P (exp)) - { - exp = build_fold_indirect_ref_loc (loc, emutls_var_address (exp)); - return expand_expr_real_1 (exp, target, tmode, modifier, NULL); - } - /* ... fall through ... */ case FUNCTION_DECL: |