Przeglądaj źródła

* several packed array and varset related ies on sparc fixed

git-svn-id: trunk@6899 -
florian 18 lat temu
rodzic
commit
53b2b1e882
2 zmienionych plików z 11 dodań i 7 usunięć
  1. 7 6
      compiler/ncgadd.pas
  2. 4 1
      compiler/sparc/ncpumat.pas

+ 7 - 6
compiler/ncgadd.pas

@@ -232,11 +232,11 @@ interface
     procedure tcgaddnode.second_opsmallset;
       begin
         { when a setdef is passed, it has to be a smallset }
-        if ((left.resultdef.typ=setdef) and
-            (tsetdef(left.resultdef).settype<>smallset)) or
-           ((right.resultdef.typ=setdef) and
-            (tsetdef(right.resultdef).settype<>smallset)) then
-          internalerror(200203301);
+        if is_varset(left.resultdef) or
+          is_normalset(left.resultdef) or
+          is_varset(right.resultdef) or
+          is_normalset(right.resultdef) then
+          internalerror(200203302);
 
         if nodetype in [equaln,unequaln,gtn,gten,lten,ltn] then
           second_cmpsmallset
@@ -769,7 +769,8 @@ interface
             begin
               {Normalsets are already handled in pass1 if mmx
                should not be used.}
-              if (tsetdef(left.resultdef).settype<>smallset) then
+              if is_varset(tsetdef(left.resultdef)) or
+                is_normalset(tsetdef(left.resultdef)) then
                 begin
 {$ifdef SUPPORT_MMX}
                 {$ifdef i386}

+ 4 - 1
compiler/sparc/ncpumat.pas

@@ -308,7 +308,10 @@ implementation
                   location_copy(location,left.location);
                   inverse_flags(location.resflags);
                 end;
-              LOC_REGISTER, LOC_CREGISTER, LOC_REFERENCE, LOC_CREFERENCE :
+              LOC_REGISTER, LOC_CREGISTER,
+              LOC_REFERENCE, LOC_CREFERENCE,
+              LOC_SUBSETREG, LOC_CSUBSETREG,
+              LOC_SUBSETREF, LOC_CSUBSETREF:
                 begin
                   location_force_reg(current_asmdata.CurrAsmList,left.location,def_cgsize(left.resultdef),true);
                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_const_reg(A_SUBcc,left.location.register,0,NR_G0));