Răsfoiți Sursa

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

git-svn-id: trunk@43126 -
florian 5 ani în urmă
părinte
comite
c3f4ad39a3
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  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);