summaryrefslogtreecommitdiff
path: root/compiler/arm/cgcpu.pas
diff options
context:
space:
mode:
authorkaroly <karoly@3ad0048d-3df7-0310-abae-a5850022a9f2>2014-06-06 17:44:45 +0000
committerkaroly <karoly@3ad0048d-3df7-0310-abae-a5850022a9f2>2014-06-06 17:44:45 +0000
commitc54a122d7fa84d89731083c9cd53cfc5bf45b942 (patch)
tree1c0db23929b24154d4df7a011488e83edbbcd3ce /compiler/arm/cgcpu.pas
parent58b82b14acc31c22c363f412a3ef76aabd57c3e5 (diff)
downloadfpc-c54a122d7fa84d89731083c9cd53cfc5bf45b942.tar.gz
arm: have a CPU specific op_const_ref, so the reference doesn't get fixed up both in a_load_reg_ref and a_load_ref_reg
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@27881 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/arm/cgcpu.pas')
-rw-r--r--compiler/arm/cgcpu.pas14
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/arm/cgcpu.pas b/compiler/arm/cgcpu.pas
index aadd2fe069..65dd9b4369 100644
--- a/compiler/arm/cgcpu.pas
+++ b/compiler/arm/cgcpu.pas
@@ -119,6 +119,7 @@ unit cgcpu;
{ tcgarm is shared between normal arm and thumb-2 }
tcgarm = class(tbasecgarm)
procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; reg: TRegister); override;
+ procedure a_op_const_ref(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; const ref: TReference); override;
procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; src, dst: TRegister); override;
procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg;
@@ -685,6 +686,19 @@ unit cgcpu;
a_op_const_reg_reg(list,op,size,a,reg,reg);
end;
+ procedure tcgarm.a_op_const_ref(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; const ref: TReference);
+ var
+ tmpreg,tmpresreg : tregister;
+ tmpref : treference;
+ begin
+ tmpreg:=getintregister(list,size);
+ tmpresreg:=getintregister(list,size);
+ tmpref:=ref;
+ fixref(list,tmpref);
+ a_load_ref_reg(list,size,size,tmpref,tmpreg);
+ a_op_const_reg_reg(list,op,size,a,tmpreg,tmpresreg);
+ a_load_reg_ref(list,size,size,tmpresreg,tmpref);
+ end;
procedure tcgarm.a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; src, dst: TRegister);
var