Skip to content

Commit

Permalink
Differentiate between a bss TLS initialized symbol.
Browse files Browse the repository at this point in the history
  • Loading branch information
claziss committed Jul 7, 2015
1 parent 3991768 commit 366cc86
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gcc/ChangeLog.ARC
@@ -1,3 +1,8 @@
2015-07-07 Claudiu Zissulescu <claziss@synopsys.com>

* config/arc/arc.c (arc_legitimize_tls_address): Differentiate
between a bss initialized TLS symbol and not.

2015-07-06 Claudiu Zissulescu <claziss@synopsys.com>

* config/arc/arc.md (doloop_begin_i): Append "@" for symbols.
Expand Down
9 changes: 7 additions & 2 deletions gcc/config/arc/arc.c
Expand Up @@ -5262,10 +5262,15 @@ arc_legitimize_tls_address (rtx addr, enum tls_model model)
{
case TLS_MODEL_LOCAL_DYNAMIC:
rtx base;
tree base_decl; base_decl
= lookup_attribute ("tls9", DECL_ATTRIBUTES (SYMBOL_REF_DECL (addr)));
tree base_decl, decl;
decl = SYMBOL_REF_DECL (addr);
base_decl = lookup_attribute ("tls9", DECL_ATTRIBUTES (decl));
const char *base_name; base_name = DTPOFF_ZERO_SYM;
rtvec v;

if (bss_initializer_p (decl))
base_name = ".tbss";

if (base_decl && TREE_VALUE (base_decl)
&& TREE_VALUE (TREE_VALUE (base_decl)))
{
Expand Down

0 comments on commit 366cc86

Please sign in to comment.