Selaa lähdekoodia

* fixed compiler internal error when the in_not_assign_x/in_neg_assign_x are
applied to a LOC_REGISTER variable

git-svn-id: trunk@35750 -

nickysn 8 vuotta sitten
vanhempi
commit
6b43705437
1 muutettua tiedostoa jossa 20 lisäystä ja 4 poistoa
  1. 20 4
      compiler/ncginl.pas

+ 20 - 4
compiler/ncginl.pas

@@ -511,12 +511,28 @@ implementation
           { load parameter, must be a reference }
           secondpass(left);
 
+          location_reset(location,LOC_VOID,OS_NO);
+
+          if left.location.loc=LOC_REGISTER then
+            begin
 {$ifndef cpu64bitalu}
-          if def_cgsize(left.resultdef) in [OS_64,OS_S64] then
-            cg64.a_op64_reg_loc(current_asmdata.CurrAsmList,negnotop[inlinenumber],def_cgsize(left.resultdef),NR_NO64,left.location)
-          else
+              if def_cgsize(left.resultdef) in [OS_64,OS_S64] then
+                cg64.a_op64_reg_loc(current_asmdata.CurrAsmList,negnotop[inlinenumber],def_cgsize(left.resultdef),left.location.register64,left.location)
+              else
 {$endif not cpu64bitalu}
-            hlcg.a_op_reg_loc(current_asmdata.CurrAsmList,negnotop[inlinenumber],left.resultdef,NR_NO,left.location);
+                hlcg.a_op_reg_loc(current_asmdata.CurrAsmList,negnotop[inlinenumber],left.resultdef,left.location.register,left.location);
+            end
+          else if left.location.loc=LOC_REFERENCE then
+            begin
+{$ifndef cpu64bitalu}
+              if def_cgsize(left.resultdef) in [OS_64,OS_S64] then
+                cg64.a_op64_reg_loc(current_asmdata.CurrAsmList,negnotop[inlinenumber],def_cgsize(left.resultdef),NR_NO64,left.location)
+              else
+{$endif not cpu64bitalu}
+                hlcg.a_op_reg_loc(current_asmdata.CurrAsmList,negnotop[inlinenumber],left.resultdef,NR_NO,left.location);
+            end
+          else
+            internalerror(2017040701);
         end;