mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 18:49:15 +02:00
* support non-section-based threadvars on the LLVM target
git-svn-id: trunk@31645 -
This commit is contained in:
parent
19882aea7e
commit
c813e024ee
@ -49,7 +49,7 @@ interface
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
verbose,cutils,globals,fmodule,
|
verbose,cutils,globals,fmodule,systems,
|
||||||
aasmbase,aasmtai,cpubase,llvmbase,aasmllvm,
|
aasmbase,aasmtai,cpubase,llvmbase,aasmllvm,
|
||||||
symbase,symtable,defutil,
|
symbase,symtable,defutil,
|
||||||
llvmtype;
|
llvmtype;
|
||||||
@ -57,6 +57,7 @@ implementation
|
|||||||
class procedure tllvmnodeutils.insertbsssym(list: tasmlist; sym: tstaticvarsym; size: asizeint; varalign: shortint);
|
class procedure tllvmnodeutils.insertbsssym(list: tasmlist; sym: tstaticvarsym; size: asizeint; varalign: shortint);
|
||||||
var
|
var
|
||||||
asmsym: tasmsymbol;
|
asmsym: tasmsymbol;
|
||||||
|
field1, field2: tsym;
|
||||||
begin
|
begin
|
||||||
if sym.globalasmsym then
|
if sym.globalasmsym then
|
||||||
asmsym:=current_asmdata.DefineAsmSymbol(sym.mangledname,AB_GLOBAL,AT_DATA)
|
asmsym:=current_asmdata.DefineAsmSymbol(sym.mangledname,AB_GLOBAL,AT_DATA)
|
||||||
@ -64,8 +65,12 @@ implementation
|
|||||||
asmsym:=current_asmdata.DefineAsmSymbol(sym.mangledname,AB_LOCAL,AT_DATA);
|
asmsym:=current_asmdata.DefineAsmSymbol(sym.mangledname,AB_LOCAL,AT_DATA);
|
||||||
if not(vo_is_thread_var in sym.varoptions) then
|
if not(vo_is_thread_var in sym.varoptions) then
|
||||||
list.concat(taillvmdecl.createdef(asmsym,sym.vardef,nil,sec_data,varalign))
|
list.concat(taillvmdecl.createdef(asmsym,sym.vardef,nil,sec_data,varalign))
|
||||||
else
|
else if tf_section_threadvars in target_info.flags then
|
||||||
list.concat(taillvmdecl.createtls(asmsym,sym.vardef,varalign))
|
list.concat(taillvmdecl.createtls(asmsym,sym.vardef,varalign))
|
||||||
|
else
|
||||||
|
list.concat(taillvmdecl.createdef(asmsym,
|
||||||
|
get_threadvar_record(sym.vardef,field1,field2),
|
||||||
|
nil,sec_data,varalign));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -3806,8 +3806,6 @@ if (target_info.abi = abi_eabihf) then
|
|||||||
{$ifdef llvm}
|
{$ifdef llvm}
|
||||||
{ standard extension for llvm bitcode files }
|
{ standard extension for llvm bitcode files }
|
||||||
target_info.asmext:='.ll';
|
target_info.asmext:='.ll';
|
||||||
{ always use section threadvars for now }
|
|
||||||
include(target_info.flags,tf_section_threadvars);
|
|
||||||
{ don't generate dwarf cfi, llvm will do that }
|
{ don't generate dwarf cfi, llvm will do that }
|
||||||
exclude(target_info.flags,tf_needs_dwarf_cfi);
|
exclude(target_info.flags,tf_needs_dwarf_cfi);
|
||||||
{$endif llvm}
|
{$endif llvm}
|
||||||
|
Loading…
Reference in New Issue
Block a user