summaryrefslogtreecommitdiff
path: root/compiler/arm/aasmcpu.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
commit1903b037de2fb3e75826406b46f055acb70963fa (patch)
tree604cd8b790fe14e5fbe441d4cd647c80d2a36a9a /compiler/arm/aasmcpu.pas
parentad1141d52f8353457053b925cd674fe1d5c4eafc (diff)
parent953d907e4d6c3a5c2f8aaee6e5e4f73c55ce5985 (diff)
downloadfpc-blocks.tar.gz
* synchronised with trunk till r29513blocks
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blocks@29516 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/arm/aasmcpu.pas')
-rw-r--r--compiler/arm/aasmcpu.pas20
1 files changed, 15 insertions, 5 deletions
diff --git a/compiler/arm/aasmcpu.pas b/compiler/arm/aasmcpu.pas
index 58b8010226..1086f17867 100644
--- a/compiler/arm/aasmcpu.pas
+++ b/compiler/arm/aasmcpu.pas
@@ -212,7 +212,7 @@ uses
function is_same_reg_move(regtype: Tregistertype):boolean; override;
function spilling_get_operation_type(opnr: longint): topertype;override;
-
+ function spilling_get_operation_type_ref(opnr: longint; reg: tregister): topertype;override;
{ assembler }
public
{ the next will reset all instructions that can change in pass 2 }
@@ -777,6 +777,15 @@ implementation
end;
+ function taicpu.spilling_get_operation_type_ref(opnr: longint; reg: tregister): topertype;
+ begin
+ result := operand_read;
+ if (oper[opnr]^.ref^.base = reg) and
+ (oper[opnr]^.ref^.addressmode in [AM_PREINDEXED,AM_POSTINDEXED]) then
+ result := operand_readwrite;
+ end;
+
+
procedure BuildInsTabCache;
var
i : longint;
@@ -1055,15 +1064,16 @@ implementation
(tai(hp).typ=ait_instruction) then
begin
case taicpu(hp).opcode of
- A_BX,
+ A_MOV,
A_LDR,
A_ADD:
{ approximation if we hit a case jump table }
if ((taicpu(hp).opcode in [A_ADD,A_LDR]) and not(GenerateThumbCode or GenerateThumb2Code) and
(taicpu(hp).oper[0]^.typ=top_reg) and
(taicpu(hp).oper[0]^.reg=NR_PC)) or
- ((taicpu(hp).opcode=A_BX) and (GenerateThumbCode) and
- (taicpu(hp).oper[0]^.typ=top_reg))
+ ((taicpu(hp).opcode=A_MOV) and (GenerateThumbCode) and
+ (taicpu(hp).oper[0]^.typ=top_reg) and
+ (taicpu(hp).oper[0]^.reg=NR_PC))
then
begin
penalty:=multiplier;
@@ -1858,7 +1868,7 @@ implementation
ot:=OT_SHIFTEROP;
end;
else
- internalerror(200402261);
+ internalerror(2004022623);
end;
end;
end;