mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 20:49:35 +01:00
* fixed asd_references for ansi/widestrings on Darwin
git-svn-id: trunk@11658 -
This commit is contained in:
parent
9955d5b061
commit
3f39c95163
@ -327,13 +327,14 @@ implementation
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_pint(-1));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_pint(len));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));
|
||||
|
||||
{ make sure the string doesn't get dead stripped if the header is referenced }
|
||||
if (target_info.system in systems_darwin) then
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,l1.name));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,lastlabel.name));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));
|
||||
{ ... and vice versa }
|
||||
if (target_info.system in systems_darwin) then
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,lab_str.name));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,l1.name));
|
||||
{ include also terminating zero }
|
||||
getmem(pc,len+1);
|
||||
move(value_str^,pc^,len);
|
||||
@ -359,13 +360,14 @@ implementation
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_pint(-1));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_pint(len*cwidechartype.size));
|
||||
end;
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));
|
||||
|
||||
{ make sure the string doesn't get dead stripped if the header is referenced }
|
||||
if (target_info.system in systems_darwin) then
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,l1.name));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,lastlabel.name));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));
|
||||
{ ... and vice versa }
|
||||
if (target_info.system in systems_darwin) then
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,lab_str.name));
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,l1.name));
|
||||
for i:=0 to len-1 do
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_16bit(pcompilerwidestring(value_str)^.data[i]));
|
||||
{ terminating zero }
|
||||
|
||||
@ -711,11 +711,11 @@ implementation
|
||||
current_asmdata.asmlists[al_const].concat(Tai_const.Create_pint(strlength));
|
||||
{ make sure the string doesn't get dead stripped if the header is referenced }
|
||||
if (target_info.system in systems_darwin) then
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,ll.name));
|
||||
current_asmdata.asmlists[al_const].concat(tai_directive.create(asd_reference,ll.name));
|
||||
current_asmdata.asmlists[al_const].concat(Tai_label.Create(ll));
|
||||
{ ... and vice versa }
|
||||
if (target_info.system in systems_darwin) then
|
||||
list.concat(tai_directive.create(asd_reference,ll2.name));
|
||||
current_asmdata.asmlists[al_const].concat(tai_directive.create(asd_reference,ll2.name));
|
||||
getmem(ca,strlength+1);
|
||||
move(strval^,ca^,strlength);
|
||||
{ The terminating #0 to be stored in the .data section (JM) }
|
||||
@ -745,11 +745,11 @@ implementation
|
||||
end;
|
||||
{ make sure the string doesn't get dead stripped if the header is referenced }
|
||||
if (target_info.system in systems_darwin) then
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,ll.name));
|
||||
current_asmdata.asmlists[al_const].concat(tai_directive.create(asd_reference,ll.name));
|
||||
current_asmdata.asmlists[al_const].concat(Tai_label.Create(ll));
|
||||
{ ... and vice versa }
|
||||
if (target_info.system in systems_darwin) then
|
||||
current_asmdata.asmlists[al_typedconsts].concat(tai_directive.create(asd_reference,ll2.name));
|
||||
current_asmdata.asmlists[al_const].concat(tai_directive.create(asd_reference,ll2.name));
|
||||
for i:=0 to strlength-1 do
|
||||
current_asmdata.asmlists[al_const].concat(Tai_const.Create_16bit(pcompilerwidestring(strval)^.data[i]));
|
||||
{ ending #0 }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user