mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 04:26:13 +02:00
+ prefetch support for arm
git-svn-id: trunk@6561 -
This commit is contained in:
parent
746e4770a6
commit
ffd79553a0
@ -161,6 +161,7 @@ uses
|
|||||||
constructor op_none(op : tasmop);
|
constructor op_none(op : tasmop);
|
||||||
|
|
||||||
constructor op_reg(op : tasmop;_op1 : tregister);
|
constructor op_reg(op : tasmop;_op1 : tregister);
|
||||||
|
constructor op_ref(op : tasmop;const _op1 : treference);
|
||||||
constructor op_const(op : tasmop;_op1 : longint);
|
constructor op_const(op : tasmop;_op1 : longint);
|
||||||
|
|
||||||
constructor op_reg_reg(op : tasmop;_op1,_op2 : tregister);
|
constructor op_reg_reg(op : tasmop;_op1,_op2 : tregister);
|
||||||
@ -298,6 +299,15 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ for pld }
|
||||||
|
constructor taicpu.op_ref(op : tasmop;const _op1 : treference);
|
||||||
|
begin
|
||||||
|
inherited create(op);
|
||||||
|
ops:=1;
|
||||||
|
loadref(0,_op1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor taicpu.op_reg(op : tasmop;_op1 : tregister);
|
constructor taicpu.op_reg(op : tasmop;_op1 : tregister);
|
||||||
begin
|
begin
|
||||||
inherited create(op);
|
inherited create(op);
|
||||||
|
@ -48,6 +48,7 @@ interface
|
|||||||
procedure second_cos_real; override;
|
procedure second_cos_real; override;
|
||||||
procedure second_sin_real; override;
|
procedure second_sin_real; override;
|
||||||
}
|
}
|
||||||
|
procedure second_prefetch; override;
|
||||||
private
|
private
|
||||||
procedure load_fpu_location;
|
procedure load_fpu_location;
|
||||||
end;
|
end;
|
||||||
@ -58,6 +59,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
globtype,systems,
|
globtype,systems,
|
||||||
cutils,verbose,globals,fmodule,
|
cutils,verbose,globals,fmodule,
|
||||||
|
cpuinfo,
|
||||||
symconst,symdef,
|
symconst,symdef,
|
||||||
aasmbase,aasmtai,aasmdata,aasmcpu,
|
aasmbase,aasmtai,aasmdata,aasmcpu,
|
||||||
cgbase,cgutils,
|
cgbase,cgutils,
|
||||||
@ -211,6 +213,30 @@ implementation
|
|||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
procedure tarminlinenode.second_prefetch;
|
||||||
|
var
|
||||||
|
ref : treference;
|
||||||
|
r : tregister;
|
||||||
|
begin
|
||||||
|
if current_settings.cputype>=cpu_armv5 then
|
||||||
|
begin
|
||||||
|
secondpass(left);
|
||||||
|
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);
|
||||||
|
{ since the address might be nil we can't use ldr for older cpus }
|
||||||
|
current_asmdata.CurrAsmList.concat(taicpu.op_ref(A_PLD,ref));
|
||||||
|
end;
|
||||||
|
else
|
||||||
|
internalerror(200402021);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
cinlinenode:=tarminlinenode;
|
cinlinenode:=tarminlinenode;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user