summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-12-28 23:52:25 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-12-28 23:52:25 +0000
commit78b2bda313d3ee4006fbcc4ea6c2f3d81499e8f4 (patch)
tree30e01efb586f0b72280fd79a13fa48aa1542e093
parent71209b683164bbc0a480576f57d0bdc46c0cc685 (diff)
downloadfpc-78b2bda313d3ee4006fbcc4ea6c2f3d81499e8f4.tar.gz
* handle LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF in
unaryminus code (a.o., fixes compiler crash with test/terecs6 on darwin/ppc32 under certain circumstances: http://www.freepascal.org/testsuite/cgi-bin/testsuite.cgi?action=3&run1id=74027&run2id=74101&testfileid=3838 ) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16650 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/powerpc/nppcmat.pas2
-rw-r--r--compiler/powerpc64/nppcmat.pas2
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/powerpc/nppcmat.pas b/compiler/powerpc/nppcmat.pas
index 0286b2e0f7..d804571af2 100644
--- a/compiler/powerpc/nppcmat.pas
+++ b/compiler/powerpc/nppcmat.pas
@@ -576,6 +576,8 @@ end;
end
else
begin
+ if left.location.loc in [LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF] then
+ location_force_reg(current_asmdata.CurrAsmList,left.location,left.location.size,true);
location_copy(location,left.location);
location.loc:=LOC_REGISTER;
case left.location.loc of
diff --git a/compiler/powerpc64/nppcmat.pas b/compiler/powerpc64/nppcmat.pas
index 3807cf8434..b1a008188c 100644
--- a/compiler/powerpc64/nppcmat.pas
+++ b/compiler/powerpc64/nppcmat.pas
@@ -316,6 +316,8 @@ var
begin
secondpass(left);
begin
+ if left.location.loc in [LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF] then
+ location_force_reg(current_asmdata.CurrAsmList,left.location,left.location.size,true);
location_copy(location, left.location);
location.loc := LOC_REGISTER;
case left.location.loc of