* fixed asd_references for ansi/widestrings on Darwin

git-svn-id: trunk@11658 -
This commit is contained in:
Jonas Maebe 2008-08-27 22:38:05 +00:00
parent 9955d5b061
commit 3f39c95163
2 changed files with 12 additions and 10 deletions

View File

@ -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 }

View File

@ -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 }