summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2017-05-30 11:28:15 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2017-05-30 11:28:15 +0000
commitf487a9f70cc3e8a421f6fa3d83b0fa4ca396b971 (patch)
treee3dc0f40a1fd80ccb13595997e55194ec7c32d62
parent9383bb4c7ae57a03ef2d3ea26da7f5af2e71a706 (diff)
downloadfpc-f487a9f70cc3e8a421f6fa3d83b0fa4ca396b971.tar.gz
--- Merging r35545 into '.':
U compiler/arm/aoptcpu.pas --- Recording mergeinfo for merge of r35545 into '.': U . --- Merging r35552 into '.': G compiler/arm/aoptcpu.pas --- Recording mergeinfo for merge of r35552 into '.': G . # revisions: 35545,35552 git-svn-id: https://svn.freepascal.org/svn/fpc/branches/fixes_3_0@36371 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/arm/aoptcpu.pas10
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/arm/aoptcpu.pas b/compiler/arm/aoptcpu.pas
index 75dc92aaca..bd78601629 100644
--- a/compiler/arm/aoptcpu.pas
+++ b/compiler/arm/aoptcpu.pas
@@ -2500,13 +2500,14 @@ Implementation
hp3:=tai(p.Previous);
hp5:=tai(p.next);
asml.Remove(p);
- { if there is a reg. dealloc instruction or address labels (e.g. for GOT-less PIC)
+ { if there is a reg. alloc/dealloc/sync instructions or address labels (e.g. for GOT-less PIC)
associated with p, move it together with p }
{ before the instruction? }
+ { find reg allocs,deallocs and PIC labels }
while assigned(hp3) and (hp3.typ<>ait_instruction) do
begin
- if ( (hp3.typ=ait_regalloc) and (tai_regalloc(hp3).ratype in [ra_dealloc]) and
+ if ( (hp3.typ=ait_regalloc) and (tai_regalloc(hp3).ratype in [ra_alloc, ra_dealloc]) and
RegInInstruction(tai_regalloc(hp3).reg,p) )
or ( (hp3.typ=ait_label) and (tai_label(hp3).labsym.typ=AT_ADDR) )
then
@@ -2514,7 +2515,7 @@ Implementation
hp4:=hp3;
hp3:=tai(hp3.Previous);
asml.Remove(hp4);
- list.Concat(hp4);
+ list.Insert(hp4);
end
else
hp3:=tai(hp3.Previous);
@@ -2524,9 +2525,10 @@ Implementation
SwapRegLive(taicpu(p),taicpu(hp1));
{ after the instruction? }
+ { find reg deallocs and reg syncs }
while assigned(hp5) and (hp5.typ<>ait_instruction) do
begin
- if (hp5.typ=ait_regalloc) and (tai_regalloc(hp5).ratype in [ra_dealloc]) and
+ if (hp5.typ=ait_regalloc) and (tai_regalloc(hp5).ratype in [ra_dealloc, ra_sync]) and
RegInInstruction(tai_regalloc(hp5).reg,p) then
begin
hp4:=hp5;