mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 05:04:05 +02:00
+ support for asd_reference, asd_weak_reference and asd_weak_definition
in AIX assembler writer git-svn-id: trunk@20836 -
This commit is contained in:
parent
5433db6a49
commit
1c91a555f4
@ -54,6 +54,7 @@ interface
|
|||||||
procedure WriteWeakSymbolDef(s: tasmsymbol); virtual;
|
procedure WriteWeakSymbolDef(s: tasmsymbol); virtual;
|
||||||
procedure WriteAixStringConst(hp: tai_string);
|
procedure WriteAixStringConst(hp: tai_string);
|
||||||
procedure WriteAixIntConst(hp: tai_const);
|
procedure WriteAixIntConst(hp: tai_const);
|
||||||
|
procedure WriteDirectiveName(dir: TAsmDirective); virtual;
|
||||||
public
|
public
|
||||||
function MakeCmdLine: TCmdStr; override;
|
function MakeCmdLine: TCmdStr; override;
|
||||||
procedure WriteTree(p:TAsmList);override;
|
procedure WriteTree(p:TAsmList);override;
|
||||||
@ -1317,7 +1318,7 @@ implementation
|
|||||||
|
|
||||||
ait_directive :
|
ait_directive :
|
||||||
begin
|
begin
|
||||||
AsmWrite('.'+directivestr[tai_directive(hp).directive]+' ');
|
WriteDirectiveName(tai_directive(hp).directive);
|
||||||
if tai_directive(hp).name <>'' then
|
if tai_directive(hp).name <>'' then
|
||||||
AsmWrite(tai_directive(hp).name);
|
AsmWrite(tai_directive(hp).name);
|
||||||
AsmLn;
|
AsmLn;
|
||||||
@ -1495,6 +1496,12 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TGNUAssembler.WriteDirectiveName(dir: TAsmDirective);
|
||||||
|
begin
|
||||||
|
AsmWrite('.'+directivestr[dir]+' ');
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TGNUAssembler.WriteAsmList;
|
procedure TGNUAssembler.WriteAsmList;
|
||||||
var
|
var
|
||||||
n : string;
|
n : string;
|
||||||
|
@ -54,9 +54,11 @@ unit agppcgas;
|
|||||||
|
|
||||||
TPPCAIXAssembler=class(TPPCGNUAssembler)
|
TPPCAIXAssembler=class(TPPCGNUAssembler)
|
||||||
constructor create(smart: boolean); override;
|
constructor create(smart: boolean); override;
|
||||||
|
protected
|
||||||
|
function sectionname(atype: TAsmSectiontype; const aname: string; aorder: TAsmSectionOrder): string; override;
|
||||||
procedure WriteExtraHeader; override;
|
procedure WriteExtraHeader; override;
|
||||||
procedure WriteExtraFooter; override;
|
procedure WriteExtraFooter; override;
|
||||||
function sectionname(atype: TAsmSectiontype; const aname: string; aorder: TAsmSectionOrder): string; override;
|
procedure WriteDirectiveName(dir: TAsmDirective); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
topstr = string[4];
|
topstr = string[4];
|
||||||
@ -493,6 +495,20 @@ unit agppcgas;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TPPCAIXAssembler.WriteDirectiveName(dir: TAsmDirective);
|
||||||
|
begin
|
||||||
|
case dir of
|
||||||
|
asd_reference:
|
||||||
|
AsmWrite('.ref ');
|
||||||
|
asd_weak_reference,
|
||||||
|
asd_weak_definition:
|
||||||
|
AsmWrite('.weak ');
|
||||||
|
else
|
||||||
|
inherited WriteDirectiveName(dir);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TPPCAIXAssembler.sectionname(atype: TAsmSectiontype; const aname: string; aorder: TAsmSectionOrder): string;
|
function TPPCAIXAssembler.sectionname(atype: TAsmSectiontype; const aname: string; aorder: TAsmSectionOrder): string;
|
||||||
begin
|
begin
|
||||||
case atype of
|
case atype of
|
||||||
|
Loading…
Reference in New Issue
Block a user