mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 14:46:02 +02:00
+ Xtensa: tcpuinlinenode.second_prefetch
git-svn-id: trunk@49090 -
This commit is contained in:
parent
aa1a68000b
commit
bc4a22e24d
@ -26,10 +26,10 @@ unit ncpuinl;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
node,ninl,ncginl, aasmbase;
|
node,ninl,ncginl,aasmbase;
|
||||||
|
|
||||||
type
|
type
|
||||||
tcpuinlineNode = class(tcginlinenode)
|
tcpuinlinenode = class(tcginlinenode)
|
||||||
function first_abs_real: tnode; override;
|
function first_abs_real: tnode; override;
|
||||||
procedure second_abs_long; override;
|
procedure second_abs_long; override;
|
||||||
procedure second_abs_real; override;
|
procedure second_abs_real; override;
|
||||||
@ -37,13 +37,14 @@ unit ncpuinl;
|
|||||||
procedure second_fma; override;
|
procedure second_fma; override;
|
||||||
function first_minmax: tnode; override;
|
function first_minmax: tnode; override;
|
||||||
procedure second_minmax; override;
|
procedure second_minmax; override;
|
||||||
|
procedure second_prefetch; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
cpuinfo,
|
cpuinfo,
|
||||||
verbose,globals,
|
verbose,globals,globtype,
|
||||||
compinnr,
|
compinnr,
|
||||||
aasmdata,
|
aasmdata,
|
||||||
aasmcpu,
|
aasmcpu,
|
||||||
@ -52,7 +53,7 @@ unit ncpuinl;
|
|||||||
hlcgobj,
|
hlcgobj,
|
||||||
pass_2,
|
pass_2,
|
||||||
cgbase, cgobj, cgutils,
|
cgbase, cgobj, cgutils,
|
||||||
ncal,
|
ncal,nutils,
|
||||||
cpubase;
|
cpubase;
|
||||||
|
|
||||||
procedure tcpuinlinenode.second_abs_long;
|
procedure tcpuinlinenode.second_abs_long;
|
||||||
@ -182,7 +183,7 @@ unit ncpuinl;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcpuinlineNode.second_minmax;
|
procedure tcpuinlinenode.second_minmax;
|
||||||
var
|
var
|
||||||
paraarray : array[1..2] of tnode;
|
paraarray : array[1..2] of tnode;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
@ -231,6 +232,34 @@ unit ncpuinl;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure tcpuinlinenode.second_prefetch;
|
||||||
|
var
|
||||||
|
ref : treference;
|
||||||
|
r : tregister;
|
||||||
|
checkpointer_used : boolean;
|
||||||
|
begin
|
||||||
|
{ do not call Checkpointer for left node }
|
||||||
|
checkpointer_used:=(cs_checkpointer in current_settings.localswitches);
|
||||||
|
if checkpointer_used then
|
||||||
|
node_change_local_switch(left,cs_checkpointer,false);
|
||||||
|
secondpass(left);
|
||||||
|
if checkpointer_used then
|
||||||
|
node_change_local_switch(left,cs_checkpointer,false);
|
||||||
|
case left.location.loc of
|
||||||
|
LOC_CREFERENCE,
|
||||||
|
LOC_REFERENCE:
|
||||||
|
begin
|
||||||
|
r:=cg.getintregister(current_asmdata.CurrAsmList,OS_ADDR);
|
||||||
|
cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,left.location.reference,r);
|
||||||
|
reference_reset_base(ref,r,0,location.reference.temppos,left.location.reference.alignment,location.reference.volatility);
|
||||||
|
current_asmdata.CurrAsmList.concat(taicpu.op_reg_const(A_DPFR,ref.base,ref.offset));
|
||||||
|
end;
|
||||||
|
else
|
||||||
|
{ nothing to prefetch };
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
cinlinenode:=tcpuinlinenode;
|
cinlinenode:=tcpuinlinenode;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user