فهرست منبع

* Fixes and further development of fast threadvars

git-svn-id: trunk@743 -
daniel 20 سال پیش
والد
کامیت
e98865ab40
7فایلهای تغییر یافته به همراه17 افزوده شده و 15 حذف شده
  1. 2 2
      compiler/aasmbase.pas
  2. 2 2
      compiler/aggas.pas
  3. 2 2
      compiler/assemble.pas
  4. 1 1
      compiler/ncgutil.pas
  5. 1 1
      compiler/ogcoff.pas
  6. 8 6
      compiler/ogelf.pas
  7. 1 1
      compiler/powerpc/agppcmpw.pas

+ 2 - 2
compiler/aasmbase.pas

@@ -47,7 +47,7 @@ interface
        TAsmRelocationType = (RELOC_ABSOLUTE,RELOC_RELATIVE,RELOC_RVA);
 
        TAsmSectionType=(sec_none,
-         sec_code,sec_data,sec_rodata,sec_bss,sec_tbss,
+         sec_code,sec_data,sec_rodata,sec_bss,sec_threadvar,
          sec_common, { used for executable creation }
          sec_custom, { custom section, no prefix }
          { stabs }
@@ -572,7 +572,7 @@ implementation
     function TAsmObjectData.sectionname(atype:tasmsectiontype;const aname:string):string;
       const
         secnames : array[tasmsectiontype] of string[12] = ('',
-          'code','data','rodata','bss','tbss',
+          'code','data','rodata','bss','threadvar',
           'common',
           'note',
           'stab','stabstr',

+ 2 - 2
compiler/aggas.pas

@@ -281,7 +281,7 @@ var
       const
         secnames : array[tasmsectiontype] of string[12] = ('',
 {$warning TODO .rodata not yet working}
-          '.text','.data','.data','.bss','.tbss',
+          '.text','.data','.data','.bss','.threadvar',
           'common',
           '.note',
           '.stab','.stabstr',
@@ -291,7 +291,7 @@ var
         );
       begin
         if use_smartlink_section and
-           not (atype in [sec_bss,sec_tbss]) and
+           not (atype in [sec_bss,sec_threadvar]) and
            (aname<>'') then
           result:='.gnu.linkonce'+copy(secnames[atype],1,2)+'.'+aname
         else

+ 2 - 2
compiler/assemble.pas

@@ -1085,7 +1085,7 @@ Implementation
                end;
              ait_datablock :
                begin
-                 if not (objectdata.currsec.sectype in [sec_bss,sec_tbss]) then
+                 if not (objectdata.currsec.sectype in [sec_bss,sec_threadvar]) then
                    Message(asmw_e_alloc_data_only_in_bss);
                  l:=used_align(size_2_align(Tai_datablock(hp).size),0,objectdata.currsec.addralign);
                  if Tai_datablock(hp).is_global and
@@ -1256,7 +1256,7 @@ Implementation
            case hp.typ of
              ait_align :
                begin
-                 if objectdata.currsec.sectype in [sec_bss,sec_tbss] then
+                 if objectdata.currsec.sectype in [sec_bss,sec_threadvar] then
                    objectdata.alloc(Tai_align(hp).fillsize)
                  else
                    objectdata.writebytes(Tai_align(hp).calculatefillbuf(fillbuffer)^,Tai_align(hp).fillsize);

+ 1 - 1
compiler/ncgutil.pas

@@ -1981,7 +1981,7 @@ implementation
         if (vo_is_thread_var in sym.varoptions) then
           begin
             list:=asmlist[threadvarsegment];
-            sectype:=sec_tbss;
+            sectype:=sec_threadvar;
           end
         else
           begin

+ 1 - 1
compiler/ogcoff.pas

@@ -554,7 +554,7 @@ const go32v2stub : array[0..2047] of byte=(
     function TCoffObjectData.sectionname(atype:tasmsectiontype;const aname:string):string;
       const
         secnames : array[tasmsectiontype] of string[16] = ('',
-          '.text','.data','.data','.bss','.tbss',
+          '.text','.data','.data','.bss','.threadvar',
           'common',
           '.note',
           '.stab','.stabstr',

+ 8 - 6
compiler/ogelf.pas

@@ -236,7 +236,7 @@ implementation
               AshType:=SHT_PROGBITS;
               AAlign:=max(sizeof(aint),AAlign);
             end;
-          sec_bss,sec_tbss :
+          sec_bss,sec_threadvar :
             begin
               Ashflags:=SHF_ALLOC or SHF_WRITE;
               AshType:=SHT_NOBITS;
@@ -308,7 +308,9 @@ implementation
         createsection(sec_code,'',0,[]);
         createsection(sec_data,'',0,[]);
         createsection(sec_bss,'',0,[]);
-        createsection(sec_tbss,'',0,[]);
+{$ifdef segment_threadvars}
+        createsection(sec_threadvar,'',0,[]);
+{$endif}
         { create stabs sections if debugging }
         if (cs_debuginfo in aktmoduleswitches) then
          begin
@@ -332,9 +334,9 @@ implementation
       const
         secnames : array[tasmsectiontype] of string[12] = ('',
 {$ifdef userodata}
-          '.text','.data','.rodata','.bss','.tbss',
+          '.text','.data','.rodata','.bss','.threadvar',
 {$else userodata}
-          '.text','.data','.data','.bss','.tbss',
+          '.text','.data','.data','.bss','.threadvar',
 {$endif userodata}
           'common',
           '.note',
@@ -345,7 +347,7 @@ implementation
         );
       begin
         if use_smartlink_section and
-           not (atype in [sec_bss,sec_tbss]) and
+           not (atype in [sec_bss,sec_threadvar]) and
            (aname<>'') then
           result:='.gnu.linkonce'+copy(secnames[atype],1,2)+'.'+aname
         else
@@ -379,7 +381,7 @@ implementation
         if currsec=nil then
           internalerror(200403292);
 {$ifdef userodata}
-        if currsec.sectype in [sec_rodata,sec_bss,sec_tbss] then
+        if currsec.sectype in [sec_rodata,sec_bss,sec_threadvar] then
           internalerror(200408252);
 {$endif userodata}
         if assigned(p) then

+ 1 - 1
compiler/powerpc/agppcmpw.pas

@@ -76,7 +76,7 @@ interface
         'csect', {code}
         'csect', {data}
         'csect', {read only data}
-        'csect', {bss}, 'csect',
+        'csect', {bss} 'csect',
         'csect','csect','csect','csect','','','','','','','',''
       );