mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 18:29:13 +02:00
* also support unified syntax for non-thumb2 (not yet activatable/usable)
git-svn-id: trunk@31804 -
This commit is contained in:
parent
ff4847f685
commit
c5f64a51da
@ -42,6 +42,8 @@ unit agarmgas;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
TArmInstrWriter=class(TCPUInstrWriter)
|
TArmInstrWriter=class(TCPUInstrWriter)
|
||||||
|
unified_syntax: boolean;
|
||||||
|
|
||||||
procedure WriteInstruction(hp : tai);override;
|
procedure WriteInstruction(hp : tai);override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -92,6 +94,8 @@ unit agarmgas;
|
|||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
InstrWriter := TArmInstrWriter.create(self);
|
InstrWriter := TArmInstrWriter.create(self);
|
||||||
|
if GenerateThumb2Code then
|
||||||
|
TArmInstrWriter(InstrWriter).unified_syntax:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -126,7 +130,7 @@ unit agarmgas;
|
|||||||
procedure TArmGNUAssembler.WriteExtraHeader;
|
procedure TArmGNUAssembler.WriteExtraHeader;
|
||||||
begin
|
begin
|
||||||
inherited WriteExtraHeader;
|
inherited WriteExtraHeader;
|
||||||
if GenerateThumb2Code then
|
if TArmInstrWriter(InstrWriter).unified_syntax then
|
||||||
writer.AsmWriteLn(#9'.syntax unified');
|
writer.AsmWriteLn(#9'.syntax unified');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -319,12 +323,14 @@ unit agarmgas;
|
|||||||
sep: string[3];
|
sep: string[3];
|
||||||
begin
|
begin
|
||||||
op:=taicpu(hp).opcode;
|
op:=taicpu(hp).opcode;
|
||||||
|
postfix:='';
|
||||||
if GenerateThumb2Code then
|
if GenerateThumb2Code then
|
||||||
begin
|
begin
|
||||||
postfix:='';
|
|
||||||
if taicpu(hp).wideformat then
|
if taicpu(hp).wideformat then
|
||||||
postfix:='.w';
|
postfix:='.w';
|
||||||
|
end;
|
||||||
|
if unified_syntax then
|
||||||
|
begin
|
||||||
if taicpu(hp).ops = 0 then
|
if taicpu(hp).ops = 0 then
|
||||||
s:=#9+gas_op2str[op]+cond2str[taicpu(hp).condition]+oppostfix2str[taicpu(hp).oppostfix]
|
s:=#9+gas_op2str[op]+cond2str[taicpu(hp).condition]+oppostfix2str[taicpu(hp).oppostfix]
|
||||||
else if taicpu(hp).oppostfix in [PF_8..PF_U32F64] then
|
else if taicpu(hp).oppostfix in [PF_8..PF_U32F64] then
|
||||||
|
Loading…
Reference in New Issue
Block a user