mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 20:40:20 +02:00
* added in_sqr_x support for llvm
git-svn-id: trunk@32247 -
This commit is contained in:
parent
98c08dee1a
commit
69b832c1d0
@ -34,8 +34,10 @@ interface
|
|||||||
protected
|
protected
|
||||||
function first_get_frame: tnode; override;
|
function first_get_frame: tnode; override;
|
||||||
function first_abs_real: tnode; override;
|
function first_abs_real: tnode; override;
|
||||||
|
function first_sqr_real: tnode; override;
|
||||||
public
|
public
|
||||||
procedure second_length; override;
|
procedure second_length; override;
|
||||||
|
procedure second_sqr_real; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -48,7 +50,8 @@ implementation
|
|||||||
nutils,nadd,nbas,ncal,ncon,nflw,ninl,nld,nmat,
|
nutils,nadd,nbas,ncal,ncon,nflw,ninl,nld,nmat,
|
||||||
pass_2,
|
pass_2,
|
||||||
cgbase,cgutils,tgobj,hlcgobj,
|
cgbase,cgutils,tgobj,hlcgobj,
|
||||||
cpubase;
|
cpubase,
|
||||||
|
llvmbase,aasmllvm;
|
||||||
|
|
||||||
|
|
||||||
function tllvminlinenode.first_get_frame: tnode;
|
function tllvminlinenode.first_get_frame: tnode;
|
||||||
@ -114,6 +117,16 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function tllvminlinenode.first_sqr_real: tnode;
|
||||||
|
begin
|
||||||
|
result:=nil;
|
||||||
|
if use_vectorfpu(left.resultdef) then
|
||||||
|
expectloc:=LOC_MMREGISTER
|
||||||
|
else
|
||||||
|
expectloc:=LOC_FPUREGISTER;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tllvminlinenode.second_length;
|
procedure tllvminlinenode.second_length;
|
||||||
var
|
var
|
||||||
lengthlab, nillab: tasmlabel;
|
lengthlab, nillab: tasmlabel;
|
||||||
@ -170,6 +183,29 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure tllvminlinenode.second_sqr_real;
|
||||||
|
begin
|
||||||
|
secondpass(left);
|
||||||
|
location.loc:=expectloc;
|
||||||
|
if expectloc=LOC_MMREGISTER then
|
||||||
|
begin
|
||||||
|
hlcg.location_force_mmregscalar(current_asmdata.CurrAsmList,left.location,left.resultdef,true);
|
||||||
|
location.register:=hlcg.getmmregister(current_asmdata.CurrAsmList,resultdef);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,left.location,left.resultdef,true);
|
||||||
|
location.register:=hlcg.getfpuregister(current_asmdata.CurrAsmList,resultdef);
|
||||||
|
end;
|
||||||
|
current_asmdata.CurrAsmList.concat(
|
||||||
|
taillvm.op_reg_size_reg_reg(la_mul,
|
||||||
|
location.register,resultdef,
|
||||||
|
left.location.register,left.location.register
|
||||||
|
)
|
||||||
|
);
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
cinlinenode:=tllvminlinenode;
|
cinlinenode:=tllvminlinenode;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user