mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 14:29:33 +01:00
* renamed getdatalabel() to getglobaldatalabel
git-svn-id: branches/hlcgllvm@30336 -
This commit is contained in:
parent
5e1bb8e408
commit
687bb15299
@ -826,7 +826,7 @@ implementation
|
||||
charptrdef: tdef;
|
||||
elesize: word;
|
||||
begin
|
||||
current_asmdata.getdatalabel(result.lab);
|
||||
current_asmdata.getglobaldatalabel(result.lab);
|
||||
startlab:=result.lab;
|
||||
result.ofs:=0;
|
||||
{ pack the data, so that we don't add unnecessary null bytes after the
|
||||
@ -867,7 +867,7 @@ implementation
|
||||
{ results in slightly more efficient code }
|
||||
emit_tai(tai_label.create(result.lab),charptrdef);
|
||||
result.ofs:=0;
|
||||
current_asmdata.getdatalabel(startlab);
|
||||
current_asmdata.getglobaldatalabel(startlab);
|
||||
end;
|
||||
{ sanity check }
|
||||
if result.ofs<>string_symofs then
|
||||
@ -1001,7 +1001,7 @@ implementation
|
||||
if winlike then
|
||||
begin
|
||||
datatcb.begin_anonymous_record('$'+get_dynstring_rec_name(st_widestring,true,strlength),sizeof(pint));
|
||||
current_asmdata.getdatalabel(result.lab);
|
||||
current_asmdata.getglobaldatalabel(result.lab);
|
||||
datatcb.emit_tai(Tai_const.Create_32bit(strlength*cwidechartype.size),s32inttype);
|
||||
{ can we optimise by placing the string constant label at the
|
||||
required offset? }
|
||||
@ -1011,7 +1011,7 @@ implementation
|
||||
{ yes }
|
||||
datatcb.emit_tai(Tai_label.Create(result.lab),widecharpointertype);
|
||||
{ allocate a separate label for the start of the data }
|
||||
current_asmdata.getdatalabel(startlab);
|
||||
current_asmdata.getglobaldatalabel(startlab);
|
||||
end
|
||||
else
|
||||
internalerror(2015031502);
|
||||
|
||||
@ -173,7 +173,7 @@ interface
|
||||
procedure getjumplabel(out l : TAsmLabel);
|
||||
procedure getglobaljumplabel(out l : TAsmLabel);
|
||||
procedure getaddrlabel(out l : TAsmLabel);
|
||||
procedure getdatalabel(out l : TAsmLabel);
|
||||
procedure getglobaldatalabel(out l : TAsmLabel);
|
||||
{ generate an alternative (duplicate) symbol }
|
||||
procedure GenerateAltSymbol(p:TAsmSymbol);
|
||||
procedure ResetAltSymbols;
|
||||
@ -510,7 +510,7 @@ implementation
|
||||
inc(FNextLabelNr[alt_jump]);
|
||||
end;
|
||||
|
||||
procedure TAsmData.getdatalabel(out l : TAsmLabel);
|
||||
procedure TAsmData.getglobaldatalabel(out l : TAsmLabel);
|
||||
begin
|
||||
l:=TAsmLabel.createglobal(AsmSymbolDict,name^,FNextLabelNr[alt_data],alt_data);
|
||||
inc(FNextLabelNr[alt_data]);
|
||||
|
||||
@ -2267,7 +2267,7 @@ unit cgcpu;
|
||||
(tf_pic_uses_got in target_info.flags) then
|
||||
begin
|
||||
reference_reset(ref,4);
|
||||
current_asmdata.getdatalabel(l);
|
||||
current_asmdata.getglobaldatalabel(l);
|
||||
cg.a_label(current_procinfo.aktlocaldata,l);
|
||||
ref.symbol:=l;
|
||||
ref.base:=NR_PC;
|
||||
|
||||
@ -206,7 +206,7 @@ implementation
|
||||
instr.oppostfix:=PF_D;
|
||||
current_asmdata.CurrAsmList.concat(instr);
|
||||
|
||||
current_asmdata.getdatalabel(l1);
|
||||
current_asmdata.getglobaldatalabel(l1);
|
||||
current_asmdata.getjumplabel(l2);
|
||||
reference_reset_symbol(href,l1,0,const_align(8));
|
||||
|
||||
|
||||
@ -955,10 +955,10 @@ implementation
|
||||
begin
|
||||
{ The pointer typecast is needed to prevent a problem with range checking
|
||||
on when the typecast is changed to 'as' }
|
||||
current_asmdata.getdatalabel(TAsmLabel(pointer(def.dwarf_lab)));
|
||||
current_asmdata.getdatalabel(TAsmLabel(pointer(def.dwarf_ref_lab)));
|
||||
current_asmdata.getglobaldatalabel(TAsmLabel(pointer(def.dwarf_lab)));
|
||||
current_asmdata.getglobaldatalabel(TAsmLabel(pointer(def.dwarf_ref_lab)));
|
||||
if is_implicit_pointer_object_type(def) then
|
||||
current_asmdata.getdatalabel(TAsmLabel(pointer(tobjectdef(def).dwarf_struct_lab)));
|
||||
current_asmdata.getglobaldatalabel(TAsmLabel(pointer(tobjectdef(def).dwarf_struct_lab)));
|
||||
end;
|
||||
end;
|
||||
end
|
||||
@ -1763,7 +1763,7 @@ implementation
|
||||
|
||||
{ create a structure with two elements }
|
||||
if not(tf_dwarf_only_local_labels in target_info.flags) then
|
||||
current_asmdata.getdatalabel(arr)
|
||||
current_asmdata.getglobaldatalabel(arr)
|
||||
else
|
||||
current_asmdata.getaddrlabel(arr);
|
||||
append_entry(DW_TAG_structure_type,true,[
|
||||
@ -1899,7 +1899,7 @@ implementation
|
||||
begin
|
||||
{ create a structure with two elements }
|
||||
if not(tf_dwarf_only_local_labels in target_info.flags) then
|
||||
current_asmdata.getdatalabel(proc)
|
||||
current_asmdata.getglobaldatalabel(proc)
|
||||
else
|
||||
current_asmdata.getaddrlabel(proc);
|
||||
append_entry(DW_TAG_structure_type,true,[
|
||||
@ -3704,7 +3704,7 @@ implementation
|
||||
if assigned(def.elementdef) then
|
||||
begin
|
||||
if not(tf_dwarf_only_local_labels in target_info.flags) then
|
||||
current_asmdata.getdatalabel(lab)
|
||||
current_asmdata.getglobaldatalabel(lab)
|
||||
else
|
||||
current_asmdata.getaddrlabel(lab);
|
||||
append_labelentry_ref(DW_AT_type,lab);
|
||||
@ -4016,7 +4016,7 @@ implementation
|
||||
obj : tasmlabel;
|
||||
begin
|
||||
if not(tf_dwarf_only_local_labels in target_info.flags) then
|
||||
current_asmdata.getdatalabel(obj)
|
||||
current_asmdata.getglobaldatalabel(obj)
|
||||
else
|
||||
current_asmdata.getaddrlabel(obj);
|
||||
{ implicit pointer }
|
||||
|
||||
@ -153,7 +153,7 @@ begin
|
||||
loadsigned(tfloatdef(resultdef).floattype)
|
||||
else
|
||||
begin
|
||||
current_asmdata.getdatalabel(l1);
|
||||
current_asmdata.getglobaldatalabel(l1);
|
||||
current_asmdata.getjumplabel(l2);
|
||||
reference_reset_symbol(href, l1, 0, sizeof(aint));
|
||||
hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,true);
|
||||
|
||||
@ -95,7 +95,7 @@ implementation
|
||||
b : byte;
|
||||
begin
|
||||
location_reset_ref(location,LOC_CREFERENCE,OS_NO,const_align(maxalign));
|
||||
current_asmdata.getdatalabel(l);
|
||||
current_asmdata.getglobaldatalabel(l);
|
||||
maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
|
||||
new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,l.name,const_align(maxalign));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l));
|
||||
@ -162,7 +162,7 @@ implementation
|
||||
{ :-(, we must generate a new entry }
|
||||
if not(assigned(lab_real)) then
|
||||
begin
|
||||
current_asmdata.getdatalabel(lastlabel);
|
||||
current_asmdata.getglobaldatalabel(lastlabel);
|
||||
entry^.Data:=lastlabel;
|
||||
lab_real:=lastlabel;
|
||||
maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
|
||||
@ -358,7 +358,7 @@ implementation
|
||||
end;
|
||||
cst_shortstring:
|
||||
begin
|
||||
current_asmdata.getdatalabel(lastlabel.lab);
|
||||
current_asmdata.getglobaldatalabel(lastlabel.lab);
|
||||
|
||||
datatcb:=ctai_typedconstbuilder.create([tcalo_is_lab,tcalo_make_dead_strippable]);
|
||||
{ truncate strings larger than 255 chars }
|
||||
@ -382,7 +382,7 @@ implementation
|
||||
end;
|
||||
cst_conststring:
|
||||
begin
|
||||
current_asmdata.getdatalabel(lastlabel.lab);
|
||||
current_asmdata.getglobaldatalabel(lastlabel.lab);
|
||||
|
||||
datatcb:=ctai_typedconstbuilder.create([tcalo_is_lab,tcalo_make_dead_strippable]);
|
||||
{ include terminating zero }
|
||||
@ -446,7 +446,7 @@ implementation
|
||||
lab: tasmlabel;
|
||||
i: longint;
|
||||
begin
|
||||
current_asmdata.getdatalabel(lab);
|
||||
current_asmdata.getglobaldatalabel(lab);
|
||||
result:=lab;
|
||||
lab_set:=lab;
|
||||
maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
|
||||
@ -528,7 +528,7 @@ implementation
|
||||
{ :-(, we must generate a new entry }
|
||||
if not assigned(entry^.Data) then
|
||||
begin
|
||||
current_asmdata.getdatalabel(lastlabel);
|
||||
current_asmdata.getglobaldatalabel(lastlabel);
|
||||
lab_set:=lastlabel;
|
||||
entry^.Data:=lastlabel;
|
||||
maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
|
||||
@ -588,7 +588,7 @@ implementation
|
||||
{ :-(, we must generate a new entry }
|
||||
if not assigned(entry^.Data) then
|
||||
begin
|
||||
current_asmdata.getdatalabel(lastlabel);
|
||||
current_asmdata.getglobaldatalabel(lastlabel);
|
||||
lab_set:=lastlabel;
|
||||
entry^.Data:=lastlabel;
|
||||
maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
|
||||
|
||||
@ -235,7 +235,7 @@ implementation
|
||||
len : byte;
|
||||
tcb : ttai_typedconstbuilder;
|
||||
begin
|
||||
current_asmdata.getdatalabel(p^.nl);
|
||||
current_asmdata.getglobaldatalabel(p^.nl);
|
||||
if assigned(p^.l) then
|
||||
writenames(list,p^.l);
|
||||
tcb:=ctai_typedconstbuilder.create([tcalo_is_lab]);
|
||||
@ -446,7 +446,7 @@ implementation
|
||||
|
||||
if count>0 then
|
||||
begin
|
||||
current_asmdata.getdatalabel(r);
|
||||
current_asmdata.getglobaldatalabel(r);
|
||||
gendmt:=r;
|
||||
al_globals.concat(cai_align.create(const_align(sizeof(pint))));
|
||||
al_globals.concat(Tai_label.Create(r));
|
||||
|
||||
@ -152,7 +152,7 @@ implementation
|
||||
end
|
||||
else
|
||||
begin
|
||||
current_asmdata.getdatalabel(l1);
|
||||
current_asmdata.getglobaldatalabel(l1);
|
||||
current_asmdata.getjumplabel(l2);
|
||||
reference_reset_symbol(href,l1,0,8);
|
||||
hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
|
||||
|
||||
@ -392,7 +392,7 @@ implementation
|
||||
if it is 1 then we add 2**64 as float.
|
||||
Since 2**64 can be represented exactly, use a single-precision
|
||||
constant to save space. }
|
||||
current_asmdata.getdatalabel(l1);
|
||||
current_asmdata.getglobaldatalabel(l1);
|
||||
current_asmdata.getjumplabel(l2);
|
||||
|
||||
if not(signtested) then
|
||||
|
||||
@ -168,7 +168,7 @@ interface
|
||||
{ make life of register allocator easier }
|
||||
location.register:=cg.getmmregister(current_asmdata.CurrAsmList,def_cgsize(resultdef));
|
||||
|
||||
current_asmdata.getdatalabel(l1);
|
||||
current_asmdata.getglobaldatalabel(l1);
|
||||
new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,l1.name,const_align(sizeof(pint)));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
|
||||
case def_cgsize(resultdef) of
|
||||
|
||||
@ -113,7 +113,7 @@ implementation
|
||||
cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opcgsize,OC_A,aint(max_)-aint(min_),hregister,elselabel);
|
||||
min_:=0;
|
||||
end;
|
||||
current_asmdata.getdatalabel(table);
|
||||
current_asmdata.getglobaldatalabel(table);
|
||||
{ make it a 32bit register }
|
||||
indexreg:=cg.makeregsize(current_asmdata.CurrAsmList,hregister,OS_INT);
|
||||
cg.a_load_reg_reg(current_asmdata.CurrAsmList,opcgsize,OS_INT,hregister,indexreg);
|
||||
|
||||
@ -110,7 +110,7 @@ implementation
|
||||
we load bits 0..62 and then check bit 63:
|
||||
if it is 1 then we add $80000000 000000000
|
||||
as double }
|
||||
current_asmdata.getdatalabel(l1);
|
||||
current_asmdata.getglobaldatalabel(l1);
|
||||
current_asmdata.getjumplabel(l2);
|
||||
|
||||
{ Get sign bit }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user