浏览代码

* it must be decided in g_maybe_tls_init if a tls is loaded

git-svn-id: trunk@43126 -
florian 5 年之前
父节点
当前提交
c3f4ad39a3
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      compiler/psub.pas

+ 3 - 3
compiler/psub.pas

@@ -1806,7 +1806,7 @@ implementation
               (got<>NR_NO) then
               cg.a_reg_sync(aktproccode,got);
 
-            if (pi_uses_threadvar in flags) and
+            if (pi_needs_tls in flags) and
               (tlsoffset<>NR_NO) then
               cg.a_reg_sync(aktproccode,tlsoffset);
 
@@ -1850,8 +1850,8 @@ implementation
             cg.g_maybe_got_init(templist);
             aktproccode.insertlistafter(headertai,templist);
 
-            if (pi_uses_threadvar in flags) and (tf_section_threadvars in target_info.flags) then
-              cg.g_maybe_tls_init(templist);
+            { init tls if needed }
+            cg.g_maybe_tls_init(templist);
             aktproccode.insertlistafter(stackcheck_asmnode.currenttai,templist);