summaryrefslogtreecommitdiff
path: root/compiler/arm/aoptcpub.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/aoptcpub.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/aoptcpub.pas')
-rw-r--r--compiler/arm/aoptcpub.pas13
1 files changed, 8 insertions, 5 deletions
diff --git a/compiler/arm/aoptcpub.pas b/compiler/arm/aoptcpub.pas
index aa60bfd624..28451ca028 100644
--- a/compiler/arm/aoptcpub.pas
+++ b/compiler/arm/aoptcpub.pas
@@ -124,11 +124,14 @@ Implementation
begin
result:=false;
for i:=0 to taicpu(p1).ops-1 do
- if (taicpu(p1).oper[i]^.typ=top_reg) and (taicpu(p1).oper[i]^.reg=Reg) and (taicpu(p1).spilling_get_operation_type(i) in [operand_write,operand_readwrite]) then
- begin
- result:=true;
- exit;
- end;
+ case taicpu(p1).oper[i]^.typ of
+ top_reg:
+ if (taicpu(p1).oper[i]^.reg=Reg) and (taicpu(p1).spilling_get_operation_type(i) in [operand_write,operand_readwrite]) then
+ exit(true);
+ top_ref:
+ if (taicpu(p1).spilling_get_operation_type_ref(i,Reg)<>operand_read) then
+ exit(true);
+ end;
end;
End.