mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 05:39:19 +02:00
LLVM: factor out writing operands in agllvm
This commit is contained in:
parent
411fa298ae
commit
4293d4455c
@ -99,6 +99,7 @@ interface
|
|||||||
|
|
||||||
function getopcodestr(hp: taillvm): TSymStr;
|
function getopcodestr(hp: taillvm): TSymStr;
|
||||||
function getopstr(const o:toper; refwithalign: boolean) : TSymStr;
|
function getopstr(const o:toper; refwithalign: boolean) : TSymStr;
|
||||||
|
procedure writetaioper(ai: tai);
|
||||||
procedure writeparas(const paras: tfplist);
|
procedure writeparas(const paras: tfplist);
|
||||||
procedure WriteAsmRegisterAllocationClobbers(list: tasmlist);
|
procedure WriteAsmRegisterAllocationClobbers(list: tasmlist);
|
||||||
end;
|
end;
|
||||||
@ -437,8 +438,6 @@ implementation
|
|||||||
function TLLVMInstrWriter.getopstr(const o:toper; refwithalign: boolean) : TSymStr;
|
function TLLVMInstrWriter.getopstr(const o:toper; refwithalign: boolean) : TSymStr;
|
||||||
var
|
var
|
||||||
hp: tai;
|
hp: tai;
|
||||||
tmpinline: cardinal;
|
|
||||||
tmpasmblock: boolean;
|
|
||||||
begin
|
begin
|
||||||
case o.typ of
|
case o.typ of
|
||||||
top_reg:
|
top_reg:
|
||||||
@ -493,12 +492,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if assigned(o.ai) then
|
if assigned(o.ai) then
|
||||||
begin
|
begin
|
||||||
tmpinline:=1;
|
writetaioper(o.ai);
|
||||||
tmpasmblock:=false;
|
|
||||||
hp:=o.ai;
|
|
||||||
owner.writer.AsmWrite(fstr);
|
|
||||||
fstr:='';
|
|
||||||
owner.WriteTai(false,false,false,tmpinline,tmpasmblock,hp);
|
|
||||||
end;
|
end;
|
||||||
result:='';
|
result:='';
|
||||||
end;
|
end;
|
||||||
@ -517,6 +511,16 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TLLVMInstrWriter.writetaioper(ai: tai);
|
||||||
|
var
|
||||||
|
tmpinline: cardinal;
|
||||||
|
tmpasmblock: boolean;
|
||||||
|
begin
|
||||||
|
tmpinline:=1;
|
||||||
|
tmpasmblock:=false;
|
||||||
|
owner.WriteTai(false,false,false,tmpinline,tmpasmblock,ai);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TLLVMInstrWriter.WriteAsmRegisterAllocationClobbers(list: tasmlist);
|
procedure TLLVMInstrWriter.WriteAsmRegisterAllocationClobbers(list: tasmlist);
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user