浏览代码

* 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: trunk@16650 -

Jonas Maebe 14 年之前
父节点
当前提交
5175a5ee07
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 2 0
      compiler/powerpc/nppcmat.pas
  2. 2 0
      compiler/powerpc64/nppcmat.pas

+ 2 - 0
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

+ 2 - 0
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