diff options
author | Richard Henderson <rth@gcc.gnu.org> | 2010-07-26 15:53:50 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2010-07-26 15:53:50 -0700 |
commit | 8b84c5966fddefd51475d4df0fb2f1a699ba23fe (patch) | |
tree | 566634468015c713398a1fcd59ec66da7138545a /gcc/expr.c | |
parent | b57c6b13e0d950ba0771b1688cf6e57e3a5beae6 (diff) | |
download | gcc-8b84c5966fddefd51475d4df0fb2f1a699ba23fe.zip gcc-8b84c5966fddefd51475d4df0fb2f1a699ba23fe.tar.gz gcc-8b84c5966fddefd51475d4df0fb2f1a699ba23fe.tar.bz2 |
re PR target/44132 (emutls is broken under a range of circumstances.)
PR target/44132
Emulated TLS rewrite.
From-SVN: r162549
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 35 |
1 files changed, 0 insertions, 35 deletions
@@ -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: |