* get rid of EscapeLabel, since sdcc-sdasz80 doesn't seem to need it

git-svn-id: branches/z80@44452 -
This commit is contained in:
nickysn 2020-03-31 00:35:05 +00:00
parent a38917f471
commit a4127ce3ab

View File

@ -41,7 +41,6 @@ unit agsdasz80;
TSdccSdasZ80Assembler=class(TExternalAssembler) TSdccSdasZ80Assembler=class(TExternalAssembler)
private private
function EscapeLabel(s: ansistring): ansistring;
procedure WriteDecodedSleb128(a: int64); procedure WriteDecodedSleb128(a: int64);
procedure WriteDecodedUleb128(a: qword); procedure WriteDecodedUleb128(a: qword);
public public
@ -69,23 +68,6 @@ unit agsdasz80;
#9'.dw'#9,#9'FIXMEDD'#9,#9'FIXMEDQ'#9 #9'.dw'#9,#9'FIXMEDD'#9,#9'FIXMEDQ'#9
); );
function TSdccSdasZ80Assembler.EscapeLabel(s: ansistring): ansistring;
var
i: Integer;
begin
result:='';
for i:=1 to length(s) do
if ((s[i]>='a') and (s[i]<='z')) or
((s[i]>='A') and (s[i]<='Z')) or
((s[i]>='0') and (s[i]<='9')) or
(s[i]='.') then
result:=result+s[i]
else if s[i]='_' then
result:=result+'__'
else
result:=result+('_'+HexStr(Ord(s[i]),2));
end;
procedure TSdccSdasZ80Assembler.WriteDecodedSleb128(a: int64); procedure TSdccSdasZ80Assembler.WriteDecodedSleb128(a: int64);
var var
i,len : longint; i,len : longint;
@ -249,7 +231,7 @@ unit agsdasz80;
begin begin
if tai_label(hp).labsym.is_used then if tai_label(hp).labsym.is_used then
begin begin
writer.AsmWrite(EscapeLabel(tai_label(hp).labsym.name)); writer.AsmWrite(tai_label(hp).labsym.name);
writer.AsmWriteLn(':'); writer.AsmWriteLn(':');
end; end;
end; end;
@ -273,7 +255,7 @@ unit agsdasz80;
end;} end;}
{if tai_symbol(hp).is_global then {if tai_symbol(hp).is_global then
writer.AsmWriteLn(#9'PUBLIC'#9+tai_symbol(hp).sym.name);} writer.AsmWriteLn(#9'PUBLIC'#9+tai_symbol(hp).sym.name);}
writer.AsmWrite(EscapeLabel(tai_symbol(hp).sym.name)); writer.AsmWrite(tai_symbol(hp).sym.name);
{if assigned(hp.next) and not(tai(hp.next).typ in {if assigned(hp.next) and not(tai(hp.next).typ in
[ait_const,ait_realconst,ait_string]) then} [ait_const,ait_realconst,ait_string]) then}
writer.AsmWriteLn(':'); writer.AsmWriteLn(':');
@ -301,9 +283,9 @@ unit agsdasz80;
if assigned(tai_const(hp).sym) then if assigned(tai_const(hp).sym) then
begin begin
if assigned(tai_const(hp).endsym) then if assigned(tai_const(hp).endsym) then
s:=EscapeLabel(tai_const(hp).endsym.name)+'-'+EscapeLabel(tai_const(hp).sym.name) s:=tai_const(hp).endsym.name+'-'+tai_const(hp).sym.name
else else
s:=EscapeLabel(tai_const(hp).sym.name); s:=tai_const(hp).sym.name;
if tai_const(hp).value<>0 then if tai_const(hp).value<>0 then
s:=s+tostr_with_plus(tai_const(hp).value); s:=s+tostr_with_plus(tai_const(hp).value);
if consttype in [aitconst_64bit,aitconst_64bit_unaligned] then if consttype in [aitconst_64bit,aitconst_64bit_unaligned] then
@ -348,9 +330,9 @@ unit agsdasz80;
if assigned(tai_const(hp).sym) then if assigned(tai_const(hp).sym) then
begin begin
if assigned(tai_const(hp).endsym) then if assigned(tai_const(hp).endsym) then
s:=EscapeLabel(tai_const(hp).endsym.name)+'-'+EscapeLabel(tai_const(hp).sym.name) s:=tai_const(hp).endsym.name+'-'+tai_const(hp).sym.name
else else
s:=EscapeLabel(tai_const(hp).sym.name); s:=tai_const(hp).sym.name;
if tai_const(hp).value<>0 then if tai_const(hp).value<>0 then
s:=s+tostr_with_plus(tai_const(hp).value); s:=s+tostr_with_plus(tai_const(hp).value);
end end