Sfoglia il codice sorgente

* do not force the index location to a register for vec. nodes if the index is already in a register

git-svn-id: trunk@26629 -
florian 11 anni fa
parent
commit
1d73f49330
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      compiler/ncgmem.pas

+ 2 - 1
compiler/ncgmem.pas

@@ -1053,7 +1053,8 @@ implementation
               secondpass(right);
               secondpass(right);
 
 
               { if mulsize = 1, we won't have to modify the index }
               { if mulsize = 1, we won't have to modify the index }
-              hlcg.location_force_reg(current_asmdata.CurrAsmList,right.location,right.resultdef,ptruinttype,true);
+              if not(right.location.loc in [LOC_CREGISTER,LOC_REGISTER]) or (right.location.size<>OS_ADDR) then
+                hlcg.location_force_reg(current_asmdata.CurrAsmList,right.location,right.resultdef,ptruinttype,true);
 
 
               if isjump then
               if isjump then
                begin
                begin